dorkos 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,476 +0,0 @@
1
- var kL=Object.defineProperty;var D2=e=>{throw TypeError(e)};var NL=(e,t,n)=>t in e?kL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $e=(e,t,n)=>NL(e,typeof t!="symbol"?t+"":t,n),Dg=(e,t,n)=>t.has(e)||D2("Cannot "+n);var K=(e,t,n)=>(Dg(e,t,"read from private field"),n?n.call(e):t.get(e)),Be=(e,t,n)=>t.has(e)?D2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ke=(e,t,n,r)=>(Dg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),nt=(e,t,n)=>(Dg(e,t,"access private method"),n);var rh=(e,t,n,r)=>({set _(s){ke(e,t,s,n)},get _(){return K(e,t,r)}});function RL(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 DL="modulepreload",OL=function(e){return"/"+e},O2={},ky=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let l=function(d){return Promise.all(d.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));s=l(n.map(d=>{if(d=OL(d),d in O2)return;O2[d]=!0;const m=d.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${p}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":DL,m||(b.as="script"),b.crossOrigin="",b.href=d,f&&b.setAttribute("nonce",f),document.head.appendChild(b),m)return new Promise((x,S)=>{b.addEventListener("load",x),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${d}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return s.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};function Tf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Og={exports:{}},dc={};/**
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 M2;function ML(){if(M2)return dc;M2=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 c in s)c!=="key"&&(o[c]=s[c])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:o}}return dc.Fragment=t,dc.jsx=n,dc.jsxs=n,dc}var I2;function IL(){return I2||(I2=1,Og.exports=ML()),Og.exports}var g=IL(),Mg={exports:{}},Ke={};/**
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 L2;function LL(){if(L2)return Ke;L2=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"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function x(V){return V===null||typeof V!="object"?null:(V=b&&V[b]||V["@@iterator"],typeof V=="function"?V:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,w={};function A(V,ie,I){this.props=V,this.context=ie,this.refs=w,this.updater=I||S}A.prototype.isReactComponent={},A.prototype.setState=function(V,ie){if(typeof V!="object"&&typeof V!="function"&&V!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,V,ie,"setState")},A.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function N(){}N.prototype=A.prototype;function k(V,ie,I){this.props=V,this.context=ie,this.refs=w,this.updater=I||S}var R=k.prototype=new N;R.constructor=k,C(R,A.prototype),R.isPureReactComponent=!0;var B=Array.isArray;function O(){}var j={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function q(V,ie,I){var de=I.ref;return{$$typeof:e,type:V,key:ie,ref:de!==void 0?de:null,props:I}}function L(V,ie){return q(V.type,ie,V.props)}function X(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function Q(V){var ie={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(I){return ie[I]})}var ee=/\/+/g;function ne(V,ie){return typeof V=="object"&&V!==null&&V.key!=null?Q(""+V.key):ie.toString(36)}function Z(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(O,O):(V.status="pending",V.then(function(ie){V.status==="pending"&&(V.status="fulfilled",V.value=ie)},function(ie){V.status==="pending"&&(V.status="rejected",V.reason=ie)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function D(V,ie,I,de,xe){var Te=typeof V;(Te==="undefined"||Te==="boolean")&&(V=null);var he=!1;if(V===null)he=!0;else switch(Te){case"bigint":case"string":case"number":he=!0;break;case"object":switch(V.$$typeof){case e:case t:he=!0;break;case m:return he=V._init,D(he(V._payload),ie,I,de,xe)}}if(he)return xe=xe(V),he=de===""?"."+ne(V,0):de,B(xe)?(I="",he!=null&&(I=he.replace(ee,"$&/")+"/"),D(xe,ie,I,"",function(Pe){return Pe})):xe!=null&&(X(xe)&&(xe=L(xe,I+(xe.key==null||V&&V.key===xe.key?"":(""+xe.key).replace(ee,"$&/")+"/")+he)),ie.push(xe)),1;he=0;var Se=de===""?".":de+":";if(B(V))for(var Ce=0;Ce<V.length;Ce++)de=V[Ce],Te=Se+ne(de,Ce),he+=D(de,ie,I,Te,xe);else if(Ce=x(V),typeof Ce=="function")for(V=Ce.call(V),Ce=0;!(de=V.next()).done;)de=de.value,Te=Se+ne(de,Ce++),he+=D(de,ie,I,Te,xe);else if(Te==="object"){if(typeof V.then=="function")return D(Z(V),ie,I,de,xe);throw ie=String(V),Error("Objects are not valid as a React child (found: "+(ie==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":ie)+"). If you meant to render a collection of children, use an array instead.")}return he}function H(V,ie,I){if(V==null)return V;var de=[],xe=0;return D(V,de,"","",function(Te){return ie.call(I,Te,xe++)}),de}function $(V){if(V._status===-1){var ie=V._result;ie=ie(),ie.then(function(I){(V._status===0||V._status===-1)&&(V._status=1,V._result=I)},function(I){(V._status===0||V._status===-1)&&(V._status=2,V._result=I)}),V._status===-1&&(V._status=0,V._result=ie)}if(V._status===1)return V._result.default;throw V._result}var te=typeof reportError=="function"?reportError:function(V){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ie=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof V=="object"&&V!==null&&typeof V.message=="string"?String(V.message):String(V),error:V});if(!window.dispatchEvent(ie))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",V);return}console.error(V)},F={map:H,forEach:function(V,ie,I){H(V,function(){ie.apply(this,arguments)},I)},count:function(V){var ie=0;return H(V,function(){ie++}),ie},toArray:function(V){return H(V,function(ie){return ie})||[]},only:function(V){if(!X(V))throw Error("React.Children.only expected to receive a single React element child.");return V}};return Ke.Activity=p,Ke.Children=F,Ke.Component=A,Ke.Fragment=n,Ke.Profiler=s,Ke.PureComponent=k,Ke.StrictMode=r,Ke.Suspense=f,Ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Ke.__COMPILER_RUNTIME={__proto__:null,c:function(V){return j.H.useMemoCache(V)}},Ke.cache=function(V){return function(){return V.apply(null,arguments)}},Ke.cacheSignal=function(){return null},Ke.cloneElement=function(V,ie,I){if(V==null)throw Error("The argument must be a React element, but you passed "+V+".");var de=C({},V.props),xe=V.key;if(ie!=null)for(Te in ie.key!==void 0&&(xe=""+ie.key),ie)!P.call(ie,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&ie.ref===void 0||(de[Te]=ie[Te]);var Te=arguments.length-2;if(Te===1)de.children=I;else if(1<Te){for(var he=Array(Te),Se=0;Se<Te;Se++)he[Se]=arguments[Se+2];de.children=he}return q(V.type,xe,de)},Ke.createContext=function(V){return V={$$typeof:l,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null},V.Provider=V,V.Consumer={$$typeof:o,_context:V},V},Ke.createElement=function(V,ie,I){var de,xe={},Te=null;if(ie!=null)for(de in ie.key!==void 0&&(Te=""+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=I;else if(1<he){for(var Se=Array(he),Ce=0;Ce<he;Ce++)Se[Ce]=arguments[Ce+2];xe.children=Se}if(V&&V.defaultProps)for(de in he=V.defaultProps,he)xe[de]===void 0&&(xe[de]=he[de]);return q(V,Te,xe)},Ke.createRef=function(){return{current:null}},Ke.forwardRef=function(V){return{$$typeof:c,render:V}},Ke.isValidElement=X,Ke.lazy=function(V){return{$$typeof:m,_payload:{_status:-1,_result:V},_init:$}},Ke.memo=function(V,ie){return{$$typeof:d,type:V,compare:ie===void 0?null:ie}},Ke.startTransition=function(V){var ie=j.T,I={};j.T=I;try{var de=V(),xe=j.S;xe!==null&&xe(I,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(O,te)}catch(Te){te(Te)}finally{ie!==null&&I.types!==null&&(ie.types=I.types),j.T=ie}},Ke.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},Ke.use=function(V){return j.H.use(V)},Ke.useActionState=function(V,ie,I){return j.H.useActionState(V,ie,I)},Ke.useCallback=function(V,ie){return j.H.useCallback(V,ie)},Ke.useContext=function(V){return j.H.useContext(V)},Ke.useDebugValue=function(){},Ke.useDeferredValue=function(V,ie){return j.H.useDeferredValue(V,ie)},Ke.useEffect=function(V,ie){return j.H.useEffect(V,ie)},Ke.useEffectEvent=function(V){return j.H.useEffectEvent(V)},Ke.useId=function(){return j.H.useId()},Ke.useImperativeHandle=function(V,ie,I){return j.H.useImperativeHandle(V,ie,I)},Ke.useInsertionEffect=function(V,ie){return j.H.useInsertionEffect(V,ie)},Ke.useLayoutEffect=function(V,ie){return j.H.useLayoutEffect(V,ie)},Ke.useMemo=function(V,ie){return j.H.useMemo(V,ie)},Ke.useOptimistic=function(V,ie){return j.H.useOptimistic(V,ie)},Ke.useReducer=function(V,ie,I){return j.H.useReducer(V,ie,I)},Ke.useRef=function(V){return j.H.useRef(V)},Ke.useState=function(V){return j.H.useState(V)},Ke.useSyncExternalStore=function(V,ie,I){return j.H.useSyncExternalStore(V,ie,I)},Ke.useTransition=function(){return j.H.useTransition()},Ke.version="19.2.4",Ke}var P2;function Ny(){return P2||(P2=1,Mg.exports=LL()),Mg.exports}var E=Ny();const we=Tf(E),Ry=RL({__proto__:null,default:we},[E]);var Ig={exports:{}},hc={},Lg={exports:{}},Pg={};/**
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 j2;function PL(){return j2||(j2=1,(function(e){function t(D,H){var $=D.length;D.push(H);e:for(;0<$;){var te=$-1>>>1,F=D[te];if(0<s(F,H))D[te]=H,D[$]=F,$=te;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var H=D[0],$=D.pop();if($!==H){D[0]=$;e:for(var te=0,F=D.length,V=F>>>1;te<V;){var ie=2*(te+1)-1,I=D[ie],de=ie+1,xe=D[de];if(0>s(I,$))de<F&&0>s(xe,I)?(D[te]=xe,D[de]=$,te=de):(D[te]=I,D[ie]=$,te=ie);else if(de<F&&0>s(xe,$))D[te]=xe,D[de]=$,te=de;else break e}}return H}function s(D,H){var $=D.sortIndex-H.sortIndex;return $!==0?$:D.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,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],d=[],m=1,p=null,b=3,x=!1,S=!1,C=!1,w=!1,A=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function R(D){for(var H=n(d);H!==null;){if(H.callback===null)r(d);else if(H.startTime<=D)r(d),H.sortIndex=H.expirationTime,t(f,H);else break;H=n(d)}}function B(D){if(C=!1,R(D),!S)if(n(f)!==null)S=!0,O||(O=!0,Q());else{var H=n(d);H!==null&&Z(B,H.startTime-D)}}var O=!1,j=-1,P=5,q=-1;function L(){return w?!0:!(e.unstable_now()-q<P)}function X(){if(w=!1,O){var D=e.unstable_now();q=D;var H=!0;try{e:{S=!1,C&&(C=!1,N(j),j=-1),x=!0;var $=b;try{t:{for(R(D),p=n(f);p!==null&&!(p.expirationTime>D&&L());){var te=p.callback;if(typeof te=="function"){p.callback=null,b=p.priorityLevel;var F=te(p.expirationTime<=D);if(D=e.unstable_now(),typeof F=="function"){p.callback=F,R(D),H=!0;break t}p===n(f)&&r(f),R(D)}else r(f);p=n(f)}if(p!==null)H=!0;else{var V=n(d);V!==null&&Z(B,V.startTime-D),H=!1}}break e}finally{p=null,b=$,x=!1}H=void 0}}finally{H?Q():O=!1}}}var Q;if(typeof k=="function")Q=function(){k(X)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,ne=ee.port2;ee.port1.onmessage=X,Q=function(){ne.postMessage(null)}}else Q=function(){A(X,0)};function Z(D,H){j=A(function(){D(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(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(D){switch(b){case 1:case 2:case 3:var H=3;break;default:H=b}var $=b;b=H;try{return D()}finally{b=$}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(D,H){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var $=b;b=D;try{return H()}finally{b=$}},e.unstable_scheduleCallback=function(D,H,$){var te=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?te+$:te):$=te,D){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=$+F,D={id:m++,callback:H,priorityLevel:D,startTime:$,expirationTime:F,sortIndex:-1},$>te?(D.sortIndex=$,t(d,D),n(f)===null&&D===n(d)&&(C?(N(j),j=-1):C=!0,Z(B,$-te))):(D.sortIndex=F,t(f,D),S||x||(S=!0,O||(O=!0,Q()))),D},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(D){var H=b;return function(){var $=b;b=H;try{return D.apply(this,arguments)}finally{b=$}}}})(Pg)),Pg}var B2;function jL(){return B2||(B2=1,Lg.exports=PL()),Lg.exports}var jg={exports:{}},Bn={};/**
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 F2;function BL(){if(F2)return Bn;F2=1;var e=Ny();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+d+" 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(f,d,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:f,containerInfo:d,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Bn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Bn.createPortal=function(f,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return o(f,d,null,m)},Bn.flushSync=function(f){var d=l.T,m=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=d,r.p=m,r.d.f()}},Bn.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(f,d))},Bn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},Bn.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var m=d.as,p=c(m,d.crossOrigin),b=typeof d.integrity=="string"?d.integrity:void 0,x=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?r.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:x}):m==="script"&&r.d.X(f,{crossOrigin:p,integrity:b,fetchPriority:x,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Bn.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=c(d.as,d.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(f)},Bn.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,p=c(m,d.crossOrigin);r.d.L(f,m,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Bn.preloadModule=function(f,d){if(typeof f=="string")if(d){var m=c(d.as,d.crossOrigin);r.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(f)},Bn.requestFormReset=function(f){r.d.r(f)},Bn.unstable_batchedUpdates=function(f,d){return f(d)},Bn.useFormState=function(f,d,m){return l.H.useFormState(f,d,m)},Bn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Bn.version="19.2.4",Bn}var U2;function E3(){if(U2)return jg.exports;U2=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(),jg.exports=BL(),jg.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 H2;function FL(){if(H2)return hc;H2=1;var e=jL(),t=Ny(),n=E3();function r(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}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,u=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(u=a.return),i=a.return;while(i)}return a.tag===3?u: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 c(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 f(i){if(o(i)!==i)throw Error(r(188))}function d(i){var a=i.alternate;if(!a){if(a=o(i),a===null)throw Error(r(188));return a!==i?null:i}for(var u=i,h=a;;){var y=u.return;if(y===null)break;var T=y.alternate;if(T===null){if(h=y.return,h!==null){u=h;continue}break}if(y.child===T.child){for(T=y.child;T;){if(T===u)return f(y),i;if(T===h)return f(y),a;T=T.sibling}throw Error(r(188))}if(u.return!==h.return)u=y,h=T;else{for(var _=!1,M=y.child;M;){if(M===u){_=!0,u=y,h=T;break}if(M===h){_=!0,h=y,u=T;break}M=M.sibling}if(!_){for(M=T.child;M;){if(M===u){_=!0,u=T,h=y;break}if(M===h){_=!0,h=T,u=y;break}M=M.sibling}if(!_)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?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,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),k=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function Q(i){return i===null||typeof i!="object"?null:(i=X&&i[X]||i["@@iterator"],typeof i=="function"?i:null)}var ee=Symbol.for("react.client.reference");function ne(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===ee?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case C:return"Fragment";case A:return"Profiler";case w:return"StrictMode";case B:return"Suspense";case O:return"SuspenseList";case q:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case k:return i.displayName||"Context";case N: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 j:return a=i.displayName||null,a!==null?a:ne(i.type)||"Memo";case P:a=i._payload,i=i._init;try{return ne(i(a))}catch{}}return null}var Z=Array.isArray,D=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},te=[],F=-1;function V(i){return{current:i}}function ie(i){0>F||(i.current=te[F],te[F]=null,F--)}function I(i,a){F++,te[F]=i.current,i.current=a}var de=V(null),xe=V(null),Te=V(null),he=V(null);function Se(i,a){switch(I(Te,a),I(xe,i),I(de,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?e2(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=e2(a),i=t2(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}ie(de),I(de,i)}function Ce(){ie(de),ie(xe),ie(Te)}function Pe(i){i.memoizedState!==null&&I(he,i);var a=de.current,u=t2(a,i.type);a!==u&&(I(xe,i),I(de,u))}function _e(i){xe.current===i&&(ie(de),ie(xe)),he.current===i&&(ie(he),lc._currentValue=$)}var je,wt;function Re(i){if(je===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);je=a&&a[1]||"",wt=-1<u.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+je+i+wt}var tn=!1;function Lt(i,a){if(!i||tn)return"";tn=!0;var u=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 y=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=h.DetermineComponentFrameRoot(),_=T[0],M=T[1];if(_&&M){var G=_.split(`
44
- `),ae=M.split(`
45
- `);for(y=h=0;h<G.length&&!G[h].includes("DetermineComponentFrameRoot");)h++;for(;y<ae.length&&!ae[y].includes("DetermineComponentFrameRoot");)y++;if(h===G.length||y===ae.length)for(h=G.length-1,y=ae.length-1;1<=h&&0<=y&&G[h]!==ae[y];)y--;for(;1<=h&&0<=y;h--,y--)if(G[h]!==ae[y]){if(h!==1||y!==1)do if(h--,y--,0>y||G[h]!==ae[y]){var fe=`
46
- `+G[h].replace(" at new "," at ");return i.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",i.displayName)),fe}while(1<=h&&0<=y);break}}}finally{tn=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Re(u):""}function nn(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 Zr(i){try{var a="",u=null;do a+=nn(i,u),u=i,i=i.return;while(i);return a}catch(h){return`
47
- Error generating stack: `+h.message+`
48
- `+h.stack}}var jn=Object.prototype.hasOwnProperty,Tn=e.unstable_scheduleCallback,Ei=e.unstable_cancelCallback,Jr=e.unstable_shouldYield,ei=e.unstable_requestPaint,rt=e.unstable_now,yt=e.unstable_getCurrentPriorityLevel,ce=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,Fe=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,ht=e.unstable_IdlePriority,Nn=e.log,Rn=e.unstable_setDisableYieldValue,on=null,Vt=null;function vn(i){if(typeof Nn=="function"&&Rn(i),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(on,i)}catch{}}var vt=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,u){var h=i.pendingLanes;if(h===0)return 0;var y=0,T=i.suspendedLanes,_=i.pingedLanes;i=i.warmLanes;var M=h&134217727;return M!==0?(h=M&~T,h!==0?y=st(h):(_&=M,_!==0?y=st(_):u||(u=M&~i,u!==0&&(y=st(u))))):(M=h&~T,M!==0?y=st(M):_!==0?y=st(_):u||(u=h&~i,u!==0&&(y=st(u)))),y===0?0:a!==0&&a!==y&&(a&T)===0&&(T=y&-y,u=a&-a,T>=u||T===32&&(u&4194048)!==0)?a:y}function Ut(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function Ti(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 sr(){var i=Qe;return Qe<<=1,(Qe&62914560)===0&&(Qe=4194304),i}function ti(i){for(var a=[],u=0;31>u;u++)a.push(i);return a}function ar(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Or(i,a,u,h,y,T){var _=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var M=i.entanglements,G=i.expirationTimes,ae=i.hiddenUpdates;for(u=_&~u;0<u;){var fe=31-vt(u),pe=1<<fe;M[fe]=0,G[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)}u&=~pe}h!==0&&Na(i,h,0),T!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=T&~(_&~a))}function Na(i,a,u){i.pendingLanes|=a,i.suspendedLanes&=~a;var h=31-vt(a);i.entangledLanes|=a,i.entanglements[h]=i.entanglements[h]|1073741824|u&261930}function vu(i,a){var u=i.entangledLanes|=a;for(i=i.entanglements;u;){var h=31-vt(u),y=1<<h;y&a|i[h]&a&&(i[h]|=a),u&=~y}}function BE(i,a){var u=a&-a;return u=(u&42)!==0?1:Ep(u),(u&(i.suspendedLanes|a))!==0?0:u}function Ep(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 Tp(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function FE(){var i=H.p;return i!==0?i:(i=window.event,i===void 0?32:C2(i.type))}function UE(i,a){var u=H.p;try{return H.p=i,a()}finally{H.p=u}}var Cs=Math.random().toString(36).slice(2),Dn="__reactFiber$"+Cs,or="__reactProps$"+Cs,Lo="__reactContainer$"+Cs,vp="__reactEvents$"+Cs,b4="__reactListeners$"+Cs,y4="__reactHandles$"+Cs,HE="__reactResources$"+Cs,Su="__reactMarker$"+Cs;function Sp(i){delete i[Dn],delete i[or],delete i[vp],delete i[b4],delete i[y4]}function Po(i){var a=i[Dn];if(a)return a;for(var u=i.parentNode;u;){if(a=u[Lo]||u[Dn]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(i=l2(i);i!==null;){if(u=i[Dn])return u;i=l2(i)}return a}i=u,u=i.parentNode}return null}function jo(i){if(i=i[Dn]||i[Lo]){var a=i.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return i}return null}function Cu(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function Bo(i){var a=i[HE];return a||(a=i[HE]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Sn(i){i[Su]=!0}var zE=new Set,VE={};function Ra(i,a){Fo(i,a),Fo(i+"Capture",a)}function Fo(i,a){for(VE[i]=a,i=0;i<a.length;i++)zE.add(a[i])}var x4=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]*$"),qE={},$E={};function E4(i){return jn.call($E,i)?!0:jn.call(qE,i)?!1:x4.test(i)?$E[i]=!0:(qE[i]=!0,!1)}function $f(i,a,u){if(E4(a))if(u===null)i.removeAttribute(a);else{switch(typeof u){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,""+u)}}function Yf(i,a,u){if(u===null)i.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+u)}}function $i(i,a,u,h){if(h===null)i.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(a,u,""+h)}}function Mr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function YE(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function T4(i,a,u){var h=Object.getOwnPropertyDescriptor(i.constructor.prototype,a);if(!i.hasOwnProperty(a)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var y=h.get,T=h.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return y.call(this)},set:function(_){u=""+_,T.call(this,_)}}),Object.defineProperty(i,a,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(_){u=""+_},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function Cp(i){if(!i._valueTracker){var a=YE(i)?"checked":"value";i._valueTracker=T4(i,a,""+i[a])}}function GE(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var u=a.getValue(),h="";return i&&(h=YE(i)?i.checked?"true":"false":i.value),i=h,i!==u?(a.setValue(i),!0):!1}function Gf(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 v4=/[\n"\\]/g;function Ir(i){return i.replace(v4,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function wp(i,a,u,h,y,T,_,M){i.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?i.type=_:i.removeAttribute("type"),a!=null?_==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+Mr(a)):i.value!==""+Mr(a)&&(i.value=""+Mr(a)):_!=="submit"&&_!=="reset"||i.removeAttribute("value"),a!=null?Ap(i,_,Mr(a)):u!=null?Ap(i,_,Mr(u)):h!=null&&i.removeAttribute("value"),y==null&&T!=null&&(i.defaultChecked=!!T),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.name=""+Mr(M):i.removeAttribute("name")}function KE(i,a,u,h,y,T,_,M){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.type=T),a!=null||u!=null){if(!(T!=="submit"&&T!=="reset"||a!=null)){Cp(i);return}u=u!=null?""+Mr(u):"",a=a!=null?""+Mr(a):u,M||a===i.value||(i.value=a),i.defaultValue=a}h=h??y,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=M?i.checked:!!h,i.defaultChecked=!!h,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.name=_),Cp(i)}function Ap(i,a,u){a==="number"&&Gf(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Uo(i,a,u,h){if(i=i.options,a){a={};for(var y=0;y<u.length;y++)a["$"+u[y]]=!0;for(u=0;u<i.length;u++)y=a.hasOwnProperty("$"+i[u].value),i[u].selected!==y&&(i[u].selected=y),y&&h&&(i[u].defaultSelected=!0)}else{for(u=""+Mr(u),a=null,y=0;y<i.length;y++){if(i[y].value===u){i[y].selected=!0,h&&(i[y].defaultSelected=!0);return}a!==null||i[y].disabled||(a=i[y])}a!==null&&(a.selected=!0)}}function QE(i,a,u){if(a!=null&&(a=""+Mr(a),a!==i.value&&(i.value=a),u==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=u!=null?""+Mr(u):""}function XE(i,a,u,h){if(a==null){if(h!=null){if(u!=null)throw Error(r(92));if(Z(h)){if(1<h.length)throw Error(r(93));h=h[0]}u=h}u==null&&(u=""),a=u}u=Mr(a),i.defaultValue=u,h=i.textContent,h===u&&h!==""&&h!==null&&(i.value=h),Cp(i)}function Ho(i,a){if(a){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=a;return}}i.textContent=a}var S4=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 WE(i,a,u){var h=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":h?i.setProperty(a,u):typeof u!="number"||u===0||S4.has(a)?a==="float"?i.cssFloat=u:i[a]=(""+u).trim():i[a]=u+"px"}function ZE(i,a,u){if(a!=null&&typeof a!="object")throw Error(r(62));if(i=i.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||a!=null&&a.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var y in a)h=a[y],a.hasOwnProperty(y)&&u[y]!==h&&WE(i,y,h)}else for(var T in a)a.hasOwnProperty(T)&&WE(i,T,a[T])}function _p(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 C4=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"]]),w4=/^[\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 Kf(i){return w4.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Yi(){}var kp=null;function Np(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var zo=null,Vo=null;function JE(i){var a=jo(i);if(a&&(i=a.stateNode)){var u=i[or]||null;e:switch(i=a.stateNode,a.type){case"input":if(wp(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Ir(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var h=u[a];if(h!==i&&h.form===i.form){var y=h[or]||null;if(!y)throw Error(r(90));wp(h,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(a=0;a<u.length;a++)h=u[a],h.form===i.form&&GE(h)}break e;case"textarea":QE(i,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&Uo(i,!!u.multiple,a,!1)}}}var Rp=!1;function eT(i,a,u){if(Rp)return i(a,u);Rp=!0;try{var h=i(a);return h}finally{if(Rp=!1,(zo!==null||Vo!==null)&&(Ld(),zo&&(a=zo,i=Vo,Vo=zo=null,JE(a),i)))for(a=0;a<i.length;a++)JE(i[a])}}function wu(i,a){var u=i.stateNode;if(u===null)return null;var h=u[or]||null;if(h===null)return null;u=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(u&&typeof u!="function")throw Error(r(231,a,typeof u));return u}var Gi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dp=!1;if(Gi)try{var Au={};Object.defineProperty(Au,"passive",{get:function(){Dp=!0}}),window.addEventListener("test",Au,Au),window.removeEventListener("test",Au,Au)}catch{Dp=!1}var ws=null,Op=null,Qf=null;function tT(){if(Qf)return Qf;var i,a=Op,u=a.length,h,y="value"in ws?ws.value:ws.textContent,T=y.length;for(i=0;i<u&&a[i]===y[i];i++);var _=u-i;for(h=1;h<=_&&a[u-h]===y[T-h];h++);return Qf=y.slice(i,1<h?1-h:void 0)}function Xf(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 Wf(){return!0}function nT(){return!1}function lr(i){function a(u,h,y,T,_){this._reactName=u,this._targetInst=y,this.type=h,this.nativeEvent=T,this.target=_,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(u=i[M],this[M]=u?u(T):T[M]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Wf:nT,this.isPropagationStopped=nT,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Wf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Wf)},persist:function(){},isPersistent:Wf}),a}var Da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zf=lr(Da),_u=p({},Da,{view:0,detail:0}),A4=lr(_u),Mp,Ip,ku,Jf=p({},_u,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pp,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!==ku&&(ku&&i.type==="mousemove"?(Mp=i.screenX-ku.screenX,Ip=i.screenY-ku.screenY):Ip=Mp=0,ku=i),Mp)},movementY:function(i){return"movementY"in i?i.movementY:Ip}}),rT=lr(Jf),_4=p({},Jf,{dataTransfer:0}),k4=lr(_4),N4=p({},_u,{relatedTarget:0}),Lp=lr(N4),R4=p({},Da,{animationName:0,elapsedTime:0,pseudoElement:0}),D4=lr(R4),O4=p({},Da,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),M4=lr(O4),I4=p({},Da,{data:0}),iT=lr(I4),L4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},P4={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"},j4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B4(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=j4[i])?!!a[i]:!1}function Pp(){return B4}var F4=p({},_u,{key:function(i){if(i.key){var a=L4[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=Xf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?P4[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pp,charCode:function(i){return i.type==="keypress"?Xf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Xf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),U4=lr(F4),H4=p({},Jf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sT=lr(H4),z4=p({},_u,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pp}),V4=lr(z4),q4=p({},Da,{propertyName:0,elapsedTime:0,pseudoElement:0}),$4=lr(q4),Y4=p({},Jf,{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}),G4=lr(Y4),K4=p({},Da,{newState:0,oldState:0}),Q4=lr(K4),X4=[9,13,27,32],jp=Gi&&"CompositionEvent"in window,Nu=null;Gi&&"documentMode"in document&&(Nu=document.documentMode);var W4=Gi&&"TextEvent"in window&&!Nu,aT=Gi&&(!jp||Nu&&8<Nu&&11>=Nu),oT=" ",lT=!1;function uT(i,a){switch(i){case"keyup":return X4.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cT(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var qo=!1;function Z4(i,a){switch(i){case"compositionend":return cT(a);case"keypress":return a.which!==32?null:(lT=!0,oT);case"textInput":return i=a.data,i===oT&&lT?null:i;default:return null}}function J4(i,a){if(qo)return i==="compositionend"||!jp&&uT(i,a)?(i=tT(),Qf=Op=ws=null,qo=!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 aT&&a.locale!=="ko"?null:a.data;default:return null}}var e5={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 fT(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!e5[i.type]:a==="textarea"}function dT(i,a,u,h){zo?Vo?Vo.push(h):Vo=[h]:zo=h,a=zd(a,"onChange"),0<a.length&&(u=new Zf("onChange","change",null,u,h),i.push({event:u,listeners:a}))}var Ru=null,Du=null;function t5(i){KS(i,0)}function ed(i){var a=Cu(i);if(GE(a))return i}function hT(i,a){if(i==="change")return a}var mT=!1;if(Gi){var Bp;if(Gi){var Fp="oninput"in document;if(!Fp){var pT=document.createElement("div");pT.setAttribute("oninput","return;"),Fp=typeof pT.oninput=="function"}Bp=Fp}else Bp=!1;mT=Bp&&(!document.documentMode||9<document.documentMode)}function gT(){Ru&&(Ru.detachEvent("onpropertychange",bT),Du=Ru=null)}function bT(i){if(i.propertyName==="value"&&ed(Du)){var a=[];dT(a,Du,i,Np(i)),eT(t5,a)}}function n5(i,a,u){i==="focusin"?(gT(),Ru=a,Du=u,Ru.attachEvent("onpropertychange",bT)):i==="focusout"&&gT()}function r5(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return ed(Du)}function i5(i,a){if(i==="click")return ed(a)}function s5(i,a){if(i==="input"||i==="change")return ed(a)}function a5(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var xr=typeof Object.is=="function"?Object.is:a5;function Ou(i,a){if(xr(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var u=Object.keys(i),h=Object.keys(a);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var y=u[h];if(!jn.call(a,y)||!xr(i[y],a[y]))return!1}return!0}function yT(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function xT(i,a){var u=yT(i);i=0;for(var h;u;){if(u.nodeType===3){if(h=i+u.textContent.length,i<=a&&h>=a)return{node:u,offset:a-i};i=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=yT(u)}}function ET(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?ET(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function TT(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=Gf(i.document);a instanceof i.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)i=a.contentWindow;else break;a=Gf(i.document)}return a}function Up(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 o5=Gi&&"documentMode"in document&&11>=document.documentMode,$o=null,Hp=null,Mu=null,zp=!1;function vT(i,a,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;zp||$o==null||$o!==Gf(h)||(h=$o,"selectionStart"in h&&Up(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}),Mu&&Ou(Mu,h)||(Mu=h,h=zd(Hp,"onSelect"),0<h.length&&(a=new Zf("onSelect","select",null,a,u),i.push({event:a,listeners:h}),a.target=$o)))}function Oa(i,a){var u={};return u[i.toLowerCase()]=a.toLowerCase(),u["Webkit"+i]="webkit"+a,u["Moz"+i]="moz"+a,u}var Yo={animationend:Oa("Animation","AnimationEnd"),animationiteration:Oa("Animation","AnimationIteration"),animationstart:Oa("Animation","AnimationStart"),transitionrun:Oa("Transition","TransitionRun"),transitionstart:Oa("Transition","TransitionStart"),transitioncancel:Oa("Transition","TransitionCancel"),transitionend:Oa("Transition","TransitionEnd")},Vp={},ST={};Gi&&(ST=document.createElement("div").style,"AnimationEvent"in window||(delete Yo.animationend.animation,delete Yo.animationiteration.animation,delete Yo.animationstart.animation),"TransitionEvent"in window||delete Yo.transitionend.transition);function Ma(i){if(Vp[i])return Vp[i];if(!Yo[i])return i;var a=Yo[i],u;for(u in a)if(a.hasOwnProperty(u)&&u in ST)return Vp[i]=a[u];return i}var CT=Ma("animationend"),wT=Ma("animationiteration"),AT=Ma("animationstart"),l5=Ma("transitionrun"),u5=Ma("transitionstart"),c5=Ma("transitioncancel"),_T=Ma("transitionend"),kT=new Map,qp="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(" ");qp.push("scrollEnd");function ni(i,a){kT.set(i,a),Ra(a,[i])}var td=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)},Lr=[],Go=0,$p=0;function nd(){for(var i=Go,a=$p=Go=0;a<i;){var u=Lr[a];Lr[a++]=null;var h=Lr[a];Lr[a++]=null;var y=Lr[a];Lr[a++]=null;var T=Lr[a];if(Lr[a++]=null,h!==null&&y!==null){var _=h.pending;_===null?y.next=y:(y.next=_.next,_.next=y),h.pending=y}T!==0&&NT(u,y,T)}}function rd(i,a,u,h){Lr[Go++]=i,Lr[Go++]=a,Lr[Go++]=u,Lr[Go++]=h,$p|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function Yp(i,a,u,h){return rd(i,a,u,h),id(i)}function Ia(i,a){return rd(i,null,null,a),id(i)}function NT(i,a,u){i.lanes|=u;var h=i.alternate;h!==null&&(h.lanes|=u);for(var y=!1,T=i.return;T!==null;)T.childLanes|=u,h=T.alternate,h!==null&&(h.childLanes|=u),T.tag===22&&(i=T.stateNode,i===null||i._visibility&1||(y=!0)),i=T,T=T.return;return i.tag===3?(T=i.stateNode,y&&a!==null&&(y=31-vt(u),i=T.hiddenUpdates,h=i[y],h===null?i[y]=[a]:h.push(a),a.lane=u|536870912),T):null}function id(i){if(50<tc)throw tc=0,tg=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 f5(i,a,u,h){this.tag=i,this.key=u,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 Er(i,a,u,h){return new f5(i,a,u,h)}function Gp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Ki(i,a){var u=i.alternate;return u===null?(u=Er(i.tag,a,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=a,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,a=i.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function RT(i,a){i.flags&=65011714;var u=i.alternate;return u===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=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,a=u.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function sd(i,a,u,h,y,T){var _=0;if(h=i,typeof i=="function")Gp(i)&&(_=1);else if(typeof i=="string")_=gL(i,u,de.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case q:return i=Er(31,u,a,y),i.elementType=q,i.lanes=T,i;case C:return La(u.children,y,T,a);case w:_=8,y|=24;break;case A:return i=Er(12,u,a,y|2),i.elementType=A,i.lanes=T,i;case B:return i=Er(13,u,a,y),i.elementType=B,i.lanes=T,i;case O:return i=Er(19,u,a,y),i.elementType=O,i.lanes=T,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case k:_=10;break e;case N:_=9;break e;case R:_=11;break e;case j:_=14;break e;case P:_=16,h=null;break e}_=29,u=Error(r(130,i===null?"null":typeof i,"")),h=null}return a=Er(_,u,a,y),a.elementType=i,a.type=h,a.lanes=T,a}function La(i,a,u,h){return i=Er(7,i,h,a),i.lanes=u,i}function Kp(i,a,u){return i=Er(6,i,null,a),i.lanes=u,i}function DT(i){var a=Er(18,null,null,0);return a.stateNode=i,a}function Qp(i,a,u){return a=Er(4,i.children!==null?i.children:[],i.key,a),a.lanes=u,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var OT=new WeakMap;function Pr(i,a){if(typeof i=="object"&&i!==null){var u=OT.get(i);return u!==void 0?u:(a={value:i,source:a,stack:Zr(a)},OT.set(i,a),a)}return{value:i,source:a,stack:Zr(a)}}var Qo=[],Xo=0,ad=null,Iu=0,jr=[],Br=0,As=null,vi=1,Si="";function Qi(i,a){Qo[Xo++]=Iu,Qo[Xo++]=ad,ad=i,Iu=a}function MT(i,a,u){jr[Br++]=vi,jr[Br++]=Si,jr[Br++]=As,As=i;var h=vi;i=Si;var y=32-vt(h)-1;h&=~(1<<y),u+=1;var T=32-vt(a)+y;if(30<T){var _=y-y%5;T=(h&(1<<_)-1).toString(32),h>>=_,y-=_,vi=1<<32-vt(a)+y|u<<y|h,Si=T+i}else vi=1<<T|u<<y|h,Si=i}function Xp(i){i.return!==null&&(Qi(i,1),MT(i,1,0))}function Wp(i){for(;i===ad;)ad=Qo[--Xo],Qo[Xo]=null,Iu=Qo[--Xo],Qo[Xo]=null;for(;i===As;)As=jr[--Br],jr[Br]=null,Si=jr[--Br],jr[Br]=null,vi=jr[--Br],jr[Br]=null}function IT(i,a){jr[Br++]=vi,jr[Br++]=Si,jr[Br++]=As,vi=a.id,Si=a.overflow,As=i}var On=null,Ht=null,pt=!1,_s=null,Fr=!1,Zp=Error(r(519));function ks(i){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Lu(Pr(a,i)),Zp}function LT(i){var a=i.stateNode,u=i.type,h=i.memoizedProps;switch(a[Dn]=i,a[or]=h,u){case"dialog":lt("cancel",a),lt("close",a);break;case"iframe":case"object":case"embed":lt("load",a);break;case"video":case"audio":for(u=0;u<rc.length;u++)lt(rc[u],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),KE(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),XE(a,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||h.suppressHydrationWarning===!0||ZS(a.textContent,u)?(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=Yi),a=!0):a=!1,a||ks(i,!0)}function PT(i){for(On=i.return;On;)switch(On.tag){case 5:case 31:case 13:Fr=!1;return;case 27:case 3:Fr=!0;return;default:On=On.return}}function Wo(i){if(i!==On)return!1;if(!pt)return PT(i),pt=!0,!1;var a=i.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||gg(i.type,i.memoizedProps)),u=!u),u&&Ht&&ks(i),PT(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Ht=o2(i)}else if(a===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Ht=o2(i)}else a===27?(a=Ht,zs(i.type)?(i=Tg,Tg=null,Ht=i):Ht=a):Ht=On?Hr(i.stateNode.nextSibling):null;return!0}function Pa(){Ht=On=null,pt=!1}function Jp(){var i=_s;return i!==null&&(dr===null?dr=i:dr.push.apply(dr,i),_s=null),i}function Lu(i){_s===null?_s=[i]:_s.push(i)}var e0=V(null),ja=null,Xi=null;function Ns(i,a,u){I(e0,a._currentValue),a._currentValue=u}function Wi(i){i._currentValue=e0.current,ie(e0)}function t0(i,a,u){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===u)break;i=i.return}}function n0(i,a,u,h){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var T=y.dependencies;if(T!==null){var _=y.child;T=T.firstContext;e:for(;T!==null;){var M=T;T=y;for(var G=0;G<a.length;G++)if(M.context===a[G]){T.lanes|=u,M=T.alternate,M!==null&&(M.lanes|=u),t0(T.return,u,i),h||(_=null);break e}T=M.next}}else if(y.tag===18){if(_=y.return,_===null)throw Error(r(341));_.lanes|=u,T=_.alternate,T!==null&&(T.lanes|=u),t0(_,u,i),_=null}else _=y.child;if(_!==null)_.return=y;else for(_=y;_!==null;){if(_===i){_=null;break}if(y=_.sibling,y!==null){y.return=_.return,_=y;break}_=_.return}y=_}}function Zo(i,a,u,h){i=null;for(var y=a,T=!1;y!==null;){if(!T){if((y.flags&524288)!==0)T=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var _=y.alternate;if(_===null)throw Error(r(387));if(_=_.memoizedProps,_!==null){var M=y.type;xr(y.pendingProps.value,_.value)||(i!==null?i.push(M):i=[M])}}else if(y===he.current){if(_=y.alternate,_===null)throw Error(r(387));_.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(lc):i=[lc])}y=y.return}i!==null&&n0(a,i,u,h),a.flags|=262144}function od(i){for(i=i.firstContext;i!==null;){if(!xr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ba(i){ja=i,Xi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Mn(i){return jT(ja,i)}function ld(i,a){return ja===null&&Ba(i),jT(i,a)}function jT(i,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},Xi===null){if(i===null)throw Error(r(308));Xi=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else Xi=Xi.next=a;return u}var d5=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(u,h){i.push(h)}};this.abort=function(){a.aborted=!0,i.forEach(function(u){return u()})}},h5=e.unstable_scheduleCallback,m5=e.unstable_NormalPriority,ln={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function r0(){return{controller:new d5,data:new Map,refCount:0}}function Pu(i){i.refCount--,i.refCount===0&&h5(m5,function(){i.controller.abort()})}var ju=null,i0=0,Jo=0,el=null;function p5(i,a){if(ju===null){var u=ju=[];i0=0,Jo=og(),el={status:"pending",value:void 0,then:function(h){u.push(h)}}}return i0++,a.then(BT,BT),a}function BT(){if(--i0===0&&ju!==null){el!==null&&(el.status="fulfilled");var i=ju;ju=null,Jo=0,el=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function g5(i,a){var u=[],h={status:"pending",value:null,reason:null,then:function(y){u.push(y)}};return i.then(function(){h.status="fulfilled",h.value=a;for(var y=0;y<u.length;y++)(0,u[y])(a)},function(y){for(h.status="rejected",h.reason=y,y=0;y<u.length;y++)(0,u[y])(void 0)}),h}var FT=D.S;D.S=function(i,a){vS=rt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&p5(i,a),FT!==null&&FT(i,a)};var Fa=V(null);function s0(){var i=Fa.current;return i!==null?i:Pt.pooledCache}function ud(i,a){a===null?I(Fa,Fa.current):I(Fa,a.pool)}function UT(){var i=s0();return i===null?null:{parent:ln._currentValue,pool:i}}var tl=Error(r(460)),a0=Error(r(474)),cd=Error(r(542)),fd={then:function(){}};function HT(i){return i=i.status,i==="fulfilled"||i==="rejected"}function zT(i,a,u){switch(u=i[u],u===void 0?i.push(a):u!==a&&(a.then(Yi,Yi),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,qT(i),i;default:if(typeof a.status=="string")a.then(Yi,Yi);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 y=a;y.status="fulfilled",y.value=h}},function(h){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=h}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,qT(i),i}throw Ha=a,tl}}function Ua(i){try{var a=i._init;return a(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ha=u,tl):u}}var Ha=null;function VT(){if(Ha===null)throw Error(r(459));var i=Ha;return Ha=null,i}function qT(i){if(i===tl||i===cd)throw Error(r(483))}var nl=null,Bu=0;function dd(i){var a=Bu;return Bu+=1,nl===null&&(nl=[]),zT(nl,i,a)}function Fu(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function hd(i,a){throw a.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(a),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function $T(i){function a(J,W){if(i){var se=J.deletions;se===null?(J.deletions=[W],J.flags|=16):se.push(W)}}function u(J,W){if(!i)return null;for(;W!==null;)a(J,W),W=W.sibling;return null}function h(J){for(var W=new Map;J!==null;)J.key!==null?W.set(J.key,J):W.set(J.index,J),J=J.sibling;return W}function y(J,W){return J=Ki(J,W),J.index=0,J.sibling=null,J}function T(J,W,se){return J.index=se,i?(se=J.alternate,se!==null?(se=se.index,se<W?(J.flags|=67108866,W):se):(J.flags|=67108866,W)):(J.flags|=1048576,W)}function _(J){return i&&J.alternate===null&&(J.flags|=67108866),J}function M(J,W,se,me){return W===null||W.tag!==6?(W=Kp(se,J.mode,me),W.return=J,W):(W=y(W,se),W.return=J,W)}function G(J,W,se,me){var Ue=se.type;return Ue===C?fe(J,W,se.props.children,me,se.key):W!==null&&(W.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===P&&Ua(Ue)===W.type)?(W=y(W,se.props),Fu(W,se),W.return=J,W):(W=sd(se.type,se.key,se.props,null,J.mode,me),Fu(W,se),W.return=J,W)}function ae(J,W,se,me){return W===null||W.tag!==4||W.stateNode.containerInfo!==se.containerInfo||W.stateNode.implementation!==se.implementation?(W=Qp(se,J.mode,me),W.return=J,W):(W=y(W,se.children||[]),W.return=J,W)}function fe(J,W,se,me,Ue){return W===null||W.tag!==7?(W=La(se,J.mode,me,Ue),W.return=J,W):(W=y(W,se),W.return=J,W)}function pe(J,W,se){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=Kp(""+W,J.mode,se),W.return=J,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case x:return se=sd(W.type,W.key,W.props,null,J.mode,se),Fu(se,W),se.return=J,se;case S:return W=Qp(W,J.mode,se),W.return=J,W;case P:return W=Ua(W),pe(J,W,se)}if(Z(W)||Q(W))return W=La(W,J.mode,se,null),W.return=J,W;if(typeof W.then=="function")return pe(J,dd(W),se);if(W.$$typeof===k)return pe(J,ld(J,W),se);hd(J,W)}return null}function oe(J,W,se,me){var Ue=W!==null?W.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Ue!==null?null:M(J,W,""+se,me);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case x:return se.key===Ue?G(J,W,se,me):null;case S:return se.key===Ue?ae(J,W,se,me):null;case P:return se=Ua(se),oe(J,W,se,me)}if(Z(se)||Q(se))return Ue!==null?null:fe(J,W,se,me,null);if(typeof se.then=="function")return oe(J,W,dd(se),me);if(se.$$typeof===k)return oe(J,W,ld(J,se),me);hd(J,se)}return null}function le(J,W,se,me,Ue){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return J=J.get(se)||null,M(W,J,""+me,Ue);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case x:return J=J.get(me.key===null?se:me.key)||null,G(W,J,me,Ue);case S:return J=J.get(me.key===null?se:me.key)||null,ae(W,J,me,Ue);case P:return me=Ua(me),le(J,W,se,me,Ue)}if(Z(me)||Q(me))return J=J.get(se)||null,fe(W,J,me,Ue,null);if(typeof me.then=="function")return le(J,W,se,dd(me),Ue);if(me.$$typeof===k)return le(J,W,se,ld(W,me),Ue);hd(W,me)}return null}function De(J,W,se,me){for(var Ue=null,xt=null,Le=W,Je=W=0,ft=null;Le!==null&&Je<se.length;Je++){Le.index>Je?(ft=Le,Le=null):ft=Le.sibling;var Et=oe(J,Le,se[Je],me);if(Et===null){Le===null&&(Le=ft);break}i&&Le&&Et.alternate===null&&a(J,Le),W=T(Et,W,Je),xt===null?Ue=Et:xt.sibling=Et,xt=Et,Le=ft}if(Je===se.length)return u(J,Le),pt&&Qi(J,Je),Ue;if(Le===null){for(;Je<se.length;Je++)Le=pe(J,se[Je],me),Le!==null&&(W=T(Le,W,Je),xt===null?Ue=Le:xt.sibling=Le,xt=Le);return pt&&Qi(J,Je),Ue}for(Le=h(Le);Je<se.length;Je++)ft=le(Le,J,Je,se[Je],me),ft!==null&&(i&&ft.alternate!==null&&Le.delete(ft.key===null?Je:ft.key),W=T(ft,W,Je),xt===null?Ue=ft:xt.sibling=ft,xt=ft);return i&&Le.forEach(function(Gs){return a(J,Gs)}),pt&&Qi(J,Je),Ue}function qe(J,W,se,me){if(se==null)throw Error(r(151));for(var Ue=null,xt=null,Le=W,Je=W=0,ft=null,Et=se.next();Le!==null&&!Et.done;Je++,Et=se.next()){Le.index>Je?(ft=Le,Le=null):ft=Le.sibling;var Gs=oe(J,Le,Et.value,me);if(Gs===null){Le===null&&(Le=ft);break}i&&Le&&Gs.alternate===null&&a(J,Le),W=T(Gs,W,Je),xt===null?Ue=Gs:xt.sibling=Gs,xt=Gs,Le=ft}if(Et.done)return u(J,Le),pt&&Qi(J,Je),Ue;if(Le===null){for(;!Et.done;Je++,Et=se.next())Et=pe(J,Et.value,me),Et!==null&&(W=T(Et,W,Je),xt===null?Ue=Et:xt.sibling=Et,xt=Et);return pt&&Qi(J,Je),Ue}for(Le=h(Le);!Et.done;Je++,Et=se.next())Et=le(Le,J,Je,Et.value,me),Et!==null&&(i&&Et.alternate!==null&&Le.delete(Et.key===null?Je:Et.key),W=T(Et,W,Je),xt===null?Ue=Et:xt.sibling=Et,xt=Et);return i&&Le.forEach(function(_L){return a(J,_L)}),pt&&Qi(J,Je),Ue}function Mt(J,W,se,me){if(typeof se=="object"&&se!==null&&se.type===C&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case x:e:{for(var Ue=se.key;W!==null;){if(W.key===Ue){if(Ue=se.type,Ue===C){if(W.tag===7){u(J,W.sibling),me=y(W,se.props.children),me.return=J,J=me;break e}}else if(W.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===P&&Ua(Ue)===W.type){u(J,W.sibling),me=y(W,se.props),Fu(me,se),me.return=J,J=me;break e}u(J,W);break}else a(J,W);W=W.sibling}se.type===C?(me=La(se.props.children,J.mode,me,se.key),me.return=J,J=me):(me=sd(se.type,se.key,se.props,null,J.mode,me),Fu(me,se),me.return=J,J=me)}return _(J);case S:e:{for(Ue=se.key;W!==null;){if(W.key===Ue)if(W.tag===4&&W.stateNode.containerInfo===se.containerInfo&&W.stateNode.implementation===se.implementation){u(J,W.sibling),me=y(W,se.children||[]),me.return=J,J=me;break e}else{u(J,W);break}else a(J,W);W=W.sibling}me=Qp(se,J.mode,me),me.return=J,J=me}return _(J);case P:return se=Ua(se),Mt(J,W,se,me)}if(Z(se))return De(J,W,se,me);if(Q(se)){if(Ue=Q(se),typeof Ue!="function")throw Error(r(150));return se=Ue.call(se),qe(J,W,se,me)}if(typeof se.then=="function")return Mt(J,W,dd(se),me);if(se.$$typeof===k)return Mt(J,W,ld(J,se),me);hd(J,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,W!==null&&W.tag===6?(u(J,W.sibling),me=y(W,se),me.return=J,J=me):(u(J,W),me=Kp(se,J.mode,me),me.return=J,J=me),_(J)):u(J,W)}return function(J,W,se,me){try{Bu=0;var Ue=Mt(J,W,se,me);return nl=null,Ue}catch(Le){if(Le===tl||Le===cd)throw Le;var xt=Er(29,Le,null,J.mode);return xt.lanes=me,xt.return=J,xt}finally{}}}var za=$T(!0),YT=$T(!1),Rs=!1;function o0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function l0(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 Os(i,a,u){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(St&2)!==0){var y=h.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),h.pending=a,a=id(i),NT(i,null,u),a}return rd(i,h,a,u),id(i)}function Uu(i,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var h=a.lanes;h&=i.pendingLanes,u|=h,a.lanes=u,vu(i,u)}}function u0(i,a){var u=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var y=null,T=null;if(u=u.firstBaseUpdate,u!==null){do{var _={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};T===null?y=T=_:T=T.next=_,u=u.next}while(u!==null);T===null?y=T=a:T=T.next=a}else y=T=a;u={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:T,shared:h.shared,callbacks:h.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=a:i.next=a,u.lastBaseUpdate=a}var c0=!1;function Hu(){if(c0){var i=el;if(i!==null)throw i}}function zu(i,a,u,h){c0=!1;var y=i.updateQueue;Rs=!1;var T=y.firstBaseUpdate,_=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var G=M,ae=G.next;G.next=null,_===null?T=ae:_.next=ae,_=G;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,M=fe.lastBaseUpdate,M!==_&&(M===null?fe.firstBaseUpdate=ae:M.next=ae,fe.lastBaseUpdate=G))}if(T!==null){var pe=y.baseState;_=0,fe=ae=G=null,M=T;do{var oe=M.lane&-536870913,le=oe!==M.lane;if(le?(ct&oe)===oe:(h&oe)===oe){oe!==0&&oe===Jo&&(c0=!0),fe!==null&&(fe=fe.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var De=i,qe=M;oe=a;var Mt=u;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:Rs=!0}}oe=M.callback,oe!==null&&(i.flags|=64,le&&(i.flags|=8192),le=y.callbacks,le===null?y.callbacks=[oe]:le.push(oe))}else le={lane:oe,tag:M.tag,payload:M.payload,callback:M.callback,next:null},fe===null?(ae=fe=le,G=pe):fe=fe.next=le,_|=oe;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;le=M,M=le.next,le.next=null,y.lastBaseUpdate=le,y.shared.pending=null}}while(!0);fe===null&&(G=pe),y.baseState=G,y.firstBaseUpdate=ae,y.lastBaseUpdate=fe,T===null&&(y.shared.lanes=0),js|=_,i.lanes=_,i.memoizedState=pe}}function GT(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function KT(i,a){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)GT(u[i],a)}var rl=V(null),md=V(0);function QT(i,a){i=as,I(md,i),I(rl,a),as=i|a.baseLanes}function f0(){I(md,as),I(rl,rl.current)}function d0(){as=md.current,ie(rl),ie(md)}var Tr=V(null),Ur=null;function Ms(i){var a=i.alternate;I(rn,rn.current&1),I(Tr,i),Ur===null&&(a===null||rl.current!==null||a.memoizedState!==null)&&(Ur=i)}function h0(i){I(rn,rn.current),I(Tr,i),Ur===null&&(Ur=i)}function XT(i){i.tag===22?(I(rn,rn.current),I(Tr,i),Ur===null&&(Ur=i)):Is()}function Is(){I(rn,rn.current),I(Tr,Tr.current)}function vr(i){ie(Tr),Ur===i&&(Ur=null),ie(rn)}var rn=V(0);function pd(i){for(var a=i;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||xg(u)||Eg(u)))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 Zi=0,Xe=null,Dt=null,un=null,gd=!1,il=!1,Va=!1,bd=0,Vu=0,sl=null,b5=0;function Xt(){throw Error(r(321))}function m0(i,a){if(a===null)return!1;for(var u=0;u<a.length&&u<i.length;u++)if(!xr(i[u],a[u]))return!1;return!0}function p0(i,a,u,h,y,T){return Zi=T,Xe=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,D.H=i===null||i.memoizedState===null?Mv:R0,Va=!1,T=u(h,y),Va=!1,il&&(T=ZT(a,u,h,y)),WT(i),T}function WT(i){D.H=Yu;var a=Dt!==null&&Dt.next!==null;if(Zi=0,un=Dt=Xe=null,gd=!1,Vu=0,sl=null,a)throw Error(r(300));i===null||cn||(i=i.dependencies,i!==null&&od(i)&&(cn=!0))}function ZT(i,a,u,h){Xe=i;var y=0;do{if(il&&(sl=null),Vu=0,il=!1,25<=y)throw Error(r(301));if(y+=1,un=Dt=null,i.updateQueue!=null){var T=i.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}D.H=Iv,T=a(u,h)}while(il);return T}function y5(){var i=D.H,a=i.useState()[0];return a=typeof a.then=="function"?qu(a):a,i=i.useState()[0],(Dt!==null?Dt.memoizedState:null)!==i&&(Xe.flags|=1024),a}function g0(){var i=bd!==0;return bd=0,i}function b0(i,a,u){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~u}function y0(i){if(gd){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}gd=!1}Zi=0,un=Dt=Xe=null,il=!1,Vu=bd=0,sl=null}function Yn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?Xe.memoizedState=un=i:un=un.next=i,un}function sn(){if(Dt===null){var i=Xe.alternate;i=i!==null?i.memoizedState:null}else i=Dt.next;var a=un===null?Xe.memoizedState:un.next;if(a!==null)un=a,Dt=i;else{if(i===null)throw Xe.alternate===null?Error(r(467)):Error(r(310));Dt=i,i={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},un===null?Xe.memoizedState=un=i:un=un.next=i}return un}function yd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qu(i){var a=Vu;return Vu+=1,sl===null&&(sl=[]),i=zT(sl,i,a),a=Xe,(un===null?a.memoizedState:un.next)===null&&(a=a.alternate,D.H=a===null||a.memoizedState===null?Mv:R0),i}function xd(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return qu(i);if(i.$$typeof===k)return Mn(i)}throw Error(r(438,String(i)))}function x0(i){var a=null,u=Xe.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var h=Xe.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(a={data:h.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=yd(),Xe.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(i),h=0;h<i;h++)u[h]=L;return a.index++,u}function Ji(i,a){return typeof a=="function"?a(i):a}function Ed(i){var a=sn();return E0(a,Dt,i)}function E0(i,a,u){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=u;var y=i.baseQueue,T=h.pending;if(T!==null){if(y!==null){var _=y.next;y.next=T.next,T.next=_}a.baseQueue=y=T,h.pending=null}if(T=i.baseState,y===null)i.memoizedState=T;else{a=y.next;var M=_=null,G=null,ae=a,fe=!1;do{var pe=ae.lane&-536870913;if(pe!==ae.lane?(ct&pe)===pe:(Zi&pe)===pe){var oe=ae.revertLane;if(oe===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),pe===Jo&&(fe=!0);else if((Zi&oe)===oe){ae=ae.next,oe===Jo&&(fe=!0);continue}else pe={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},G===null?(M=G=pe,_=T):G=G.next=pe,Xe.lanes|=oe,js|=oe;pe=ae.action,Va&&u(T,pe),T=ae.hasEagerState?ae.eagerState:u(T,pe)}else oe={lane:pe,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},G===null?(M=G=oe,_=T):G=G.next=oe,Xe.lanes|=pe,js|=pe;ae=ae.next}while(ae!==null&&ae!==a);if(G===null?_=T:G.next=M,!xr(T,i.memoizedState)&&(cn=!0,fe&&(u=el,u!==null)))throw u;i.memoizedState=T,i.baseState=_,i.baseQueue=G,h.lastRenderedState=T}return y===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function T0(i){var a=sn(),u=a.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var h=u.dispatch,y=u.pending,T=a.memoizedState;if(y!==null){u.pending=null;var _=y=y.next;do T=i(T,_.action),_=_.next;while(_!==y);xr(T,a.memoizedState)||(cn=!0),a.memoizedState=T,a.baseQueue===null&&(a.baseState=T),u.lastRenderedState=T}return[T,h]}function JT(i,a,u){var h=Xe,y=sn(),T=pt;if(T){if(u===void 0)throw Error(r(407));u=u()}else u=a();var _=!xr((Dt||y).memoizedState,u);if(_&&(y.memoizedState=u,cn=!0),y=y.queue,C0(nv.bind(null,h,y,i),[i]),y.getSnapshot!==a||_||un!==null&&un.memoizedState.tag&1){if(h.flags|=2048,al(9,{destroy:void 0},tv.bind(null,h,y,u,a),null),Pt===null)throw Error(r(349));T||(Zi&127)!==0||ev(h,a,u)}return u}function ev(i,a,u){i.flags|=16384,i={getSnapshot:a,value:u},a=Xe.updateQueue,a===null?(a=yd(),Xe.updateQueue=a,a.stores=[i]):(u=a.stores,u===null?a.stores=[i]:u.push(i))}function tv(i,a,u,h){a.value=u,a.getSnapshot=h,rv(a)&&iv(i)}function nv(i,a,u){return u(function(){rv(a)&&iv(i)})}function rv(i){var a=i.getSnapshot;i=i.value;try{var u=a();return!xr(i,u)}catch{return!0}}function iv(i){var a=Ia(i,2);a!==null&&hr(a,i,2)}function v0(i){var a=Yn();if(typeof i=="function"){var u=i;if(i=u(),Va){vn(!0);try{u()}finally{vn(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ji,lastRenderedState:i},a}function sv(i,a,u,h){return i.baseState=u,E0(i,Dt,typeof h=="function"?h:Ji)}function x5(i,a,u,h,y){if(Sd(i))throw Error(r(485));if(i=a.action,i!==null){var T={payload:y,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){T.listeners.push(_)}};D.T!==null?u(!0):T.isTransition=!1,h(T),u=a.pending,u===null?(T.next=a.pending=T,av(a,T)):(T.next=u.next,a.pending=u.next=T)}}function av(i,a){var u=a.action,h=a.payload,y=i.state;if(a.isTransition){var T=D.T,_={};D.T=_;try{var M=u(y,h),G=D.S;G!==null&&G(_,M),ov(i,a,M)}catch(ae){S0(i,a,ae)}finally{T!==null&&_.types!==null&&(T.types=_.types),D.T=T}}else try{T=u(y,h),ov(i,a,T)}catch(ae){S0(i,a,ae)}}function ov(i,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){lv(i,a,h)},function(h){return S0(i,a,h)}):lv(i,a,u)}function lv(i,a,u){a.status="fulfilled",a.value=u,uv(a),i.state=u,a=i.pending,a!==null&&(u=a.next,u===a?i.pending=null:(u=u.next,a.next=u,av(i,u)))}function S0(i,a,u){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do a.status="rejected",a.reason=u,uv(a),a=a.next;while(a!==h)}i.action=null}function uv(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function cv(i,a){return a}function fv(i,a){if(pt){var u=Pt.formState;if(u!==null){e:{var h=Xe;if(pt){if(Ht){t:{for(var y=Ht,T=Fr;y.nodeType!==8;){if(!T){y=null;break t}if(y=Hr(y.nextSibling),y===null){y=null;break t}}T=y.data,y=T==="F!"||T==="F"?y:null}if(y){Ht=Hr(y.nextSibling),h=y.data==="F!";break e}}ks(h)}h=!1}h&&(a=u[0])}}return u=Yn(),u.memoizedState=u.baseState=a,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cv,lastRenderedState:a},u.queue=h,u=Rv.bind(null,Xe,h),h.dispatch=u,h=v0(!1),T=N0.bind(null,Xe,!1,h.queue),h=Yn(),y={state:a,dispatch:null,action:i,pending:null},h.queue=y,u=x5.bind(null,Xe,y,T,u),y.dispatch=u,h.memoizedState=i,[a,u,!1]}function dv(i){var a=sn();return hv(a,Dt,i)}function hv(i,a,u){if(a=E0(i,a,cv)[0],i=Ed(Ji)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var h=qu(a)}catch(_){throw _===tl?cd:_}else h=a;a=sn();var y=a.queue,T=y.dispatch;return u!==a.memoizedState&&(Xe.flags|=2048,al(9,{destroy:void 0},E5.bind(null,y,u),null)),[h,T,i]}function E5(i,a){i.action=a}function mv(i){var a=sn(),u=Dt;if(u!==null)return hv(a,u,i);sn(),a=a.memoizedState,u=sn();var h=u.queue.dispatch;return u.memoizedState=i,[a,h,!1]}function al(i,a,u,h){return i={tag:i,create:u,deps:h,inst:a,next:null},a=Xe.updateQueue,a===null&&(a=yd(),Xe.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=i.next=i:(h=u.next,u.next=i,i.next=h,a.lastEffect=i),i}function pv(){return sn().memoizedState}function Td(i,a,u,h){var y=Yn();Xe.flags|=i,y.memoizedState=al(1|a,{destroy:void 0},u,h===void 0?null:h)}function vd(i,a,u,h){var y=sn();h=h===void 0?null:h;var T=y.memoizedState.inst;Dt!==null&&h!==null&&m0(h,Dt.memoizedState.deps)?y.memoizedState=al(a,T,u,h):(Xe.flags|=i,y.memoizedState=al(1|a,T,u,h))}function gv(i,a){Td(8390656,8,i,a)}function C0(i,a){vd(2048,8,i,a)}function T5(i){Xe.flags|=4;var a=Xe.updateQueue;if(a===null)a=yd(),Xe.updateQueue=a,a.events=[i];else{var u=a.events;u===null?a.events=[i]:u.push(i)}}function bv(i){var a=sn().memoizedState;return T5({ref:a,nextImpl:i}),function(){if((St&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function yv(i,a){return vd(4,2,i,a)}function xv(i,a){return vd(4,4,i,a)}function Ev(i,a){if(typeof a=="function"){i=i();var u=a(i);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function Tv(i,a,u){u=u!=null?u.concat([i]):null,vd(4,4,Ev.bind(null,a,i),u)}function w0(){}function vv(i,a){var u=sn();a=a===void 0?null:a;var h=u.memoizedState;return a!==null&&m0(a,h[1])?h[0]:(u.memoizedState=[i,a],i)}function Sv(i,a){var u=sn();a=a===void 0?null:a;var h=u.memoizedState;if(a!==null&&m0(a,h[1]))return h[0];if(h=i(),Va){vn(!0);try{i()}finally{vn(!1)}}return u.memoizedState=[h,a],h}function A0(i,a,u){return u===void 0||(Zi&1073741824)!==0&&(ct&261930)===0?i.memoizedState=a:(i.memoizedState=u,i=CS(),Xe.lanes|=i,js|=i,u)}function Cv(i,a,u,h){return xr(u,a)?u:rl.current!==null?(i=A0(i,u,h),xr(i,a)||(cn=!0),i):(Zi&42)===0||(Zi&1073741824)!==0&&(ct&261930)===0?(cn=!0,i.memoizedState=u):(i=CS(),Xe.lanes|=i,js|=i,a)}function wv(i,a,u,h,y){var T=H.p;H.p=T!==0&&8>T?T:8;var _=D.T,M={};D.T=M,N0(i,!1,a,u);try{var G=y(),ae=D.S;if(ae!==null&&ae(M,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var fe=g5(G,h);$u(i,a,fe,wr(i))}else $u(i,a,h,wr(i))}catch(pe){$u(i,a,{then:function(){},status:"rejected",reason:pe},wr())}finally{H.p=T,_!==null&&M.types!==null&&(_.types=M.types),D.T=_}}function v5(){}function _0(i,a,u,h){if(i.tag!==5)throw Error(r(476));var y=Av(i).queue;wv(i,y,a,$,u===null?v5:function(){return _v(i),u(h)})}function Av(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ji,lastRenderedState:$},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ji,lastRenderedState:u},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function _v(i){var a=Av(i);a.next===null&&(a=i.alternate.memoizedState),$u(i,a.next.queue,{},wr())}function k0(){return Mn(lc)}function kv(){return sn().memoizedState}function Nv(){return sn().memoizedState}function S5(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var u=wr();i=Ds(u);var h=Os(a,i,u);h!==null&&(hr(h,a,u),Uu(h,a,u)),a={cache:r0()},i.payload=a;return}a=a.return}}function C5(i,a,u){var h=wr();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Sd(i)?Dv(a,u):(u=Yp(i,a,u,h),u!==null&&(hr(u,i,h),Ov(u,a,h)))}function Rv(i,a,u){var h=wr();$u(i,a,u,h)}function $u(i,a,u,h){var y={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Sd(i))Dv(a,y);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=a.lastRenderedReducer,T!==null))try{var _=a.lastRenderedState,M=T(_,u);if(y.hasEagerState=!0,y.eagerState=M,xr(M,_))return rd(i,a,y,0),Pt===null&&nd(),!1}catch{}finally{}if(u=Yp(i,a,y,h),u!==null)return hr(u,i,h),Ov(u,a,h),!0}return!1}function N0(i,a,u,h){if(h={lane:2,revertLane:og(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Sd(i)){if(a)throw Error(r(479))}else a=Yp(i,u,h,2),a!==null&&hr(a,i,2)}function Sd(i){var a=i.alternate;return i===Xe||a!==null&&a===Xe}function Dv(i,a){il=gd=!0;var u=i.pending;u===null?a.next=a:(a.next=u.next,u.next=a),i.pending=a}function Ov(i,a,u){if((u&4194048)!==0){var h=a.lanes;h&=i.pendingLanes,u|=h,a.lanes=u,vu(i,u)}}var Yu={readContext:Mn,use:xd,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};Yu.useEffectEvent=Xt;var Mv={readContext:Mn,use:xd,useCallback:function(i,a){return Yn().memoizedState=[i,a===void 0?null:a],i},useContext:Mn,useEffect:gv,useImperativeHandle:function(i,a,u){u=u!=null?u.concat([i]):null,Td(4194308,4,Ev.bind(null,a,i),u)},useLayoutEffect:function(i,a){return Td(4194308,4,i,a)},useInsertionEffect:function(i,a){Td(4,2,i,a)},useMemo:function(i,a){var u=Yn();a=a===void 0?null:a;var h=i();if(Va){vn(!0);try{i()}finally{vn(!1)}}return u.memoizedState=[h,a],h},useReducer:function(i,a,u){var h=Yn();if(u!==void 0){var y=u(a);if(Va){vn(!0);try{u(a)}finally{vn(!1)}}}else y=a;return h.memoizedState=h.baseState=y,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:y},h.queue=i,i=i.dispatch=C5.bind(null,Xe,i),[h.memoizedState,i]},useRef:function(i){var a=Yn();return i={current:i},a.memoizedState=i},useState:function(i){i=v0(i);var a=i.queue,u=Rv.bind(null,Xe,a);return a.dispatch=u,[i.memoizedState,u]},useDebugValue:w0,useDeferredValue:function(i,a){var u=Yn();return A0(u,i,a)},useTransition:function(){var i=v0(!1);return i=wv.bind(null,Xe,i.queue,!0,!1),Yn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,u){var h=Xe,y=Yn();if(pt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=a(),Pt===null)throw Error(r(349));(ct&127)!==0||ev(h,a,u)}y.memoizedState=u;var T={value:u,getSnapshot:a};return y.queue=T,gv(nv.bind(null,h,T,i),[i]),h.flags|=2048,al(9,{destroy:void 0},tv.bind(null,h,T,u,a),null),u},useId:function(){var i=Yn(),a=Pt.identifierPrefix;if(pt){var u=Si,h=vi;u=(h&~(1<<32-vt(h)-1)).toString(32)+u,a="_"+a+"R_"+u,u=bd++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=b5++,a="_"+a+"r_"+u.toString(32)+"_";return i.memoizedState=a},useHostTransitionStatus:k0,useFormState:fv,useActionState:fv,useOptimistic:function(i){var a=Yn();a.memoizedState=a.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=N0.bind(null,Xe,!0,u),u.dispatch=a,[i,a]},useMemoCache:x0,useCacheRefresh:function(){return Yn().memoizedState=S5.bind(null,Xe)},useEffectEvent:function(i){var a=Yn(),u={impl:i};return a.memoizedState=u,function(){if((St&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},R0={readContext:Mn,use:xd,useCallback:vv,useContext:Mn,useEffect:C0,useImperativeHandle:Tv,useInsertionEffect:yv,useLayoutEffect:xv,useMemo:Sv,useReducer:Ed,useRef:pv,useState:function(){return Ed(Ji)},useDebugValue:w0,useDeferredValue:function(i,a){var u=sn();return Cv(u,Dt.memoizedState,i,a)},useTransition:function(){var i=Ed(Ji)[0],a=sn().memoizedState;return[typeof i=="boolean"?i:qu(i),a]},useSyncExternalStore:JT,useId:kv,useHostTransitionStatus:k0,useFormState:dv,useActionState:dv,useOptimistic:function(i,a){var u=sn();return sv(u,Dt,i,a)},useMemoCache:x0,useCacheRefresh:Nv};R0.useEffectEvent=bv;var Iv={readContext:Mn,use:xd,useCallback:vv,useContext:Mn,useEffect:C0,useImperativeHandle:Tv,useInsertionEffect:yv,useLayoutEffect:xv,useMemo:Sv,useReducer:T0,useRef:pv,useState:function(){return T0(Ji)},useDebugValue:w0,useDeferredValue:function(i,a){var u=sn();return Dt===null?A0(u,i,a):Cv(u,Dt.memoizedState,i,a)},useTransition:function(){var i=T0(Ji)[0],a=sn().memoizedState;return[typeof i=="boolean"?i:qu(i),a]},useSyncExternalStore:JT,useId:kv,useHostTransitionStatus:k0,useFormState:mv,useActionState:mv,useOptimistic:function(i,a){var u=sn();return Dt!==null?sv(u,Dt,i,a):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:x0,useCacheRefresh:Nv};Iv.useEffectEvent=bv;function D0(i,a,u,h){a=i.memoizedState,u=u(h,a),u=u==null?a:p({},a,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var O0={enqueueSetState:function(i,a,u){i=i._reactInternals;var h=wr(),y=Ds(h);y.payload=a,u!=null&&(y.callback=u),a=Os(i,y,h),a!==null&&(hr(a,i,h),Uu(a,i,h))},enqueueReplaceState:function(i,a,u){i=i._reactInternals;var h=wr(),y=Ds(h);y.tag=1,y.payload=a,u!=null&&(y.callback=u),a=Os(i,y,h),a!==null&&(hr(a,i,h),Uu(a,i,h))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var u=wr(),h=Ds(u);h.tag=2,a!=null&&(h.callback=a),a=Os(i,h,u),a!==null&&(hr(a,i,u),Uu(a,i,u))}};function Lv(i,a,u,h,y,T,_){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,_):a.prototype&&a.prototype.isPureReactComponent?!Ou(u,h)||!Ou(y,T):!0}function Pv(i,a,u,h){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,h),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,h),a.state!==i&&O0.enqueueReplaceState(a,a.state,null)}function qa(i,a){var u=a;if("ref"in a){u={};for(var h in a)h!=="ref"&&(u[h]=a[h])}if(i=i.defaultProps){u===a&&(u=p({},u));for(var y in i)u[y]===void 0&&(u[y]=i[y])}return u}function jv(i){td(i)}function Bv(i){console.error(i)}function Fv(i){td(i)}function Cd(i,a){try{var u=i.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(h){setTimeout(function(){throw h})}}function Uv(i,a,u){try{var h=i.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function M0(i,a,u){return u=Ds(u),u.tag=3,u.payload={element:null},u.callback=function(){Cd(i,a)},u}function Hv(i){return i=Ds(i),i.tag=3,i}function zv(i,a,u,h){var y=u.type.getDerivedStateFromError;if(typeof y=="function"){var T=h.value;i.payload=function(){return y(T)},i.callback=function(){Uv(a,u,h)}}var _=u.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(i.callback=function(){Uv(a,u,h),typeof y!="function"&&(Bs===null?Bs=new Set([this]):Bs.add(this));var M=h.stack;this.componentDidCatch(h.value,{componentStack:M!==null?M:""})})}function w5(i,a,u,h,y){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(a=u.alternate,a!==null&&Zo(a,u,y,!0),u=Tr.current,u!==null){switch(u.tag){case 31:case 13:return Ur===null?Pd():u.alternate===null&&Wt===0&&(Wt=3),u.flags&=-257,u.flags|=65536,u.lanes=y,h===fd?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([h]):a.add(h),ig(i,h,y)),!1;case 22:return u.flags|=65536,h===fd?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([h]):u.add(h)),ig(i,h,y)),!1}throw Error(r(435,u.tag))}return ig(i,h,y),Pd(),!1}if(pt)return a=Tr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,h!==Zp&&(i=Error(r(422),{cause:h}),Lu(Pr(i,u)))):(h!==Zp&&(a=Error(r(423),{cause:h}),Lu(Pr(a,u))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,h=Pr(h,u),y=M0(i.stateNode,h,y),u0(i,y),Wt!==4&&(Wt=2)),!1;var T=Error(r(520),{cause:h});if(T=Pr(T,u),ec===null?ec=[T]:ec.push(T),Wt!==4&&(Wt=2),a===null)return!0;h=Pr(h,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,i=y&-y,u.lanes|=i,i=M0(u.stateNode,h,i),u0(u,i),!1;case 1:if(a=u.type,T=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Bs===null||!Bs.has(T))))return u.flags|=65536,y&=-y,u.lanes|=y,y=Hv(y),zv(y,i,u,h),u0(u,y),!1}u=u.return}while(u!==null);return!1}var I0=Error(r(461)),cn=!1;function In(i,a,u,h){a.child=i===null?YT(a,null,u,h):za(a,i.child,u,h)}function Vv(i,a,u,h,y){u=u.render;var T=a.ref;if("ref"in h){var _={};for(var M in h)M!=="ref"&&(_[M]=h[M])}else _=h;return Ba(a),h=p0(i,a,u,_,T,y),M=g0(),i!==null&&!cn?(b0(i,a,y),es(i,a,y)):(pt&&M&&Xp(a),a.flags|=1,In(i,a,h,y),a.child)}function qv(i,a,u,h,y){if(i===null){var T=u.type;return typeof T=="function"&&!Gp(T)&&T.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=T,$v(i,a,T,h,y)):(i=sd(u.type,null,h,a,a.mode,y),i.ref=a.ref,i.return=a,a.child=i)}if(T=i.child,!z0(i,y)){var _=T.memoizedProps;if(u=u.compare,u=u!==null?u:Ou,u(_,h)&&i.ref===a.ref)return es(i,a,y)}return a.flags|=1,i=Ki(T,h),i.ref=a.ref,i.return=a,a.child=i}function $v(i,a,u,h,y){if(i!==null){var T=i.memoizedProps;if(Ou(T,h)&&i.ref===a.ref)if(cn=!1,a.pendingProps=h=T,z0(i,y))(i.flags&131072)!==0&&(cn=!0);else return a.lanes=i.lanes,es(i,a,y)}return L0(i,a,u,h,y)}function Yv(i,a,u,h){var y=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|u:u,i!==null){for(h=a.child=i.child,y=0;h!==null;)y=y|h.lanes|h.childLanes,h=h.sibling;h=y&~T}else h=0,a.child=null;return Gv(i,a,T,u,h)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&ud(a,T!==null?T.cachePool:null),T!==null?QT(a,T):f0(),XT(a);else return h=a.lanes=536870912,Gv(i,a,T!==null?T.baseLanes|u:u,u,h)}else T!==null?(ud(a,T.cachePool),QT(a,T),Is(),a.memoizedState=null):(i!==null&&ud(a,null),f0(),Is());return In(i,a,y,u),a.child}function Gu(i,a){return i!==null&&i.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Gv(i,a,u,h,y){var T=s0();return T=T===null?null:{parent:ln._currentValue,pool:T},a.memoizedState={baseLanes:u,cachePool:T},i!==null&&ud(a,null),f0(),XT(a),i!==null&&Zo(i,a,h,!0),a.childLanes=y,null}function wd(i,a){return a=_d({mode:a.mode,children:a.children},i.mode),a.ref=i.ref,i.child=a,a.return=i,a}function Kv(i,a,u){return za(a,i.child,null,u),i=wd(a,a.pendingProps),i.flags|=2,vr(a),a.memoizedState=null,i}function A5(i,a,u){var h=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,i===null){if(pt){if(h.mode==="hidden")return i=wd(a,h),a.lanes=536870912,Gu(null,i);if(h0(a),(i=Ht)?(i=a2(i,Fr),i=i!==null&&i.data==="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:As!==null?{id:vi,overflow:Si}:null,retryLane:536870912,hydrationErrors:null},u=DT(i),u.return=a,a.child=u,On=a,Ht=null)):i=null,i===null)throw ks(a);return a.lanes=536870912,null}return wd(a,h)}var T=i.memoizedState;if(T!==null){var _=T.dehydrated;if(h0(a),y)if(a.flags&256)a.flags&=-257,a=Kv(i,a,u);else if(a.memoizedState!==null)a.child=i.child,a.flags|=128,a=null;else throw Error(r(558));else if(cn||Zo(i,a,u,!1),y=(u&i.childLanes)!==0,cn||y){if(h=Pt,h!==null&&(_=BE(h,u),_!==0&&_!==T.retryLane))throw T.retryLane=_,Ia(i,_),hr(h,i,_),I0;Pd(),a=Kv(i,a,u)}else i=T.treeContext,Ht=Hr(_.nextSibling),On=a,pt=!0,_s=null,Fr=!1,i!==null&&IT(a,i),a=wd(a,h),a.flags|=4096;return a}return i=Ki(i.child,{mode:h.mode,children:h.children}),i.ref=a.ref,a.child=i,i.return=a,i}function Ad(i,a){var u=a.ref;if(u===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(a.flags|=4194816)}}function L0(i,a,u,h,y){return Ba(a),u=p0(i,a,u,h,void 0,y),h=g0(),i!==null&&!cn?(b0(i,a,y),es(i,a,y)):(pt&&h&&Xp(a),a.flags|=1,In(i,a,u,y),a.child)}function Qv(i,a,u,h,y,T){return Ba(a),a.updateQueue=null,u=ZT(a,h,u,y),WT(i),h=g0(),i!==null&&!cn?(b0(i,a,T),es(i,a,T)):(pt&&h&&Xp(a),a.flags|=1,In(i,a,u,T),a.child)}function Xv(i,a,u,h,y){if(Ba(a),a.stateNode===null){var T=Ko,_=u.contextType;typeof _=="object"&&_!==null&&(T=Mn(_)),T=new u(h,T),a.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=O0,a.stateNode=T,T._reactInternals=a,T=a.stateNode,T.props=h,T.state=a.memoizedState,T.refs={},o0(a),_=u.contextType,T.context=typeof _=="object"&&_!==null?Mn(_):Ko,T.state=a.memoizedState,_=u.getDerivedStateFromProps,typeof _=="function"&&(D0(a,u,_,h),T.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(_=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),_!==T.state&&O0.enqueueReplaceState(T,T.state,null),zu(a,h,T,y),Hu(),T.state=a.memoizedState),typeof T.componentDidMount=="function"&&(a.flags|=4194308),h=!0}else if(i===null){T=a.stateNode;var M=a.memoizedProps,G=qa(u,M);T.props=G;var ae=T.context,fe=u.contextType;_=Ko,typeof fe=="object"&&fe!==null&&(_=Mn(fe));var pe=u.getDerivedStateFromProps;fe=typeof pe=="function"||typeof T.getSnapshotBeforeUpdate=="function",M=a.pendingProps!==M,fe||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(M||ae!==_)&&Pv(a,T,h,_),Rs=!1;var oe=a.memoizedState;T.state=oe,zu(a,h,T,y),Hu(),ae=a.memoizedState,M||oe!==ae||Rs?(typeof pe=="function"&&(D0(a,u,pe,h),ae=a.memoizedState),(G=Rs||Lv(a,u,G,h,oe,ae,_))?(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=_,h=G):(typeof T.componentDidMount=="function"&&(a.flags|=4194308),h=!1)}else{T=a.stateNode,l0(i,a),_=a.memoizedProps,fe=qa(u,_),T.props=fe,pe=a.pendingProps,oe=T.context,ae=u.contextType,G=Ko,typeof ae=="object"&&ae!==null&&(G=Mn(ae)),M=u.getDerivedStateFromProps,(ae=typeof M=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(_!==pe||oe!==G)&&Pv(a,T,h,G),Rs=!1,oe=a.memoizedState,T.state=oe,zu(a,h,T,y),Hu();var le=a.memoizedState;_!==pe||oe!==le||Rs||i!==null&&i.dependencies!==null&&od(i.dependencies)?(typeof M=="function"&&(D0(a,u,M,h),le=a.memoizedState),(fe=Rs||Lv(a,u,fe,h,oe,le,G)||i!==null&&i.dependencies!==null&&od(i.dependencies))?(ae||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(h,le,G),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(h,le,G)),typeof T.componentDidUpdate=="function"&&(a.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof T.componentDidUpdate!="function"||_===i.memoizedProps&&oe===i.memoizedState||(a.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||_===i.memoizedProps&&oe===i.memoizedState||(a.flags|=1024),a.memoizedProps=h,a.memoizedState=le),T.props=h,T.state=le,T.context=G,h=fe):(typeof T.componentDidUpdate!="function"||_===i.memoizedProps&&oe===i.memoizedState||(a.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||_===i.memoizedProps&&oe===i.memoizedState||(a.flags|=1024),h=!1)}return T=h,Ad(i,a),h=(a.flags&128)!==0,T||h?(T=a.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:T.render(),a.flags|=1,i!==null&&h?(a.child=za(a,i.child,null,y),a.child=za(a,null,u,y)):In(i,a,u,y),a.memoizedState=T.state,i=a.child):i=es(i,a,y),i}function Wv(i,a,u,h){return Pa(),a.flags|=256,In(i,a,u,h),a.child}var P0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function j0(i){return{baseLanes:i,cachePool:UT()}}function B0(i,a,u){return i=i!==null?i.childLanes&~u:0,a&&(i|=Cr),i}function Zv(i,a,u){var h=a.pendingProps,y=!1,T=(a.flags&128)!==0,_;if((_=T)||(_=i!==null&&i.memoizedState===null?!1:(rn.current&2)!==0),_&&(y=!0,a.flags&=-129),_=(a.flags&32)!==0,a.flags&=-33,i===null){if(pt){if(y?Ms(a):Is(),(i=Ht)?(i=a2(i,Fr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:As!==null?{id:vi,overflow:Si}:null,retryLane:536870912,hydrationErrors:null},u=DT(i),u.return=a,a.child=u,On=a,Ht=null)):i=null,i===null)throw ks(a);return Eg(i)?a.lanes=32:a.lanes=536870912,null}var M=h.children;return h=h.fallback,y?(Is(),y=a.mode,M=_d({mode:"hidden",children:M},y),h=La(h,y,u,null),M.return=a,h.return=a,M.sibling=h,a.child=M,h=a.child,h.memoizedState=j0(u),h.childLanes=B0(i,_,u),a.memoizedState=P0,Gu(null,h)):(Ms(a),F0(a,M))}var G=i.memoizedState;if(G!==null&&(M=G.dehydrated,M!==null)){if(T)a.flags&256?(Ms(a),a.flags&=-257,a=U0(i,a,u)):a.memoizedState!==null?(Is(),a.child=i.child,a.flags|=128,a=null):(Is(),M=h.fallback,y=a.mode,h=_d({mode:"visible",children:h.children},y),M=La(M,y,u,null),M.flags|=2,h.return=a,M.return=a,h.sibling=M,a.child=h,za(a,i.child,null,u),h=a.child,h.memoizedState=j0(u),h.childLanes=B0(i,_,u),a.memoizedState=P0,a=Gu(null,h));else if(Ms(a),Eg(M)){if(_=M.nextSibling&&M.nextSibling.dataset,_)var ae=_.dgst;_=ae,h=Error(r(419)),h.stack="",h.digest=_,Lu({value:h,source:null,stack:null}),a=U0(i,a,u)}else if(cn||Zo(i,a,u,!1),_=(u&i.childLanes)!==0,cn||_){if(_=Pt,_!==null&&(h=BE(_,u),h!==0&&h!==G.retryLane))throw G.retryLane=h,Ia(i,h),hr(_,i,h),I0;xg(M)||Pd(),a=U0(i,a,u)}else xg(M)?(a.flags|=192,a.child=i.child,a=null):(i=G.treeContext,Ht=Hr(M.nextSibling),On=a,pt=!0,_s=null,Fr=!1,i!==null&&IT(a,i),a=F0(a,h.children),a.flags|=4096);return a}return y?(Is(),M=h.fallback,y=a.mode,G=i.child,ae=G.sibling,h=Ki(G,{mode:"hidden",children:h.children}),h.subtreeFlags=G.subtreeFlags&65011712,ae!==null?M=Ki(ae,M):(M=La(M,y,u,null),M.flags|=2),M.return=a,h.return=a,h.sibling=M,a.child=h,Gu(null,h),h=a.child,M=i.child.memoizedState,M===null?M=j0(u):(y=M.cachePool,y!==null?(G=ln._currentValue,y=y.parent!==G?{parent:G,pool:G}:y):y=UT(),M={baseLanes:M.baseLanes|u,cachePool:y}),h.memoizedState=M,h.childLanes=B0(i,_,u),a.memoizedState=P0,Gu(i.child,h)):(Ms(a),u=i.child,i=u.sibling,u=Ki(u,{mode:"visible",children:h.children}),u.return=a,u.sibling=null,i!==null&&(_=a.deletions,_===null?(a.deletions=[i],a.flags|=16):_.push(i)),a.child=u,a.memoizedState=null,u)}function F0(i,a){return a=_d({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function _d(i,a){return i=Er(22,i,null,a),i.lanes=0,i}function U0(i,a,u){return za(a,i.child,null,u),i=F0(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function Jv(i,a,u){i.lanes|=a;var h=i.alternate;h!==null&&(h.lanes|=a),t0(i.return,a,u)}function H0(i,a,u,h,y,T){var _=i.memoizedState;_===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:y,treeForkCount:T}:(_.isBackwards=a,_.rendering=null,_.renderingStartTime=0,_.last=h,_.tail=u,_.tailMode=y,_.treeForkCount=T)}function eS(i,a,u){var h=a.pendingProps,y=h.revealOrder,T=h.tail;h=h.children;var _=rn.current,M=(_&2)!==0;if(M?(_=_&1|2,a.flags|=128):_&=1,I(rn,_),In(i,a,h,u),h=pt?Iu:0,!M&&i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Jv(i,u,a);else if(i.tag===19)Jv(i,u,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(y){case"forwards":for(u=a.child,y=null;u!==null;)i=u.alternate,i!==null&&pd(i)===null&&(y=u),u=u.sibling;u=y,u===null?(y=a.child,a.child=null):(y=u.sibling,u.sibling=null),H0(a,!1,y,u,T,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=a.child,a.child=null;y!==null;){if(i=y.alternate,i!==null&&pd(i)===null){a.child=y;break}i=y.sibling,y.sibling=u,u=y,y=i}H0(a,!0,u,null,T,h);break;case"together":H0(a,!1,null,null,void 0,h);break;default:a.memoizedState=null}return a.child}function es(i,a,u){if(i!==null&&(a.dependencies=i.dependencies),js|=a.lanes,(u&a.childLanes)===0)if(i!==null){if(Zo(i,a,u,!1),(u&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,u=Ki(i,i.pendingProps),a.child=u,u.return=a;i.sibling!==null;)i=i.sibling,u=u.sibling=Ki(i,i.pendingProps),u.return=a;u.sibling=null}return a.child}function z0(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&od(i)))}function _5(i,a,u){switch(a.tag){case 3:Se(a,a.stateNode.containerInfo),Ns(a,ln,i.memoizedState.cache),Pa();break;case 27:case 5:Pe(a);break;case 4:Se(a,a.stateNode.containerInfo);break;case 10:Ns(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,h0(a),null;break;case 13:var h=a.memoizedState;if(h!==null)return h.dehydrated!==null?(Ms(a),a.flags|=128,null):(u&a.child.childLanes)!==0?Zv(i,a,u):(Ms(a),i=es(i,a,u),i!==null?i.sibling:null);Ms(a);break;case 19:var y=(i.flags&128)!==0;if(h=(u&a.childLanes)!==0,h||(Zo(i,a,u,!1),h=(u&a.childLanes)!==0),y){if(h)return eS(i,a,u);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),I(rn,rn.current),h)break;return null;case 22:return a.lanes=0,Yv(i,a,u,a.pendingProps);case 24:Ns(a,ln,i.memoizedState.cache)}return es(i,a,u)}function tS(i,a,u){if(i!==null)if(i.memoizedProps!==a.pendingProps)cn=!0;else{if(!z0(i,u)&&(a.flags&128)===0)return cn=!1,_5(i,a,u);cn=(i.flags&131072)!==0}else cn=!1,pt&&(a.flags&1048576)!==0&&MT(a,Iu,a.index);switch(a.lanes=0,a.tag){case 16:e:{var h=a.pendingProps;if(i=Ua(a.elementType),a.type=i,typeof i=="function")Gp(i)?(h=qa(i,h),a.tag=1,a=Xv(null,a,i,h,u)):(a.tag=0,a=L0(null,a,i,h,u));else{if(i!=null){var y=i.$$typeof;if(y===R){a.tag=11,a=Vv(null,a,i,h,u);break e}else if(y===j){a.tag=14,a=qv(null,a,i,h,u);break e}}throw a=ne(i)||i,Error(r(306,a,""))}}return a;case 0:return L0(i,a,a.type,a.pendingProps,u);case 1:return h=a.type,y=qa(h,a.pendingProps),Xv(i,a,h,y,u);case 3:e:{if(Se(a,a.stateNode.containerInfo),i===null)throw Error(r(387));h=a.pendingProps;var T=a.memoizedState;y=T.element,l0(i,a),zu(a,h,null,u);var _=a.memoizedState;if(h=_.cache,Ns(a,ln,h),h!==T.cache&&n0(a,[ln],u,!0),Hu(),h=_.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:_.cache},a.updateQueue.baseState=T,a.memoizedState=T,a.flags&256){a=Wv(i,a,h,u);break e}else if(h!==y){y=Pr(Error(r(424)),a),Lu(y),a=Wv(i,a,h,u);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=Hr(i.firstChild),On=a,pt=!0,_s=null,Fr=!0,u=YT(a,null,h,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Pa(),h===y){a=es(i,a,u);break e}In(i,a,h,u)}a=a.child}return a;case 26:return Ad(i,a),i===null?(u=d2(a.type,null,a.pendingProps,null))?a.memoizedState=u:pt||(u=a.type,i=a.pendingProps,h=Vd(Te.current).createElement(u),h[Dn]=a,h[or]=i,Ln(h,u,i),Sn(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=u2(a.type,a.pendingProps,Te.current),On=a,Fr=!0,y=Ht,zs(a.type)?(Tg=y,Ht=Hr(h.firstChild)):Ht=y),In(i,a,a.pendingProps.children,u),Ad(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&pt&&((y=h=Ht)&&(h=rL(h,a.type,a.pendingProps,Fr),h!==null?(a.stateNode=h,On=a,Ht=Hr(h.firstChild),Fr=!1,y=!0):y=!1),y||ks(a)),Pe(a),y=a.type,T=a.pendingProps,_=i!==null?i.memoizedProps:null,h=T.children,gg(y,T)?h=null:_!==null&&gg(y,_)&&(a.flags|=32),a.memoizedState!==null&&(y=p0(i,a,y5,null,null,u),lc._currentValue=y),Ad(i,a),In(i,a,h,u),a.child;case 6:return i===null&&pt&&((i=u=Ht)&&(u=iL(u,a.pendingProps,Fr),u!==null?(a.stateNode=u,On=a,Ht=null,i=!0):i=!1),i||ks(a)),null;case 13:return Zv(i,a,u);case 4:return Se(a,a.stateNode.containerInfo),h=a.pendingProps,i===null?a.child=za(a,null,h,u):In(i,a,h,u),a.child;case 11:return Vv(i,a,a.type,a.pendingProps,u);case 7:return In(i,a,a.pendingProps,u),a.child;case 8:return In(i,a,a.pendingProps.children,u),a.child;case 12:return In(i,a,a.pendingProps.children,u),a.child;case 10:return h=a.pendingProps,Ns(a,a.type,h.value),In(i,a,h.children,u),a.child;case 9:return y=a.type._context,h=a.pendingProps.children,Ba(a),y=Mn(y),h=h(y),a.flags|=1,In(i,a,h,u),a.child;case 14:return qv(i,a,a.type,a.pendingProps,u);case 15:return $v(i,a,a.type,a.pendingProps,u);case 19:return eS(i,a,u);case 31:return A5(i,a,u);case 22:return Yv(i,a,u,a.pendingProps);case 24:return Ba(a),h=Mn(ln),i===null?(y=s0(),y===null&&(y=Pt,T=r0(),y.pooledCache=T,T.refCount++,T!==null&&(y.pooledCacheLanes|=u),y=T),a.memoizedState={parent:h,cache:y},o0(a),Ns(a,ln,y)):((i.lanes&u)!==0&&(l0(i,a),zu(a,null,null,u),Hu()),y=i.memoizedState,T=a.memoizedState,y.parent!==h?(y={parent:h,cache:h},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),Ns(a,ln,h)):(h=T.cache,Ns(a,ln,h),h!==y.cache&&n0(a,[ln],u,!0))),In(i,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function ts(i){i.flags|=4}function V0(i,a,u,h,y){if((a=(i.mode&32)!==0)&&(a=!1),a){if(i.flags|=16777216,(y&335544128)===y)if(i.stateNode.complete)i.flags|=8192;else if(kS())i.flags|=8192;else throw Ha=fd,a0}else i.flags&=-16777217}function nS(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!b2(a))if(kS())i.flags|=8192;else throw Ha=fd,a0}function kd(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?sr():536870912,i.lanes|=a,cl|=a)}function Ku(i,a){if(!pt)switch(i.tailMode){case"hidden":a=i.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.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,u=0,h=0;if(a)for(var y=i.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags&65011712,h|=y.flags&65011712,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags,h|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=h,i.childLanes=u,a}function k5(i,a,u){var h=a.pendingProps;switch(Wp(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 u=a.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),a.memoizedState.cache!==h&&(a.flags|=2048),Wi(ln),Ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Wo(a)?ts(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Jp())),zt(a),null;case 26:var y=a.type,T=a.memoizedState;return i===null?(ts(a),T!==null?(zt(a),nS(a,T)):(zt(a),V0(a,y,null,h,u))):T?T!==i.memoizedState?(ts(a),zt(a),nS(a,T)):(zt(a),a.flags&=-16777217):(i=i.memoizedProps,i!==h&&ts(a),zt(a),V0(a,y,i,h,u)),null;case 27:if(_e(a),u=Te.current,y=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==h&&ts(a);else{if(!h){if(a.stateNode===null)throw Error(r(166));return zt(a),null}i=de.current,Wo(a)?LT(a):(i=u2(y,h,u),a.stateNode=i,ts(a))}return zt(a),null;case 5:if(_e(a),y=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==h&&ts(a);else{if(!h){if(a.stateNode===null)throw Error(r(166));return zt(a),null}if(T=de.current,Wo(a))LT(a);else{var _=Vd(Te.current);switch(T){case 1:T=_.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:T=_.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":T=_.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":T=_.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":T=_.createElement("div"),T.innerHTML="<script><\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof h.is=="string"?_.createElement("select",{is:h.is}):_.createElement("select"),h.multiple?T.multiple=!0:h.size&&(T.size=h.size);break;default:T=typeof h.is=="string"?_.createElement(y,{is:h.is}):_.createElement(y)}}T[Dn]=a,T[or]=h;e:for(_=a.child;_!==null;){if(_.tag===5||_.tag===6)T.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===a)break e;for(;_.sibling===null;){if(_.return===null||_.return===a)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}a.stateNode=T;e:switch(Ln(T,y,h),y){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&ts(a)}}return zt(a),V0(a,a.type,i===null?null:i.memoizedProps,a.pendingProps,u),null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==h&&ts(a);else{if(typeof h!="string"&&a.stateNode===null)throw Error(r(166));if(i=Te.current,Wo(a)){if(i=a.stateNode,u=a.memoizedProps,h=null,y=On,y!==null)switch(y.tag){case 27:case 5:h=y.memoizedProps}i[Dn]=a,i=!!(i.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||ZS(i.nodeValue,u)),i||ks(a,!0)}else i=Vd(i).createTextNode(h),i[Dn]=a,a.stateNode=i}return zt(a),null;case 31:if(u=a.memoizedState,i===null||i.memoizedState!==null){if(h=Wo(a),u!==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[Dn]=a}else Pa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),i=!1}else u=Jp(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return a.flags&256?(vr(a),a):(vr(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(y=Wo(a),h!==null&&h.dehydrated!==null){if(i===null){if(!y)throw Error(r(318));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Dn]=a}else Pa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),y=!1}else y=Jp(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(vr(a),a):(vr(a),null)}return vr(a),(a.flags&128)!==0?(a.lanes=u,a):(u=h!==null,i=i!==null&&i.memoizedState!==null,u&&(h=a.child,y=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(y=h.alternate.memoizedState.cachePool.pool),T=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(T=h.memoizedState.cachePool.pool),T!==y&&(h.flags|=2048)),u!==i&&u&&(a.child.flags|=8192),kd(a,a.updateQueue),zt(a),null);case 4:return Ce(),i===null&&fg(a.stateNode.containerInfo),zt(a),null;case 10:return Wi(a.type),zt(a),null;case 19:if(ie(rn),h=a.memoizedState,h===null)return zt(a),null;if(y=(a.flags&128)!==0,T=h.rendering,T===null)if(y)Ku(h,!1);else{if(Wt!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(T=pd(i),T!==null){for(a.flags|=128,Ku(h,!1),i=T.updateQueue,a.updateQueue=i,kd(a,i),a.subtreeFlags=0,i=u,u=a.child;u!==null;)RT(u,i),u=u.sibling;return I(rn,rn.current&1|2),pt&&Qi(a,h.treeForkCount),a.child}i=i.sibling}h.tail!==null&&rt()>Md&&(a.flags|=128,y=!0,Ku(h,!1),a.lanes=4194304)}else{if(!y)if(i=pd(T),i!==null){if(a.flags|=128,y=!0,i=i.updateQueue,a.updateQueue=i,kd(a,i),Ku(h,!0),h.tail===null&&h.tailMode==="hidden"&&!T.alternate&&!pt)return zt(a),null}else 2*rt()-h.renderingStartTime>Md&&u!==536870912&&(a.flags|=128,y=!0,Ku(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,u=rn.current,I(rn,y?u&1|2:u&1),pt&&Qi(a,h.treeForkCount),i):(zt(a),null);case 22:case 23:return vr(a),d0(),h=a.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(a.flags|=8192):h&&(a.flags|=8192),h?(u&536870912)!==0&&(a.flags&128)===0&&(zt(a),a.subtreeFlags&6&&(a.flags|=8192)):zt(a),u=a.updateQueue,u!==null&&kd(a,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),h=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==u&&(a.flags|=2048),i!==null&&ie(Fa),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Wi(ln),zt(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function N5(i,a){switch(Wp(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return Wi(ln),Ce(),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(vr(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(vr(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(rn),null;case 4:return Ce(),null;case 10:return Wi(a.type),null;case 22:case 23:return vr(a),d0(),i!==null&&ie(Fa),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return Wi(ln),null;case 25:return null;default:return null}}function rS(i,a){switch(Wp(a),a.tag){case 3:Wi(ln),Ce();break;case 26:case 27:case 5:_e(a);break;case 4:Ce();break;case 31:a.memoizedState!==null&&vr(a);break;case 13:vr(a);break;case 19:ie(rn);break;case 10:Wi(a.type);break;case 22:case 23:vr(a),d0(),i!==null&&ie(Fa);break;case 24:Wi(ln)}}function Qu(i,a){try{var u=a.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var y=h.next;u=y;do{if((u.tag&i)===i){h=void 0;var T=u.create,_=u.inst;h=T(),_.destroy=h}u=u.next}while(u!==y)}}catch(M){Rt(a,a.return,M)}}function Ls(i,a,u){try{var h=a.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var T=y.next;h=T;do{if((h.tag&i)===i){var _=h.inst,M=_.destroy;if(M!==void 0){_.destroy=void 0,y=a;var G=u,ae=M;try{ae()}catch(fe){Rt(y,G,fe)}}}h=h.next}while(h!==T)}}catch(fe){Rt(a,a.return,fe)}}function iS(i){var a=i.updateQueue;if(a!==null){var u=i.stateNode;try{KT(a,u)}catch(h){Rt(i,i.return,h)}}}function sS(i,a,u){u.props=qa(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(h){Rt(i,a,h)}}function Xu(i,a){try{var u=i.ref;if(u!==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 u=="function"?i.refCleanup=u(h):u.current=h}}catch(y){Rt(i,a,y)}}function Ci(i,a){var u=i.ref,h=i.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(y){Rt(i,a,y)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){Rt(i,a,y)}else u.current=null}function aS(i){var a=i.type,u=i.memoizedProps,h=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(y){Rt(i,i.return,y)}}function q0(i,a,u){try{var h=i.stateNode;W5(h,i.type,u,a),h[or]=a}catch(y){Rt(i,i.return,y)}}function oS(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&zs(i.type)||i.tag===4}function $0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||oS(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&&zs(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 Y0(i,a,u){var h=i.tag;if(h===5||h===6)i=i.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(i),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Yi));else if(h!==4&&(h===27&&zs(i.type)&&(u=i.stateNode,a=null),i=i.child,i!==null))for(Y0(i,a,u),i=i.sibling;i!==null;)Y0(i,a,u),i=i.sibling}function Nd(i,a,u){var h=i.tag;if(h===5||h===6)i=i.stateNode,a?u.insertBefore(i,a):u.appendChild(i);else if(h!==4&&(h===27&&zs(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Nd(i,a,u),i=i.sibling;i!==null;)Nd(i,a,u),i=i.sibling}function lS(i){var a=i.stateNode,u=i.memoizedProps;try{for(var h=i.type,y=a.attributes;y.length;)a.removeAttributeNode(y[0]);Ln(a,h,u),a[Dn]=i,a[or]=u}catch(T){Rt(i,i.return,T)}}var ns=!1,fn=!1,G0=!1,uS=typeof WeakSet=="function"?WeakSet:Set,Cn=null;function R5(i,a){if(i=i.containerInfo,mg=Xd,i=TT(i),Up(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var y=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{u.nodeType,T.nodeType}catch{u=null;break e}var _=0,M=-1,G=-1,ae=0,fe=0,pe=i,oe=null;t:for(;;){for(var le;pe!==u||y!==0&&pe.nodeType!==3||(M=_+y),pe!==T||h!==0&&pe.nodeType!==3||(G=_+h),pe.nodeType===3&&(_+=pe.nodeValue.length),(le=pe.firstChild)!==null;)oe=pe,pe=le;for(;;){if(pe===i)break t;if(oe===u&&++ae===y&&(M=_),oe===T&&++fe===h&&(G=_),(le=pe.nextSibling)!==null)break;pe=oe,oe=pe.parentNode}pe=le}u=M===-1||G===-1?null:{start:M,end:G}}else u=null}u=u||{start:0,end:0}}else u=null;for(pg={focusedElem:i,selectionRange:u},Xd=!1,Cn=a;Cn!==null;)if(a=Cn,i=a.child,(a.subtreeFlags&1028)!==0&&i!==null)i.return=a,Cn=i;else for(;Cn!==null;){switch(a=Cn,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(u=0;u<i.length;u++)y=i[u],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&T!==null){i=void 0,u=a,y=T.memoizedProps,T=T.memoizedState,h=u.stateNode;try{var De=qa(u.type,y);i=h.getSnapshotBeforeUpdate(De,T),h.__reactInternalSnapshotBeforeUpdate=i}catch(qe){Rt(u,u.return,qe)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,u=i.nodeType,u===9)yg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":yg(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,Cn=i;break}Cn=a.return}}function cS(i,a,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:is(i,u),h&4&&Qu(5,u);break;case 1:if(is(i,u),h&4)if(i=u.stateNode,a===null)try{i.componentDidMount()}catch(_){Rt(u,u.return,_)}else{var y=qa(u.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(y,a,i.__reactInternalSnapshotBeforeUpdate)}catch(_){Rt(u,u.return,_)}}h&64&&iS(u),h&512&&Xu(u,u.return);break;case 3:if(is(i,u),h&64&&(i=u.updateQueue,i!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{KT(i,a)}catch(_){Rt(u,u.return,_)}}break;case 27:a===null&&h&4&&lS(u);case 26:case 5:is(i,u),a===null&&h&4&&aS(u),h&512&&Xu(u,u.return);break;case 12:is(i,u);break;case 31:is(i,u),h&4&&hS(i,u);break;case 13:is(i,u),h&4&&mS(i,u),h&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=F5.bind(null,u),sL(i,u))));break;case 22:if(h=u.memoizedState!==null||ns,!h){a=a!==null&&a.memoizedState!==null||fn,y=ns;var T=fn;ns=h,(fn=a)&&!T?ss(i,u,(u.subtreeFlags&8772)!==0):is(i,u),ns=y,fn=T}break;case 30:break;default:is(i,u)}}function fS(i){var a=i.alternate;a!==null&&(i.alternate=null,fS(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&Sp(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 qt=null,ur=!1;function rs(i,a,u){for(u=u.child;u!==null;)dS(i,a,u),u=u.sibling}function dS(i,a,u){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(on,u)}catch{}switch(u.tag){case 26:fn||Ci(u,a),rs(i,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:fn||Ci(u,a);var h=qt,y=ur;zs(u.type)&&(qt=u.stateNode,ur=!1),rs(i,a,u),sc(u.stateNode),qt=h,ur=y;break;case 5:fn||Ci(u,a);case 6:if(h=qt,y=ur,qt=null,rs(i,a,u),qt=h,ur=y,qt!==null)if(ur)try{(qt.nodeType===9?qt.body:qt.nodeName==="HTML"?qt.ownerDocument.body:qt).removeChild(u.stateNode)}catch(T){Rt(u,a,T)}else try{qt.removeChild(u.stateNode)}catch(T){Rt(u,a,T)}break;case 18:qt!==null&&(ur?(i=qt,i2(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),yl(i)):i2(qt,u.stateNode));break;case 4:h=qt,y=ur,qt=u.stateNode.containerInfo,ur=!0,rs(i,a,u),qt=h,ur=y;break;case 0:case 11:case 14:case 15:Ls(2,u,a),fn||Ls(4,u,a),rs(i,a,u);break;case 1:fn||(Ci(u,a),h=u.stateNode,typeof h.componentWillUnmount=="function"&&sS(u,a,h)),rs(i,a,u);break;case 21:rs(i,a,u);break;case 22:fn=(h=fn)||u.memoizedState!==null,rs(i,a,u),fn=h;break;default:rs(i,a,u)}}function hS(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{yl(i)}catch(u){Rt(a,a.return,u)}}}function mS(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{yl(i)}catch(u){Rt(a,a.return,u)}}function D5(i){switch(i.tag){case 31:case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new uS),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new uS),a;default:throw Error(r(435,i.tag))}}function Rd(i,a){var u=D5(i);a.forEach(function(h){if(!u.has(h)){u.add(h);var y=U5.bind(null,i,h);h.then(y,y)}})}function cr(i,a){var u=a.deletions;if(u!==null)for(var h=0;h<u.length;h++){var y=u[h],T=i,_=a,M=_;e:for(;M!==null;){switch(M.tag){case 27:if(zs(M.type)){qt=M.stateNode,ur=!1;break e}break;case 5:qt=M.stateNode,ur=!1;break e;case 3:case 4:qt=M.stateNode.containerInfo,ur=!0;break e}M=M.return}if(qt===null)throw Error(r(160));dS(T,_,y),qt=null,ur=!1,T=y.alternate,T!==null&&(T.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)pS(a,i),a=a.sibling}var ri=null;function pS(i,a){var u=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:cr(a,i),fr(i),h&4&&(Ls(3,i,i.return),Qu(3,i),Ls(5,i,i.return));break;case 1:cr(a,i),fr(i),h&512&&(fn||u===null||Ci(u,u.return)),h&64&&ns&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var y=ri;if(cr(a,i),fr(i),h&512&&(fn||u===null||Ci(u,u.return)),h&4){var T=u!==null?u.memoizedState:null;if(h=i.memoizedState,u===null)if(h===null)if(i.stateNode===null){e:{h=i.type,u=i.memoizedProps,y=y.ownerDocument||y;t:switch(h){case"title":T=y.getElementsByTagName("title")[0],(!T||T[Su]||T[Dn]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=y.createElement(h),y.head.insertBefore(T,y.querySelector("head > title"))),Ln(T,h,u),T[Dn]=i,Sn(T),h=T;break e;case"link":var _=p2("link","href",y).get(h+(u.href||""));if(_){for(var M=0;M<_.length;M++)if(T=_[M],T.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&T.getAttribute("rel")===(u.rel==null?null:u.rel)&&T.getAttribute("title")===(u.title==null?null:u.title)&&T.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){_.splice(M,1);break t}}T=y.createElement(h),Ln(T,h,u),y.head.appendChild(T);break;case"meta":if(_=p2("meta","content",y).get(h+(u.content||""))){for(M=0;M<_.length;M++)if(T=_[M],T.getAttribute("content")===(u.content==null?null:""+u.content)&&T.getAttribute("name")===(u.name==null?null:u.name)&&T.getAttribute("property")===(u.property==null?null:u.property)&&T.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&T.getAttribute("charset")===(u.charSet==null?null:u.charSet)){_.splice(M,1);break t}}T=y.createElement(h),Ln(T,h,u),y.head.appendChild(T);break;default:throw Error(r(468,h))}T[Dn]=i,Sn(T),h=T}i.stateNode=h}else g2(y,i.type,i.stateNode);else i.stateNode=m2(y,h,i.memoizedProps);else T!==h?(T===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):T.count--,h===null?g2(y,i.type,i.stateNode):m2(y,h,i.memoizedProps)):h===null&&i.stateNode!==null&&q0(i,i.memoizedProps,u.memoizedProps)}break;case 27:cr(a,i),fr(i),h&512&&(fn||u===null||Ci(u,u.return)),u!==null&&h&4&&q0(i,i.memoizedProps,u.memoizedProps);break;case 5:if(cr(a,i),fr(i),h&512&&(fn||u===null||Ci(u,u.return)),i.flags&32){y=i.stateNode;try{Ho(y,"")}catch(De){Rt(i,i.return,De)}}h&4&&i.stateNode!=null&&(y=i.memoizedProps,q0(i,y,u!==null?u.memoizedProps:y)),h&1024&&(G0=!0);break;case 6:if(cr(a,i),fr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,u=i.stateNode;try{u.nodeValue=h}catch(De){Rt(i,i.return,De)}}break;case 3:if(Yd=null,y=ri,ri=qd(a.containerInfo),cr(a,i),ri=y,fr(i),h&4&&u!==null&&u.memoizedState.isDehydrated)try{yl(a.containerInfo)}catch(De){Rt(i,i.return,De)}G0&&(G0=!1,gS(i));break;case 4:h=ri,ri=qd(i.stateNode.containerInfo),cr(a,i),fr(i),ri=h;break;case 12:cr(a,i),fr(i);break;case 31:cr(a,i),fr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Rd(i,h)));break;case 13:cr(a,i),fr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Od=rt()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Rd(i,h)));break;case 22:y=i.memoizedState!==null;var G=u!==null&&u.memoizedState!==null,ae=ns,fe=fn;if(ns=ae||y,fn=fe||G,cr(a,i),fn=fe,ns=ae,fr(i),h&8192)e:for(a=i.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(u===null||G||ns||fn||$a(i)),u=null,a=i;;){if(a.tag===5||a.tag===26){if(u===null){G=u=a;try{if(T=G.stateNode,y)_=T.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{M=G.stateNode;var pe=G.memoizedProps.style,oe=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;M.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(De){Rt(G,G.return,De)}}}else if(a.tag===6){if(u===null){G=a;try{G.stateNode.nodeValue=y?"":G.memoizedProps}catch(De){Rt(G,G.return,De)}}}else if(a.tag===18){if(u===null){G=a;try{var le=G.stateNode;y?s2(le,!0):s2(G.stateNode,!1)}catch(De){Rt(G,G.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;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}h&4&&(h=i.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,Rd(i,u))));break;case 19:cr(a,i),fr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Rd(i,h)));break;case 30:break;case 21:break;default:cr(a,i),fr(i)}}function fr(i){var a=i.flags;if(a&2){try{for(var u,h=i.return;h!==null;){if(oS(h)){u=h;break}h=h.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var y=u.stateNode,T=$0(i);Nd(i,T,y);break;case 5:var _=u.stateNode;u.flags&32&&(Ho(_,""),u.flags&=-33);var M=$0(i);Nd(i,M,_);break;case 3:case 4:var G=u.stateNode.containerInfo,ae=$0(i);Y0(i,ae,G);break;default:throw Error(r(161))}}catch(fe){Rt(i,i.return,fe)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function gS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;gS(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function is(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)cS(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:Ls(4,a,a.return),$a(a);break;case 1:Ci(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&sS(a,a.return,u),$a(a);break;case 27:sc(a.stateNode);case 26:case 5:Ci(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 ss(i,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var h=a.alternate,y=i,T=a,_=T.flags;switch(T.tag){case 0:case 11:case 15:ss(y,T,u),Qu(4,T);break;case 1:if(ss(y,T,u),h=T,y=h.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(ae){Rt(h,h.return,ae)}if(h=T,y=h.updateQueue,y!==null){var M=h.stateNode;try{var G=y.shared.hiddenCallbacks;if(G!==null)for(y.shared.hiddenCallbacks=null,y=0;y<G.length;y++)GT(G[y],M)}catch(ae){Rt(h,h.return,ae)}}u&&_&64&&iS(T),Xu(T,T.return);break;case 27:lS(T);case 26:case 5:ss(y,T,u),u&&h===null&&_&4&&aS(T),Xu(T,T.return);break;case 12:ss(y,T,u);break;case 31:ss(y,T,u),u&&_&4&&hS(y,T);break;case 13:ss(y,T,u),u&&_&4&&mS(y,T);break;case 22:T.memoizedState===null&&ss(y,T,u),Xu(T,T.return);break;case 30:break;default:ss(y,T,u)}a=a.sibling}}function K0(i,a){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&Pu(u))}function Q0(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Pu(i))}function ii(i,a,u,h){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)bS(i,a,u,h),a=a.sibling}function bS(i,a,u,h){var y=a.flags;switch(a.tag){case 0:case 11:case 15:ii(i,a,u,h),y&2048&&Qu(9,a);break;case 1:ii(i,a,u,h);break;case 3:ii(i,a,u,h),y&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Pu(i)));break;case 12:if(y&2048){ii(i,a,u,h),i=a.stateNode;try{var T=a.memoizedProps,_=T.id,M=T.onPostCommit;typeof M=="function"&&M(_,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(G){Rt(a,a.return,G)}}else ii(i,a,u,h);break;case 31:ii(i,a,u,h);break;case 13:ii(i,a,u,h);break;case 23:break;case 22:T=a.stateNode,_=a.alternate,a.memoizedState!==null?T._visibility&2?ii(i,a,u,h):Wu(i,a):T._visibility&2?ii(i,a,u,h):(T._visibility|=2,ol(i,a,u,h,(a.subtreeFlags&10256)!==0||!1)),y&2048&&K0(_,a);break;case 24:ii(i,a,u,h),y&2048&&Q0(a.alternate,a);break;default:ii(i,a,u,h)}}function ol(i,a,u,h,y){for(y=y&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var T=i,_=a,M=u,G=h,ae=_.flags;switch(_.tag){case 0:case 11:case 15:ol(T,_,M,G,y),Qu(8,_);break;case 23:break;case 22:var fe=_.stateNode;_.memoizedState!==null?fe._visibility&2?ol(T,_,M,G,y):Wu(T,_):(fe._visibility|=2,ol(T,_,M,G,y)),y&&ae&2048&&K0(_.alternate,_);break;case 24:ol(T,_,M,G,y),y&&ae&2048&&Q0(_.alternate,_);break;default:ol(T,_,M,G,y)}a=a.sibling}}function Wu(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=i,h=a,y=h.flags;switch(h.tag){case 22:Wu(u,h),y&2048&&K0(h.alternate,h);break;case 24:Wu(u,h),y&2048&&Q0(h.alternate,h);break;default:Wu(u,h)}a=a.sibling}}var Zu=8192;function ll(i,a,u){if(i.subtreeFlags&Zu)for(i=i.child;i!==null;)yS(i,a,u),i=i.sibling}function yS(i,a,u){switch(i.tag){case 26:ll(i,a,u),i.flags&Zu&&i.memoizedState!==null&&bL(u,ri,i.memoizedState,i.memoizedProps);break;case 5:ll(i,a,u);break;case 3:case 4:var h=ri;ri=qd(i.stateNode.containerInfo),ll(i,a,u),ri=h;break;case 22:i.memoizedState===null&&(h=i.alternate,h!==null&&h.memoizedState!==null?(h=Zu,Zu=16777216,ll(i,a,u),Zu=h):ll(i,a,u));break;default:ll(i,a,u)}}function xS(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 Ju(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];Cn=h,TS(h,i)}xS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)ES(i),i=i.sibling}function ES(i){switch(i.tag){case 0:case 11:case 15:Ju(i),i.flags&2048&&Ls(9,i,i.return);break;case 3:Ju(i);break;case 12:Ju(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,Dd(i)):Ju(i);break;default:Ju(i)}}function Dd(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];Cn=h,TS(h,i)}xS(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:Ls(8,a,a.return),Dd(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,Dd(a));break;default:Dd(a)}i=i.sibling}}function TS(i,a){for(;Cn!==null;){var u=Cn;switch(u.tag){case 0:case 11:case 15:Ls(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Pu(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,Cn=h;else e:for(u=i;Cn!==null;){h=Cn;var y=h.sibling,T=h.return;if(fS(h),h===u){Cn=null;break e}if(y!==null){y.return=T,Cn=y;break e}Cn=T}}}var O5={getCacheForType:function(i){var a=Mn(ln),u=a.data.get(i);return u===void 0&&(u=i(),a.data.set(i,u)),u},cacheSignal:function(){return Mn(ln).controller.signal}},M5=typeof WeakMap=="function"?WeakMap:Map,St=0,Pt=null,ot=null,ct=0,Nt=0,Sr=null,Ps=!1,ul=!1,X0=!1,as=0,Wt=0,js=0,Ya=0,W0=0,Cr=0,cl=0,ec=null,dr=null,Z0=!1,Od=0,vS=0,Md=1/0,Id=null,Bs=null,pn=0,Fs=null,fl=null,os=0,J0=0,eg=null,SS=null,tc=0,tg=null;function wr(){return(St&2)!==0&&ct!==0?ct&-ct:D.T!==null?og():FE()}function CS(){if(Cr===0)if((ct&536870912)===0||pt){var i=mt;mt<<=1,(mt&3932160)===0&&(mt=262144),Cr=i}else Cr=536870912;return i=Tr.current,i!==null&&(i.flags|=32),Cr}function hr(i,a,u){(i===Pt&&(Nt===2||Nt===9)||i.cancelPendingCommit!==null)&&(dl(i,0),Us(i,ct,Cr,!1)),ar(i,u),((St&2)===0||i!==Pt)&&(i===Pt&&((St&2)===0&&(Ya|=u),Wt===4&&Us(i,ct,Cr,!1)),wi(i))}function wS(i,a,u){if((St&6)!==0)throw Error(r(327));var h=!u&&(a&127)===0&&(a&i.expiredLanes)===0||Ut(i,a),y=h?P5(i,a):rg(i,a,!0),T=h;do{if(y===0){ul&&!h&&Us(i,a,0,!1);break}else{if(u=i.current.alternate,T&&!I5(u)){y=rg(i,a,!1),T=!1;continue}if(y===2){if(T=a,i.errorRecoveryDisabledLanes&T)var _=0;else _=i.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){a=_;e:{var M=i;y=ec;var G=M.current.memoizedState.isDehydrated;if(G&&(dl(M,_).flags|=256),_=rg(M,_,!1),_!==2){if(X0&&!G){M.errorRecoveryDisabledLanes|=T,Ya|=T,y=4;break e}T=dr,dr=y,T!==null&&(dr===null?dr=T:dr.push.apply(dr,T))}y=_}if(T=!1,y!==2)continue}}if(y===1){dl(i,0),Us(i,a,0,!0);break}e:{switch(h=i,T=y,T){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Us(h,a,Cr,!Ps);break e;case 2:dr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(y=Od+300-rt(),10<y)){if(Us(h,a,Cr,!Ps),kt(h,0,!0)!==0)break e;os=a,h.timeoutHandle=n2(AS.bind(null,h,u,dr,Id,Z0,a,Cr,Ya,cl,Ps,T,"Throttled",-0,0),y);break e}AS(h,u,dr,Id,Z0,a,Cr,Ya,cl,Ps,T,null,-0,0)}}break}while(!0);wi(i)}function AS(i,a,u,h,y,T,_,M,G,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:Yi},yS(a,T,pe);var De=(T&62914560)===T?Od-rt():(T&4194048)===T?vS-rt():0;if(De=yL(pe,De),De!==null){os=T,i.cancelPendingCommit=De(IS.bind(null,i,a,T,u,h,y,_,M,G,fe,pe,null,oe,le)),Us(i,T,_,!ae);return}}IS(i,a,T,u,h,y,_,M,G)}function I5(i){for(var a=i;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var y=u[h],T=y.getSnapshot;y=y.value;try{if(!xr(T(),y))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;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 Us(i,a,u,h){a&=~W0,a&=~Ya,i.suspendedLanes|=a,i.pingedLanes&=~a,h&&(i.warmLanes|=a),h=i.expirationTimes;for(var y=a;0<y;){var T=31-vt(y),_=1<<T;h[T]=-1,y&=~_}u!==0&&Na(i,u,a)}function Ld(){return(St&6)===0?(nc(0),!1):!0}function ng(){if(ot!==null){if(Nt===0)var i=ot.return;else i=ot,Xi=ja=null,y0(i),nl=null,Bu=0,i=ot;for(;i!==null;)rS(i.alternate,i),i=i.return;ot=null}}function dl(i,a){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,eL(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),os=0,ng(),Pt=i,ot=u=Ki(i.current,null),ct=a,Nt=0,Sr=null,Ps=!1,ul=Ut(i,a),X0=!1,cl=Cr=W0=Ya=js=Wt=0,dr=ec=null,Z0=!1,(a&8)!==0&&(a|=a&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=a;0<h;){var y=31-vt(h),T=1<<y;a|=i[y],h&=~T}return as=a,nd(),u}function _S(i,a){Xe=null,D.H=Yu,a===tl||a===cd?(a=VT(),Nt=3):a===a0?(a=VT(),Nt=4):Nt=a===I0?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Sr=a,ot===null&&(Wt=1,Cd(i,Pr(a,i.current)))}function kS(){var i=Tr.current;return i===null?!0:(ct&4194048)===ct?Ur===null:(ct&62914560)===ct||(ct&536870912)!==0?i===Ur:!1}function NS(){var i=D.H;return D.H=Yu,i===null?Yu:i}function RS(){var i=D.A;return D.A=O5,i}function Pd(){Wt=4,Ps||(ct&4194048)!==ct&&Tr.current!==null||(ul=!0),(js&134217727)===0&&(Ya&134217727)===0||Pt===null||Us(Pt,ct,Cr,!1)}function rg(i,a,u){var h=St;St|=2;var y=NS(),T=RS();(Pt!==i||ct!==a)&&(Id=null,dl(i,a)),a=!1;var _=Wt;e:do try{if(Nt!==0&&ot!==null){var M=ot,G=Sr;switch(Nt){case 8:ng(),_=6;break e;case 3:case 2:case 9:case 6:Tr.current===null&&(a=!0);var ae=Nt;if(Nt=0,Sr=null,hl(i,M,G,ae),u&&ul){_=0;break e}break;default:ae=Nt,Nt=0,Sr=null,hl(i,M,G,ae)}}L5(),_=Wt;break}catch(fe){_S(i,fe)}while(!0);return a&&i.shellSuspendCounter++,Xi=ja=null,St=h,D.H=y,D.A=T,ot===null&&(Pt=null,ct=0,nd()),_}function L5(){for(;ot!==null;)DS(ot)}function P5(i,a){var u=St;St|=2;var h=NS(),y=RS();Pt!==i||ct!==a?(Id=null,Md=rt()+500,dl(i,a)):ul=Ut(i,a);e:do try{if(Nt!==0&&ot!==null){a=ot;var T=Sr;t:switch(Nt){case 1:Nt=0,Sr=null,hl(i,a,T,1);break;case 2:case 9:if(HT(T)){Nt=0,Sr=null,OS(a);break}a=function(){Nt!==2&&Nt!==9||Pt!==i||(Nt=7),wi(i)},T.then(a,a);break e;case 3:Nt=7;break e;case 4:Nt=5;break e;case 7:HT(T)?(Nt=0,Sr=null,OS(a)):(Nt=0,Sr=null,hl(i,a,T,7));break;case 5:var _=null;switch(ot.tag){case 26:_=ot.memoizedState;case 5:case 27:var M=ot;if(_?b2(_):M.stateNode.complete){Nt=0,Sr=null;var G=M.sibling;if(G!==null)ot=G;else{var ae=M.return;ae!==null?(ot=ae,jd(ae)):ot=null}break t}}Nt=0,Sr=null,hl(i,a,T,5);break;case 6:Nt=0,Sr=null,hl(i,a,T,6);break;case 8:ng(),Wt=6;break e;default:throw Error(r(462))}}j5();break}catch(fe){_S(i,fe)}while(!0);return Xi=ja=null,D.H=h,D.A=y,St=u,ot!==null?0:(Pt=null,ct=0,nd(),Wt)}function j5(){for(;ot!==null&&!Jr();)DS(ot)}function DS(i){var a=tS(i.alternate,i,as);i.memoizedProps=i.pendingProps,a===null?jd(i):ot=a}function OS(i){var a=i,u=a.alternate;switch(a.tag){case 15:case 0:a=Qv(u,a,a.pendingProps,a.type,void 0,ct);break;case 11:a=Qv(u,a,a.pendingProps,a.type.render,a.ref,ct);break;case 5:y0(a);default:rS(u,a),a=ot=RT(a,as),a=tS(u,a,as)}i.memoizedProps=i.pendingProps,a===null?jd(i):ot=a}function hl(i,a,u,h){Xi=ja=null,y0(a),nl=null,Bu=0;var y=a.return;try{if(w5(i,y,a,u,ct)){Wt=1,Cd(i,Pr(u,i.current)),ot=null;return}}catch(T){if(y!==null)throw ot=y,T;Wt=1,Cd(i,Pr(u,i.current)),ot=null;return}a.flags&32768?(pt||h===1?i=!0:ul||(ct&536870912)!==0?i=!1:(Ps=i=!0,(h===2||h===9||h===3||h===6)&&(h=Tr.current,h!==null&&h.tag===13&&(h.flags|=16384))),MS(a,i)):jd(a)}function jd(i){var a=i;do{if((a.flags&32768)!==0){MS(a,Ps);return}i=a.return;var u=k5(a.alternate,a,as);if(u!==null){ot=u;return}if(a=a.sibling,a!==null){ot=a;return}ot=a=i}while(a!==null);Wt===0&&(Wt=5)}function MS(i,a){do{var u=N5(i.alternate,i);if(u!==null){u.flags&=32767,ot=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(i=i.sibling,i!==null)){ot=i;return}ot=i=u}while(i!==null);Wt=6,ot=null}function IS(i,a,u,h,y,T,_,M,G){i.cancelPendingCommit=null;do Bd();while(pn!==0);if((St&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(T=a.lanes|a.childLanes,T|=$p,Or(i,u,T,_,M,G),i===Pt&&(ot=Pt=null,ct=0),fl=a,Fs=i,os=u,J0=T,eg=y,SS=h,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,H5(Fe,function(){return FS(),null})):(i.callbackNode=null,i.callbackPriority=0),h=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||h){h=D.T,D.T=null,y=H.p,H.p=2,_=St,St|=4;try{R5(i,a,u)}finally{St=_,H.p=y,D.T=h}}pn=1,LS(),PS(),jS()}}function LS(){if(pn===1){pn=0;var i=Fs,a=fl,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=D.T,D.T=null;var h=H.p;H.p=2;var y=St;St|=4;try{pS(a,i);var T=pg,_=TT(i.containerInfo),M=T.focusedElem,G=T.selectionRange;if(_!==M&&M&&M.ownerDocument&&ET(M.ownerDocument.documentElement,M)){if(G!==null&&Up(M)){var ae=G.start,fe=G.end;if(fe===void 0&&(fe=ae),"selectionStart"in M)M.selectionStart=ae,M.selectionEnd=Math.min(fe,M.value.length);else{var pe=M.ownerDocument||document,oe=pe&&pe.defaultView||window;if(oe.getSelection){var le=oe.getSelection(),De=M.textContent.length,qe=Math.min(G.start,De),Mt=G.end===void 0?qe:Math.min(G.end,De);!le.extend&&qe>Mt&&(_=Mt,Mt=qe,qe=_);var J=xT(M,qe),W=xT(M,Mt);if(J&&W&&(le.rangeCount!==1||le.anchorNode!==J.node||le.anchorOffset!==J.offset||le.focusNode!==W.node||le.focusOffset!==W.offset)){var se=pe.createRange();se.setStart(J.node,J.offset),le.removeAllRanges(),qe>Mt?(le.addRange(se),le.extend(W.node,W.offset)):(se.setEnd(W.node,W.offset),le.addRange(se))}}}}for(pe=[],le=M;le=le.parentNode;)le.nodeType===1&&pe.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<pe.length;M++){var me=pe[M];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}Xd=!!mg,pg=mg=null}finally{St=y,H.p=h,D.T=u}}i.current=a,pn=2}}function PS(){if(pn===2){pn=0;var i=Fs,a=fl,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=D.T,D.T=null;var h=H.p;H.p=2;var y=St;St|=4;try{cS(i,a.alternate,a)}finally{St=y,H.p=h,D.T=u}}pn=3}}function jS(){if(pn===4||pn===3){pn=0,ei();var i=Fs,a=fl,u=os,h=SS;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?pn=5:(pn=0,fl=Fs=null,BS(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(Bs=null),Tp(u),a=a.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(on,a,void 0,(a.current.flags&128)===128)}catch{}if(h!==null){a=D.T,y=H.p,H.p=2,D.T=null;try{for(var T=i.onRecoverableError,_=0;_<h.length;_++){var M=h[_];T(M.value,{componentStack:M.stack})}}finally{D.T=a,H.p=y}}(os&3)!==0&&Bd(),wi(i),y=i.pendingLanes,(u&261930)!==0&&(y&42)!==0?i===tg?tc++:(tc=0,tg=i):tc=0,nc(0)}}function BS(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,Pu(a)))}function Bd(){return LS(),PS(),jS(),FS()}function FS(){if(pn!==5)return!1;var i=Fs,a=J0;J0=0;var u=Tp(os),h=D.T,y=H.p;try{H.p=32>u?32:u,D.T=null,u=eg,eg=null;var T=Fs,_=os;if(pn=0,fl=Fs=null,os=0,(St&6)!==0)throw Error(r(331));var M=St;if(St|=4,ES(T.current),bS(T,T.current,_,u),St=M,nc(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(on,T)}catch{}return!0}finally{H.p=y,D.T=h,BS(i,a)}}function US(i,a,u){a=Pr(u,a),a=M0(i.stateNode,a,2),i=Os(i,a,2),i!==null&&(ar(i,2),wi(i))}function Rt(i,a,u){if(i.tag===3)US(i,i,u);else for(;a!==null;){if(a.tag===3){US(a,i,u);break}else if(a.tag===1){var h=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Bs===null||!Bs.has(h))){i=Pr(u,i),u=Hv(2),h=Os(a,u,2),h!==null&&(zv(u,h,a,i),ar(h,2),wi(h));break}}a=a.return}}function ig(i,a,u){var h=i.pingCache;if(h===null){h=i.pingCache=new M5;var y=new Set;h.set(a,y)}else y=h.get(a),y===void 0&&(y=new Set,h.set(a,y));y.has(u)||(X0=!0,y.add(u),i=B5.bind(null,i,a,u),a.then(i,i))}function B5(i,a,u){var h=i.pingCache;h!==null&&h.delete(a),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,Pt===i&&(ct&u)===u&&(Wt===4||Wt===3&&(ct&62914560)===ct&&300>rt()-Od?(St&2)===0&&dl(i,0):W0|=u,cl===ct&&(cl=0)),wi(i)}function HS(i,a){a===0&&(a=sr()),i=Ia(i,a),i!==null&&(ar(i,a),wi(i))}function F5(i){var a=i.memoizedState,u=0;a!==null&&(u=a.retryLane),HS(i,u)}function U5(i,a){var u=0;switch(i.tag){case 31:case 13:var h=i.stateNode,y=i.memoizedState;y!==null&&(u=y.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),HS(i,u)}function H5(i,a){return Tn(i,a)}var Fd=null,ml=null,sg=!1,Ud=!1,ag=!1,Hs=0;function wi(i){i!==ml&&i.next===null&&(ml===null?Fd=ml=i:ml=ml.next=i),Ud=!0,sg||(sg=!0,V5())}function nc(i,a){if(!ag&&Ud){ag=!0;do for(var u=!1,h=Fd;h!==null;){if(i!==0){var y=h.pendingLanes;if(y===0)var T=0;else{var _=h.suspendedLanes,M=h.pingedLanes;T=(1<<31-vt(42|i)+1)-1,T&=y&~(_&~M),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(u=!0,$S(h,T))}else T=ct,T=kt(h,h===Pt?T:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(T&3)===0||Ut(h,T)||(u=!0,$S(h,T));h=h.next}while(u);ag=!1}}function z5(){zS()}function zS(){Ud=sg=!1;var i=0;Hs!==0&&J5()&&(i=Hs);for(var a=rt(),u=null,h=Fd;h!==null;){var y=h.next,T=VS(h,a);T===0?(h.next=null,u===null?Fd=y:u.next=y,y===null&&(ml=u)):(u=h,(i!==0||(T&3)!==0)&&(Ud=!0)),h=y}pn!==0&&pn!==5||nc(i),Hs!==0&&(Hs=0)}function VS(i,a){for(var u=i.suspendedLanes,h=i.pingedLanes,y=i.expirationTimes,T=i.pendingLanes&-62914561;0<T;){var _=31-vt(T),M=1<<_,G=y[_];G===-1?((M&u)===0||(M&h)!==0)&&(y[_]=Ti(M,a)):G<=a&&(i.expiredLanes|=M),T&=~M}if(a=Pt,u=ct,u=kt(i,i===a?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h=i.callbackNode,u===0||i===a&&(Nt===2||Nt===9)||i.cancelPendingCommit!==null)return h!==null&&h!==null&&Ei(h),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||Ut(i,u)){if(a=u&-u,a===i.callbackPriority)return a;switch(h!==null&&Ei(h),Tp(u)){case 2:case 8:u=ve;break;case 32:u=Fe;break;case 268435456:u=ht;break;default:u=Fe}return h=qS.bind(null,i),u=Tn(u,h),i.callbackPriority=a,i.callbackNode=u,a}return h!==null&&h!==null&&Ei(h),i.callbackPriority=2,i.callbackNode=null,2}function qS(i,a){if(pn!==0&&pn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(Bd()&&i.callbackNode!==u)return null;var h=ct;return h=kt(i,i===Pt?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h===0?null:(wS(i,h,a),VS(i,rt()),i.callbackNode!=null&&i.callbackNode===u?qS.bind(null,i):null)}function $S(i,a){if(Bd())return null;wS(i,a,!0)}function V5(){tL(function(){(St&6)!==0?Tn(ce,z5):zS()})}function og(){if(Hs===0){var i=Jo;i===0&&(i=Ve,Ve<<=1,(Ve&261888)===0&&(Ve=256)),Hs=i}return Hs}function YS(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Kf(""+i)}function GS(i,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,i.id&&u.setAttribute("form",i.id),a.parentNode.insertBefore(u,a),i=new FormData(i),u.parentNode.removeChild(u),i}function q5(i,a,u,h,y){if(a==="submit"&&u&&u.stateNode===y){var T=YS((y[or]||null).action),_=h.submitter;_&&(a=(a=_[or]||null)?YS(a.formAction):_.getAttribute("formAction"),a!==null&&(T=a,_=null));var M=new Zf("action","action",null,h,y);i.push({event:M,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(Hs!==0){var G=_?GS(y,_):new FormData(y);_0(u,{pending:!0,data:G,method:y.method,action:T},null,G)}}else typeof T=="function"&&(M.preventDefault(),G=_?GS(y,_):new FormData(y),_0(u,{pending:!0,data:G,method:y.method,action:T},T,G))},currentTarget:y}]})}}for(var lg=0;lg<qp.length;lg++){var ug=qp[lg],$5=ug.toLowerCase(),Y5=ug[0].toUpperCase()+ug.slice(1);ni($5,"on"+Y5)}ni(CT,"onAnimationEnd"),ni(wT,"onAnimationIteration"),ni(AT,"onAnimationStart"),ni("dblclick","onDoubleClick"),ni("focusin","onFocus"),ni("focusout","onBlur"),ni(l5,"onTransitionRun"),ni(u5,"onTransitionStart"),ni(c5,"onTransitionCancel"),ni(_T,"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 rc="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(" "),G5=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(rc));function KS(i,a){a=(a&4)!==0;for(var u=0;u<i.length;u++){var h=i[u],y=h.event;h=h.listeners;e:{var T=void 0;if(a)for(var _=h.length-1;0<=_;_--){var M=h[_],G=M.instance,ae=M.currentTarget;if(M=M.listener,G!==T&&y.isPropagationStopped())break e;T=M,y.currentTarget=ae;try{T(y)}catch(fe){td(fe)}y.currentTarget=null,T=G}else for(_=0;_<h.length;_++){if(M=h[_],G=M.instance,ae=M.currentTarget,M=M.listener,G!==T&&y.isPropagationStopped())break e;T=M,y.currentTarget=ae;try{T(y)}catch(fe){td(fe)}y.currentTarget=null,T=G}}}}function lt(i,a){var u=a[vp];u===void 0&&(u=a[vp]=new Set);var h=i+"__bubble";u.has(h)||(QS(a,i,2,!1),u.add(h))}function cg(i,a,u){var h=0;a&&(h|=4),QS(u,i,h,a)}var Hd="_reactListening"+Math.random().toString(36).slice(2);function fg(i){if(!i[Hd]){i[Hd]=!0,zE.forEach(function(u){u!=="selectionchange"&&(G5.has(u)||cg(u,!1,i),cg(u,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[Hd]||(a[Hd]=!0,cg("selectionchange",!1,a))}}function QS(i,a,u,h){switch(C2(a)){case 2:var y=TL;break;case 8:y=vL;break;default:y=Ag}u=y.bind(null,a,u,i),y=void 0,!Dp||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),h?y!==void 0?i.addEventListener(a,u,{capture:!0,passive:y}):i.addEventListener(a,u,!0):y!==void 0?i.addEventListener(a,u,{passive:y}):i.addEventListener(a,u,!1)}function dg(i,a,u,h,y){var T=h;if((a&1)===0&&(a&2)===0&&h!==null)e:for(;;){if(h===null)return;var _=h.tag;if(_===3||_===4){var M=h.stateNode.containerInfo;if(M===y)break;if(_===4)for(_=h.return;_!==null;){var G=_.tag;if((G===3||G===4)&&_.stateNode.containerInfo===y)return;_=_.return}for(;M!==null;){if(_=Po(M),_===null)return;if(G=_.tag,G===5||G===6||G===26||G===27){h=T=_;continue e}M=M.parentNode}}h=h.return}eT(function(){var ae=T,fe=Np(u),pe=[];e:{var oe=kT.get(i);if(oe!==void 0){var le=Zf,De=i;switch(i){case"keypress":if(Xf(u)===0)break e;case"keydown":case"keyup":le=U4;break;case"focusin":De="focus",le=Lp;break;case"focusout":De="blur",le=Lp;break;case"beforeblur":case"afterblur":le=Lp;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=rT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=k4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=V4;break;case CT:case wT:case AT:le=D4;break;case _T:le=$4;break;case"scroll":case"scrollend":le=A4;break;case"wheel":le=G4;break;case"copy":case"cut":case"paste":le=M4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=sT;break;case"toggle":case"beforetoggle":le=Q4}var qe=(a&4)!==0,Mt=!qe&&(i==="scroll"||i==="scrollend"),J=qe?oe!==null?oe+"Capture":null:oe;qe=[];for(var W=ae,se;W!==null;){var me=W;if(se=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||se===null||J===null||(me=wu(W,J),me!=null&&qe.push(ic(W,me,se))),Mt)break;W=W.return}0<qe.length&&(oe=new le(oe,De,null,u,fe),pe.push({event:oe,listeners:qe}))}}if((a&7)===0){e:{if(oe=i==="mouseover"||i==="pointerover",le=i==="mouseout"||i==="pointerout",oe&&u!==kp&&(De=u.relatedTarget||u.fromElement)&&(Po(De)||De[Lo]))break e;if((le||oe)&&(oe=fe.window===fe?fe:(oe=fe.ownerDocument)?oe.defaultView||oe.parentWindow:window,le?(De=u.relatedTarget||u.toElement,le=ae,De=De?Po(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=rT,me="onMouseLeave",J="onMouseEnter",W="mouse",(i==="pointerout"||i==="pointerover")&&(qe=sT,me="onPointerLeave",J="onPointerEnter",W="pointer"),Mt=le==null?oe:Cu(le),se=De==null?oe:Cu(De),oe=new qe(me,W+"leave",le,u,fe),oe.target=Mt,oe.relatedTarget=se,me=null,Po(fe)===ae&&(qe=new qe(J,W+"enter",De,u,fe),qe.target=se,qe.relatedTarget=Mt,me=qe),Mt=me,le&&De)t:{for(qe=K5,J=le,W=De,se=0,me=J;me;me=qe(me))se++;me=0;for(var Ue=W;Ue;Ue=qe(Ue))me++;for(;0<se-me;)J=qe(J),se--;for(;0<me-se;)W=qe(W),me--;for(;se--;){if(J===W||W!==null&&J===W.alternate){qe=J;break t}J=qe(J),W=qe(W)}qe=null}else qe=null;le!==null&&XS(pe,oe,le,qe,!1),De!==null&&Mt!==null&&XS(pe,Mt,De,qe,!0)}}e:{if(oe=ae?Cu(ae):window,le=oe.nodeName&&oe.nodeName.toLowerCase(),le==="select"||le==="input"&&oe.type==="file")var xt=hT;else if(fT(oe))if(mT)xt=s5;else{xt=r5;var Le=n5}else le=oe.nodeName,!le||le.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ae&&_p(ae.elementType)&&(xt=hT):xt=i5;if(xt&&(xt=xt(i,ae))){dT(pe,xt,u,fe);break e}Le&&Le(i,oe,ae),i==="focusout"&&ae&&oe.type==="number"&&ae.memoizedProps.value!=null&&Ap(oe,"number",oe.value)}switch(Le=ae?Cu(ae):window,i){case"focusin":(fT(Le)||Le.contentEditable==="true")&&($o=Le,Hp=ae,Mu=null);break;case"focusout":Mu=Hp=$o=null;break;case"mousedown":zp=!0;break;case"contextmenu":case"mouseup":case"dragend":zp=!1,vT(pe,u,fe);break;case"selectionchange":if(o5)break;case"keydown":case"keyup":vT(pe,u,fe)}var Je;if(jp)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 qo?uT(i,u)&&(ft="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(ft="onCompositionStart");ft&&(aT&&u.locale!=="ko"&&(qo||ft!=="onCompositionStart"?ft==="onCompositionEnd"&&qo&&(Je=tT()):(ws=fe,Op="value"in ws?ws.value:ws.textContent,qo=!0)),Le=zd(ae,ft),0<Le.length&&(ft=new iT(ft,i,null,u,fe),pe.push({event:ft,listeners:Le}),Je?ft.data=Je:(Je=cT(u),Je!==null&&(ft.data=Je)))),(Je=W4?Z4(i,u):J4(i,u))&&(ft=zd(ae,"onBeforeInput"),0<ft.length&&(Le=new iT("onBeforeInput","beforeinput",null,u,fe),pe.push({event:Le,listeners:ft}),Le.data=Je)),q5(pe,i,ae,u,fe)}KS(pe,a)})}function ic(i,a,u){return{instance:i,listener:a,currentTarget:u}}function zd(i,a){for(var u=a+"Capture",h=[];i!==null;){var y=i,T=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||T===null||(y=wu(i,u),y!=null&&h.unshift(ic(i,y,T)),y=wu(i,a),y!=null&&h.push(ic(i,y,T))),i.tag===3)return h;i=i.return}return[]}function K5(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function XS(i,a,u,h,y){for(var T=a._reactName,_=[];u!==null&&u!==h;){var M=u,G=M.alternate,ae=M.stateNode;if(M=M.tag,G!==null&&G===h)break;M!==5&&M!==26&&M!==27||ae===null||(G=ae,y?(ae=wu(u,T),ae!=null&&_.unshift(ic(u,ae,G))):y||(ae=wu(u,T),ae!=null&&_.push(ic(u,ae,G)))),u=u.return}_.length!==0&&i.push({event:a,listeners:_})}var Q5=/\r\n?/g,X5=/\u0000|\uFFFD/g;function WS(i){return(typeof i=="string"?i:""+i).replace(Q5,`
49
- `).replace(X5,"")}function ZS(i,a){return a=WS(a),WS(i)===a}function Ot(i,a,u,h,y,T){switch(u){case"children":typeof h=="string"?a==="body"||a==="textarea"&&h===""||Ho(i,h):(typeof h=="number"||typeof h=="bigint")&&a!=="body"&&Ho(i,""+h);break;case"className":Yf(i,"class",h);break;case"tabIndex":Yf(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Yf(i,u,h);break;case"style":ZE(i,h,T);break;case"data":if(a!=="object"){Yf(i,"data",h);break}case"src":case"href":if(h===""&&(a!=="a"||u!=="href")){i.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(u);break}h=Kf(""+h),i.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(u,"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"&&(u==="formAction"?(a!=="input"&&Ot(i,a,"name",y.name,y,null),Ot(i,a,"formEncType",y.formEncType,y,null),Ot(i,a,"formMethod",y.formMethod,y,null),Ot(i,a,"formTarget",y.formTarget,y,null)):(Ot(i,a,"encType",y.encType,y,null),Ot(i,a,"method",y.method,y,null),Ot(i,a,"target",y.target,y,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(u);break}h=Kf(""+h),i.setAttribute(u,h);break;case"onClick":h!=null&&(i.onclick=Yi);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(u=h.__html,u!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=u}}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}u=Kf(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);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(u,""+h):i.removeAttribute(u);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(u,""):i.removeAttribute(u);break;case"capture":case"download":h===!0?i.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,h):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(u,h):i.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(u):i.setAttribute(u,h);break;case"popover":lt("beforetoggle",i),lt("toggle",i),$f(i,"popover",h);break;case"xlinkActuate":$i(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":$i(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":$i(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":$i(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":$i(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":$i(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":$i(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":$i(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":$i(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":$f(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=C4.get(u)||u,$f(i,u,h))}}function hg(i,a,u,h,y,T){switch(u){case"style":ZE(i,h,T);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof h=="string"?Ho(i,h):(typeof h=="number"||typeof h=="bigint")&&Ho(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=Yi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!VE.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),a=u.slice(2,y?u.length-7:void 0),T=i[or]||null,T=T!=null?T[u]:null,typeof T=="function"&&i.removeEventListener(a,T,y),typeof h=="function")){typeof T!="function"&&T!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(a,h,y);break e}u in i?i[u]=h:h===!0?i.setAttribute(u,""):$f(i,u,h)}}}function Ln(i,a,u){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,y=!1,T;for(T in u)if(u.hasOwnProperty(T)){var _=u[T];if(_!=null)switch(T){case"src":h=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Ot(i,a,T,_,u,null)}}y&&Ot(i,a,"srcSet",u.srcSet,u,null),h&&Ot(i,a,"src",u.src,u,null);return;case"input":lt("invalid",i);var M=T=_=y=null,G=null,ae=null;for(h in u)if(u.hasOwnProperty(h)){var fe=u[h];if(fe!=null)switch(h){case"name":y=fe;break;case"type":_=fe;break;case"checked":G=fe;break;case"defaultChecked":ae=fe;break;case"value":T=fe;break;case"defaultValue":M=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,a));break;default:Ot(i,a,h,fe,u,null)}}KE(i,T,M,G,ae,_,y,!1);return;case"select":lt("invalid",i),h=_=T=null;for(y in u)if(u.hasOwnProperty(y)&&(M=u[y],M!=null))switch(y){case"value":T=M;break;case"defaultValue":_=M;break;case"multiple":h=M;default:Ot(i,a,y,M,u,null)}a=T,u=_,i.multiple=!!h,a!=null?Uo(i,!!h,a,!1):u!=null&&Uo(i,!!h,u,!0);return;case"textarea":lt("invalid",i),T=y=h=null;for(_ in u)if(u.hasOwnProperty(_)&&(M=u[_],M!=null))switch(_){case"value":h=M;break;case"defaultValue":y=M;break;case"children":T=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(91));break;default:Ot(i,a,_,M,u,null)}XE(i,h,y,T);return;case"option":for(G in u)if(u.hasOwnProperty(G)&&(h=u[G],h!=null))switch(G){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Ot(i,a,G,h,u,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<rc.length;h++)lt(rc[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 u)if(u.hasOwnProperty(ae)&&(h=u[ae],h!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Ot(i,a,ae,h,u,null)}return;default:if(_p(a)){for(fe in u)u.hasOwnProperty(fe)&&(h=u[fe],h!==void 0&&hg(i,a,fe,h,u,void 0));return}}for(M in u)u.hasOwnProperty(M)&&(h=u[M],h!=null&&Ot(i,a,M,h,u,null))}function W5(i,a,u,h){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,T=null,_=null,M=null,G=null,ae=null,fe=null;for(le in u){var pe=u[le];if(u.hasOwnProperty(le)&&pe!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":G=pe;default:h.hasOwnProperty(le)||Ot(i,a,le,null,h,pe)}}for(var oe in h){var le=h[oe];if(pe=u[oe],h.hasOwnProperty(oe)&&(le!=null||pe!=null))switch(oe){case"type":T=le;break;case"name":y=le;break;case"checked":ae=le;break;case"defaultChecked":fe=le;break;case"value":_=le;break;case"defaultValue":M=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,a));break;default:le!==pe&&Ot(i,a,oe,le,h,pe)}}wp(i,_,M,G,ae,fe,T,y);return;case"select":le=_=M=oe=null;for(T in u)if(G=u[T],u.hasOwnProperty(T)&&G!=null)switch(T){case"value":break;case"multiple":le=G;default:h.hasOwnProperty(T)||Ot(i,a,T,null,h,G)}for(y in h)if(T=h[y],G=u[y],h.hasOwnProperty(y)&&(T!=null||G!=null))switch(y){case"value":oe=T;break;case"defaultValue":M=T;break;case"multiple":_=T;default:T!==G&&Ot(i,a,y,T,h,G)}a=M,u=_,h=le,oe!=null?Uo(i,!!u,oe,!1):!!h!=!!u&&(a!=null?Uo(i,!!u,a,!0):Uo(i,!!u,u?[]:"",!1));return;case"textarea":le=oe=null;for(M in u)if(y=u[M],u.hasOwnProperty(M)&&y!=null&&!h.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Ot(i,a,M,null,h,y)}for(_ in h)if(y=h[_],T=u[_],h.hasOwnProperty(_)&&(y!=null||T!=null))switch(_){case"value":oe=y;break;case"defaultValue":le=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==T&&Ot(i,a,_,y,h,T)}QE(i,oe,le);return;case"option":for(var De in u)if(oe=u[De],u.hasOwnProperty(De)&&oe!=null&&!h.hasOwnProperty(De))switch(De){case"selected":i.selected=!1;break;default:Ot(i,a,De,null,h,oe)}for(G in h)if(oe=h[G],le=u[G],h.hasOwnProperty(G)&&oe!==le&&(oe!=null||le!=null))switch(G){case"selected":i.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:Ot(i,a,G,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 u)oe=u[qe],u.hasOwnProperty(qe)&&oe!=null&&!h.hasOwnProperty(qe)&&Ot(i,a,qe,null,h,oe);for(ae in h)if(oe=h[ae],le=u[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:Ot(i,a,ae,oe,h,le)}return;default:if(_p(a)){for(var Mt in u)oe=u[Mt],u.hasOwnProperty(Mt)&&oe!==void 0&&!h.hasOwnProperty(Mt)&&hg(i,a,Mt,void 0,h,oe);for(fe in h)oe=h[fe],le=u[fe],!h.hasOwnProperty(fe)||oe===le||oe===void 0&&le===void 0||hg(i,a,fe,oe,h,le);return}}for(var J in u)oe=u[J],u.hasOwnProperty(J)&&oe!=null&&!h.hasOwnProperty(J)&&Ot(i,a,J,null,h,oe);for(pe in h)oe=h[pe],le=u[pe],!h.hasOwnProperty(pe)||oe===le||oe==null&&le==null||Ot(i,a,pe,oe,h,le)}function JS(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Z5(){if(typeof performance.getEntriesByType=="function"){for(var i=0,a=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var y=u[h],T=y.transferSize,_=y.initiatorType,M=y.duration;if(T&&M&&JS(_)){for(_=0,M=y.responseEnd,h+=1;h<u.length;h++){var G=u[h],ae=G.startTime;if(ae>M)break;var fe=G.transferSize,pe=G.initiatorType;fe&&JS(pe)&&(G=G.responseEnd,_+=fe*(G<M?1:(M-ae)/(G-ae)))}if(--h,a+=8*(T+_)/(y.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 mg=null,pg=null;function Vd(i){return i.nodeType===9?i:i.ownerDocument}function e2(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 t2(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 gg(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 bg=null;function J5(){var i=window.event;return i&&i.type==="popstate"?i===bg?!1:(bg=i,!0):(bg=null,!1)}var n2=typeof setTimeout=="function"?setTimeout:void 0,eL=typeof clearTimeout=="function"?clearTimeout:void 0,r2=typeof Promise=="function"?Promise:void 0,tL=typeof queueMicrotask=="function"?queueMicrotask:typeof r2<"u"?function(i){return r2.resolve(null).then(i).catch(nL)}:n2;function nL(i){setTimeout(function(){throw i})}function zs(i){return i==="head"}function i2(i,a){var u=a,h=0;do{var y=u.nextSibling;if(i.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(h===0){i.removeChild(y),yl(a);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")sc(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,sc(u);for(var T=u.firstChild;T;){var _=T.nextSibling,M=T.nodeName;T[Su]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&T.rel.toLowerCase()==="stylesheet"||u.removeChild(T),T=_}}else u==="body"&&sc(i.ownerDocument.body);u=y}while(u);yl(a)}function s2(i,a){var u=i;i=0;do{var h=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=h}while(u)}function yg(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":yg(u),Sp(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function rL(i,a,u,h){for(;i.nodeType===1;){var y=u;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[Su])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!==y.rel||i.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||i.getAttribute("title")!==(y.title==null?null:y.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(T=i.getAttribute("src"),(T!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&T&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var T=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===T)return i}else return i;if(i=Hr(i.nextSibling),i===null)break}return null}function iL(i,a,u){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Hr(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=Hr(i.nextSibling),i===null))return null;return i}function xg(i){return i.data==="$?"||i.data==="$~"}function Eg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function sL(i,a){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=a;else if(i.data!=="$?"||u.readyState!=="loading")a();else{var h=function(){a(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}function Hr(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 Tg=null;function o2(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(a===0)return Hr(i.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}i=i.nextSibling}return null}function l2(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return i;a--}else u!=="/$"&&u!=="/&"||a++}i=i.previousSibling}return null}function u2(i,a,u){switch(a=Vd(u),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 sc(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);Sp(i)}var zr=new Map,c2=new Set;function qd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ls=H.d;H.d={f:aL,r:oL,D:lL,C:uL,L:cL,m:fL,X:hL,S:dL,M:mL};function aL(){var i=ls.f(),a=Ld();return i||a}function oL(i){var a=jo(i);a!==null&&a.tag===5&&a.type==="form"?_v(a):ls.r(i)}var pl=typeof document>"u"?null:document;function f2(i,a,u){var h=pl;if(h&&typeof a=="string"&&a){var y=Ir(a);y='link[rel="'+i+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),c2.has(y)||(c2.add(y),i={rel:i,crossOrigin:u,href:a},h.querySelector(y)===null&&(a=h.createElement("link"),Ln(a,"link",i),Sn(a),h.head.appendChild(a)))}}function lL(i){ls.D(i),f2("dns-prefetch",i,null)}function uL(i,a){ls.C(i,a),f2("preconnect",i,a)}function cL(i,a,u){ls.L(i,a,u);var h=pl;if(h&&i&&a){var y='link[rel="preload"][as="'+Ir(a)+'"]';a==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+Ir(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+Ir(u.imageSizes)+'"]')):y+='[href="'+Ir(i)+'"]';var T=y;switch(a){case"style":T=gl(i);break;case"script":T=bl(i)}zr.has(T)||(i=p({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:i,as:a},u),zr.set(T,i),h.querySelector(y)!==null||a==="style"&&h.querySelector(ac(T))||a==="script"&&h.querySelector(oc(T))||(a=h.createElement("link"),Ln(a,"link",i),Sn(a),h.head.appendChild(a)))}}function fL(i,a){ls.m(i,a);var u=pl;if(u&&i){var h=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+Ir(h)+'"][href="'+Ir(i)+'"]',T=y;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=bl(i)}if(!zr.has(T)&&(i=p({rel:"modulepreload",href:i},a),zr.set(T,i),u.querySelector(y)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(oc(T)))return}h=u.createElement("link"),Ln(h,"link",i),Sn(h),u.head.appendChild(h)}}}function dL(i,a,u){ls.S(i,a,u);var h=pl;if(h&&i){var y=Bo(h).hoistableStyles,T=gl(i);a=a||"default";var _=y.get(T);if(!_){var M={loading:0,preload:null};if(_=h.querySelector(ac(T)))M.loading=5;else{i=p({rel:"stylesheet",href:i,"data-precedence":a},u),(u=zr.get(T))&&vg(i,u);var G=_=h.createElement("link");Sn(G),Ln(G,"link",i),G._p=new Promise(function(ae,fe){G.onload=ae,G.onerror=fe}),G.addEventListener("load",function(){M.loading|=1}),G.addEventListener("error",function(){M.loading|=2}),M.loading|=4,$d(_,a,h)}_={type:"stylesheet",instance:_,count:1,state:M},y.set(T,_)}}}function hL(i,a){ls.X(i,a);var u=pl;if(u&&i){var h=Bo(u).hoistableScripts,y=bl(i),T=h.get(y);T||(T=u.querySelector(oc(y)),T||(i=p({src:i,async:!0},a),(a=zr.get(y))&&Sg(i,a),T=u.createElement("script"),Sn(T),Ln(T,"link",i),u.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(y,T))}}function mL(i,a){ls.M(i,a);var u=pl;if(u&&i){var h=Bo(u).hoistableScripts,y=bl(i),T=h.get(y);T||(T=u.querySelector(oc(y)),T||(i=p({src:i,async:!0,type:"module"},a),(a=zr.get(y))&&Sg(i,a),T=u.createElement("script"),Sn(T),Ln(T,"link",i),u.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(y,T))}}function d2(i,a,u,h){var y=(y=Te.current)?qd(y):null;if(!y)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=gl(u.href),u=Bo(y).hoistableStyles,h=u.get(a),h||(h={type:"style",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=gl(u.href);var T=Bo(y).hoistableStyles,_=T.get(i);if(_||(y=y.ownerDocument||y,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(i,_),(T=y.querySelector(ac(i)))&&!T._p&&(_.instance=T,_.state.loading=5),zr.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},zr.set(i,u),T||pL(y,i,u,_.state))),a&&h===null)throw Error(r(528,""));return _}if(a&&h!==null)throw Error(r(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=bl(u),u=Bo(y).hoistableScripts,h=u.get(a),h||(h={type:"script",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function gl(i){return'href="'+Ir(i)+'"'}function ac(i){return'link[rel="stylesheet"]['+i+"]"}function h2(i){return p({},i,{"data-precedence":i.precedence,precedence:null})}function pL(i,a,u,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}),Ln(a,"link",u),Sn(a),i.head.appendChild(a))}function bl(i){return'[src="'+Ir(i)+'"]'}function oc(i){return"script[async]"+i}function m2(i,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var h=i.querySelector('style[data-href~="'+Ir(u.href)+'"]');if(h)return a.instance=h,Sn(h),h;var y=p({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),Sn(h),Ln(h,"style",y),$d(h,u.precedence,i),a.instance=h;case"stylesheet":y=gl(u.href);var T=i.querySelector(ac(y));if(T)return a.state.loading|=4,a.instance=T,Sn(T),T;h=h2(u),(y=zr.get(y))&&vg(h,y),T=(i.ownerDocument||i).createElement("link"),Sn(T);var _=T;return _._p=new Promise(function(M,G){_.onload=M,_.onerror=G}),Ln(T,"link",h),a.state.loading|=4,$d(T,u.precedence,i),a.instance=T;case"script":return T=bl(u.src),(y=i.querySelector(oc(T)))?(a.instance=y,Sn(y),y):(h=u,(y=zr.get(T))&&(h=p({},u),Sg(h,y)),i=i.ownerDocument||i,y=i.createElement("script"),Sn(y),Ln(y,"link",h),i.head.appendChild(y),a.instance=y);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,$d(h,u.precedence,i));return a.instance}function $d(i,a,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=h.length?h[h.length-1]:null,T=y,_=0;_<h.length;_++){var M=h[_];if(M.dataset.precedence===a)T=M;else if(T!==y)break}T?T.parentNode.insertBefore(i,T.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(i,a.firstChild))}function vg(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function Sg(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var Yd=null;function p2(i,a,u){if(Yd===null){var h=new Map,y=Yd=new Map;y.set(u,h)}else y=Yd,h=y.get(u),h||(h=new Map,y.set(u,h));if(h.has(i))return h;for(h.set(i,null),u=u.getElementsByTagName(i),y=0;y<u.length;y++){var T=u[y];if(!(T[Su]||T[Dn]||i==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var _=T.getAttribute(a)||"";_=i+_;var M=h.get(_);M?M.push(T):h.set(_,[T])}}return h}function g2(i,a,u){i=i.ownerDocument||i,i.head.insertBefore(u,a==="title"?i.querySelector("head > title"):null)}function gL(i,a,u){if(u===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 b2(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function bL(i,a,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=gl(h.href),T=a.querySelector(ac(y));if(T){a=T._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(i.count++,i=Gd.bind(i),a.then(i,i)),u.state.loading|=4,u.instance=T,Sn(T);return}T=a.ownerDocument||a,h=h2(h),(y=zr.get(y))&&vg(h,y),T=T.createElement("link"),Sn(T);var _=T;_._p=new Promise(function(M,G){_.onload=M,_.onerror=G}),Ln(T,"link",h),u.instance=T}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Gd.bind(i),a.addEventListener("load",u),a.addEventListener("error",u))}}var Cg=0;function yL(i,a){return i.stylesheets&&i.count===0&&Qd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var h=setTimeout(function(){if(i.stylesheets&&Qd(i,i.stylesheets),i.unsuspend){var T=i.unsuspend;i.unsuspend=null,T()}},6e4+a);0<i.imgBytes&&Cg===0&&(Cg=62500*Z5());var y=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Qd(i,i.stylesheets),i.unsuspend)){var T=i.unsuspend;i.unsuspend=null,T()}},(i.imgBytes>Cg?50:800)+a);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(y)}}:null}function Gd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Kd=null;function Qd(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Kd=new Map,a.forEach(xL,i),Kd=null,Gd.call(i))}function xL(i,a){if(!(a.state.loading&4)){var u=Kd.get(i);if(u)var h=u.get(null);else{u=new Map,Kd.set(i,u);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T<y.length;T++){var _=y[T];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(u.set(_.dataset.precedence,_),h=_)}h&&u.set(null,h)}y=a.instance,_=y.getAttribute("data-precedence"),T=u.get(_)||h,T===h&&u.set(null,y),u.set(_,y),this.count++,h=Gd.bind(this),y.addEventListener("load",h),y.addEventListener("error",h),T?T.parentNode.insertBefore(y,T.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),a.state.loading|=4}}var lc={$$typeof:k,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function EL(i,a,u,h,y,T,_,M,G){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=ti(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ti(0),this.hiddenUpdates=ti(null),this.identifierPrefix=h,this.onUncaughtError=y,this.onCaughtError=T,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function y2(i,a,u,h,y,T,_,M,G,ae,fe,pe){return i=new EL(i,a,u,_,G,ae,fe,pe,M),a=1,T===!0&&(a|=24),T=Er(3,null,null,a),i.current=T,T.stateNode=i,a=r0(),a.refCount++,i.pooledCache=a,a.refCount++,T.memoizedState={element:h,isDehydrated:u,cache:a},o0(T),i}function x2(i){return i?(i=Ko,i):Ko}function E2(i,a,u,h,y,T){y=x2(y),h.context===null?h.context=y:h.pendingContext=y,h=Ds(a),h.payload={element:u},T=T===void 0?null:T,T!==null&&(h.callback=T),u=Os(i,h,a),u!==null&&(hr(u,i,a),Uu(u,i,a))}function T2(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<a?u:a}}function wg(i,a){T2(i,a),(i=i.alternate)&&T2(i,a)}function v2(i){if(i.tag===13||i.tag===31){var a=Ia(i,67108864);a!==null&&hr(a,i,67108864),wg(i,67108864)}}function S2(i){if(i.tag===13||i.tag===31){var a=wr();a=Ep(a);var u=Ia(i,a);u!==null&&hr(u,i,a),wg(i,a)}}var Xd=!0;function TL(i,a,u,h){var y=D.T;D.T=null;var T=H.p;try{H.p=2,Ag(i,a,u,h)}finally{H.p=T,D.T=y}}function vL(i,a,u,h){var y=D.T;D.T=null;var T=H.p;try{H.p=8,Ag(i,a,u,h)}finally{H.p=T,D.T=y}}function Ag(i,a,u,h){if(Xd){var y=_g(h);if(y===null)dg(i,a,h,Wd,u),w2(i,h);else if(CL(y,i,a,u,h))h.stopPropagation();else if(w2(i,h),a&4&&-1<SL.indexOf(i)){for(;y!==null;){var T=jo(y);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var _=st(T.pendingLanes);if(_!==0){var M=T;for(M.pendingLanes|=2,M.entangledLanes|=2;_;){var G=1<<31-vt(_);M.entanglements[1]|=G,_&=~G}wi(T),(St&6)===0&&(Md=rt()+500,nc(0))}}break;case 31:case 13:M=Ia(T,2),M!==null&&hr(M,T,2),Ld(),wg(T,2)}if(T=_g(h),T===null&&dg(i,a,h,Wd,u),T===y)break;y=T}y!==null&&h.stopPropagation()}else dg(i,a,h,null,u)}}function _g(i){return i=Np(i),kg(i)}var Wd=null;function kg(i){if(Wd=null,i=Po(i),i!==null){var a=o(i);if(a===null)i=null;else{var u=a.tag;if(u===13){if(i=l(a),i!==null)return i;i=null}else if(u===31){if(i=c(a),i!==null)return i;i=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Wd=i,null}function C2(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(yt()){case ce:return 2;case ve:return 8;case Fe:case Ze:return 32;case ht:return 268435456;default:return 32}default:return 32}}var Ng=!1,Vs=null,qs=null,$s=null,uc=new Map,cc=new Map,Ys=[],SL="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 w2(i,a){switch(i){case"focusin":case"focusout":Vs=null;break;case"dragenter":case"dragleave":qs=null;break;case"mouseover":case"mouseout":$s=null;break;case"pointerover":case"pointerout":uc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":cc.delete(a.pointerId)}}function fc(i,a,u,h,y,T){return i===null||i.nativeEvent!==T?(i={blockedOn:a,domEventName:u,eventSystemFlags:h,nativeEvent:T,targetContainers:[y]},a!==null&&(a=jo(a),a!==null&&v2(a)),i):(i.eventSystemFlags|=h,a=i.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),i)}function CL(i,a,u,h,y){switch(a){case"focusin":return Vs=fc(Vs,i,a,u,h,y),!0;case"dragenter":return qs=fc(qs,i,a,u,h,y),!0;case"mouseover":return $s=fc($s,i,a,u,h,y),!0;case"pointerover":var T=y.pointerId;return uc.set(T,fc(uc.get(T)||null,i,a,u,h,y)),!0;case"gotpointercapture":return T=y.pointerId,cc.set(T,fc(cc.get(T)||null,i,a,u,h,y)),!0}return!1}function A2(i){var a=Po(i.target);if(a!==null){var u=o(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){i.blockedOn=a,UE(i.priority,function(){S2(u)});return}}else if(a===31){if(a=c(u),a!==null){i.blockedOn=a,UE(i.priority,function(){S2(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Zd(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var u=_g(i.nativeEvent);if(u===null){u=i.nativeEvent;var h=new u.constructor(u.type,u);kp=h,u.target.dispatchEvent(h),kp=null}else return a=jo(u),a!==null&&v2(a),i.blockedOn=u,!1;a.shift()}return!0}function _2(i,a,u){Zd(i)&&u.delete(a)}function wL(){Ng=!1,Vs!==null&&Zd(Vs)&&(Vs=null),qs!==null&&Zd(qs)&&(qs=null),$s!==null&&Zd($s)&&($s=null),uc.forEach(_2),cc.forEach(_2)}function Jd(i,a){i.blockedOn===a&&(i.blockedOn=null,Ng||(Ng=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,wL)))}var eh=null;function k2(i){eh!==i&&(eh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){eh===i&&(eh=null);for(var a=0;a<i.length;a+=3){var u=i[a],h=i[a+1],y=i[a+2];if(typeof h!="function"){if(kg(h||u)===null)continue;break}var T=jo(u);T!==null&&(i.splice(a,3),a-=3,_0(T,{pending:!0,data:y,method:u.method,action:h},h,y))}}))}function yl(i){function a(G){return Jd(G,i)}Vs!==null&&Jd(Vs,i),qs!==null&&Jd(qs,i),$s!==null&&Jd($s,i),uc.forEach(a),cc.forEach(a);for(var u=0;u<Ys.length;u++){var h=Ys[u];h.blockedOn===i&&(h.blockedOn=null)}for(;0<Ys.length&&(u=Ys[0],u.blockedOn===null);)A2(u),u.blockedOn===null&&Ys.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var y=u[h],T=u[h+1],_=y[or]||null;if(typeof T=="function")_||k2(u);else if(_){var M=null;if(T&&T.hasAttribute("formAction")){if(y=T,_=T[or]||null)M=_.formAction;else if(kg(y)!==null)continue}else M=_.action;typeof M=="function"?u[h+1]=M:(u.splice(h,3),h-=3),k2(u)}}}function N2(){function i(T){T.canIntercept&&T.info==="react-transition"&&T.intercept({handler:function(){return new Promise(function(_){return y=_})},focusReset:"manual",scroll:"manual"})}function a(){y!==null&&(y(),y=null),h||setTimeout(u,20)}function u(){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,y=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),y!==null&&(y(),y=null)}}}function Rg(i){this._internalRoot=i}th.prototype.render=Rg.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var u=a.current,h=wr();E2(u,h,i,a,null,null)},th.prototype.unmount=Rg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;E2(i.current,2,null,i,null,null),Ld(),a[Lo]=null}};function th(i){this._internalRoot=i}th.prototype.unstable_scheduleHydration=function(i){if(i){var a=FE();i={blockedOn:null,target:i,priority:a};for(var u=0;u<Ys.length&&a!==0&&a<Ys[u].priority;u++);Ys.splice(u,0,i),u===0&&A2(i)}};var R2=t.version;if(R2!=="19.2.4")throw Error(r(527,R2,"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=d(a),i=i!==null?m(i):null,i=i===null?null:i.stateNode,i};var AL={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nh.isDisabled&&nh.supportsFiber)try{on=nh.inject(AL),Vt=nh}catch{}}return hc.createRoot=function(i,a){if(!s(i))throw Error(r(299));var u=!1,h="",y=jv,T=Bv,_=Fv;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(T=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError)),a=y2(i,1,!1,null,null,u,h,null,y,T,_,N2),i[Lo]=a.current,fg(i),new Rg(a)},hc.hydrateRoot=function(i,a,u){if(!s(i))throw Error(r(299));var h=!1,y="",T=jv,_=Bv,M=Fv,G=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(T=u.onUncaughtError),u.onCaughtError!==void 0&&(_=u.onCaughtError),u.onRecoverableError!==void 0&&(M=u.onRecoverableError),u.formState!==void 0&&(G=u.formState)),a=y2(i,1,!0,a,u??null,h,y,G,T,_,M,N2),a.context=x2(null),u=a.current,h=wr(),h=Ep(h),y=Ds(h),y.callback=null,Os(u,y,h),u=h,a.current.lanes=u,ar(a,u),wi(a),i[Lo]=a.current,fg(i),new th(a)},hc.version="19.2.4",hc}var z2;function UL(){if(z2)return Ig.exports;z2=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(),Ig.exports=FL(),Ig.exports}var HL=UL();const zL=Tf(HL);var ou=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(){}},VL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sa,_y,u3,qL=(u3=class{constructor(){Be(this,sa,VL);Be(this,_y,!1)}setTimeoutProvider(e){ke(this,sa,e)}setTimeout(e,t){return K(this,sa).setTimeout(e,t)}clearTimeout(e){K(this,sa).clearTimeout(e)}setInterval(e,t){return K(this,sa).setInterval(e,t)}clearInterval(e){K(this,sa).clearInterval(e)}},sa=new WeakMap,_y=new WeakMap,u3),eo=new qL;function $L(e){setTimeout(e,0)}var go=typeof window>"u"||"Deno"in globalThis;function Zn(){}function YL(e,t){return typeof e=="function"?e(t):e}function nb(e){return typeof e=="number"&&e>=0&&e!==1/0}function T3(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ga(e,t){return typeof e=="function"?e(t):e}function qr(e,t){return typeof e=="function"?e(t):e}function V2(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Dy(l,t.options))return!1}else if(!Zc(t.queryKey,l))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||s&&s!==t.state.fetchStatus||o&&!o(t))}function q2(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(!Zc(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Dy(e,t){return((t==null?void 0:t.queryKeyHashFn)||bo)(e)}function bo(e){return JSON.stringify(e,(t,n)=>rb(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Zc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Zc(e[n],t[n])):!1}var GL=Object.prototype.hasOwnProperty;function v3(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=$2(e)&&$2(t);if(!r&&!(rb(e)&&rb(t)))return t;const o=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,f=r?new Array(c):{};let d=0;for(let m=0;m<c;m++){const p=r?m:l[m],b=e[p],x=t[p];if(b===x){f[p]=b,(r?m<o:GL.call(e,p))&&d++;continue}if(b===null||x===null||typeof b!="object"||typeof x!="object"){f[p]=x;continue}const S=v3(b,x,n+1);f[p]=S,S===b&&d++}return o===c&&d===o?e:f}function Qh(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 $2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rb(e){if(!Y2(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Y2(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Y2(e){return Object.prototype.toString.call(e)==="[object Object]"}function KL(e){return new Promise(t=>{eo.setTimeout(t,e)})}function ib(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?v3(e,t):t}function QL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function XL(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Oy=Symbol();function S3(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Oy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function My(e,t){return typeof e=="function"?e(...t):!!e}function WL(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,zl,c3,ZL=(c3=class extends ou{constructor(){super();Be(this,io);Be(this,aa);Be(this,zl);ke(this,zl,t=>{if(!go&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){K(this,aa)||this.setEventListener(K(this,zl))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,aa))==null||t.call(this),ke(this,aa,void 0))}setEventListener(t){var n;ke(this,zl,t),(n=K(this,aa))==null||n.call(this),ke(this,aa,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){K(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 K(this,io)=="boolean"?K(this,io):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},io=new WeakMap,aa=new WeakMap,zl=new WeakMap,c3),Iy=new ZL;function sb(){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 JL=$L;function eP(){let e=[],t=0,n=c=>{c()},r=c=>{c()},s=JL;const o=c=>{t?e.push(c):s(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&s(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||l()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{s=c}}}var xn=eP(),Vl,oa,ql,f3,tP=(f3=class extends ou{constructor(){super();Be(this,Vl,!0);Be(this,oa);Be(this,ql);ke(this,ql,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(){K(this,oa)||this.setEventListener(K(this,ql))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,oa))==null||t.call(this),ke(this,oa,void 0))}setEventListener(t){var n;ke(this,ql,t),(n=K(this,oa))==null||n.call(this),ke(this,oa,t(this.setOnline.bind(this)))}setOnline(t){K(this,Vl)!==t&&(ke(this,Vl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return K(this,Vl)}},Vl=new WeakMap,oa=new WeakMap,ql=new WeakMap,f3),Xh=new tP;function nP(e){return Math.min(1e3*2**e,3e4)}function C3(e){return(e??"online")==="online"?Xh.isOnline():!0}var ab=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function w3(e){let t=!1,n=0,r;const s=sb(),o=()=>s.status!=="pending",l=C=>{var w;if(!o()){const A=new ab(C);b(A),(w=e.onCancel)==null||w.call(e,A)}},c=()=>{t=!0},f=()=>{t=!1},d=()=>Iy.isFocused()&&(e.networkMode==="always"||Xh.isOnline())&&e.canRun(),m=()=>C3(e.networkMode)&&e.canRun(),p=C=>{o()||(r==null||r(),s.resolve(C))},b=C=>{o()||(r==null||r(),s.reject(C))},x=()=>new Promise(C=>{var w;r=A=>{(o()||d())&&C(A)},(w=e.onPause)==null||w.call(e)}).then(()=>{var C;r=void 0,o()||(C=e.onContinue)==null||C.call(e)}),S=()=>{if(o())return;let C;const w=n===0?e.initialPromise:void 0;try{C=w??e.fn()}catch(A){C=Promise.reject(A)}Promise.resolve(C).then(p).catch(A=>{var O;if(o())return;const N=e.retry??(go?0:3),k=e.retryDelay??nP,R=typeof k=="function"?k(n,A):k,B=N===!0||typeof N=="number"&&n<N||typeof N=="function"&&N(n,A);if(t||!B){b(A);return}n++,(O=e.onFail)==null||O.call(e,n,A),KL(R).then(()=>d()?void 0:x()).then(()=>{t?b(A):S()})})};return{promise:s,status:()=>s.status,cancel:l,continue:()=>(r==null||r(),s),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?S():x().then(S),s)}}var so,d3,A3=(d3=class{constructor(){Be(this,so)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nb(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(){K(this,so)&&(eo.clearTimeout(K(this,so)),ke(this,so,void 0))}},so=new WeakMap,d3),ao,$l,Vr,oo,_n,gf,lo,li,cs,h3,rP=(h3=class extends A3{constructor(t){super();Be(this,li);Be(this,ao);Be(this,$l);Be(this,Vr);Be(this,oo);Be(this,_n);Be(this,gf);Be(this,lo);ke(this,lo,!1),ke(this,gf,t.defaultOptions),this.setOptions(t.options),this.observers=[],ke(this,oo,t.client),ke(this,Vr,K(this,oo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ke(this,ao,K2(this.options)),this.state=t.state??K(this,ao),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=K(this,_n))==null?void 0:t.promise}setOptions(t){if(this.options={...K(this,gf),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=K2(this.options);n.data!==void 0&&(this.setState(G2(n.data,n.dataUpdatedAt)),ke(this,ao,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&K(this,Vr).remove(this)}setData(t,n){const r=ib(this.state.data,t,this.options);return nt(this,li,cs).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,li,cs).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=K(this,_n))==null?void 0:r.promise;return(s=K(this,_n))==null||s.cancel(t),n?n.then(Zn).catch(Zn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(K(this,ao))}isActive(){return this.observers.some(t=>qr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Oy||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:!T3(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,_n))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,_n))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),K(this,Vr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(K(this,_n)&&(K(this,lo)?K(this,_n).cancel({revert:!0}):K(this,_n).cancelRetry()),this.scheduleGc()),K(this,Vr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||nt(this,li,cs).call(this,{type:"invalidate"})}async fetch(t,n){var f,d,m,p,b,x,S,C,w,A,N,k;if(this.state.fetchStatus!=="idle"&&((f=K(this,_n))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(K(this,_n))return K(this,_n).continueRetry(),K(this,_n).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(B=>B.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=S3(this.options,n),O=(()=>{const j={client:K(this,oo),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return ke(this,lo,!1),this.options.persister?this.options.persister(R,O,this):R(O)},c=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:K(this,oo),state:this.state,fetchFn:o};return s(R),R})();(d=this.options.behavior)==null||d.onFetch(c,this),ke(this,$l,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&nt(this,li,cs).call(this,{type:"fetch",meta:(p=c.fetchOptions)==null?void 0:p.meta}),ke(this,_n,w3({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:R=>{R instanceof ab&&R.revert&&this.setState({...K(this,$l),fetchStatus:"idle"}),r.abort()},onFail:(R,B)=>{nt(this,li,cs).call(this,{type:"failed",failureCount:R,error:B})},onPause:()=>{nt(this,li,cs).call(this,{type:"pause"})},onContinue:()=>{nt(this,li,cs).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const R=await K(this,_n).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(x=(b=K(this,Vr).config).onSuccess)==null||x.call(b,R,this),(C=(S=K(this,Vr).config).onSettled)==null||C.call(S,R,this.state.error,this),R}catch(R){if(R instanceof ab){if(R.silent)return K(this,_n).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw nt(this,li,cs).call(this,{type:"error",error:R}),(A=(w=K(this,Vr).config).onError)==null||A.call(w,R,this),(k=(N=K(this,Vr).config).onSettled)==null||k.call(N,this.state.data,R,this),R}finally{this.scheduleGc()}}},ao=new WeakMap,$l=new WeakMap,Vr=new WeakMap,oo=new WeakMap,_n=new WeakMap,gf=new WeakMap,lo=new WeakMap,li=new WeakSet,cs=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,..._3(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...G2(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ke(this,$l,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),xn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),K(this,Vr).notify({query:this,type:"updated",action:t})})},h3);function _3(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:C3(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function G2(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function K2(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 gr,gt,bf,Wn,uo,Yl,ds,la,yf,Gl,Kl,co,fo,ua,Ql,At,_c,ob,lb,ub,cb,fb,db,hb,k3,m3,iP=(m3=class extends ou{constructor(t,n){super();Be(this,At);Be(this,gr);Be(this,gt);Be(this,bf);Be(this,Wn);Be(this,uo);Be(this,Yl);Be(this,ds);Be(this,la);Be(this,yf);Be(this,Gl);Be(this,Kl);Be(this,co);Be(this,fo);Be(this,ua);Be(this,Ql,new Set);this.options=n,ke(this,gr,t),ke(this,la,null),ke(this,ds,sb()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(K(this,gt).addObserver(this),Q2(K(this,gt),this.options)?nt(this,At,_c).call(this):this.updateResult(),nt(this,At,cb).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mb(K(this,gt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mb(K(this,gt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,nt(this,At,fb).call(this),nt(this,At,db).call(this),K(this,gt).removeObserver(this)}setOptions(t){const n=this.options,r=K(this,gt);if(this.options=K(this,gr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qr(this.options.enabled,K(this,gt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");nt(this,At,hb).call(this),K(this,gt).setOptions(this.options),n._defaulted&&!Qh(this.options,n)&&K(this,gr).getQueryCache().notify({type:"observerOptionsUpdated",query:K(this,gt),observer:this});const s=this.hasListeners();s&&X2(K(this,gt),r,this.options,n)&&nt(this,At,_c).call(this),this.updateResult(),s&&(K(this,gt)!==r||qr(this.options.enabled,K(this,gt))!==qr(n.enabled,K(this,gt))||ga(this.options.staleTime,K(this,gt))!==ga(n.staleTime,K(this,gt)))&&nt(this,At,ob).call(this);const o=nt(this,At,lb).call(this);s&&(K(this,gt)!==r||qr(this.options.enabled,K(this,gt))!==qr(n.enabled,K(this,gt))||o!==K(this,ua))&&nt(this,At,ub).call(this,o)}getOptimisticResult(t){const n=K(this,gr).getQueryCache().build(K(this,gr),t),r=this.createResult(n,t);return aP(this,r)&&(ke(this,Wn,r),ke(this,Yl,this.options),ke(this,uo,K(this,gt).state)),r}getCurrentResult(){return K(this,Wn)}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&&K(this,ds).status==="pending"&&K(this,ds).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){K(this,Ql).add(t)}getCurrentQuery(){return K(this,gt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=K(this,gr).defaultQueryOptions(t),r=K(this,gr).getQueryCache().build(K(this,gr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return nt(this,At,_c).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),K(this,Wn)))}createResult(t,n){var q;const r=K(this,gt),s=this.options,o=K(this,Wn),l=K(this,uo),c=K(this,Yl),d=t!==r?t.state:K(this,bf),{state:m}=t;let p={...m},b=!1,x;if(n._optimisticResults){const L=this.hasListeners(),X=!L&&Q2(t,n),Q=L&&X2(t,r,n,s);(X||Q)&&(p={...p,..._3(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:S,errorUpdatedAt:C,status:w}=p;x=p.data;let A=!1;if(n.placeholderData!==void 0&&x===void 0&&w==="pending"){let L;o!=null&&o.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(L=o.data,A=!0):L=typeof n.placeholderData=="function"?n.placeholderData((q=K(this,Kl))==null?void 0:q.state.data,K(this,Kl)):n.placeholderData,L!==void 0&&(w="success",x=ib(o==null?void 0:o.data,L,n),b=!0)}if(n.select&&x!==void 0&&!A)if(o&&x===(l==null?void 0:l.data)&&n.select===K(this,yf))x=K(this,Gl);else try{ke(this,yf,n.select),x=n.select(x),x=ib(o==null?void 0:o.data,x,n),ke(this,Gl,x),ke(this,la,null)}catch(L){ke(this,la,L)}K(this,la)&&(S=K(this,la),x=K(this,Gl),C=Date.now(),w="error");const N=p.fetchStatus==="fetching",k=w==="pending",R=w==="error",B=k&&N,O=x!==void 0,P={status:w,fetchStatus:p.fetchStatus,isPending:k,isSuccess:w==="success",isError:R,isInitialLoading:B,isLoading:B,data:x,dataUpdatedAt:p.dataUpdatedAt,error:S,errorUpdatedAt:C,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:N,isRefetching:N&&!k,isLoadingError:R&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:R&&O,isStale:Ly(t,n),refetch:this.refetch,promise:K(this,ds),isEnabled:qr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=P.data!==void 0,X=P.status==="error"&&!L,Q=Z=>{X?Z.reject(P.error):L&&Z.resolve(P.data)},ee=()=>{const Z=ke(this,ds,P.promise=sb());Q(Z)},ne=K(this,ds);switch(ne.status){case"pending":t.queryHash===r.queryHash&&Q(ne);break;case"fulfilled":(X||P.data!==ne.value)&&ee();break;case"rejected":(!X||P.error!==ne.reason)&&ee();break}}return P}updateResult(){const t=K(this,Wn),n=this.createResult(K(this,gt),this.options);if(ke(this,uo,K(this,gt).state),ke(this,Yl,this.options),K(this,uo).data!==void 0&&ke(this,Kl,K(this,gt)),Qh(n,t))return;ke(this,Wn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!K(this,Ql).size)return!0;const l=new Set(o??K(this,Ql));return this.options.throwOnError&&l.add("error"),Object.keys(K(this,Wn)).some(c=>{const f=c;return K(this,Wn)[f]!==t[f]&&l.has(f)})};nt(this,At,k3).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&nt(this,At,cb).call(this)}},gr=new WeakMap,gt=new WeakMap,bf=new WeakMap,Wn=new WeakMap,uo=new WeakMap,Yl=new WeakMap,ds=new WeakMap,la=new WeakMap,yf=new WeakMap,Gl=new WeakMap,Kl=new WeakMap,co=new WeakMap,fo=new WeakMap,ua=new WeakMap,Ql=new WeakMap,At=new WeakSet,_c=function(t){nt(this,At,hb).call(this);let n=K(this,gt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zn)),n},ob=function(){nt(this,At,fb).call(this);const t=ga(this.options.staleTime,K(this,gt));if(go||K(this,Wn).isStale||!nb(t))return;const r=T3(K(this,Wn).dataUpdatedAt,t)+1;ke(this,co,eo.setTimeout(()=>{K(this,Wn).isStale||this.updateResult()},r))},lb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(K(this,gt)):this.options.refetchInterval)??!1},ub=function(t){nt(this,At,db).call(this),ke(this,ua,t),!(go||qr(this.options.enabled,K(this,gt))===!1||!nb(K(this,ua))||K(this,ua)===0)&&ke(this,fo,eo.setInterval(()=>{(this.options.refetchIntervalInBackground||Iy.isFocused())&&nt(this,At,_c).call(this)},K(this,ua)))},cb=function(){nt(this,At,ob).call(this),nt(this,At,ub).call(this,nt(this,At,lb).call(this))},fb=function(){K(this,co)&&(eo.clearTimeout(K(this,co)),ke(this,co,void 0))},db=function(){K(this,fo)&&(eo.clearInterval(K(this,fo)),ke(this,fo,void 0))},hb=function(){const t=K(this,gr).getQueryCache().build(K(this,gr),this.options);if(t===K(this,gt))return;const n=K(this,gt);ke(this,gt,t),ke(this,bf,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},k3=function(t){xn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(K(this,Wn))}),K(this,gr).getQueryCache().notify({query:K(this,gt),type:"observerResultsUpdated"})})},m3);function sP(e,t){return qr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Q2(e,t){return sP(e,t)||e.state.data!==void 0&&mb(e,t,t.refetchOnMount)}function mb(e,t,n){if(qr(t.enabled,e)!==!1&&ga(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ly(e,t)}return!1}function X2(e,t,n,r){return(e!==t||qr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ly(e,n)}function Ly(e,t){return qr(t.enabled,e)!==!1&&e.isStaleByTime(ga(t.staleTime,e))}function aP(e,t){return!Qh(e.getCurrentResult(),t)}function W2(e){return{onFetch:(t,n)=>{var m,p,b,x,S;const r=t.options,s=(b=(p=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:p.fetchMore)==null?void 0:b.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],l=((S=t.state.data)==null?void 0:S.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const d=async()=>{let C=!1;const w=k=>{WL(k,()=>t.signal,()=>C=!0)},A=S3(t.options,t.fetchOptions),N=async(k,R,B)=>{if(C)return Promise.reject();if(R==null&&k.pages.length)return Promise.resolve(k);const j=(()=>{const X={client:t.client,queryKey:t.queryKey,pageParam:R,direction:B?"backward":"forward",meta:t.options.meta};return w(X),X})(),P=await A(j),{maxPages:q}=t.options,L=B?XL:QL;return{pages:L(k.pages,P,q),pageParams:L(k.pageParams,R,q)}};if(s&&o.length){const k=s==="backward",R=k?oP:Z2,B={pages:o,pageParams:l},O=R(r,B);c=await N(B,O,k)}else{const k=e??o.length;do{const R=f===0?l[0]??r.initialPageParam:Z2(r,c);if(f>0&&R==null)break;c=await N(c,R),f++}while(f<k)}return c};t.options.persister?t.fetchFn=()=>{var C,w;return(w=(C=t.options).persister)==null?void 0:w.call(C,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function Z2(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 oP(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 xf,ki,Un,ho,Ni,Ws,p3,lP=(p3=class extends A3{constructor(t){super();Be(this,Ni);Be(this,xf);Be(this,ki);Be(this,Un);Be(this,ho);ke(this,xf,t.client),this.mutationId=t.mutationId,ke(this,Un,t.mutationCache),ke(this,ki,[]),this.state=t.state||N3(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){K(this,ki).includes(t)||(K(this,ki).push(t),this.clearGcTimeout(),K(this,Un).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ke(this,ki,K(this,ki).filter(n=>n!==t)),this.scheduleGc(),K(this,Un).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){K(this,ki).length||(this.state.status==="pending"?this.scheduleGc():K(this,Un).remove(this))}continue(){var t;return((t=K(this,ho))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,f,d,m,p,b,x,S,C,w,A,N,k,R,B,O,j;const n=()=>{nt(this,Ni,Ws).call(this,{type:"continue"})},r={client:K(this,xf),meta:this.options.meta,mutationKey:this.options.mutationKey};ke(this,ho,w3({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,q)=>{nt(this,Ni,Ws).call(this,{type:"failed",failureCount:P,error:q})},onPause:()=>{nt(this,Ni,Ws).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>K(this,Un).canRun(this)}));const s=this.state.status==="pending",o=!K(this,ho).canStart();try{if(s)n();else{nt(this,Ni,Ws).call(this,{type:"pending",variables:t,isPaused:o}),K(this,Un).config.onMutate&&await K(this,Un).config.onMutate(t,this,r);const q=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));q!==this.state.context&&nt(this,Ni,Ws).call(this,{type:"pending",context:q,variables:t,isPaused:o})}const P=await K(this,ho).start();return await((d=(f=K(this,Un).config).onSuccess)==null?void 0:d.call(f,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((x=(b=K(this,Un).config).onSettled)==null?void 0:x.call(b,P,null,this.state.variables,this.state.context,this,r)),await((C=(S=this.options).onSettled)==null?void 0:C.call(S,P,null,t,this.state.context,r)),nt(this,Ni,Ws).call(this,{type:"success",data:P}),P}catch(P){try{await((A=(w=K(this,Un).config).onError)==null?void 0:A.call(w,P,t,this.state.context,this,r))}catch(q){Promise.reject(q)}try{await((k=(N=this.options).onError)==null?void 0:k.call(N,P,t,this.state.context,r))}catch(q){Promise.reject(q)}try{await((B=(R=K(this,Un).config).onSettled)==null?void 0:B.call(R,void 0,P,this.state.variables,this.state.context,this,r))}catch(q){Promise.reject(q)}try{await((j=(O=this.options).onSettled)==null?void 0:j.call(O,void 0,P,t,this.state.context,r))}catch(q){Promise.reject(q)}throw nt(this,Ni,Ws).call(this,{type:"error",error:P}),P}finally{K(this,Un).runNext(this)}}},xf=new WeakMap,ki=new WeakMap,Un=new WeakMap,ho=new WeakMap,Ni=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),xn.batch(()=>{K(this,ki).forEach(r=>{r.onMutationUpdate(t)}),K(this,Un).notify({mutation:this,type:"updated",action:t})})},p3);function N3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var hs,ui,Ef,g3,uP=(g3=class extends ou{constructor(t={}){super();Be(this,hs);Be(this,ui);Be(this,Ef);this.config=t,ke(this,hs,new Set),ke(this,ui,new Map),ke(this,Ef,0)}build(t,n,r){const s=new lP({client:t,mutationCache:this,mutationId:++rh(this,Ef)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){K(this,hs).add(t);const n=ih(t);if(typeof n=="string"){const r=K(this,ui).get(n);r?r.push(t):K(this,ui).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(K(this,hs).delete(t)){const n=ih(t);if(typeof n=="string"){const r=K(this,ui).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&K(this,ui).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ih(t);if(typeof n=="string"){const r=K(this,ui).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=ih(t);if(typeof n=="string"){const s=(r=K(this,ui).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(){xn.batch(()=>{K(this,hs).forEach(t=>{this.notify({type:"removed",mutation:t})}),K(this,hs).clear(),K(this,ui).clear()})}getAll(){return Array.from(K(this,hs))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>q2(n,r))}findAll(t={}){return this.getAll().filter(n=>q2(t,n))}notify(t){xn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return xn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Zn))))}},hs=new WeakMap,ui=new WeakMap,Ef=new WeakMap,g3);function ih(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ms,ca,br,ps,bs,Mh,pb,b3,cP=(b3=class extends ou{constructor(n,r){super();Be(this,bs);Be(this,ms);Be(this,ca);Be(this,br);Be(this,ps);ke(this,ms,n),this.setOptions(r),this.bindMethods(),nt(this,bs,Mh).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=K(this,ms).defaultMutationOptions(n),Qh(this.options,r)||K(this,ms).getMutationCache().notify({type:"observerOptionsUpdated",mutation:K(this,br),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&bo(r.mutationKey)!==bo(this.options.mutationKey)?this.reset():((s=K(this,br))==null?void 0:s.state.status)==="pending"&&K(this,br).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=K(this,br))==null||n.removeObserver(this)}onMutationUpdate(n){nt(this,bs,Mh).call(this),nt(this,bs,pb).call(this,n)}getCurrentResult(){return K(this,ca)}reset(){var n;(n=K(this,br))==null||n.removeObserver(this),ke(this,br,void 0),nt(this,bs,Mh).call(this),nt(this,bs,pb).call(this)}mutate(n,r){var s;return ke(this,ps,r),(s=K(this,br))==null||s.removeObserver(this),ke(this,br,K(this,ms).getMutationCache().build(K(this,ms),this.options)),K(this,br).addObserver(this),K(this,br).execute(n)}},ms=new WeakMap,ca=new WeakMap,br=new WeakMap,ps=new WeakMap,bs=new WeakSet,Mh=function(){var r;const n=((r=K(this,br))==null?void 0:r.state)??N3();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})},pb=function(n){xn.batch(()=>{var r,s,o,l,c,f,d,m;if(K(this,ps)&&this.hasListeners()){const p=K(this,ca).variables,b=K(this,ca).context,x={client:K(this,ms),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(r=K(this,ps)).onSuccess)==null||s.call(r,n.data,p,b,x)}catch(S){Promise.reject(S)}try{(l=(o=K(this,ps)).onSettled)==null||l.call(o,n.data,null,p,b,x)}catch(S){Promise.reject(S)}}else if((n==null?void 0:n.type)==="error"){try{(f=(c=K(this,ps)).onError)==null||f.call(c,n.error,p,b,x)}catch(S){Promise.reject(S)}try{(m=(d=K(this,ps)).onSettled)==null||m.call(d,void 0,n.error,p,b,x)}catch(S){Promise.reject(S)}}}this.listeners.forEach(p=>{p(K(this,ca))})})},b3),Ri,y3,fP=(y3=class extends ou{constructor(t={}){super();Be(this,Ri);this.config=t,ke(this,Ri,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??Dy(s,n);let l=this.get(o);return l||(l=new rP({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(l)),l}add(t){K(this,Ri).has(t.queryHash)||(K(this,Ri).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=K(this,Ri).get(t.queryHash);n&&(t.destroy(),n===t&&K(this,Ri).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){xn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return K(this,Ri).get(t)}getAll(){return[...K(this,Ri).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>V2(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>V2(t,r)):n}notify(t){xn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){xn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){xn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ri=new WeakMap,y3),Zt,fa,da,Xl,Wl,ha,Zl,Jl,x3,dP=(x3=class{constructor(e={}){Be(this,Zt);Be(this,fa);Be(this,da);Be(this,Xl);Be(this,Wl);Be(this,ha);Be(this,Zl);Be(this,Jl);ke(this,Zt,e.queryCache||new fP),ke(this,fa,e.mutationCache||new uP),ke(this,da,e.defaultOptions||{}),ke(this,Xl,new Map),ke(this,Wl,new Map),ke(this,ha,0)}mount(){rh(this,ha)._++,K(this,ha)===1&&(ke(this,Zl,Iy.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,Zt).onFocus())})),ke(this,Jl,Xh.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,Zt).onOnline())})))}unmount(){var e,t;rh(this,ha)._--,K(this,ha)===0&&((e=K(this,Zl))==null||e.call(this),ke(this,Zl,void 0),(t=K(this,Jl))==null||t.call(this),ke(this,Jl,void 0))}isFetching(e){return K(this,Zt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return K(this,fa).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,Zt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=K(this,Zt).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 K(this,Zt).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=K(this,Zt).get(r.queryHash),o=s==null?void 0:s.state.data,l=YL(t,o);if(l!==void 0)return K(this,Zt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return xn.batch(()=>K(this,Zt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,Zt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=K(this,Zt);xn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=K(this,Zt);return xn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=xn.batch(()=>K(this,Zt).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Zn).catch(Zn)}invalidateQueries(e,t={}){return xn.batch(()=>(K(this,Zt).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=xn.batch(()=>K(this,Zt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Zn)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Zn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=K(this,Zt).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(Zn).catch(Zn)}fetchInfiniteQuery(e){return e.behavior=W2(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zn).catch(Zn)}ensureInfiniteQueryData(e){return e.behavior=W2(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Xh.isOnline()?K(this,fa).resumePausedMutations():Promise.resolve()}getQueryCache(){return K(this,Zt)}getMutationCache(){return K(this,fa)}getDefaultOptions(){return K(this,da)}setDefaultOptions(e){ke(this,da,e)}setQueryDefaults(e,t){K(this,Xl).set(bo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...K(this,Xl).values()],n={};return t.forEach(r=>{Zc(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){K(this,Wl).set(bo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...K(this,Wl).values()],n={};return t.forEach(r=>{Zc(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...K(this,da).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Dy(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===Oy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...K(this,da).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){K(this,Zt).clear(),K(this,fa).clear()}},Zt=new WeakMap,fa=new WeakMap,da=new WeakMap,Xl=new WeakMap,Wl=new WeakMap,ha=new WeakMap,Zl=new WeakMap,Jl=new WeakMap,x3),R3=E.createContext(void 0),vf=e=>{const t=E.useContext(R3);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hP=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(R3.Provider,{value:e,children:t})),D3=E.createContext(!1),mP=()=>E.useContext(D3);D3.Provider;function pP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gP=E.createContext(pP()),bP=()=>E.useContext(gP),yP=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?My(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},xP=e=>{E.useEffect(()=>{e.clearReset()},[e])},EP=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||My(n,[e.error,r])),TP=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))}},vP=(e,t)=>e.isLoading&&e.isFetching&&!t,SP=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,J2=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function CP(e,t,n){var b,x,S,C;const r=mP(),s=bP(),o=vf(),l=o.defaultQueryOptions(e);(x=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||x.call(b,l);const c=o.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",TP(l),yP(l,s,c),xP(s);const f=!o.getQueryCache().get(l.queryHash),[d]=E.useState(()=>new t(o,l)),m=d.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(w=>{const A=p?d.subscribe(xn.batchCalls(w)):Zn;return d.updateResult(),A},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),E.useEffect(()=>{d.setOptions(l)},[l,d]),SP(l,m))throw J2(l,d,s);if(EP({result:m,errorResetBoundary:s,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw m.error;if((C=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||C.call(S,l,m),l.experimental_prefetchInRender&&!go&&vP(m,r)){const w=f?J2(l,d,s):c==null?void 0:c.promise;w==null||w.catch(Zn).finally(()=>{d.updateResult()})}return l.notifyOnChangeProps?m:d.trackResult(m)}function gi(e,t){return CP(e,iP)}function wP(e,t){const n=vf(),[r]=E.useState(()=>new cP(n,e));E.useEffect(()=>{r.setOptions(e)},[r,e]);const s=E.useSyncExternalStore(E.useCallback(l=>r.subscribe(xn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=E.useCallback((l,c)=>{r.mutate(l,c).catch(Zn)},[r]);if(s.error&&My(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const Py=kP();function Yt(e,...t){if(!Py)return;const n=_P(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function AP(e,...t){Py&&console.warn(e,...t)}function _P(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 kP(){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 NP={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 Sf(e){return`[nuqs] ${NP[e]}
50
- See https://nuqs.dev/NUQS-${e}`}function RP(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}=${DP(s)}`)}return"?"+t.join("&")}function DP(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=E.createContext({useAdapter(){throw new Error(Sf(404))}});yo.displayName="NuqsAdapterContext";Py&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==yo&&console.error(Sf(303)),window.__NuqsAdapterContext=yo);function OP(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...s})=>E.createElement(yo.Provider,{...s,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function MP(e){const t=E.useContext(yo);if(!("useAdapter"in t))throw new Error(Sf(404));return t.useAdapter(e)}const IP=()=>E.useContext(yo).defaultOptions,LP=()=>E.useContext(yo).processUrlSearchParams;function PP(){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 jP(e){return{method:"throttle",timeMs:e}}const Lc=jP(PP());function BP(e){return e===null||Array.isArray(e)&&e.length===0}function FP(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 gb(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 bb(){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 UP(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 yb(){return new URLSearchParams(location.search)}var O3=class{constructor(){$e(this,"updateMap",new Map);$e(this,"options",{history:"replace",scroll:!1,shallow:!0});$e(this,"timeMs",Lc.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=Lc.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Yt("[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=yb}){var t;return((t=this.resolvers)==null?void 0:t.promise)??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=yb,rateLimitFactor:t=1,...n},r){if(this.controller??(this.controller=new AbortController),!Number.isFinite(this.timeMs))return Yt("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=bb();const s=()=>{this.lastFlushedAt=performance.now();const[l,c]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);c===null?(this.resolvers.resolve(l),this.resetQueueOnNextPush=!0):this.resolvers.reject(l),this.resolvers=null};return gb(()=>{const l=performance.now()-this.lastFlushedAt,c=this.timeMs,f=t*Math.max(0,c-l);Yt("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",f,c,t),f===0?s():gb(s,f,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 Yt("[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=Lc.timeMs,e}applyPendingUpdates(e,t){const{updateUrl:n,getSearchParamsSnapshot:r}=e;let s=r();if(Yt("[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},c=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Yt("[nuqs gtq] Flushing queue %O with options %O",o,l);for(const[f,d]of o)d===null?s.delete(f):s=FP(d,f,s);t&&(s=t(s));try{return UP(c,()=>{n(s,l)}),[s,null]}catch(f){return console.error(Sf(429),o.map(([d])=>d).join(),f),[s,f]}}};const Ih=new O3;function HP(e,t,n){const r=E.useCallback(()=>{const o=Object.fromEntries(e.map(l=>[l,n(l)]));return[JSON.stringify(o),o]},[e.join(","),n]),s=E.useRef(null);return s.current===null&&(s.current=r()),E.useSyncExternalStore(E.useCallback(o=>{const l=e.map(c=>t(c,o));return()=>l.forEach(c=>c())},[e.join(","),t]),()=>{const[o,l]=r();return s.current[0]===o?s.current[1]:(s.current=[o,l],l)},()=>s.current[1])}var zP=class{constructor(e){$e(this,"callback");$e(this,"resolvers",bb());$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,gb(()=>{const n=this.resolvers;try{Yt("[nuqs dq] Flushing debounce queue",e);const r=this.callback(e);Yt("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=bb(),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}},VP=class{constructor(e=new O3){$e(this,"throttleQueue");$e(this,"queues",new Map);$e(this,"queuedQuerySync",jy());this.throttleQueue=e}useQueuedQueries(e){return HP(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??yb;return Promise.resolve(l())}const s=e.key;if(!this.queues.has(s)){Yt("[nuqs dqc] Creating debounce queue for `%s`",s);const l=new zP(c=>(this.throttleQueue.push(c),this.throttleQueue.flush(n,r).finally(()=>{var f;((f=this.queues.get(c.key))==null?void 0:f.queuedValue)===void 0&&(Yt("[nuqs dqc] Cleaning up empty queue for `%s`",c.key),this.queues.delete(c.key)),this.queuedQuerySync.emit(c.key)})));this.queues.set(s,l)}Yt("[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?(Yt("[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())Yt("[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 Bg=new VP(Ih);function M3(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 eC(e,t,n){return r=>{if(!(t.length===0||t.some(o=>!M3(r.getAll(o),e.getAll(o)))))return Yt("[nuqs `%s`] no change, returning previous",t.join(","),r),r;const s=I3(e,t,n);return Yt("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),r,s),s}}function I3(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 qP="__nuqs__",xb=jy();function $P(e){return function(n,r){const s=new URL(location.href);s.search=RP(n),Yt("[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,qP,s),xb.emit("update",n),r.scroll===!0&&window.scrollTo({top:0})}}const L3=E.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function YP(e){const{fullPageNavigationOnShallowFalseUpdates:t}=E.useContext(L3),[n,r]=E.useState(()=>typeof location>"u"?new URLSearchParams:I3(new URLSearchParams(location.search),e,!1));return E.useEffect(()=>{const s=()=>{r(eC(new URLSearchParams(location.search),e,!1))},o=l=>{r(eC(l,e,!0))};return xb.on("update",o),window.addEventListener("popstate",s),()=>{xb.off("update",o),window.removeEventListener("popstate",s)}},[e.join("&")]),{searchParams:n,updateUrl:E.useMemo(()=>$P(t),[t])}}const GP=OP(YP);function KP({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return E.createElement(L3.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},E.createElement(GP,{...n,children:e}))}const P3=E.createContext(null);function QP({transport:e,children:t}){return g.jsx(P3.Provider,{value:e,children:t})}function Dr(){const e=E.useContext(P3);if(!e)throw new Error("useTransport must be used within a TransportProvider");return e}const tC=e=>{let t;const n=new Set,r=(d,m)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const b=t;t=m??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(x=>x(t,b))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,s,c);return c},XP=(e=>e?tC(e):tC),WP=e=>e;function ZP(e,t=WP){const n=we.useSyncExternalStore(e.subscribe,we.useCallback(()=>t(e.getState()),[e,t]),we.useCallback(()=>t(e.getInitialState()),[e,t]));return we.useDebugValue(n),n}const JP=e=>{const t=XP(e),n=r=>ZP(t,r);return Object.assign(n,t),n},e8=(e=>JP),nC={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},rC=e=>!!e.dispatchFromDevtools&&typeof e.dispatch=="function",Jc=new Map,sh=e=>{const t=Jc.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},t8=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Jc.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return Jc.set(n.name,s),{type:"tracked",store:e,...s}},n8=(e,t)=>{if(t===void 0)return;const n=Jc.get(e);n&&(delete n.stores[t],Object.keys(n.stores).length===0&&Jc.delete(e))},r8=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]},i8=(e,t={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:l,store:c,...f}=t;let d;try{d=(o??(nC?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!d)return e(n,r,s);const{connection:m,...p}=t8(c,d,f);let b=!0;s.setState=((C,w,A)=>{const N=n(C,w);if(!b)return N;const k=A===void 0?{type:l||r8(new Error().stack)||"anonymous"}:typeof A=="string"?{type:A}:A;return c===void 0?(m==null||m.send(k,r()),N):(m==null||m.send({...k,type:`${c}/${k.type}`},{...sh(f.name),[c]:s.getState()}),N)}),s.devtools={cleanup:()=>{m&&typeof m.unsubscribe=="function"&&m.unsubscribe(),n8(f.name,c)}};const x=(...C)=>{const w=b;b=!1,n(...C),b=w},S=e(s.setState,r,s);if(p.type==="untracked"?m==null||m.init(S):(p.stores[p.store]=s,m==null||m.init(Object.fromEntries(Object.entries(p.stores).map(([C,w])=>[C,C===p.store?S:w.getState()])))),rC(s)){let C=!1;const w=s.dispatch;s.dispatch=(...A)=>{(nC?"production":void 0)!=="production"&&A[0].type==="__setState"&&!C&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),C=!0),w(...A)}}return m.subscribe(C=>{var w;switch(C.type){case"ACTION":if(typeof C.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Fg(C.payload,A=>{if(A.type==="__setState"){if(c===void 0){x(A.state);return}Object.keys(A.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 N=A.state[c];if(N==null)return;JSON.stringify(s.getState())!==JSON.stringify(N)&&x(N);return}rC(s)&&s.dispatch(A)});case"DISPATCH":switch(C.payload.type){case"RESET":return x(S),c===void 0?m==null?void 0:m.init(s.getState()):m==null?void 0:m.init(sh(f.name));case"COMMIT":if(c===void 0){m==null||m.init(s.getState());return}return m==null?void 0:m.init(sh(f.name));case"ROLLBACK":return Fg(C.state,A=>{if(c===void 0){x(A),m==null||m.init(s.getState());return}x(A[c]),m==null||m.init(sh(f.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Fg(C.state,A=>{if(c===void 0){x(A);return}JSON.stringify(s.getState())!==JSON.stringify(A[c])&&x(A[c])});case"IMPORT_STATE":{const{nextLiftedState:A}=C.payload,N=(w=A.computedStates.slice(-1)[0])==null?void 0:w.state;if(!N)return;x(c===void 0?N:N[c]),m==null||m.send(null,A);return}case"PAUSE_RECORDING":return b=!b}return}}),S},s8=i8,Fg=(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 j3(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=j3(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function By(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=j3(e))&&(r&&(r+=" "),r+=t);return r}const a8=(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},o8=(e,t)=>({classGroupId:e,validator:t}),B3=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Wh="-",iC=[],l8="arbitrary..",u8=e=>{const t=f8(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return c8(l);const c=l.split(Wh),f=c[0]===""&&c.length>1?1:0;return F3(c,f,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const f=r[l],d=n[l];return f?d?a8(d,f):f:d||iC}return n[l]||iC}}},F3=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],o=n.nextPart.get(s);if(o){const d=F3(e,t+1,o);if(d)return d}const l=n.validators;if(l===null)return;const c=t===0?e.join(Wh):e.slice(t).join(Wh),f=l.length;for(let d=0;d<f;d++){const m=l[d];if(m.validator(c))return m.classGroupId}},c8=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?l8+r:void 0})(),f8=e=>{const{theme:t,classGroups:n}=e;return d8(n,t)},d8=(e,t)=>{const n=B3();for(const r in e){const s=e[r];Fy(s,n,r,t)}return n},Fy=(e,t,n,r)=>{const s=e.length;for(let o=0;o<s;o++){const l=e[o];h8(l,t,n,r)}},h8=(e,t,n,r)=>{if(typeof e=="string"){m8(e,t,n);return}if(typeof e=="function"){p8(e,t,n,r);return}g8(e,t,n,r)},m8=(e,t,n)=>{const r=e===""?t:U3(t,e);r.classGroupId=n},p8=(e,t,n,r)=>{if(b8(e)){Fy(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(o8(n,e))},g8=(e,t,n,r)=>{const s=Object.entries(e),o=s.length;for(let l=0;l<o;l++){const[c,f]=s[l];Fy(f,U3(t,c),n,r)}},U3=(e,t)=>{let n=e;const r=t.split(Wh),s=r.length;for(let o=0;o<s;o++){const l=r[o];let c=n.nextPart.get(l);c||(c=B3(),n.nextPart.set(l,c)),n=c}return n},b8=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,y8=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)}}},Eb="!",sC=":",x8=[],aC=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),E8=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let l=0,c=0,f=0,d;const m=s.length;for(let C=0;C<m;C++){const w=s[C];if(l===0&&c===0){if(w===sC){o.push(s.slice(f,C)),f=C+1;continue}if(w==="/"){d=C;continue}}w==="["?l++:w==="]"?l--:w==="("?c++:w===")"&&c--}const p=o.length===0?s:s.slice(f);let b=p,x=!1;p.endsWith(Eb)?(b=p.slice(0,-1),x=!0):p.startsWith(Eb)&&(b=p.slice(1),x=!0);const S=d&&d>f?d-f:void 0;return aC(o,x,b,S)};if(t){const s=t+sC,o=r;r=l=>l.startsWith(s)?o(l.slice(s.length)):aC(x8,!1,l,void 0,!0)}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},T8=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],c=l[0]==="[",f=t.has(l);c||f?(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}},v8=e=>({cache:y8(e.cacheSize),parseClassName:E8(e),sortModifiers:T8(e),...u8(e)}),S8=/\s+/,C8=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,l=[],c=e.trim().split(S8);let f="";for(let d=c.length-1;d>=0;d-=1){const m=c[d],{isExternal:p,modifiers:b,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:C}=n(m);if(p){f=m+(f.length>0?" "+f:f);continue}let w=!!C,A=r(w?S.substring(0,C):S);if(!A){if(!w){f=m+(f.length>0?" "+f:f);continue}if(A=r(S),!A){f=m+(f.length>0?" "+f:f);continue}w=!1}const N=b.length===0?"":b.length===1?b[0]:o(b).join(":"),k=x?N+Eb:N,R=k+A;if(l.indexOf(R)>-1)continue;l.push(R);const B=s(A,w);for(let O=0;O<B.length;++O){const j=B[O];l.push(k+j)}f=m+(f.length>0?" "+f:f)}return f},w8=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=H3(n))&&(s&&(s+=" "),s+=r);return s},H3=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=H3(e[r]))&&(n&&(n+=" "),n+=t);return n},A8=(e,...t)=>{let n,r,s,o;const l=f=>{const d=t.reduce((m,p)=>p(m),e());return n=v8(d),r=n.cache.get,s=n.cache.set,o=c,c(f)},c=f=>{const d=r(f);if(d)return d;const m=C8(f,n);return s(f,m),m};return o=l,(...f)=>o(w8(...f))},_8=[],gn=e=>{const t=n=>n[e]||_8;return t.isThemeGetter=!0,t},z3=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,V3=/^\((?:(\w[\w-]*):)?(.+)\)$/i,k8=/^\d+\/\d+$/,N8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,R8=/\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$/,D8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,O8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,M8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xl=e=>k8.test(e),it=e=>!!e&&!Number.isNaN(Number(e)),Ks=e=>!!e&&Number.isInteger(Number(e)),Ug=e=>e.endsWith("%")&&it(e.slice(0,-1)),us=e=>N8.test(e),I8=()=>!0,L8=e=>R8.test(e)&&!D8.test(e),q3=()=>!1,P8=e=>O8.test(e),j8=e=>M8.test(e),B8=e=>!Oe(e)&&!Me(e),F8=e=>lu(e,G3,q3),Oe=e=>z3.test(e),Ga=e=>lu(e,K3,L8),Hg=e=>lu(e,q8,it),oC=e=>lu(e,$3,q3),U8=e=>lu(e,Y3,j8),ah=e=>lu(e,Q3,P8),Me=e=>V3.test(e),mc=e=>uu(e,K3),H8=e=>uu(e,$8),lC=e=>uu(e,$3),z8=e=>uu(e,G3),V8=e=>uu(e,Y3),oh=e=>uu(e,Q3,!0),lu=(e,t,n)=>{const r=z3.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},uu=(e,t,n=!1)=>{const r=V3.exec(e);return r?r[1]?t(r[1]):n:!1},$3=e=>e==="position"||e==="percentage",Y3=e=>e==="image"||e==="url",G3=e=>e==="length"||e==="size"||e==="bg-size",K3=e=>e==="length",q8=e=>e==="number",$8=e=>e==="family-name",Q3=e=>e==="shadow",Y8=()=>{const e=gn("color"),t=gn("font"),n=gn("text"),r=gn("font-weight"),s=gn("tracking"),o=gn("leading"),l=gn("breakpoint"),c=gn("container"),f=gn("spacing"),d=gn("radius"),m=gn("shadow"),p=gn("inset-shadow"),b=gn("text-shadow"),x=gn("drop-shadow"),S=gn("blur"),C=gn("perspective"),w=gn("aspect"),A=gn("ease"),N=gn("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"],B=()=>[...R(),Me,Oe],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],P=()=>[Me,Oe,f],q=()=>[xl,"full","auto",...P()],L=()=>[Ks,"none","subgrid",Me,Oe],X=()=>["auto",{span:["full",Ks,Me,Oe]},Ks,Me,Oe],Q=()=>[Ks,"auto",Me,Oe],ee=()=>["auto","min","max","fr",Me,Oe],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...P()],H=()=>[xl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],$=()=>[e,Me,Oe],te=()=>[...R(),lC,oC,{position:[Me,Oe]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",z8,F8,{size:[Me,Oe]}],ie=()=>[Ug,mc,Ga],I=()=>["","none","full",d,Me,Oe],de=()=>["",it,mc,Ga],xe=()=>["solid","dashed","dotted","double"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>[it,Ug,lC,oC],Se=()=>["","none",S,Me,Oe],Ce=()=>["none",it,Me,Oe],Pe=()=>["none",it,Me,Oe],_e=()=>[it,Me,Oe],je=()=>[xl,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[us],breakpoint:[us],color:[I8],container:[us],"drop-shadow":[us],ease:["in","out","in-out"],font:[B8],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[us],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[us],shadow:[us],spacing:["px",it],text:[us],"text-shadow":[us],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xl,Oe,Me,w]}],container:["container"],columns:[{columns:[it,Oe,Me,c]}],"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:B()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:q()}],"inset-x":[{"inset-x":q()}],"inset-y":[{"inset-y":q()}],start:[{start:q()}],end:[{end:q()}],top:[{top:q()}],right:[{right:q()}],bottom:[{bottom:q()}],left:[{left:q()}],visibility:["visible","invisible","collapse"],z:[{z:[Ks,"auto",Me,Oe]}],basis:[{basis:[xl,"full","auto",c,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[it,xl,"auto","initial","none",Oe]}],grow:[{grow:["",it,Me,Oe]}],shrink:[{shrink:["",it,Me,Oe]}],order:[{order:[Ks,"first","last","none",Me,Oe]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],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:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"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:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"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,mc,Ga]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Me,Hg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ug,Oe]}],"font-family":[{font:[H8,Oe,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,Me,Oe]}],"line-clamp":[{"line-clamp":[it,"none",Me,Hg]}],leading:[{leading:[o,...P()]}],"list-image":[{"list-image":["none",Me,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Me,Oe]}],"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",Me,Ga]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[it,"auto",Me,Oe]}],"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",Me,Oe]}],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",Me,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ks,Me,Oe],radial:["",Me,Oe],conic:[Ks,Me,Oe]},V8,U8]}],"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:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"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,Me,Oe]}],"outline-w":[{outline:["",it,mc,Ga]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",m,oh,ah]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",p,oh,ah]}],"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",b,oh,ah]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[it,Me,Oe]}],"mix-blend":[{"mix-blend":[...Te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Te()}],"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":[Me,Oe]}],"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:te()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Me,Oe]}],filter:[{filter:["","none",Me,Oe]}],blur:[{blur:Se()}],brightness:[{brightness:[it,Me,Oe]}],contrast:[{contrast:[it,Me,Oe]}],"drop-shadow":[{"drop-shadow":["","none",x,oh,ah]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",it,Me,Oe]}],"hue-rotate":[{"hue-rotate":[it,Me,Oe]}],invert:[{invert:["",it,Me,Oe]}],saturate:[{saturate:[it,Me,Oe]}],sepia:[{sepia:["",it,Me,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",Me,Oe]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[it,Me,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[it,Me,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",it,Me,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[it,Me,Oe]}],"backdrop-invert":[{"backdrop-invert":["",it,Me,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[it,Me,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[it,Me,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",it,Me,Oe]}],"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",Me,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[it,"initial",Me,Oe]}],ease:[{ease:["linear","initial",A,Me,Oe]}],delay:[{delay:[it,Me,Oe]}],animate:[{animate:["none",N,Me,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,Me,Oe]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],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:[Me,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:je()}],"translate-x":[{"translate-x":je()}],"translate-y":[{"translate-y":je()}],"translate-z":[{"translate-z":je()}],"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",Me,Oe]}],"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",Me,Oe]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[it,mc,Ga,Hg]}],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"]}},X3=A8(Y8);function Ye(...e){return X3(By(e))}function W3(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 c=[];for(let f=0;f<r.length&&s<n.length;f++)r[f]===n[s]?(s++,l++,o+=l,c.push(f)):l=0;return{match:s===n.length,score:o,indices:c}}async function Gn(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 G8{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 Gn(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 Gn(this.baseUrl,`/sessions${r?`?${r}`:""}`)}getSession(t,n){const r=new URLSearchParams;n&&r.set("cwd",n);const s=r.toString();return Gn(this.baseUrl,`/sessions/${t}${s?`?${s}`:""}`)}updateSession(t,n,r){const s=new URLSearchParams;r&&s.set("cwd",r);const o=s.toString();return Gn(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"},c=this.etagCache.get(t);c&&(l["If-None-Match"]=c);const f=await fetch(`${this.baseUrl}${o}`,{headers:l});if(f.status===304){const p=this.messageCache.get(t);if(p)return p;throw new Error("304 received but no cached response available")}if(!f.ok){const p=await f.json().catch(()=>({error:f.statusText}));throw new Error(p.error||`HTTP ${f.status}`)}const d=await f.json(),m=f.headers.get("ETag");return m&&(this.etagCache.set(t,m),this.messageCache.set(t,d)),d}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 c=l.body.getReader(),f=new TextDecoder;let d="";for(;;){const{done:m,value:p}=await c.read();if(m)break;d+=f.decode(p,{stream:!0});const b=d.split(`
56
- `);d=b.pop()||"";let x="";for(const S of b)if(S.startsWith("event: "))x=S.slice(7).trim();else if(S.startsWith("data: ")&&x){const C=JSON.parse(S.slice(6));r({type:x,data:C}),x=""}}}approveTool(t,n){return Gn(this.baseUrl,`/sessions/${t}/approve`,{method:"POST",body:JSON.stringify({toolCallId:n})})}denyTool(t,n){return Gn(this.baseUrl,`/sessions/${t}/deny`,{method:"POST",body:JSON.stringify({toolCallId:n})})}submitAnswers(t,n,r){return Gn(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 Gn(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 Gn(this.baseUrl,`/directory${s?`?${s}`:""}`)}getDefaultCwd(){return Gn(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 Gn(this.baseUrl,`/commands${s?`?${s}`:""}`)}getGitStatus(t){const n=new URLSearchParams;t&&n.set("dir",t);const r=n.toString();return Gn(this.baseUrl,`/git/status${r?`?${r}`:""}`)}health(){return Gn(this.baseUrl,"/health")}listFiles(t){const n=new URLSearchParams({cwd:t});return Gn(this.baseUrl,`/files?${n}`)}getConfig(){return Gn(this.baseUrl,"/config")}}function Kn(e){return typeof e=="string"?e:""}function zg(e){if(!e)return"...";const t=e.split("/");return t[t.length-1]||"..."}function K8(e){if(!e)return"...";try{return new URL(e).hostname}catch{return e.slice(0,30)}}function pc(e,t){return e?e.length>t?e.slice(0,t)+"…":e:"..."}function lh(e){return!e||e==="..."?'"…"':`"${e}"`}function Q8(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 ${lh(pc(Kn(n.description)||Kn(n.command),40))}`;case"Read":return`Read ${zg(Kn(n.file_path))}`;case"Write":return`Write ${zg(Kn(n.file_path))}`;case"Edit":return`Edit ${zg(Kn(n.file_path))}`;case"Glob":return`Find ${Kn(n.pattern)||"..."}`;case"Grep":return`Search ${lh(pc(Kn(n.pattern),30))}`;case"Task":return`Agent: ${pc(Kn(n.description)||Kn(n.prompt),40)}`;case"TaskCreate":return`Create task ${lh(pc(Kn(n.subject),35))}`;case"TaskUpdate":{const r=Kn(n.taskId),s=Kn(n.status);return s?`Update task #${r} → ${s}`:`Update task #${r}`}case"TaskList":return"List tasks";case"Skill":return`Skill ${Kn(n.skill)||"..."}`;case"WebSearch":return`Search ${lh(pc(Kn(n.query),35))}`;case"WebFetch":return`Fetch ${K8(Kn(n.url))}`;default:return e}}function Z3(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,t=>t.toUpperCase())}function X8(e,t){return e.length<=t?e:e.slice(0,t)+"…"}function W8(e){return/^[/~.]/.test(e)||/\.(ts|tsx|js|jsx|json|md|py|rs|go|sh|yml|yaml|toml)$/.test(e)}function Tb(e,t){if(e===null)return g.jsx("span",{className:"text-muted-foreground italic",children:"null"});if(typeof e=="boolean")return g.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:String(e)});if(typeof e=="number")return g.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:e});if(typeof e=="string"){const n=X8(e,t);return W8(e)?g.jsx("code",{className:"bg-muted rounded px-1 py-0.5 text-xs break-all",children:n}):g.jsx("span",{className:"break-words",children:n})}if(Array.isArray(e)){const n=e.slice(0,5),r=e.length-5;return g.jsxs("div",{className:"space-y-0.5",children:[n.map((s,o)=>g.jsx("div",{className:"border-border/40 border-l pl-2",children:Tb(s,80)},o)),r>0&&g.jsxs("span",{className:"text-muted-foreground text-xs italic",children:["… and ",r," more"]})]})}if(typeof e=="object"){const n=Object.entries(e);return g.jsx("div",{className:"space-y-0.5",children:n.map(([r,s])=>g.jsxs("div",{className:"border-border/40 border-l pl-2",children:[g.jsxs("span",{className:"text-muted-foreground text-xs",children:[Z3(r),": "]}),typeof s=="object"&&s!==null?g.jsx("span",{className:"text-muted-foreground italic",children:"{..."}):Tb(s,80)]},r))})}return g.jsx("span",{children:String(e)})}function J3({toolName:e,input:t}){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return g.jsx("pre",{className:"overflow-x-auto text-xs whitespace-pre-wrap",children:t})}if(typeof n!="object"||n===null||Array.isArray(n))return g.jsx("pre",{className:"overflow-x-auto text-xs whitespace-pre-wrap",children:t});const r=Object.entries(n);return r.length===0?null:g.jsx("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs",children:r.map(([s,o])=>g.jsxs("div",{className:"contents",children:[g.jsx("dt",{className:"text-muted-foreground py-0.5 font-medium whitespace-nowrap",children:Z3(s)}),g.jsx("dd",{className:"min-w-0 py-0.5",children:Tb(o,120)})]},s))})}const uC=["😀","😎","🤖","🦊","🐱","🐶","🦁","🐸","🐵","🦄","🐲","🦉","🐧","🐼","🦋","🌸","🔮","🎯","🚀","⚡","🌊","🍀","🎨","🎵","💎","🔥","🌈","⭐","🧠","👾"];function ek(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619>>>0;return t}function Z8(e){return`hsl(${ek(e)%360}, 70%, 55%)`}function J8(e){return uC[ek(e)%uC.length]}function e9(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 t9(e,t=20,n=.3){return new Promise((r,s)=>{const o=new Image;o.onload=()=>{const l=[];for(let c=0;c<t;c++){const d=1-Math.sin(c/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=d,p.drawImage(o,0,0),l.push(m.toDataURL("image/png"))}r(l)},o.onerror=s,o.src=e})}function Vg(e){let t=document.querySelector("link[rel*='icon']");t||(t=document.createElement("link"),t.rel="icon",document.head.appendChild(t)),t.href=e}let uh=null;function n9(){try{uh||(uh=new Audio("/notification.wav")),uh.currentTime=0,uh.play().catch(()=>{})}catch{}}const Jn={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"},cC={small:"0.9",medium:"1",large:"1.15"},r9=10,ys={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},fC={MS_PER_MINUTE:6e4,MS_PER_HOUR:36e5},fi={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},i9=["Today","Yesterday","Previous 7 Days","Previous 30 Days","Older"];function s9(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 c of e){const f=new Date(c.updatedAt);f>=n?l.Today.push(c):f>=r?l.Yesterday.push(c):f>=s?l["Previous 7 Days"].push(c):f>=o?l["Previous 30 Days"].push(c):l.Older.push(c)}return i9.map(c=>({label:c,sessions:l[c]})).filter(c=>c.sessions.length>0)}function a9(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,"~")}function tk(e){const t=new Date,n=new Date(e),r=t.getTime()-n.getTime(),s=Math.floor(r/fC.MS_PER_MINUTE),o=Math.floor(r/fC.MS_PER_HOUR),l=new Date(t.getFullYear(),t.getMonth(),t.getDate()),c=new Date(l);c.setDate(c.getDate()-1);const f=new Date(l);if(f.setDate(f.getDate()-7),n>=l)return s<1?"Just now":s<60?`${s}m ago`:`${o}h ago`;const d=n.toLocaleTimeString("en-US",{hour:"numeric",hour12:!0}).toLowerCase();return n>=c?`Yesterday, ${d}`:n>=f?`${n.toLocaleDateString("en-US",{weekday:"short"})}, ${d}`:`${n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}, ${d}`}const Zh=[{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"}],kc="inter";function qg(e){return Zh.find(t=>t.key===e)??Zh.find(t=>t.key===kc)}function o9(e){return Zh.some(t=>t.key===e)}const vb="google-fonts-link";function $g(e){let t=document.getElementById(vb);t?t.href=e:(t=document.createElement("link"),t.id=vb,t.rel="stylesheet",t.href=e,document.head.appendChild(t))}function l9(){var e;(e=document.getElementById(vb))==null||e.remove()}function Yg(e,t){document.documentElement.style.setProperty("--font-sans",e),document.documentElement.style.setProperty("--font-mono",t)}function u9(){document.documentElement.style.removeProperty("--font-sans"),document.documentElement.style.removeProperty("--font-mono")}class c9{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(c=>r-c<this.config.debounceWindowMs);const s=n.length,o=n.filter(c=>c.status==="completed").length;if(s>=this.config.minTasksForMajor&&o===s){this.cancelDebounce();const c={level:"major",taskId:t,timestamp:r};this.emitOrQueue(c);return}if(this.recentCompletions.length>=this.config.debounceThreshold){this.cancelDebounce(),this.debounceTimer=setTimeout(()=>{const c={level:"mini",taskId:t,timestamp:Date.now()};this.emitOrQueue(c),this.recentCompletions=[]},this.config.debounceWindowMs);return}if(Math.random()<this.config.miniProbability){const c={level:"mini",taskId:t,timestamp:r};this.emitOrQueue(c)}}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 f9(e){const t=(await ky(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 d9={background:"radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 70%)"};function Qn(e,t){try{const n=localStorage.getItem(e);return n===null?t:n==="true"}catch{return t}}function Xn(e,t){try{localStorage.setItem(e,String(t))}catch{}}const Ct={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",verboseLogging:"dorkos-verbose-logging"},h9={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,verboseLogging:!1},Gt=e8()(s8(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,r9);try{localStorage.setItem(Jn.RECENT_CWDS,JSON.stringify(s))}catch{}return{selectedCwd:t,recentCwds:s}}),recentCwds:(()=>{try{return JSON.parse(localStorage.getItem(Jn.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:Qn(Ct.showTimestamps,!1),setShowTimestamps:t=>{Xn(Ct.showTimestamps,t),e({showTimestamps:t})},expandToolCalls:Qn(Ct.expandToolCalls,!1),setExpandToolCalls:t=>{Xn(Ct.expandToolCalls,t),e({expandToolCalls:t})},autoHideToolCalls:Qn(Ct.autoHideToolCalls,!0),setAutoHideToolCalls:t=>{Xn(Ct.autoHideToolCalls,t),e({autoHideToolCalls:t})},showShortcutChips:Qn(Ct.showShortcutChips,!0),setShowShortcutChips:t=>{Xn(Ct.showShortcutChips,t),e({showShortcutChips:t})},showStatusBarCwd:Qn(Ct.showStatusBarCwd,!0),setShowStatusBarCwd:t=>{Xn(Ct.showStatusBarCwd,t),e({showStatusBarCwd:t})},showStatusBarPermission:Qn(Ct.showStatusBarPermission,!0),setShowStatusBarPermission:t=>{Xn(Ct.showStatusBarPermission,t),e({showStatusBarPermission:t})},showStatusBarModel:Qn(Ct.showStatusBarModel,!0),setShowStatusBarModel:t=>{Xn(Ct.showStatusBarModel,t),e({showStatusBarModel:t})},showStatusBarCost:Qn(Ct.showStatusBarCost,!0),setShowStatusBarCost:t=>{Xn(Ct.showStatusBarCost,t),e({showStatusBarCost:t})},showStatusBarContext:Qn(Ct.showStatusBarContext,!0),setShowStatusBarContext:t=>{Xn(Ct.showStatusBarContext,t),e({showStatusBarContext:t})},showStatusBarGit:Qn(Ct.showStatusBarGit,!0),setShowStatusBarGit:t=>{Xn(Ct.showStatusBarGit,t),e({showStatusBarGit:t})},showTaskCelebrations:Qn(Ct.showTaskCelebrations,!0),setShowTaskCelebrations:t=>{Xn(Ct.showTaskCelebrations,t),e({showTaskCelebrations:t})},enableNotificationSound:Qn(Ct.enableNotificationSound,!0),setEnableNotificationSound:t=>{Xn(Ct.enableNotificationSound,t),e({enableNotificationSound:t})},showStatusBarSound:Qn(Ct.showStatusBarSound,!0),setShowStatusBarSound:t=>{Xn(Ct.showStatusBarSound,t),e({showStatusBarSound:t})},showStatusBarVersion:Qn(Ct.showStatusBarVersion,!0),setShowStatusBarVersion:t=>{Xn(Ct.showStatusBarVersion,t),e({showStatusBarVersion:t})},verboseLogging:Qn(Ct.verboseLogging,!1),setVerboseLogging:t=>{Xn(Ct.verboseLogging,t),e({verboseLogging:t})},fontSize:(()=>{try{const t=localStorage.getItem(Jn.FONT_SIZE);if(t==="small"||t==="medium"||t==="large")return document.documentElement.style.setProperty("--user-font-scale",cC[t]),t}catch{}return"medium"})(),setFontSize:t=>{try{localStorage.setItem(Jn.FONT_SIZE,t)}catch{}document.documentElement.style.setProperty("--user-font-scale",cC[t]),e({fontSize:t})},fontFamily:(()=>{try{const t=localStorage.getItem(Jn.FONT_FAMILY),n=o9(t??"")?t:kc,r=qg(n);return r.googleFontsUrl&&$g(r.googleFontsUrl),r.key!=="system"&&Yg(r.sans,r.mono),n}catch{return kc}})(),setFontFamily:t=>{try{localStorage.setItem(Jn.FONT_FAMILY,t)}catch{}const n=qg(t);n.googleFontsUrl?$g(n.googleFontsUrl):l9(),n.key!=="system"?Yg(n.sans,n.mono):u9(),e({fontFamily:t})},resetPreferences:()=>{try{for(const n of Object.values(Ct))localStorage.removeItem(n);localStorage.removeItem(Jn.FONT_SIZE),localStorage.removeItem(Jn.FONT_FAMILY)}catch{}document.documentElement.style.setProperty("--user-font-scale","1");const t=qg(kc);t.googleFontsUrl&&$g(t.googleFontsUrl),Yg(t.sans,t.mono),e({...h9,devtoolsOpen:!1,fontSize:"medium",fontFamily:kc})},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"})),nk="dorkos-theme",m9="(prefers-color-scheme: dark)";function p9(){const e=localStorage.getItem(nk);return e==="light"||e==="dark"||e==="system"?e:"system"}function ch(e){document.documentElement.classList.toggle("dark",e)}function rk(){const[e,t]=E.useState(p9),n=E.useCallback(r=>{localStorage.setItem(nk,r),t(r)},[]);return E.useEffect(()=>{if(e==="system"){if(typeof window.matchMedia!="function"){ch(!1);return}const r=window.matchMedia(m9);ch(r.matches);const s=o=>ch(o.matches);return r.addEventListener("change",s),()=>r.removeEventListener("change",s)}ch(e==="dark")},[e]),{theme:e,setTheme:n}}const dC=768;function Ao(){const[e,t]=E.useState(()=>typeof window>"u"?!1:window.matchMedia(`(max-width: ${dC-1}px)`).matches);return E.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 g9=100;function b9({cwd:e,isStreaming:t}){const n=E.useRef(""),r=E.useRef([]),s=E.useRef(null),o=E.useRef(0),l=E.useRef(t);E.useEffect(()=>{l.current=t},[t]);const c=E.useCallback(()=>{s.current&&(clearInterval(s.current),s.current=null),r.current.length!==0&&(o.current=0,s.current=window.setInterval(()=>{const d=r.current;d.length!==0&&(Vg(d[o.current]),o.current=(o.current+1)%d.length)},g9))},[]),f=E.useCallback(()=>{s.current&&(clearInterval(s.current),s.current=null),n.current&&Vg(n.current)},[]);E.useEffect(()=>{if(!e)return;const d=Z8(e),m=e9(d);n.current=m,r.current=[],Vg(m);let p=!1;return t9(m).then(b=>{p||(r.current=b,l.current&&c())}),()=>{p=!0}},[e,c]),E.useEffect(()=>(t?c():f(),f),[t,c,f])}function hC(e,t,n){const r=J8(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 y9({cwd:e,activeForm:t,isStreaming:n,isWaitingForUser:r}){const s=E.useRef(document.hidden),o=E.useRef(!1),l=E.useRef(n),c=E.useRef(e),f=E.useRef(t),d=E.useRef(r);E.useEffect(()=>{c.current=e,f.current=t,d.current=r},[e,t,r]),E.useEffect(()=>{const m=()=>{if(s.current=document.hidden,!document.hidden&&o.current&&(o.current=!1,c.current)){const p=d.current?"🔔 ":"";document.title=hC(c.current,f.current,p)}};return document.addEventListener("visibilitychange",m),()=>document.removeEventListener("visibilitychange",m)},[]),E.useEffect(()=>{l.current&&!n&&s.current&&(o.current=!0),l.current=n},[n]),E.useEffect(()=>{if(!e){document.title="DorkOS";return}let m="";r?m="🔔 ":o.current&&(m="🏁 "),document.title=hC(e,t,m)},[e,t,n,r])}function x9(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 E9(e){const[t,n]=E.useState(()=>Date.now()),r=E.useRef(null);if(E.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:x9(s),ms:s}}function T9(e={}){const{timeoutMs:t=3e4,onIdle:n,onReturn:r}=e,s=E.useRef(!1),o=E.useRef(null),l=E.useCallback(()=>{s.current||(s.current=!0,n==null||n())},[n]),c=E.useCallback(()=>{s.current&&(s.current=!1,r==null||r())},[r]),f=E.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(l,t),c()},[t,l,c]);return E.useEffect(()=>{o.current=setTimeout(l,t);const d=["mousemove","keydown","scroll","touchstart"];d.forEach(p=>document.addEventListener(p,f,{passive:!0}));const m=()=>{document.hidden?l():f()};return document.addEventListener("visibilitychange",m),()=>{o.current&&clearTimeout(o.current),d.forEach(p=>document.removeEventListener(p,f)),document.removeEventListener("visibilitychange",m)}},[t,l,f]),{isIdle:s.current}}function v9({activeInteraction:e,onApprove:t,onDeny:n,onToggleOption:r,onNavigateOption:s,onNavigateQuestion:o,onSubmit:l,optionCount:c=0,focusedIndex:f=0}){const d=E.useRef(!1);E.useEffect(()=>{d.current=!1},[e==null?void 0:e.toolCallId]),E.useEffect(()=>{if(!e)return;function m(p){const b=p.target,x=(b.tagName==="TEXTAREA"||b.tagName==="INPUT")&&!b.disabled;if(!d.current){if(e.type==="approval"){p.key==="Enter"?(p.preventDefault(),d.current=!0,t==null||t()):p.key==="Escape"&&(p.preventDefault(),d.current=!0,n==null||n());return}if(e.type==="question"){if(x){p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),l==null||l());return}const S=parseInt(p.key,10);if(S>=1&&S<=9){p.preventDefault(),S-1<c&&(r==null||r(S-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(f);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,c,f])}function ik(e,t,n){try{return e(t)}catch(r){return AP("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),t,r,n),null}}function vs(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),ik(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}}}}vs({parse:e=>e,serialize:String});vs({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});vs({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});vs({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}});vs({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});vs({parse:e=>e.toLowerCase()==="true",serialize:String});function Uy(e,t){return e.valueOf()===t.valueOf()}vs({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:Uy});vs({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:Uy});vs({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:Uy});const Gg=jy(),S9={};function C9(e,t={}){const n=E.useId(),r=IP(),s=LP(),{history:o="replace",scroll:l=(r==null?void 0:r.scroll)??!1,shallow:c=(r==null?void 0:r.shallow)??!0,throttleMs:f=Lc.timeMs,limitUrlUpdates:d=r==null?void 0:r.limitUrlUpdates,clearOnDefault:m=(r==null?void 0:r.clearOnDefault)??!0,startTransition:p,urlKeys:b=S9}=t,x=Object.keys(e).join(","),S=E.useMemo(()=>Object.fromEntries(Object.keys(e).map(P=>[P,b[P]??P])),[x,JSON.stringify(b)]),C=MP(Object.values(S)),w=C.searchParams,A=E.useRef({}),N=E.useMemo(()=>Object.fromEntries(Object.keys(e).map(P=>[P,e[P].defaultValue??null])),[Object.values(e).map(({defaultValue:P})=>P).join(",")]),k=Bg.useQueuedQueries(Object.values(S)),[R,B]=E.useState(()=>Kg(e,b,w??new URLSearchParams,k).state),O=E.useRef(R);if(Yt("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,x,R,w),Object.keys(A.current).join("&")!==Object.values(S).join("&")){const{state:P,hasChanged:q}=Kg(e,b,w,k,A.current,O.current);q&&(Yt("[nuq+ %s `%s`] State changed: %O",n,x,{state:P,initialSearchParams:w,queuedQueries:k,queryRef:A.current,stateRef:O.current}),O.current=P,B(P)),A.current=Object.fromEntries(Object.entries(S).map(([L,X])=>{var Q;return[X,((Q=e[L])==null?void 0:Q.type)==="multi"?w==null?void 0:w.getAll(X):(w==null?void 0:w.get(X))??null]}))}E.useEffect(()=>{const{state:P,hasChanged:q}=Kg(e,b,w,k,A.current,O.current);q&&(Yt("[nuq+ %s `%s`] State changed: %O",n,x,{state:P,initialSearchParams:w,queuedQueries:k,queryRef:A.current,stateRef:O.current}),O.current=P,B(P))},[Object.values(S).map(P=>`${P}=${w==null?void 0:w.getAll(P)}`).join("&"),JSON.stringify(k)]),E.useEffect(()=>{const P=Object.keys(e).reduce((q,L)=>(q[L]=({state:X,query:Q})=>{B(ee=>{const{defaultValue:ne}=e[L],Z=S[L],D=X??ne??null,H=ee[L]??ne??null;return Object.is(H,D)?(Yt("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,x,Z,X,ne,O.current),ee):(O.current={...O.current,[L]:D},A.current[Z]=Q,Yt("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,x,Z,X,ne,O.current),O.current)})},q),{});for(const q of Object.keys(e)){const L=S[q];Yt("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,L,x),Gg.on(L,P[q])}return()=>{for(const q of Object.keys(e)){const L=S[q];Yt("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,L,x),Gg.off(L,P[q])}}},[x,S]);const j=E.useCallback((P,q={})=>{var H,$,te,F,V,ie;const L=Object.fromEntries(Object.keys(e).map(I=>[I,null])),X=typeof P=="function"?P(mC(O.current,N))??L:P??L;Yt("[nuq+ %s `%s`] setState: %O",n,x,X);let Q,ee=0,ne=!1;const Z=[];for(let[I,de]of Object.entries(X)){const xe=e[I],Te=S[I];if(!xe||de===void 0)continue;(q.clearOnDefault??xe.clearOnDefault??m)&&de!==null&&xe.defaultValue!==void 0&&(xe.eq??((Ce,Pe)=>Ce===Pe))(de,xe.defaultValue)&&(de=null);const he=de===null?null:(xe.serialize??String)(de);Gg.emit(Te,{state:de,query:he});const Se={key:Te,query:he,options:{history:q.history??xe.history??o,shallow:q.shallow??xe.shallow??c,scroll:q.scroll??xe.scroll??l,startTransition:q.startTransition??xe.startTransition??p}};if(((H=q==null?void 0:q.limitUrlUpdates)==null?void 0:H.method)==="debounce"||(d==null?void 0:d.method)==="debounce"||(($=xe.limitUrlUpdates)==null?void 0:$.method)==="debounce"){Se.options.shallow===!0&&console.warn(Sf(422));const Ce=((te=q==null?void 0:q.limitUrlUpdates)==null?void 0:te.timeMs)??(d==null?void 0:d.timeMs)??((F=xe.limitUrlUpdates)==null?void 0:F.timeMs)??Lc.timeMs,Pe=Bg.push(Se,Ce,C,s);ee<Ce&&(Q=Pe,ee=Ce)}else{const Ce=((V=q==null?void 0:q.limitUrlUpdates)==null?void 0:V.timeMs)??((ie=xe==null?void 0:xe.limitUrlUpdates)==null?void 0:ie.timeMs)??(d==null?void 0:d.timeMs)??q.throttleMs??xe.throttleMs??f;Z.push(Bg.abort(Te)),Ih.push(Se,Ce),ne=!0}}const D=Z.reduce((I,de)=>de(I),ne?Ih.flush(C,s):Ih.getPendingPromise(C));return Q??D},[x,o,c,l,f,d==null?void 0:d.method,d==null?void 0:d.timeMs,p,S,C.updateUrl,C.getSearchParamsSnapshot,C.rateLimitFactor,s,N]);return[E.useMemo(()=>mC(R,N),[R,N]),j]}function Kg(e,t,n,r,s,o){let l=!1;const c=Object.entries(e).reduce((f,[d,m])=>{const p=(t==null?void 0:t[d])??d,b=r[p],x=m.type==="multi"?[]:null,S=b===void 0?(m.type==="multi"?n==null?void 0:n.getAll(p):n==null?void 0:n.get(p))??x:b;return s&&o&&M3(s[p]??x,S)?(f[d]=o[d]??null,f):(l=!0,f[d]=(BP(S)?null:ik(m.parse,S,p))??null,s&&(s[p]=S),f)},{});if(!l){const f=Object.keys(e),d=Object.keys(o??{});l=f.length!==d.length||f.some(m=>!d.includes(m))}return{state:c,hasChanged:l}}function mC(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function sk(e,t={}){const{parse:n,type:r,serialize:s,eq:o,defaultValue:l,...c}=t,[{[e]:f},d]=C9({[e]:{parse:n??(m=>m),type:r,serialize:s,eq:o,defaultValue:l}},c);return[f,E.useCallback((m,p={})=>d(b=>({[e]:typeof m=="function"?m(b[e]):m}),p),[e,d])]}function km(){Gt(n=>n.sessionId),Gt(n=>n.setSessionId);const[e,t]=sk("session");return[e,t]}const w9="claude-sonnet-4-5-20250929",A9={"claude-opus-4":2e5,"claude-sonnet-4":2e5,"claude-haiku-4":2e5,"claude-sonnet-3":2e5,"claude-haiku-3":2e5};function _9(e){for(const[t,n]of Object.entries(A9))if(e.startsWith(t))return n;return null}function ak(e,t,n){const r=Dr(),s=vf(),o=Gt(w=>w.selectedCwd),[l,c]=E.useState(null),[f,d]=E.useState(null),{data:m}=gi({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)??w9,b=(t==null?void 0:t.contextTokens)??(m==null?void 0:m.contextTokens)??null,x=(t==null?void 0:t.contextMaxTokens)??_9(p),S={permissionMode:f??(m==null?void 0:m.permissionMode)??"default",model:p,costUsd:(t==null?void 0:t.costUsd)??null,contextPercent:b&&x?Math.min(100,Math.round(b/x*100)):null,isStreaming:n,cwd:(m==null?void 0:m.cwd)??null},C=E.useCallback(async w=>{w.model&&c(w.model),w.permissionMode&&d(w.permissionMode);try{const A=await r.updateSession(e,w,o??void 0);return s.setQueryData(["session",e,o],A),w.model&&c(null),w.permissionMode&&d(null),A}catch{w.model&&c(null),w.permissionMode&&d(null)}},[r,e,o,s]);return{...S,updateSession:C}}function k9(){const e=Dr(),t=Gt(s=>s.selectedCwd),n=Gt(s=>s.setSelectedCwd),{data:r}=gi({queryKey:["defaultCwd"],queryFn:()=>e.getDefaultCwd(),enabled:t===null,staleTime:1/0,refetchOnMount:!1,refetchOnReconnect:!1});E.useEffect(()=>{r!=null&&r.path&&t===null&&n(r.path)},[r,t,n])}function Nm(){const e=Gt(o=>o.selectedCwd),t=Gt(o=>o.setSelectedCwd),[n,r]=sk("dir"),[,s]=km();return E.useEffect(()=>{n&&n!==e&&t(n)},[n]),[n??e,o=>{o?(r(o),t(o),s(null)):r(null)}]}const Hy=E.createContext({});function Rm(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const ok=typeof window<"u",lk=ok?E.useLayoutEffect:E.useEffect,Dm=E.createContext(null);function zy(e,t){e.indexOf(t)===-1&&e.push(t)}function Jh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Bi=(e,t,n)=>n>t?t:n<e?e:n;let Vy=()=>{};const xs={},uk=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ck(e){return typeof e=="object"&&e!==null}const fk=e=>/^0[^.\s]+$/u.test(e);function qy(e){let t;return()=>(t===void 0&&(t=e()),t)}const Qr=e=>e,N9=(e,t)=>n=>t(e(n)),Cf=(...e)=>e.reduce(N9),ef=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class $y{constructor(){this.subscriptions=[]}add(t){return zy(this.subscriptions,t),()=>Jh(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 di=e=>e*1e3,Kr=e=>e/1e3;function dk(e,t){return t?e*(1e3/t):0}const hk=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,R9=1e-7,D9=12;function O9(e,t,n,r,s){let o,l,c=0;do l=t+(n-t)/2,o=hk(l,r,s)-e,o>0?n=l:t=l;while(Math.abs(o)>R9&&++c<D9);return l}function wf(e,t,n,r){if(e===t&&n===r)return Qr;const s=o=>O9(o,0,1,e,n);return o=>o===0||o===1?o:hk(s(o),t,r)}const mk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pk=e=>t=>1-e(1-t),gk=wf(.33,1.53,.69,.99),Yy=pk(gk),bk=mk(Yy),yk=e=>(e*=2)<1?.5*Yy(e):.5*(2-Math.pow(2,-10*(e-1))),Gy=e=>1-Math.sin(Math.acos(e)),xk=pk(Gy),Ek=mk(Gy),M9=wf(.42,0,1,1),I9=wf(0,0,.58,1),Tk=wf(.42,0,.58,1),L9=e=>Array.isArray(e)&&typeof e[0]!="number",vk=e=>Array.isArray(e)&&typeof e[0]=="number",P9={linear:Qr,easeIn:M9,easeInOut:Tk,easeOut:I9,circIn:Gy,circInOut:Ek,circOut:xk,backIn:Yy,backInOut:bk,backOut:gk,anticipate:yk},j9=e=>typeof e=="string",pC=e=>{if(vk(e)){Vy(e.length===4);const[t,n,r,s]=e;return wf(t,n,r,s)}else if(j9(e))return P9[e];return e},fh=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function B9(e,t){let n=new Set,r=new Set,s=!1,o=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function f(m){l.has(m)&&(d.schedule(m),e()),m(c)}const d={schedule:(m,p=!1,b=!1)=>{const S=b&&s?n:r;return p&&l.add(m),S.has(m)||S.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(c=m,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(f),n.clear(),s=!1,o&&(o=!1,d.process(m))}};return d}const F9=40;function Sk(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=fh.reduce((k,R)=>(k[R]=B9(o),k),{}),{setup:c,read:f,resolveKeyframes:d,preUpdate:m,update:p,preRender:b,render:x,postRender:S}=l,C=()=>{const k=xs.useManualTiming?s.timestamp:performance.now();n=!1,xs.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(k-s.timestamp,F9),1)),s.timestamp=k,s.isProcessing=!0,c.process(s),f.process(s),d.process(s),m.process(s),p.process(s),b.process(s),x.process(s),S.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(C))},w=()=>{n=!0,r=!0,s.isProcessing||e(C)};return{schedule:fh.reduce((k,R)=>{const B=l[R];return k[R]=(O,j=!1,P=!1)=>(n||w(),B.schedule(O,j,P)),k},{}),cancel:k=>{for(let R=0;R<fh.length;R++)l[fh[R]].cancel(k)},state:s,steps:l}}const{schedule:Ft,cancel:ba,state:Pn,steps:Qg}=Sk(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qr,!0);let Lh;function U9(){Lh=void 0}const tr={now:()=>(Lh===void 0&&tr.set(Pn.isProcessing||xs.useManualTiming?Pn.timestamp:performance.now()),Lh),set:e=>{Lh=e,queueMicrotask(U9)}},Ck=e=>t=>typeof t=="string"&&t.startsWith(e),wk=Ck("--"),H9=Ck("var(--"),Ky=e=>H9(e)?z9.test(e.split("/*")[0].trim()):!1,z9=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function gC(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const cu={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},tf={...cu,transform:e=>Bi(0,1,e)},dh={...cu,default:1},Pc=e=>Math.round(e*1e5)/1e5,Qy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function V9(e){return e==null}const q9=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xy=(e,t)=>n=>!!(typeof n=="string"&&q9.test(n)&&n.startsWith(e)||t&&!V9(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ak=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,l,c]=r.match(Qy);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},$9=e=>Bi(0,255,e),Xg={...cu,transform:e=>Math.round($9(e))},to={test:Xy("rgb","red"),parse:Ak("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Xg.transform(e)+", "+Xg.transform(t)+", "+Xg.transform(n)+", "+Pc(tf.transform(r))+")"};function Y9(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 Sb={test:Xy("#"),parse:Y9,transform:to.transform},Af=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Zs=Af("deg"),Li=Af("%"),Ie=Af("px"),G9=Af("vh"),K9=Af("vw"),bC={...Li,parse:e=>Li.parse(e)/100,transform:e=>Li.transform(e*100)},Nl={test:Xy("hsl","hue"),parse:Ak("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Li.transform(Pc(t))+", "+Li.transform(Pc(n))+", "+Pc(tf.transform(r))+")"},mn={test:e=>to.test(e)||Sb.test(e)||Nl.test(e),parse:e=>to.test(e)?to.parse(e):Nl.test(e)?Nl.parse(e):Sb.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?to.transform(e):Nl.transform(e),getAnimatableNone:e=>{const t=mn.parse(e);return t.alpha=0,mn.transform(t)}},Q9=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function X9(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Qy))==null?void 0:t.length)||0)+(((n=e.match(Q9))==null?void 0:n.length)||0)>0}const _k="number",kk="color",W9="var",Z9="var(",yC="${}",J9=/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 nf(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const c=t.replace(J9,f=>(mn.test(f)?(r.color.push(o),s.push(kk),n.push(mn.parse(f))):f.startsWith(Z9)?(r.var.push(o),s.push(W9),n.push(f)):(r.number.push(o),s.push(_k),n.push(parseFloat(f))),++o,yC)).split(yC);return{values:n,split:c,indexes:r,types:s}}function Nk(e){return nf(e).values}function Rk(e){const{split:t,types:n}=nf(e),r=t.length;return s=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],s[l]!==void 0){const c=n[l];c===_k?o+=Pc(s[l]):c===kk?o+=mn.transform(s[l]):o+=s[l]}return o}}const ej=e=>typeof e=="number"?0:mn.test(e)?mn.getAnimatableNone(e):e;function tj(e){const t=Nk(e);return Rk(e)(t.map(ej))}const ya={test:X9,parse:Nk,createTransformer:Rk,getAnimatableNone:tj};function Wg(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 nj({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 c=n<.5?n*(1+t):n+t-n*t,f=2*n-c;s=Wg(f,c,e+1/3),o=Wg(f,c,e),l=Wg(f,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function em(e,t){return n=>n>0?t:e}const Qt=(e,t,n)=>e+(t-e)*n,Zg=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},rj=[Sb,to,Nl],ij=e=>rj.find(t=>t.test(e));function xC(e){const t=ij(e);if(!t)return!1;let n=t.parse(e);return t===Nl&&(n=nj(n)),n}const EC=(e,t)=>{const n=xC(e),r=xC(t);if(!n||!r)return em(e,t);const s={...n};return o=>(s.red=Zg(n.red,r.red,o),s.green=Zg(n.green,r.green,o),s.blue=Zg(n.blue,r.blue,o),s.alpha=Qt(n.alpha,r.alpha,o),to.transform(s))},Cb=new Set(["none","hidden"]);function sj(e,t){return Cb.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function aj(e,t){return n=>Qt(e,t,n)}function Wy(e){return typeof e=="number"?aj:typeof e=="string"?Ky(e)?em:mn.test(e)?EC:uj:Array.isArray(e)?Dk:typeof e=="object"?mn.test(e)?EC:oj:em}function Dk(e,t){const n=[...e],r=n.length,s=e.map((o,l)=>Wy(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=s[l](o);return n}}function oj(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Wy(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function lj(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]],c=e.values[l]??0;n[s]=c,r[o]++}return n}const uj=(e,t)=>{const n=ya.createTransformer(t),r=nf(e),s=nf(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?Cb.has(e)&&!s.values.length||Cb.has(t)&&!r.values.length?sj(e,t):Cf(Dk(lj(r,s),s.values),n):em(e,t)};function Ok(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Qt(e,t,n):Wy(e)(e,t)}const cj=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ft.update(t,n),stop:()=>ba(t),now:()=>Pn.isProcessing?Pn.timestamp:tr.now()}},Mk=(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)})`},tm=2e4;function Zy(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<tm;)t+=n,r=e.next(t);return t>=tm?1/0:t}function fj(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Zy(r),tm);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:Kr(s)}}const dj=5;function Ik(e,t,n){const r=Math.max(t-dj,0);return dk(n-e(r),t-r)}const Jt={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},Jg=.001;function hj({duration:e=Jt.duration,bounce:t=Jt.bounce,velocity:n=Jt.velocity,mass:r=Jt.mass}){let s,o,l=1-t;l=Bi(Jt.minDamping,Jt.maxDamping,l),e=Bi(Jt.minDuration,Jt.maxDuration,Kr(e)),l<1?(s=d=>{const m=d*l,p=m*e,b=m-n,x=wb(d,l),S=Math.exp(-p);return Jg-b/x*S},o=d=>{const p=d*l*e,b=p*n+n,x=Math.pow(l,2)*Math.pow(d,2)*e,S=Math.exp(-p),C=wb(Math.pow(d,2),l);return(-s(d)+Jg>0?-1:1)*((b-x)*S)/C}):(s=d=>{const m=Math.exp(-d*e),p=(d-n)*e+1;return-Jg+m*p},o=d=>{const m=Math.exp(-d*e),p=(n-d)*(e*e);return m*p});const c=5/e,f=pj(s,o,c);if(e=di(e),isNaN(f))return{stiffness:Jt.stiffness,damping:Jt.damping,duration:e};{const d=Math.pow(f,2)*r;return{stiffness:d,damping:l*2*Math.sqrt(r*d),duration:e}}}const mj=12;function pj(e,t,n){let r=n;for(let s=1;s<mj;s++)r=r-e(r)/t(r);return r}function wb(e,t){return e*Math.sqrt(1-t*t)}const gj=["duration","bounce"],bj=["stiffness","damping","mass"];function TC(e,t){return t.some(n=>e[n]!==void 0)}function yj(e){let t={velocity:Jt.velocity,stiffness:Jt.stiffness,damping:Jt.damping,mass:Jt.mass,isResolvedFromDuration:!1,...e};if(!TC(e,bj)&&TC(e,gj))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Bi(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Jt.mass,stiffness:s,damping:o}}else{const n=hj(e);t={...t,...n,mass:Jt.mass},t.isResolvedFromDuration=!0}return t}function nm(e=Jt.visualDuration,t=Jt.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],c={done:!1,value:o},{stiffness:f,damping:d,mass:m,duration:p,velocity:b,isResolvedFromDuration:x}=yj({...n,velocity:-Kr(n.velocity||0)}),S=b||0,C=d/(2*Math.sqrt(f*m)),w=l-o,A=Kr(Math.sqrt(f/m)),N=Math.abs(w)<5;r||(r=N?Jt.restSpeed.granular:Jt.restSpeed.default),s||(s=N?Jt.restDelta.granular:Jt.restDelta.default);let k;if(C<1){const B=wb(A,C);k=O=>{const j=Math.exp(-C*A*O);return l-j*((S+C*A*w)/B*Math.sin(B*O)+w*Math.cos(B*O))}}else if(C===1)k=B=>l-Math.exp(-A*B)*(w+(S+A*w)*B);else{const B=A*Math.sqrt(C*C-1);k=O=>{const j=Math.exp(-C*A*O),P=Math.min(B*O,300);return l-j*((S+C*A*w)*Math.sinh(P)+B*w*Math.cosh(P))/B}}const R={calculatedDuration:x&&p||null,next:B=>{const O=k(B);if(x)c.done=B>=p;else{let j=B===0?S:0;C<1&&(j=B===0?di(S):Ik(k,B,O));const P=Math.abs(j)<=r,q=Math.abs(l-O)<=s;c.done=P&&q}return c.value=c.done?l:O,c},toString:()=>{const B=Math.min(Zy(R),tm),O=Mk(j=>R.next(B*j).value,B,30);return B+"ms "+O},toTransition:()=>{}};return R}nm.applyToOptions=e=>{const t=fj(e,100,nm);return e.ease=t.ease,e.duration=di(t.duration),e.type="keyframes",e};function Ab({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:l,min:c,max:f,restDelta:d=.5,restSpeed:m}){const p=e[0],b={done:!1,value:p},x=P=>c!==void 0&&P<c||f!==void 0&&P>f,S=P=>c===void 0?f:f===void 0||Math.abs(c-P)<Math.abs(f-P)?c:f;let C=n*t;const w=p+C,A=l===void 0?w:l(w);A!==w&&(C=A-p);const N=P=>-C*Math.exp(-P/r),k=P=>A+N(P),R=P=>{const q=N(P),L=k(P);b.done=Math.abs(q)<=d,b.value=b.done?A:L};let B,O;const j=P=>{x(b.value)&&(B=P,O=nm({keyframes:[b.value,S(b.value)],velocity:Ik(k,P,b.value),damping:s,stiffness:o,restDelta:d,restSpeed:m}))};return j(0),{calculatedDuration:null,next:P=>{let q=!1;return!O&&B===void 0&&(q=!0,R(P),j(P)),B!==void 0&&P>=B?O.next(P-B):(!q&&R(P),b)}}}function xj(e,t,n){const r=[],s=n||xs.mix||Ok,o=e.length-1;for(let l=0;l<o;l++){let c=s(e[l],e[l+1]);if(t){const f=Array.isArray(t)?t[l]||Qr:t;c=Cf(f,c)}r.push(c)}return r}function Ej(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Vy(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 c=xj(t,r,s),f=c.length,d=m=>{if(l&&m<e[0])return t[0];let p=0;if(f>1)for(;p<e.length-2&&!(m<e[p+1]);p++);const b=ef(e[p],e[p+1],m);return c[p](b)};return n?m=>d(Bi(e[0],e[o-1],m)):d}function Tj(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ef(0,t,r);e.push(Qt(n,1,s))}}function vj(e){const t=[0];return Tj(t,e.length-1),t}function Sj(e,t){return e.map(n=>n*t)}function Cj(e,t){return e.map(()=>t||Tk).splice(0,e.length-1)}function jc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=L9(r)?r.map(pC):pC(r),o={done:!1,value:t[0]},l=Sj(n&&n.length===t.length?n:vj(t),e),c=Ej(l,t,{ease:Array.isArray(s)?s:Cj(t,s)});return{calculatedDuration:e,next:f=>(o.value=c(f),o.done=f>=e,o)}}const wj=e=>e!==null;function Jy(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(wj),c=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!c||r===void 0?o[c]:r}const Aj={decay:Ab,inertia:Ab,tween:jc,keyframes:jc,spring:nm};function Lk(e){typeof e.type=="string"&&(e.type=Aj[e.type])}class ex{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 _j=e=>e/100;class tx extends ex{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!==tr.now()&&this.tick(tr.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;Lk(t);const{type:n=jc,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:l=0}=t;let{keyframes:c}=t;const f=n||jc;f!==jc&&typeof c[0]!="number"&&(this.mixKeyframes=Cf(_j,Ok(c[0],c[1])),c=[0,100]);const d=f({...t,keyframes:c});o==="mirror"&&(this.mirroredGenerator=f({...t,keyframes:[...c].reverse(),velocity:-l})),d.calculatedDuration===null&&(d.calculatedDuration=Zy(d));const{calculatedDuration:m}=d;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=d}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:c,calculatedDuration:f}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:m,repeat:p,repeatType:b,repeatDelay:x,type:S,onUpdate:C,finalKeyframe:w}=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 A=this.currentTime-d*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?A<0:A>s;this.currentTime=Math.max(A,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)/c;let q=Math.floor(P),L=P%1;!L&&P>=1&&(L=1),L===1&&q--,q=Math.min(q,p+1),!!(q%2)&&(b==="reverse"?(L=1-L,x&&(L-=x/c)):b==="mirror"&&(R=l)),k=Bi(0,1,L)*c}const B=N?{done:!1,value:m[0]}:R.next(k);o&&(B.value=o(B.value));let{done:O}=B;!N&&f!==null&&(O=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return j&&S!==Ab&&(B.value=Jy(m,this.options,w,this.speed)),C&&C(B.value),j&&this.finish(),B}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=di(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(tr.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=cj,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(tr.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 kj(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const no=e=>e*180/Math.PI,_b=e=>{const t=no(Math.atan2(e[1],e[0]));return kb(t)},Nj={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_b,rotateZ:_b,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},kb=e=>(e=e%360,e<0&&(e+=360),e),vC=_b,SC=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),CC=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Rj={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:SC,scaleY:CC,scale:e=>(SC(e)+CC(e))/2,rotateX:e=>kb(no(Math.atan2(e[6],e[5]))),rotateY:e=>kb(no(Math.atan2(-e[2],e[0]))),rotateZ:vC,rotate:vC,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 Nb(e){return e.includes("scale")?1:0}function Rb(e,t){if(!e||e==="none")return Nb(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Rj,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Nj,s=c}if(!s)return Nb(t);const o=r[t],l=s[1].split(",").map(Oj);return typeof o=="function"?o(l):l[o]}const Dj=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Rb(n,t)};function Oj(e){return parseFloat(e.trim())}const fu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],du=new Set(fu),wC=e=>e===cu||e===Ie,Mj=new Set(["x","y","z"]),Ij=fu.filter(e=>!Mj.has(e));function Lj(e){const t=[];return Ij.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})=>Rb(t,"x"),y:(e,{transform:t})=>Rb(t,"y")};ma.translateX=ma.x;ma.translateY=ma.y;const mo=new Set;let Db=!1,Ob=!1,Mb=!1;function Pk(){if(Ob){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=Lj(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 c;(c=r.getValue(o))==null||c.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ob=!1,Db=!1,mo.forEach(e=>e.complete(Mb)),mo.clear()}function jk(){mo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ob=!0)})}function Pj(){Mb=!0,jk(),Pk(),Mb=!1}class nx{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),Db||(Db=!0,Ft.read(jk),Ft.resolveKeyframes(Pk))):(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 c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}kj(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 jj=e=>e.startsWith("--");function Bj(e,t,n){jj(t)?e.style.setProperty(t,n):e.style[t]=n}const Fj=qy(()=>window.ScrollTimeline!==void 0),Uj={};function Hj(e,t){const n=qy(e);return()=>Uj[t]??n()}const Bk=Hj(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,AC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nc([0,.65,.55,1]),circOut:Nc([.55,0,1,.45]),backIn:Nc([.31,.01,.66,-.59]),backOut:Nc([.33,1.53,.69,.99])};function Fk(e,t){if(e)return typeof e=="function"?Bk()?Mk(e,t):"ease-out":vk(e)?Nc(e):Array.isArray(e)?e.map(n=>Fk(n,t)||AC.easeOut):AC[e]}function zj(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:l="loop",ease:c="easeOut",times:f}={},d=void 0){const m={[t]:n};f&&(m.offset=f);const p=Fk(c,s);Array.isArray(p)&&(m.easing=p);const b={delay:r,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return d&&(b.pseudoElement=d),e.animate(m,b)}function Uk(e){return typeof e=="function"&&"applyToOptions"in e}function Vj({type:e,...t}){return Uk(e)&&Bk()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Hk extends ex{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:c,onComplete:f}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,Vy(typeof t.type!="string");const d=Vj(t);this.animation=zj(n,r,s,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=Jy(s,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(m):Bj(n,r,m),this.animation.cancel()}f==null||f(),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=di(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&&Fj()?(this.animation.timeline=t,Qr):n(this)}}const zk={anticipate:yk,backInOut:bk,circInOut:Ek};function qj(e){return e in zk}function $j(e){typeof e.ease=="string"&&qj(e.ease)&&(e.ease=zk[e.ease])}const e1=10;class Yj extends Hk{constructor(t){$j(t),Lk(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 c=new tx({...l,autoplay:!1}),f=Math.max(e1,tr.now()-this.startTime),d=Bi(0,e1,f-e1);n.setWithVelocity(c.sample(Math.max(0,f-d)).value,c.sample(f).value,d),c.stop()}}const _C=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ya.test(e)||e==="0")&&!e.startsWith("url("));function Gj(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 Kj(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=_C(s,t),c=_C(o,t);return!l||!c?!1:Gj(e)||(n==="spring"||Uk(n))&&r}function Ib(e){e.duration=0,e.type="keyframes"}const Qj=new Set(["opacity","clipPath","filter","transform"]),Xj=qy(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wj(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:f,transformTemplate:d}=t.owner.getProps();return Xj()&&n&&Qj.has(n)&&(n!=="transform"||!d)&&!f&&!r&&s!=="mirror"&&o!==0&&l!=="inertia"}const Zj=40;class Jj extends ex{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l="loop",keyframes:c,name:f,motionValue:d,element:m,...p}){var S;super(),this.stop=()=>{var C,w;this._animation&&(this._animation.stop(),(C=this.stopTimeline)==null||C.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=tr.now();const b={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:l,name:f,motionValue:d,element:m,...p},x=(m==null?void 0:m.KeyframeResolver)||nx;this.keyframeResolver=new x(c,(C,w,A)=>this.onKeyframesResolved(C,w,b,!A),f,d,m),(S=this.keyframeResolver)==null||S.scheduleResolve()}onKeyframesResolved(t,n,r,s){var w,A;this.keyframeResolver=void 0;const{name:o,type:l,velocity:c,delay:f,isHandoff:d,onUpdate:m}=r;this.resolvedAt=tr.now(),Kj(t,o,l,c)||((xs.instantAnimations||!f)&&(m==null||m(Jy(t,r,n))),t[0]=t[t.length-1],Ib(r),r.repeat=0);const b={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Zj?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},x=!d&&Wj(b),S=(A=(w=b.motionValue)==null?void 0:w.owner)==null?void 0:A.current,C=x?new Yj({...b,element:S}):new tx(b);C.finished.then(()=>{this.notifyFinished()}).catch(Qr),this.pendingTimeline&&(this.stopTimeline=C.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=C}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(),Pj()),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 Vk(e,t,n,r=0,s=1){const o=Array.from(e).sort((d,m)=>d.sortNodePosition(m)).indexOf(t),l=e.size,c=(l-1)*r;return typeof n=="function"?n(o,l):s===1?o*r:c-o*r}const eB=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function tB(e){const t=eB.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function qk(e,t,n=1){const[r,s]=tB(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return uk(l)?parseFloat(l):l}return Ky(s)?qk(s,t,n+1):s}const nB={type:"spring",stiffness:500,damping:25,restSpeed:10},rB=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),iB={type:"keyframes",duration:.8},sB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},aB=(e,{keyframes:t})=>t.length>2?iB:du.has(e)?e.startsWith("scale")?rB(t[1]):nB:sB,oB=e=>e!==null;function lB(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(oB),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}function rx(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function ix(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?rx(n,e):n}function uB({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:l,repeatDelay:c,from:f,elapsed:d,...m}){return!!Object.keys(m).length}const sx=(e,t,n,r={},s,o)=>l=>{const c=ix(r,e)||{},f=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-di(f);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:b=>{t.set(b),c.onUpdate&&c.onUpdate(b)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:o?void 0:s};uB(c)||Object.assign(m,aB(e,m)),m.duration&&(m.duration=di(m.duration)),m.repeatDelay&&(m.repeatDelay=di(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let p=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(Ib(m),m.delay===0&&(p=!0)),(xs.instantAnimations||xs.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(p=!0,Ib(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,p&&!o&&t.get()!==void 0){const b=lB(m.keyframes,c);if(b!==void 0){Ft.update(()=>{m.onUpdate(b),m.onComplete()});return}}return c.isSync?new tx(m):new Jj(m)};function kC(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ax(e,t,n,r){if(typeof t=="function"){const[s,o]=kC(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]=kC(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function jl(e,t,n){const r=e.getProps();return ax(r,t,n!==void 0?n:r.custom,e)}const $k=new Set(["width","height","top","left","right","bottom",...fu]),NC=30,cB=e=>!isNaN(parseFloat(e));class fB{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=tr.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=tr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=cB(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 $y);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ft.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=tr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>NC)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,NC);return dk(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 eu(e,t){return new fB(e,t)}const Lb=e=>Array.isArray(e);function dB(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,eu(n))}function hB(e){return Lb(e)?e[e.length-1]||0:e}function mB(e,t){const n=jl(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const l in o){const c=hB(o[l]);dB(e,l,c)}}const Hn=e=>!!(e&&e.getVelocity);function pB(e){return!!(Hn(e)&&e.add)}function Pb(e,t){const n=e.getValue("willChange");if(pB(n))return n.add(t);if(!n&&xs.WillChange){const r=new xs.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ox(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const gB="framerAppearId",Yk="data-"+ox(gB);function Gk(e){return e.props[Yk]}function bB({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Kk(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o,transitionEnd:l,...c}=t;const f=e.getDefaultTransition();o=o?rx(o,f):f;const d=o==null?void 0:o.reduceMotion;r&&(o=r);const m=[],p=s&&e.animationState&&e.animationState.getState()[s];for(const b in c){const x=e.getValue(b,e.latestValues[b]??null),S=c[b];if(S===void 0||p&&bB(p,b))continue;const C={delay:n,...ix(o||{},b)},w=x.get();if(w!==void 0&&!x.isAnimating&&!Array.isArray(S)&&S===w&&!C.velocity)continue;let A=!1;if(window.MotionHandoffAnimation){const R=Gk(e);if(R){const B=window.MotionHandoffAnimation(R,b,Ft);B!==null&&(C.startTime=B,A=!0)}}Pb(e,b);const N=d??e.shouldReduceMotion;x.start(sx(b,x,S,N&&$k.has(b)?{type:!1}:C,e,A));const k=x.animation;k&&m.push(k)}if(l){const b=()=>Ft.update(()=>{l&&mB(e,l)});m.length?Promise.all(m).then(b):b()}return m}function jb(e,t,n={}){var f;const r=jl(e,t,n.type==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(Kk(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:m=0,staggerChildren:p,staggerDirection:b}=s;return yB(e,t,d,m,p,b,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[d,m]=c==="beforeChildren"?[o,l]:[l,o];return d().then(()=>m())}else return Promise.all([o(),l(n.delay)])}function yB(e,t,n=0,r=0,s=0,o=1,l){const c=[];for(const f of e.variantChildren)f.notify("AnimationStart",t),c.push(jb(f,t,{...l,delay:n+(typeof r=="function"?0:r)+Vk(e.variantChildren,f,r,s,o)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(c)}function xB(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>jb(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=jb(e,t,n);else{const s=typeof t=="function"?jl(e,t,n.custom):t;r=Promise.all(Kk(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const EB={test:e=>e==="auto",parse:e=>e},Qk=e=>t=>t.test(e),Xk=[cu,Ie,Li,Zs,K9,G9,EB],RC=e=>Xk.find(Qk(e));function TB(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||fk(e):!0}const vB=new Set(["brightness","contrast","saturate","opacity"]);function SB(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Qy)||[];if(!r)return e;const s=n.replace(r,"");let o=vB.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const CB=/\b([a-z-]*)\(.*?\)/gu,Bb={...ya,getAnimatableNone:e=>{const t=e.match(CB);return t?t.map(SB).join(" "):e}},DC={...cu,transform:Math.round},wB={rotate:Zs,rotateX:Zs,rotateY:Zs,rotateZ:Zs,scale:dh,scaleX:dh,scaleY:dh,scaleZ:dh,skew:Zs,skewX:Zs,skewY:Zs,distance:Ie,translateX:Ie,translateY:Ie,translateZ:Ie,x:Ie,y:Ie,z:Ie,perspective:Ie,transformPerspective:Ie,opacity:tf,originX:bC,originY:bC,originZ:Ie},lx={borderWidth:Ie,borderTopWidth:Ie,borderRightWidth:Ie,borderBottomWidth:Ie,borderLeftWidth:Ie,borderRadius:Ie,borderTopLeftRadius:Ie,borderTopRightRadius:Ie,borderBottomRightRadius:Ie,borderBottomLeftRadius:Ie,width:Ie,maxWidth:Ie,height:Ie,maxHeight:Ie,top:Ie,right:Ie,bottom:Ie,left:Ie,inset:Ie,insetBlock:Ie,insetBlockStart:Ie,insetBlockEnd:Ie,insetInline:Ie,insetInlineStart:Ie,insetInlineEnd:Ie,padding:Ie,paddingTop:Ie,paddingRight:Ie,paddingBottom:Ie,paddingLeft:Ie,paddingBlock:Ie,paddingBlockStart:Ie,paddingBlockEnd:Ie,paddingInline:Ie,paddingInlineStart:Ie,paddingInlineEnd:Ie,margin:Ie,marginTop:Ie,marginRight:Ie,marginBottom:Ie,marginLeft:Ie,marginBlock:Ie,marginBlockStart:Ie,marginBlockEnd:Ie,marginInline:Ie,marginInlineStart:Ie,marginInlineEnd:Ie,fontSize:Ie,backgroundPositionX:Ie,backgroundPositionY:Ie,...wB,zIndex:DC,fillOpacity:tf,strokeOpacity:tf,numOctaves:DC},AB={...lx,color:mn,backgroundColor:mn,outlineColor:mn,fill:mn,stroke:mn,borderColor:mn,borderTopColor:mn,borderRightColor:mn,borderBottomColor:mn,borderLeftColor:mn,filter:Bb,WebkitFilter:Bb},Wk=e=>AB[e];function Zk(e,t){let n=Wk(e);return n!==Bb&&(n=ya),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const _B=new Set(["auto","none","0"]);function kB(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!_B.has(o)&&nf(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Zk(n,s)}class NB extends nx{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(),Ky(p))){const b=qk(p,n.current);b!==void 0&&(t[m]=b),m===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!$k.has(r)||t.length!==2)return;const[s,o]=t,l=RC(s),c=RC(o),f=gC(s),d=gC(o);if(f!==d&&ma[r]){this.needsMeasurement=!0;return}if(l!==c)if(wC(l)&&wC(c))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||TB(t[s]))&&r.push(s);r.length&&kB(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 c;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),(c=this.removedTransforms)!=null&&c.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}const RB=new Set(["opacity","clipPath","filter","transform"]);function Jk(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 eN=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Fb(e){return ck(e)&&"offsetHeight"in e}const{schedule:ux}=Sk(queueMicrotask,!1),ai={x:!1,y:!1};function tN(){return ai.x||ai.y}function DB(e){return e==="x"||e==="y"?ai[e]?null:(ai[e]=!0,()=>{ai[e]=!1}):ai.x||ai.y?null:(ai.x=ai.y=!0,()=>{ai.x=ai.y=!1})}function nN(e,t){const n=Jk(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function OB(e){return!(e.pointerType==="touch"||tN())}function MB(e,t,n={}){const[r,s,o]=nN(e,n);return r.forEach(l=>{let c=!1,f=!1,d;const m=()=>{l.removeEventListener("pointerleave",S)},p=w=>{d&&(d(w),d=void 0),m()},b=w=>{c=!1,window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",b),f&&(f=!1,p(w))},x=()=>{c=!0,window.addEventListener("pointerup",b,s),window.addEventListener("pointercancel",b,s)},S=w=>{if(w.pointerType!=="touch"){if(c){f=!0;return}p(w)}},C=w=>{if(!OB(w))return;f=!1;const A=t(l,w);typeof A=="function"&&(d=A,l.addEventListener("pointerleave",S,s))};l.addEventListener("pointerenter",C,s),l.addEventListener("pointerdown",x,s)}),o}const rN=(e,t)=>t?e===t?!0:rN(e,t.parentElement):!1,cx=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,IB=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function LB(e){return IB.has(e.tagName)||e.isContentEditable===!0}const PB=new Set(["INPUT","SELECT","TEXTAREA"]);function jB(e){return PB.has(e.tagName)||e.isContentEditable===!0}const Ph=new WeakSet;function OC(e){return t=>{t.key==="Enter"&&e(t)}}function t1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const BB=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=OC(()=>{if(Ph.has(n))return;t1(n,"down");const s=OC(()=>{t1(n,"up")}),o=()=>t1(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 MC(e){return cx(e)&&!tN()}const IC=new WeakSet;function FB(e,t,n={}){const[r,s,o]=nN(e,n),l=c=>{const f=c.currentTarget;if(!MC(c)||IC.has(c))return;Ph.add(f),n.stopPropagation&&IC.add(c);const d=t(f,c),m=(x,S)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",b),Ph.has(f)&&Ph.delete(f),MC(x)&&typeof d=="function"&&d(x,{success:S})},p=x=>{m(x,f===window||f===document||n.useGlobalTarget||rN(f,x.target))},b=x=>{m(x,!1)};window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",b,s)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",l,s),Fb(c)&&(c.addEventListener("focus",d=>BB(d,s)),!LB(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),o}function fx(e){return ck(e)&&"ownerSVGElement"in e}const jh=new WeakMap;let Js;const iN=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:fx(r)&&"getBBox"in r?r.getBBox()[t]:r[n],UB=iN("inline","width","offsetWidth"),HB=iN("block","height","offsetHeight");function zB({target:e,borderBoxSize:t}){var n;(n=jh.get(e))==null||n.forEach(r=>{r(e,{get width(){return UB(e,t)},get height(){return HB(e,t)}})})}function VB(e){e.forEach(zB)}function qB(){typeof ResizeObserver>"u"||(Js=new ResizeObserver(VB))}function $B(e,t){Js||qB();const n=Jk(e);return n.forEach(r=>{let s=jh.get(r);s||(s=new Set,jh.set(r,s)),s.add(t),Js==null||Js.observe(r)}),()=>{n.forEach(r=>{const s=jh.get(r);s==null||s.delete(t),s!=null&&s.size||Js==null||Js.unobserve(r)})}}const Bh=new Set;let Rl;function YB(){Rl=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Bh.forEach(t=>t(e))},window.addEventListener("resize",Rl)}function GB(e){return Bh.add(e),Rl||YB(),()=>{Bh.delete(e),!Bh.size&&typeof Rl=="function"&&(window.removeEventListener("resize",Rl),Rl=void 0)}}function LC(e,t){return typeof e=="function"?GB(e):$B(e,t)}function KB(e){return fx(e)&&e.tagName==="svg"}const QB=[...Xk,mn,ya],XB=e=>QB.find(Qk(e)),PC=()=>({translate:0,scale:1,origin:0,originPoint:0}),Dl=()=>({x:PC(),y:PC()}),jC=()=>({min:0,max:0}),bn=()=>({x:jC(),y:jC()}),WB=new WeakMap;function Om(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function rf(e){return typeof e=="string"||Array.isArray(e)}const dx=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hx=["initial",...dx];function Mm(e){return Om(e.animate)||hx.some(t=>rf(e[t]))}function sN(e){return!!(Mm(e)||e.variants)}function ZB(e,t,n){for(const r in t){const s=t[r],o=n[r];if(Hn(s))e.addValue(r,s);else if(Hn(o))e.addValue(r,eu(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,eu(l!==void 0?l:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ub={current:null},aN={current:!1},JB=typeof window<"u";function e7(){if(aN.current=!0,!!JB)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ub.current=e.matches;e.addEventListener("change",t),t()}else Ub.current=!1}const BC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let rm={};function oN(e){rm=e}function t7(){return rm}class n7{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:l,visualState:c},f={}){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=nx,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 x=tr.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,Ft.render(this.render,!1,!0))};const{latestValues:d,renderState:m}=c;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},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=f,this.blockInitialAnimation=!!l,this.isControllingVariants=Mm(n),this.isVariantNode=sN(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...b}=this.scrapeMotionValuesFromProps(n,{},this);for(const x in b){const S=b[x];d[x]!==void 0&&Hn(S)&&S.set(d[x])}}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,WB.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:(aN.current||e7(),this.shouldReduceMotion=Ub.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&&RB.has(t)&&this.current instanceof HTMLElement){const{factory:l,keyframes:c,times:f,ease:d,duration:m}=n.accelerate,p=new Hk({element:this.current,name:t,keyframes:c,times:f,ease:d,duration:di(m)}),b=l(p);this.valueSubscriptions.set(t,()=>{b(),p.cancel()});return}const r=du.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Ft.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 rm){const n=rm[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):bn()}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<BC.length;r++){const s=BC[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=ZB(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=eu(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"&&(uk(r)||fk(r))?r=parseFloat(r):!XB(r)&&ya.test(n)&&(r=Zk(t,n)),this.setBaseTarget(t,Hn(r)?r.get():r)),Hn(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=ax(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&&!Hn(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 $y),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ux.render(this.render)}}class lN extends n7{constructor(){super(...arguments),this.KeyframeResolver=NB}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;Hn(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 uN({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function r7({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function i7(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 n1(e){return e===void 0||e===1}function Hb({scale:e,scaleX:t,scaleY:n}){return!n1(e)||!n1(t)||!n1(n)}function Za(e){return Hb(e)||cN(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cN(e){return FC(e.x)||FC(e.y)}function FC(e){return e&&e!=="0%"}function im(e,t,n){const r=e-n,s=t*r;return n+s}function UC(e,t,n,r,s){return s!==void 0&&(e=im(e,s,r)),im(e,n,r)+t}function zb(e,t=0,n=1,r,s){e.min=UC(e.min,t,n,r,s),e.max=UC(e.max,t,n,r,s)}function fN(e,{x:t,y:n}){zb(e.x,t.translate,t.scale,t.originPoint),zb(e.y,n.translate,n.scale,n.originPoint)}const HC=.999999999999,zC=1.0000000000001;function s7(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,l;for(let c=0;c<s;c++){o=n[c],l=o.projectionDelta;const{visualElement:f}=o.options;f&&f.props.style&&f.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ml(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,fN(e,l)),r&&Za(o.latestValues)&&Ml(e,o.latestValues))}t.x<zC&&t.x>HC&&(t.x=1),t.y<zC&&t.y>HC&&(t.y=1)}function Ol(e,t){e.min=e.min+t,e.max=e.max+t}function VC(e,t,n,r,s=.5){const o=Qt(e.min,e.max,s);zb(e,t,n,o,r)}function Ml(e,t){VC(e.x,t.x,t.scaleX,t.scale,t.originX),VC(e.y,t.y,t.scaleY,t.scale,t.originY)}function dN(e,t){return uN(i7(e.getBoundingClientRect(),t))}function a7(e,t,n){const r=dN(e,n),{scroll:s}=t;return s&&(Ol(r.x,s.offset.x),Ol(r.y,s.offset.y)),r}const o7={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},l7=fu.length;function u7(e,t,n){let r="",s=!0;for(let o=0;o<l7;o++){const l=fu[o],c=e[l];if(c===void 0)continue;let f=!0;if(typeof c=="number")f=c===(l.startsWith("scale")?1:0);else{const d=parseFloat(c);f=l.startsWith("scale")?d===1:d===0}if(!f||n){const d=eN(c,lx[l]);if(!f){s=!1;const m=o7[l]||l;r+=`${m}(${d}) `}n&&(t[l]=d)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function mx(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let l=!1,c=!1;for(const f in t){const d=t[f];if(du.has(f)){l=!0;continue}else if(wk(f)){s[f]=d;continue}else{const m=eN(d,lx[f]);f.startsWith("origin")?(c=!0,o[f]=m):r[f]=m}}if(t.transform||(l||n?r.transform=u7(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:f="50%",originY:d="50%",originZ:m=0}=o;r.transformOrigin=`${f} ${d} ${m}`}}function hN(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 qC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const gc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ie.test(e))e=parseFloat(e);else return e;const n=qC(e,t.target.x),r=qC(e,t.target.y);return`${n}% ${r}%`}},c7={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,c=n.x.scale*t.x,f=n.y.scale*t.y;s[0+l]/=c,s[1+l]/=f;const d=Qt(c,f,.5);return typeof s[2+l]=="number"&&(s[2+l]/=d),typeof s[3+l]=="number"&&(s[3+l]/=d),o(s)}},Vb={borderRadius:{...gc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gc,borderTopRightRadius:gc,borderBottomLeftRadius:gc,borderBottomRightRadius:gc,boxShadow:c7};function mN(e,{layout:t,layoutId:n}){return du.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Vb[e]||e==="opacity")}function px(e,t,n){var l;const r=e.style,s=t==null?void 0:t.style,o={};if(!r)return o;for(const c in r)(Hn(r[c])||s&&Hn(s[c])||mN(c,e)||((l=n==null?void 0:n.getValue(c))==null?void 0:l.liveStyle)!==void 0)&&(o[c]=r[c]);return o}function f7(e){return window.getComputedStyle(e)}class d7 extends lN{constructor(){super(...arguments),this.type="html",this.renderInstance=hN}readValueFromInstance(t,n){var r;if(du.has(n))return(r=this.projection)!=null&&r.isProjecting?Nb(n):Dj(t,n);{const s=f7(t),o=(wk(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return dN(t,n)}build(t,n,r){mx(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return px(t,n,r)}}const h7={offset:"stroke-dashoffset",array:"stroke-dasharray"},m7={offset:"strokeDashoffset",array:"strokeDasharray"};function p7(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?h7:m7;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const g7=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function pN(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:l=0,...c},f,d,m){if(mx(e,c,d),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:b}=e;p.transform&&(b.transform=p.transform,delete p.transform),(b.transform||p.transformOrigin)&&(b.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),b.transform&&(b.transformBox=(m==null?void 0:m.transformBox)??"fill-box",delete p.transformBox);for(const x of g7)p[x]!==void 0&&(b[x]=p[x],delete p[x]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&p7(p,s,o,l,!1)}const gN=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"]),bN=e=>typeof e=="string"&&e.toLowerCase()==="svg";function b7(e,t,n,r){hN(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(gN.has(s)?s:ox(s),t.attrs[s])}function yN(e,t,n){const r=px(e,t,n);for(const s in e)if(Hn(e[s])||Hn(t[s])){const o=fu.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}class y7 extends lN{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(du.has(n)){const r=Wk(n);return r&&r.default||0}return n=gN.has(n)?n:ox(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return yN(t,n,r)}build(t,n,r){pN(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){b7(t,n,r,s)}mount(t){this.isSVGTag=bN(t.tagName),super.mount(t)}}const x7=hx.length;function xN(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xN(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<x7;n++){const r=hx[n],s=e.props[r];(rf(s)||s===!1)&&(t[r]=s)}return t}function EN(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 E7=[...dx].reverse(),T7=dx.length;function v7(e){return t=>Promise.all(t.map(({animation:n,options:r})=>xB(e,n,r)))}function S7(e){let t=v7(e),n=$C(),r=!0;const s=f=>(d,m)=>{var b;const p=jl(e,m,f==="exit"?(b=e.presenceContext)==null?void 0:b.custom:void 0);if(p){const{transition:x,transitionEnd:S,...C}=p;d={...d,...C,...S}}return d};function o(f){t=f(e)}function l(f){const{props:d}=e,m=xN(e.parent)||{},p=[],b=new Set;let x={},S=1/0;for(let w=0;w<T7;w++){const A=E7[w],N=n[A],k=d[A]!==void 0?d[A]:m[A],R=rf(k),B=A===f?N.isActive:null;B===!1&&(S=w);let O=k===m[A]&&k!==d[A]&&R;if(O&&r&&e.manuallyAnimateOnMount&&(O=!1),N.protectedKeys={...x},!N.isActive&&B===null||!k&&!N.prevProp||Om(k)||typeof k=="boolean")continue;if(A==="exit"&&N.isActive&&B!==!0){N.prevResolvedValues&&(x={...x,...N.prevResolvedValues});continue}const j=C7(N.prevProp,k);let P=j||A===f&&N.isActive&&!O&&R||w>S&&R,q=!1;const L=Array.isArray(k)?k:[k];let X=L.reduce(s(A),{});B===!1&&(X={});const{prevResolvedValues:Q={}}=N,ee={...Q,...X},ne=H=>{P=!0,b.has(H)&&(q=!0,b.delete(H)),N.needsAnimating[H]=!0;const $=e.getValue(H);$&&($.liveStyle=!1)};for(const H in ee){const $=X[H],te=Q[H];if(x.hasOwnProperty(H))continue;let F=!1;Lb($)&&Lb(te)?F=!EN($,te):F=$!==te,F?$!=null?ne(H):b.add(H):$!==void 0&&b.has(H)?ne(H):N.protectedKeys[H]=!0}N.prevProp=k,N.prevResolvedValues=X,N.isActive&&(x={...x,...X}),r&&e.blockInitialAnimation&&(P=!1);const Z=O&&j;P&&(!Z||q)&&p.push(...L.map(H=>{const $={type:A};if(typeof H=="string"&&r&&!Z&&e.manuallyAnimateOnMount&&e.parent){const{parent:te}=e,F=jl(te,H);if(te.enteringChildren&&F){const{delayChildren:V}=F.transition||{};$.delay=Vk(te.enteringChildren,e,V)}}return{animation:H,options:$}}))}if(b.size){const w={};if(typeof d.initial!="boolean"){const A=jl(e,Array.isArray(d.initial)?d.initial[0]:d.initial);A&&A.transition&&(w.transition=A.transition)}b.forEach(A=>{const N=e.getBaseTarget(A),k=e.getValue(A);k&&(k.liveStyle=!0),w[A]=N??null}),p.push({animation:w})}let C=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(C=!1),r=!1,C?t(p):Promise.resolve()}function c(f,d){var p;if(n[f].isActive===d)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(b=>{var x;return(x=b.animationState)==null?void 0:x.setActive(f,d)}),n[f].isActive=d;const m=l(f);for(const b in n)n[b].protectedKeys={};return m}return{animateChanges:l,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=$C()}}}function C7(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!EN(t,e):!1}function Ka(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $C(){return{animate:Ka(!0),whileInView:Ka(),whileHover:Ka(),whileTap:Ka(),whileDrag:Ka(),whileFocus:Ka(),exit:Ka()}}function YC(e,t){e.min=t.min,e.max=t.max}function si(e,t){YC(e.x,t.x),YC(e.y,t.y)}function GC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const TN=1e-4,w7=1-TN,A7=1+TN,vN=.01,_7=0-vN,k7=0+vN;function nr(e){return e.max-e.min}function N7(e,t,n){return Math.abs(e-t)<=n}function KC(e,t,n,r=.5){e.origin=r,e.originPoint=Qt(t.min,t.max,e.origin),e.scale=nr(n)/nr(t),e.translate=Qt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=w7&&e.scale<=A7||isNaN(e.scale))&&(e.scale=1),(e.translate>=_7&&e.translate<=k7||isNaN(e.translate))&&(e.translate=0)}function Bc(e,t,n,r){KC(e.x,t.x,n.x,r?r.originX:void 0),KC(e.y,t.y,n.y,r?r.originY:void 0)}function QC(e,t,n){e.min=n.min+t.min,e.max=e.min+nr(t)}function R7(e,t,n){QC(e.x,t.x,n.x),QC(e.y,t.y,n.y)}function XC(e,t,n){e.min=t.min-n.min,e.max=e.min+nr(t)}function sm(e,t,n){XC(e.x,t.x,n.x),XC(e.y,t.y,n.y)}function WC(e,t,n,r,s){return e-=t,e=im(e,1/n,r),s!==void 0&&(e=im(e,1/s,r)),e}function D7(e,t=0,n=1,r=.5,s,o=e,l=e){if(Li.test(t)&&(t=parseFloat(t),t=Qt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=Qt(o.min,o.max,r);e===o&&(c-=t),e.min=WC(e.min,t,n,c,s),e.max=WC(e.max,t,n,c,s)}function ZC(e,t,[n,r,s],o,l){D7(e,t[n],t[r],t[s],t.scale,o,l)}const O7=["x","scaleX","originX"],M7=["y","scaleY","originY"];function JC(e,t,n,r){ZC(e.x,t,O7,n?n.x:void 0,r?r.x:void 0),ZC(e.y,t,M7,n?n.y:void 0,r?r.y:void 0)}function ew(e){return e.translate===0&&e.scale===1}function SN(e){return ew(e.x)&&ew(e.y)}function tw(e,t){return e.min===t.min&&e.max===t.max}function I7(e,t){return tw(e.x,t.x)&&tw(e.y,t.y)}function nw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function CN(e,t){return nw(e.x,t.x)&&nw(e.y,t.y)}function rw(e){return nr(e.x)/nr(e.y)}function iw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ai(e){return[e("x"),e("y")]}function L7(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:d,rotate:m,rotateX:p,rotateY:b,skewX:x,skewY:S}=n;d&&(r=`perspective(${d}px) ${r}`),m&&(r+=`rotate(${m}deg) `),p&&(r+=`rotateX(${p}deg) `),b&&(r+=`rotateY(${b}deg) `),x&&(r+=`skewX(${x}deg) `),S&&(r+=`skewY(${S}deg) `)}const c=e.x.scale*t.x,f=e.y.scale*t.y;return(c!==1||f!==1)&&(r+=`scale(${c}, ${f})`),r||"none"}const wN=["TopLeft","TopRight","BottomLeft","BottomRight"],P7=wN.length,sw=e=>typeof e=="string"?parseFloat(e):e,aw=e=>typeof e=="number"||Ie.test(e);function j7(e,t,n,r,s,o){s?(e.opacity=Qt(0,n.opacity??1,B7(r)),e.opacityExit=Qt(t.opacity??1,0,F7(r))):o&&(e.opacity=Qt(t.opacity??1,n.opacity??1,r));for(let l=0;l<P7;l++){const c=`border${wN[l]}Radius`;let f=ow(t,c),d=ow(n,c);if(f===void 0&&d===void 0)continue;f||(f=0),d||(d=0),f===0||d===0||aw(f)===aw(d)?(e[c]=Math.max(Qt(sw(f),sw(d),r),0),(Li.test(d)||Li.test(f))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=Qt(t.rotate||0,n.rotate||0,r))}function ow(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const B7=AN(0,.5,xk),F7=AN(.5,.95,Qr);function AN(e,t,n){return r=>r<e?0:r>t?1:n(ef(e,t,r))}function U7(e,t,n){const r=Hn(e)?e:eu(e);return r.start(sx("",r,t,n)),r.animation}function sf(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const H7=(e,t)=>e.depth-t.depth;class z7{constructor(){this.children=[],this.isDirty=!1}add(t){zy(this.children,t),this.isDirty=!0}remove(t){Jh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(H7),this.isDirty=!1,this.children.forEach(t)}}function V7(e,t){const n=tr.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(ba(r),e(o-t))};return Ft.setup(r,!0),()=>ba(r)}function Fh(e){return Hn(e)?e.get():e}class q7{constructor(){this.members=[]}add(t){zy(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&&Jh(this.members,r)}t.scheduleRender()}remove(t){if(Jh(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 f=r.instance;f&&f.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:c}=t.options;c===!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 Uh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},r1=["","X","Y","Z"],$7=1e3;let Y7=0;function i1(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function _N(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Gk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ft,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&_N(r)}function kN({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(l={},c=t==null?void 0:t()){this.id=Y7++,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(Q7),this.nodes.forEach(J7),this.nodes.forEach(eF),this.nodes.forEach(X7)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new z7)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new $y),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const f=this.eventHandlers.get(l);f&&f.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=fx(l)&&!KB(l),this.instance=l;const{layoutId:c,layout:f,visualElement:d}=this.options;if(d&&!d.current&&d.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||c)&&(this.isLayoutDirty=!0),e){let m,p=0;const b=()=>this.root.updateBlockedByResize=!1;Ft.read(()=>{p=window.innerWidth}),e(l,()=>{const x=window.innerWidth;x!==p&&(p=x,this.root.updateBlockedByResize=!0,m&&m(),m=V7(b,250),Uh.hasAnimatedSinceResize&&(Uh.hasAnimatedSinceResize=!1,this.nodes.forEach(cw)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||f)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:b,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||d.getDefaultTransition()||sF,{onLayoutAnimationStart:C,onLayoutAnimationComplete:w}=d.getProps(),A=!this.targetLayout||!CN(this.targetLayout,x),N=!p&&b;if(this.options.layoutRoot||this.resumeFrom||N||p&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={...ix(S,"layout"),onPlay:C,onComplete:w};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(m,N)}else p||cw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}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(tF),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&&_N(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:c,layout:f}=this.options;if(c===void 0&&!f)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lw);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(uw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Z7),this.nodes.forEach(G7),this.nodes.forEach(K7)):this.nodes.forEach(uw),this.clearAllSnapshots();const c=tr.now();Pn.delta=Bi(0,1e3/60,c-Pn.timestamp),Pn.timestamp=c,Pn.isProcessing=!0,Qg.update.process(Pn),Qg.preRender.process(Pn),Qg.render.process(Pn),Pn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ux.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(W7),this.sharedNodes.forEach(nF)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!nr(this.snapshot.measuredBox.x)&&!nr(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 f=0;f<this.path.length;f++)this.path[f].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=bn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const f=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:f,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!s)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!SN(this.projectionDelta),f=this.getTransformTemplate(),d=f?f(this.latestValues,""):void 0,m=d!==this.prevTransformTemplateValue;l&&this.instance&&(c||Za(this.latestValues)||m)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let f=this.removeElementScroll(c);return l&&(f=this.removeTransform(f)),aF(f),{animationId:this.root.animationId,measuredBox:c,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:l}=this.options;if(!l)return bn();const c=l.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(oF))){const{scroll:m}=this.root;m&&(Ol(c.x,m.offset.x),Ol(c.y,m.offset.y))}return c}removeElementScroll(l){var f;const c=bn();if(si(c,l),(f=this.scroll)!=null&&f.wasRoot)return c;for(let d=0;d<this.path.length;d++){const m=this.path[d],{scroll:p,options:b}=m;m!==this.root&&p&&b.layoutScroll&&(p.wasRoot&&si(c,l),Ol(c.x,p.offset.x),Ol(c.y,p.offset.y))}return c}applyTransform(l,c=!1){const f=bn();si(f,l);for(let d=0;d<this.path.length;d++){const m=this.path[d];!c&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Ml(f,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Za(m.latestValues)&&Ml(f,m.latestValues)}return Za(this.latestValues)&&Ml(f,this.latestValues),f}removeTransform(l){const c=bn();si(c,l);for(let f=0;f<this.path.length;f++){const d=this.path[f];if(!d.instance||!Za(d.latestValues))continue;Hb(d.latestValues)&&d.updateSnapshot();const m=bn(),p=d.measurePageBox();si(m,p),JC(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,m)}return Za(this.latestValues)&&JC(c,this.latestValues),c}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!==Pn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var x;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==c;if(!(l||f&&this.isSharedProjectionDirty||this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:p}=this.options;if(!this.layout||!(m||p))return;this.resolvedRelativeTargetAt=Pn.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=bn(),this.targetWithTransforms=bn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),R7(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):si(this.target,this.layout.layoutBox),fN(this.target,this.targetDelta)):si(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Hb(this.parent.latestValues)||cN(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,c,f){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=bn(),this.relativeTargetOrigin=bn(),sm(this.relativeTargetOrigin,c,f),si(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var S;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let f=!0;if((this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty)&&(f=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===Pn.timestamp&&(f=!1),f)return;const{layout:d,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||!(d||m))return;si(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,b=this.treeScale.y;s7(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=bn());const{target:x}=l;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(GC(this.prevProjectionDelta.x,this.projectionDelta.x),GC(this.prevProjectionDelta.y,this.projectionDelta.y)),Bc(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==b||!iw(this.projectionDelta.x,this.prevProjectionDelta.x)||!iw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var c;if((c=this.options.visualElement)==null||c.scheduleRender(),l){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Dl(),this.projectionDelta=Dl(),this.projectionDeltaWithTransform=Dl()}setAnimationOrigin(l,c=!1){const f=this.snapshot,d=f?f.latestValues:{},m={...this.latestValues},p=Dl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const b=bn(),x=f?f.source:void 0,S=this.layout?this.layout.source:void 0,C=x!==S,w=this.getStack(),A=!w||w.members.length<=1,N=!!(C&&!A&&this.options.crossfade===!0&&!this.path.some(iF));this.animationProgress=0;let k;this.mixTargetDelta=R=>{const B=R/1e3;fw(p.x,l.x,B),fw(p.y,l.y,B),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sm(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),rF(this.relativeTarget,this.relativeTargetOrigin,b,B),k&&I7(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=bn()),si(k,this.relativeTarget)),C&&(this.animationValues=m,j7(m,d,this.latestValues,B,N,A)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var c,f,d;this.notifyListeners("animationStart"),(c=this.currentAnimation)==null||c.stop(),(d=(f=this.resumingFrom)==null?void 0:f.currentAnimation)==null||d.stop(),this.pendingAnimation&&(ba(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ft.update(()=>{Uh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=eu(0)),this.currentAnimation=U7(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($7),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:f,layout:d,latestValues:m}=l;if(!(!c||!f||!d)){if(this!==l&&this.layout&&d&&NN(this.options.animationType,this.layout.layoutBox,d.layoutBox)){f=this.target||bn();const p=nr(this.layout.layoutBox.x);f.x.min=l.target.x.min,f.x.max=f.x.min+p;const b=nr(this.layout.layoutBox.y);f.y.min=l.target.y.min,f.y.max=f.y.min+b}si(c,f),Ml(c,m),Bc(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new q7),this.sharedNodes.get(l).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var c;const{layoutId:l}=this.options;return l?((c=this.getStack())==null?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:l}=this.options;return l?(c=this.getStack())==null?void 0:c.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:f}={}){const d=this.getStack();d&&d.promote(this,f),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:f}=l;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(c=!0),!c)return;const d={};f.z&&i1("z",l,d,this.animationValues);for(let m=0;m<r1.length;m++)i1(`rotate${r1[m]}`,l,d,this.animationValues),i1(`skew${r1[m]}`,l,d,this.animationValues);l.render();for(const m in d)l.setStaticValue(m,d[m]),this.animationValues&&(this.animationValues[m]=d[m]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=Fh(c==null?void 0:c.pointerEvents)||"",l.transform=f?f(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=Fh(c==null?void 0:c.pointerEvents)||""),this.hasProjected&&!Za(this.latestValues)&&(l.transform=f?f({},""):"none",this.hasProjected=!1);return}l.visibility="";const m=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=L7(this.projectionDeltaWithTransform,this.treeScale,m);f&&(p=f(m,p)),l.transform=p;const{x:b,y:x}=this.projectionDelta;l.transformOrigin=`${b.origin*100}% ${x.origin*100}% 0`,d.animationValues?l.opacity=d===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:l.opacity=d===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const S in Vb){if(m[S]===void 0)continue;const{correct:C,applyTo:w,isCSSVariable:A}=Vb[S],N=p==="none"?m[S]:C(m[S],d);if(w){const k=w.length;for(let R=0;R<k;R++)l[w[R]]=N}else A?this.options.visualElement.renderState.vars[S]=N:l[S]=N}this.options.layoutId&&(l.pointerEvents=d===this?Fh(c==null?void 0:c.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var c;return(c=l.currentAnimation)==null?void 0:c.stop()}),this.root.nodes.forEach(lw),this.root.sharedNodes.clear()}}}function G7(e){e.updateLayout()}function K7(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"?Ai(p=>{const b=l?t.measuredBox[p]:t.layoutBox[p],x=nr(b);b.min=r[p].min,b.max=b.min+x}):NN(o,t.layoutBox,r)&&Ai(p=>{const b=l?t.measuredBox[p]:t.layoutBox[p],x=nr(r[p]);b.max=b.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+x)});const c=Dl();Bc(c,r,t.layoutBox);const f=Dl();l?Bc(f,e.applyTransform(s,!0),t.measuredBox):Bc(f,r,t.layoutBox);const d=!SN(c);let m=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:b,layout:x}=p;if(b&&x){const S=bn();sm(S,t.layoutBox,b.layoutBox);const C=bn();sm(C,r,x.layoutBox),CN(S,C)||(m=!0),p.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=S,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Q7(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 X7(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function W7(e){e.clearSnapshot()}function lw(e){e.clearMeasurements()}function uw(e){e.isLayoutDirty=!1}function Z7(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function cw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function J7(e){e.resolveTargetDelta()}function eF(e){e.calcProjection()}function tF(e){e.resetSkewAndRotation()}function nF(e){e.removeLeadSnapshot()}function fw(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 rF(e,t,n,r){dw(e.x,t.x,n.x,r),dw(e.y,t.y,n.y,r)}function iF(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sF={duration:.45,ease:[.4,0,.1,1]},hw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mw=hw("applewebkit/")&&!hw("chrome/")?Math.round:Qr;function pw(e){e.min=mw(e.min),e.max=mw(e.max)}function aF(e){pw(e.x),pw(e.y)}function NN(e,t,n){return e==="position"||e==="preserve-aspect"&&!N7(rw(t),rw(n),.2)}function oF(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const lF=kN({attachResizeListener:(e,t)=>sf(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}),s1={current:void 0},RN=kN({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!s1.current){const e=new lF({});e.mount(window),e.setOptions({layoutScroll:!0}),s1.current=e}return s1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),af=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function gw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uF(...e){return t=>{let n=!1;const r=e.map(s=>{const o=gw(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():gw(e[s],null)}}}}function cF(...e){return E.useCallback(uF(...e),e)}class fF extends E.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=Fb(r)&&r.offsetWidth||0,o=Fb(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 dF({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:o}){var b;const l=E.useId(),c=E.useRef(null),f=E.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=E.useContext(af),m=((b=e.props)==null?void 0:b.ref)??(e==null?void 0:e.ref),p=cF(c,m);return E.useInsertionEffect(()=>{const{width:x,height:S,top:C,left:w,right:A,bottom:N}=f.current;if(t||o===!1||!c.current||!x||!S)return;const k=n==="left"?`left: ${w}`:`right: ${A}`,R=r==="bottom"?`bottom: ${N}`:`top: ${C}`;c.current.dataset.motionPopId=l;const B=document.createElement("style");d&&(B.nonce=d);const O=s??document.head;return O.appendChild(B),B.sheet&&B.sheet.insertRule(`
57
- [data-motion-pop-id="${l}"] {
58
- position: absolute !important;
59
- width: ${x}px !important;
60
- height: ${S}px !important;
61
- ${k}px !important;
62
- ${R}px !important;
63
- }
64
- `),()=>{O.contains(B)&&O.removeChild(B)}},[t]),g.jsx(fF,{isPresent:t,childRef:c,sizeRef:f,pop:o,children:o===!1?e:E.cloneElement(e,{ref:p})})}const hF=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:l,anchorX:c,anchorY:f,root:d})=>{const m=Rm(mF),p=E.useId();let b=!0,x=E.useMemo(()=>(b=!1,{id:p,initial:t,isPresent:n,custom:s,onExitComplete:S=>{m.set(S,!0);for(const C of m.values())if(!C)return;r&&r()},register:S=>(m.set(S,!1),()=>m.delete(S))}),[n,m,r]);return o&&b&&(x={...x}),E.useMemo(()=>{m.forEach((S,C)=>m.set(C,!1))},[n]),E.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=g.jsx(dF,{pop:l==="popLayout",isPresent:n,anchorX:c,anchorY:f,root:d,children:e}),g.jsx(Dm.Provider,{value:x,children:e})};function mF(){return new Map}function DN(e=!0){const t=E.useContext(Dm);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=E.useId();E.useEffect(()=>{if(e)return s(o)},[e]);const l=E.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const hh=e=>e.key||"";function bw(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const En=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:l=!1,anchorX:c="left",anchorY:f="top",root:d})=>{const[m,p]=DN(l),b=E.useMemo(()=>bw(e),[e]),x=l&&!m?[]:b.map(hh),S=E.useRef(!0),C=E.useRef(b),w=Rm(()=>new Map),A=E.useRef(new Set),[N,k]=E.useState(b),[R,B]=E.useState(b);lk(()=>{S.current=!1,C.current=b;for(let P=0;P<R.length;P++){const q=hh(R[P]);x.includes(q)?(w.delete(q),A.current.delete(q)):w.get(q)!==!0&&w.set(q,!1)}},[R,x.length,x.join("-")]);const O=[];if(b!==N){let P=[...b];for(let q=0;q<R.length;q++){const L=R[q],X=hh(L);x.includes(X)||(P.splice(q,0,L),O.push(L))}return o==="wait"&&O.length&&(P=O),B(bw(P)),k(b),null}const{forceRender:j}=E.useContext(Hy);return g.jsx(g.Fragment,{children:R.map(P=>{const q=hh(P),L=l&&!m?!1:b===R||x.includes(q),X=()=>{if(A.current.has(q))return;if(A.current.add(q),w.has(q))w.set(q,!0);else return;let Q=!0;w.forEach(ee=>{ee||(Q=!1)}),Q&&(j==null||j(),B(C.current),l&&(p==null||p()),r&&r())};return g.jsx(hF,{isPresent:L,initial:!S.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:d,onExitComplete:L?void 0:X,anchorX:c,anchorY:f,children:P},q)})})},ON=E.createContext({strict:!1}),yw={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 xw=!1;function pF(){if(xw)return;const e={};for(const t in yw)e[t]={isEnabled:n=>yw[t].some(r=>!!n[r])};oN(e),xw=!0}function MN(){return pF(),t7()}function gF(e){const t=MN();for(const n in e)t[n]={...t[n],...e[n]};oN(t)}const bF=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 am(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||bF.has(e)}let IN=e=>!am(e);function LN(e){typeof e=="function"&&(IN=t=>t.startsWith("on")?!am(t):e(t))}try{LN(require("@emotion/is-prop-valid").default)}catch{}function yF(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(IN(s)||n===!0&&am(s)||!t&&!am(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Ew({children:e,isValidProp:t,...n}){t&&LN(t);const r=E.useContext(af);n={...r,...n},n.transition=rx(n.transition,r.transition),n.isStatic=Rm(()=>n.isStatic);const s=E.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return g.jsx(af.Provider,{value:s,children:e})}const Im=E.createContext({});function xF(e,t){if(Mm(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rf(n)?n:void 0,animate:rf(r)?r:void 0}}return e.inherit!==!1?t:{}}function EF(e){const{initial:t,animate:n}=xF(e,E.useContext(Im));return E.useMemo(()=>({initial:t,animate:n}),[Tw(t),Tw(n)])}function Tw(e){return Array.isArray(e)?e.join(" "):e}const gx=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function PN(e,t,n){for(const r in t)!Hn(t[r])&&!mN(r,n)&&(e[r]=t[r])}function TF({transformTemplate:e},t){return E.useMemo(()=>{const n=gx();return mx(n,t,e),Object.assign({},n.vars,n.style)},[t])}function vF(e,t){const n=e.style||{},r={};return PN(r,n,e),Object.assign(r,TF(e,t)),r}function SF(e,t){const n={},r=vF(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 jN=()=>({...gx(),attrs:{}});function CF(e,t,n,r){const s=E.useMemo(()=>{const o=jN();return pN(o,t,bN(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};PN(o,e.style,e),s.style={...o,...s.style}}return s}const wF=["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 bx(e){return typeof e!="string"||e.includes("-")?!1:!!(wF.indexOf(e)>-1||/[A-Z]/u.test(e))}function AF(e,t,n,{latestValues:r},s,o=!1,l){const f=(l??bx(e)?CF:SF)(t,r,s,e),d=yF(t,typeof e=="string",o),m=e!==E.Fragment?{...d,...f,ref:n}:{},{children:p}=t,b=E.useMemo(()=>Hn(p)?p.get():p,[p]);return E.createElement(e,{...m,children:b})}function _F({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:kF(n,r,s,e),renderState:t()}}function kF(e,t,n,r){const s={},o=r(e,{});for(const b in o)s[b]=Fh(o[b]);let{initial:l,animate:c}=e;const f=Mm(e),d=sN(e);t&&d&&!f&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const p=m?c:l;if(p&&typeof p!="boolean"&&!Om(p)){const b=Array.isArray(p)?p:[p];for(let x=0;x<b.length;x++){const S=ax(e,b[x]);if(S){const{transitionEnd:C,transition:w,...A}=S;for(const N in A){let k=A[N];if(Array.isArray(k)){const R=m?k.length-1:0;k=k[R]}k!==null&&(s[N]=k)}for(const N in C)s[N]=C[N]}}}return s}const BN=e=>(t,n)=>{const r=E.useContext(Im),s=E.useContext(Dm),o=()=>_F(e,t,r,s);return n?o():Rm(o)},NF=BN({scrapeMotionValuesFromProps:px,createRenderState:gx}),RF=BN({scrapeMotionValuesFromProps:yN,createRenderState:jN}),DF=Symbol.for("motionComponentSymbol");function OF(e,t,n){const r=E.useRef(n);E.useInsertionEffect(()=>{r.current=n});const s=E.useRef(null);return E.useCallback(o=>{var c;o&&((c=e.onMount)==null||c.call(e,o)),t&&(o?t.mount(o):t.unmount());const l=r.current;if(typeof l=="function")if(o){const f=l(o);typeof f=="function"&&(s.current=f)}else s.current?(s.current(),s.current=null):l(o);else l&&(l.current=o)},[t])}const FN=E.createContext({});function _l(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function MF(e,t,n,r,s,o){var k,R;const{visualElement:l}=E.useContext(Im),c=E.useContext(ON),f=E.useContext(Dm),d=E.useContext(af),m=d.reducedMotion,p=d.skipAnimations,b=E.useRef(null),x=E.useRef(!1);r=r||c.renderer,!b.current&&r&&(b.current=r(e,{visualState:t,parent:l,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:m,skipAnimations:p,isSVG:o}),x.current&&b.current&&(b.current.manuallyAnimateOnMount=!0));const S=b.current,C=E.useContext(FN);S&&!S.projection&&s&&(S.type==="html"||S.type==="svg")&&IF(b.current,n,s,C);const w=E.useRef(!1);E.useInsertionEffect(()=>{S&&w.current&&S.update(n,f)});const A=n[Yk],N=E.useRef(!!A&&!((k=window.MotionHandoffIsComplete)!=null&&k.call(window,A))&&((R=window.MotionHasOptimisedAnimation)==null?void 0:R.call(window,A)));return lk(()=>{x.current=!0,S&&(w.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),N.current&&S.animationState&&S.animationState.animateChanges())}),E.useEffect(()=>{S&&(!N.current&&S.animationState&&S.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var B;(B=window.MotionHandoffMarkAsComplete)==null||B.call(window,A)}),N.current=!1),S.enteringChildren=void 0)}),S}function IF(e,t,n,r){const{layoutId:s,layout:o,drag:l,dragConstraints:c,layoutScroll:f,layoutRoot:d,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:UN(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!l||c&&_l(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:f,layoutRoot:d})}function UN(e){if(e)return e.options.allowProjection!==!1?e.projection:UN(e.parent)}function a1(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&gF(r);const o=n?n==="svg":bx(e),l=o?RF:NF;function c(d,m){let p;const b={...E.useContext(af),...d,layoutId:LF(d)},{isStatic:x}=b,S=EF(d),C=l(d,x);if(!x&&ok){PF();const w=jF(b);p=w.MeasureLayout,S.visualElement=MF(e,C,b,s,w.ProjectionNode,o)}return g.jsxs(Im.Provider,{value:S,children:[p&&S.visualElement?g.jsx(p,{visualElement:S.visualElement,...b}):null,AF(e,d,OF(C,S.visualElement,m),C,x,t,o)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=E.forwardRef(c);return f[DF]=e,f}function LF({layoutId:e}){const t=E.useContext(Hy).id;return t&&e!==void 0?t+"-"+e:e}function PF(e,t){E.useContext(ON).strict}function jF(e){const t=MN(),{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 BF(e,t){if(typeof Proxy>"u")return a1;const n=new Map,r=(o,l)=>a1(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,a1(l,void 0,e,t)),n.get(l))})}const FF=(e,t)=>t.isSVG??bx(e)?new y7(t):new d7(t,{allowProjection:e!==E.Fragment});class UF extends Ca{constructor(t){super(t),t.animationState||(t.animationState=S7(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Om(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 HF=0;class zF extends Ca{constructor(){super(...arguments),this.id=HF++}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 VF={animation:{Feature:UF},exit:{Feature:zF}};function _f(e){return{point:{x:e.pageX,y:e.pageY}}}const qF=e=>t=>cx(t)&&e(t,_f(t));function Fc(e,t,n,r){return sf(e,t,qF(n),r)}const HN=({current:e})=>e?e.ownerDocument.defaultView:null,vw=(e,t)=>Math.abs(e-t);function $F(e,t){const n=vw(e.x,t.x),r=vw(e.y,t.y);return Math.sqrt(n**2+r**2)}const Sw=new Set(["auto","scroll"]);class zN{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:l=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=l1(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,C=$F(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!C)return;const{point:w}=x,{timestamp:A}=Pn;this.history.push({...w,timestamp:A});const{onStart:N,onMove:k}=this.handlers;S||(N&&N(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,x)},this.handlePointerMove=(x,S)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=o1(S,this.transformPagePoint),Ft.update(this.updatePoint,!0)},this.handlePointerUp=(x,S)=>{this.end();const{onEnd:C,onSessionEnd:w,resumeAnimation:A}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&A&&A(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const N=l1(x.type==="pointercancel"?this.lastMoveEventInfo:o1(S,this.transformPagePoint),this.history);this.startEvent&&C&&C(x,N),w&&w(x,N)},!cx(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=s||window;const f=_f(t),d=o1(f,this.transformPagePoint),{point:m}=d,{timestamp:p}=Pn;this.history=[{...m,timestamp:p}];const{onSessionStart:b}=n;b&&b(t,l1(d,this.history)),this.removeListeners=Cf(Fc(this.contextWindow,"pointermove",this.handlePointerMove),Fc(this.contextWindow,"pointerup",this.handlePointerUp),Fc(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Sw.has(r.overflowX)||Sw.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),Ft.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 o1(e,t){return t?{point:t(e.point)}:e}function Cw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function l1({point:e},t){return{point:e,delta:Cw(e,VN(t)),offset:Cw(e,YF(t)),velocity:GF(t,.1)}}function YF(e){return e[0]}function VN(e){return e[e.length-1]}function GF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=VN(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>di(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>di(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 KF(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 ww(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 QF(e,{top:t,left:n,bottom:r,right:s}){return{x:ww(e.x,n,s),y:ww(e.y,t,r)}}function Aw(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 XF(e,t){return{x:Aw(e.x,t.x),y:Aw(e.y,t.y)}}function WF(e,t){let n=.5;const r=nr(e),s=nr(t);return s>r?n=ef(t.min,t.max-r,e.min):r>s&&(n=ef(e.min,e.max-s,t.min)),Bi(0,1,n)}function ZF(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 qb=.35;function JF(e=qb){return e===!1?e=0:e===!0&&(e=qb),{x:_w(e,"left","right"),y:_w(e,"top","bottom")}}function _w(e,t,n){return{min:kw(e,t),max:kw(e,n)}}function kw(e,t){return typeof e=="number"?e:e[t]||0}const eU=new WeakMap;class tU{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=bn(),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(_f(p).point),this.stopAnimation()},l=(p,b)=>{const{drag:x,dragPropagation:S,onDragStart:C}=this.getProps();if(x&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=DB(x),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ai(A=>{let N=this.getAxisMotionValue(A).get()||0;if(Li.test(N)){const{projection:k}=this.visualElement;if(k&&k.layout){const R=k.layout.layoutBox[A];R&&(N=nr(R)*(parseFloat(N)/100))}}this.originPoint[A]=N}),C&&Ft.update(()=>C(p,b),!1,!0),Pb(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},c=(p,b)=>{this.latestPointerEvent=p,this.latestPanInfo=b;const{dragPropagation:x,dragDirectionLock:S,onDirectionLock:C,onDrag:w}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:A}=b;if(S&&this.currentDirection===null){this.currentDirection=rU(A),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",b.point,A),this.updateAxis("y",b.point,A),this.visualElement.render(),w&&Ft.update(()=>w(p,b),!1,!0)},f=(p,b)=>{this.latestPointerEvent=p,this.latestPanInfo=b,this.stop(p,b),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new zN(t,{onSessionStart:o,onStart:l,onMove:c,onSessionEnd:f,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:HN(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:c}=this.getProps();c&&Ft.postRender(()=>c(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||!mh(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=KF(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&&_l(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=QF(r.layoutBox,t):this.constraints=!1,this.elastic=JF(n),s!==this.constraints&&!_l(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ai(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=ZF(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!_l(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=a7(r,s.root,this.visualElement.getTransformPagePoint());let l=XF(s.layout.layoutBox,o);if(n){const c=n(r7(l));this.hasMutatedConstraints=!!c,c&&(l=uN(c))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),f=this.constraints||{},d=Ai(m=>{if(!mh(m,n,this.currentDirection))return;let p=f&&f[m]||{};l&&(p={min:0,max:0});const b=s?200:1e6,x=s?40:1e7,S={type:"inertia",velocity:r?t[m]:0,bounceStiffness:b,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(m,S)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Pb(this.visualElement,t),r.start(sx(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ai(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){Ai(n=>{const{drag:r}=this.getProps();if(!mh(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:l,max:c}=s.layout.layoutBox[n],f=o.get()||0;o.set(t[n]-Qt(l,c,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!_l(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ai(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const f=c.get();s[l]=WF({min:f,max:f},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(),Ai(l=>{if(!mh(l,t,null))return;const c=this.getAxisMotionValue(l),{min:f,max:d}=this.constraints[l];c.set(Qt(f,d,s[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;eU.set(this.visualElement,this);const t=this.visualElement.current,n=Fc(t,"pointerdown",d=>{const{drag:m,dragListener:p=!0}=this.getProps(),b=d.target,x=b!==t&&jB(b);m&&p&&!x&&this.start(d)});let r;const s=()=>{const{dragConstraints:d}=this.getProps();_l(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),r||(r=nU(t,d.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ft.read(s);const c=sf(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:m})=>{this.isDragging&&m&&(Ai(p=>{const b=this.getAxisMotionValue(p);b&&(this.originPoint[p]+=d[p].translate,b.set(b.get()+d[p].translate))}),this.visualElement.render())}));return()=>{c(),n(),l(),f&&f(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:l=qb,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:l,dragMomentum:c}}}function Nw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function nU(e,t,n){const r=LC(e,Nw(n)),s=LC(t,Nw(n));return()=>{r(),s()}}function mh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function rU(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class iU extends Ca{constructor(t){super(t),this.removeGroupControls=Qr,this.removeListeners=Qr,this.controls=new tU(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qr}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 u1=e=>(t,n)=>{e&&Ft.update(()=>e(t,n),!1,!0)};class sU extends Ca{constructor(){super(...arguments),this.removePointerDownListener=Qr}onPointerDown(t){this.session=new zN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:HN(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:u1(t),onStart:u1(n),onMove:u1(r),onEnd:(o,l)=>{delete this.session,s&&Ft.postRender(()=>s(o,l))}}}mount(){this.removePointerDownListener=Fc(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 c1=!1;class aU extends E.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),c1&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Uh.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}),c1=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||Ft.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ux.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;c1=!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 qN(e){const[t,n]=DN(),r=E.useContext(Hy);return g.jsx(aU,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(FN),isPresent:t,safeToRemove:n})}const oU={pan:{Feature:sU},drag:{Feature:iU,ProjectionNode:RN,MeasureLayout:qN}};function Rw(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&&Ft.postRender(()=>o(t,_f(t)))}class lU extends Ca{mount(){const{current:t}=this.node;t&&(this.unmount=MB(t,(n,r)=>(Rw(this.node,r,"Start"),s=>Rw(this.node,s,"End"))))}unmount(){}}class uU 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=Cf(sf(this.node.current,"focus",()=>this.onFocus()),sf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Dw(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&&Ft.postRender(()=>o(t,_f(t)))}class cU extends Ca{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=FB(t,(s,o)=>(Dw(this.node,o,"Start"),(l,{success:c})=>Dw(this.node,l,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const $b=new WeakMap,f1=new WeakMap,fU=e=>{const t=$b.get(e.target);t&&t(e)},dU=e=>{e.forEach(fU)};function hU({root:e,...t}){const n=e||document;f1.has(n)||f1.set(n,{});const r=f1.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(dU,{root:e,...t})),r[s]}function mU(e,t,n){const r=hU(t);return $b.set(e,n),r.observe(e),()=>{$b.delete(e),r.unobserve(e)}}const pU={some:0,all:1};class gU 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:pU[s]},c=f=>{const{isIntersecting:d}=f;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),b=d?m:p;b&&b(f)};return mU(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(bU(t,n))&&this.startObserver()}unmount(){}}function bU({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const yU={inView:{Feature:gU},tap:{Feature:cU},focus:{Feature:uU},hover:{Feature:lU}},xU={layout:{ProjectionNode:RN,MeasureLayout:qN}},EU={...VF,...yU,...oU,...xU},dt=BF(EU,FF);/**
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 $N=(...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 TU=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 vU=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 Ow=e=>{const t=vU(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 SU={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 CU=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 wU=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:l,...c},f)=>E.createElement("svg",{ref:f,...SU,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:$N("lucide",s),...!o&&!CU(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,m])=>E.createElement(d,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 We=(e,t)=>{const n=E.forwardRef(({className:r,...s},o)=>E.createElement(wU,{ref:o,iconNode:t,className:$N(`lucide-${TU(Ow(e))}`,`lucide-${e}`,r),...s}));return n.displayName=Ow(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 AU=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],YN=We("arrow-down",AU);/**
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 _U=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],GN=We("arrow-up",_U);/**
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 kU=[["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"}]],NU=We("bot",kU);/**
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 RU=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mi=We("check",RU);/**
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 DU=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Lm=We("chevron-down",DU);/**
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 OU=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],of=We("chevron-right",OU);/**
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 MU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],IU=We("circle-check",MU);/**
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 LU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],PU=We("circle",LU);/**
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 jU=[["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"}]],BU=We("clipboard-list",jU);/**
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 FU=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],UU=We("clock",FU);/**
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 HU=[["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"}]],KN=We("copy",HU);/**
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 zU=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],VU=We("corner-down-left",zU);/**
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 qU=[["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"}]],$U=We("dollar-sign",qU);/**
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 YU=[["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"}]],Mw=We("external-link",YU);/**
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 GU=[["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"}]],KU=We("eye-off",GU);/**
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 QU=[["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"}]],XU=We("eye",QU);/**
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 WU=[["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"}]],ZU=We("file-text",WU);/**
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 JU=[["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"}]],eH=We("file",JU);/**
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 tH=[["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"}]],QN=We("folder-open",tH);/**
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 nH=[["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"}]],Uc=We("folder",nH);/**
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 rH=[["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"}]],Iw=We("git-branch",rH);/**
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 iH=[["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"}]],sH=We("heart-pulse",iH);/**
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 aH=[["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"}]],oH=We("layers",aH);/**
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 lH=[["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"}]],uH=We("list-todo",lH);/**
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 cH=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],lf=We("loader-circle",cH);/**
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 fH=[["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"}]],XN=We("message-square",fH);/**
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 dH=[["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"}]],hH=We("monitor",dH);/**
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 mH=[["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"}]],pH=We("moon",mH);/**
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 gH=[["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"}]],bH=We("panel-left-close",gH);/**
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 yH=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Lw=We("panel-left",yH);/**
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 xH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],EH=We("plus",xH);/**
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 TH=[["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"}]],vH=We("route",TH);/**
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 SH=[["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"}]],CH=We("settings",SH);/**
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 wH=[["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"}]],AH=We("shield-check",wH);/**
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 _H=[["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"}]],WN=We("shield-off",_H);/**
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 kH=[["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"}]],yx=We("shield",kH);/**
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 NH=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],RH=We("square",NH);/**
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 DH=[["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"}]],OH=We("sun",DH);/**
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 MH=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],IH=We("terminal",MH);/**
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 LH=[["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"}]],PH=We("volume-2",LH);/**
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 jH=[["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"}]],BH=We("volume-off",jH);/**
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 FH=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kf=We("x",FH);function Pw({sessionId:e}){return null}const jw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Bw=By,UH=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Bw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,l=Object.keys(s).map(d=>{const m=n==null?void 0:n[d],p=o==null?void 0:o[d];if(m===null)return null;const b=jw(m)||jw(p);return s[d][b]}),c=n&&Object.entries(n).reduce((d,m)=>{let[p,b]=m;return b===void 0||(d[p]=b),d},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,m)=>{let{class:p,className:b,...x}=m;return Object.entries(x).every(S=>{let[C,w]=S;return Array.isArray(w)?w.includes({...o,...c}[C]):{...o,...c}[C]===w})?[...d,p,b]:d},[]);return Bw(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)},HH=UH("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function zH({className:e,variant:t,...n}){return g.jsx("div",{className:Ye(HH({variant:t}),e),...n})}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 Fw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nf(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Fw(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():Fw(e[s],null)}}}}function _t(...e){return E.useCallback(Nf(...e),e)}function VH(e,t){const n=E.createContext(t),r=o=>{const{children:l,...c}=o,f=E.useMemo(()=>c,Object.values(c));return g.jsx(n.Provider,{value:f,children:l})};r.displayName=e+"Provider";function s(o){const l=E.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 Hi(e,t=[]){let n=[];function r(o,l){const c=E.createContext(l),f=n.length;n=[...n,l];const d=p=>{var A;const{scope:b,children:x,...S}=p,C=((A=b==null?void 0:b[e])==null?void 0:A[f])||c,w=E.useMemo(()=>S,Object.values(S));return g.jsx(C.Provider,{value:w,children:x})};d.displayName=o+"Provider";function m(p,b){var C;const x=((C=b==null?void 0:b[e])==null?void 0:C[f])||c,S=E.useContext(x);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[d,m]}const s=()=>{const o=n.map(l=>E.createContext(l));return function(c){const f=(c==null?void 0:c[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return s.scopeName=e,[r,qH(s,...t)]}function qH(...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((c,{useScope:f,scopeName:d})=>{const p=f(o)[`__scope${d}`];return{...c,...p}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Vn=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},$H=Ry[" useId ".trim().toString()]||(()=>{}),YH=0;function Pi(e){const[t,n]=E.useState($H());return Vn(()=>{n(r=>r??String(YH++))},[e]),t?`radix-${t}`:""}var GH=Ry[" useInsertionEffect ".trim().toString()]||Vn;function xa({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,l]=KH({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:s;{const m=E.useRef(e!==void 0);E.useEffect(()=>{const p=m.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"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=c},[c,r])}const d=E.useCallback(m=>{var p;if(c){const b=QH(m)?m(e):m;b!==e&&((p=l.current)==null||p.call(l,b))}else o(m)},[c,e,o,l]);return[f,d]}function KH({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),s=E.useRef(n),o=E.useRef(t);return GH(()=>{o.current=t},[t]),E.useEffect(()=>{var l;s.current!==n&&((l=o.current)==null||l.call(o,n),s.current=n)},[n,s]),[n,r,o]}function QH(e){return typeof e=="function"}var _o=E3();const XH=Tf(_o);function tu(e){const t=WH(e),n=E.forwardRef((r,s)=>{const{children:o,...l}=r,c=E.Children.toArray(o),f=c.find(JH);if(f){const d=f.props.children,m=c.map(p=>p===f?E.Children.count(d)>1?E.Children.only(null):E.isValidElement(d)?d.props.children:null:p);return g.jsx(t,{...l,ref:s,children:E.isValidElement(d)?E.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function WH(e){const t=E.forwardRef((n,r)=>{const{children:s,...o}=n;if(E.isValidElement(s)){const l=tz(s),c=ez(o,s.props);return s.type!==E.Fragment&&(c.ref=r?Nf(r,l):l),E.cloneElement(s,c)}return E.Children.count(s)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ZH=Symbol("radix.slottable");function JH(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ZH}function ez(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]=(...c)=>{const f=o(...c);return s(...c),f}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function tz(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 nz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tt=nz.reduce((e,t)=>{const n=tu(`Primitive.${t}`),r=E.forwardRef((s,o)=>{const{asChild:l,...c}=s,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ZN(e,t){e&&_o.flushSync(()=>e.dispatchEvent(t))}function Fi(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function rz(e,t=globalThis==null?void 0:globalThis.document){const n=Fi(e);E.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 iz="DismissableLayer",Yb="dismissableLayer.update",sz="dismissableLayer.pointerDownOutside",az="dismissableLayer.focusOutside",Uw,JN=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rf=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...f}=e,d=E.useContext(JN),[m,p]=E.useState(null),b=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=E.useState({}),S=_t(t,j=>p(j)),C=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),A=C.indexOf(w),N=m?C.indexOf(m):-1,k=d.layersWithOutsidePointerEventsDisabled.size>0,R=N>=A,B=uz(j=>{const P=j.target,q=[...d.branches].some(L=>L.contains(P));!R||q||(s==null||s(j),l==null||l(j),j.defaultPrevented||c==null||c())},b),O=cz(j=>{const P=j.target;[...d.branches].some(L=>L.contains(P))||(o==null||o(j),l==null||l(j),j.defaultPrevented||c==null||c())},b);return rz(j=>{N===d.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&c&&(j.preventDefault(),c()))},b),E.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Uw=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),Hw(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Uw)}},[m,b,n,d]),E.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),Hw())},[m,d]),E.useEffect(()=>{const j=()=>x({});return document.addEventListener(Yb,j),()=>document.removeEventListener(Yb,j)},[]),g.jsx(tt.div,{...f,ref:S,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,B.onPointerDownCapture)})});Rf.displayName=iz;var oz="DismissableLayerBranch",lz=E.forwardRef((e,t)=>{const n=E.useContext(JN),r=E.useRef(null),s=_t(t,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),g.jsx(tt.div,{...e,ref:s})});lz.displayName=oz;function uz(e,t=globalThis==null?void 0:globalThis.document){const n=Fi(e),r=E.useRef(!1),s=E.useRef(()=>{});return E.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let f=function(){eR(sz,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=f,t.addEventListener("click",s.current,{once:!0})):f()}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 cz(e,t=globalThis==null?void 0:globalThis.document){const n=Fi(e),r=E.useRef(!1);return E.useEffect(()=>{const s=o=>{o.target&&!r.current&&eR(az,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 Hw(){const e=new CustomEvent(Yb);document.dispatchEvent(e)}function eR(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?ZN(s,o):s.dispatchEvent(o)}var d1="focusScope.autoFocusOnMount",h1="focusScope.autoFocusOnUnmount",zw={bubbles:!1,cancelable:!0},fz="FocusScope",Pm=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...l}=e,[c,f]=E.useState(null),d=Fi(s),m=Fi(o),p=E.useRef(null),b=_t(t,C=>f(C)),x=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let C=function(k){if(x.paused||!c)return;const R=k.target;c.contains(R)?p.current=R:ea(p.current,{select:!0})},w=function(k){if(x.paused||!c)return;const R=k.relatedTarget;R!==null&&(c.contains(R)||ea(p.current,{select:!0}))},A=function(k){if(document.activeElement===document.body)for(const B of k)B.removedNodes.length>0&&ea(c)};document.addEventListener("focusin",C),document.addEventListener("focusout",w);const N=new MutationObserver(A);return c&&N.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",w),N.disconnect()}}},[r,c,x.paused]),E.useEffect(()=>{if(c){qw.add(x);const C=document.activeElement;if(!c.contains(C)){const A=new CustomEvent(d1,zw);c.addEventListener(d1,d),c.dispatchEvent(A),A.defaultPrevented||(dz(bz(tR(c)),{select:!0}),document.activeElement===C&&ea(c))}return()=>{c.removeEventListener(d1,d),setTimeout(()=>{const A=new CustomEvent(h1,zw);c.addEventListener(h1,m),c.dispatchEvent(A),A.defaultPrevented||ea(C??document.body,{select:!0}),c.removeEventListener(h1,m),qw.remove(x)},0)}}},[c,d,m,x]);const S=E.useCallback(C=>{if(!n&&!r||x.paused)return;const w=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,A=document.activeElement;if(w&&A){const N=C.currentTarget,[k,R]=hz(N);k&&R?!C.shiftKey&&A===R?(C.preventDefault(),n&&ea(k,{select:!0})):C.shiftKey&&A===k&&(C.preventDefault(),n&&ea(R,{select:!0})):A===N&&C.preventDefault()}},[n,r,x.paused]);return g.jsx(tt.div,{tabIndex:-1,...l,ref:b,onKeyDown:S})});Pm.displayName=fz;function dz(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ea(r,{select:t}),document.activeElement!==n)return}function hz(e){const t=tR(e),n=Vw(t,e),r=Vw(t.reverse(),e);return[n,r]}function tR(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 Vw(e,t){for(const n of e)if(!mz(n,{upTo:t}))return n}function mz(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 pz(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&&pz(e)&&t&&e.select()}}var qw=gz();function gz(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=$w(e,t),e.unshift(t)},remove(t){var n;e=$w(e,t),(n=e[0])==null||n.resume()}}}function $w(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function bz(e){return e.filter(t=>t.tagName!=="A")}var yz="Portal",Df=E.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[s,o]=E.useState(!1);Vn(()=>o(!0),[]);const l=n||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?XH.createPortal(g.jsx(tt.div,{...r,ref:t}),l):null});Df.displayName=yz;function xz(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var bi=e=>{const{present:t,children:n}=e,r=Ez(t),s=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=_t(r.ref,Tz(s));return typeof n=="function"||r.isPresent?E.cloneElement(s,{ref:o}):null};bi.displayName="Presence";function Ez(e){const[t,n]=E.useState(),r=E.useRef(null),s=E.useRef(e),o=E.useRef("none"),l=e?"mounted":"unmounted",[c,f]=xz(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const d=ph(r.current);o.current=c==="mounted"?d:"none"},[c]),Vn(()=>{const d=r.current,m=s.current;if(m!==e){const b=o.current,x=ph(d);e?f("MOUNT"):x==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(m&&b!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,f]),Vn(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,p=x=>{const C=ph(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&C&&(f("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},b=x=>{x.target===t&&(o.current=ph(r.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:E.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function ph(e){return(e==null?void 0:e.animationName)||"none"}function Tz(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 m1=0;function xx(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Yw()),document.body.insertAdjacentElement("beforeend",e[1]??Yw()),m1++,()=>{m1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),m1--}},[])}function Yw(){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 Oi=function(){return Oi=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},Oi.apply(this,arguments)};function nR(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 vz(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 Hh="right-scroll-bar-position",zh="width-before-scroll-bar",Sz="with-scroll-bars-hidden",Cz="--removed-body-scroll-bar-size";function p1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wz(e,t){var n=E.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 Az=typeof window<"u"?E.useLayoutEffect:E.useEffect,Gw=new WeakMap;function _z(e,t){var n=wz(null,function(r){return e.forEach(function(s){return p1(s,r)})});return Az(function(){var r=Gw.get(n);if(r){var s=new Set(r),o=new Set(e),l=n.current;s.forEach(function(c){o.has(c)||p1(c,null)}),o.forEach(function(c){s.has(c)||p1(c,l)})}Gw.set(n,e)},[e]),n}function kz(e){return e}function Nz(e,t){t===void 0&&(t=kz);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(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(o),l=n}var f=function(){var m=l;l=[],m.forEach(o)},d=function(){return Promise.resolve().then(f)};d(),n={push:function(m){l.push(m),d()},filter:function(m){return l=l.filter(m),n}}}};return s}function Rz(e){e===void 0&&(e={});var t=Nz(null);return t.options=Oi({async:!0,ssr:!1},e),t}var rR=function(e){var t=e.sideCar,n=nR(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 E.createElement(r,Oi({},n))};rR.isSideCarExport=!0;function Dz(e,t){return e.useMedium(t),rR}var iR=Rz(),g1=function(){},jm=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:g1,onWheelCapture:g1,onTouchMoveCapture:g1}),s=r[0],o=r[1],l=e.forwardProps,c=e.children,f=e.className,d=e.removeScrollBar,m=e.enabled,p=e.shards,b=e.sideCar,x=e.noRelative,S=e.noIsolation,C=e.inert,w=e.allowPinchZoom,A=e.as,N=A===void 0?"div":A,k=e.gapMode,R=nR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),B=b,O=_z([n,t]),j=Oi(Oi({},R),s);return E.createElement(E.Fragment,null,m&&E.createElement(B,{sideCar:iR,removeScrollBar:d,shards:p,noRelative:x,noIsolation:S,inert:C,setCallbacks:o,allowPinchZoom:!!w,lockRef:n,gapMode:k}),l?E.cloneElement(E.Children.only(c),Oi(Oi({},j),{ref:O})):E.createElement(N,Oi({},j,{className:f,ref:O}),c))});jm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jm.classNames={fullWidth:zh,zeroRight:Hh};var Oz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Mz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Oz();return t&&e.setAttribute("nonce",t),e}function Iz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Lz(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Pz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Mz())&&(Iz(t,n),Lz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jz=function(){var e=Pz();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sR=function(){var e=jz(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},Bz={left:0,top:0,right:0,gap:0},b1=function(e){return parseInt(e||"",10)||0},Fz=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[b1(n),b1(r),b1(s)]},Uz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Bz;var t=Fz(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])}},Hz=sR(),Bl="data-scroll-locked",zz=function(e,t,n,r){var s=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
315
- .`.concat(Sz,` {
316
- overflow: hidden `).concat(r,`;
317
- padding-right: `).concat(c,"px ").concat(r,`;
318
- }
319
- body[`).concat(Bl,`] {
320
- overflow: hidden `).concat(r,`;
321
- overscroll-behavior: contain;
322
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
323
- padding-left: `.concat(s,`px;
324
- padding-top: `).concat(o,`px;
325
- padding-right: `).concat(l,`px;
326
- margin-left:0;
327
- margin-top:0;
328
- margin-right: `).concat(c,"px ").concat(r,`;
329
- `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
330
- }
331
-
332
- .`).concat(Hh,` {
333
- right: `).concat(c,"px ").concat(r,`;
334
- }
335
-
336
- .`).concat(zh,` {
337
- margin-right: `).concat(c,"px ").concat(r,`;
338
- }
339
-
340
- .`).concat(Hh," .").concat(Hh,` {
341
- right: 0 `).concat(r,`;
342
- }
343
-
344
- .`).concat(zh," .").concat(zh,` {
345
- margin-right: 0 `).concat(r,`;
346
- }
347
-
348
- body[`).concat(Bl,`] {
349
- `).concat(Cz,": ").concat(c,`px;
350
- }
351
- `)},Kw=function(){var e=parseInt(document.body.getAttribute(Bl)||"0",10);return isFinite(e)?e:0},Vz=function(){E.useEffect(function(){return document.body.setAttribute(Bl,(Kw()+1).toString()),function(){var e=Kw()-1;e<=0?document.body.removeAttribute(Bl):document.body.setAttribute(Bl,e.toString())}},[])},qz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;Vz();var o=E.useMemo(function(){return Uz(s)},[s]);return E.createElement(Hz,{styles:zz(o,!t,s,n?"":"!important")})},Gb=!1;if(typeof window<"u")try{var gh=Object.defineProperty({},"passive",{get:function(){return Gb=!0,!0}});window.addEventListener("test",gh,gh),window.removeEventListener("test",gh,gh)}catch{Gb=!1}var Tl=Gb?{passive:!1}:!1,$z=function(e){return e.tagName==="TEXTAREA"},aR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$z(e)&&n[t]==="visible")},Yz=function(e){return aR(e,"overflowY")},Gz=function(e){return aR(e,"overflowX")},Qw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=oR(e,r);if(s){var o=lR(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Kz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Qz=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},oR=function(e,t){return e==="v"?Yz(t):Gz(t)},lR=function(e,t){return e==="v"?Kz(t):Qz(t)},Xz=function(e,t){return e==="h"&&t==="rtl"?-1:1},Wz=function(e,t,n,r,s){var o=Xz(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,f=t.contains(c),d=!1,m=l>0,p=0,b=0;do{if(!c)break;var x=lR(e,c),S=x[0],C=x[1],w=x[2],A=C-w-o*S;(S||A)&&oR(e,c)&&(p+=A,b+=S);var N=c.parentNode;c=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(p)<1||!m&&Math.abs(b)<1)&&(d=!0),d},bh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xw=function(e){return[e.deltaX,e.deltaY]},Ww=function(e){return e&&"current"in e?e.current:e},Zz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Jz=function(e){return`
352
- .block-interactivity-`.concat(e,` {pointer-events: none;}
353
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
354
- `)},eV=0,vl=[];function tV(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),s=E.useState(eV++)[0],o=E.useState(sR)[0],l=E.useRef(e);E.useEffect(function(){l.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var C=vz([e.lockRef.current],(e.shards||[]).map(Ww),!0).filter(Boolean);return C.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=E.useCallback(function(C,w){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!l.current.allowPinchZoom;var A=bh(C),N=n.current,k="deltaX"in C?C.deltaX:N[0]-A[0],R="deltaY"in C?C.deltaY:N[1]-A[1],B,O=C.target,j=Math.abs(k)>Math.abs(R)?"h":"v";if("touches"in C&&j==="h"&&O.type==="range")return!1;var P=window.getSelection(),q=P&&P.anchorNode,L=q?q===O||q.contains(O):!1;if(L)return!1;var X=Qw(j,O);if(!X)return!0;if(X?B=j:(B=j==="v"?"h":"v",X=Qw(j,O)),!X)return!1;if(!r.current&&"changedTouches"in C&&(k||R)&&(r.current=B),!B)return!0;var Q=r.current||B;return Wz(Q,w,C,Q==="h"?k:R)},[]),f=E.useCallback(function(C){var w=C;if(!(!vl.length||vl[vl.length-1]!==o)){var A="deltaY"in w?Xw(w):bh(w),N=t.current.filter(function(B){return B.name===w.type&&(B.target===w.target||w.target===B.shadowParent)&&Zz(B.delta,A)})[0];if(N&&N.should){w.cancelable&&w.preventDefault();return}if(!N){var k=(l.current.shards||[]).map(Ww).filter(Boolean).filter(function(B){return B.contains(w.target)}),R=k.length>0?c(w,k[0]):!l.current.noIsolation;R&&w.cancelable&&w.preventDefault()}}},[]),d=E.useCallback(function(C,w,A,N){var k={name:C,delta:w,target:A,should:N,shadowParent:nV(A)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(R){return R!==k})},1)},[]),m=E.useCallback(function(C){n.current=bh(C),r.current=void 0},[]),p=E.useCallback(function(C){d(C.type,Xw(C),C.target,c(C,e.lockRef.current))},[]),b=E.useCallback(function(C){d(C.type,bh(C),C.target,c(C,e.lockRef.current))},[]);E.useEffect(function(){return vl.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:b}),document.addEventListener("wheel",f,Tl),document.addEventListener("touchmove",f,Tl),document.addEventListener("touchstart",m,Tl),function(){vl=vl.filter(function(C){return C!==o}),document.removeEventListener("wheel",f,Tl),document.removeEventListener("touchmove",f,Tl),document.removeEventListener("touchstart",m,Tl)}},[]);var x=e.removeScrollBar,S=e.inert;return E.createElement(E.Fragment,null,S?E.createElement(o,{styles:Jz(s)}):null,x?E.createElement(qz,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rV=Dz(iR,tV);var Bm=E.forwardRef(function(e,t){return E.createElement(jm,Oi({},e,{ref:t,sideCar:rV}))});Bm.classNames=jm.classNames;var iV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sl=new WeakMap,yh=new WeakMap,xh={},y1=0,uR=function(e){return e&&(e.host||uR(e.parentNode))},sV=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=uR(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})},aV=function(e,t,n,r){var s=sV(t,Array.isArray(e)?e:[e]);xh[n]||(xh[n]=new WeakMap);var o=xh[n],l=[],c=new Set,f=new Set(s),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};s.forEach(d);var m=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(b){if(c.has(b))m(b);else try{var x=b.getAttribute(r),S=x!==null&&x!=="false",C=(Sl.get(b)||0)+1,w=(o.get(b)||0)+1;Sl.set(b,C),o.set(b,w),l.push(b),C===1&&S&&yh.set(b,!0),w===1&&b.setAttribute(n,"true"),S||b.setAttribute(r,"true")}catch(A){console.error("aria-hidden: cannot operate on ",b,A)}})};return m(t),c.clear(),y1++,function(){l.forEach(function(p){var b=Sl.get(p)-1,x=o.get(p)-1;Sl.set(p,b),o.set(p,x),b||(yh.has(p)||p.removeAttribute(r),yh.delete(p)),x||p.removeAttribute(n)}),y1--,y1||(Sl=new WeakMap,Sl=new WeakMap,yh=new WeakMap,xh={})}},Ex=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=iV(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),aV(r,s,n,"aria-hidden")):function(){return null}},Fm="Dialog",[cR]=Hi(Fm),[oV,yi]=cR(Fm),fR=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:l=!0}=e,c=E.useRef(null),f=E.useRef(null),[d,m]=xa({prop:r,defaultProp:s??!1,onChange:o,caller:Fm});return g.jsx(oV,{scope:t,triggerRef:c,contentRef:f,contentId:Pi(),titleId:Pi(),descriptionId:Pi(),open:d,onOpenChange:m,onOpenToggle:E.useCallback(()=>m(p=>!p),[m]),modal:l,children:n})};fR.displayName=Fm;var dR="DialogTrigger",hR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=yi(dR,n),o=_t(t,s.triggerRef);return g.jsx(tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Sx(s.open),...r,ref:o,onClick:Ne(e.onClick,s.onOpenToggle)})});hR.displayName=dR;var Tx="DialogPortal",[lV,mR]=cR(Tx,{forceMount:void 0}),pR=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=yi(Tx,t);return g.jsx(lV,{scope:t,forceMount:n,children:E.Children.map(r,l=>g.jsx(bi,{present:n||o.open,children:g.jsx(Df,{asChild:!0,container:s,children:l})}))})};pR.displayName=Tx;var om="DialogOverlay",gR=E.forwardRef((e,t)=>{const n=mR(om,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=yi(om,e.__scopeDialog);return o.modal?g.jsx(bi,{present:r||o.open,children:g.jsx(cV,{...s,ref:t})}):null});gR.displayName=om;var uV=tu("DialogOverlay.RemoveScroll"),cV=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=yi(om,n);return g.jsx(Bm,{as:uV,allowPinchZoom:!0,shards:[s.contentRef],children:g.jsx(tt.div,{"data-state":Sx(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),xo="DialogContent",bR=E.forwardRef((e,t)=>{const n=mR(xo,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=yi(xo,e.__scopeDialog);return g.jsx(bi,{present:r||o.open,children:o.modal?g.jsx(fV,{...s,ref:t}):g.jsx(dV,{...s,ref:t})})});bR.displayName=xo;var fV=E.forwardRef((e,t)=>{const n=yi(xo,e.__scopeDialog),r=E.useRef(null),s=_t(t,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return Ex(o)},[]),g.jsx(yR,{...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,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,o=>o.preventDefault())})}),dV=E.forwardRef((e,t)=>{const n=yi(xo,e.__scopeDialog),r=E.useRef(!1),s=E.useRef(!1);return g.jsx(yR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),yR=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...l}=e,c=yi(xo,n),f=E.useRef(null),d=_t(t,f);return xx(),g.jsxs(g.Fragment,{children:[g.jsx(Pm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:g.jsx(Rf,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Sx(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(hV,{titleId:c.titleId}),g.jsx(pV,{contentRef:f,descriptionId:c.descriptionId})]})]})}),vx="DialogTitle",xR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=yi(vx,n);return g.jsx(tt.h2,{id:s.titleId,...r,ref:t})});xR.displayName=vx;var ER="DialogDescription",TR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=yi(ER,n);return g.jsx(tt.p,{id:s.descriptionId,...r,ref:t})});TR.displayName=ER;var vR="DialogClose",SR=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=yi(vR,n);return g.jsx(tt.button,{type:"button",...r,ref:t,onClick:Ne(e.onClick,()=>s.onOpenChange(!1))})});SR.displayName=vR;function Sx(e){return e?"open":"closed"}var CR="DialogTitleWarning",[Koe,wR]=VH(CR,{contentName:xo,titleName:vx,docsSlug:"dialog"}),hV=({titleId:e})=>{const t=wR(CR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
355
-
356
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
357
-
358
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},mV="DialogDescriptionWarning",pV=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wR(mV).contentName}}.`;return E.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},AR=fR,gV=hR,_R=pR,Cx=gR,wx=bR,Ax=xR,_x=TR,bV=SR;const yV=AR,xV=_R,kR=E.forwardRef(({className:e,...t},n)=>g.jsx(Cx,{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}));kR.displayName=Cx.displayName;const NR=E.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(xV,{children:[g.jsx(kR,{}),g.jsxs(wx,{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,g.jsxs(bV,{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:[g.jsx(kf,{className:"size-(--size-icon-md)"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));NR.displayName=wx.displayName;function RR({className:e,...t}){return g.jsx("div",{className:Ye("flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}RR.displayName="DialogHeader";const DR=E.forwardRef(({className:e,...t},n)=>g.jsx(Ax,{ref:n,className:Ye("text-lg leading-none font-semibold tracking-tight",e),...t}));DR.displayName=Ax.displayName;const EV=E.forwardRef(({className:e,...t},n)=>g.jsx(_x,{ref:n,className:Ye("text-muted-foreground text-sm",e),...t}));EV.displayName=_x.displayName;function TV(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 OR=we.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}),Of=()=>{const e=we.useContext(OR);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};TV(`[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(
359
- [data-state=closed]
360
- ){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 vV(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function SV(){return kx(/^Mac/)}function CV(){return kx(/^iPhone/)}function Zw(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function wV(){return kx(/^iPad/)||SV()&&navigator.maxTouchPoints>1}function MR(){return CV()||wV()}function kx(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const AV=24,_V=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Jw(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const x1=typeof document<"u"&&window.visualViewport;function eA(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function IR(e){for(eA(e)&&(e=e.parentElement);e&&!eA(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const kV=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Eh=0,E1;function NV(e={}){let{isDisabled:t}=e;_V(()=>{if(!t)return Eh++,Eh===1&&MR()&&(E1=RV()),()=>{Eh--,Eh===0&&(E1==null||E1())}},[t])}function RV(){let e,t=0,n=p=>{e=IR(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 b=p.changedTouches[0].pageY,x=e.scrollTop,S=e.scrollHeight-e.clientHeight;S!==0&&((x<=0&&b>t||x>=S&&b<t)&&p.preventDefault(),t=b)},s=p=>{let b=p.target;Kb(b)&&b!==document.activeElement&&(p.preventDefault(),b.style.transform="translateY(-2000px)",b.focus(),requestAnimationFrame(()=>{b.style.transform=""}))},o=p=>{let b=p.target;Kb(b)&&(b.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{b.style.transform="",x1&&(x1.height<window.innerHeight?requestAnimationFrame(()=>{tA(b)}):x1.addEventListener("resize",()=>tA(b),{once:!0}))}))},l=()=>{window.scrollTo(0,0)},c=window.pageXOffset,f=window.pageYOffset,d=Jw(DV(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=Jw(bc(document,"touchstart",n,{passive:!1,capture:!0}),bc(document,"touchmove",r,{passive:!1,capture:!0}),bc(document,"touchend",s,{passive:!1,capture:!0}),bc(document,"focus",o,!0),bc(window,"scroll",l));return()=>{d(),m(),window.scrollTo(c,f)}}function DV(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function bc(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function tA(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=IR(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+AV;o>l&&(n.scrollTop+=s-r)}e=n.parentElement}}function Kb(e){return e instanceof HTMLInputElement&&!kV.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function OV(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function MV(...e){return t=>e.forEach(n=>OV(n,t))}function LR(...e){return E.useCallback(MV(...e),e)}const PR=new WeakMap;function yn(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&&PR.set(e,r)}function IV(e,t){if(!e||!(e instanceof HTMLElement))return;let n=PR.get(e);n&&(e.style[t]=n[t])}const hn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Th(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(", ")[hn(t)?13:12]):(s=r.match(/^matrix\((.+)\)$/),s?parseFloat(s[1].split(", ")[hn(t)?5:4]):null)}function LV(e){return 8*(Math.log(e+1)-2)}function T1(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function PV(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Kt={DURATION:.5,EASE:[.32,.72,0,1]},jR=.4,jV=.25,BV=100,BR=8,Qa=16,Qb=26,v1="vaul-dragging";function FR(e){const t=we.useRef(e);return we.useEffect(()=>{t.current=e}),we.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function FV({defaultProp:e,onChange:t}){const n=we.useState(e),[r]=n,s=we.useRef(r),o=FR(t);return we.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}function UR({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=FV({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:r,c=FR(n),f=we.useCallback(d=>{if(o){const p=typeof d=="function"?d(e):d;p!==e&&c(p)}else s(d)},[o,e,s,c]);return[l,f]}function UV({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:s,fadeFromIndex:o,onSnapPointChange:l,direction:c="bottom",container:f,snapToSequentialPoint:d}){const[m,p]=UR({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[b,x]=we.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);we.useEffect(()=>{function j(){x({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[]);const S=we.useMemo(()=>m===(n==null?void 0:n[n.length-1])||null,[n,m]),C=we.useMemo(()=>{var j;return(j=n==null?void 0:n.findIndex(P=>P===m))!=null?j:null},[n,m]),w=n&&n.length>0&&(o||o===0)&&!Number.isNaN(o)&&n[o]===m||!n,A=we.useMemo(()=>{const j=f?{width:f.getBoundingClientRect().width,height:f.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(q=>{const L=typeof q=="string";let X=0;if(L&&(X=parseInt(q,10)),hn(c)){const ee=L?X:b?q*j.height:0;return b?c==="bottom"?j.height-ee:-j.height+ee:ee}const Q=L?X:b?q*j.width:0;return b?c==="right"?j.width-Q:-j.width+Q:Q}))!=null?P:[]},[n,b,f]),N=we.useMemo(()=>C!==null?A==null?void 0:A[C]:null,[A,C]),k=we.useCallback(j=>{var P;const q=(P=A==null?void 0:A.findIndex(L=>L===j))!=null?P:null;l(q),yn(r.current,{transition:`transform ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,transform:hn(c)?`translate3d(0, ${j}px, 0)`:`translate3d(${j}px, 0, 0)`}),A&&q!==A.length-1&&o!==void 0&&q!==o&&q<o?yn(s.current,{transition:`opacity ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,opacity:"0"}):yn(s.current,{transition:`opacity ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,opacity:"1"}),p(n==null?void 0:n[Math.max(q,0)])},[r.current,n,A,o,s,p]);we.useEffect(()=>{if(m||e){var j;const P=(j=n==null?void 0:n.findIndex(q=>q===e||q===m))!=null?j:-1;A&&P!==-1&&typeof A[P]=="number"&&k(A[P])}},[m,e,n,A,k]);function R({draggedDistance:j,closeDrawer:P,velocity:q,dismissible:L}){if(o===void 0)return;const X=c==="bottom"||c==="right"?(N??0)-j:(N??0)+j,Q=C===o-1,ee=C===0,ne=j>0;if(Q&&yn(s.current,{transition:`opacity ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`}),!d&&q>2&&!ne){L?P():k(A[0]);return}if(!d&&q>2&&ne&&A&&n){k(A[n.length-1]);return}const Z=A==null?void 0:A.reduce((H,$)=>typeof H!="number"||typeof $!="number"?H:Math.abs($-X)<Math.abs(H-X)?$:H),D=hn(c)?window.innerHeight:window.innerWidth;if(q>jR&&Math.abs(j)<D*.4){const H=ne?1:-1;if(H>0&&S&&n){k(A[n.length-1]);return}if(ee&&H<0&&L&&P(),C===null)return;k(A[C+H]);return}k(Z)}function B({draggedDistance:j}){if(N===null)return;const P=c==="bottom"||c==="right"?N-j:N+j;(c==="bottom"||c==="right")&&P<A[A.length-1]||(c==="top"||c==="left")&&P>A[A.length-1]||yn(r.current,{transform:hn(c)?`translate3d(0, ${P}px, 0)`:`translate3d(${P}px, 0, 0)`})}function O(j,P){if(!n||typeof C!="number"||!A||o===void 0)return null;const q=C===o-1;if(C>=o&&P)return 0;if(q&&!P)return 1;if(!w&&!q)return null;const X=q?C+1:C-1,Q=q?A[X]-A[X-1]:A[X+1]-A[X],ee=j/Math.abs(Q);return q?1-ee:ee}return{isLastSnapPoint:S,activeSnapPoint:m,shouldFade:w,getPercentageDragged:O,setActiveSnapPoint:p,activeSnapPointIndex:C,onRelease:R,onDrag:B,snapPointsOffset:A}}const HV=()=>()=>{};function zV(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:s}=Of(),o=we.useRef(null),l=E.useMemo(()=>document.body.style.backgroundColor,[]);function c(){return(window.innerWidth-Qb)/window.innerWidth}we.useEffect(()=>{if(t&&n){o.current&&clearTimeout(o.current);const f=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!f)return;PV(r&&!s?T1(document.body,{background:"black"}):HV,T1(f,{transformOrigin:hn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Kt.EASE.join(",")})`}));const d=T1(f,{borderRadius:`${BR}px`,overflow:"hidden",...hn(e)?{transform:`scale(${c()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${c()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{d(),o.current=window.setTimeout(()=>{l?document.body.style.background=l:document.body.style.removeProperty("background")},Kt.DURATION*1e3)}}},[t,n,l])}let yc=null;function VV({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:s,noBodyStyles:o}){const[l,c]=we.useState(()=>typeof window<"u"?window.location.href:""),f=we.useRef(0),d=we.useCallback(()=>{if(Zw()&&yc===null&&e&&!o){yc={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:b}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-p}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const x=b-window.innerHeight;x&&f.current>=b&&(document.body.style.top=`${-(f.current+x)}px`)}),300)}},[e]),m=we.useCallback(()=>{if(Zw()&&yc!==null&&!o){const p=-parseInt(document.body.style.top,10),b=-parseInt(document.body.style.left,10);Object.assign(document.body.style,yc),window.requestAnimationFrame(()=>{if(s&&l!==window.location.href){c(window.location.href);return}window.scrollTo(b,p)}),yc=null}},[l]);return we.useEffect(()=>{function p(){f.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),we.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),we.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&d(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,l,t,n,d,m]),{restorePositionSetting:m}}function qV({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:s,snapPoints:o,shouldScaleBackground:l=!1,setBackgroundColorOnScale:c=!0,closeThreshold:f=jV,scrollLockTimeout:d=BV,dismissible:m=!0,handleOnly:p=!1,fadeFromIndex:b=o&&o.length-1,activeSnapPoint:x,setActiveSnapPoint:S,fixed:C,modal:w=!0,onClose:A,nested:N,noBodyStyles:k=!1,direction:R="bottom",defaultOpen:B=!1,disablePreventScroll:O=!0,snapToSequentialPoint:j=!1,preventScrollRestoration:P=!1,repositionInputs:q=!0,onAnimationEnd:L,container:X,autoFocus:Q=!1}){var ee,ne;const[Z=!1,D]=UR({defaultProp:B,prop:e,onChange:Ae=>{t==null||t(Ae),!Ae&&!N&&ve(),setTimeout(()=>{L==null||L(Ae)},Kt.DURATION*1e3),Ae&&!w&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Ae||(document.body.style.pointerEvents="auto")}}),[H,$]=we.useState(!1),[te,F]=we.useState(!1),[V,ie]=we.useState(!1),I=we.useRef(null),de=we.useRef(null),xe=we.useRef(null),Te=we.useRef(null),he=we.useRef(null),Se=we.useRef(!1),Ce=we.useRef(null),Pe=we.useRef(0),_e=we.useRef(!1),je=we.useRef(!B),wt=we.useRef(0),Re=we.useRef(null),tn=we.useRef(((ee=Re.current)==null?void 0:ee.getBoundingClientRect().height)||0),Lt=we.useRef(((ne=Re.current)==null?void 0:ne.getBoundingClientRect().width)||0),nn=we.useRef(0),Zr=we.useCallback(Ae=>{o&&Ae===ei.length-1&&(de.current=new Date)},[]),{activeSnapPoint:jn,activeSnapPointIndex:Tn,setActiveSnapPoint:Ei,onRelease:Jr,snapPointsOffset:ei,onDrag:rt,shouldFade:yt,getPercentageDragged:ce}=UV({snapPoints:o,activeSnapPointProp:x,setActiveSnapPointProp:S,drawerRef:Re,fadeFromIndex:b,overlayRef:I,onSnapPointChange:Zr,direction:R,container:X,snapToSequentialPoint:j});NV({isDisabled:!Z||te||!w||V||!H||!q||!O});const{restorePositionSetting:ve}=VV({isOpen:Z,modal:w,nested:N??!1,hasBeenOpened:H,preventScrollRestoration:P,noBodyStyles:k});function Fe(){return(window.innerWidth-Qb)/window.innerWidth}function Ze(Ae){var Ve,mt;!m&&!o||Re.current&&!Re.current.contains(Ae.target)||(tn.current=((Ve=Re.current)==null?void 0:Ve.getBoundingClientRect().height)||0,Lt.current=((mt=Re.current)==null?void 0:mt.getBoundingClientRect().width)||0,F(!0),xe.current=new Date,MR()&&window.addEventListener("touchend",()=>Se.current=!1,{once:!0}),Ae.target.setPointerCapture(Ae.pointerId),Pe.current=hn(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?Th(Re.current,R):null,Ut=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&&Ut.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&&Ut.getTime()-he.current.getTime()<d&&kt===0||Ve)return he.current=Ut,!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 Nn(Ae){if(Re.current&&te){const Ve=R==="bottom"||R==="right"?1:-1,mt=(Pe.current-(hn(R)?Ae.pageY:Ae.pageX))*Ve,Qe=mt>0,st=o&&!m&&!Qe;if(st&&Tn===0)return;const kt=Math.abs(mt),Ut=document.querySelector("[data-vaul-drawer-wrapper]"),Ti=R==="bottom"||R==="top"?tn.current:Lt.current;let sr=kt/Ti;const ti=ce(kt,Qe);if(ti!==null&&(sr=ti),st&&sr>=1||!Se.current&&!ht(Ae.target,Qe))return;if(Re.current.classList.add(v1),Se.current=!0,yn(Re.current,{transition:"none"}),yn(I.current,{transition:"none"}),o&&rt({draggedDistance:mt}),Qe&&!o){const Or=LV(mt),Na=Math.min(Or*-1,0)*Ve;yn(Re.current,{transform:hn(R)?`translate3d(0, ${Na}px, 0)`:`translate3d(${Na}px, 0, 0)`});return}const ar=1-sr;if((yt||b&&Tn===b-1)&&(r==null||r(Ae,sr),yn(I.current,{opacity:`${ar}`,transition:"none"},!0)),Ut&&I.current&&l){const Or=Math.min(Fe()+sr*(1-Fe()),1),Na=8-sr*8,vu=Math.max(0,14-sr*14);yn(Ut,{borderRadius:`${Na}px`,transform:hn(R)?`scale(${Or}) translate3d(0, ${vu}px, 0)`:`scale(${Or}) translate3d(${vu}px, 0, 0)`,transition:"none"},!0)}if(!o){const Or=kt*Ve;yn(Re.current,{transform:hn(R)?`translate3d(0, ${Or}px, 0)`:`translate3d(${Or}px, 0, 0)`})}}}we.useEffect(()=>{window.requestAnimationFrame(()=>{je.current=!0})},[]),we.useEffect(()=>{var Ae;function Ve(){if(!Re.current||!q)return;const mt=document.activeElement;if(Kb(mt)||_e.current){var Qe;const st=((Qe=window.visualViewport)==null?void 0:Qe.height)||0,kt=window.innerHeight;let Ut=kt-st;const Ti=Re.current.getBoundingClientRect().height||0,sr=Ti>kt*.8;nn.current||(nn.current=Ti);const ti=Re.current.getBoundingClientRect().top;if(Math.abs(wt.current-Ut)>60&&(_e.current=!_e.current),o&&o.length>0&&ei&&Tn){const ar=ei[Tn]||0;Ut+=ar}if(wt.current=Ut,Ti>st||_e.current){const ar=Re.current.getBoundingClientRect().height;let Or=ar;ar>st&&(Or=st-(sr?ti:Qb)),C?Re.current.style.height=`${ar-Math.max(Ut,0)}px`:Re.current.style.height=`${Math.max(Or,st-ti)}px`}else vV()||(Re.current.style.height=`${nn.current}px`);o&&o.length>0&&!_e.current?Re.current.style.bottom="0px":Re.current.style.bottom=`${Math.max(Ut,0)}px`}}return(Ae=window.visualViewport)==null||Ae.addEventListener("resize",Ve),()=>{var mt;return(mt=window.visualViewport)==null?void 0:mt.removeEventListener("resize",Ve)}},[Tn,o,ei]);function Rn(Ae){Vt(),A==null||A(),Ae||D(!1),setTimeout(()=>{o&&Ei(o[0])},Kt.DURATION*1e3)}function on(){if(!Re.current)return;const Ae=document.querySelector("[data-vaul-drawer-wrapper]"),Ve=Th(Re.current,R);yn(Re.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`}),yn(I.current,{transition:`opacity ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,opacity:"1"}),l&&Ve&&Ve>0&&Z&&yn(Ae,{borderRadius:`${BR}px`,overflow:"hidden",...hn(R)?{transform:`scale(${Fe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Fe()}) 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 Vt(){!te||!Re.current||(Re.current.classList.remove(v1),Se.current=!1,F(!1),Te.current=new Date)}function vn(Ae){if(!te||!Re.current)return;Re.current.classList.remove(v1),Se.current=!1,F(!1),Te.current=new Date;const Ve=Th(Re.current,R);if(!Ae||!ht(Ae.target,!1)||!Ve||Number.isNaN(Ve)||xe.current===null)return;const mt=Te.current.getTime()-xe.current.getTime(),Qe=Pe.current-(hn(R)?Ae.pageY:Ae.pageX),st=Math.abs(Qe)/mt;if(st>.05&&(ie(!0),setTimeout(()=>{ie(!1)},200)),o){Jr({draggedDistance:Qe*(R==="bottom"||R==="right"?1:-1),closeDrawer:Rn,velocity:st,dismissible:m}),s==null||s(Ae,!0);return}if(R==="bottom"||R==="right"?Qe>0:Qe<0){on(),s==null||s(Ae,!0);return}if(st>jR){Rn(),s==null||s(Ae,!1);return}var kt;const Ut=Math.min((kt=Re.current.getBoundingClientRect().height)!=null?kt:0,window.innerHeight);var Ti;const sr=Math.min((Ti=Re.current.getBoundingClientRect().width)!=null?Ti:0,window.innerWidth),ti=R==="left"||R==="right";if(Math.abs(Ve)>=(ti?sr:Ut)*f){Rn(),s==null||s(Ae,!1);return}s==null||s(Ae,!0),on()}we.useEffect(()=>(Z&&(yn(document.documentElement,{scrollBehavior:"auto"}),de.current=new Date),()=>{IV(document.documentElement,"scrollBehavior")}),[Z]);function vt(Ae){const Ve=Ae?(window.innerWidth-Qa)/window.innerWidth:1,mt=Ae?-Qa:0;Ce.current&&window.clearTimeout(Ce.current),yn(Re.current,{transition:`transform ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,transform:hn(R)?`scale(${Ve}) translate3d(0, ${mt}px, 0)`:`scale(${Ve}) translate3d(${mt}px, 0, 0)`}),!Ae&&Re.current&&(Ce.current=setTimeout(()=>{const Qe=Th(Re.current,R);yn(Re.current,{transition:"none",transform:hn(R)?`translate3d(0, ${Qe}px, 0)`:`translate3d(${Qe}px, 0, 0)`})},500))}function ye(Ae,Ve){if(Ve<0)return;const mt=(window.innerWidth-Qa)/window.innerWidth,Qe=mt+Ve*(1-mt),st=-Qa+Ve*Qa;yn(Re.current,{transform:hn(R)?`scale(${Qe}) translate3d(0, ${st}px, 0)`:`scale(${Qe}) translate3d(${st}px, 0, 0)`,transition:"none"})}function He(Ae,Ve){const mt=hn(R)?window.innerHeight:window.innerWidth,Qe=Ve?(mt-Qa)/mt:1,st=Ve?-Qa:0;Ve&&yn(Re.current,{transition:`transform ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,transform:hn(R)?`scale(${Qe}) translate3d(0, ${st}px, 0)`:`scale(${Qe}) translate3d(${st}px, 0, 0)`})}return we.useEffect(()=>{w||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[w]),we.createElement(AR,{defaultOpen:B,onOpenChange:Ae=>{!m&&!Ae||(Ae?$(!0):Rn(!0),D(Ae))},open:Z},we.createElement(OR.Provider,{value:{activeSnapPoint:jn,snapPoints:o,setActiveSnapPoint:Ei,drawerRef:Re,overlayRef:I,onOpenChange:t,onPress:Ze,onRelease:vn,onDrag:Nn,dismissible:m,shouldAnimate:je,handleOnly:p,isOpen:Z,isDragging:te,shouldFade:yt,closeDrawer:Rn,onNestedDrag:ye,onNestedOpenChange:vt,onNestedRelease:He,keyboardIsOpen:_e,modal:w,snapPointsOffset:ei,activeSnapPointIndex:Tn,direction:R,shouldScaleBackground:l,setBackgroundColorOnScale:c,noBodyStyles:k,container:X,autoFocus:Q}},n))}const HR=we.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:s,shouldFade:o,isOpen:l,modal:c,shouldAnimate:f}=Of(),d=LR(t,n),m=r&&r.length>0;if(!c)return null;const p=we.useCallback(b=>s(b),[s]);return we.createElement(Cx,{onMouseUp:p,ref:d,"data-vaul-overlay":"","data-vaul-snap-points":l&&m?"true":"false","data-vaul-snap-points-overlay":l&&o?"true":"false","data-vaul-animate":f!=null&&f.current?"true":"false",...e})});HR.displayName="Drawer.Overlay";const zR=we.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},s){const{drawerRef:o,onPress:l,onRelease:c,onDrag:f,keyboardIsOpen:d,snapPointsOffset:m,activeSnapPointIndex:p,modal:b,isOpen:x,direction:S,snapPoints:C,container:w,handleOnly:A,shouldAnimate:N,autoFocus:k}=Of(),[R,B]=we.useState(!1),O=LR(s,o),j=we.useRef(null),P=we.useRef(null),q=we.useRef(!1),L=C&&C.length>0;zV();const X=(ee,ne,Z=0)=>{if(q.current)return!0;const D=Math.abs(ee.y),H=Math.abs(ee.x),$=H>D,te=["bottom","right"].includes(ne)?1:-1;if(ne==="left"||ne==="right"){if(!(ee.x*te<0)&&H>=0&&H<=Z)return $}else if(!(ee.y*te<0)&&D>=0&&D<=Z)return!$;return q.current=!0,!0};we.useEffect(()=>{L&&window.requestAnimationFrame(()=>{B(!0)})},[]);function Q(ee){j.current=null,q.current=!1,c(ee)}return we.createElement(wx,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":R?"true":"false","data-vaul-snap-points":x&&L?"true":"false","data-vaul-custom-container":w?"true":"false","data-vaul-animate":N!=null&&N.current?"true":"false",...r,ref:O,style:m&&m.length>0?{"--snap-point-height":`${m[p??0]}px`,...t}:t,onPointerDown:ee=>{A||(r.onPointerDown==null||r.onPointerDown.call(r,ee),j.current={x:ee.pageX,y:ee.pageY},l(ee))},onOpenAutoFocus:ee=>{n==null||n(ee),k||ee.preventDefault()},onPointerDownOutside:ee=>{if(e==null||e(ee),!b||ee.defaultPrevented){ee.preventDefault();return}d.current&&(d.current=!1)},onFocusOutside:ee=>{if(!b){ee.preventDefault();return}},onPointerMove:ee=>{if(P.current=ee,A||(r.onPointerMove==null||r.onPointerMove.call(r,ee),!j.current))return;const ne=ee.pageY-j.current.y,Z=ee.pageX-j.current.x,D=ee.pointerType==="touch"?10:2;X({x:Z,y:ne},S,D)?f(ee):(Math.abs(Z)>D||Math.abs(ne)>D)&&(j.current=null)},onPointerUp:ee=>{r.onPointerUp==null||r.onPointerUp.call(r,ee),j.current=null,q.current=!1,c(ee)},onPointerOut:ee=>{r.onPointerOut==null||r.onPointerOut.call(r,ee),Q(P.current)},onContextMenu:ee=>{r.onContextMenu==null||r.onContextMenu.call(r,ee),P.current&&Q(P.current)}})});zR.displayName="Drawer.Content";const $V=250,YV=120,GV=we.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:s,isDragging:o,snapPoints:l,activeSnapPoint:c,setActiveSnapPoint:f,dismissible:d,handleOnly:m,isOpen:p,onPress:b,onDrag:x}=Of(),S=we.useRef(null),C=we.useRef(!1);function w(){if(C.current){k();return}window.setTimeout(()=>{A()},YV)}function A(){if(o||e||C.current){k();return}if(k(),!l||l.length===0){d||s();return}if(c===l[l.length-1]&&d){s();return}const B=l.findIndex(j=>j===c);if(B===-1)return;const O=l[B+1];f(O)}function N(){S.current=window.setTimeout(()=>{C.current=!0},$V)}function k(){S.current&&window.clearTimeout(S.current),C.current=!1}return we.createElement("div",{onClick:w,onPointerCancel:k,onPointerDown:R=>{m&&b(R),N()},onPointerMove:R=>{m&&x(R)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},we.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});GV.displayName="Drawer.Handle";function KV(e){const t=Of(),{container:n=t.container,...r}=e;return we.createElement(_R,{container:n,...r})}const ko={Root:qV,Content:zR,Overlay:HR,Trigger:gV,Portal:KV,Title:Ax,Description:_x},Nx=({shouldScaleBackground:e=!0,...t})=>g.jsx(ko.Root,{shouldScaleBackground:e,...t});Nx.displayName="Drawer";const QV=ko.Trigger,XV=ko.Portal,VR=E.forwardRef(({className:e,...t},n)=>g.jsx(ko.Overlay,{ref:n,className:Ye("fixed inset-0 z-50 bg-black/80",e),...t}));VR.displayName="DrawerOverlay";const Rx=E.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(XV,{children:[g.jsx(VR,{}),g.jsxs(ko.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:[g.jsx("div",{className:"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full"}),t]})]}));Rx.displayName="DrawerContent";function Dx({className:e,...t}){return g.jsx("div",{className:Ye("grid gap-1.5 p-4 text-center sm:text-left",e),...t})}Dx.displayName="DrawerHeader";const Ox=E.forwardRef(({className:e,...t},n)=>g.jsx(ko.Title,{ref:n,className:Ye("text-lg leading-none font-semibold tracking-tight",e),...t}));Ox.displayName="DrawerTitle";const WV=E.forwardRef(({className:e,...t},n)=>g.jsx(ko.Description,{ref:n,className:Ye("text-muted-foreground text-sm",e),...t}));WV.displayName="DrawerDescription";function Mx(e){const t=e+"CollectionProvider",[n,r]=Hi(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=C=>{const{scope:w,children:A}=C,N=we.useRef(null),k=we.useRef(new Map).current;return g.jsx(s,{scope:w,itemMap:k,collectionRef:N,children:A})};l.displayName=t;const c=e+"CollectionSlot",f=tu(c),d=we.forwardRef((C,w)=>{const{scope:A,children:N}=C,k=o(c,A),R=_t(w,k.collectionRef);return g.jsx(f,{ref:R,children:N})});d.displayName=c;const m=e+"CollectionItemSlot",p="data-radix-collection-item",b=tu(m),x=we.forwardRef((C,w)=>{const{scope:A,children:N,...k}=C,R=we.useRef(null),B=_t(w,R),O=o(m,A);return we.useEffect(()=>(O.itemMap.set(R,{ref:R,...k}),()=>void O.itemMap.delete(R))),g.jsx(b,{[p]:"",ref:B,children:N})});x.displayName=m;function S(C){const w=o(e+"CollectionConsumer",C);return we.useCallback(()=>{const N=w.collectionRef.current;if(!N)return[];const k=Array.from(N.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((O,j)=>k.indexOf(O.ref.current)-k.indexOf(j.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:d,ItemSlot:x},S,r]}var ZV=E.createContext(void 0);function Um(e){const t=E.useContext(ZV);return e||t||"ltr"}const JV=["top","right","bottom","left"],Ea=Math.min,kr=Math.max,lm=Math.round,vh=Math.floor,ji=e=>({x:e,y:e}),eq={left:"right",right:"left",bottom:"top",top:"bottom"},tq={start:"end",end:"start"};function Xb(e,t,n){return kr(e,Ea(t,n))}function Es(e,t){return typeof e=="function"?e(t):e}function Ts(e){return e.split("-")[0]}function hu(e){return e.split("-")[1]}function Ix(e){return e==="x"?"y":"x"}function Lx(e){return e==="y"?"height":"width"}const nq=new Set(["top","bottom"]);function Ii(e){return nq.has(Ts(e))?"y":"x"}function Px(e){return Ix(Ii(e))}function rq(e,t,n){n===void 0&&(n=!1);const r=hu(e),s=Px(e),o=Lx(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=um(l)),[l,um(l)]}function iq(e){const t=um(e);return[Wb(e),t,Wb(t)]}function Wb(e){return e.replace(/start|end/g,t=>tq[t])}const nA=["left","right"],rA=["right","left"],sq=["top","bottom"],aq=["bottom","top"];function oq(e,t,n){switch(e){case"top":case"bottom":return n?t?rA:nA:t?nA:rA;case"left":case"right":return t?sq:aq;default:return[]}}function lq(e,t,n,r){const s=hu(e);let o=oq(Ts(e),n==="start",r);return s&&(o=o.map(l=>l+"-"+s),t&&(o=o.concat(o.map(Wb)))),o}function um(e){return e.replace(/left|right|bottom|top/g,t=>eq[t])}function uq(e){return{top:0,right:0,bottom:0,left:0,...e}}function qR(e){return typeof e!="number"?uq(e):{top:e,right:e,bottom:e,left:e}}function cm(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 iA(e,t,n){let{reference:r,floating:s}=e;const o=Ii(t),l=Px(t),c=Lx(l),f=Ts(t),d=o==="y",m=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let x;switch(f){case"top":x={x:m,y:r.y-s.height};break;case"bottom":x={x:m,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:p};break;case"left":x={x:r.x-s.width,y:p};break;default:x={x:r.x,y:r.y}}switch(hu(t)){case"start":x[l]-=b*(n&&d?-1:1);break;case"end":x[l]+=b*(n&&d?-1:1);break}return x}async function cq(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:b=!1,padding:x=0}=Es(t,e),S=qR(x),w=c[b?p==="floating"?"reference":"floating":p],A=cm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:m,strategy:f})),N=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(c.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},B=cm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:k,strategy:f}):N);return{top:(A.top-B.top+S.top)/R.y,bottom:(B.bottom-A.bottom+S.bottom)/R.y,left:(A.left-B.left+S.left)/R.x,right:(B.right-A.right+S.right)/R.x}}const fq=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:p}=iA(d,r,f),b=r,x={},S=0;for(let w=0;w<c.length;w++){var C;const{name:A,fn:N}=c[w],{x:k,y:R,data:B,reset:O}=await N({x:m,y:p,initialPlacement:r,placement:b,strategy:s,middlewareData:x,rects:d,platform:{...l,detectOverflow:(C=l.detectOverflow)!=null?C:cq},elements:{reference:e,floating:t}});m=k??m,p=R??p,x={...x,[A]:{...x[A],...B}},O&&S<=50&&(S++,typeof O=="object"&&(O.placement&&(b=O.placement),O.rects&&(d=O.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):O.rects),{x:m,y:p}=iA(d,b,f)),w=-1)}return{x:m,y:p,placement:b,strategy:s,middlewareData:x}},dq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:d,padding:m=0}=Es(e,t)||{};if(d==null)return{};const p=qR(m),b={x:n,y:r},x=Px(s),S=Lx(x),C=await l.getDimensions(d),w=x==="y",A=w?"top":"left",N=w?"bottom":"right",k=w?"clientHeight":"clientWidth",R=o.reference[S]+o.reference[x]-b[x]-o.floating[S],B=b[x]-o.reference[x],O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let j=O?O[k]:0;(!j||!await(l.isElement==null?void 0:l.isElement(O)))&&(j=c.floating[k]||o.floating[S]);const P=R/2-B/2,q=j/2-C[S]/2-1,L=Ea(p[A],q),X=Ea(p[N],q),Q=L,ee=j-C[S]-X,ne=j/2-C[S]/2+P,Z=Xb(Q,ne,ee),D=!f.arrow&&hu(s)!=null&&ne!==Z&&o.reference[S]/2-(ne<Q?L:X)-C[S]/2<0,H=D?ne<Q?ne-Q:ne-ee:0;return{[x]:b[x]+H,data:{[x]:Z,centerOffset:ne-Z-H,...D&&{alignmentOffset:H}},reset:D}}}),hq=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:c,platform:f,elements:d}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...w}=Es(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const A=Ts(s),N=Ii(c),k=Ts(c)===c,R=await(f.isRTL==null?void 0:f.isRTL(d.floating)),B=b||(k||!C?[um(c)]:iq(c)),O=S!=="none";!b&&O&&B.push(...lq(c,C,S,R));const j=[c,...B],P=await f.detectOverflow(t,w),q=[];let L=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&q.push(P[A]),p){const ne=rq(s,l,R);q.push(P[ne[0]],P[ne[1]])}if(L=[...L,{placement:s,overflows:q}],!q.every(ne=>ne<=0)){var X,Q;const ne=(((X=o.flip)==null?void 0:X.index)||0)+1,Z=j[ne];if(Z&&(!(p==="alignment"?N!==Ii(Z):!1)||L.every($=>Ii($.placement)===N?$.overflows[0]>0:!0)))return{data:{index:ne,overflows:L},reset:{placement:Z}};let D=(Q=L.filter(H=>H.overflows[0]<=0).sort((H,$)=>H.overflows[1]-$.overflows[1])[0])==null?void 0:Q.placement;if(!D)switch(x){case"bestFit":{var ee;const H=(ee=L.filter($=>{if(O){const te=Ii($.placement);return te===N||te==="y"}return!0}).map($=>[$.placement,$.overflows.filter(te=>te>0).reduce((te,F)=>te+F,0)]).sort(($,te)=>$[1]-te[1])[0])==null?void 0:ee[0];H&&(D=H);break}case"initialPlacement":D=c;break}if(s!==D)return{reset:{placement:D}}}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 aA(e){return JV.some(t=>e[t]>=0)}const mq=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"}),c=sA(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:aA(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),c=sA(l,n.floating);return{data:{escapedOffsets:c,escaped:aA(c)}}}default:return{}}}}},$R=new Set(["left","top"]);async function pq(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Ts(n),c=hu(n),f=Ii(n)==="y",d=$R.has(l)?-1:1,m=o&&f?-1:1,p=Es(t,e);let{mainAxis:b,crossAxis:x,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof S=="number"&&(x=c==="end"?S*-1:S),f?{x:x*m,y:b*d}:{x:b*d,y:x*m}}const gq=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:c}=t,f=await pq(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+f.x,y:o+f.y,data:{...f,placement:l}}}}},bq=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:c=!1,limiter:f={fn:A=>{let{x:N,y:k}=A;return{x:N,y:k}}},...d}=Es(e,t),m={x:n,y:r},p=await o.detectOverflow(t,d),b=Ii(Ts(s)),x=Ix(b);let S=m[x],C=m[b];if(l){const A=x==="y"?"top":"left",N=x==="y"?"bottom":"right",k=S+p[A],R=S-p[N];S=Xb(k,S,R)}if(c){const A=b==="y"?"top":"left",N=b==="y"?"bottom":"right",k=C+p[A],R=C-p[N];C=Xb(k,C,R)}const w=f.fn({...t,[x]:S,[b]:C});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[x]:l,[b]:c}}}}}},yq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:f=!0,crossAxis:d=!0}=Es(e,t),m={x:n,y:r},p=Ii(s),b=Ix(p);let x=m[b],S=m[p];const C=Es(c,t),w=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(f){const k=b==="y"?"height":"width",R=o.reference[b]-o.floating[k]+w.mainAxis,B=o.reference[b]+o.reference[k]-w.mainAxis;x<R?x=R:x>B&&(x=B)}if(d){var A,N;const k=b==="y"?"width":"height",R=$R.has(Ts(s)),B=o.reference[p]-o.floating[k]+(R&&((A=l.offset)==null?void 0:A[p])||0)+(R?0:w.crossAxis),O=o.reference[p]+o.reference[k]+(R?0:((N=l.offset)==null?void 0:N[p])||0)-(R?w.crossAxis:0);S<B?S=B:S>O&&(S=O)}return{[b]:x,[p]:S}}}},xq=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:c}=t,{apply:f=()=>{},...d}=Es(e,t),m=await l.detectOverflow(t,d),p=Ts(s),b=hu(s),x=Ii(s)==="y",{width:S,height:C}=o.floating;let w,A;p==="top"||p==="bottom"?(w=p,A=b===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(A=p,w=b==="end"?"top":"bottom");const N=C-m.top-m.bottom,k=S-m.left-m.right,R=Ea(C-m[w],N),B=Ea(S-m[A],k),O=!t.middlewareData.shift;let j=R,P=B;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=N),O&&!b){const L=kr(m.left,0),X=kr(m.right,0),Q=kr(m.top,0),ee=kr(m.bottom,0);x?P=S-2*(L!==0||X!==0?L+X:kr(m.left,m.right)):j=C-2*(Q!==0||ee!==0?Q+ee:kr(m.top,m.bottom))}await f({...t,availableWidth:P,availableHeight:j});const q=await l.getDimensions(c.floating);return S!==q.width||C!==q.height?{reset:{rects:!0}}:{}}}};function Hm(){return typeof window<"u"}function mu(e){return YR(e)?(e.nodeName||"").toLowerCase():"#document"}function Nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zi(e){var t;return(t=(YR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function YR(e){return Hm()?e instanceof Node||e instanceof Nr(e).Node:!1}function mi(e){return Hm()?e instanceof Element||e instanceof Nr(e).Element:!1}function Ui(e){return Hm()?e instanceof HTMLElement||e instanceof Nr(e).HTMLElement:!1}function oA(e){return!Hm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nr(e).ShadowRoot}const Eq=new Set(["inline","contents"]);function Mf(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=pi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Eq.has(s)}const Tq=new Set(["table","td","th"]);function vq(e){return Tq.has(mu(e))}const Sq=[":popover-open",":modal"];function zm(e){return Sq.some(t=>{try{return e.matches(t)}catch{return!1}})}const Cq=["transform","translate","scale","rotate","perspective"],wq=["transform","translate","scale","rotate","perspective","filter"],Aq=["paint","layout","strict","content"];function jx(e){const t=Bx(),n=mi(e)?pi(e):e;return Cq.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)||wq.some(r=>(n.willChange||"").includes(r))||Aq.some(r=>(n.contain||"").includes(r))}function _q(e){let t=Ta(e);for(;Ui(t)&&!nu(t);){if(jx(t))return t;if(zm(t))return null;t=Ta(t)}return null}function Bx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const kq=new Set(["html","body","#document"]);function nu(e){return kq.has(mu(e))}function pi(e){return Nr(e).getComputedStyle(e)}function Vm(e){return mi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ta(e){if(mu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||oA(e)&&e.host||zi(e);return oA(t)?t.host:t}function GR(e){const t=Ta(e);return nu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ui(t)&&Mf(t)?t:GR(t)}function uf(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=GR(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),l=Nr(s);if(o){const c=Zb(l);return t.concat(l,l.visualViewport||[],Mf(s)?s:[],c&&n?uf(c):[])}return t.concat(s,uf(s,[],n))}function Zb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KR(e){const t=pi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Ui(e),o=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=lm(n)!==o||lm(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function Fx(e){return mi(e)?e:e.contextElement}function Fl(e){const t=Fx(e);if(!Ui(t))return ji(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=KR(t);let l=(o?lm(n.width):n.width)/r,c=(o?lm(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Nq=ji(0);function QR(e){const t=Nr(e);return!Bx()||!t.visualViewport?Nq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Rq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nr(e)?!1:t}function Eo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=Fx(e);let l=ji(1);t&&(r?mi(r)&&(l=Fl(r)):l=Fl(e));const c=Rq(o,n,r)?QR(o):ji(0);let f=(s.left+c.x)/l.x,d=(s.top+c.y)/l.y,m=s.width/l.x,p=s.height/l.y;if(o){const b=Nr(o),x=r&&mi(r)?Nr(r):r;let S=b,C=Zb(S);for(;C&&r&&x!==S;){const w=Fl(C),A=C.getBoundingClientRect(),N=pi(C),k=A.left+(C.clientLeft+parseFloat(N.paddingLeft))*w.x,R=A.top+(C.clientTop+parseFloat(N.paddingTop))*w.y;f*=w.x,d*=w.y,m*=w.x,p*=w.y,f+=k,d+=R,S=Nr(C),C=Zb(S)}}return cm({width:m,height:p,x:f,y:d})}function qm(e,t){const n=Vm(e).scrollLeft;return t?t.left+n:Eo(zi(e)).left+n}function XR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-qm(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function Dq(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",l=zi(r),c=t?zm(t.floating):!1;if(r===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},d=ji(1);const m=ji(0),p=Ui(r);if((p||!p&&!o)&&((mu(r)!=="body"||Mf(l))&&(f=Vm(r)),Ui(r))){const x=Eo(r);d=Fl(r),m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}const b=l&&!p&&!o?XR(l,f):ji(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+m.x+b.x,y:n.y*d.y-f.scrollTop*d.y+m.y+b.y}}function Oq(e){return Array.from(e.getClientRects())}function Mq(e){const t=zi(e),n=Vm(e),r=e.ownerDocument.body,s=kr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=kr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+qm(e);const c=-n.scrollTop;return pi(r).direction==="rtl"&&(l+=kr(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:l,y:c}}const lA=25;function Iq(e,t){const n=Nr(e),r=zi(e),s=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,f=0;if(s){o=s.width,l=s.height;const m=Bx();(!m||m&&t==="fixed")&&(c=s.offsetLeft,f=s.offsetTop)}const d=qm(r);if(d<=0){const m=r.ownerDocument,p=m.body,b=getComputedStyle(p),x=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,S=Math.abs(r.clientWidth-p.clientWidth-x);S<=lA&&(o-=S)}else d<=lA&&(o+=d);return{width:o,height:l,x:c,y:f}}const Lq=new Set(["absolute","fixed"]);function Pq(e,t){const n=Eo(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=Ui(e)?Fl(e):ji(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=s*o.x,d=r*o.y;return{width:l,height:c,x:f,y:d}}function uA(e,t,n){let r;if(t==="viewport")r=Iq(e,n);else if(t==="document")r=Mq(zi(e));else if(mi(t))r=Pq(t,n);else{const s=QR(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return cm(r)}function WR(e,t){const n=Ta(e);return n===t||!mi(n)||nu(n)?!1:pi(n).position==="fixed"||WR(n,t)}function jq(e,t){const n=t.get(e);if(n)return n;let r=uf(e,[],!1).filter(c=>mi(c)&&mu(c)!=="body"),s=null;const o=pi(e).position==="fixed";let l=o?Ta(e):e;for(;mi(l)&&!nu(l);){const c=pi(l),f=jx(l);!f&&c.position==="fixed"&&(s=null),(o?!f&&!s:!f&&c.position==="static"&&!!s&&Lq.has(s.position)||Mf(l)&&!f&&WR(e,l))?r=r.filter(m=>m!==l):s=c,l=Ta(l)}return t.set(e,r),r}function Bq(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?zm(t)?[]:jq(t,this._c):[].concat(n),r],c=l[0],f=l.reduce((d,m)=>{const p=uA(t,m,s);return d.top=kr(p.top,d.top),d.right=Ea(p.right,d.right),d.bottom=Ea(p.bottom,d.bottom),d.left=kr(p.left,d.left),d},uA(t,c,s));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Fq(e){const{width:t,height:n}=KR(e);return{width:t,height:n}}function Uq(e,t,n){const r=Ui(t),s=zi(t),o=n==="fixed",l=Eo(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=ji(0);function d(){f.x=qm(s)}if(r||!r&&!o)if((mu(t)!=="body"||Mf(s))&&(c=Vm(t)),r){const x=Eo(t,!0,o,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}else s&&d();o&&!r&&s&&d();const m=s&&!r&&!o?XR(s,c):ji(0),p=l.left+c.scrollLeft-f.x-m.x,b=l.top+c.scrollTop-f.y-m.y;return{x:p,y:b,width:l.width,height:l.height}}function S1(e){return pi(e).position==="static"}function cA(e,t){if(!Ui(e)||pi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zi(e)===n&&(n=n.ownerDocument.body),n}function ZR(e,t){const n=Nr(e);if(zm(e))return n;if(!Ui(e)){let s=Ta(e);for(;s&&!nu(s);){if(mi(s)&&!S1(s))return s;s=Ta(s)}return n}let r=cA(e,t);for(;r&&vq(r)&&S1(r);)r=cA(r,t);return r&&nu(r)&&S1(r)&&!jx(r)?n:r||_q(e)||n}const Hq=async function(e){const t=this.getOffsetParent||ZR,n=this.getDimensions,r=await n(e.floating);return{reference:Uq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zq(e){return pi(e).direction==="rtl"}const Vq={convertOffsetParentRelativeRectToViewportRelativeRect:Dq,getDocumentElement:zi,getClippingRect:Bq,getOffsetParent:ZR,getElementRects:Hq,getClientRects:Oq,getDimensions:Fq,getScale:Fl,isElement:mi,isRTL:zq};function JR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qq(e,t){let n=null,r;const s=zi(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const d=e.getBoundingClientRect(),{left:m,top:p,width:b,height:x}=d;if(c||t(),!b||!x)return;const S=vh(p),C=vh(s.clientWidth-(m+b)),w=vh(s.clientHeight-(p+x)),A=vh(m),k={rootMargin:-S+"px "+-C+"px "+-w+"px "+-A+"px",threshold:kr(0,Ea(1,f))||1};let R=!0;function B(O){const j=O[0].intersectionRatio;if(j!==f){if(!R)return l();j?l(!1,j):r=setTimeout(()=>{l(!1,1e-7)},1e3)}j===1&&!JR(d,e.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(B,{...k,root:s.ownerDocument})}catch{n=new IntersectionObserver(B,k)}n.observe(e)}return l(!0),o}function $q(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=Fx(e),m=s||o?[...d?uf(d):[],...uf(t)]:[];m.forEach(A=>{s&&A.addEventListener("scroll",n,{passive:!0}),o&&A.addEventListener("resize",n)});const p=d&&c?qq(d,n):null;let b=-1,x=null;l&&(x=new ResizeObserver(A=>{let[N]=A;N&&N.target===d&&x&&(x.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var k;(k=x)==null||k.observe(t)})),n()}),d&&!f&&x.observe(d),x.observe(t));let S,C=f?Eo(e):null;f&&w();function w(){const A=Eo(e);C&&!JR(C,A)&&n(),C=A,S=requestAnimationFrame(w)}return n(),()=>{var A;m.forEach(N=>{s&&N.removeEventListener("scroll",n),o&&N.removeEventListener("resize",n)}),p==null||p(),(A=x)==null||A.disconnect(),x=null,f&&cancelAnimationFrame(S)}}const Yq=gq,Gq=bq,Kq=hq,Qq=xq,Xq=mq,fA=dq,Wq=yq,Zq=(e,t,n)=>{const r=new Map,s={platform:Vq,...n},o={...s.platform,_c:r};return fq(e,t,{...s,platform:o})};var Jq=typeof document<"u",e$=function(){},Vh=Jq?E.useLayoutEffect:e$;function fm(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(!fm(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)&&!fm(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function eD(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dA(e,t){const n=eD(e);return Math.round(t*n)/n}function C1(e){const t=E.useRef(e);return Vh(()=>{t.current=e}),t}function t$(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:d}=e,[m,p]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=E.useState(r);fm(b,r)||x(r);const[S,C]=E.useState(null),[w,A]=E.useState(null),N=E.useCallback($=>{$!==O.current&&(O.current=$,C($))},[]),k=E.useCallback($=>{$!==j.current&&(j.current=$,A($))},[]),R=o||S,B=l||w,O=E.useRef(null),j=E.useRef(null),P=E.useRef(m),q=f!=null,L=C1(f),X=C1(s),Q=C1(d),ee=E.useCallback(()=>{if(!O.current||!j.current)return;const $={placement:t,strategy:n,middleware:b};X.current&&($.platform=X.current),Zq(O.current,j.current,$).then(te=>{const F={...te,isPositioned:Q.current!==!1};ne.current&&!fm(P.current,F)&&(P.current=F,_o.flushSync(()=>{p(F)}))})},[b,t,n,X,Q]);Vh(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[d]);const ne=E.useRef(!1);Vh(()=>(ne.current=!0,()=>{ne.current=!1}),[]),Vh(()=>{if(R&&(O.current=R),B&&(j.current=B),R&&B){if(L.current)return L.current(R,B,ee);ee()}},[R,B,ee,L,q]);const Z=E.useMemo(()=>({reference:O,floating:j,setReference:N,setFloating:k}),[N,k]),D=E.useMemo(()=>({reference:R,floating:B}),[R,B]),H=E.useMemo(()=>{const $={position:n,left:0,top:0};if(!D.floating)return $;const te=dA(D.floating,m.x),F=dA(D.floating,m.y);return c?{...$,transform:"translate("+te+"px, "+F+"px)",...eD(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:F}},[n,c,D.floating,m.x,m.y]);return E.useMemo(()=>({...m,update:ee,refs:Z,elements:D,floatingStyles:H}),[m,ee,Z,D,H])}const n$=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?fA({element:r.current,padding:s}).fn(n):{}:r?fA({element:r,padding:s}).fn(n):{}}}},r$=(e,t)=>({...Yq(e),options:[e,t]}),i$=(e,t)=>({...Gq(e),options:[e,t]}),s$=(e,t)=>({...Wq(e),options:[e,t]}),a$=(e,t)=>({...Kq(e),options:[e,t]}),o$=(e,t)=>({...Qq(e),options:[e,t]}),l$=(e,t)=>({...Xq(e),options:[e,t]}),u$=(e,t)=>({...n$(e),options:[e,t]});var c$="Arrow",tD=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return g.jsx(tt.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});tD.displayName=c$;var f$=tD;function nD(e){const[t,n]=E.useState(void 0);return Vn(()=>{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,c;if("borderBoxSize"in o){const f=o.borderBoxSize,d=Array.isArray(f)?f[0]:f;l=d.inlineSize,c=d.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ux="Popper",[rD,pu]=Hi(Ux),[d$,iD]=rD(Ux),sD=e=>{const{__scopePopper:t,children:n}=e,[r,s]=E.useState(null);return g.jsx(d$,{scope:t,anchor:r,onAnchorChange:s,children:n})};sD.displayName=Ux;var aD="PopperAnchor",oD=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=iD(aD,n),l=E.useRef(null),c=_t(t,l),f=E.useRef(null);return E.useEffect(()=>{const d=f.current;f.current=(r==null?void 0:r.current)||l.current,d!==f.current&&o.onAnchorChange(f.current)}),r?null:g.jsx(tt.div,{...s,ref:c})});oD.displayName=aD;var Hx="PopperContent",[h$,m$]=rD(Hx),lD=E.forwardRef((e,t)=>{var he,Se,Ce,Pe,_e,je;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:b=!1,updatePositionStrategy:x="optimized",onPlaced:S,...C}=e,w=iD(Hx,n),[A,N]=E.useState(null),k=_t(t,wt=>N(wt)),[R,B]=E.useState(null),O=nD(R),j=(O==null?void 0:O.width)??0,P=(O==null?void 0:O.height)??0,q=r+(o!=="center"?"-"+o:""),L=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},X=Array.isArray(d)?d:[d],Q=X.length>0,ee={padding:L,boundary:X.filter(g$),altBoundary:Q},{refs:ne,floatingStyles:Z,placement:D,isPositioned:H,middlewareData:$}=t$({strategy:"fixed",placement:q,whileElementsMounted:(...wt)=>$q(...wt,{animationFrame:x==="always"}),elements:{reference:w.anchor},middleware:[r$({mainAxis:s+P,alignmentAxis:l}),f&&i$({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?s$():void 0,...ee}),f&&a$({...ee}),o$({...ee,apply:({elements:wt,rects:Re,availableWidth:tn,availableHeight:Lt})=>{const{width:nn,height:Zr}=Re.reference,jn=wt.floating.style;jn.setProperty("--radix-popper-available-width",`${tn}px`),jn.setProperty("--radix-popper-available-height",`${Lt}px`),jn.setProperty("--radix-popper-anchor-width",`${nn}px`),jn.setProperty("--radix-popper-anchor-height",`${Zr}px`)}}),R&&u$({element:R,padding:c}),b$({arrowWidth:j,arrowHeight:P}),b&&l$({strategy:"referenceHidden",...ee})]}),[te,F]=fD(D),V=Fi(S);Vn(()=>{H&&(V==null||V())},[H,V]);const ie=(he=$.arrow)==null?void 0:he.x,I=(Se=$.arrow)==null?void 0:Se.y,de=((Ce=$.arrow)==null?void 0:Ce.centerOffset)!==0,[xe,Te]=E.useState();return Vn(()=>{A&&Te(window.getComputedStyle(A).zIndex)},[A]),g.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:H?Z.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(" "),...((je=$.hide)==null?void 0:je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(h$,{scope:n,placedSide:te,onArrowChange:B,arrowX:ie,arrowY:I,shouldHideArrow:de,children:g.jsx(tt.div,{"data-side":te,"data-align":F,...C,ref:k,style:{...C.style,animation:H?void 0:"none"}})})})});lD.displayName=Hx;var uD="PopperArrow",p$={top:"bottom",right:"left",bottom:"top",left:"right"},cD=E.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=m$(uD,r),l=p$[o.placedSide];return g.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:g.jsx(f$,{...s,ref:n,style:{...s.style,display:"block"}})})});cD.displayName=uD;function g$(e){return e!==null}var b$=e=>({name:"transformOrigin",options:e,fn(t){var w,A,N;const{placement:n,rects:r,middlewareData:s}=t,l=((w=s.arrow)==null?void 0:w.centerOffset)!==0,c=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[d,m]=fD(n),p={start:"0%",center:"50%",end:"100%"}[m],b=(((A=s.arrow)==null?void 0:A.x)??0)+c/2,x=(((N=s.arrow)==null?void 0:N.y)??0)+f/2;let S="",C="";return d==="bottom"?(S=l?p:`${b}px`,C=`${-f}px`):d==="top"?(S=l?p:`${b}px`,C=`${r.floating.height+f}px`):d==="right"?(S=`${-f}px`,C=l?p:`${x}px`):d==="left"&&(S=`${r.floating.width+f}px`,C=l?p:`${x}px`),{data:{x:S,y:C}}}});function fD(e){const[t,n="center"]=e.split("-");return[t,n]}var zx=sD,Vx=oD,qx=lD,$x=cD,w1="rovingFocusGroup.onEntryFocus",y$={bubbles:!1,cancelable:!0},If="RovingFocusGroup",[Jb,dD,x$]=Mx(If),[E$,$m]=Hi(If,[x$]),[T$,v$]=E$(If),hD=E.forwardRef((e,t)=>g.jsx(Jb.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Jb.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(S$,{...e,ref:t})})}));hD.displayName=If;var S$=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...p}=e,b=E.useRef(null),x=_t(t,b),S=Um(o),[C,w]=xa({prop:l,defaultProp:c??null,onChange:f,caller:If}),[A,N]=E.useState(!1),k=Fi(d),R=dD(n),B=E.useRef(!1),[O,j]=E.useState(0);return E.useEffect(()=>{const P=b.current;if(P)return P.addEventListener(w1,k),()=>P.removeEventListener(w1,k)},[k]),g.jsx(T$,{scope:n,orientation:r,dir:S,loop:s,currentTabStopId:C,onItemFocus:E.useCallback(P=>w(P),[w]),onItemShiftTab:E.useCallback(()=>N(!0),[]),onFocusableItemAdd:E.useCallback(()=>j(P=>P+1),[]),onFocusableItemRemove:E.useCallback(()=>j(P=>P-1),[]),children:g.jsx(tt.div,{tabIndex:A||O===0?-1:0,"data-orientation":r,...p,ref:x,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{B.current=!0}),onFocus:Ne(e.onFocus,P=>{const q=!B.current;if(P.target===P.currentTarget&&q&&!A){const L=new CustomEvent(w1,y$);if(P.currentTarget.dispatchEvent(L),!L.defaultPrevented){const X=R().filter(D=>D.focusable),Q=X.find(D=>D.active),ee=X.find(D=>D.id===C),Z=[Q,ee,...X].filter(Boolean).map(D=>D.ref.current);gD(Z,m)}}B.current=!1}),onBlur:Ne(e.onBlur,()=>N(!1))})})}),mD="RovingFocusGroupItem",pD=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,children:l,...c}=e,f=Pi(),d=o||f,m=v$(mD,n),p=m.currentTabStopId===d,b=dD(n),{onFocusableItemAdd:x,onFocusableItemRemove:S,currentTabStopId:C}=m;return E.useEffect(()=>{if(r)return x(),()=>S()},[r,x,S]),g.jsx(Jb.ItemSlot,{scope:n,id:d,focusable:r,active:s,children:g.jsx(tt.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:Ne(e.onMouseDown,w=>{r?m.onItemFocus(d):w.preventDefault()}),onFocus:Ne(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:Ne(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){m.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const A=A$(w,m.orientation,m.dir);if(A!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let k=b().filter(R=>R.focusable).map(R=>R.ref.current);if(A==="last")k.reverse();else if(A==="prev"||A==="next"){A==="prev"&&k.reverse();const R=k.indexOf(w.currentTarget);k=m.loop?_$(k,R+1):k.slice(R+1)}setTimeout(()=>gD(k))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:C!=null}):l})})});pD.displayName=mD;var C$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function w$(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function A$(e,t,n){const r=w$(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return C$[r]}function gD(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function _$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bD=hD,yD=pD,ey=["Enter"," "],k$=["ArrowDown","PageUp","Home"],xD=["ArrowUp","PageDown","End"],N$=[...k$,...xD],R$={ltr:[...ey,"ArrowRight"],rtl:[...ey,"ArrowLeft"]},D$={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Lf="Menu",[cf,O$,M$]=Mx(Lf),[No,ED]=Hi(Lf,[M$,pu,$m]),Ym=pu(),TD=$m(),[I$,Ro]=No(Lf),[L$,Pf]=No(Lf),vD=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:l=!0}=e,c=Ym(t),[f,d]=E.useState(null),m=E.useRef(!1),p=Fi(o),b=Um(s);return E.useEffect(()=>{const x=()=>{m.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>m.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),g.jsx(zx,{...c,children:g.jsx(I$,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:d,children:g.jsx(L$,{scope:t,onClose:E.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:b,modal:l,children:r})})})};vD.displayName=Lf;var P$="MenuAnchor",Yx=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Ym(n);return g.jsx(Vx,{...s,...r,ref:t})});Yx.displayName=P$;var Gx="MenuPortal",[j$,SD]=No(Gx,{forceMount:void 0}),CD=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Ro(Gx,t);return g.jsx(j$,{scope:t,forceMount:n,children:g.jsx(bi,{present:n||o.open,children:g.jsx(Df,{asChild:!0,container:s,children:r})})})};CD.displayName=Gx;var Xr="MenuContent",[B$,Kx]=No(Xr),wD=E.forwardRef((e,t)=>{const n=SD(Xr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ro(Xr,e.__scopeMenu),l=Pf(Xr,e.__scopeMenu);return g.jsx(cf.Provider,{scope:e.__scopeMenu,children:g.jsx(bi,{present:r||o.open,children:g.jsx(cf.Slot,{scope:e.__scopeMenu,children:l.modal?g.jsx(F$,{...s,ref:t}):g.jsx(U$,{...s,ref:t})})})})}),F$=E.forwardRef((e,t)=>{const n=Ro(Xr,e.__scopeMenu),r=E.useRef(null),s=_t(t,r);return E.useEffect(()=>{const o=r.current;if(o)return Ex(o)},[]),g.jsx(Qx,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ne(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),U$=E.forwardRef((e,t)=>{const n=Ro(Xr,e.__scopeMenu);return g.jsx(Qx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),H$=tu("MenuContent.ScrollLock"),Qx=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:b,onDismiss:x,disableOutsideScroll:S,...C}=e,w=Ro(Xr,n),A=Pf(Xr,n),N=Ym(n),k=TD(n),R=O$(n),[B,O]=E.useState(null),j=E.useRef(null),P=_t(t,j,w.onContentChange),q=E.useRef(0),L=E.useRef(""),X=E.useRef(0),Q=E.useRef(null),ee=E.useRef("right"),ne=E.useRef(0),Z=S?Bm:E.Fragment,D=S?{as:H$,allowPinchZoom:!0}:void 0,H=te=>{var he,Se;const F=L.current+te,V=R().filter(Ce=>!Ce.disabled),ie=document.activeElement,I=(he=V.find(Ce=>Ce.ref.current===ie))==null?void 0:he.textValue,de=V.map(Ce=>Ce.textValue),xe=J$(de,F,I),Te=(Se=V.find(Ce=>Ce.textValue===xe))==null?void 0:Se.ref.current;(function Ce(Pe){L.current=Pe,window.clearTimeout(q.current),Pe!==""&&(q.current=window.setTimeout(()=>Ce(""),1e3))})(F),Te&&setTimeout(()=>Te.focus())};E.useEffect(()=>()=>window.clearTimeout(q.current),[]),xx();const $=E.useCallback(te=>{var V,ie;return ee.current===((V=Q.current)==null?void 0:V.side)&&tY(te,(ie=Q.current)==null?void 0:ie.area)},[]);return g.jsx(B$,{scope:n,searchRef:L,onItemEnter:E.useCallback(te=>{$(te)&&te.preventDefault()},[$]),onItemLeave:E.useCallback(te=>{var F;$(te)||((F=j.current)==null||F.focus(),O(null))},[$]),onTriggerLeave:E.useCallback(te=>{$(te)&&te.preventDefault()},[$]),pointerGraceTimerRef:X,onPointerGraceIntentChange:E.useCallback(te=>{Q.current=te},[]),children:g.jsx(Z,{...D,children:g.jsx(Pm,{asChild:!0,trapped:s,onMountAutoFocus:Ne(o,te=>{var F;te.preventDefault(),(F=j.current)==null||F.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:g.jsx(Rf,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:b,onDismiss:x,children:g.jsx(bD,{asChild:!0,...k,dir:A.dir,orientation:"vertical",loop:r,currentTabStopId:B,onCurrentTabStopIdChange:O,onEntryFocus:Ne(f,te=>{A.isUsingKeyboardRef.current||te.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(qx,{role:"menu","aria-orientation":"vertical","data-state":HD(w.open),"data-radix-menu-content":"",dir:A.dir,...N,...C,ref:P,style:{outline:"none",...C.style},onKeyDown:Ne(C.onKeyDown,te=>{const V=te.target.closest("[data-radix-menu-content]")===te.currentTarget,ie=te.ctrlKey||te.altKey||te.metaKey,I=te.key.length===1;V&&(te.key==="Tab"&&te.preventDefault(),!ie&&I&&H(te.key));const de=j.current;if(te.target!==de||!N$.includes(te.key))return;te.preventDefault();const Te=R().filter(he=>!he.disabled).map(he=>he.ref.current);xD.includes(te.key)&&Te.reverse(),W$(Te)}),onBlur:Ne(e.onBlur,te=>{te.currentTarget.contains(te.target)||(window.clearTimeout(q.current),L.current="")}),onPointerMove:Ne(e.onPointerMove,ff(te=>{const F=te.target,V=ne.current!==te.clientX;if(te.currentTarget.contains(F)&&V){const ie=te.clientX>ne.current?"right":"left";ee.current=ie,ne.current=te.clientX}}))})})})})})})});wD.displayName=Xr;var z$="MenuGroup",Xx=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(tt.div,{role:"group",...r,ref:t})});Xx.displayName=z$;var V$="MenuLabel",AD=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(tt.div,{...r,ref:t})});AD.displayName=V$;var dm="MenuItem",hA="menu.itemSelect",Gm=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=E.useRef(null),l=Pf(dm,e.__scopeMenu),c=Kx(dm,e.__scopeMenu),f=_t(t,o),d=E.useRef(!1),m=()=>{const p=o.current;if(!n&&p){const b=new CustomEvent(hA,{bubbles:!0,cancelable:!0});p.addEventListener(hA,x=>r==null?void 0:r(x),{once:!0}),ZN(p,b),b.defaultPrevented?d.current=!1:l.onClose()}};return g.jsx(_D,{...s,ref:f,disabled:n,onClick:Ne(e.onClick,m),onPointerDown:p=>{var b;(b=e.onPointerDown)==null||b.call(e,p),d.current=!0},onPointerUp:Ne(e.onPointerUp,p=>{var b;d.current||(b=p.currentTarget)==null||b.click()}),onKeyDown:Ne(e.onKeyDown,p=>{const b=c.searchRef.current!=="";n||b&&p.key===" "||ey.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Gm.displayName=dm;var _D=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,l=Kx(dm,n),c=TD(n),f=E.useRef(null),d=_t(t,f),[m,p]=E.useState(!1),[b,x]=E.useState("");return E.useEffect(()=>{const S=f.current;S&&x((S.textContent??"").trim())},[o.children]),g.jsx(cf.ItemSlot,{scope:n,disabled:r,textValue:s??b,children:g.jsx(yD,{asChild:!0,...c,focusable:!r,children:g.jsx(tt.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:d,onPointerMove:Ne(e.onPointerMove,ff(S=>{r?l.onItemLeave(S):(l.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ne(e.onPointerLeave,ff(S=>l.onItemLeave(S))),onFocus:Ne(e.onFocus,()=>p(!0)),onBlur:Ne(e.onBlur,()=>p(!1))})})})}),q$="MenuCheckboxItem",kD=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return g.jsx(MD,{scope:e.__scopeMenu,checked:n,children:g.jsx(Gm,{role:"menuitemcheckbox","aria-checked":hm(n)?"mixed":n,...s,ref:t,"data-state":Zx(n),onSelect:Ne(s.onSelect,()=>r==null?void 0:r(hm(n)?!0:!n),{checkForDefaultPrevented:!1})})})});kD.displayName=q$;var ND="MenuRadioGroup",[$$,Y$]=No(ND,{value:void 0,onValueChange:()=>{}}),RD=E.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=Fi(r);return g.jsx($$,{scope:e.__scopeMenu,value:n,onValueChange:o,children:g.jsx(Xx,{...s,ref:t})})});RD.displayName=ND;var DD="MenuRadioItem",OD=E.forwardRef((e,t)=>{const{value:n,...r}=e,s=Y$(DD,e.__scopeMenu),o=n===s.value;return g.jsx(MD,{scope:e.__scopeMenu,checked:o,children:g.jsx(Gm,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Zx(o),onSelect:Ne(r.onSelect,()=>{var l;return(l=s.onValueChange)==null?void 0:l.call(s,n)},{checkForDefaultPrevented:!1})})})});OD.displayName=DD;var Wx="MenuItemIndicator",[MD,G$]=No(Wx,{checked:!1}),ID=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=G$(Wx,n);return g.jsx(bi,{present:r||hm(o.checked)||o.checked===!0,children:g.jsx(tt.span,{...s,ref:t,"data-state":Zx(o.checked)})})});ID.displayName=Wx;var K$="MenuSeparator",LD=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(tt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});LD.displayName=K$;var Q$="MenuArrow",PD=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Ym(n);return g.jsx($x,{...s,...r,ref:t})});PD.displayName=Q$;var X$="MenuSub",[Qoe,jD]=No(X$),Rc="MenuSubTrigger",BD=E.forwardRef((e,t)=>{const n=Ro(Rc,e.__scopeMenu),r=Pf(Rc,e.__scopeMenu),s=jD(Rc,e.__scopeMenu),o=Kx(Rc,e.__scopeMenu),l=E.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=o,d={__scopeMenu:e.__scopeMenu},m=E.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return E.useEffect(()=>m,[m]),E.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),f(null)}},[c,f]),g.jsx(Yx,{asChild:!0,...d,children:g.jsx(_D,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":HD(n.open),...e,ref:Nf(t,s.onTriggerChange),onClick:p=>{var b;(b=e.onClick)==null||b.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ne(e.onPointerMove,ff(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,ff(p=>{var x,S;m();const b=(x=n.content)==null?void 0:x.getBoundingClientRect();if(b){const C=(S=n.content)==null?void 0:S.dataset.side,w=C==="right",A=w?-5:5,N=b[w?"left":"right"],k=b[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:p.clientX+A,y:p.clientY},{x:N,y:b.top},{x:k,y:b.top},{x:k,y:b.bottom},{x:N,y:b.bottom}],side:C}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(p),p.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ne(e.onKeyDown,p=>{var x;const b=o.searchRef.current!=="";e.disabled||b&&p.key===" "||R$[r.dir].includes(p.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),p.preventDefault())})})})});BD.displayName=Rc;var FD="MenuSubContent",UD=E.forwardRef((e,t)=>{const n=SD(Xr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Ro(Xr,e.__scopeMenu),l=Pf(Xr,e.__scopeMenu),c=jD(FD,e.__scopeMenu),f=E.useRef(null),d=_t(t,f);return g.jsx(cf.Provider,{scope:e.__scopeMenu,children:g.jsx(bi,{present:r||o.open,children:g.jsx(cf.Slot,{scope:e.__scopeMenu,children:g.jsx(Qx,{id:c.contentId,"aria-labelledby":c.triggerId,...s,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var p;l.isUsingKeyboardRef.current&&((p=f.current)==null||p.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:Ne(e.onFocusOutside,m=>{m.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ne(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:Ne(e.onKeyDown,m=>{var x;const p=m.currentTarget.contains(m.target),b=D$[l.dir].includes(m.key);p&&b&&(o.onOpenChange(!1),(x=c.trigger)==null||x.focus(),m.preventDefault())})})})})})});UD.displayName=FD;function HD(e){return e?"open":"closed"}function hm(e){return e==="indeterminate"}function Zx(e){return hm(e)?"indeterminate":e?"checked":"unchecked"}function W$(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Z$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function J$(e,t,n){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=Z$(e,Math.max(o,0));s.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.toLowerCase().startsWith(s.toLowerCase()));return f!==n?f:void 0}function eY(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 c=t[o],f=t[l],d=c.x,m=c.y,p=f.x,b=f.y;m>r!=b>r&&n<(p-d)*(r-m)/(b-m)+d&&(s=!s)}return s}function tY(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return eY(n,t)}function ff(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nY=vD,rY=Yx,iY=CD,sY=wD,aY=Xx,oY=AD,lY=Gm,uY=kD,cY=RD,fY=OD,dY=ID,hY=LD,mY=PD,pY=BD,gY=UD,Km="DropdownMenu",[bY]=Hi(Km,[ED]),ir=ED(),[yY,zD]=bY(Km),VD=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,f=ir(t),d=E.useRef(null),[m,p]=xa({prop:s,defaultProp:o??!1,onChange:l,caller:Km});return g.jsx(yY,{scope:t,triggerId:Pi(),triggerRef:d,contentId:Pi(),open:m,onOpenChange:p,onOpenToggle:E.useCallback(()=>p(b=>!b),[p]),modal:c,children:g.jsx(nY,{...f,open:m,onOpenChange:p,dir:r,modal:c,children:n})})};VD.displayName=Km;var qD="DropdownMenuTrigger",$D=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=zD(qD,n),l=ir(n);return g.jsx(rY,{asChild:!0,...l,children:g.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:Nf(t,o.triggerRef),onPointerDown:Ne(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:Ne(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});$D.displayName=qD;var xY="DropdownMenuPortal",YD=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ir(t);return g.jsx(iY,{...r,...n})};YD.displayName=xY;var GD="DropdownMenuContent",KD=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=zD(GD,n),o=ir(n),l=E.useRef(!1);return g.jsx(sY,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ne(e.onCloseAutoFocus,c=>{var f;l.current||(f=s.triggerRef.current)==null||f.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:Ne(e.onInteractOutside,c=>{const f=c.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,m=f.button===2||d;(!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)"}})});KD.displayName=GD;var EY="DropdownMenuGroup",TY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(aY,{...s,...r,ref:t})});TY.displayName=EY;var vY="DropdownMenuLabel",QD=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(oY,{...s,...r,ref:t})});QD.displayName=vY;var SY="DropdownMenuItem",CY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(lY,{...s,...r,ref:t})});CY.displayName=SY;var wY="DropdownMenuCheckboxItem",AY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(uY,{...s,...r,ref:t})});AY.displayName=wY;var _Y="DropdownMenuRadioGroup",XD=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(cY,{...s,...r,ref:t})});XD.displayName=_Y;var kY="DropdownMenuRadioItem",WD=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(fY,{...s,...r,ref:t})});WD.displayName=kY;var NY="DropdownMenuItemIndicator",ZD=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(dY,{...s,...r,ref:t})});ZD.displayName=NY;var RY="DropdownMenuSeparator",DY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(hY,{...s,...r,ref:t})});DY.displayName=RY;var OY="DropdownMenuArrow",MY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(mY,{...s,...r,ref:t})});MY.displayName=OY;var IY="DropdownMenuSubTrigger",LY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(pY,{...s,...r,ref:t})});LY.displayName=IY;var PY="DropdownMenuSubContent",jY=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ir(n);return g.jsx(gY,{...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)"}})});jY.displayName=PY;var BY=VD,FY=$D,UY=YD,JD=KD,eO=QD,HY=XD,tO=WD,zY=ZD;const VY=BY,qY=FY,nO=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(UY,{children:g.jsx(JD,{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})}));nO.displayName=JD.displayName;const rO=E.forwardRef(({className:e,...t},n)=>g.jsx(eO,{ref:n,className:Ye("text-muted-foreground px-2 py-1.5 text-xs font-semibold",e),...t}));rO.displayName=eO.displayName;const $Y=HY,iO=E.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(tO,{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:[g.jsx("span",{className:"absolute left-2 flex size-(--size-icon-sm) items-center justify-center",children:g.jsx(zY,{children:g.jsx(Mi,{className:"size-(--size-icon-xs)"})})}),t]}));iO.displayName=tO.displayName;var sO=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"}),YY="VisuallyHidden",GY=E.forwardRef((e,t)=>g.jsx(tt.span,{...e,ref:t,style:{...sO,...e.style}}));GY.displayName=YY;function aO(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var A1,Qm="HoverCard",[oO]=Hi(Qm,[pu]),Xm=pu(),[KY,Wm]=oO(Qm),lO=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:s,onOpenChange:o,openDelay:l=700,closeDelay:c=300}=e,f=Xm(t),d=E.useRef(0),m=E.useRef(0),p=E.useRef(!1),b=E.useRef(!1),[x,S]=xa({prop:r,defaultProp:s??!1,onChange:o,caller:Qm}),C=E.useCallback(()=>{clearTimeout(m.current),d.current=window.setTimeout(()=>S(!0),l)},[l,S]),w=E.useCallback(()=>{clearTimeout(d.current),!p.current&&!b.current&&(m.current=window.setTimeout(()=>S(!1),c))},[c,S]),A=E.useCallback(()=>S(!1),[S]);return E.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(m.current)},[]),g.jsx(KY,{scope:t,open:x,onOpenChange:S,onOpen:C,onClose:w,onDismiss:A,hasSelectionRef:p,isPointerDownOnContentRef:b,children:g.jsx(zx,{...f,children:n})})};lO.displayName=Qm;var uO="HoverCardTrigger",cO=E.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,s=Wm(uO,n),o=Xm(n);return g.jsx(Vx,{asChild:!0,...o,children:g.jsx(tt.a,{"data-state":s.open?"open":"closed",...r,ref:t,onPointerEnter:Ne(e.onPointerEnter,pm(s.onOpen)),onPointerLeave:Ne(e.onPointerLeave,pm(s.onClose)),onFocus:Ne(e.onFocus,s.onOpen),onBlur:Ne(e.onBlur,s.onClose),onTouchStart:Ne(e.onTouchStart,l=>l.preventDefault())})})});cO.displayName=uO;var Jx="HoverCardPortal",[QY,XY]=oO(Jx,{forceMount:void 0}),fO=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:s}=e,o=Wm(Jx,t);return g.jsx(QY,{scope:t,forceMount:n,children:g.jsx(bi,{present:n||o.open,children:g.jsx(Df,{asChild:!0,container:s,children:r})})})};fO.displayName=Jx;var mm="HoverCardContent",dO=E.forwardRef((e,t)=>{const n=XY(mm,e.__scopeHoverCard),{forceMount:r=n.forceMount,...s}=e,o=Wm(mm,e.__scopeHoverCard);return g.jsx(bi,{present:r||o.open,children:g.jsx(WY,{"data-state":o.open?"open":"closed",...s,onPointerEnter:Ne(e.onPointerEnter,pm(o.onOpen)),onPointerLeave:Ne(e.onPointerLeave,pm(o.onClose)),ref:t})})});dO.displayName=mm;var WY=E.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:l,...c}=e,f=Wm(mm,n),d=Xm(n),m=E.useRef(null),p=_t(t,m),[b,x]=E.useState(!1);return E.useEffect(()=>{if(b){const S=document.body;return A1=S.style.userSelect||S.style.webkitUserSelect,S.style.userSelect="none",S.style.webkitUserSelect="none",()=>{S.style.userSelect=A1,S.style.webkitUserSelect=A1}}},[b]),E.useEffect(()=>{if(m.current){const S=()=>{x(!1),f.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var w;((w=document.getSelection())==null?void 0:w.toString())!==""&&(f.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",S),()=>{document.removeEventListener("pointerup",S),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!1}}},[f.isPointerDownOnContentRef,f.hasSelectionRef]),E.useEffect(()=>{m.current&&eG(m.current).forEach(C=>C.setAttribute("tabindex","-1"))}),g.jsx(Rf,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:Ne(o,S=>{S.preventDefault()}),onDismiss:f.onDismiss,children:g.jsx(qx,{...d,...c,onPointerDown:Ne(c.onPointerDown,S=>{S.currentTarget.contains(S.target)&&x(!0),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!0}),ref:p,style:{...c.style,userSelect:b?"text":void 0,WebkitUserSelect:b?"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)"}})})}),ZY="HoverCardArrow",JY=E.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,s=Xm(n);return g.jsx($x,{...s,...r,ref:t})});JY.displayName=ZY;function pm(e){return t=>t.pointerType==="touch"?void 0:e()}function eG(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 tG=lO,nG=cO,rG=fO,iG=dO;function mA(e,[t,n]){return Math.min(n,Math.max(t,e))}var sG=[" ","Enter","ArrowUp","ArrowDown"],aG=[" ","Enter"],To="Select",[Zm,Jm,oG]=Mx(To),[gu]=Hi(To,[oG,pu]),ep=pu(),[lG,wa]=gu(To),[uG,cG]=gu(To),hO=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:l,defaultValue:c,onValueChange:f,dir:d,name:m,autoComplete:p,disabled:b,required:x,form:S}=e,C=ep(t),[w,A]=E.useState(null),[N,k]=E.useState(null),[R,B]=E.useState(!1),O=Um(d),[j,P]=xa({prop:r,defaultProp:s??!1,onChange:o,caller:To}),[q,L]=xa({prop:l,defaultProp:c,onChange:f,caller:To}),X=E.useRef(null),Q=w?S||!!w.closest("form"):!0,[ee,ne]=E.useState(new Set),Z=Array.from(ee).map(D=>D.props.value).join(";");return g.jsx(zx,{...C,children:g.jsxs(lG,{required:x,scope:t,trigger:w,onTriggerChange:A,valueNode:N,onValueNodeChange:k,valueNodeHasChildren:R,onValueNodeHasChildrenChange:B,contentId:Pi(),value:q,onValueChange:L,open:j,onOpenChange:P,dir:O,triggerPointerDownPosRef:X,disabled:b,children:[g.jsx(Zm.Provider,{scope:t,children:g.jsx(uG,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(D=>{ne(H=>new Set(H).add(D))},[]),onNativeOptionRemove:E.useCallback(D=>{ne(H=>{const $=new Set(H);return $.delete(D),$})},[]),children:n})}),Q?g.jsxs(MO,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:p,value:q,onChange:D=>L(D.target.value),disabled:b,form:S,children:[q===void 0?g.jsx("option",{value:""}):null,Array.from(ee)]},Z):null]})})};hO.displayName=To;var mO="SelectTrigger",pO=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=ep(n),l=wa(mO,n),c=l.disabled||r,f=_t(t,l.onTriggerChange),d=Jm(n),m=E.useRef("touch"),[p,b,x]=LO(C=>{const w=d().filter(k=>!k.disabled),A=w.find(k=>k.value===l.value),N=PO(w,C,A);N!==void 0&&l.onValueChange(N.value)}),S=C=>{c||(l.onOpenChange(!0),x()),C&&(l.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return g.jsx(Vx,{asChild:!0,...o,children:g.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:c,"data-disabled":c?"":void 0,"data-placeholder":IO(l.value)?"":void 0,...s,ref:f,onClick:Ne(s.onClick,C=>{C.currentTarget.focus(),m.current!=="mouse"&&S(C)}),onPointerDown:Ne(s.onPointerDown,C=>{m.current=C.pointerType;const w=C.target;w.hasPointerCapture(C.pointerId)&&w.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(S(C),C.preventDefault())}),onKeyDown:Ne(s.onKeyDown,C=>{const w=p.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&b(C.key),!(w&&C.key===" ")&&sG.includes(C.key)&&(S(),C.preventDefault())})})})});pO.displayName=mO;var gO="SelectValue",bO=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:l="",...c}=e,f=wa(gO,n),{onValueNodeHasChildrenChange:d}=f,m=o!==void 0,p=_t(t,f.onValueNodeChange);return Vn(()=>{d(m)},[d,m]),g.jsx(tt.span,{...c,ref:p,style:{pointerEvents:"none"},children:IO(f.value)?g.jsx(g.Fragment,{children:l}):o})});bO.displayName=gO;var fG="SelectIcon",yO=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return g.jsx(tt.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});yO.displayName=fG;var dG="SelectPortal",xO=e=>g.jsx(Df,{asChild:!0,...e});xO.displayName=dG;var vo="SelectContent",EO=E.forwardRef((e,t)=>{const n=wa(vo,e.__scopeSelect),[r,s]=E.useState();if(Vn(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?_o.createPortal(g.jsx(TO,{scope:e.__scopeSelect,children:g.jsx(Zm.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),o):null}return g.jsx(vO,{...e,ref:t})});EO.displayName=vo;var oi=10,[TO,Aa]=gu(vo),hG="SelectContentImpl",mG=tu("SelectContent.RemoveScroll"),vO=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:f,align:d,alignOffset:m,arrowPadding:p,collisionBoundary:b,collisionPadding:x,sticky:S,hideWhenDetached:C,avoidCollisions:w,...A}=e,N=wa(vo,n),[k,R]=E.useState(null),[B,O]=E.useState(null),j=_t(t,he=>R(he)),[P,q]=E.useState(null),[L,X]=E.useState(null),Q=Jm(n),[ee,ne]=E.useState(!1),Z=E.useRef(!1);E.useEffect(()=>{if(k)return Ex(k)},[k]),xx();const D=E.useCallback(he=>{const[Se,...Ce]=Q().map(je=>je.ref.current),[Pe]=Ce.slice(-1),_e=document.activeElement;for(const je of he)if(je===_e||(je==null||je.scrollIntoView({block:"nearest"}),je===Se&&B&&(B.scrollTop=0),je===Pe&&B&&(B.scrollTop=B.scrollHeight),je==null||je.focus(),document.activeElement!==_e))return},[Q,B]),H=E.useCallback(()=>D([P,k]),[D,P,k]);E.useEffect(()=>{ee&&H()},[ee,H]);const{onOpenChange:$,triggerPointerDownPosRef:te}=N;E.useEffect(()=>{if(k){let he={x:0,y:0};const Se=Pe=>{var _e,je;he={x:Math.abs(Math.round(Pe.pageX)-(((_e=te.current)==null?void 0:_e.x)??0)),y:Math.abs(Math.round(Pe.pageY)-(((je=te.current)==null?void 0:je.y)??0))}},Ce=Pe=>{he.x<=10&&he.y<=10?Pe.preventDefault():k.contains(Pe.target)||$(!1),document.removeEventListener("pointermove",Se),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[k,$,te]),E.useEffect(()=>{const he=()=>$(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[$]);const[F,V]=LO(he=>{const Se=Q().filter(_e=>!_e.disabled),Ce=Se.find(_e=>_e.ref.current===document.activeElement),Pe=PO(Se,he,Ce);Pe&&setTimeout(()=>Pe.ref.current.focus())}),ie=E.useCallback((he,Se,Ce)=>{const Pe=!Z.current&&!Ce;(N.value!==void 0&&N.value===Se||Pe)&&(q(he),Pe&&(Z.current=!0))},[N.value]),I=E.useCallback(()=>k==null?void 0:k.focus(),[k]),de=E.useCallback((he,Se,Ce)=>{const Pe=!Z.current&&!Ce;(N.value!==void 0&&N.value===Se||Pe)&&X(he)},[N.value]),xe=r==="popper"?ty:SO,Te=xe===ty?{side:c,sideOffset:f,align:d,alignOffset:m,arrowPadding:p,collisionBoundary:b,collisionPadding:x,sticky:S,hideWhenDetached:C,avoidCollisions:w}:{};return g.jsx(TO,{scope:n,content:k,viewport:B,onViewportChange:O,itemRefCallback:ie,selectedItem:P,onItemLeave:I,itemTextRefCallback:de,focusSelectedItem:H,selectedItemText:L,position:r,isPositioned:ee,searchRef:F,children:g.jsx(Bm,{as:mG,allowPinchZoom:!0,children:g.jsx(Pm,{asChild:!0,trapped:N.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:Ne(s,he=>{var Se;(Se=N.trigger)==null||Se.focus({preventScroll:!0}),he.preventDefault()}),children:g.jsx(Rf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:g.jsx(xe,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:he=>he.preventDefault(),...A,...Te,onPlaced:()=>ne(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:Ne(A.onKeyDown,he=>{const Se=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!Se&&he.key.length===1&&V(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Pe=Q().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,je=Pe.indexOf(_e);Pe=Pe.slice(je+1)}setTimeout(()=>D(Pe)),he.preventDefault()}})})})})})})});vO.displayName=hG;var pG="SelectItemAlignedPosition",SO=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=wa(vo,n),l=Aa(vo,n),[c,f]=E.useState(null),[d,m]=E.useState(null),p=_t(t,j=>m(j)),b=Jm(n),x=E.useRef(!1),S=E.useRef(!0),{viewport:C,selectedItem:w,selectedItemText:A,focusSelectedItem:N}=l,k=E.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&d&&C&&w&&A){const j=o.trigger.getBoundingClientRect(),P=d.getBoundingClientRect(),q=o.valueNode.getBoundingClientRect(),L=A.getBoundingClientRect();if(o.dir!=="rtl"){const _e=L.left-P.left,je=q.left-_e,wt=j.left-je,Re=j.width+wt,tn=Math.max(Re,P.width),Lt=window.innerWidth-oi,nn=mA(je,[oi,Math.max(oi,Lt-tn)]);c.style.minWidth=Re+"px",c.style.left=nn+"px"}else{const _e=P.right-L.right,je=window.innerWidth-q.right-_e,wt=window.innerWidth-j.right-je,Re=j.width+wt,tn=Math.max(Re,P.width),Lt=window.innerWidth-oi,nn=mA(je,[oi,Math.max(oi,Lt-tn)]);c.style.minWidth=Re+"px",c.style.right=nn+"px"}const X=b(),Q=window.innerHeight-oi*2,ee=C.scrollHeight,ne=window.getComputedStyle(d),Z=parseInt(ne.borderTopWidth,10),D=parseInt(ne.paddingTop,10),H=parseInt(ne.borderBottomWidth,10),$=parseInt(ne.paddingBottom,10),te=Z+D+ee+$+H,F=Math.min(w.offsetHeight*5,te),V=window.getComputedStyle(C),ie=parseInt(V.paddingTop,10),I=parseInt(V.paddingBottom,10),de=j.top+j.height/2-oi,xe=Q-de,Te=w.offsetHeight/2,he=w.offsetTop+Te,Se=Z+D+he,Ce=te-Se;if(Se<=de){const _e=X.length>0&&w===X[X.length-1].ref.current;c.style.bottom="0px";const je=d.clientHeight-C.offsetTop-C.offsetHeight,wt=Math.max(xe,Te+(_e?I:0)+je+H),Re=Se+wt;c.style.height=Re+"px"}else{const _e=X.length>0&&w===X[0].ref.current;c.style.top="0px";const wt=Math.max(de,Z+C.offsetTop+(_e?ie:0)+Te)+Ce;c.style.height=wt+"px",C.scrollTop=Se-de+C.offsetTop}c.style.margin=`${oi}px 0`,c.style.minHeight=F+"px",c.style.maxHeight=Q+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[b,o.trigger,o.valueNode,c,d,C,w,A,o.dir,r]);Vn(()=>k(),[k]);const[R,B]=E.useState();Vn(()=>{d&&B(window.getComputedStyle(d).zIndex)},[d]);const O=E.useCallback(j=>{j&&S.current===!0&&(k(),N==null||N(),S.current=!1)},[k,N]);return g.jsx(bG,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:O,children:g.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:g.jsx(tt.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});SO.displayName=pG;var gG="SelectPopperPosition",ty=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=oi,...o}=e,l=ep(n);return g.jsx(qx,{...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)"}})});ty.displayName=gG;var[bG,eE]=gu(vo,{}),ny="SelectViewport",CO=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=Aa(ny,n),l=eE(ny,n),c=_t(t,o.onViewportChange),f=E.useRef(0);return g.jsxs(g.Fragment,{children:[g.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}),g.jsx(Zm.Slot,{scope:n,children:g.jsx(tt.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Ne(s.onScroll,d=>{const m=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:b}=l;if(b!=null&&b.current&&p){const x=Math.abs(f.current-m.scrollTop);if(x>0){const S=window.innerHeight-oi*2,C=parseFloat(p.style.minHeight),w=parseFloat(p.style.height),A=Math.max(C,w);if(A<S){const N=A+x,k=Math.min(S,N),R=N-k;p.style.height=k+"px",p.style.bottom==="0px"&&(m.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})});CO.displayName=ny;var wO="SelectGroup",[yG,xG]=gu(wO),EG=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Pi();return g.jsx(yG,{scope:n,id:s,children:g.jsx(tt.div,{role:"group","aria-labelledby":s,...r,ref:t})})});EG.displayName=wO;var AO="SelectLabel",TG=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=xG(AO,n);return g.jsx(tt.div,{id:s.id,...r,ref:t})});TG.displayName=AO;var gm="SelectItem",[vG,_O]=gu(gm),kO=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...l}=e,c=wa(gm,n),f=Aa(gm,n),d=c.value===r,[m,p]=E.useState(o??""),[b,x]=E.useState(!1),S=_t(t,N=>{var k;return(k=f.itemRefCallback)==null?void 0:k.call(f,N,r,s)}),C=Pi(),w=E.useRef("touch"),A=()=>{s||(c.onValueChange(r),c.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 g.jsx(vG,{scope:n,value:r,disabled:s,textId:C,isSelected:d,onItemTextChange:E.useCallback(N=>{p(k=>k||((N==null?void 0:N.textContent)??"").trim())},[]),children:g.jsx(Zm.ItemSlot,{scope:n,value:r,disabled:s,textValue:m,children:g.jsx(tt.div,{role:"option","aria-labelledby":C,"data-highlighted":b?"":void 0,"aria-selected":d&&b,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...l,ref:S,onFocus:Ne(l.onFocus,()=>x(!0)),onBlur:Ne(l.onBlur,()=>x(!1)),onClick:Ne(l.onClick,()=>{w.current!=="mouse"&&A()}),onPointerUp:Ne(l.onPointerUp,()=>{w.current==="mouse"&&A()}),onPointerDown:Ne(l.onPointerDown,N=>{w.current=N.pointerType}),onPointerMove:Ne(l.onPointerMove,N=>{var k;w.current=N.pointerType,s?(k=f.onItemLeave)==null||k.call(f):w.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(l.onPointerLeave,N=>{var k;N.currentTarget===document.activeElement&&((k=f.onItemLeave)==null||k.call(f))}),onKeyDown:Ne(l.onKeyDown,N=>{var R;((R=f.searchRef)==null?void 0:R.current)!==""&&N.key===" "||(aG.includes(N.key)&&A(),N.key===" "&&N.preventDefault())})})})})});kO.displayName=gm;var Dc="SelectItemText",NO=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,l=wa(Dc,n),c=Aa(Dc,n),f=_O(Dc,n),d=cG(Dc,n),[m,p]=E.useState(null),b=_t(t,A=>p(A),f.onItemTextChange,A=>{var N;return(N=c.itemTextRefCallback)==null?void 0:N.call(c,A,f.value,f.disabled)}),x=m==null?void 0:m.textContent,S=E.useMemo(()=>g.jsx("option",{value:f.value,disabled:f.disabled,children:x},f.value),[f.disabled,f.value,x]),{onNativeOptionAdd:C,onNativeOptionRemove:w}=d;return Vn(()=>(C(S),()=>w(S)),[C,w,S]),g.jsxs(g.Fragment,{children:[g.jsx(tt.span,{id:f.textId,...o,ref:b}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?_o.createPortal(o.children,l.valueNode):null]})});NO.displayName=Dc;var RO="SelectItemIndicator",DO=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _O(RO,n).isSelected?g.jsx(tt.span,{"aria-hidden":!0,...r,ref:t}):null});DO.displayName=RO;var ry="SelectScrollUpButton",SG=E.forwardRef((e,t)=>{const n=Aa(ry,e.__scopeSelect),r=eE(ry,e.__scopeSelect),[s,o]=E.useState(!1),l=_t(t,r.onScrollButtonChange);return Vn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=f.scrollTop>0;o(d)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?g.jsx(OO,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop-f.offsetHeight)}}):null});SG.displayName=ry;var iy="SelectScrollDownButton",CG=E.forwardRef((e,t)=>{const n=Aa(iy,e.__scopeSelect),r=eE(iy,e.__scopeSelect),[s,o]=E.useState(!1),l=_t(t,r.onScrollButtonChange);return Vn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)<d;o(m)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),s?g.jsx(OO,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop+f.offsetHeight)}}):null});CG.displayName=iy;var OO=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=Aa("SelectScrollButton",n),l=E.useRef(null),c=Jm(n),f=E.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return E.useEffect(()=>()=>f(),[f]),Vn(()=>{var m;const d=c().find(p=>p.ref.current===document.activeElement);(m=d==null?void 0:d.ref.current)==null||m.scrollIntoView({block:"nearest"})},[c]),g.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 d;(d=o.onItemLeave)==null||d.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ne(s.onPointerLeave,()=>{f()})})}),wG="SelectSeparator",AG=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(tt.div,{"aria-hidden":!0,...r,ref:t})});AG.displayName=wG;var sy="SelectArrow",_G=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=ep(n),o=wa(sy,n),l=Aa(sy,n);return o.open&&l.position==="popper"?g.jsx($x,{...s,...r,ref:t}):null});_G.displayName=sy;var kG="SelectBubbleInput",MO=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=E.useRef(null),o=_t(r,s),l=aO(t);return E.useEffect(()=>{const c=s.current;if(!c)return;const f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&m){const p=new Event("change",{bubbles:!0});m.call(c,t),c.dispatchEvent(p)}},[l,t]),g.jsx(tt.select,{...n,style:{...sO,...n.style},ref:o,defaultValue:t})});MO.displayName=kG;function IO(e){return e===""||e===void 0}function LO(e){const t=Fi(e),n=E.useRef(""),r=E.useRef(0),s=E.useCallback(l=>{const c=n.current+l;t(c),(function f(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(c)},[t]),o=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function PO(e,t,n){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=NG(e,Math.max(o,0));s.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.textValue.toLowerCase().startsWith(s.toLowerCase()));return f!==n?f:void 0}function NG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RG=hO,jO=pO,DG=bO,OG=yO,MG=xO,BO=EO,IG=CO,FO=kO,LG=NO,PG=DO,tp="Switch",[jG]=Hi(tp),[BG,FG]=jG(tp),UO=E.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:l,disabled:c,value:f="on",onCheckedChange:d,form:m,...p}=e,[b,x]=E.useState(null),S=_t(t,k=>x(k)),C=E.useRef(!1),w=b?m||!!b.closest("form"):!0,[A,N]=xa({prop:s,defaultProp:o??!1,onChange:d,caller:tp});return g.jsxs(BG,{scope:n,checked:A,disabled:c,children:[g.jsx(tt.button,{type:"button",role:"switch","aria-checked":A,"aria-required":l,"data-state":qO(A),"data-disabled":c?"":void 0,disabled:c,value:f,...p,ref:S,onClick:Ne(e.onClick,k=>{N(R=>!R),w&&(C.current=k.isPropagationStopped(),C.current||k.stopPropagation())})}),w&&g.jsx(VO,{control:b,bubbles:!C.current,name:r,value:f,checked:A,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});UO.displayName=tp;var HO="SwitchThumb",zO=E.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=FG(HO,n);return g.jsx(tt.span,{"data-state":qO(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});zO.displayName=HO;var UG="SwitchBubbleInput",VO=E.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...s},o)=>{const l=E.useRef(null),c=_t(l,o),f=aO(n),d=nD(t);return E.useEffect(()=>{const m=l.current;if(!m)return;const p=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==n&&x){const S=new Event("click",{bubbles:r});x.call(m,n),m.dispatchEvent(S)}},[f,n,r]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:c,style:{...s.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});VO.displayName=UG;function qO(e){return e?"checked":"unchecked"}var $O=UO,HG=zO,np="Tabs",[zG]=Hi(np,[$m]),YO=$m(),[VG,tE]=zG(np),GO=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:f="automatic",...d}=e,m=Um(c),[p,b]=xa({prop:r,onChange:s,defaultProp:o??"",caller:np});return g.jsx(VG,{scope:n,baseId:Pi(),value:p,onValueChange:b,orientation:l,dir:m,activationMode:f,children:g.jsx(tt.div,{dir:m,"data-orientation":l,...d,ref:t})})});GO.displayName=np;var KO="TabsList",QO=E.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=tE(KO,n),l=YO(n);return g.jsx(bD,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:g.jsx(tt.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});QO.displayName=KO;var XO="TabsTrigger",WO=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,l=tE(XO,n),c=YO(n),f=eM(l.baseId,r),d=tM(l.baseId,r),m=r===l.value;return g.jsx(yD,{asChild:!0,...c,focusable:!s,active:m,children:g.jsx(tt.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":d,"data-state":m?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:f,...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)})})})});WO.displayName=XO;var ZO="TabsContent",JO=E.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...l}=e,c=tE(ZO,n),f=eM(c.baseId,r),d=tM(c.baseId,r),m=r===c.value,p=E.useRef(m);return E.useEffect(()=>{const b=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(b)},[]),g.jsx(bi,{present:s||m,children:({present:b})=>g.jsx(tt.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!b,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:b&&o})})});JO.displayName=ZO;function eM(e,t){return`${e}-trigger-${t}`}function tM(e,t){return`${e}-content-${t}`}var qG=GO,nM=QO,rM=WO,iM=JO;function pA({...e}){return g.jsx(tG,{"data-slot":"hover-card",...e})}function gA({...e}){return g.jsx(nG,{"data-slot":"hover-card-trigger",...e})}function bA({className:e,align:t="center",sideOffset:n=4,...r}){return g.jsx(rG,{"data-slot":"hover-card-portal",children:g.jsx(iG,{"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 g.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 $G=Symbol.for("react.lazy"),bm=Ry[" use ".trim().toString()];function YG(e){return typeof e=="object"&&e!==null&&"then"in e}function sM(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$G&&"_payload"in e&&YG(e._payload)}function GG(e){const t=KG(e),n=E.forwardRef((r,s)=>{let{children:o,...l}=r;sM(o)&&typeof bm=="function"&&(o=bm(o._payload));const c=E.Children.toArray(o),f=c.find(XG);if(f){const d=f.props.children,m=c.map(p=>p===f?E.Children.count(d)>1?E.Children.only(null):E.isValidElement(d)?d.props.children:null:p);return g.jsx(t,{...l,ref:s,children:E.isValidElement(d)?E.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function KG(e){const t=E.forwardRef((n,r)=>{let{children:s,...o}=n;if(sM(s)&&typeof bm=="function"&&(s=bm(s._payload)),E.isValidElement(s)){const l=ZG(s),c=WG(o,s.props);return s.type!==E.Fragment&&(c.ref=r?Nf(r,l):l),E.cloneElement(s,c)}return E.Children.count(s)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var QG=Symbol("radix.slottable");function XG(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===QG}function WG(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]=(...c)=>{const f=o(...c);return s(...c),f}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function ZG(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 JG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],aM=JG.reduce((e,t)=>{const n=GG(`Primitive.${t}`),r=E.forwardRef((s,o)=>{const{asChild:l,...c}=s,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),eK="Label",oM=E.forwardRef((e,t)=>g.jsx(aM.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())}}));oM.displayName=eK;var lM=oM;const uM=E.forwardRef(({className:e,...t},n)=>g.jsx(lM,{ref:n,className:Ye("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));uM.displayName=lM.displayName;function cM({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,c=s.length-l.length,f=r==="sm"?"text-2xs":"text-xs",d="size-(--size-icon-xs)",m=r==="sm"?"max-w-[80px]":"max-w-[120px]";return g.jsxs("div",{className:"flex min-w-0 items-center gap-0.5 overflow-hidden",children:[o&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:`${f} text-muted-foreground/50 flex-shrink-0`,children:"..."}),g.jsx(of,{className:`${d} text-muted-foreground/40 flex-shrink-0`})]}),l.map((p,b)=>{const x=c+b,S="/"+s.slice(0,x+1).join("/"),C=x===s.length-1,w=`${f} truncate ${m} ${C?"font-medium text-foreground":"text-muted-foreground"}`;return g.jsxs("span",{className:`flex items-center ${C?"flex-shrink-0":"min-w-0"}`,children:[b>0&&g.jsx(of,{className:`${d} text-muted-foreground/40 flex-shrink-0`}),n?g.jsx("button",{onClick:()=>n(S),className:`hover:bg-accent rounded px-1 py-0.5 transition-colors ${w}`,children:p}):g.jsx("span",{className:w,children:p})]},S)})]})}const rp=E.createContext({isDesktop:!0});function fM({children:e,...t}){const n=!Ao(),r=n?yV:Nx;return g.jsx(rp.Provider,{value:{isDesktop:n},children:g.jsx(r,{...t,children:e})})}function dM({className:e,children:t,...n}){const{isDesktop:r}=E.useContext(rp);return r?g.jsx(NR,{className:Ye("flex h-[75vh] flex-col",e),...n,children:t}):g.jsx(Rx,{className:Ye("flex h-[90vh] flex-col",e),children:t})}function hM({className:e,...t}){const{isDesktop:n}=E.useContext(rp),r=n?RR:Dx;return g.jsx(r,{className:e,...t})}function mM({className:e,...t}){const{isDesktop:n}=E.useContext(rp),r=n?DR:Ox;return g.jsx(r,{className:e,...t})}const va=E.createContext({isDesktop:!0,close:()=>{}});function pM({children:e,open:t,onOpenChange:n}){const r=!Ao(),[s,o]=E.useState(!1),l=t??s,c=E.useCallback(d=>{o(d),n==null||n(d)},[n]),f=E.useCallback(()=>{c(!1)},[c]);return r?g.jsx(va.Provider,{value:{isDesktop:r,close:f},children:g.jsx(VY,{open:t,onOpenChange:n,children:e})}):g.jsx(va.Provider,{value:{isDesktop:r,close:f},children:g.jsx(Nx,{open:l,onOpenChange:c,children:e})})}function gM({className:e,children:t,...n}){const{isDesktop:r}=E.useContext(va),s=r?qY:QV;return g.jsx(s,{className:e,...n,children:t})}function bM({className:e,children:t,...n}){const{isDesktop:r}=E.useContext(va);return r?g.jsx(nO,{className:e,...n,children:t}):g.jsx(Rx,{children:g.jsx("div",{className:"pb-6",children:t})})}function yM({className:e,children:t,...n}){const{isDesktop:r}=E.useContext(va);return r?g.jsx(rO,{className:e,...n,children:t}):g.jsx(Dx,{className:"pb-2",children:g.jsx(Ox,{className:Ye("text-muted-foreground text-sm font-semibold",e),children:t})})}const xM=E.createContext({closeOnSelect:!0});function EM({value:e,onValueChange:t,closeOnSelect:n=!0,children:r,className:s}){const{isDesktop:o}=E.useContext(va);return o?g.jsx($Y,{value:e,onValueChange:t,className:s,children:r}):g.jsx(xM.Provider,{value:{value:e,onValueChange:t,closeOnSelect:n},children:g.jsx("div",{role:"radiogroup",className:Ye("flex flex-col",s),children:r})})}function TM({value:e,children:t,icon:n,description:r,className:s}){const{isDesktop:o}=E.useContext(va);return o?g.jsx(iO,{value:e,className:s,children:n||r?g.jsxs("div",{className:"flex items-center gap-2",children:[n&&g.jsx(n,{className:"size-(--size-icon-xs) shrink-0"}),g.jsxs("div",{className:"text-left",children:[g.jsx("div",{children:t}),r&&g.jsx("div",{className:"text-muted-foreground text-[10px]",children:r})]})]}):t}):g.jsx(tK,{value:e,icon:n,description:r,className:s,children:t})}function tK({value:e,children:t,icon:n,description:r,className:s}){const{value:o,onValueChange:l,closeOnSelect:c}=E.useContext(xM),{close:f}=E.useContext(va),d=o===e;return g.jsxs("button",{role:"radio","aria-checked":d,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),c&&f()},children:[n&&g.jsx(n,{className:"size-5 shrink-0"}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"text-[17px] leading-snug",children:t}),r&&g.jsx("div",{className:"text-muted-foreground text-[13px] leading-snug",children:r})]}),d&&g.jsx(Mi,{className:"text-primary size-5 shrink-0"})]})}const _1=RG,k1=DG,qh=E.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(jO,{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,g.jsx(OG,{asChild:!0,children:g.jsx(Lm,{className:"h-4 w-4 opacity-50"})})]}));qh.displayName=jO.displayName;const $h=E.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>g.jsx(MG,{children:g.jsx(BO,{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:g.jsx(IG,{className:Ye("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));$h.displayName=BO.displayName;const ta=E.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(FO,{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:[g.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(PG,{children:g.jsx(Mi,{className:"h-4 w-4"})})}),g.jsx(LG,{children:t})]}));ta.displayName=FO.displayName;var nK="Separator",yA="horizontal",rK=["horizontal","vertical"],vM=E.forwardRef((e,t)=>{const{decorative:n,orientation:r=yA,...s}=e,o=iK(r)?r:yA,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return g.jsx(aM.div,{"data-orientation":o,...c,...s,ref:t})});vM.displayName=nK;function iK(e){return rK.includes(e)}var SM=vM;const sK=E.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>g.jsx(SM,{ref:s,decorative:n,orientation:t,className:Ye("bg-border shrink-0",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));sK.displayName=SM.displayName;const Fn=E.forwardRef(({className:e,...t},n)=>g.jsx($O,{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:g.jsx(HG,{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")})}));Fn.displayName=$O.displayName;const CM=qG,nE=E.forwardRef(({className:e,...t},n)=>g.jsx(nM,{ref:n,className:Ye("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...t}));nE.displayName=nM.displayName;const Il=E.forwardRef(({className:e,...t},n)=>g.jsx(rM,{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}));Il.displayName=rM.displayName;const Ll=E.forwardRef(({className:e,...t},n)=>g.jsx(iM,{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}));Ll.displayName=iM.displayName;function xA(e){try{return new Date(e).toLocaleString([],{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function aK({text:e,label:t}){const[n,r]=E.useState(!1),s=E.useCallback(async o=>{o.stopPropagation();try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),ys.COPY_FEEDBACK_MS)}catch{}},[e]);return g.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?g.jsx(Mi,{className:"size-(--size-icon-xs) text-green-500"}):g.jsx(KN,{className:"size-(--size-icon-xs)"})})}function oK({session:e,isActive:t,onClick:n,isNew:r=!1}){const[s,o]=E.useState(!1),l=Ao(),c=e.permissionMode==="bypassPermissions",f=r?dt.div:"div",d=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(b=>!b)}return g.jsxs(f,{...d,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:[g.jsxs("div",{role:"button",tabIndex:0,onClick:()=>{l&&o(p=>!p),n()},onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),l&&o(b=>!b),n())},className:"cursor-pointer px-3 py-2",children:[g.jsxs("div",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[g.jsx("span",{className:"min-w-0 flex-1",children:tk(e.updatedAt)}),g.jsxs("span",{className:"flex flex-shrink-0 items-center gap-1",children:[c&&g.jsx(WN,{className:"size-(--size-icon-xs) text-red-500","aria-label":"Permissions skipped"}),g.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:g.jsx(dt.div,{animate:{rotate:s?180:0},transition:{type:"spring",stiffness:400,damping:30},children:g.jsx(Lm,{className:"size-(--size-icon-sm)"})})})]})]}),g.jsx("div",{className:"text-muted-foreground/70 mt-0.5 truncate text-xs",children:e.title})]}),g.jsx(En,{initial:!1,children:s&&g.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:g.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:[g.jsx(Sh,{label:"Session ID",value:e.id,copyable:!0}),g.jsx(Sh,{label:"Created",value:xA(e.createdAt)}),g.jsx(Sh,{label:"Updated",value:xA(e.updatedAt)}),g.jsx(Sh,{label:"Permissions",value:c?"Skip (unsafe)":"Default"})]})})})]})}function Sh({label:e,value:t,copyable:n=!1}){return g.jsxs("div",{className:"flex items-start gap-2",children:[g.jsx("span",{className:"text-muted-foreground/60 w-16 flex-shrink-0",children:e}),g.jsx("span",{className:"min-w-0 flex-1 truncate font-mono select-all",children:t}),n&&g.jsx(aK,{text:t,label:e})]})}function lK(e,t){if(e.length===0||e.length===1&&e[0].path===t)return"browse";try{const n=localStorage.getItem(Jn.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 uK({open:e,onOpenChange:t}){const n=Dr(),[r,s]=Nm(),{recentCwds:o}=Gt(),[l,c]=E.useState(r||""),[f,d]=E.useState(!1),[m,p]=E.useState(()=>lK(o,r)),b=E.useCallback(()=>t(!1),[t]),{data:x,isLoading:S}=gi({queryKey:["directory",l,f],queryFn:()=>n.browseDirectory(l||void 0,f),placeholderData:R=>R,staleTime:3e4}),C=E.useCallback(()=>{x!=null&&x.path&&(s(x.path),b())},[x==null?void 0:x.path,s,b]),w=E.useCallback(R=>{p(R);try{localStorage.setItem(Jn.PICKER_VIEW,JSON.stringify({view:R,timestamp:new Date().toISOString()}))}catch{}},[]),A=E.useCallback(R=>{c(R),p("browse")},[]),N=E.useCallback(R=>{s(R),b()},[s,b]),k=(R,B)=>`p-1.5 transition-colors ${B==="left"?"rounded-l-md":"rounded-r-md"} ${R?"bg-accent text-foreground":"text-muted-foreground/40 hover:text-muted-foreground"}`;return g.jsx(fM,{open:e,onOpenChange:t,children:g.jsxs(dM,{className:"max-w-lg gap-0 overflow-hidden p-0 sm:rounded-xl",children:[g.jsx(hM,{className:"space-y-0 border-b px-4 py-3",children:g.jsx(mM,{className:"text-sm font-medium",children:"Select Working Directory"})}),g.jsxs("div",{className:"bg-muted/30 flex items-center gap-2 overflow-x-auto border-b px-4 py-2",children:[g.jsxs("div",{className:"flex flex-shrink-0 items-center rounded-md border",children:[o.length>0&&g.jsx("button",{onClick:()=>w("recent"),className:k(m==="recent","left"),"aria-label":"Recent directories",title:"Recent",children:g.jsx(UU,{className:"size-(--size-icon-sm)"})}),g.jsx("button",{onClick:()=>{w("browse"),A("")},className:k(m==="browse",o.length>0?"right":"left"),"aria-label":"Browse directories",title:"Browse",children:g.jsx(Uc,{className:"size-(--size-icon-sm)"})})]}),m==="browse"?g.jsxs(g.Fragment,{children:[g.jsx(cM,{path:(x==null?void 0:x.path)??null,maxSegments:5,onSegmentClick:A,size:"md"}),g.jsx("div",{className:"flex-1"}),g.jsx("button",{onClick:()=>d(!f),className:"hover:bg-accent flex-shrink-0 rounded p-1 transition-colors max-md:p-2","aria-label":f?"Hide hidden folders":"Show hidden folders",title:f?"Hide hidden folders":"Show hidden folders",children:f?g.jsx(XU,{className:"text-muted-foreground size-(--size-icon-sm)"}):g.jsx(KU,{className:"text-muted-foreground size-(--size-icon-sm)"})})]}):g.jsx("span",{className:"text-muted-foreground px-1 text-xs",children:"Recent"})]}),g.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:m==="browse"?g.jsx(g.Fragment,{children:S&&!x?g.jsx("div",{className:"flex h-20 items-center justify-center",children:g.jsx(lf,{className:"text-muted-foreground size-(--size-icon-md) animate-spin"})}):(x==null?void 0:x.entries.length)===0?g.jsx("div",{className:"flex h-20 items-center justify-center",children:g.jsx("p",{className:"text-muted-foreground/60 text-xs",children:"No subdirectories"})}):g.jsxs("div",{className:"py-1",children:[(x==null?void 0:x.parent)&&g.jsxs("button",{onClick:()=>A(x.parent),className:"hover:bg-accent flex w-full items-center gap-2 px-4 py-1.5 text-left transition-colors",children:[g.jsx(Uc,{className:"text-muted-foreground size-(--size-icon-md)"}),g.jsx("span",{className:"text-muted-foreground text-sm",children:".."})]}),x==null?void 0:x.entries.map(R=>g.jsxs("button",{onClick:()=>A(R.path),className:"hover:bg-accent flex w-full items-center gap-2 px-4 py-1.5 text-left transition-colors",children:[g.jsx(QN,{className:"text-muted-foreground size-(--size-icon-md)"}),g.jsx("span",{className:"truncate text-sm",children:R.name})]},R.path))]})}):g.jsx("div",{className:"py-1",children:o.slice(0,10).map(R=>g.jsxs("button",{onClick:()=>N(R.path),className:"hover:bg-accent flex w-full items-center gap-2 px-4 py-1.5 text-left transition-colors",children:[g.jsx(Uc,{className:"text-muted-foreground size-(--size-icon-md) flex-shrink-0"}),g.jsx("span",{className:"text-muted-foreground truncate text-sm",children:a9(R.path)}),g.jsx("span",{className:"text-muted-foreground/50 ml-auto flex-shrink-0 text-[11px]",children:tk(R.accessedAt)})]},R.path))})}),g.jsxs("div",{className:"bg-muted/20 flex items-center justify-end gap-2 border-t px-4 py-3",children:[g.jsx("button",{onClick:b,className:"hover:bg-accent rounded-md px-3 py-1.5 text-xs transition-colors",children:"Cancel"}),g.jsx("button",{onClick:C,disabled:!(x!=null&&x.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 cK({config:e,isLoading:t}){return g.jsxs("div",{className:"space-y-3",children:[g.jsx("h3",{className:"text-foreground text-sm font-semibold",children:"Server"}),t?g.jsx("div",{className:"space-y-2",children:Array.from({length:5}).map((n,r)=>g.jsxs("div",{className:"flex items-center justify-between py-1",children:[g.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),g.jsx("div",{className:"bg-muted h-4 w-16 animate-pulse rounded"})]},r))}):e?g.jsxs("div",{className:"space-y-1",children:[g.jsx(Qs,{label:"Version",value:e.version}),e.latestVersion&&fK(e.latestVersion,e.version)&&g.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:[g.jsx("div",{className:"flex items-center justify-between",children:g.jsxs("span",{className:"text-amber-800 dark:text-amber-200 text-sm font-medium",children:["Update available: v",e.latestVersion]})}),g.jsxs("p",{className:"text-amber-700 dark:text-amber-300 mt-0.5 text-xs",children:["Run"," ",g.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"]})]}),g.jsx(Qs,{label:"Port",value:String(e.port)}),g.jsx(Qs,{label:"Uptime",value:dK(e.uptime)}),g.jsx(Qs,{label:"Working Directory",value:e.workingDirectory,mono:!0,truncate:!0}),g.jsx(Qs,{label:"Node.js",value:e.nodeVersion}),g.jsx(Qs,{label:"Claude CLI",value:e.claudeCliPath||"Not found",mono:!0,truncate:!0,muted:!e.claudeCliPath}),g.jsx(N1,{label:"Tunnel",value:e.tunnel.enabled?"Enabled":"Disabled",variant:e.tunnel.enabled?"default":"secondary"}),e.tunnel.enabled&&g.jsxs(g.Fragment,{children:[g.jsx(N1,{label:"Tunnel Status",value:e.tunnel.connected?"Connected":"Disconnected",variant:e.tunnel.connected?"default":"secondary"}),e.tunnel.url&&g.jsx(Qs,{label:"Tunnel URL",value:e.tunnel.url,mono:!0}),g.jsx(Qs,{label:"Tunnel Auth",value:e.tunnel.authEnabled?"Enabled":"Disabled"}),g.jsx(N1,{label:"ngrok Token",value:e.tunnel.tokenConfigured?"Configured":"Not configured",variant:e.tunnel.tokenConfigured?"default":"secondary"})]})]}):null]})}function wM(){const[e,t]=E.useState(!1),n=E.useCallback(r=>{navigator.clipboard.writeText(r).then(()=>{t(!0),setTimeout(()=>t(!1),ys.COPY_FEEDBACK_MS)})},[]);return{copied:e,copy:n}}function Qs({label:e,value:t,mono:n,truncate:r,muted:s}){const{copied:o,copy:l}=wM();return g.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:[g.jsx("span",{className:"text-muted-foreground shrink-0 text-sm",children:e}),o?g.jsx("span",{className:"text-muted-foreground text-xs",children:"Copied"}):g.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 N1({label:e,value:t,variant:n}){const{copied:r,copy:s}=wM();return g.jsxs("button",{type:"button",onClick:()=>s(t),className:"hover:bg-muted/50 active:bg-muted/70 -mx-1 flex w-full items-center justify-between rounded px-1 py-1 transition-colors duration-100",children:[g.jsx("span",{className:"text-muted-foreground text-sm",children:e}),r?g.jsx("span",{className:"text-muted-foreground text-xs",children:"Copied"}):g.jsx(zH,{variant:n,children:t})]})}function fK(e,t){const[n,r,s]=e.split(".").map(Number),[o,l,c]=t.split(".").map(Number);return n!==o?n>o:r!==l?r>l:s>c}function dK(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(" ")}function hK({open:e,onOpenChange:t}){const{theme:n,setTheme:r}=rk(),[s,o]=E.useState("appearance"),{showTimestamps:l,setShowTimestamps:c,expandToolCalls:f,setExpandToolCalls:d,autoHideToolCalls:m,setAutoHideToolCalls:p,devtoolsOpen:b,toggleDevtools:x,verboseLogging:S,setVerboseLogging:C,fontSize:w,setFontSize:A,fontFamily:N,setFontFamily:k,resetPreferences:R,showStatusBarCwd:B,setShowStatusBarCwd:O,showStatusBarPermission:j,setShowStatusBarPermission:P,showStatusBarModel:q,setShowStatusBarModel:L,showStatusBarCost:X,setShowStatusBarCost:Q,showStatusBarContext:ee,setShowStatusBarContext:ne,showStatusBarGit:Z,setShowStatusBarGit:D,showShortcutChips:H,setShowShortcutChips:$,showTaskCelebrations:te,setShowTaskCelebrations:F,enableNotificationSound:V,setEnableNotificationSound:ie,showStatusBarSound:I,setShowStatusBarSound:de}=Gt(),xe=Dr(),{data:Te,isLoading:he}=gi({queryKey:["config"],queryFn:()=>xe.getConfig(),staleTime:3e4,enabled:e});return g.jsx(fM,{open:e,onOpenChange:t,children:g.jsxs(dM,{className:"max-w-lg gap-0 p-0",children:[g.jsx(hM,{className:"space-y-0 border-b px-4 py-3",children:g.jsx(mM,{className:"text-sm font-medium",children:"Settings"})}),g.jsxs(CM,{value:s,onValueChange:o,className:"flex flex-1 flex-col overflow-hidden",children:[g.jsxs(nE,{className:"mx-4 mt-3 grid w-full grid-cols-4",style:{width:"calc(100% - 2rem)"},children:[g.jsx(Il,{value:"appearance",children:"Appearance"}),g.jsx(Il,{value:"preferences",children:"Preferences"}),g.jsx(Il,{value:"statusBar",children:"Status Bar"}),g.jsx(Il,{value:"server",children:"Server"})]}),g.jsxs("div",{className:"min-h-[280px] flex-1 overflow-y-auto p-4",children:[g.jsx(Ll,{value:"appearance",className:"mt-0 space-y-6",children:g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h3",{className:"text-foreground text-sm font-semibold",children:"Appearance"}),g.jsx("button",{onClick:()=>{R(),r("system")},className:"text-muted-foreground hover:text-foreground text-xs transition-colors duration-150",children:"Reset to defaults"})]}),g.jsx(wn,{label:"Theme",description:"Choose your preferred color scheme",children:g.jsxs(_1,{value:n,onValueChange:r,children:[g.jsx(qh,{className:"w-32",children:g.jsx(k1,{})}),g.jsxs($h,{children:[g.jsx(ta,{value:"light",children:"Light"}),g.jsx(ta,{value:"dark",children:"Dark"}),g.jsx(ta,{value:"system",children:"System"})]})]})}),g.jsx(wn,{label:"Font family",description:"Choose the typeface for the interface",children:g.jsxs(_1,{value:N,onValueChange:Se=>k(Se),children:[g.jsx(qh,{className:"w-40",children:g.jsx(k1,{})}),g.jsx($h,{children:Zh.map(Se=>g.jsx(ta,{value:Se.key,children:g.jsxs("div",{className:"flex flex-col",children:[g.jsx("span",{children:Se.displayName}),g.jsx("span",{className:"text-muted-foreground text-xs",children:Se.description})]})},Se.key))})]})}),g.jsx(wn,{label:"Font size",description:"Adjust the text size across the interface",children:g.jsxs(_1,{value:w,onValueChange:Se=>A(Se),children:[g.jsx(qh,{className:"w-32",children:g.jsx(k1,{})}),g.jsxs($h,{children:[g.jsx(ta,{value:"small",children:"Small"}),g.jsx(ta,{value:"medium",children:"Medium"}),g.jsx(ta,{value:"large",children:"Large"})]})]})})]})}),g.jsx(Ll,{value:"preferences",className:"mt-0 space-y-6",children:g.jsxs("div",{className:"space-y-4",children:[g.jsx("h3",{className:"text-foreground text-sm font-semibold",children:"Preferences"}),g.jsx(wn,{label:"Show timestamps",description:"Display message timestamps in chat",children:g.jsx(Fn,{checked:l,onCheckedChange:c})}),g.jsx(wn,{label:"Expand tool calls",description:"Auto-expand tool call details in messages",children:g.jsx(Fn,{checked:f,onCheckedChange:d})}),g.jsx(wn,{label:"Auto-hide tool calls",description:"Fade out completed tool calls after a few seconds",children:g.jsx(Fn,{checked:m,onCheckedChange:p})}),g.jsx(wn,{label:"Show shortcut chips",description:"Display shortcut hints below the message input",children:g.jsx(Fn,{checked:H,onCheckedChange:$})}),g.jsx(wn,{label:"Task celebrations",description:"Show animations when tasks complete",children:g.jsx(Fn,{checked:te,onCheckedChange:F})}),g.jsx(wn,{label:"Notification sound",description:"Play a sound when AI finishes responding (3s+ responses)",children:g.jsx(Fn,{checked:V,onCheckedChange:ie})}),g.jsx(wn,{label:"Show dev tools",description:"Enable developer tools panel",children:g.jsx(Fn,{checked:b,onCheckedChange:()=>x()})}),g.jsx(wn,{label:"Verbose logging",description:"Show detailed logs in the console",children:g.jsx(Fn,{checked:S,onCheckedChange:C})})]})}),g.jsxs(Ll,{value:"statusBar",className:"mt-0 space-y-4",children:[g.jsx(wn,{label:"Show directory",description:"Display current working directory",children:g.jsx(Fn,{checked:B,onCheckedChange:O})}),g.jsx(wn,{label:"Show git status",description:"Display branch name and change count",children:g.jsx(Fn,{checked:Z,onCheckedChange:D})}),g.jsx(wn,{label:"Show permission mode",description:"Display current permission setting",children:g.jsx(Fn,{checked:j,onCheckedChange:P})}),g.jsx(wn,{label:"Show model",description:"Display selected AI model",children:g.jsx(Fn,{checked:q,onCheckedChange:L})}),g.jsx(wn,{label:"Show cost",description:"Display session cost in USD",children:g.jsx(Fn,{checked:X,onCheckedChange:Q})}),g.jsx(wn,{label:"Show context usage",description:"Display context window utilization",children:g.jsx(Fn,{checked:ee,onCheckedChange:ne})}),g.jsx(wn,{label:"Show sound toggle",description:"Display notification sound toggle",children:g.jsx(Fn,{checked:I,onCheckedChange:de})})]}),g.jsx(Ll,{value:"server",className:"mt-0",children:g.jsx(cK,{config:Te,isLoading:he})})]})]})]})})}function wn({label:e,description:t,children:n}){return g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx(uM,{className:"text-sm font-medium",children:e}),g.jsx("p",{className:"text-muted-foreground text-xs",children:t})]}),n]})}const R1=["light","dark","system"];function D1(){const e=Dr(),t=vf(),[n,r]=km(),{setSidebarOpen:s,devtoolsOpen:o,toggleDevtools:l}=Gt(),c=Ao(),[f,d]=E.useState(null),[m,p]=E.useState(!1),[b,x]=E.useState(!1),[S]=Nm(),{theme:C,setTheme:w}=rk(),A={light:OH,dark:pH,system:hH}[C],N=E.useCallback(()=>{const j=R1.indexOf(C);w(R1[(j+1)%R1.length])},[C,w]),{data:k=[]}=gi({queryKey:["sessions",S],queryFn:()=>e.listSessions(S??void 0),enabled:S!==null});E.useEffect(()=>{!n&&k.length>0&&r(k[0].id)},[n,k,r]);const R=wP({mutationFn:()=>e.createSession({permissionMode:"default",cwd:S??void 0}),onSuccess:j=>{t.invalidateQueries({queryKey:["sessions",S]}),r(j.id),d(j.id),setTimeout(()=>d(null),ys.NEW_SESSION_HIGHLIGHT_MS),c&&setTimeout(()=>s(!1),ys.SIDEBAR_AUTO_CLOSE_MS)}}),B=E.useCallback(j=>{r(j),c&&s(!1)},[c,r,s]),O=E.useMemo(()=>s9(k),[k]);return g.jsxs("div",{className:"sidebar-container flex h-full flex-col p-3",children:[g.jsxs("div",{className:"mb-3 space-y-1.5",children:[g.jsxs("div",{className:"flex items-center gap-1.5",children:[S&&g.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:S,children:[g.jsx(QN,{className:"text-muted-foreground size-(--size-icon-sm) flex-shrink-0"}),g.jsx(cM,{path:S,maxSegments:3,size:"sm"})]}),g.jsx("button",{onClick:()=>s(!1),className:"hover:bg-accent rounded-md p-2 transition-colors duration-150","aria-label":"Close sidebar",children:g.jsx(bH,{className:"text-muted-foreground size-(--size-icon-md)"})})]}),g.jsxs("button",{onClick:()=>R.mutate(),disabled:R.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:[g.jsx(EH,{className:"size-(--size-icon-sm)"}),"New chat"]})]}),g.jsx("div",{className:"-mx-1 flex-1 overflow-y-auto px-1",children:O.length>0?g.jsx("div",{className:"space-y-5",children:O.map(j=>{const P=O.length===1&&j.label==="Today";return g.jsxs("div",{children:[!P&&g.jsx("h3",{className:"text-2xs text-muted-foreground/70 mb-1.5 px-3 font-medium tracking-wider uppercase",children:j.label}),g.jsx("div",{className:"space-y-0.5",children:j.sessions.map(q=>g.jsx(oK,{session:q,isActive:q.id===n,isNew:q.id===f,onClick:()=>B(q.id)},q.id))})]},j.label)})}):g.jsx("div",{className:"flex h-32 items-center justify-center",children:g.jsx("p",{className:"text-muted-foreground/60 text-sm",children:"No conversations yet"})})}),g.jsxs("div",{className:"border-border mt-2 flex items-center border-t pt-2",children:[g.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"}),g.jsxs("div",{className:"ml-auto flex items-center gap-0.5",children:[g.jsx("button",{onClick:()=>x(!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:g.jsx(CH,{className:"size-(--size-icon-sm)"})}),g.jsxs(pA,{openDelay:200,closeDelay:100,children:[g.jsx(gA,{asChild:!0,children:g.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:g.jsx(vH,{className:"size-(--size-icon-sm)"})})}),g.jsx(bA,{side:"top",align:"center",className:"w-auto px-3 py-1.5 text-xs",children:"Relay not connected"})]}),g.jsxs(pA,{openDelay:200,closeDelay:100,children:[g.jsx(gA,{asChild:!0,children:g.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":"Heartbeat status",children:g.jsx(sH,{className:"size-(--size-icon-sm)"})})}),g.jsx(bA,{side:"top",align:"center",className:"w-auto px-3 py-1.5 text-xs",children:"Pulse not detected"})]}),g.jsx("button",{onClick:N,className:"text-muted-foreground/50 hover:text-muted-foreground rounded-md p-1 transition-colors duration-150 max-md:p-2",title:`Theme: ${C}`,"aria-label":`Theme: ${C}. Click to cycle.`,children:g.jsx(A,{className:"size-(--size-icon-sm)"})}),!1]})]}),g.jsx(uK,{open:m,onOpenChange:p}),g.jsx(hK,{open:b,onOpenChange:x})]})}function AM(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(`
361
- `),toolCalls:n}}function mK(e){const{currentPartsRef:t,assistantCreatedRef:n,sessionStatusRef:r,streamStartTimeRef:s,estimatedTokensRef:o,textStreamingTimerRef:l,isTextStreamingRef:c,setMessages:f,setError:d,setStatus:m,setSessionStatus:p,setEstimatedTokens:b,setStreamStartTime:x,setIsTextStreaming:S,sessionId:C,options:w}=e;function A(R){for(let B=t.current.length-1;B>=0;B--){const O=t.current[B];if(O.type==="tool_call"&&O.toolCallId===R)return O}}function N(R){n.current||(n.current=!0,f(B=>[...B,{id:R,role:"assistant",content:"",toolCalls:[],parts:[],timestamp:new Date().toISOString()}]))}function k(R){N(R);const B=t.current.map(j=>({...j})),O=AM(B);f(j=>j.map(P=>P.id===R?{...P,content:O.content,toolCalls:O.toolCalls.length>0?O.toolCalls:[],parts:B}:P))}return function(B,O,j){var P,q,L,X,Q,ee,ne;switch(B){case"text_delta":{const{text:Z}=O,D=t.current,H=D[D.length-1];H&&H.type==="text"?H.text+=Z:D.push({type:"text",text:Z}),o.current+=Z.length/4,b(o.current),c.current||(c.current=!0,S(!0)),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{c.current=!1,S(!1)},500),k(j);break}case"tool_call_start":{const Z=O;t.current.push({type:"tool_call",toolCallId:Z.toolCallId,toolName:Z.toolName,input:"",status:"running"}),k(j);break}case"tool_call_delta":{const Z=O,D=A(Z.toolCallId);D&&Z.input&&(D.input=(D.input||"")+Z.input),k(j);break}case"tool_call_end":{const D=A(O.toolCallId);D&&(D.status="complete"),k(j);break}case"tool_result":{const Z=O,D=A(Z.toolCallId);D&&(D.result=Z.result,D.status="complete",D.interactiveType==="question"&&!D.answers&&(D.answers={})),k(j);break}case"approval_required":{const Z=O,D=A(Z.toolCallId);D?(D.interactiveType="approval",D.input=Z.input,D.status="pending"):t.current.push({type:"tool_call",toolCallId:Z.toolCallId,toolName:Z.toolName,input:Z.input,status:"pending",interactiveType:"approval"}),k(j);break}case"question_prompt":{const Z=O,D=A(Z.toolCallId);D?(D.interactiveType="question",D.questions=Z.questions,D.status="pending"):t.current.push({type:"tool_call",toolCallId:Z.toolCallId,toolName:"AskUserQuestion",input:"",status:"pending",interactiveType:"question",questions:Z.questions}),k(j);break}case"error":{const{message:Z}=O;d(Z),m("error");break}case"session_status":{const Z=O,D={...r.current,...Z,model:Z.model??((P=r.current)==null?void 0:P.model),costUsd:Z.costUsd??((q=r.current)==null?void 0:q.costUsd),contextTokens:Z.contextTokens??((L=r.current)==null?void 0:L.contextTokens),contextMaxTokens:Z.contextMaxTokens??((X=r.current)==null?void 0:X.contextMaxTokens)};r.current=D,p(D);break}case"task_update":{const Z=O;(Q=w.onTaskEvent)==null||Q.call(w,Z);break}case"done":{const Z=O;Z.sessionId&&Z.sessionId!==C&&((ee=w.onSessionIdChange)==null||ee.call(w,Z.sessionId)),s.current&&Date.now()-s.current>=ys.MIN_STREAM_DURATION_MS&&((ne=w.onStreamingDone)==null||ne.call(w)),s.current=null,o.current=0,x(null),b(0),l.current&&clearTimeout(l.current),c.current=!1,S(!1),m("idle");break}}}}function EA(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=AM(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 pK(e,t={}){const n=Dr(),r=vf(),s=Gt(_e=>_e.selectedCwd),[o,l]=E.useState([]),[c,f]=E.useState(""),[d,m]=E.useState("idle"),[p,b]=E.useState(null),[x,S]=E.useState(!1),C=E.useRef(null),[w,A]=E.useState(null),N=E.useRef(null),k=E.useRef([]),R=E.useRef(""),B=E.useRef(!1),O=E.useRef(!1),j=E.useRef(null),P=E.useRef(0),[q,L]=E.useState(null),[X,Q]=E.useState(0),ee=E.useRef(null),ne=E.useRef(!1),[Z,D]=E.useState(!1),H=E.useRef(null),$=E.useRef(s),[te,F]=E.useState(!document.hidden),V=E.useRef(o);E.useEffect(()=>{V.current=o},[o]),E.useEffect(()=>{$.current=s},[s]),E.useEffect(()=>{const _e=()=>{F(!document.hidden)};return document.addEventListener("visibilitychange",_e),()=>{document.removeEventListener("visibilitychange",_e)}},[]);const ie=d==="streaming",I=gi({queryKey:["messages",e,s],queryFn:()=>n.getMessages(e,s??void 0),staleTime:fi.MESSAGE_STALE_TIME_MS,refetchOnWindowFocus:!1,refetchInterval:()=>ie?!1:te?fi.ACTIVE_TAB_REFETCH_MS:fi.BACKGROUND_TAB_REFETCH_MS});E.useEffect(()=>{O.current=!1,l([])},[e,s]),E.useEffect(()=>{if(!I.data)return;const _e=I.data.messages;if(!O.current&&_e.length>0){O.current=!0,l(_e.map(EA));return}if(O.current&&!ie){const je=V.current,wt=_e.slice(je.length);wt.length>0&&l(Re=>[...Re,...wt.map(EA)])}},[I.data,ie]),E.useEffect(()=>{if(!e||ie)return;const _e=`/api/sessions/${e}/stream`,je=new EventSource(_e);return je.addEventListener("sync_update",()=>{r.invalidateQueries({queryKey:["messages",e,$.current]}),r.invalidateQueries({queryKey:["tasks",e,$.current]})}),je.addEventListener("sync_connected",()=>{}),()=>{je.close()}},[e,ie,r]),E.useEffect(()=>()=>{H.current&&clearTimeout(H.current)},[]);const de=E.useCallback(async()=>{if(!c.trim()||d==="streaming")return;const _e=c.trim(),je={id:crypto.randomUUID(),role:"user",content:_e,parts:[{type:"text",text:_e}],timestamp:new Date().toISOString()};l(Lt=>[...Lt,je]),f(""),m("streaming"),b(null),k.current=[];const wt=Date.now();j.current=wt,P.current=0,L(wt),Q(0),R.current=crypto.randomUUID(),B.current=!1;const Re=new AbortController;N.current=Re;const tn=mK({currentPartsRef:k,assistantCreatedRef:B,sessionStatusRef:C,streamStartTimeRef:j,estimatedTokensRef:P,textStreamingTimerRef:ee,isTextStreamingRef:ne,setMessages:l,setError:b,setStatus:m,setSessionStatus:A,setEstimatedTokens:Q,setStreamStartTime:L,setIsTextStreaming:D,sessionId:e,options:t});try{const Lt=t.transformContent?await t.transformContent(je.content):je.content;await n.sendMessage(e,Lt,nn=>tn(nn.type,nn.data,R.current),Re.signal,s??void 0),m("idle")}catch(Lt){Lt.name!=="AbortError"&&(Lt.code==="SESSION_LOCKED"?(S(!0),f(je.content),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{S(!1),H.current=null},ys.SESSION_BUSY_CLEAR_MS)):b(Lt.message),m("error")),ee.current&&clearTimeout(ee.current),ne.current=!1,D(!1)}},[c,d,e]),xe=E.useCallback(()=>{var _e;(_e=N.current)==null||_e.abort(),ee.current&&clearTimeout(ee.current),ne.current=!1,D(!1),m("idle")},[]),Te=I.isLoading,Se=E.useMemo(()=>o.flatMap(_e=>_e.toolCalls||[]).filter(_e=>_e.interactiveType&&_e.status==="pending"),[o])[0]||null,Ce=Se!==null,Pe=(Se==null?void 0:Se.interactiveType)||null;return{messages:o,input:c,setInput:f,handleSubmit:de,status:d,error:p,sessionBusy:x,stop:xe,isLoadingHistory:Te,sessionStatus:w,streamStartTime:q,estimatedTokens:X,isTextStreaming:Z,isWaitingForUser:Ce,waitingType:Pe,activeInteraction:Se}}function gK(e){const t=Dr();return gi({queryKey:["commands",{cwd:e??null}],queryFn:()=>t.getCommands(!1,e??void 0),staleTime:fi.COMMANDS_STALE_TIME_MS,gcTime:fi.COMMANDS_GC_TIME_MS})}const TA={in_progress:0,pending:1,completed:2};function bK(e){return[...e].sort((t,n)=>TA[t.status]-TA[n.status])}function yK(e){const t={};for(const[n,r]of Object.entries(e))r!==void 0&&r!==""&&(t[n]=r);return t}const xK=10;function EK(e){const t=Dr(),n=Gt(C=>C.selectedCwd),[r,s]=E.useState(new Map),[o,l]=E.useState(!1),c=E.useRef(1),{data:f}=gi({queryKey:["tasks",e,n],queryFn:()=>t.getTasks(e,n??void 0),staleTime:3e4,refetchOnWindowFocus:!1});E.useEffect(()=>{if(s(new Map),c.current=1,f&&f.tasks.length>0){const C=new Map;for(const w of f.tasks)C.set(w.id,w);s(C),c.current=f.tasks.length+1}},[f]);const d=E.useCallback(C=>{s(w=>{const A=new Map(w);if(C.action==="create"){const N=String(c.current++);A.set(N,{...C.task,id:N})}else if(C.action==="update"&&C.task.id){const N=A.get(C.task.id);N&&A.set(C.task.id,{...N,...yK(C.task)})}return A})},[]),m=E.useCallback(()=>{l(C=>!C)},[]),p=Array.from(r.values()),b=bK(p),x=p.find(C=>C.status==="in_progress"),S=(x==null?void 0:x.activeForm)??null;return{tasks:b.slice(0,xK),activeForm:S,isCollapsed:o,toggleCollapse:m,handleTaskEvent:d}}function TK({commands:e,input:t,cursorPos:n}){const[r,s]=E.useState(!1),[o,l]=E.useState(""),[c,f]=E.useState(0),[d,m]=E.useState(-1),p=E.useMemo(()=>o?e.map(N=>{const k=`${N.fullCommand} ${N.description}`,R=W3(o,k);return{cmd:N,...R}}).filter(N=>N.match).sort((N,k)=>k.score-N.score).map(N=>N.cmd):e,[e,o]);E.useEffect(()=>{f(0)},[o,r]),E.useEffect(()=>{p.length>0&&c>=p.length&&f(p.length-1)},[p.length,c]);const b=E.useCallback((N,k)=>{const B=N.slice(0,k).match(/(^|\s)\/([\w:-]*)$/);return B?(s(!0),l(B[2]),m((B.index??0)+B[1].length),!0):(s(!1),!1)},[]),x=E.useCallback(N=>{const k=t.slice(0,d);return s(!1),k+N.fullCommand+" "},[t,d]),S=E.useCallback(()=>{f(N=>p.length===0?0:(N+1)%p.length)},[p.length]),C=E.useCallback(()=>{f(N=>p.length===0?0:(N-1+p.length)%p.length)},[p.length]),w=E.useCallback(()=>p.length>0&&c<p.length?x(p[c]):(s(!1),null),[p,c,x]),A=E.useCallback(()=>{s(!1),l("")},[]);return{showCommands:r,setShowCommands:s,commandQuery:o,selectedIndex:c,filteredCommands:p,slashTriggerPos:d,detectCommandTrigger:b,handleCommandSelect:x,handleArrowUp:C,handleArrowDown:S,handleKeyboardSelect:w,resetCommand:A}}function vK({fileEntries:e,input:t,cursorPos:n}){const[r,s]=E.useState(!1),[o,l]=E.useState(""),[c,f]=E.useState(0),[d,m]=E.useState(-1),p=E.useMemo(()=>r?o?e.map(N=>({...N,...W3(o,N.path)})).filter(N=>N.match).sort((N,k)=>k.score-N.score).slice(0,50):e.slice(0,50).map(N=>({...N,indices:[]})):[],[e,o,r]);E.useEffect(()=>{f(0)},[o,r]),E.useEffect(()=>{p.length>0&&c>=p.length&&f(p.length-1)},[p.length,c]);const b=E.useCallback((N,k)=>{const B=N.slice(0,k).match(/(^|\s)@([\w./:-]*)$/);return B?(s(!0),l(B[2]),m((B.index??0)+B[1].length),!0):(s(!1),!1)},[]),x=E.useCallback(N=>{const k=t.slice(0,d),R=t.slice(d+1+o.length);if(N.isDirectory){const O=k+"@"+N.path+R,j=k.length+1+N.path.length;return l(N.path),f(0),{newValue:O,newCursorPos:j,keepOpen:!0}}const B=k+"@"+N.path+" "+R;return s(!1),{newValue:B,keepOpen:!1}},[t,d,o]),S=E.useCallback(()=>{f(N=>p.length===0?0:(N+1)%p.length)},[p.length]),C=E.useCallback(()=>{f(N=>p.length===0?0:(N-1+p.length)%p.length)},[p.length]),w=E.useCallback(()=>p.length>0&&c<p.length?x(p[c]):(s(!1),null),[p,c,x]),A=E.useCallback(()=>{s(!1),l("")},[]);return{showFiles:r,setShowFiles:s,fileQuery:o,fileSelectedIndex:c,filteredFiles:p,fileTriggerPos:d,detectFileTrigger:b,handleFileSelect:x,handleArrowUp:C,handleArrowDown:S,handleKeyboardSelect:w,resetFiles:A}}function Cl(e,t,n){let r=n.initialDeps??[],s,o=!0;function l(){var c,f,d;let m;n.key&&((c=n.debug)!=null&&c.call(n))&&(m=Date.now());const p=e();if(!(p.length!==r.length||p.some((S,C)=>r[C]!==S)))return s;r=p;let x;if(n.key&&((f=n.debug)!=null&&f.call(n))&&(x=Date.now()),s=t(...p),n.key&&((d=n.debug)!=null&&d.call(n))){const S=Math.round((Date.now()-m)*100)/100,C=Math.round((Date.now()-x)*100)/100,w=C/16,A=(N,k)=>{for(N=String(N);N.length<k;)N=" "+N;return N};console.info(`%c⏱ ${A(C,5)} /${A(S,5)} ms`,`
362
- font-size: .6rem;
363
- font-weight: bold;
364
- color: hsl(${Math.max(0,Math.min(120-120*w,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=c=>{r=c},l}function vA(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const SK=(e,t)=>Math.abs(e-t)<1.01,CK=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},SA=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},wK=e=>e,AK=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},_K=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:f}=l;t({width:Math.round(c),height:Math.round(f)})};if(s(SA(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(l=>{const c=()=>{const f=l[0];if(f!=null&&f.borderBoxSize){const d=f.borderBoxSize[0];if(d){s({width:d.inlineSize,height:d.blockSize});return}}s(SA(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},CA={passive:!0},wA=typeof window>"u"?!0:"onscrollend"in window,kK=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const o=e.options.useScrollendEvent&&wA?()=>{}:CK(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=m=>()=>{const{horizontal:p,isRtl:b}=e.options;s=p?n.scrollLeft*(b&&-1||1):n.scrollTop,o(),t(s,m)},c=l(!0),f=l(!1);n.addEventListener("scroll",c,CA);const d=e.options.useScrollendEvent&&wA;return d&&n.addEventListener("scrollend",f,CA),()=>{n.removeEventListener("scroll",c),d&&n.removeEventListener("scrollend",f)}},NK=(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"]},RK=(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 DK{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:wK,rangeExtractor:AK,onChange:()=>{},measureElement:NK,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=Cl(()=>(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 c=n[l];if(s.has(c.lane))continue;const f=o.get(c.lane);if(f==null||c.end>f.end?o.set(c.lane,c):c.end<f.end&&s.set(c.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=Cl(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,o,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:l,lanes:c}),{key:!1}),this.getMeasurements=Cl(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:l,lanes:c},f)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);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(b=>{this.itemSizeCache.set(b.key,b.size)}));const d=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,d),p=new Array(c).fill(void 0);for(let b=0;b<d;b++){const x=m[b];x&&(p[x.lane]=b)}for(let b=d;b<n;b++){const x=o(b),S=this.laneAssignments.get(b);let C,w;if(S!==void 0&&this.options.lanes>1){C=S;const R=p[C],B=R!==void 0?m[R]:void 0;w=B?B.end+this.options.gap:r+s}else{const R=this.options.lanes===1?m[b-1]:this.getFurthestMeasurement(m,b);w=R?R.end+this.options.gap:r+s,C=R?R.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,C)}const A=f.get(x),N=typeof A=="number"?A:this.options.estimateSize(b),k=w+N;m[b]={index:b,start:w,size:N,end:k,key:x,lane:C},p[C]=b}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Cl(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,o)=>this.range=n.length>0&&r>0?OK({measurements:n,outerSize:r,scrollOffset:s,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Cl(()=>{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,c=this.elementsCache.get(l);c!==n&&(c&&this.observer.unobserve(c),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=Cl(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let o=0,l=n.length;o<l;o++){const c=n[o],f=r[c];s.push(f)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return vA(r[_M(0,r.length-1,s=>vA(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 c=this.getMaxScrollOffset();return Math.max(Math.min(c,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 c=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,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,c=d=>{if(!this.targetWindow)return;const m=this.getOffsetForIndex(n,d);if(!m){console.warn("Failed to get offset for index:",n);return}const[p,b]=m;this._scrollToOffset(p,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const x=()=>{if(this.currentScrollToIndex!==n)return;const S=this.getScrollOffset(),C=this.getOffsetForIndex(n,b);if(!C){console.warn("Failed to get offset for index:",n);return}SK(C[0],S)||f(b)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(x):x()})},f=d=>{this.targetWindow&&this.currentScrollToIndex===n&&(o++,o<l?this.targetWindow.requestAnimationFrame(()=>c(d)):console.warn(`Failed to scroll to index ${n} after ${l} attempts.`))};c(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(c=>c===null);){const c=r[l];o[c.lane]===null&&(o[c.lane]=c.end),l--}s=Math.max(...o.filter(c=>c!==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 _M=(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 OK({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,o=f=>e[f].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=_M(0,s,o,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const f=Array(r).fill(0);for(;c<s&&f.some(m=>m<n+t);){const m=e[c];f[m.lane]=m.end,c++}const d=Array(r).fill(n+t);for(;l>=0&&d.some(m=>m>=n);){const m=e[l];d[m.lane]=m.start,l--}l=Math.max(0,l-l%r),c=Math.min(s,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}const AA=typeof document<"u"?E.useLayoutEffect:E.useEffect;function MK({useFlushSync:e=!0,...t}){const n=E.useReducer(()=>({}),{})[1],r={...t,onChange:(o,l)=>{var c;e&&l?_o.flushSync(n):n(),(c=t.onChange)==null||c.call(t,o,l)}},[s]=E.useState(()=>new DK(r));return s.setOptions(r),AA(()=>s._didMount(),[]),AA(()=>s._willUpdate()),s}function IK(e){return MK({observeElementRect:_K,observeElementOffset:kK,scrollToFn:RK,...e})}const ip=(function(e){if(e==null)return BK;if(typeof e=="function")return sp(e);if(typeof e=="object")return Array.isArray(e)?LK(e):PK(e);if(typeof e=="string")return jK(e);throw new Error("Expected function, string, or object as test")});function LK(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ip(e[n]);return sp(r);function r(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function PK(e){const t=e;return sp(n);function n(r){const s=r;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function jK(e){return sp(t);function t(n){return n&&n.type===e}}function sp(e){return t;function t(n,r,s){return!!(FK(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function BK(){return!0}function FK(e){return e!==null&&typeof e=="object"&&"type"in e}const kM=[],Oc=!0,ay=!1,oy="skip";function NM(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const o=ip(s),l=r?-1:1;c(e,void 0,[])();function c(f,d,m){const p=f&&typeof f=="object"?f:{};if(typeof p.type=="string"){const x=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(f.type+(x?"<"+x+">":""))+")"})}return b;function b(){let x=kM,S,C,w;if((!t||o(f,d,m[m.length-1]||void 0))&&(x=UK(n(f,m)),x[0]===ay))return x;if("children"in f&&f.children){const A=f;if(A.children&&x[0]!==oy)for(C=(r?A.children.length:-1)+l,w=m.concat(A);C>-1&&C<A.children.length;){const N=A.children[C];if(S=c(N,C,w)(),S[0]===ay)return S;C=typeof S[1]=="number"?S[1]:C+l}}return x}}}function UK(e){return Array.isArray(e)?e:typeof e=="number"?[Oc,e]:e==null?kM:[e]}function ru(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),NM(e,o,c,s);function c(f,d){const m=d[d.length-1],p=m?m.children.indexOf(f):void 0;return l(f,p,m)}}function HK({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 c=t.length&&!t.every(d=>d==="*"),f=n.length&&!n.every(d=>d==="*");if(!e&&(c||f))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const m=$K(e,t,n,r,s,o,l);ru(d,m)}}function _A(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 zK(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const VK=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),qK=new Set(["javascript:","data:","file:","vbscript:"]);function kA(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=_A(e,n);if(!l||qK.has(l.protocol)||!(VK.has(l.protocol)||o.includes(l.protocol)||o.includes("*")))return null;if(l.protocol==="mailto:"||!l.protocol.match(/^https?:$/))return l.href;const f=zK(e);return l&&t.some(d=>{const m=_A(d,n);return!m||m.origin!==l.origin?!1:l.href.startsWith(m.href)})?f?l.pathname+l.search+l.hash:l.href:t.includes("*")?l.protocol!=="https:"&&l.protocol!=="http:"?null:f?l.pathname+l.search+l.hash:l.href:null}const O1=Symbol("node-seen"),$K=(e,t,n,r,s,o,l)=>{const c=(f,d,m)=>{if(f.type!=="element"||f[O1])return Oc;if(f.tagName==="a"){const p=kA(f.properties.href,t,e,!1,!1,s);return p===null?(f[O1]=!0,ru(f,c),m&&typeof d=="number"&&(m.children[d]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(f.properties.href),class:l},children:[...f.children,{type:"text",value:" [blocked]"}]}),oy):(f.properties.href=p,f.properties.target="_blank",f.properties.rel="noopener noreferrer",Oc)}if(f.tagName==="img"){const p=kA(f.properties.src,n,e,r,!0,s);return p===null?(f[O1]=!0,ru(f,c),m&&typeof d=="number"&&(m.children[d]={type:"element",tagName:"span",properties:{class:o},children:[{type:"text",value:"[Image blocked: "+String(f.properties.alt||"No description")+"]"}]}),oy):(f.properties.src=p,Oc)}return Oc};return c},RM=-1,ap=0,Hc=1,ym=2,rE=3,iE=4,sE=5,aE=6,DM=7,OM=8,NA=typeof self=="object"?self:globalThis,YK=(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 ap:case RM:return n(l,s);case Hc:{const c=n([],s);for(const f of l)c.push(r(f));return c}case ym:{const c=n({},s);for(const[f,d]of l)c[r(f)]=r(d);return c}case rE:return n(new Date(l),s);case iE:{const{source:c,flags:f}=l;return n(new RegExp(c,f),s)}case sE:{const c=n(new Map,s);for(const[f,d]of l)c.set(r(f),r(d));return c}case aE:{const c=n(new Set,s);for(const f of l)c.add(r(f));return c}case DM:{const{name:c,message:f}=l;return n(new NA[c](f),s)}case OM: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:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new NA[o](l),s)};return r},RA=e=>YK(new Map,e)(0),wl="",{toString:GK}={},{keys:KK}=Object,xc=e=>{const t=typeof e;if(t!=="object"||!e)return[ap,t];const n=GK.call(e).slice(8,-1);switch(n){case"Array":return[Hc,wl];case"Object":return[ym,wl];case"Date":return[rE,wl];case"RegExp":return[iE,wl];case"Map":return[sE,wl];case"Set":return[aE,wl];case"DataView":return[Hc,n]}return n.includes("Array")?[Hc,n]:n.includes("Error")?[DM,n]:[ym,n]},Ch=([e,t])=>e===ap&&(t==="function"||t==="symbol"),QK=(e,t,n,r)=>{const s=(l,c)=>{const f=r.push(l)-1;return n.set(c,f),f},o=l=>{if(n.has(l))return n.get(l);let[c,f]=xc(l);switch(c){case ap:{let m=l;switch(f){case"bigint":c=OM,m=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);m=null;break;case"undefined":return s([RM],l)}return s([c,m],l)}case Hc:{if(f){let b=l;return f==="DataView"?b=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(l)),s([f,[...b]],l)}const m=[],p=s([c,m],l);for(const b of l)m.push(o(b));return p}case ym:{if(f)switch(f){case"BigInt":return s([f,l.toString()],l);case"Boolean":case"Number":case"String":return s([f,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const m=[],p=s([c,m],l);for(const b of KK(l))(e||!Ch(xc(l[b])))&&m.push([o(b),o(l[b])]);return p}case rE:return s([c,l.toISOString()],l);case iE:{const{source:m,flags:p}=l;return s([c,{source:m,flags:p}],l)}case sE:{const m=[],p=s([c,m],l);for(const[b,x]of l)(e||!(Ch(xc(b))||Ch(xc(x))))&&m.push([o(b),o(x)]);return p}case aE:{const m=[],p=s([c,m],l);for(const b of l)(e||!Ch(xc(b)))&&m.push(o(b));return p}}const{message:d}=l;return s([c,{name:f,message:d}],l)};return o},DA=(e,{json:t,lossy:n}={})=>{const r=[];return QK(!(t||n),!!t,new Map,r)(e),r},So=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?RA(DA(e,t)):structuredClone(e):(e,t)=>RA(DA(e,t));class jf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}jf.prototype.normal={};jf.prototype.property={};jf.prototype.space=void 0;function MM(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new jf(n,r,t)}function df(e){return e.toLowerCase()}class yr{constructor(t,n){this.attribute=n,this.property=t}}yr.prototype.attribute="";yr.prototype.booleanish=!1;yr.prototype.boolean=!1;yr.prototype.commaOrSpaceSeparated=!1;yr.prototype.commaSeparated=!1;yr.prototype.defined=!1;yr.prototype.mustUseProperty=!1;yr.prototype.number=!1;yr.prototype.overloadedBoolean=!1;yr.prototype.property="";yr.prototype.spaceSeparated=!1;yr.prototype.space=void 0;let XK=0;const et=Do(),dn=Do(),ly=Do(),Ee=Do(),Bt=Do(),Ul=Do(),Ar=Do();function Do(){return 2**++XK}const uy=Object.freeze(Object.defineProperty({__proto__:null,boolean:et,booleanish:dn,commaOrSpaceSeparated:Ar,commaSeparated:Ul,number:Ee,overloadedBoolean:ly,spaceSeparated:Bt},Symbol.toStringTag,{value:"Module"})),M1=Object.keys(uy);class oE extends yr{constructor(t,n,r,s){let o=-1;if(super(t,n),OA(this,"space",s),typeof r=="number")for(;++o<M1.length;){const l=M1[o];OA(this,M1[o],(r&uy[l])===uy[l])}}}oE.prototype.defined=!0;function OA(e,t,n){n&&(e[t]=n)}function bu(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const o=new oE(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[df(r)]=r,n[df(o.attribute)]=r}return new jf(t,n,e.space)}const IM=bu({properties:{ariaActiveDescendant:null,ariaAtomic:dn,ariaAutoComplete:null,ariaBusy:dn,ariaChecked:dn,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:Bt,ariaCurrent:null,ariaDescribedBy:Bt,ariaDetails:null,ariaDisabled:dn,ariaDropEffect:Bt,ariaErrorMessage:null,ariaExpanded:dn,ariaFlowTo:Bt,ariaGrabbed:dn,ariaHasPopup:null,ariaHidden:dn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Bt,ariaLevel:Ee,ariaLive:null,ariaModal:dn,ariaMultiLine:dn,ariaMultiSelectable:dn,ariaOrientation:null,ariaOwns:Bt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:dn,ariaReadOnly:dn,ariaRelevant:null,ariaRequired:dn,ariaRoleDescription:Bt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:dn,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function LM(e,t){return t in e?e[t]:t}function PM(e,t){return LM(e,t.toLowerCase())}const WK=bu({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ul,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:Ee,colSpan:null,content:null,contentEditable:dn,controls:et,controlsList:Bt,coords:Ee|Ul,crossOrigin:null,data:null,dateTime:null,decoding:null,default:et,defer:et,dir:null,dirName:null,disabled:et,download:ly,draggable:dn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:et,formTarget:null,headers:Bt,height:Ee,hidden:ly,high:Ee,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:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,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:Ee,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:Ee,rowSpan:Ee,sandbox:Bt,scope:null,scoped:et,seamless:et,selected:et,shadowRootClonable:et,shadowRootDelegatesFocus:et,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:dn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:et,useMap:null,value:dn,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Bt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,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:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:et,noHref:et,noShade:et,noWrap:et,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:dn,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:et,disableRemotePlayback:et,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:PM}),ZK=bu({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:Ar,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:et,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,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:Ul,g2:Ul,glyphName:Ul,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:Ar,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,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:Ee,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:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ar,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ar,rev:Ar,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ar,requiredFeatures:Ar,requiredFonts:Ar,requiredFormats:Ar,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:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:Ar,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ar,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ar,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:LM}),jM=bu({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()}}),BM=bu({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:PM}),FM=bu({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),JK={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"},eQ=/[A-Z]/g,MA=/-[a-z]/g,tQ=/^data[-\w.:]+$/i;function op(e,t){const n=df(t);let r=t,s=yr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&tQ.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(MA,rQ);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!MA.test(o)){let l=o.replace(eQ,nQ);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=oE}return new s(r,t)}function nQ(e){return"-"+e.toLowerCase()}function rQ(e){return e.charAt(1).toUpperCase()}const Bf=MM([IM,WK,jM,BM,FM],"html"),_a=MM([IM,ZK,jM,BM,FM],"svg");function IA(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 UM(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const LA=/[#.]/g;function iQ(e,t){const n=e||"",r={};let s=0,o,l;for(;s<n.length;){LA.lastIndex=s;const c=LA.exec(n),f=n.slice(s,c?c.index:n.length);f&&(o?o==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:l=f,s+=f.length),c&&(o=c[0],s++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function PA(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function HM(e){return e.join(" ").trim()}function zM(e,t,n){const r=n?lQ(n):void 0;function s(o,l,...c){let f;if(o==null){f={type:"root",children:[]};const d=l;c.unshift(d)}else{f=iQ(o,t);const d=f.tagName.toLowerCase(),m=r?r.get(d):void 0;if(f.tagName=m||d,sQ(l))c.unshift(l);else for(const[p,b]of Object.entries(l))aQ(e,f.properties,p,b)}for(const d of c)cy(f.children,d);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return s}function sQ(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 aQ(e,t,n,r){const s=op(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=PA(r):s.commaSeparated?o=IA(r):s.commaOrSpaceSeparated?o=PA(IA(r).join(" ")):o=jA(s,s.property,r):Array.isArray(r)?o=[...r]:o=s.property==="style"?oQ(r):String(r);if(Array.isArray(o)){const l=[];for(const c of o)l.push(jA(s,s.property,c));o=l}s.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[s.property]=o}}function cy(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)cy(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?cy(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function jA(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||df(n)===df(t)))return!0}return n}function oQ(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function lQ(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const uQ=["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=zM(Bf,"div"),fQ=zM(_a,"g",uQ);function dQ(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 c=n[l];if(c===void 0){const f=BA(t,n[l-1]);c=f===-1?t.length+1:f+1,n[l]=c}if(c>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 c=n[n.length-1],f=BA(t,c),d=f===-1?t.length+1:f+1;if(c===d)break;n.push(d)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function BA(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
365
- `,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/"},VM={}.hasOwnProperty,hQ=Object.prototype;function mQ(e,t){const n=t||{};return lE({file:n.file||void 0,location:!1,schema:n.space==="svg"?_a:Bf,verbose:n.verbose||!1},e)}function lE(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Yh(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:qM(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const o=String(e.file),l=dQ(o),c=l.toPoint(0),f=l.toPoint(o.length);n.position={start:c,end:f}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Yh(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Yh(e,r,n),n}default:return n=pQ(e,t),n}}function qM(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=lE(e,t[n]);r.push(s)}return r}function pQ(e,t){const n=e.schema;e.schema=t.namespaceURI===ro.svg?_a:Bf;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],f=(c.prefix?c.prefix+":":"")+c.name;VM.call(hQ,f)||(s[f]=c.value)}const l=(e.schema.space==="svg"?fQ:cQ)(t.tagName,s,qM(e,t.childNodes));if(Yh(e,t,l),l.tagName==="template"){const c=t,f=c.sourceCodeLocation,d=f&&f.startTag&&Pl(f.startTag),m=f&&f.endTag&&Pl(f.endTag),p=lE(e,c.content);d&&m&&e.file&&(p.position={start:d.end,end:m.start}),l.content=p}return e.schema=n,l}function Yh(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=gQ(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function gQ(e,t,n){const r=Pl(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)VM.call(n.attrs,l)&&(o[op(e.schema,l).property]=Pl(n.attrs[l]));n.startTag;const c=Pl(n.startTag),f=n.endTag?Pl(n.endTag):void 0,d={opening:c};f&&(d.closing=f),d.properties=o,t.data={position:d}}}return r}function Pl(e){const t=FA({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=FA({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function FA(e){return e.line&&e.column?e:void 0}const UA={}.hasOwnProperty;function $M(e,t){const n=t||{};function r(s,...o){let l=r.invalid;const c=r.handlers;if(s&&UA.call(s,e)){const f=String(s[e]);l=UA.call(c,f)?c[f]: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 bQ={},yQ={}.hasOwnProperty,YM=$M("type",{handlers:{root:EQ,element:wQ,text:SQ,comment:CQ,doctype:vQ}});function xQ(e,t){const r=(t||bQ).space;return YM(e,r==="svg"?_a:Bf)}function EQ(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=uE(e.children,n,t),yu(e,n),n}function TQ(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=uE(e.children,n,t),yu(e,n),n}function vQ(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return yu(e,t),t}function SQ(e){const t={nodeName:"#text",value:e.value,parentNode:null};return yu(e,t),t}function CQ(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return yu(e,t),t}function wQ(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"&&yQ.call(e.properties,o)){const f=AQ(r,o,e.properties[o]);f&&s.push(f)}}const l=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:ro[l],childNodes:[],parentNode:null};return c.childNodes=uE(e.children,c,r),yu(e,c),e.tagName==="template"&&e.content&&(c.content=TQ(e.content,r)),c}function AQ(e,t,n){const r=op(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?UM(n):HM(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 uE(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const o=YM(e[r],n);o.parentNode=t,s.push(o)}return s}function yu(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 _Q=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],kQ=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]),$t="�";var U;(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"})(U||(U={}));const mr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function GM(e){return e>=55296&&e<=57343}function NQ(e){return e>=56320&&e<=57343}function RQ(e,t){return(e-55296)*1024+9216+t}function KM(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function QM(e){return e>=64976&&e<=65007||kQ.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 DQ=65536;class OQ{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=DQ,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,c=o+n;return{code:t,startLine:r,endLine:r,startCol:l,endCol:l,startOffset:c,endOffset:c}}_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(NQ(n))return this.pos++,this._addGap(),RQ(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,U.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,U.EOF;const r=this.html.charCodeAt(n);return r===U.CARRIAGE_RETURN?U.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,U.EOF;let t=this.html.charCodeAt(this.pos);return t===U.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,U.LINE_FEED):t===U.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,GM(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===U.LINE_FEED||t===U.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){KM(t)?this._err(ue.controlCharacterInInputStream):QM(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 XM(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 MQ=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))),IQ=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 LQ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=IQ.get(e))!==null&&t!==void 0?t:e}var kn;(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"})(kn||(kn={}));const PQ=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 fy(e){return e>=kn.ZERO&&e<=kn.NINE}function jQ(e){return e>=kn.UPPER_A&&e<=kn.UPPER_F||e>=kn.LOWER_A&&e<=kn.LOWER_F}function BQ(e){return e>=kn.UPPER_A&&e<=kn.UPPER_Z||e>=kn.LOWER_A&&e<=kn.LOWER_Z||fy(e)}function FQ(e){return e===kn.EQUALS||BQ(e)}var An;(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"})(An||(An={}));var gs;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(gs||(gs={}));class UQ{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=An.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=gs.Strict}startEntity(t){this.decodeMode=t,this.state=An.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case An.EntityStart:return t.charCodeAt(n)===kn.NUM?(this.state=An.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=An.NamedEntity,this.stateNamedEntity(t,n));case An.NumericStart:return this.stateNumericStart(t,n);case An.NumericDecimal:return this.stateNumericDecimal(t,n);case An.NumericHex:return this.stateNumericHex(t,n);case An.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|PQ)===kn.LOWER_X?(this.state=An.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=An.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(fy(s)||jQ(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(fy(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===kn.SEMI)this.consumed+=1;else if(this.decodeMode===gs.Strict)return 0;return this.emitCodePoint(LQ(this.result),this.consumed),this.errors&&(t!==kn.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=HQ(r,s,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===gs.Attribute&&(o===0||FQ(l))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],o=(s&pa.VALUE_LENGTH)>>14,o!==0){if(l===kn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==gs.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 An.NamedEntity:return this.result!==0&&(this.decodeMode!==gs.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case An.NumericDecimal:return this.emitNumericEntity(0,2);case An.NumericHex:return this.emitNumericEntity(0,3);case An.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case An.EntityStart:return 0}}}function HQ(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 f=r-o;return f<0||f>=s?-1:e[n+f]-1}let l=n,c=l+s-1;for(;l<=c;){const f=l+c>>>1,d=e[f];if(d<r)l=f+1;else if(d>r)c=f-1;else return e[f+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 $r;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})($r||($r={}));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 v;(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"})(v||(v={}));const zQ=new Map([[re.A,v.A],[re.ADDRESS,v.ADDRESS],[re.ANNOTATION_XML,v.ANNOTATION_XML],[re.APPLET,v.APPLET],[re.AREA,v.AREA],[re.ARTICLE,v.ARTICLE],[re.ASIDE,v.ASIDE],[re.B,v.B],[re.BASE,v.BASE],[re.BASEFONT,v.BASEFONT],[re.BGSOUND,v.BGSOUND],[re.BIG,v.BIG],[re.BLOCKQUOTE,v.BLOCKQUOTE],[re.BODY,v.BODY],[re.BR,v.BR],[re.BUTTON,v.BUTTON],[re.CAPTION,v.CAPTION],[re.CENTER,v.CENTER],[re.CODE,v.CODE],[re.COL,v.COL],[re.COLGROUP,v.COLGROUP],[re.DD,v.DD],[re.DESC,v.DESC],[re.DETAILS,v.DETAILS],[re.DIALOG,v.DIALOG],[re.DIR,v.DIR],[re.DIV,v.DIV],[re.DL,v.DL],[re.DT,v.DT],[re.EM,v.EM],[re.EMBED,v.EMBED],[re.FIELDSET,v.FIELDSET],[re.FIGCAPTION,v.FIGCAPTION],[re.FIGURE,v.FIGURE],[re.FONT,v.FONT],[re.FOOTER,v.FOOTER],[re.FOREIGN_OBJECT,v.FOREIGN_OBJECT],[re.FORM,v.FORM],[re.FRAME,v.FRAME],[re.FRAMESET,v.FRAMESET],[re.H1,v.H1],[re.H2,v.H2],[re.H3,v.H3],[re.H4,v.H4],[re.H5,v.H5],[re.H6,v.H6],[re.HEAD,v.HEAD],[re.HEADER,v.HEADER],[re.HGROUP,v.HGROUP],[re.HR,v.HR],[re.HTML,v.HTML],[re.I,v.I],[re.IMG,v.IMG],[re.IMAGE,v.IMAGE],[re.INPUT,v.INPUT],[re.IFRAME,v.IFRAME],[re.KEYGEN,v.KEYGEN],[re.LABEL,v.LABEL],[re.LI,v.LI],[re.LINK,v.LINK],[re.LISTING,v.LISTING],[re.MAIN,v.MAIN],[re.MALIGNMARK,v.MALIGNMARK],[re.MARQUEE,v.MARQUEE],[re.MATH,v.MATH],[re.MENU,v.MENU],[re.META,v.META],[re.MGLYPH,v.MGLYPH],[re.MI,v.MI],[re.MO,v.MO],[re.MN,v.MN],[re.MS,v.MS],[re.MTEXT,v.MTEXT],[re.NAV,v.NAV],[re.NOBR,v.NOBR],[re.NOFRAMES,v.NOFRAMES],[re.NOEMBED,v.NOEMBED],[re.NOSCRIPT,v.NOSCRIPT],[re.OBJECT,v.OBJECT],[re.OL,v.OL],[re.OPTGROUP,v.OPTGROUP],[re.OPTION,v.OPTION],[re.P,v.P],[re.PARAM,v.PARAM],[re.PLAINTEXT,v.PLAINTEXT],[re.PRE,v.PRE],[re.RB,v.RB],[re.RP,v.RP],[re.RT,v.RT],[re.RTC,v.RTC],[re.RUBY,v.RUBY],[re.S,v.S],[re.SCRIPT,v.SCRIPT],[re.SEARCH,v.SEARCH],[re.SECTION,v.SECTION],[re.SELECT,v.SELECT],[re.SOURCE,v.SOURCE],[re.SMALL,v.SMALL],[re.SPAN,v.SPAN],[re.STRIKE,v.STRIKE],[re.STRONG,v.STRONG],[re.STYLE,v.STYLE],[re.SUB,v.SUB],[re.SUMMARY,v.SUMMARY],[re.SUP,v.SUP],[re.TABLE,v.TABLE],[re.TBODY,v.TBODY],[re.TEMPLATE,v.TEMPLATE],[re.TEXTAREA,v.TEXTAREA],[re.TFOOT,v.TFOOT],[re.TD,v.TD],[re.TH,v.TH],[re.THEAD,v.THEAD],[re.TITLE,v.TITLE],[re.TR,v.TR],[re.TRACK,v.TRACK],[re.TT,v.TT],[re.U,v.U],[re.UL,v.UL],[re.SVG,v.SVG],[re.VAR,v.VAR],[re.WBR,v.WBR],[re.XMP,v.XMP]]);function xu(e){var t;return(t=zQ.get(e))!==null&&t!==void 0?t:v.UNKNOWN}const be=v,VQ={[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},dy=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 z;(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"})(z||(z={}));const an={DATA:z.DATA,RCDATA:z.RCDATA,RAWTEXT:z.RAWTEXT,SCRIPT_DATA:z.SCRIPT_DATA,PLAINTEXT:z.PLAINTEXT,CDATA_SECTION:z.CDATA_SECTION};function qQ(e){return e>=U.DIGIT_0&&e<=U.DIGIT_9}function Mc(e){return e>=U.LATIN_CAPITAL_A&&e<=U.LATIN_CAPITAL_Z}function $Q(e){return e>=U.LATIN_SMALL_A&&e<=U.LATIN_SMALL_Z}function na(e){return $Q(e)||Mc(e)}function HA(e){return na(e)||qQ(e)}function wh(e){return e+32}function WM(e){return e===U.SPACE||e===U.LINE_FEED||e===U.TABULATION||e===U.FORM_FEED}function zA(e){return WM(e)||e===U.SOLIDUS||e===U.GREATER_THAN_SIGN}function YQ(e){return e===U.NULL?ue.nullCharacterReference:e>1114111?ue.characterReferenceOutsideUnicodeRange:GM(e)?ue.surrogateCharacterReference:QM(e)?ue.noncharacterCharacterReference:KM(e)||e===U.CARRIAGE_RETURN?ue.controlCharacterReference:null}class GQ{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=z.DATA,this.returnState=z.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new OQ(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new UQ(MQ,(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=YQ(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:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:at.END_TAG,tagName:"",tagID:v.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(XM(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=xu(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=WM(t)?at.WHITESPACE_CHARACTER:t===U.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=z.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?gs.Attribute:gs.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===z.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===z.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===z.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case z.DATA:{this._stateData(t);break}case z.RCDATA:{this._stateRcdata(t);break}case z.RAWTEXT:{this._stateRawtext(t);break}case z.SCRIPT_DATA:{this._stateScriptData(t);break}case z.PLAINTEXT:{this._statePlaintext(t);break}case z.TAG_OPEN:{this._stateTagOpen(t);break}case z.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case z.TAG_NAME:{this._stateTagName(t);break}case z.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case z.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case z.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case z.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case z.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case z.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case z.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case z.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case z.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case z.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case z.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case z.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case z.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case z.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case z.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case z.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case z.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case z.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case z.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case z.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case z.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case z.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case z.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case z.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case z.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case z.BOGUS_COMMENT:{this._stateBogusComment(t);break}case z.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case z.COMMENT_START:{this._stateCommentStart(t);break}case z.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case z.COMMENT:{this._stateComment(t);break}case z.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case z.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case z.COMMENT_END:{this._stateCommentEnd(t);break}case z.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case z.DOCTYPE:{this._stateDoctype(t);break}case z.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case z.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case z.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case z.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case z.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case z.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case z.CDATA_SECTION:{this._stateCdataSection(t);break}case z.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case z.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case z.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case z.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case U.LESS_THAN_SIGN:{this.state=z.TAG_OPEN;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this._emitCodePoint(t);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case U.AMPERSAND:{this._startCharacterReference();break}case U.LESS_THAN_SIGN:{this.state=z.RCDATA_LESS_THAN_SIGN;break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars($t);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case U.LESS_THAN_SIGN:{this.state=z.RAWTEXT_LESS_THAN_SIGN;break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars($t);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case U.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_LESS_THAN_SIGN;break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars($t);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case U.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars($t);break}case U.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(na(t))this._createStartTagToken(),this.state=z.TAG_NAME,this._stateTagName(t);else switch(t){case U.EXCLAMATION_MARK:{this.state=z.MARKUP_DECLARATION_OPEN;break}case U.SOLIDUS:{this.state=z.END_TAG_OPEN;break}case U.QUESTION_MARK:{this._err(ue.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t);break}case U.EOF:{this._err(ue.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ue.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=z.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(na(t))this._createEndTagToken(),this.state=z.TAG_NAME,this._stateTagName(t);else switch(t){case U.GREATER_THAN_SIGN:{this._err(ue.missingEndTagName),this.state=z.DATA;break}case U.EOF:{this._err(ue.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ue.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=z.BEFORE_ATTRIBUTE_NAME;break}case U.SOLIDUS:{this.state=z.SELF_CLOSING_START_TAG;break}case U.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentTagToken();break}case U.NULL:{this._err(ue.unexpectedNullCharacter),n.tagName+=$t;break}case U.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Mc(t)?wh(t):t)}}_stateRcdataLessThanSign(t){t===U.SOLIDUS?this.state=z.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=z.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){na(t)?(this.state=z.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=z.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 U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=z.BEFORE_ATTRIBUTE_NAME,!1;case U.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=z.SELF_CLOSING_START_TAG,!1;case U.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=z.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===U.SOLIDUS?this.state=z.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){na(t)?(this.state=z.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case U.SOLIDUS:{this.state=z.SCRIPT_DATA_END_TAG_OPEN;break}case U.EXCLAMATION_MARK:{this.state=z.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=z.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){na(t)?(this.state=z.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===U.HYPHEN_MINUS?(this.state=z.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===U.HYPHEN_MINUS?(this.state=z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case U.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars($t);break}case U.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case U.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_ESCAPED,this._emitChars($t);break}case U.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case U.HYPHEN_MINUS:{this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case U.GREATER_THAN_SIGN:{this.state=z.SCRIPT_DATA,this._emitChars(">");break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_ESCAPED,this._emitChars($t);break}case U.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===U.SOLIDUS?this.state=z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:na(t)?(this._emitChars("<"),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){na(t)?(this.state=z.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(mr.SCRIPT,!1)&&zA(this.preprocessor.peek(mr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<mr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case U.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars($t);break}case U.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case U.HYPHEN_MINUS:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars($t);break}case U.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case U.HYPHEN_MINUS:{this._emitChars("-");break}case U.LESS_THAN_SIGN:{this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case U.GREATER_THAN_SIGN:{this.state=z.SCRIPT_DATA,this._emitChars(">");break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars($t);break}case U.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===U.SOLIDUS?(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(mr.SCRIPT,!1)&&zA(this.preprocessor.peek(mr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<mr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=z.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:{this.state=z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case U.EQUALS_SIGN:{this._err(ue.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=z.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=z.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:{this._leaveAttrName(),this.state=z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case U.EQUALS_SIGN:{this._leaveAttrName(),this.state=z.BEFORE_ATTRIBUTE_VALUE;break}case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:{this._err(ue.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.name+=$t;break}default:this.currentAttr.name+=String.fromCodePoint(Mc(t)?wh(t):t)}}_stateAfterAttributeName(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:{this.state=z.SELF_CLOSING_START_TAG;break}case U.EQUALS_SIGN:{this.state=z.BEFORE_ATTRIBUTE_VALUE;break}case U.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=z.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{this.state=z.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this.state=z.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(ue.missingAttributeValue),this.state=z.DATA,this.emitCurrentTagToken();break}default:this.state=z.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case U.QUOTATION_MARK:{this.state=z.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=$t;break}case U.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case U.APOSTROPHE:{this.state=z.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=$t;break}case U.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this._leaveAttrValue(),this.state=z.BEFORE_ATTRIBUTE_NAME;break}case U.AMPERSAND:{this._startCharacterReference();break}case U.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=z.DATA,this.emitCurrentTagToken();break}case U.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=$t;break}case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:case U.EQUALS_SIGN:case U.GRAVE_ACCENT:{this._err(ue.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case U.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this._leaveAttrValue(),this.state=z.BEFORE_ATTRIBUTE_NAME;break}case U.SOLIDUS:{this._leaveAttrValue(),this.state=z.SELF_CLOSING_START_TAG;break}case U.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=z.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._err(ue.missingWhitespaceBetweenAttributes),this.state=z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case U.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=z.DATA,this.emitCurrentTagToken();break}case U.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._err(ue.unexpectedSolidusInTag),this.state=z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentComment(n);break}case U.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case U.NULL:{this._err(ue.unexpectedNullCharacter),n.data+=$t;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(mr.DASH_DASH,!0)?(this._createCommentToken(mr.DASH_DASH.length+1),this.state=z.COMMENT_START):this._consumeSequenceIfMatch(mr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(mr.DOCTYPE.length+1),this.state=z.DOCTYPE):this._consumeSequenceIfMatch(mr.CDATA_START,!0)?this.inForeignNode?this.state=z.CDATA_SECTION:(this._err(ue.cdataInHtmlContent),this._createCommentToken(mr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=z.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ue.incorrectlyOpenedComment),this._createCommentToken(2),this.state=z.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case U.HYPHEN_MINUS:{this.state=z.COMMENT_START_DASH;break}case U.GREATER_THAN_SIGN:{this._err(ue.abruptClosingOfEmptyComment),this.state=z.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=z.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=z.COMMENT_END;break}case U.GREATER_THAN_SIGN:{this._err(ue.abruptClosingOfEmptyComment),this.state=z.DATA,this.emitCurrentComment(n);break}case U.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=z.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=z.COMMENT_END_DASH;break}case U.LESS_THAN_SIGN:{n.data+="<",this.state=z.COMMENT_LESS_THAN_SIGN;break}case U.NULL:{this._err(ue.unexpectedNullCharacter),n.data+=$t;break}case U.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 U.EXCLAMATION_MARK:{n.data+="!",this.state=z.COMMENT_LESS_THAN_SIGN_BANG;break}case U.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=z.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===U.HYPHEN_MINUS?this.state=z.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=z.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===U.HYPHEN_MINUS?this.state=z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=z.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==U.GREATER_THAN_SIGN&&t!==U.EOF&&this._err(ue.nestedComment),this.state=z.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case U.HYPHEN_MINUS:{this.state=z.COMMENT_END;break}case U.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=z.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentComment(n);break}case U.EXCLAMATION_MARK:{this.state=z.COMMENT_END_BANG;break}case U.HYPHEN_MINUS:{n.data+="-";break}case U.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=z.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case U.HYPHEN_MINUS:{n.data+="--!",this.state=z.COMMENT_END_DASH;break}case U.GREATER_THAN_SIGN:{this._err(ue.incorrectlyClosedComment),this.state=z.DATA,this.emitCurrentComment(n);break}case U.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=z.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this.state=z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case U.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=z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Mc(t))this._createDoctypeToken(String.fromCharCode(wh(t))),this.state=z.DOCTYPE_NAME;else switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.NULL:{this._err(ue.unexpectedNullCharacter),this._createDoctypeToken($t),this.state=z.DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case U.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=z.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=z.AFTER_DOCTYPE_NAME;break}case U.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case U.NULL:{this._err(ue.unexpectedNullCharacter),n.name+=$t;break}case U.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Mc(t)?wh(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case U.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(mr.PUBLIC,!1)?this.state=z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(mr.SYSTEM,!1)?this.state=z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ue.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.QUOTATION_MARK:{this._err(ue.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(ue.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(ue.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case U.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{n.publicId="",this.state=z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(ue.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case U.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case U.QUOTATION_MARK:{this.state=z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.NULL:{this._err(ue.unexpectedNullCharacter),n.publicId+=$t;break}case U.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case U.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 U.APOSTROPHE:{this.state=z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case U.NULL:{this._err(ue.unexpectedNullCharacter),n.publicId+=$t;break}case U.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case U.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 U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case U.GREATER_THAN_SIGN:{this.state=z.DATA,this.emitCurrentDoctype(n);break}case U.QUOTATION_MARK:{this._err(ue.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(ue.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case U.QUOTATION_MARK:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:{this.state=z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.QUOTATION_MARK:{this._err(ue.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{this._err(ue.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case U.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case U.APOSTROPHE:{n.systemId="",this.state=z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case U.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.DATA,this.emitCurrentDoctype(n);break}case U.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case U.QUOTATION_MARK:{this.state=z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.NULL:{this._err(ue.unexpectedNullCharacter),n.systemId+=$t;break}case U.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case U.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 U.APOSTROPHE:{this.state=z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case U.NULL:{this._err(ue.unexpectedNullCharacter),n.systemId+=$t;break}case U.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=z.DATA;break}case U.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 U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case U.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case U.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=z.DATA;break}case U.NULL:{this._err(ue.unexpectedNullCharacter);break}case U.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case U.RIGHT_SQUARE_BRACKET:{this.state=z.CDATA_SECTION_BRACKET;break}case U.EOF:{this._err(ue.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===U.RIGHT_SQUARE_BRACKET?this.state=z.CDATA_SECTION_END:(this._emitChars("]"),this.state=z.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case U.GREATER_THAN_SIGN:{this.state=z.DATA;break}case U.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=z.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(U.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&HA(this.preprocessor.peek(1))?z.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){HA(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===U.SEMICOLON&&this._err(ue.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ZM=new Set([v.DD,v.DT,v.LI,v.OPTGROUP,v.OPTION,v.P,v.RB,v.RP,v.RT,v.RTC]),VA=new Set([...ZM,v.CAPTION,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]),xm=new Set([v.APPLET,v.CAPTION,v.HTML,v.MARQUEE,v.OBJECT,v.TABLE,v.TD,v.TEMPLATE,v.TH]),KQ=new Set([...xm,v.OL,v.UL]),QQ=new Set([...xm,v.BUTTON]),qA=new Set([v.ANNOTATION_XML,v.MI,v.MN,v.MO,v.MS,v.MTEXT]),$A=new Set([v.DESC,v.FOREIGN_OBJECT,v.TITLE]),XQ=new Set([v.TR,v.TEMPLATE,v.HTML]),WQ=new Set([v.TBODY,v.TFOOT,v.THEAD,v.TEMPLATE,v.HTML]),ZQ=new Set([v.TABLE,v.TEMPLATE,v.HTML]),JQ=new Set([v.TD,v.TH]);class eX{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=v.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===v.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(dy,ge.HTML)}popUntilTableCellPopped(){this.popUntilPopped(JQ,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(ZQ,ge.HTML)}clearBackToTableBodyContext(){this.clearBackTo(WQ,ge.HTML)}clearBackToTableRowContext(){this.clearBackTo(XQ,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]===v.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]===v.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($A.has(s))return!1;break}case ge.MATHML:{if(qA.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,xm)}hasInListItemScope(t){return this.hasInDynamicScope(t,KQ)}hasInButtonScope(t){return this.hasInDynamicScope(t,QQ)}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(dy.has(n))return!0;if(xm.has(n))return!1;break}case ge.SVG:{if($A.has(n))return!1;break}case ge.MATHML:{if(qA.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 v.TABLE:case v.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 v.TBODY:case v.THEAD:case v.TFOOT:return!0;case v.TABLE:case v.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 v.OPTION:case v.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&ZM.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&VA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&VA.has(this.currentTagId);)this.pop()}}const I1=3;var Di;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Di||(Di={}));const YA={type:Di.Marker};class tX{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 c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===Di.Marker)break;const{element:d}=f;if(this.treeAdapter.getTagName(d)===o&&this.treeAdapter.getNamespaceURI(d)===l){const m=this.treeAdapter.getAttrList(d);m.length===s&&r.push({idx:c,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<I1)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<I1)return;const s=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<r.length;l++){const c=r[l];c.attrs.every(f=>s.get(f.name)===f.value)&&(o+=1,o>=I1&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(YA)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Di.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Di.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(YA);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Di.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Di.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Di.Element&&n.element===t)}}const ra={createDocument(){return{nodeName:"#document",mode:$r.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}}},JM="html",nX="about:legacy-compat",rX="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",e6=["+//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//"],iX=[...e6,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sX=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),t6=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],aX=[...t6,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function GA(e,t){return t.some(n=>e.startsWith(n))}function oX(e){return e.name===JM&&e.publicId===null&&(e.systemId===null||e.systemId===nX)}function lX(e){if(e.name!==JM)return $r.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===rX)return $r.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),sX.has(n))return $r.QUIRKS;let r=t===null?iX:e6;if(GA(n,r))return $r.QUIRKS;if(r=t===null?t6:aX,GA(n,r))return $r.LIMITED_QUIRKS}return $r.NO_QUIRKS}const KA={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},uX="definitionurl",cX="definitionURL",fX=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])),dX=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}]]),hX=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])),mX=new Set([v.B,v.BIG,v.BLOCKQUOTE,v.BODY,v.BR,v.CENTER,v.CODE,v.DD,v.DIV,v.DL,v.DT,v.EM,v.EMBED,v.H1,v.H2,v.H3,v.H4,v.H5,v.H6,v.HEAD,v.HR,v.I,v.IMG,v.LI,v.LISTING,v.MENU,v.META,v.NOBR,v.OL,v.P,v.PRE,v.RUBY,v.S,v.SMALL,v.SPAN,v.STRONG,v.STRIKE,v.SUB,v.SUP,v.TABLE,v.TT,v.U,v.UL,v.VAR]);function pX(e){const t=e.tagID;return t===v.FONT&&e.attrs.some(({name:r})=>r===po.COLOR||r===po.SIZE||r===po.FACE)||mX.has(t)}function n6(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===uX){e.attrs[t].name=cX;break}}function r6(e){for(let t=0;t<e.attrs.length;t++){const n=fX.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function cE(e){for(let t=0;t<e.attrs.length;t++){const n=dX.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 gX(e){const t=hX.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=xu(e.tagName))}function bX(e,t){return t===ge.MATHML&&(e===v.MI||e===v.MO||e===v.MN||e===v.MS||e===v.MTEXT)}function yX(e,t,n){if(t===ge.MATHML&&e===v.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===po.ENCODING){const s=n[r].value.toLowerCase();return s===KA.TEXT_HTML||s===KA.APPLICATION_XML}}return t===ge.SVG&&(e===v.FOREIGN_OBJECT||e===v.DESC||e===v.TITLE)}function xX(e,t,n,r){return(!r||r===ge.HTML)&&yX(e,t,n)||(!r||r===ge.MATHML)&&bX(e,t)}const EX="hidden",TX=8,vX=3;var Y;(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"})(Y||(Y={}));const SX={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},i6=new Set([v.TABLE,v.TBODY,v.TFOOT,v.THEAD,v.TR]),QA={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ra,onParseError:null};class XA{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=Y.INITIAL,this.originalInsertionMode=Y.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={...QA,...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 GQ(this.options,this),this.activeFormattingElements=new tX(this.treeAdapter),this.fragmentContextID=r?xu(this.treeAdapter.getTagName(r)):v.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new eX(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={...QA,...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===v.TEMPLATE&&o.tmplInsertionModeStack.unshift(Y.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:SX,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=Y.TEXT}switchToPlaintextParsing(){this.insertionMode=Y.TEXT,this.originalInsertionMode=Y.IN_BODY,this.tokenizer.state=an.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 v.TITLE:case v.TEXTAREA:{this.tokenizer.state=an.RCDATA;break}case v.STYLE:case v.XMP:case v.IFRAME:case v.NOEMBED:case v.NOFRAMES:case v.NOSCRIPT:{this.tokenizer.state=an.RAWTEXT;break}case v.SCRIPT:{this.tokenizer.state=an.SCRIPT_DATA;break}case v.PLAINTEXT:{this.tokenizer.state=an.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(c=>this.treeAdapter.isDocumentTypeNode(c));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,v.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:f,endCol:d,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:d,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===v.SVG&&this.treeAdapter.getTagName(n)===re.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ge.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===v.MGLYPH||t.tagID===v.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 xX(t,s,o,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Di.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=Y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(v.P),this.openElements.popUntilTagNamePopped(v.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case v.TR:{this.insertionMode=Y.IN_ROW;return}case v.TBODY:case v.THEAD:case v.TFOOT:{this.insertionMode=Y.IN_TABLE_BODY;return}case v.CAPTION:{this.insertionMode=Y.IN_CAPTION;return}case v.COLGROUP:{this.insertionMode=Y.IN_COLUMN_GROUP;return}case v.TABLE:{this.insertionMode=Y.IN_TABLE;return}case v.BODY:{this.insertionMode=Y.IN_BODY;return}case v.FRAMESET:{this.insertionMode=Y.IN_FRAMESET;return}case v.SELECT:{this._resetInsertionModeForSelect(t);return}case v.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case v.HTML:{this.insertionMode=this.headElement?Y.AFTER_HEAD:Y.BEFORE_HEAD;return}case v.TD:case v.TH:{if(t>0){this.insertionMode=Y.IN_CELL;return}break}case v.HEAD:{if(t>0){this.insertionMode=Y.IN_HEAD;return}break}}this.insertionMode=Y.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===v.TEMPLATE)break;if(r===v.TABLE){this.insertionMode=Y.IN_SELECT_IN_TABLE;return}}this.insertionMode=Y.IN_SELECT}_isElementCausesFosterParenting(t){return i6.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 v.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ge.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case v.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 VQ[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){JW(this,t);return}switch(this.insertionMode){case Y.INITIAL:{Ec(this,t);break}case Y.BEFORE_HTML:{zc(this,t);break}case Y.BEFORE_HEAD:{Vc(this,t);break}case Y.IN_HEAD:{qc(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{$c(this,t);break}case Y.AFTER_HEAD:{Yc(this,t);break}case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:{a6(this,t);break}case Y.TEXT:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{L1(this,t);break}case Y.IN_TABLE_TEXT:{d6(this,t);break}case Y.IN_COLUMN_GROUP:{Em(this,t);break}case Y.AFTER_BODY:{Tm(this,t);break}case Y.AFTER_AFTER_BODY:{Gh(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ZW(this,t);return}switch(this.insertionMode){case Y.INITIAL:{Ec(this,t);break}case Y.BEFORE_HTML:{zc(this,t);break}case Y.BEFORE_HEAD:{Vc(this,t);break}case Y.IN_HEAD:{qc(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{$c(this,t);break}case Y.AFTER_HEAD:{Yc(this,t);break}case Y.TEXT:{this._insertCharacters(t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{L1(this,t);break}case Y.IN_COLUMN_GROUP:{Em(this,t);break}case Y.AFTER_BODY:{Tm(this,t);break}case Y.AFTER_AFTER_BODY:{Gh(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){hy(this,t);return}switch(this.insertionMode){case Y.INITIAL:case Y.BEFORE_HTML:case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_TEMPLATE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:{hy(this,t);break}case Y.IN_TABLE_TEXT:{Tc(this,t);break}case Y.AFTER_BODY:{RX(this,t);break}case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{DX(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case Y.INITIAL:{OX(this,t);break}case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:{this._err(t,ue.misplacedDoctype);break}case Y.IN_TABLE_TEXT:{Tc(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)?eZ(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case Y.INITIAL:{Ec(this,t);break}case Y.BEFORE_HTML:{MX(this,t);break}case Y.BEFORE_HEAD:{LX(this,t);break}case Y.IN_HEAD:{xi(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{BX(this,t);break}case Y.AFTER_HEAD:{UX(this,t);break}case Y.IN_BODY:{qn(this,t);break}case Y.IN_TABLE:{iu(this,t);break}case Y.IN_TABLE_TEXT:{Tc(this,t);break}case Y.IN_CAPTION:{PW(this,t);break}case Y.IN_COLUMN_GROUP:{hE(this,t);break}case Y.IN_TABLE_BODY:{cp(this,t);break}case Y.IN_ROW:{fp(this,t);break}case Y.IN_CELL:{FW(this,t);break}case Y.IN_SELECT:{p6(this,t);break}case Y.IN_SELECT_IN_TABLE:{HW(this,t);break}case Y.IN_TEMPLATE:{VW(this,t);break}case Y.AFTER_BODY:{$W(this,t);break}case Y.IN_FRAMESET:{YW(this,t);break}case Y.AFTER_FRAMESET:{KW(this,t);break}case Y.AFTER_AFTER_BODY:{XW(this,t);break}case Y.AFTER_AFTER_FRAMESET:{WW(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?tZ(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case Y.INITIAL:{Ec(this,t);break}case Y.BEFORE_HTML:{IX(this,t);break}case Y.BEFORE_HEAD:{PX(this,t);break}case Y.IN_HEAD:{jX(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{FX(this,t);break}case Y.AFTER_HEAD:{HX(this,t);break}case Y.IN_BODY:{up(this,t);break}case Y.TEXT:{AW(this,t);break}case Y.IN_TABLE:{hf(this,t);break}case Y.IN_TABLE_TEXT:{Tc(this,t);break}case Y.IN_CAPTION:{jW(this,t);break}case Y.IN_COLUMN_GROUP:{BW(this,t);break}case Y.IN_TABLE_BODY:{my(this,t);break}case Y.IN_ROW:{m6(this,t);break}case Y.IN_CELL:{UW(this,t);break}case Y.IN_SELECT:{g6(this,t);break}case Y.IN_SELECT_IN_TABLE:{zW(this,t);break}case Y.IN_TEMPLATE:{qW(this,t);break}case Y.AFTER_BODY:{y6(this,t);break}case Y.IN_FRAMESET:{GW(this,t);break}case Y.AFTER_FRAMESET:{QW(this,t);break}case Y.AFTER_AFTER_BODY:{Gh(this,t);break}}}onEof(t){switch(this.insertionMode){case Y.INITIAL:{Ec(this,t);break}case Y.BEFORE_HTML:{zc(this,t);break}case Y.BEFORE_HEAD:{Vc(this,t);break}case Y.IN_HEAD:{qc(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{$c(this,t);break}case Y.AFTER_HEAD:{Yc(this,t);break}case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:{c6(this,t);break}case Y.TEXT:{_W(this,t);break}case Y.IN_TABLE_TEXT:{Tc(this,t);break}case Y.IN_TEMPLATE:{b6(this,t);break}case Y.AFTER_BODY:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{dE(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===U.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 Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.TEXT:case Y.IN_COLUMN_GROUP:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:{this._insertCharacters(t);break}case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:case Y.AFTER_BODY:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{s6(this,t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{L1(this,t);break}case Y.IN_TABLE_TEXT:{f6(this,t);break}}}}function CX(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):u6(e,t),n}function wX(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 AX(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 c=e.activeFormattingElements.getElementEntry(l),f=c&&o>=vX;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=_X(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(l,r),r=l)}return r}function _X(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 kX(e,t,n){const r=e.treeAdapter.getTagName(t),s=xu(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);s===v.TEMPLATE&&o===ge.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function NX(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 fE(e,t){for(let n=0;n<TX;n++){const r=CX(e,t);if(!r)break;const s=wX(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const o=AX(e,s,r.element),l=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(o),l&&kX(e,l,o),NX(e,s,r)}}function hy(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function RX(e,t){e._appendCommentNode(t,e.openElements.items[0])}function DX(e,t){e._appendCommentNode(t,e.document)}function dE(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 OX(e,t){e._setDocumentType(t);const n=t.forceQuirks?$r.QUIRKS:lX(t);oX(t)||e._err(t,ue.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Y.BEFORE_HTML}function Ec(e,t){e._err(t,ue.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,$r.QUIRKS),e.insertionMode=Y.BEFORE_HTML,e._processToken(t)}function MX(e,t){t.tagID===v.HTML?(e._insertElement(t,ge.HTML),e.insertionMode=Y.BEFORE_HEAD):zc(e,t)}function IX(e,t){const n=t.tagID;(n===v.HTML||n===v.HEAD||n===v.BODY||n===v.BR)&&zc(e,t)}function zc(e,t){e._insertFakeRootElement(),e.insertionMode=Y.BEFORE_HEAD,e._processToken(t)}function LX(e,t){switch(t.tagID){case v.HTML:{qn(e,t);break}case v.HEAD:{e._insertElement(t,ge.HTML),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD;break}default:Vc(e,t)}}function PX(e,t){const n=t.tagID;n===v.HEAD||n===v.BODY||n===v.HTML||n===v.BR?Vc(e,t):e._err(t,ue.endTagWithoutMatchingOpenElement)}function Vc(e,t){e._insertFakeElement(re.HEAD,v.HEAD),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD,e._processToken(t)}function xi(e,t){switch(t.tagID){case v.HTML:{qn(e,t);break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case v.TITLE:{e._switchToTextParsing(t,an.RCDATA);break}case v.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,an.RAWTEXT):(e._insertElement(t,ge.HTML),e.insertionMode=Y.IN_HEAD_NO_SCRIPT);break}case v.NOFRAMES:case v.STYLE:{e._switchToTextParsing(t,an.RAWTEXT);break}case v.SCRIPT:{e._switchToTextParsing(t,an.SCRIPT_DATA);break}case v.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Y.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE);break}case v.HEAD:{e._err(t,ue.misplacedStartTagForHeadElement);break}default:qc(e,t)}}function jX(e,t){switch(t.tagID){case v.HEAD:{e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD;break}case v.BODY:case v.BR:case v.HTML:{qc(e,t);break}case v.TEMPLATE:{Oo(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function Oo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==v.TEMPLATE&&e._err(t,ue.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(v.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ue.endTagWithoutMatchingOpenElement)}function qc(e,t){e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD,e._processToken(t)}function BX(e,t){switch(t.tagID){case v.HTML:{qn(e,t);break}case v.BASEFONT:case v.BGSOUND:case v.HEAD:case v.LINK:case v.META:case v.NOFRAMES:case v.STYLE:{xi(e,t);break}case v.NOSCRIPT:{e._err(t,ue.nestedNoscriptInHead);break}default:$c(e,t)}}function FX(e,t){switch(t.tagID){case v.NOSCRIPT:{e.openElements.pop(),e.insertionMode=Y.IN_HEAD;break}case v.BR:{$c(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function $c(e,t){const n=t.type===at.EOF?ue.openElementsLeftAfterEof:ue.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Y.IN_HEAD,e._processToken(t)}function UX(e,t){switch(t.tagID){case v.HTML:{qn(e,t);break}case v.BODY:{e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_BODY;break}case v.FRAMESET:{e._insertElement(t,ge.HTML),e.insertionMode=Y.IN_FRAMESET;break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{e._err(t,ue.abandonedHeadElementChild),e.openElements.push(e.headElement,v.HEAD),xi(e,t),e.openElements.remove(e.headElement);break}case v.HEAD:{e._err(t,ue.misplacedStartTagForHeadElement);break}default:Yc(e,t)}}function HX(e,t){switch(t.tagID){case v.BODY:case v.HTML:case v.BR:{Yc(e,t);break}case v.TEMPLATE:{Oo(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function Yc(e,t){e._insertFakeElement(re.BODY,v.BODY),e.insertionMode=Y.IN_BODY,lp(e,t)}function lp(e,t){switch(t.type){case at.CHARACTER:{a6(e,t);break}case at.WHITESPACE_CHARACTER:{s6(e,t);break}case at.COMMENT:{hy(e,t);break}case at.START_TAG:{qn(e,t);break}case at.END_TAG:{up(e,t);break}case at.EOF:{c6(e,t);break}}}function s6(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function a6(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function zX(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function VX(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function qX(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ge.HTML),e.insertionMode=Y.IN_FRAMESET)}function $X(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ge.HTML)}function YX(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&dy.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ge.HTML)}function GX(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function KX(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ge.HTML),n||(e.formElement=e.openElements.current))}function QX(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===v.LI&&s===v.LI||(n===v.DD||n===v.DT)&&(s===v.DD||s===v.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==v.ADDRESS&&s!==v.DIV&&s!==v.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ge.HTML)}function XX(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.tokenizer.state=an.PLAINTEXT}function WX(e,t){e.openElements.hasInScope(v.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(v.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1}function ZX(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(re.A);n&&(fE(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 JX(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function eW(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(v.NOBR)&&(fE(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function tW(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function nW(e,t){e.treeAdapter.getDocumentMode(e.document)!==$r.QUIRKS&&e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_TABLE}function o6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function l6(e){const t=XM(e,po.TYPE);return t!=null&&t.toLowerCase()===EX}function rW(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),l6(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function iW(e,t){e._appendElement(t,ge.HTML),t.ackSelfClosing=!0}function sW(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function aW(e,t){t.tagName=re.IMG,t.tagID=v.IMG,o6(e,t)}function oW(e,t){e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.tokenizer.state=an.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Y.TEXT}function lW(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,an.RAWTEXT)}function uW(e,t){e.framesetOk=!1,e._switchToTextParsing(t,an.RAWTEXT)}function WA(e,t){e._switchToTextParsing(t,an.RAWTEXT)}function cW(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Y.IN_TABLE||e.insertionMode===Y.IN_CAPTION||e.insertionMode===Y.IN_TABLE_BODY||e.insertionMode===Y.IN_ROW||e.insertionMode===Y.IN_CELL?Y.IN_SELECT_IN_TABLE:Y.IN_SELECT}function fW(e,t){e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function dW(e,t){e.openElements.hasInScope(v.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ge.HTML)}function hW(e,t){e.openElements.hasInScope(v.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(v.RTC),e._insertElement(t,ge.HTML)}function mW(e,t){e._reconstructActiveFormattingElements(),n6(t),cE(t),t.selfClosing?e._appendElement(t,ge.MATHML):e._insertElement(t,ge.MATHML),t.ackSelfClosing=!0}function pW(e,t){e._reconstructActiveFormattingElements(),r6(t),cE(t),t.selfClosing?e._appendElement(t,ge.SVG):e._insertElement(t,ge.SVG),t.ackSelfClosing=!0}function ZA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function qn(e,t){switch(t.tagID){case v.I:case v.S:case v.B:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.SMALL:case v.STRIKE:case v.STRONG:{JX(e,t);break}case v.A:{ZX(e,t);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{YX(e,t);break}case v.P:case v.DL:case v.OL:case v.UL:case v.DIV:case v.DIR:case v.NAV:case v.MAIN:case v.MENU:case v.ASIDE:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.DETAILS:case v.ADDRESS:case v.ARTICLE:case v.SEARCH:case v.SECTION:case v.SUMMARY:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{$X(e,t);break}case v.LI:case v.DD:case v.DT:{QX(e,t);break}case v.BR:case v.IMG:case v.WBR:case v.AREA:case v.EMBED:case v.KEYGEN:{o6(e,t);break}case v.HR:{sW(e,t);break}case v.RB:case v.RTC:{dW(e,t);break}case v.RT:case v.RP:{hW(e,t);break}case v.PRE:case v.LISTING:{GX(e,t);break}case v.XMP:{lW(e,t);break}case v.SVG:{pW(e,t);break}case v.HTML:{zX(e,t);break}case v.BASE:case v.LINK:case v.META:case v.STYLE:case v.TITLE:case v.SCRIPT:case v.BGSOUND:case v.BASEFONT:case v.TEMPLATE:{xi(e,t);break}case v.BODY:{VX(e,t);break}case v.FORM:{KX(e,t);break}case v.NOBR:{eW(e,t);break}case v.MATH:{mW(e,t);break}case v.TABLE:{nW(e,t);break}case v.INPUT:{rW(e,t);break}case v.PARAM:case v.TRACK:case v.SOURCE:{iW(e,t);break}case v.IMAGE:{aW(e,t);break}case v.BUTTON:{WX(e,t);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{tW(e,t);break}case v.IFRAME:{uW(e,t);break}case v.SELECT:{cW(e,t);break}case v.OPTION:case v.OPTGROUP:{fW(e,t);break}case v.NOEMBED:case v.NOFRAMES:{WA(e,t);break}case v.FRAMESET:{qX(e,t);break}case v.TEXTAREA:{oW(e,t);break}case v.NOSCRIPT:{e.options.scriptingEnabled?WA(e,t):ZA(e,t);break}case v.PLAINTEXT:{XX(e,t);break}case v.COL:case v.TH:case v.TD:case v.TR:case v.HEAD:case v.FRAME:case v.TBODY:case v.TFOOT:case v.THEAD:case v.CAPTION:case v.COLGROUP:break;default:ZA(e,t)}}function gW(e,t){if(e.openElements.hasInScope(v.BODY)&&(e.insertionMode=Y.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function bW(e,t){e.openElements.hasInScope(v.BODY)&&(e.insertionMode=Y.AFTER_BODY,y6(e,t))}function yW(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function xW(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(v.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(v.FORM):n&&e.openElements.remove(n))}function EW(e){e.openElements.hasInButtonScope(v.P)||e._insertFakeElement(re.P,v.P),e._closePElement()}function TW(e){e.openElements.hasInListItemScope(v.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(v.LI),e.openElements.popUntilTagNamePopped(v.LI))}function vW(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function SW(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function CW(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function wW(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(re.BR,v.BR),e.openElements.pop(),e.framesetOk=!1}function u6(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!==v.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 up(e,t){switch(t.tagID){case v.A:case v.B:case v.I:case v.S:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.NOBR:case v.SMALL:case v.STRIKE:case v.STRONG:{fE(e,t);break}case v.P:{EW(e);break}case v.DL:case v.UL:case v.OL:case v.DIR:case v.DIV:case v.NAV:case v.PRE:case v.MAIN:case v.MENU:case v.ASIDE:case v.BUTTON:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.ADDRESS:case v.ARTICLE:case v.DETAILS:case v.SEARCH:case v.SECTION:case v.SUMMARY:case v.LISTING:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{yW(e,t);break}case v.LI:{TW(e);break}case v.DD:case v.DT:{vW(e,t);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{SW(e);break}case v.BR:{wW(e);break}case v.BODY:{gW(e,t);break}case v.HTML:{bW(e,t);break}case v.FORM:{xW(e);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{CW(e,t);break}case v.TEMPLATE:{Oo(e,t);break}default:u6(e,t)}}function c6(e,t){e.tmplInsertionModeStack.length>0?b6(e,t):dE(e,t)}function AW(e,t){var n;t.tagID===v.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function _W(e,t){e._err(t,ue.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function L1(e,t){if(e.openElements.currentTagId!==void 0&&i6.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Y.IN_TABLE_TEXT,t.type){case at.CHARACTER:{d6(e,t);break}case at.WHITESPACE_CHARACTER:{f6(e,t);break}}else Ff(e,t)}function kW(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ge.HTML),e.insertionMode=Y.IN_CAPTION}function NW(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=Y.IN_COLUMN_GROUP}function RW(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(re.COLGROUP,v.COLGROUP),e.insertionMode=Y.IN_COLUMN_GROUP,hE(e,t)}function DW(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=Y.IN_TABLE_BODY}function OW(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(re.TBODY,v.TBODY),e.insertionMode=Y.IN_TABLE_BODY,cp(e,t)}function MW(e,t){e.openElements.hasInTableScope(v.TABLE)&&(e.openElements.popUntilTagNamePopped(v.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function IW(e,t){l6(t)?e._appendElement(t,ge.HTML):Ff(e,t),t.ackSelfClosing=!0}function LW(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ge.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function iu(e,t){switch(t.tagID){case v.TD:case v.TH:case v.TR:{OW(e,t);break}case v.STYLE:case v.SCRIPT:case v.TEMPLATE:{xi(e,t);break}case v.COL:{RW(e,t);break}case v.FORM:{LW(e,t);break}case v.TABLE:{MW(e,t);break}case v.TBODY:case v.TFOOT:case v.THEAD:{DW(e,t);break}case v.INPUT:{IW(e,t);break}case v.CAPTION:{kW(e,t);break}case v.COLGROUP:{NW(e,t);break}default:Ff(e,t)}}function hf(e,t){switch(t.tagID){case v.TABLE:{e.openElements.hasInTableScope(v.TABLE)&&(e.openElements.popUntilTagNamePopped(v.TABLE),e._resetInsertionMode());break}case v.TEMPLATE:{Oo(e,t);break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:Ff(e,t)}}function Ff(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,lp(e,t),e.fosterParentingEnabled=n}function f6(e,t){e.pendingCharacterTokens.push(t)}function d6(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Tc(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ff(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const h6=new Set([v.CAPTION,v.COL,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]);function PW(e,t){const n=t.tagID;h6.has(n)?e.openElements.hasInTableScope(v.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(v.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,iu(e,t)):qn(e,t)}function jW(e,t){const n=t.tagID;switch(n){case v.CAPTION:case v.TABLE:{e.openElements.hasInTableScope(v.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(v.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,n===v.TABLE&&hf(e,t));break}case v.BODY:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:up(e,t)}}function hE(e,t){switch(t.tagID){case v.HTML:{qn(e,t);break}case v.COL:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case v.TEMPLATE:{xi(e,t);break}default:Em(e,t)}}function BW(e,t){switch(t.tagID){case v.COLGROUP:{e.openElements.currentTagId===v.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break}case v.TEMPLATE:{Oo(e,t);break}case v.COL:break;default:Em(e,t)}}function Em(e,t){e.openElements.currentTagId===v.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE,e._processToken(t))}function cp(e,t){switch(t.tagID){case v.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ge.HTML),e.insertionMode=Y.IN_ROW;break}case v.TH:case v.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(re.TR,v.TR),e.insertionMode=Y.IN_ROW,fp(e,t);break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,iu(e,t));break}default:iu(e,t)}}function my(e,t){const n=t.tagID;switch(t.tagID){case v.TBODY:case v.TFOOT:case v.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break}case v.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,hf(e,t));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:case v.TR:break;default:hf(e,t)}}function fp(e,t){switch(t.tagID){case v.TH:case v.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ge.HTML),e.insertionMode=Y.IN_CELL,e.activeFormattingElements.insertMarker();break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{e.openElements.hasInTableScope(v.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,cp(e,t));break}default:iu(e,t)}}function m6(e,t){switch(t.tagID){case v.TR:{e.openElements.hasInTableScope(v.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY);break}case v.TABLE:{e.openElements.hasInTableScope(v.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,my(e,t));break}case v.TBODY:case v.TFOOT:case v.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(v.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,my(e,t));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:break;default:hf(e,t)}}function FW(e,t){const n=t.tagID;h6.has(n)?(e.openElements.hasInTableScope(v.TD)||e.openElements.hasInTableScope(v.TH))&&(e._closeTableCell(),fp(e,t)):qn(e,t)}function UW(e,t){const n=t.tagID;switch(n){case v.TD:case v.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_ROW);break}case v.TABLE:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),m6(e,t));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:break;default:up(e,t)}}function p6(e,t){switch(t.tagID){case v.HTML:{qn(e,t);break}case v.OPTION:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case v.OPTGROUP:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e.openElements.currentTagId===v.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case v.HR:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e.openElements.currentTagId===v.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case v.INPUT:case v.KEYGEN:case v.TEXTAREA:case v.SELECT:{e.openElements.hasInSelectScope(v.SELECT)&&(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode(),t.tagID!==v.SELECT&&e._processStartTag(t));break}case v.SCRIPT:case v.TEMPLATE:{xi(e,t);break}}}function g6(e,t){switch(t.tagID){case v.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===v.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===v.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===v.OPTGROUP&&e.openElements.pop();break}case v.OPTION:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop();break}case v.SELECT:{e.openElements.hasInSelectScope(v.SELECT)&&(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode());break}case v.TEMPLATE:{Oo(e,t);break}}}function HW(e,t){const n=t.tagID;n===v.CAPTION||n===v.TABLE||n===v.TBODY||n===v.TFOOT||n===v.THEAD||n===v.TR||n===v.TD||n===v.TH?(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode(),e._processStartTag(t)):p6(e,t)}function zW(e,t){const n=t.tagID;n===v.CAPTION||n===v.TABLE||n===v.TBODY||n===v.TFOOT||n===v.THEAD||n===v.TR||n===v.TD||n===v.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode(),e.onEndTag(t)):g6(e,t)}function VW(e,t){switch(t.tagID){case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{xi(e,t);break}case v.CAPTION:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{e.tmplInsertionModeStack[0]=Y.IN_TABLE,e.insertionMode=Y.IN_TABLE,iu(e,t);break}case v.COL:{e.tmplInsertionModeStack[0]=Y.IN_COLUMN_GROUP,e.insertionMode=Y.IN_COLUMN_GROUP,hE(e,t);break}case v.TR:{e.tmplInsertionModeStack[0]=Y.IN_TABLE_BODY,e.insertionMode=Y.IN_TABLE_BODY,cp(e,t);break}case v.TD:case v.TH:{e.tmplInsertionModeStack[0]=Y.IN_ROW,e.insertionMode=Y.IN_ROW,fp(e,t);break}default:e.tmplInsertionModeStack[0]=Y.IN_BODY,e.insertionMode=Y.IN_BODY,qn(e,t)}}function qW(e,t){t.tagID===v.TEMPLATE&&Oo(e,t)}function b6(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(v.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):dE(e,t)}function $W(e,t){t.tagID===v.HTML?qn(e,t):Tm(e,t)}function y6(e,t){var n;if(t.tagID===v.HTML){if(e.fragmentContext||(e.insertionMode=Y.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===v.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 Tm(e,t)}function Tm(e,t){e.insertionMode=Y.IN_BODY,lp(e,t)}function YW(e,t){switch(t.tagID){case v.HTML:{qn(e,t);break}case v.FRAMESET:{e._insertElement(t,ge.HTML);break}case v.FRAME:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case v.NOFRAMES:{xi(e,t);break}}}function GW(e,t){t.tagID===v.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==v.FRAMESET&&(e.insertionMode=Y.AFTER_FRAMESET))}function KW(e,t){switch(t.tagID){case v.HTML:{qn(e,t);break}case v.NOFRAMES:{xi(e,t);break}}}function QW(e,t){t.tagID===v.HTML&&(e.insertionMode=Y.AFTER_AFTER_FRAMESET)}function XW(e,t){t.tagID===v.HTML?qn(e,t):Gh(e,t)}function Gh(e,t){e.insertionMode=Y.IN_BODY,lp(e,t)}function WW(e,t){switch(t.tagID){case v.HTML:{qn(e,t);break}case v.NOFRAMES:{xi(e,t);break}}}function ZW(e,t){t.chars=$t,e._insertCharacters(t)}function JW(e,t){e._insertCharacters(t),e.framesetOk=!1}function x6(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 eZ(e,t){if(pX(t))x6(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ge.MATHML?n6(t):r===ge.SVG&&(gX(t),r6(t)),cE(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function tZ(e,t){if(t.tagID===v.P||t.tagID===v.BR){x6(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 dp=E6("end"),Vi=E6("start");function E6(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 T6(e){const t=Vi(e),n=dp(e);if(t&&n)return{start:t,end:n}}const nZ=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,rZ=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),JA={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function v6(e,t){const n=hZ(e),r=$M("type",{handlers:{root:iZ,element:sZ,text:aZ,comment:C6,doctype:oZ,raw:uZ},unknown:cZ}),s={parser:n?new XA(JA):XA.getFragmentParser(void 0,JA),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),Eu(s,Vi());const o=n?s.parser.document:s.parser.getFragment(),l=mQ(o,{file:s.options.file});return s.stitches&&ru(l,"comment",function(c,f,d){const m=c;if(m.value.stitch&&d&&f!==void 0){const p=d.children;return p[f]=m.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function S6(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function iZ(e,t){S6(e.children,t)}function sZ(e,t){fZ(e,t),S6(e.children,t),dZ(e,t)}function aZ(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:at.CHARACTER,chars:e.value,location:Uf(e)};Eu(t,Vi(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function oZ(e,t){const n={type:at.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Uf(e)};Eu(t,Vi(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function lZ(e,t){t.stitches=!0;const n=mZ(e);if("children"in e&&"children"in n){const r=v6({type:"root",children:e.children},t.options);n.children=r.children}C6({type:"comment",value:{stitch:n}},t)}function C6(e,t){const n=e.value,r={type:at.COMMENT,data:n,location:Uf(e)};Eu(t,Vi(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function uZ(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,w6(t,Vi(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(nZ,"&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 cZ(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))lZ(n,t);else{let r="";throw rZ.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 Eu(e,t){w6(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=an.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 w6(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 fZ(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===an.PLAINTEXT)return;Eu(t,Vi(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=xQ({...e,children:[]},{space:s===ro.svg?"svg":"html"}),l={type:at.START_TAG,tagName:n,tagID:xu(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Uf(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function dZ(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&_Q.includes(n)||t.parser.tokenizer.state===an.PLAINTEXT)return;Eu(t,dp(e));const r={type:at.END_TAG,tagName:n,tagID:xu(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Uf(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===an.RCDATA||t.parser.tokenizer.state===an.RAWTEXT||t.parser.tokenizer.state===an.SCRIPT_DATA)&&(t.parser.tokenizer.state=an.DATA)}function hZ(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Uf(e){const t=Vi(e)||{line:void 0,column:void 0,offset:void 0},n=dp(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 mZ(e){return"children"in e?So({...e,children:[]}):So(e)}function pZ(e){return function(t,n){return v6(t,{...e,file:n})}}const Xa=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],e_={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Xa,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Xa],h2:[["className","sr-only"]],img:[...Xa,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Xa,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Xa],table:[...Xa],ul:[...Xa,["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 gZ(e,t){let n={type:"root",children:[]};const r={schema:t?{...e_,...t}:e_,stack:[]},s=A6(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function A6(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return bZ(e,n);case"doctype":return yZ(e,n);case"element":return xZ(e,n);case"root":return EZ(e,n);case"text":return TZ(e,n)}}}function bZ(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 Hf(o,t),o}}function yZ(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Hf(n,t),n}}function xZ(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=_6(e,t.children),s=vZ(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 c=e.schema.ancestors[n];let f=-1;for(o=!1;++f<c.length;)e.stack.includes(c[f])&&(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 Hf(l,t),l}function EZ(e,t){const r={type:"root",children:_6(e,t.children)};return Hf(r,t),r}function TZ(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Hf(r,t),r}function _6(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const o=A6(e,r[s]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function vZ(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,c=t&&typeof t=="object"?t:{},f={};let d;for(d in c)if(ia.call(c,d)){const m=c[d];let p=t_(e,n_(o,d),d,m);p==null&&(p=t_(e,n_(l,d),d,m)),p!=null&&(f[d]=p)}if(s&&ia.call(s,n)){const m=s[n];for(d in m)ia.call(m,d)&&!ia.call(f,d)&&(f[d]=m[d])}return f}function t_(e,t,n,r){return t?Array.isArray(r)?SZ(e,t,n,r):k6(e,t,n,r):void 0}function SZ(e,t,n,r){let s=-1;const o=[];for(;++s<r.length;){const l=k6(e,t,n,r[s]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function k6(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&CZ(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 CZ(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("?"),c=s.indexOf("#"),f=s.indexOf("/");if(o<0||f>-1&&o>f||l>-1&&o>l||c>-1&&o>c)return!0;let d=-1;for(;++d<r.length;){const m=r[d];if(o===m.length&&s.slice(0,m.length)===m)return!0}return!1}function Hf(e,t){const n=T6(t);t.data&&(e.data=So(t.data)),n&&(e.position=n)}function n_(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 wZ(e){return function(t){return gZ(t,e)}}function r_(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 er=ka(/[A-Za-z]/),zn=ka(/[\dA-Za-z]/),AZ=ka(/[#-'*+\--9=?A-Z^-~]/);function vm(e){return e!==null&&(e<32||e===127)}const py=ka(/\d/),_Z=ka(/[\dA-Fa-f]/),kZ=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 hp=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 NZ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function RZ(e,t,n){const s=ip((n||{}).ignore||[]),o=DZ(t);let l=-1;for(;++l<o.length;)NM(e,"text",c);function c(d,m){let p=-1,b;for(;++p<m.length;){const x=m[p],S=b?b.children:void 0;if(s(x,S?S.indexOf(x):void 0,b))return;b=x}if(b)return f(d,m)}function f(d,m){const p=m[m.length-1],b=o[l][0],x=o[l][1];let S=0;const w=p.children.indexOf(d);let A=!1,N=[];b.lastIndex=0;let k=b.exec(d.value);for(;k;){const R=k.index,B={index:k.index,input:k.input,stack:[...m,d]};let O=x(...k,B);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?b.lastIndex=R+1:(S!==R&&N.push({type:"text",value:d.value.slice(S,R)}),Array.isArray(O)?N.push(...O):O&&N.push(O),S=R+k[0].length,A=!0),!b.global)break;k=b.exec(d.value)}return A?(S<d.value.length&&N.push({type:"text",value:d.value.slice(S)}),p.children.splice(w,1,...N)):N=[d],w+N.length}}function DZ(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([OZ(s[0]),MZ(s[1])])}return t}function OZ(e){return typeof e=="string"?new RegExp(NZ(e),"g"):e}function MZ(e){return typeof e=="function"?e:function(){return e}}const P1="phrasing",j1=["autolink","link","image","label"];function IZ(){return{transforms:[HZ],enter:{literalAutolink:PZ,literalAutolinkEmail:B1,literalAutolinkHttp:B1,literalAutolinkWww:B1},exit:{literalAutolink:UZ,literalAutolinkEmail:FZ,literalAutolinkHttp:jZ,literalAutolinkWww:BZ}}}function LZ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:P1,notInConstruct:j1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:P1,notInConstruct:j1},{character:":",before:"[ps]",after:"\\/",inConstruct:P1,notInConstruct:j1}]}}function PZ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function B1(e){this.config.enter.autolinkProtocol.call(this,e)}function jZ(e){this.config.exit.autolinkProtocol.call(this,e)}function BZ(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 FZ(e){this.config.exit.autolinkEmail.call(this,e)}function UZ(e){this.exit(e)}function HZ(e){RZ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zZ],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),VZ]],{ignore:["link","linkReference"]})}function zZ(e,t,n,r,s){let o="";if(!N6(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!qZ(n)))return!1;const l=$Z(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function VZ(e,t,n,r){return!N6(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function qZ(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 $Z(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=r_(e,"(");let o=r_(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 N6(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Co(n)||hp(n))&&(!t||n!==47)}function hi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}R6.peek=eJ;function YZ(){this.buffer()}function GZ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function KZ(){this.buffer()}function QZ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function XZ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WZ(e){this.exit(e)}function ZZ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function JZ(e){this.exit(e)}function eJ(){return"["}function R6(e,t,n,r){const s=n.createTracker(r);let o=s.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),c(),l(),o+=s.move("]"),o}function tJ(){return{enter:{gfmFootnoteCallString:YZ,gfmFootnoteCall:GZ,gfmFootnoteDefinitionLabelString:KZ,gfmFootnoteDefinition:QZ},exit:{gfmFootnoteCallString:XZ,gfmFootnoteCall:WZ,gfmFootnoteDefinitionLabelString:ZZ,gfmFootnoteDefinition:JZ}}}function nJ(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:R6},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,o,l){const c=o.createTracker(l);let f=c.move("[^");const d=o.enter("footnoteDefinition"),m=o.enter("label");return f+=c.move(o.safe(o.associationId(r),{before:f,after:"]"})),m(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
366
- `:" ")+o.indentLines(o.containerFlow(r,c.current()),t?D6:rJ))),d(),f}}function rJ(e,t,n){return t===0?e:D6(e,t,n)}function D6(e,t,n){return(n?"":" ")+e}const iJ=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];O6.peek=uJ;function sJ(){return{canContainEols:["delete"],enter:{strikethrough:oJ},exit:{strikethrough:lJ}}}function aJ(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:iJ}],handlers:{delete:O6}}}function oJ(e){this.enter({type:"delete",children:[]},e)}function lJ(e){this.exit(e)}function O6(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 uJ(){return"~"}function cJ(e){return e.length}function fJ(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||cJ,o=[],l=[],c=[],f=[];let d=0,m=-1;for(;++m<e.length;){const C=[],w=[];let A=-1;for(e[m].length>d&&(d=e[m].length);++A<e[m].length;){const N=dJ(e[m][A]);if(n.alignDelimiters!==!1){const k=s(N);w[A]=k,(f[A]===void 0||k>f[A])&&(f[A]=k)}C.push(N)}l[m]=C,c[m]=w}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<d;)o[p]=i_(r[p]);else{const C=i_(r);for(;++p<d;)o[p]=C}p=-1;const b=[],x=[];for(;++p<d;){const C=o[p];let w="",A="";C===99?(w=":",A=":"):C===108?w=":":C===114&&(A=":");let N=n.alignDelimiters===!1?1:Math.max(1,f[p]-w.length-A.length);const k=w+"-".repeat(N)+A;n.alignDelimiters!==!1&&(N=w.length+N+A.length,N>f[p]&&(f[p]=N),x[p]=N),b[p]=k}l.splice(1,0,b),c.splice(1,0,x),m=-1;const S=[];for(;++m<l.length;){const C=l[m],w=c[m];p=-1;const A=[];for(;++p<d;){const N=C[p]||"";let k="",R="";if(n.alignDelimiters!==!1){const B=f[p]-(w[p]||0),O=o[p];O===114?k=" ".repeat(B):O===99?B%2?(k=" ".repeat(B/2+.5),R=" ".repeat(B/2-.5)):(k=" ".repeat(B/2),R=k):R=" ".repeat(B)}n.delimiterStart!==!1&&!p&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||p)&&A.push(" "),n.alignDelimiters!==!1&&A.push(k),A.push(N),n.alignDelimiters!==!1&&A.push(R),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||p!==d-1)&&A.push("|")}S.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return S.join(`
367
- `)}function dJ(e){return e==null?"":String(e)}function i_(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 hJ(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()),mJ);return s(),l}function mJ(e,t,n){return">"+(n?"":" ")+e}function pJ(e,t){return s_(e,t.inConstruct,!0)&&!s_(e,t.notInConstruct,!1)}function s_(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 a_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
368
- `&&pJ(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
369
- `}function gJ(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 bJ(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 yJ(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 xJ(e,t,n,r){const s=yJ(n),o=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(bJ(e,n)){const p=n.enter("codeIndented"),b=n.indentLines(o,EJ);return p(),b}const c=n.createTracker(r),f=s.repeat(Math.max(gJ(o,s)+1,3)),d=n.enter("codeFenced");let m=c.move(f);if(e.lang){const p=n.enter(`codeFencedLang${l}`);m+=c.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...c.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${l}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,{before:m,after:`
370
- `,encode:["`"],...c.current()})),p()}return m+=c.move(`
371
- `),o&&(m+=c.move(o+`
372
- `)),m+=c.move(f),d(),m}function EJ(e,t,n){return(n?"":" ")+e}function mE(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 TJ(e,t,n,r){const s=mE(n),o=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("[");return d+=f.move(n.safe(n.associationId(e),{before:d,after:"]",...f.current()})),d+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":`
373
- `,...f.current()}))),c(),e.title&&(c=n.enter(`title${o}`),d+=f.move(" "+s),d+=f.move(n.safe(e.title,{before:d,after:s,...f.current()})),d+=f.move(s),c()),l(),d}function vJ(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 mf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function su(e){if(e===null||jt(e)||Co(e))return 1;if(hp(e))return 2}function Sm(e,t,n){const r=su(e),s=su(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}}M6.peek=SJ;function M6(e,t,n,r){const s=vJ(n),o=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let f=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=f.charCodeAt(0),m=Sm(r.before.charCodeAt(r.before.length-1),d,s);m.inside&&(f=mf(d)+f.slice(1));const p=f.charCodeAt(f.length-1),b=Sm(r.after.charCodeAt(0),p,s);b.inside&&(f=f.slice(0,-1)+mf(p));const x=l.move(s);return o(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+x}function SJ(e,t,n){return n.options.emphasis||"*"}const CJ={};function pE(e,t){const n=CJ,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return I6(e,r,s)}function I6(e,t,n){if(wJ(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 o_(e.children,t,n)}return Array.isArray(e)?o_(e,t,n):""}function o_(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=I6(e[s],t,n);return r.join("")}function wJ(e){return!!(e&&typeof e=="object")}function AJ(e,t){let n=!1;return ru(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ay}),!!((!e.depth||e.depth<3)&&pE(e)&&(t.options.setext||n))}function _J(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(AJ(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),b=n.containerPhrasing(e,{...o.current(),before:`
374
- `,after:`
375
- `});return p(),m(),b+`
376
- `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
377
- `))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),f=n.enter("phrasing");o.move(l+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
378
- `,...o.current()});return/^[\t ]/.test(d)&&(d=mf(d.charCodeAt(0))+d.slice(1)),d=d?l+" "+d:l,n.options.closeAtx&&(d+=" "+l),f(),c(),d}L6.peek=kJ;function L6(e){return e.value||""}function kJ(){return"<"}P6.peek=NJ;function P6(e,t,n,r){const s=mE(n),o=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("![");return d+=f.move(n.safe(e.alt,{before:d,after:"]",...f.current()})),d+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${o}`),d+=f.move(" "+s),d+=f.move(n.safe(e.title,{before:d,after:s,...f.current()})),d+=f.move(s),c()),d+=f.move(")"),l(),d}function NJ(){return"!"}j6.peek=RJ;function j6(e,t,n,r){const s=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");const d=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=m,o(),s==="full"||!d||d!==p?f+=c.move(p+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function RJ(){return"!"}B6.peek=DJ;function B6(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],c=n.compilePattern(l);let f;if(l.atBreak)for(;f=c.exec(r);){let d=f.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(f.index+1)}}return s+r+s}function DJ(){return"`"}function F6(e,t){const n=pE(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))}U6.peek=OJ;function U6(e,t,n,r){const s=mE(n),o=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,f;if(F6(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let p=l.move("<");return p+=l.move(n.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),c(),n.stack=m,p}c=n.enter("link"),f=n.enter("label");let d=l.move("[");return d+=l.move(n.containerPhrasing(e,{before:d,after:"](",...l.current()})),d+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(f=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${o}`),d+=l.move(" "+s),d+=l.move(n.safe(e.title,{before:d,after:s,...l.current()})),d+=l.move(s),f()),d+=l.move(")"),c(),d}function OJ(e,t,n){return F6(e,n)?"<":"["}H6.peek=MJ;function H6(e,t,n,r){const s=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");const d=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=m,o(),s==="full"||!d||d!==p?f+=c.move(p+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function MJ(){return"["}function gE(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 IJ(e){const t=gE(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 LJ(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 z6(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 PJ(e,t,n,r){const s=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?LJ(n):gE(n);const c=e.ordered?l==="."?")":".":IJ(n);let f=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&&(f=!0),z6(n)===l&&m){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const d=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,s(),d}function jJ(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 BJ(e,t,n,r){const s=jJ(n);let o=n.bulletCurrent||gE(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 c=n.createTracker(r);c.move(o+" ".repeat(l-o.length)),c.shift(l);const f=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,c.current()),m);return f(),d;function m(p,b,x){return b?(x?"":" ".repeat(l))+p:(x?o:o+" ".repeat(l-o.length))+p}}function FJ(e,t,n,r){const s=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),s(),l}const UJ=ip(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function HJ(e,t,n,r){return(e.children.some(function(l){return UJ(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function zJ(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}V6.peek=VJ;function V6(e,t,n,r){const s=zJ(n),o=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let f=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=f.charCodeAt(0),m=Sm(r.before.charCodeAt(r.before.length-1),d,s);m.inside&&(f=mf(d)+f.slice(1));const p=f.charCodeAt(f.length-1),b=Sm(r.after.charCodeAt(0),p,s);b.inside&&(f=f.slice(0,-1)+mf(p));const x=l.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+f+x}function VJ(e,t,n){return n.options.strong||"*"}function qJ(e,t,n,r){return n.safe(e.value,r)}function $J(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 YJ(e,t,n){const r=(z6(n)+(n.options.ruleSpaces?" ":"")).repeat($J(n));return n.options.ruleSpaces?r.slice(0,-1):r}const q6={blockquote:hJ,break:a_,code:xJ,definition:TJ,emphasis:M6,hardBreak:a_,heading:_J,html:L6,image:P6,imageReference:j6,inlineCode:B6,link:U6,linkReference:H6,list:PJ,listItem:BJ,paragraph:FJ,root:HJ,strong:V6,text:qJ,thematicBreak:YJ},l_=document.createElement("i");function bE(e){const t="&"+e+";";l_.innerHTML=t;const n=l_.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function $6(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 GJ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function KJ(e){return e.replace(GJ,QJ)}function QJ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return $6(n.slice(o?2:1),o?16:10)}return bE(n)||e}function XJ(){return{enter:{table:WJ,tableData:u_,tableHeader:u_,tableRow:JJ},exit:{codeText:eee,table:ZJ,tableData:F1,tableHeader:F1,tableRow:F1}}}function WJ(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 ZJ(e){this.exit(e),this.data.inTable=void 0}function JJ(e){this.enter({type:"tableRow",children:[]},e)}function F1(e){this.exit(e)}function u_(e){this.enter({type:"tableCell",children:[]},e)}function eee(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,tee));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function tee(e,t){return t==="|"?t:e}function nee(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
379
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:f,tableRow:c}};function l(x,S,C,w){return d(m(x,C,w),x.align)}function c(x,S,C,w){const A=p(x,C,w),N=d([A]);return N.slice(0,N.indexOf(`
380
- `))}function f(x,S,C,w){const A=C.enter("tableCell"),N=C.enter("phrasing"),k=C.containerPhrasing(x,{...w,before:o,after:o});return N(),A(),k}function d(x,S){return fJ(x,{align:S,alignDelimiters:r,padding:n,stringLength:s})}function m(x,S,C){const w=x.children;let A=-1;const N=[],k=S.enter("table");for(;++A<w.length;)N[A]=p(w[A],S,C);return k(),N}function p(x,S,C){const w=x.children;let A=-1;const N=[],k=S.enter("tableRow");for(;++A<w.length;)N[A]=f(w[A],x,S,C);return k(),N}function b(x,S,C){let w=q6.inlineCode(x,S,C);return C.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function ree(){return{exit:{taskListCheckValueChecked:c_,taskListCheckValueUnchecked:c_,paragraph:see}}}function iee(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:aee}}}function c_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function see(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 c=s[o];if(c.type==="paragraph"){l=c;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 aee(e,t,n,r){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);o&&c.move(l);let f=q6.listItem(e,t,n,{...r,...c.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),f;function d(m){return m+l}}function oee(){return[IZ(),tJ(),sJ(),XJ(),ree()]}function lee(e){return{extensions:[LZ(),nJ(e),aJ(),nee(e),iee()]}}function Rr(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 Yr(e,t){return e.length>0?(Rr(e,e.length,0,t),e):t}const f_={}.hasOwnProperty;function Y6(e){const t={};let n=-1;for(;++n<e.length;)uee(t,e[n]);return t}function uee(e,t){let n;for(n in t){const s=(f_.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){f_.call(s,l)||(s[l]=[]);const c=o[l];cee(s[l],Array.isArray(c)?c:c?[c]:[])}}}function cee(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rr(e,0,0,r)}const fee={tokenize:bee,partial:!0},G6={tokenize:yee,partial:!0},K6={tokenize:xee,partial:!0},Q6={tokenize:Eee,partial:!0},dee={tokenize:Tee,partial:!0},X6={name:"wwwAutolink",tokenize:pee,previous:Z6},W6={name:"protocolAutolink",tokenize:gee,previous:J6},Ss={name:"emailAutolink",tokenize:mee,previous:eI},qi={};function hee(){return{text:qi}}let Wa=48;for(;Wa<123;)qi[Wa]=Ss,Wa++,Wa===58?Wa=65:Wa===91&&(Wa=97);qi[43]=Ss;qi[45]=Ss;qi[46]=Ss;qi[95]=Ss;qi[72]=[Ss,W6];qi[104]=[Ss,W6];qi[87]=[Ss,X6];qi[119]=[Ss,X6];function mee(e,t,n){const r=this;let s,o;return l;function l(p){return!gy(p)||!eI.call(r,r.previous)||yE(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(p))}function c(p){return gy(p)?(e.consume(p),c):p===64?(e.consume(p),f):n(p)}function f(p){return p===46?e.check(dee,m,d)(p):p===45||p===95||zn(p)?(o=!0,e.consume(p),f):m(p)}function d(p){return e.consume(p),s=!0,f}function m(p){return o&&s&&er(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function pee(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!Z6.call(r,r.previous)||yE(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(fee,e.attempt(G6,e.attempt(K6,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function gee(e,t,n){const r=this;let s="",o=!1;return l;function l(p){return(p===72||p===104)&&J6.call(r,r.previous)&&!yE(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),c):n(p)}function c(p){if(er(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),c;if(p===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(p),f}return n(p)}function f(p){return p===47?(e.consume(p),o?d:(o=!0,f)):n(p)}function d(p){return p===null||vm(p)||jt(p)||Co(p)||hp(p)?n(p):e.attempt(G6,e.attempt(K6,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function bee(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 yee(e,t,n){let r,s,o;return l;function l(d){return d===46||d===95?e.check(Q6,f,c)(d):d===null||jt(d)||Co(d)||d!==45&&hp(d)?f(d):(o=!0,e.consume(d),l)}function c(d){return d===95?r=!0:(s=r,r=void 0),e.consume(d),l}function f(d){return s||r||!o?n(d):t(d)}}function xee(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(Q6,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 Eee(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),o):c===93?(e.consume(c),s):c===60||c===null||jt(c)||Co(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||jt(c)||Co(c)?t(c):r(c)}function o(c){return er(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):er(c)?(e.consume(c),l):n(c)}}function Tee(e,t,n){return r;function r(o){return e.consume(o),s}function s(o){return zn(o)?n(o):t(o)}}function Z6(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||jt(e)}function J6(e){return!er(e)}function eI(e){return!(e===47||gy(e))}function gy(e){return e===43||e===45||e===46||e===95||zn(e)}function yE(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 Tu(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&zn(e.charCodeAt(n+1))&&zn(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 c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(l=String.fromCharCode(o,c),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 mp(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 by={name:"attention",resolveAll:vee,tokenize:See};function vee(e,t){let n=-1,r,s,o,l,c,f,d,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;f=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},b={...e[n][1].start};d_(p,-f),d_(b,f),l={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},o={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Yr(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=Yr(d,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",o,t]]),d=Yr(d,mp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=Yr(d,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,d=Yr(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Rr(e,r-1,n-r+3,d),n=r+d.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function See(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=su(r);let o;return l;function l(f){return o=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===o)return e.consume(f),c;const d=e.exit("attentionSequence"),m=su(f),p=!m||m===2&&s||n.includes(f),b=!s||s===2&&m||n.includes(r);return d._open=!!(o===42?p:p&&(s||!b)),d._close=!!(o===42?b:b&&(m||!p)),t(f)}}function d_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Cee={name:"autolink",tokenize:wee};function wee(e,t,n){let r=0;return s;function s(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return er(x)?(e.consume(x),l):x===64?n(x):d(x)}function l(x){return x===43||x===45||x===46||zn(x)?(r=1,c(x)):d(x)}function c(x){return x===58?(e.consume(x),r=0,f):(x===43||x===45||x===46||zn(x))&&r++<32?(e.consume(x),c):(r=0,d(x))}function f(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||vm(x)?n(x):(e.consume(x),f)}function d(x){return x===64?(e.consume(x),m):AZ(x)?(e.consume(x),d):n(x)}function m(x){return zn(x)?p(x):n(x)}function p(x){return x===46?(e.consume(x),r=0,m):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):b(x)}function b(x){if((x===45||zn(x))&&r++<63){const S=x===45?b:p;return e.consume(x),S}return n(x)}}function bt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(f){return ut(f)?(e.enter(n),c(f)):t(f)}function c(f){return ut(f)&&o++<s?(e.consume(f),c):(e.exit(n),t(f))}}const zf={partial:!0,tokenize:Aee};function Aee(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 tI={continuation:{tokenize:kee},exit:Nee,name:"blockQuote",tokenize:_ee};function _ee(e,t,n){const r=this;return s;function s(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.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 kee(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(tI,t,n)(l)}}function Nee(e){e.exit("blockQuote")}const nI={name:"characterEscape",tokenize:Ree};function Ree(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 kZ(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const rI={name:"characterReference",tokenize:Dee};function Dee(e,t,n){const r=this;let s=0,o,l;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),f}function f(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),o=31,l=zn,m(p))}function d(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=_Z,m):(e.enter("characterReferenceValue"),o=7,l=py,m(p))}function m(p){if(p===59&&s){const b=e.exit("characterReferenceValue");return l===zn&&!bE(r.sliceSerialize(b))?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 h_={partial:!0,tokenize:Mee},m_={concrete:!0,name:"codeFenced",tokenize:Oee};function Oee(e,t,n){const r=this,s={partial:!0,tokenize:B};let o=0,l=0,c;return f;function f(O){return d(O)}function d(O){const j=r.events[r.events.length-1];return o=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,c=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(O)}function m(O){return O===c?(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(h_,C,R)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(O))}function b(O){return O===null||ze(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(O)):ut(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),bt(e,x,"whitespace")(O)):O===96&&O===c?n(O):(e.consume(O),b)}function x(O){return O===null||ze(O)?p(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(O))}function S(O){return O===null||ze(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(O)):O===96&&O===c?n(O):(e.consume(O),S)}function C(O){return e.attempt(s,R,w)(O)}function w(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),A}function A(O){return o>0&&ut(O)?bt(e,N,"linePrefix",o+1)(O):N(O)}function N(O){return O===null||ze(O)?e.check(h_,C,R)(O):(e.enter("codeFlowValue"),k(O))}function k(O){return O===null||ze(O)?(e.exit("codeFlowValue"),N(O)):(e.consume(O),k)}function R(O){return e.exit("codeFenced"),t(O)}function B(O,j,P){let q=0;return L;function L(Z){return O.enter("lineEnding"),O.consume(Z),O.exit("lineEnding"),X}function X(Z){return O.enter("codeFencedFence"),ut(Z)?bt(O,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):Q(Z)}function Q(Z){return Z===c?(O.enter("codeFencedFenceSequence"),ee(Z)):P(Z)}function ee(Z){return Z===c?(q++,O.consume(Z),ee):q>=l?(O.exit("codeFencedFenceSequence"),ut(Z)?bt(O,ne,"whitespace")(Z):ne(Z)):P(Z)}function ne(Z){return Z===null||ze(Z)?(O.exit("codeFencedFence"),j(Z)):P(Z)}}}function Mee(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 U1={name:"codeIndented",tokenize:Lee},Iee={partial:!0,tokenize:Pee};function Lee(e,t,n){const r=this;return s;function s(d){return e.enter("codeIndented"),bt(e,o,"linePrefix",5)(d)}function o(d){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?l(d):n(d)}function l(d){return d===null?f(d):ze(d)?e.attempt(Iee,l,f)(d):(e.enter("codeFlowValue"),c(d))}function c(d){return d===null||ze(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),c)}function f(d){return e.exit("codeIndented"),t(d)}}function Pee(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 c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):ze(l)?s(l):n(l)}}const jee={name:"codeText",previous:Fee,resolve:Bee,tokenize:Uee};function Bee(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 Fee(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Uee(e,t,n){let r=0,s,o;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),r++,c):(e.exit("codeTextSequence"),f(p))}function f(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),f):p===96?(o=e.enter("codeTextSequence"),s=0,m(p)):ze(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("codeTextData"),d(p))}function d(p){return p===null||p===32||p===96||ze(p)?(e.exit("codeTextData"),f(p)):(e.consume(p),d)}function m(p){return p===96?(e.consume(p),s++,m):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",d(p))}}class Hee{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&&vc(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),vc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),vc(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);vc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);vc(this.left,n.reverse())}}}function vc(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 iI(e){const t={};let n=-1,r,s,o,l,c,f,d;const m=new Hee(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"&&(f=r[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,zee(m,n)),n=t[n],d=!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},c=m.slice(s,n),c.unshift(r),m.splice(s,n-s+1,c))}}return Rr(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!d}function zee(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 c=l.events,f=[],d={};let m,p,b=-1,x=n,S=0,C=0;const w=[C];for(;x;){for(;e.get(++s)[1]!==x;);o.push(s),x._tokenizer||(m=r.sliceStream(x),x.next||m.push(null),p&&l.defineSkip(x.start),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(m),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=x,x=x.next}for(x=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(C=b+1,w.push(C),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(l.events=[],x?(x._tokenizer=void 0,x.previous=void 0):w.pop(),b=w.length;b--;){const A=c.slice(w[b],w[b+1]),N=o.pop();f.push([N,N+A.length-1]),e.splice(N,2,A)}for(f.reverse(),b=-1;++b<f.length;)d[S+f[b][0]]=S+f[b][1],S+=f[b][1]-f[b][0]-1;return d}const Vee={resolve:$ee,tokenize:Yee},qee={partial:!0,tokenize:Gee};function $ee(e){return iI(e),e}function Yee(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?o(c):ze(c)?e.check(qee,l,o)(c):(e.consume(c),s)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function Gee(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 c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function sI(e,t,n,r,s,o,l,c,f){const d=f||Number.POSITIVE_INFINITY;let m=0;return p;function p(A){return A===60?(e.enter(r),e.enter(s),e.enter(o),e.consume(A),e.exit(o),b):A===null||A===32||A===41||vm(A)?n(A):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),C(A))}function b(A){return A===62?(e.enter(o),e.consume(A),e.exit(o),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),x(A))}function x(A){return A===62?(e.exit("chunkString"),e.exit(c),b(A)):A===null||A===60||ze(A)?n(A):(e.consume(A),A===92?S:x)}function S(A){return A===60||A===62||A===92?(e.consume(A),x):x(A)}function C(A){return!m&&(A===null||A===41||jt(A))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(A)):m<d&&A===40?(e.consume(A),m++,C):A===41?(e.consume(A),m--,C):A===null||A===32||A===40||vm(A)?n(A):(e.consume(A),A===92?w:C)}function w(A){return A===40||A===41||A===92?(e.consume(A),C):C(A)}}function aI(e,t,n,r,s,o){const l=this;let c=0,f;return d;function d(x){return e.enter(r),e.enter(s),e.consume(x),e.exit(s),e.enter(o),m}function m(x){return c>999||x===null||x===91||x===93&&!f||x===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(x):x===93?(e.exit(o),e.enter(s),e.consume(x),e.exit(s),e.exit(r),t):ze(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||x===91||x===93||ze(x)||c++>999?(e.exit("chunkString"),m(x)):(e.consume(x),f||(f=!ut(x)),x===92?b:p)}function b(x){return x===91||x===92||x===93?(e.consume(x),c++,p):p(x)}}function oI(e,t,n,r,s,o){let l;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),l=b===40?41:b,f):n(b)}function f(b){return b===l?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(o),d(b))}function d(b){return b===l?(e.exit(o),f(l)):b===null?n(b):ze(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),bt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===l||b===null||ze(b)?(e.exit("chunkString"),d(b)):(e.consume(b),b===92?p:m)}function p(b){return b===l||b===92?(e.consume(b),m):m(b)}}function Gc(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 Kee={name:"definition",tokenize:Xee},Qee={partial:!0,tokenize:Wee};function Xee(e,t,n){const r=this;let s;return o;function o(x){return e.enter("definition"),l(x)}function l(x){return aI.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function c(x){return s=hi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),f):n(x)}function f(x){return jt(x)?Gc(e,d)(x):d(x)}function d(x){return sI(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(Qee,p,p)(x)}function p(x){return ut(x)?bt(e,b,"whitespace")(x):b(x)}function b(x){return x===null||ze(x)?(e.exit("definition"),r.parser.defined.push(s),t(x)):n(x)}}function Wee(e,t,n){return r;function r(c){return jt(c)?Gc(e,s)(c):n(c)}function s(c){return oI(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return ut(c)?bt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||ze(c)?t(c):n(c)}}const Zee={name:"hardBreakEscape",tokenize:Jee};function Jee(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 ete={name:"headingAtx",resolve:tte,tokenize:nte};function tte(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"},Rr(e,r,n-r+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function nte(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"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||ze(m)?(e.exit("atxHeading"),t(m)):ut(m)?bt(e,c,"whitespace")(m):(e.enter("atxHeadingText"),d(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),c(m))}function d(m){return m===null||m===35||jt(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),d)}}const rte=["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"],p_=["pre","script","style","textarea"],ite={concrete:!0,name:"htmlFlow",resolveTo:ote,tokenize:lte},ste={partial:!0,tokenize:cte},ate={partial:!0,tokenize:ute};function ote(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 lte(e,t,n){const r=this;let s,o,l,c,f;return d;function d(I){return m(I)}function m(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),p}function p(I){return I===33?(e.consume(I),b):I===47?(e.consume(I),o=!0,C):I===63?(e.consume(I),s=3,r.interrupt?t:F):er(I)?(e.consume(I),l=String.fromCharCode(I),w):n(I)}function b(I){return I===45?(e.consume(I),s=2,x):I===91?(e.consume(I),s=5,c=0,S):er(I)?(e.consume(I),s=4,r.interrupt?t:F):n(I)}function x(I){return I===45?(e.consume(I),r.interrupt?t:F):n(I)}function S(I){const de="CDATA[";return I===de.charCodeAt(c++)?(e.consume(I),c===de.length?r.interrupt?t:Q:S):n(I)}function C(I){return er(I)?(e.consume(I),l=String.fromCharCode(I),w):n(I)}function w(I){if(I===null||I===47||I===62||jt(I)){const de=I===47,xe=l.toLowerCase();return!de&&!o&&p_.includes(xe)?(s=1,r.interrupt?t(I):Q(I)):rte.includes(l.toLowerCase())?(s=6,de?(e.consume(I),A):r.interrupt?t(I):Q(I)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):o?N(I):k(I))}return I===45||zn(I)?(e.consume(I),l+=String.fromCharCode(I),w):n(I)}function A(I){return I===62?(e.consume(I),r.interrupt?t:Q):n(I)}function N(I){return ut(I)?(e.consume(I),N):L(I)}function k(I){return I===47?(e.consume(I),L):I===58||I===95||er(I)?(e.consume(I),R):ut(I)?(e.consume(I),k):L(I)}function R(I){return I===45||I===46||I===58||I===95||zn(I)?(e.consume(I),R):B(I)}function B(I){return I===61?(e.consume(I),O):ut(I)?(e.consume(I),B):k(I)}function O(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),f=I,j):ut(I)?(e.consume(I),O):P(I)}function j(I){return I===f?(e.consume(I),f=null,q):I===null||ze(I)?n(I):(e.consume(I),j)}function P(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||jt(I)?B(I):(e.consume(I),P)}function q(I){return I===47||I===62||ut(I)?k(I):n(I)}function L(I){return I===62?(e.consume(I),X):n(I)}function X(I){return I===null||ze(I)?Q(I):ut(I)?(e.consume(I),X):n(I)}function Q(I){return I===45&&s===2?(e.consume(I),D):I===60&&s===1?(e.consume(I),H):I===62&&s===4?(e.consume(I),V):I===63&&s===3?(e.consume(I),F):I===93&&s===5?(e.consume(I),te):ze(I)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(ste,ie,ee)(I)):I===null||ze(I)?(e.exit("htmlFlowData"),ee(I)):(e.consume(I),Q)}function ee(I){return e.check(ate,ne,ie)(I)}function ne(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),Z}function Z(I){return I===null||ze(I)?ee(I):(e.enter("htmlFlowData"),Q(I))}function D(I){return I===45?(e.consume(I),F):Q(I)}function H(I){return I===47?(e.consume(I),l="",$):Q(I)}function $(I){if(I===62){const de=l.toLowerCase();return p_.includes(de)?(e.consume(I),V):Q(I)}return er(I)&&l.length<8?(e.consume(I),l+=String.fromCharCode(I),$):Q(I)}function te(I){return I===93?(e.consume(I),F):Q(I)}function F(I){return I===62?(e.consume(I),V):I===45&&s===2?(e.consume(I),F):Q(I)}function V(I){return I===null||ze(I)?(e.exit("htmlFlowData"),ie(I)):(e.consume(I),V)}function ie(I){return e.exit("htmlFlow"),t(I)}}function ute(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 cte(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(zf,t,n)}}const fte={name:"htmlText",tokenize:dte};function dte(e,t,n){const r=this;let s,o,l;return c;function c(F){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(F),f}function f(F){return F===33?(e.consume(F),d):F===47?(e.consume(F),B):F===63?(e.consume(F),k):er(F)?(e.consume(F),P):n(F)}function d(F){return F===45?(e.consume(F),m):F===91?(e.consume(F),o=0,S):er(F)?(e.consume(F),N):n(F)}function m(F){return F===45?(e.consume(F),x):n(F)}function p(F){return F===null?n(F):F===45?(e.consume(F),b):ze(F)?(l=p,H(F)):(e.consume(F),p)}function b(F){return F===45?(e.consume(F),x):p(F)}function x(F){return F===62?D(F):F===45?b(F):p(F)}function S(F){const V="CDATA[";return F===V.charCodeAt(o++)?(e.consume(F),o===V.length?C:S):n(F)}function C(F){return F===null?n(F):F===93?(e.consume(F),w):ze(F)?(l=C,H(F)):(e.consume(F),C)}function w(F){return F===93?(e.consume(F),A):C(F)}function A(F){return F===62?D(F):F===93?(e.consume(F),A):C(F)}function N(F){return F===null||F===62?D(F):ze(F)?(l=N,H(F)):(e.consume(F),N)}function k(F){return F===null?n(F):F===63?(e.consume(F),R):ze(F)?(l=k,H(F)):(e.consume(F),k)}function R(F){return F===62?D(F):k(F)}function B(F){return er(F)?(e.consume(F),O):n(F)}function O(F){return F===45||zn(F)?(e.consume(F),O):j(F)}function j(F){return ze(F)?(l=j,H(F)):ut(F)?(e.consume(F),j):D(F)}function P(F){return F===45||zn(F)?(e.consume(F),P):F===47||F===62||jt(F)?q(F):n(F)}function q(F){return F===47?(e.consume(F),D):F===58||F===95||er(F)?(e.consume(F),L):ze(F)?(l=q,H(F)):ut(F)?(e.consume(F),q):D(F)}function L(F){return F===45||F===46||F===58||F===95||zn(F)?(e.consume(F),L):X(F)}function X(F){return F===61?(e.consume(F),Q):ze(F)?(l=X,H(F)):ut(F)?(e.consume(F),X):q(F)}function Q(F){return F===null||F===60||F===61||F===62||F===96?n(F):F===34||F===39?(e.consume(F),s=F,ee):ze(F)?(l=Q,H(F)):ut(F)?(e.consume(F),Q):(e.consume(F),ne)}function ee(F){return F===s?(e.consume(F),s=void 0,Z):F===null?n(F):ze(F)?(l=ee,H(F)):(e.consume(F),ee)}function ne(F){return F===null||F===34||F===39||F===60||F===61||F===96?n(F):F===47||F===62||jt(F)?q(F):(e.consume(F),ne)}function Z(F){return F===47||F===62||jt(F)?q(F):n(F)}function D(F){return F===62?(e.consume(F),e.exit("htmlTextData"),e.exit("htmlText"),t):n(F)}function H(F){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),$}function $(F){return ut(F)?bt(e,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):te(F)}function te(F){return e.enter("htmlTextData"),l(F)}}const xE={name:"labelEnd",resolveAll:gte,resolveTo:bte,tokenize:yte},hte={tokenize:xte},mte={tokenize:Ete},pte={tokenize:Tte};function gte(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&&Rr(e,0,e.length,n),e}function bte(e,t){let n=e.length,r=0,s,o,l,c;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 f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},d={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 c=[["enter",f,t],["enter",d,t]],c=Yr(c,e.slice(o+1,o+r+3)),c=Yr(c,[["enter",m,t]]),c=Yr(c,mp(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),c=Yr(c,[["exit",m,t],e[l-2],e[l-1],["exit",d,t]]),c=Yr(c,e.slice(l+1)),c=Yr(c,[["exit",f,t]]),Rr(e,o,e.length,c),e}function yte(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 c;function c(b){return o?o._inactive?p(b):(l=r.parser.defined.includes(hi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):n(b)}function f(b){return b===40?e.attempt(hte,m,l?m:p)(b):b===91?e.attempt(mte,m,l?d:p)(b):l?m(b):p(b)}function d(b){return e.attempt(pte,m,p)(b)}function m(b){return t(b)}function p(b){return o._balanced=!0,n(b)}}function xte(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)?Gc(e,o)(p):o(p)}function o(p){return p===41?m(p):sI(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return jt(p)?Gc(e,f)(p):m(p)}function c(p){return n(p)}function f(p){return p===34||p===39||p===40?oI(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function d(p){return jt(p)?Gc(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 Ete(e,t,n){const r=this;return s;function s(c){return aI.call(r,e,o,l,"reference","referenceMarker","referenceString")(c)}function o(c){return r.parser.defined.includes(hi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function Tte(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 vte={name:"labelStartImage",resolveAll:xE.resolveAll,tokenize:Ste};function Ste(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const Cte={name:"labelStartLink",resolveAll:xE.resolveAll,tokenize:wte};function wte(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 H1={name:"lineEnding",tokenize:Ate};function Ate(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),bt(e,t,"linePrefix")}}const Kh={name:"thematicBreak",tokenize:_te};function _te(e,t,n){let r=0,s;return o;function o(d){return e.enter("thematicBreak"),l(d)}function l(d){return s=d,c(d)}function c(d){return d===s?(e.enter("thematicBreakSequence"),f(d)):r>=3&&(d===null||ze(d))?(e.exit("thematicBreak"),t(d)):n(d)}function f(d){return d===s?(e.consume(d),r++,f):(e.exit("thematicBreakSequence"),ut(d)?bt(e,c,"whitespace")(d):c(d))}}const pr={continuation:{tokenize:Dte},exit:Mte,name:"list",tokenize:Rte},kte={partial:!0,tokenize:Ite},Nte={partial:!0,tokenize:Ote};function Rte(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 c;function c(x){const S=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:py(x)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Kh,n,d)(x):d(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(x)}return n(x)}function f(x){return py(x)&&++l<10?(e.consume(x),f):(!r.interrupt||l<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),d(x)):n(x)}function d(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check(zf,r.interrupt?n:m,e.attempt(kte,b,p))}function m(x){return r.containerState.initialBlankLine=!0,o++,b(x)}function p(x){return ut(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),b):n(x)}function b(x){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function Dte(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(zf,s,o);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bt(e,t,"listItemIndent",r.containerState.size+1)(c)}function o(c){return r.containerState.furtherBlankLines||!ut(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Nte,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,bt(e,e.attempt(pr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Ote(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 Mte(e){e.exit(this.containerState.type)}function Ite(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:Lte,tokenize:Pte};function Lte(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 Pte(e,t,n){const r=this;let s;return o;function o(d){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=d,l(d)):n(d)}function l(d){return e.enter("setextHeadingLineSequence"),c(d)}function c(d){return d===s?(e.consume(d),c):(e.exit("setextHeadingLineSequence"),ut(d)?bt(e,f,"lineSuffix")(d):f(d))}function f(d){return d===null||ze(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const jte={tokenize:$te,partial:!0};function Bte(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zte,continuation:{tokenize:Vte},exit:qte}},text:{91:{name:"gfmFootnoteCall",tokenize:Hte},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Fte,resolveTo:Ute}}}}function Fte(e,t,n){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const f=r.events[s][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const d=hi(r.sliceSerialize({start:l.end,end:r.now()}));return d.codePointAt(0)!==94||!o.includes(d.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function Ute(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)},c=[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,...c),e}function Hte(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return c;function c(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),f}function f(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(p){if(o>999||p===93&&!l||p===null||p===91||jt(p))return n(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(hi(r.sliceSerialize(b)))?(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:d}function m(p){return p===91||p===92||p===93?(e.consume(p),o++,d):d(p)}}function zte(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,c;return f;function f(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(S)}function m(S){if(l>999||S===93&&!c||S===null||S===91||jt(S))return n(S);if(S===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return o=hi(r.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return jt(S)||(c=!0),l++,e.consume(S),S===92?p:m}function p(S){return S===91||S===92||S===93?(e.consume(S),l++,m):m(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(o)||s.push(o),bt(e,x,"gfmFootnoteDefinitionWhitespace")):n(S)}function x(S){return t(S)}}function Vte(e,t,n){return e.check(zf,t,e.attempt(jte,t,n))}function qte(e){e.exit("gfmFootnoteDefinition")}function $te(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 Yte(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,c){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let d=f;for(;d--;)if(l[d][0]==="exit"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[d][1].end.offset-l[d][1].start.offset){l[f][1].type="strikethroughSequence",l[d][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},l[d][1].start),end:Object.assign({},l[f][1].end)},p={type:"strikethroughText",start:Object.assign({},l[d][1].end),end:Object.assign({},l[f][1].start)},b=[["enter",m,c],["enter",l[d][1],c],["exit",l[d][1],c],["enter",p,c]],x=c.parser.constructs.insideSpan.null;x&&Rr(b,b.length,0,mp(x,l.slice(d+1,f),c)),Rr(b,b.length,0,[["exit",p,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",m,c]]),Rr(l,d-1,f-d+3,b),f=d+b.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function o(l,c,f){const d=this.previous,m=this.events;let p=0;return b;function b(S){return d===126&&m[m.length-1][1].type!=="characterEscape"?f(S):(l.enter("strikethroughSequenceTemporary"),x(S))}function x(S){const C=su(d);if(S===126)return p>1?f(S):(l.consume(S),p++,x);if(p<2&&!n)return f(S);const w=l.exit("strikethroughSequenceTemporary"),A=su(S);return w._open=!A||A===2&&!!C,w._close=!C||C===2&&!!A,c(S)}}}class Gte{constructor(){this.map=[]}add(t,n,r){Kte(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 Kte(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 Qte(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 Xte(){return{flow:{null:{name:"table",tokenize:Wte,resolveAll:Zte}}}}function Wte(e,t,n){const r=this;let s=0,o=0,l;return c;function c(L){let X=r.events.length-1;for(;X>-1;){const ne=r.events[X][1].type;if(ne==="lineEnding"||ne==="linePrefix")X--;else break}const Q=X>-1?r.events[X][1].type:null,ee=Q==="tableHead"||Q==="tableRow"?O:f;return ee===O&&r.parser.lazy[r.now().line]?n(L):ee(L)}function f(L){return e.enter("tableHead"),e.enter("tableRow"),d(L)}function d(L){return L===124||(l=!0,o+=1),m(L)}function m(L){return L===null?n(L):ze(L)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),x):n(L):ut(L)?bt(e,m,"whitespace")(L):(o+=1,l&&(l=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),p(L)))}function p(L){return L===null||L===124||jt(L)?(e.exit("data"),m(L)):(e.consume(L),L===92?b:p)}function b(L){return L===92||L===124?(e.consume(L),p):p(L)}function x(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),l=!1,ut(L)?bt(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):S(L))}function S(L){return L===45||L===58?w(L):L===124?(l=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),C):B(L)}function C(L){return ut(L)?bt(e,w,"whitespace")(L):w(L)}function w(L){return L===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),A):L===45?(o+=1,A(L)):L===null||ze(L)?R(L):B(L)}function A(L){return L===45?(e.enter("tableDelimiterFiller"),N(L)):B(L)}function N(L){return L===45?(e.consume(L),N):L===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(L))}function k(L){return ut(L)?bt(e,R,"whitespace")(L):R(L)}function R(L){return L===124?S(L):L===null||ze(L)?!l||s!==o?B(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):B(L)}function B(L){return n(L)}function O(L){return e.enter("tableRow"),j(L)}function j(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),j):L===null||ze(L)?(e.exit("tableRow"),t(L)):ut(L)?bt(e,j,"whitespace")(L):(e.enter("data"),P(L))}function P(L){return L===null||L===124||jt(L)?(e.exit("data"),j(L)):(e.consume(L),L===92?q:P)}function q(L){return L===92||L===124?(e.consume(L),P):P(L)}}function Zte(e,t){let n=-1,r=!0,s=0,o=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,d,m,p;const b=new Gte;for(;++n<e.length;){const x=e[n],S=x[1];x[0]==="enter"?S.type==="tableHead"?(c=!1,f!==0&&(b_(b,t,f,d,m),m=void 0,f=0),d={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",d,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",m,t]])),s=S.type==="tableDelimiterRow"?2:m?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],p=Ah(b,t,o,s,void 0,p),o=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],p=Ah(b,t,o,s,void 0,p)),o=l,l=[o[1],n,0,0])):S.type==="tableHead"?(c=!0,f=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(f=n,o[1]!==0?(l[0]=l[1],p=Ah(b,t,o,s,n,p)):l[1]!==0&&(p=Ah(b,t,l,s,n,p)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&b_(b,t,f,d,m),b.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=Qte(t.events,n))}return e}function Ah(e,t,n,r,s,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(o.end=Object.assign({},kl(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const f=kl(t.events,n[1]);if(o={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const d=kl(t.events,n[2]),m=kl(t.events,n[3]),p={type:c,start:Object.assign({},d),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const b=t.events[n[2]],x=t.events[n[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,C=n[3]-n[2]-1;e.add(S,C,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(o.end=Object.assign({},kl(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function b_(e,t,n,r,s){const o=[],l=kl(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 kl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Jte={name:"tasklistCheck",tokenize:tne};function ene(){return{text:{91:Jte}}}function tne(e,t,n){const r=this;return s;function s(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return jt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return ze(f)?t(f):ut(f)?e.check({tokenize:nne},t,n)(f):n(f)}}function nne(e,t,n){return bt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function rne(e){return Y6([hee(),Bte(),Yte(e),Xte(),ene()])}const ine={};function sne(e){const t=this,n=e||ine,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(rne(n)),o.push(oee()),l.push(lee(n))}var ane=Object.defineProperty,one=Object.defineProperties,lne=Object.getOwnPropertyDescriptors,y_=Object.getOwnPropertySymbols,une=Object.prototype.hasOwnProperty,cne=Object.prototype.propertyIsEnumerable,x_=(e,t,n)=>t in e?ane(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lI=(e,t)=>{for(var n in t||(t={}))une.call(t,n)&&x_(e,n,t[n]);if(y_)for(var n of y_(t))cne.call(t,n)&&x_(e,n,t[n]);return e},uI=(e,t)=>one(e,lne(t)),fne=/(\*\*)([^*]*\*?)$/,dne=/(__)([^_]*?)$/,hne=/(\*\*\*)([^*]*?)$/,mne=/(\*)([^*]*?)$/,pne=/(_)([^_]*?)$/,gne=/(`)([^`]*?)$/,bne=/(~~)([^~]*?)$/,Mo=/^[\s_~*`]*$/,cI=/^[\s]*[-*+][\s]+$/,yne=/[\p{L}\p{N}_]/u,xne=/^```[^`\n]*```?$/,Ene=/^\*{4,}$/,Tne=/(__)([^_]+)_$/,vne=/(~~)([^~]+)~$/,Sne=/__/g,E_=/~~/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:yne.test(e)},au=(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},Cne=(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},fI=(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},pp=(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},wne=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
381
- `)return!1}return!1},dI=(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]==="]"?wne(e,t):!1;if(e[n]===`
382
- `)return!1}return!1},EE=(e,t,n)=>{let r=0;for(let f=t-1;f>=0;f-=1)if(e[f]===`
383
- `){r=f+1;break}let s=e.length;for(let f=t;f<e.length;f+=1)if(e[f]===`
384
- `){s=f;break}let o=e.substring(r,s),l=0,c=!1;for(let f of o)if(f===n)l+=1;else if(f!==" "&&f!==" "){c=!0;break}return l>=3&&!c},Ane=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let s=t-1;s>=0;s-=1)if(e[s]===`
385
- `){r=s+1;break}for(let s=r;s<t;s+=1)if(e[s]!==" "&&e[s]!==" ")return!1;return!0},_ne=(e,t,n,r)=>n==="\\"||e.includes("$")&&pp(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Sa(n)&&Sa(r)||Ane(e,t,r)),hI=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]:"";_ne(e,r,s,o)||(t+=1)}return t},kne=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&pp(e,t)||dI(e,t)||n==="_"||r==="_"||n&&r&&Sa(n)&&Sa(r)),Nne=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]:"";kne(e,r,s,o)||(t+=1)}return t},Rne=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},Dne=(e,t,n)=>{if(!t||Mo.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
386
- `),s=r===-1?0:r+1,o=e.substring(s,n);return cI.test(o)&&t.includes(`
387
- `)?!0:EE(e,n,"*")},One=e=>{let t=e.match(fne);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return au(e,r)||Dne(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Mne=(e,t,n)=>{if(!t||Mo.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
388
- `),s=r===-1?0:r+1,o=e.substring(s,n);return cI.test(o)&&t.includes(`
389
- `)?!0:EE(e,n,"_")},Ine=e=>{let t=e.match(dne);if(!t){let s=e.match(Tne);if(s){let o=e.lastIndexOf(s[1]);if(!au(e,o)&&(e.match(Sne)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return au(e,r)||Mne(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},Lne=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!pp(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},Pne=e=>{if(!e.match(mne))return e;let t=Lne(e);if(t===-1||au(e,t))return e;let n=e.substring(t+1);return!n||Mo.test(n)?e:hI(e)%2===1?`${e}*`:e},mI=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!pp(e,t)&&!dI(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},jne=e=>{let t=e.length;for(;t>0&&e[t-1]===`
390
- `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Bne=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=mI(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},Fne=e=>{if(!e.match(pne))return e;let t=mI(e);if(t===-1||au(e,t))return e;let n=e.substring(t+1);if(!n||Mo.test(n))return e;if(Nne(e)%2===1){let r=Bne(e);return r!==null?r:jne(e)}return e},Une=e=>{let t=(e.match(/\*\*/g)||[]).length,n=hI(e);return t%2===0&&n%2===0},Hne=(e,t,n)=>!t||Mo.test(t)||au(e,n)?!0:EE(e,n,"*"),zne=e=>{if(Ene.test(e))return e;let t=e.match(hne);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Hne(e,n,r)?e:Rne(e)%2===1?Une(e)?e:`${e}***`:e},Cm=(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},Vne=(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},qne=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!Vne(e,n)&&(t+=1);return t},$ne=e=>!e.match(xne)||e.includes(`
391
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Yne=e=>(e.match(/```/g)||[]).length%2===1,Gne=e=>{let t=$ne(e);if(t!==null)return t;let n=e.match(gne);if(n&&!Yne(e)){let r=n[2];if(!r||Mo.test(r))return e;if(qne(e)%2===1)return`${e}\``}return e},Kne=(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)==="```",Qne=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Kne(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},Xne=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
392
- `,t)!==-1&&!e.endsWith(`
393
- `)?`${e}
394
- $$`:`${e}$$`},Wne=e=>Qne(e)%2===0?e:Xne(e),Zne=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=Cne(e,t);if(r===-1||Cm(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 c=e.substring(r+1,t);return n==="text-only"?`${l}${c}`:`${l}[${c}](streamdown:incomplete-link)`},T_=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!Cm(e,n)){if(n>0&&e[n-1]==="!")continue;let r=fI(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},Jne=(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 c=T_(e,t);return c!==-1?e.substring(0,c)+e.substring(c+1):`${l}${o}`}return`${e}](streamdown:incomplete-link)`}if(fI(e,t)===-1){let l=e.substring(0,s);if(r)return l;if(n==="text-only"){let c=T_(e,t);if(c!==-1)return e.substring(0,c)+e.substring(c+1);let f=e.substring(t+1);return`${l}${f}`}return`${e}](streamdown:incomplete-link)`}return null},pI=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Cm(e,n)){let r=Zne(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Cm(e,r)){let s=Jne(e,r,t);if(s!==null)return s}return e},ere=/^-{1,2}$/,tre=/^[\s]*-{1,2}[\s]+$/,nre=/^={1,2}$/,rre=/^[\s]*={1,2}[\s]+$/,ire=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
395
- `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),s=n.trim();if(ere.test(s)&&!n.match(tre)){let o=r.split(`
396
- `).at(-1);if(o&&o.trim().length>0)return`${e}​`}if(nre.test(s)&&!n.match(rre)){let o=r.split(`
397
- `).at(-1);if(o&&o.trim().length>0)return`${e}​`}return e},sre=e=>{let t=e.match(bne);if(t){let n=t[2];if(!n||Mo.test(n))return e;if((e.match(E_)||[]).length%2===1)return`${e}~~`}else if(e.match(vne)&&(e.match(E_)||[]).length%2===1)return`${e}~`;return e},z1=e=>e!==!1,_r={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},are=[{handler:{name:"setextHeadings",handle:ire,priority:_r.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:pI,priority:_r.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:zne,priority:_r.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:One,priority:_r.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Ine,priority:_r.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Pne,priority:_r.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:Fne,priority:_r.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Gne,priority:_r.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:sre,priority:_r.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:Wne,priority:_r.KATEX},optionKey:"katex"}],ore=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return are.filter(({handler:r,optionKey:s})=>r.name==="links"?z1(e==null?void 0:e.links)||z1(e==null?void 0:e.images):z1(e==null?void 0:e[s])).map(({handler:r,earlyReturn:s})=>r.name==="links"?{handler:uI(lI({},r),{handle:o=>pI(o,n)}),earlyReturn:n==="protocol"?s:void 0}:{handler:r,earlyReturn:s})},lre=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=ore(t),o=((n=t==null?void 0:t.handlers)!=null?n:[]).map(c=>{var f;return{handler:uI(lI({},c),{priority:(f=c.priority)!=null?f:_r.DEFAULT}),earlyReturn:void 0}}),l=[...s,...o].sort((c,f)=>{var d,m;return((d=c.handler.priority)!=null?d:_r.DEFAULT)-((m=f.handler.priority)!=null?m:_r.DEFAULT)});for(let{handler:c,earlyReturn:f}of l)if(r=c.handle(r),f!=null&&f(r))return r;return r},ure=lre;const cre=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dre={};function v_(e,t){return(dre.jsx?fre:cre).test(e)}const hre=/[ \t\n\f\r]/g;function mre(e){return typeof e=="object"?e.type==="text"?S_(e.value):!1:S_(e)}function S_(e){return e.replace(hre,"")===""}var Al={},V1,C_;function pre(){if(C_)return V1;C_=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
398
- `,d="/",m="*",p="",b="comment",x="declaration";function S(w,A){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];A=A||{};var N=1,k=1;function R(ne){var Z=ne.match(t);Z&&(N+=Z.length);var D=ne.lastIndexOf(f);k=~D?ne.length-D:k+ne.length}function B(){var ne={line:N,column:k};return function(Z){return Z.position=new O(ne),q(),Z}}function O(ne){this.start=ne,this.end={line:N,column:k},this.source=A.source}O.prototype.content=w;function j(ne){var Z=new Error(A.source+":"+N+":"+k+": "+ne);if(Z.reason=ne,Z.filename=A.source,Z.line=N,Z.column=k,Z.source=w,!A.silent)throw Z}function P(ne){var Z=ne.exec(w);if(Z){var D=Z[0];return R(D),w=w.slice(D.length),Z}}function q(){P(n)}function L(ne){var Z;for(ne=ne||[];Z=X();)Z!==!1&&ne.push(Z);return ne}function X(){var ne=B();if(!(d!=w.charAt(0)||m!=w.charAt(1))){for(var Z=2;p!=w.charAt(Z)&&(m!=w.charAt(Z)||d!=w.charAt(Z+1));)++Z;if(Z+=2,p===w.charAt(Z-1))return j("End of comment missing");var D=w.slice(2,Z-2);return k+=2,R(D),w=w.slice(Z),k+=2,ne({type:b,comment:D})}}function Q(){var ne=B(),Z=P(r);if(Z){if(X(),!P(s))return j("property missing ':'");var D=P(o),H=ne({type:x,property:C(Z[0].replace(e,p)),value:D?C(D[0].replace(e,p)):p});return P(l),H}}function ee(){var ne=[];L(ne);for(var Z;Z=Q();)Z!==!1&&(ne.push(Z),L(ne));return ne}return q(),ee()}function C(w){return w?w.replace(c,p):p}return V1=S,V1}var w_;function gre(){if(w_)return Al;w_=1;var e=Al&&Al.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Al,"__esModule",{value:!0}),Al.default=n;const t=e(pre());function n(r,s){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),c=typeof s=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:d,value:m}=f;c?s(d,m,f):m&&(o=o||{},o[d]=m)}),o}return Al}var Sc={},A_;function bre(){if(A_)return Sc;A_=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(d){return!d||n.test(d)||e.test(d)},l=function(d,m){return m.toUpperCase()},c=function(d,m){return"".concat(m,"-")},f=function(d,m){return m===void 0&&(m={}),o(d)?d:(d=d.toLowerCase(),m.reactCompat?d=d.replace(s,c):d=d.replace(r,c),d.replace(t,l))};return Sc.camelCase=f,Sc}var Cc,__;function yre(){if(__)return Cc;__=1;var e=Cc&&Cc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(gre()),n=bre();function r(s,o){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,f){c&&f&&(l[(0,n.camelCase)(c,o)]=f)}),l}return r.default=r,Cc=r,Cc}var xre=yre();const Ere=Tf(xre);function Kc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?k_(e.position):"start"in e||"end"in e?k_(e):"line"in e||"column"in e?yy(e):""}function yy(e){return N_(e&&e.line)+":"+N_(e&&e.column)}function k_(e){return yy(e&&e.start)+"-"+yy(e&&e.end)}function N_(e){return e&&typeof e=="number"?e:1}class $n 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 f=r.indexOf(":");f===-1?o.ruleId=r:(o.source=r.slice(0,f),o.ruleId=r.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const c=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=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=Kc(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}}$n.prototype.file="";$n.prototype.name="";$n.prototype.reason="";$n.prototype.message="";$n.prototype.stack="";$n.prototype.column=void 0;$n.prototype.line=void 0;$n.prototype.ancestors=void 0;$n.prototype.cause=void 0;$n.prototype.fatal=void 0;$n.prototype.place=void 0;$n.prototype.ruleId=void 0;$n.prototype.source=void 0;const TE={}.hasOwnProperty,Tre=new Map,vre=/[A-Z]/g,Sre=new Set(["table","tbody","thead","tfoot","tr"]),Cre=new Set(["td","th"]),gI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wre(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=Mre(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=Ore(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:Bf,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=bI(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function bI(e,t,n){if(t.type==="element")return Are(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return _re(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Nre(e,t,n);if(t.type==="mdxjsEsm")return kre(e,t);if(t.type==="root")return Rre(e,t,n);if(t.type==="text")return Dre(e,t)}function Are(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=xI(e,t.tagName,!1),l=Ire(e,t);let c=SE(e,t);return Sre.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!mre(f):!0})),yI(e,l,o,t),vE(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function _re(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)}pf(e,t.position)}function kre(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);pf(e,t.position)}function Nre(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:xI(e,t.name,!0),l=Lre(e,t),c=SE(e,t);return yI(e,l,o,t),vE(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Rre(e,t,n){const r={};return vE(r,SE(e,t)),e.create(t,e.Fragment,r,n)}function Dre(e,t){return t.value}function yI(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function vE(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ore(e,t,n){return r;function r(s,o,l,c){const d=Array.isArray(l.children)?n:t;return c?d(o,l,c):d(o,l)}}function Mre(e,t){return n;function n(r,s,o,l){const c=Array.isArray(o.children),f=Vi(r);return t(s,o,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Ire(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&TE.call(t.properties,s)){const o=Pre(e,s,t.properties[s]);if(o){const[l,c]=o;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&Cre.has(t.tagName)?r=c:n[l]=c}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Lre(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 c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else pf(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 c=r.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else pf(e,t.position);else o=r.value===null?!0:r.value;n[s]=o}return n}function SE(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:Tre;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const f=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(f){const d=s.get(f)||0;l=f+"-"+d,s.set(f,d+1)}}const c=bI(e,o,l);c!==void 0&&n.push(c)}return n}function Pre(e,t,n){const r=op(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?UM(n):HM(n)),r.property==="style"){let s=typeof n=="object"?n:jre(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Bre(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?JK[r.property]||r.property:r.attribute,n]}}function jre(e,t){try{return Ere(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new $n("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=gI+"#cannot-parse-style-attribute",s}}function xI(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 c=v_(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}r=l}else r=v_(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return TE.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);pf(e)}function pf(e,t){const n=new $n("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=gI+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Bre(e){const t={};let n;for(n in e)TE.call(e,n)&&(t[Fre(n)]=e[n]);return t}function Fre(e){let t=e.replace(vre,Ure);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ure(e){return"-"+e.toLowerCase()}const Hre={tokenize:zre};function zre(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),bt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),o(c)}function o(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return ze(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),l)}}const Vre={tokenize:qre},R_={tokenize:$re};function qre(e){const t=this,n=[];let r=0,s,o,l;return c;function c(k){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,f,d)(k)}return d(k)}function f(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&N();const R=t.events.length;let B=R,O;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){O=t.events[B][1].end;break}A(r);let j=R;for(;j<t.events.length;)t.events[j][1].end={...O},j++;return Rr(t.events,B+1,0,t.events.slice(R)),t.events.length=j,d(k)}return c(k)}function d(k){if(r===n.length){if(!s)return b(k);if(s.currentConstruct&&s.currentConstruct.concrete)return S(k);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(R_,m,p)(k)}function m(k){return s&&N(),A(r),b(k)}function p(k){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,S(k)}function b(k){return t.containerState={},e.attempt(R_,x,S)(k)}function x(k){return r++,n.push([t.currentConstruct,t.containerState]),b(k)}function S(k){if(k===null){s&&N(),A(0),e.consume(k);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),C(k)}function C(k){if(k===null){w(e.exit("chunkFlow"),!0),A(0),e.consume(k);return}return ze(k)?(e.consume(k),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(k),C)}function w(k,R){const B=t.sliceStream(k);if(R&&B.push(null),k.previous=o,o&&(o.next=k),o=k,s.defineSkip(k.start),s.write(B),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 j=t.events.length;let P=j,q,L;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(q){L=t.events[P][1].end;break}q=!0}for(A(r),O=j;O<t.events.length;)t.events[O][1].end={...L},O++;Rr(t.events,P+1,0,t.events.slice(j)),t.events.length=O}}function A(k){let R=n.length;for(;R-- >k;){const B=n[R];t.containerState=B[1],B[0].exit.call(t,e)}n.length=k}function N(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function $re(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 Yre={tokenize:Gre};function Gre(e){const t=this,n=e.attempt(zf,r,e.attempt(this.parser.constructs.flowInitial,s,bt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Vee,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 Kre={resolveAll:TI()},Qre=EI("string"),Xre=EI("text");function EI(e){return{resolveAll:TI(e==="text"?Wre:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],o=n.attempt(s,l,c);return l;function l(m){return d(m)?o(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),f}function f(m){return d(m)?(n.exit("data"),o(m)):(n.consume(m),f)}function d(m){if(m===null)return!0;const p=s[m];let b=-1;if(p)for(;++b<p.length;){const x=p[b];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function TI(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 Wre(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,c=0,f;for(;o--;){const d=s[o];if(typeof d=="string"){for(l=d.length;d.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(d===-2)f=!0,c++;else if(d!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const d={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const Zre={42:pr,43:pr,45:pr,48:pr,49:pr,50:pr,51:pr,52:pr,53:pr,54:pr,55:pr,56:pr,57:pr,62:tI},Jre={91:Kee},eie={[-2]:U1,[-1]:U1,32:U1},tie={35:ete,42:Kh,45:[g_,Kh],60:ite,61:g_,95:Kh,96:m_,126:m_},nie={38:rI,92:nI},rie={[-5]:H1,[-4]:H1,[-3]:H1,33:vte,38:rI,42:by,60:[Cee,fte],91:Cte,92:[Zee,nI],93:xE,95:by,96:jee},iie={null:[by,Kre]},sie={null:[42,95]},aie={null:[]},oie=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:sie,contentInitial:Jre,disable:aie,document:Zre,flow:tie,flowInitial:eie,insideSpan:iie,string:nie,text:rie},Symbol.toStringTag,{value:"Module"}));function lie(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=[],c=[];const f={attempt:j(B),check:j(O),consume:N,enter:k,exit:R,interrupt:j(O,{interrupt:!0})},d={code:null,containerState:{},defineSkip:C,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:x,write:p};let m=t.tokenize.call(d,f);return t.resolveAll&&o.push(t),d;function p(X){return l=Yr(l,X),w(),l[l.length-1]!==null?[]:(P(t,0),d.events=mp(o,d.events,d),d.events)}function b(X,Q){return cie(x(X),Q)}function x(X){return uie(l,X)}function S(){const{_bufferIndex:X,_index:Q,line:ee,column:ne,offset:Z}=r;return{_bufferIndex:X,_index:Q,line:ee,column:ne,offset:Z}}function C(X){s[X.line]=X.column,L()}function w(){let X;for(;r._index<l.length;){const Q=l[r._index];if(typeof Q=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<Q.length;)A(Q.charCodeAt(r._bufferIndex));else A(Q)}}function A(X){m=m(X)}function N(X){ze(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,L()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=X}function k(X,Q){const ee=Q||{};return ee.type=X,ee.start=S(),d.events.push(["enter",ee,d]),c.push(ee),ee}function R(X){const Q=c.pop();return Q.end=S(),d.events.push(["exit",Q,d]),Q}function B(X,Q){P(X,Q.from)}function O(X,Q){Q.restore()}function j(X,Q){return ee;function ee(ne,Z,D){let H,$,te,F;return Array.isArray(ne)?ie(ne):"tokenize"in ne?ie([ne]):V(ne);function V(Te){return he;function he(Se){const Ce=Se!==null&&Te[Se],Pe=Se!==null&&Te.null,_e=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return ie(_e)(Se)}}function ie(Te){return H=Te,$=0,Te.length===0?D:I(Te[$])}function I(Te){return he;function he(Se){return F=q(),te=Te,Te.partial||(d.currentConstruct=Te),Te.name&&d.parser.constructs.disable.null.includes(Te.name)?xe():Te.tokenize.call(Q?Object.assign(Object.create(d),Q):d,f,de,xe)(Se)}}function de(Te){return X(te,F),Z}function xe(Te){return F.restore(),++$<H.length?I(H[$]):D}}}function P(X,Q){X.resolveAll&&!o.includes(X)&&o.push(X),X.resolve&&Rr(d.events,Q,d.events.length-Q,X.resolve(d.events.slice(Q),d)),X.resolveTo&&(d.events=X.resolveTo(d.events,d))}function q(){const X=S(),Q=d.previous,ee=d.currentConstruct,ne=d.events.length,Z=Array.from(c);return{from:ne,restore:D};function D(){r=X,d.previous=Q,d.currentConstruct=ee,d.events.length=ne,c=Z,L()}}function L(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function uie(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 c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}o>0&&l.push(e[s].slice(0,o))}return l}function cie(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=`
399
- `;break}case-3:{l=`\r
400
- `;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 fie(e){const r={constructs:Y6([oie,...(e||{}).extensions||[]]),content:s(Hre),defined:[],document:s(Vre),flow:s(Yre),lazy:{},string:s(Qre),text:s(Xre)};return r;function s(o){return l;function l(c){return lie(r,o,c)}}}function die(e){for(;!iI(e););return e}const D_=/[\0\t\n\r]/g;function hie(){let e=1,t="",n=!0,r;return s;function s(o,l,c){const f=[];let d,m,p,b,x;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(D_.lastIndex=p,d=D_.exec(o),b=d&&d.index!==void 0?d.index:o.length,x=o.charCodeAt(b),!d){t=o.slice(p);break}if(x===10&&p===b&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),p<b&&(f.push(o.slice(p,b)),e+=b-p),x){case 0:{f.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,f.push(-2);e++<m;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}p=b+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const vI={}.hasOwnProperty;function mie(e,t,n){return typeof t!="string"&&(n=t,t=void 0),pie(n)(die(fie(n).document().write(hie()(e,t,!0))))}function pie(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(jn),autolinkProtocol:q,autolinkEmail:q,atxHeading:o(tn),blockQuote:o(Pe),characterEscape:q,characterReference:q,codeFenced:o(_e),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(_e,l),codeText:o(je,l),codeTextData:q,data:q,codeFlowValue:q,definition:o(wt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Re),hardBreakEscape:o(Lt),hardBreakTrailing:o(Lt),htmlFlow:o(nn,l),htmlFlowData:q,htmlText:o(nn,l),htmlTextData:q,image:o(Zr),label:l,link:o(jn),listItem:o(Ei),listItemValue:b,listOrdered:o(Tn,p),listUnordered:o(Tn),paragraph:o(Jr),reference:I,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(tn),strong:o(ei),thematicBreak:o(yt)},exit:{atxHeading:f(),atxHeadingSequence:B,autolink:f(),autolinkEmail:Ce,autolinkProtocol:Se,blockQuote:f(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:xe,characterReferenceMarkerNumeric:xe,characterReferenceValue:Te,characterReference:he,codeFenced:f(w),codeFencedFence:C,codeFencedFenceInfo:x,codeFencedFenceMeta:S,codeFlowValue:L,codeIndented:f(A),codeText:f(Z),codeTextData:L,data:L,definition:f(),definitionDestinationString:R,definitionLabelString:N,definitionTitleString:k,emphasis:f(),hardBreakEscape:f(Q),hardBreakTrailing:f(Q),htmlFlow:f(ee),htmlFlowData:L,htmlText:f(ne),htmlTextData:L,image:f(H),label:te,labelText:$,lineEnding:X,link:f(D),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:de,resourceDestinationString:F,resourceTitleString:V,resource:ie,setextHeading:f(P),setextHeadingLineSequence:j,setextHeadingText:O,strong:f(),thematicBreak:f()}};SI(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ce){let ve={type:"root",children:[]};const Fe={stack:[ve],tokenStack:[],config:t,enter:c,exit:d,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 Nn=Ze.pop();ht=s(ce,Nn,ht)}for(ht=-1;++ht<ce.length;){const Nn=t[ce[ht][0]];vI.call(Nn,ce[ht][1].type)&&Nn[ce[ht][1].type].call(Object.assign({sliceSerialize:ce[ht][2].sliceSerialize},Fe),ce[ht][1])}if(Fe.tokenStack.length>0){const Nn=Fe.tokenStack[Fe.tokenStack.length-1];(Nn[1]||O_).call(Fe,void 0,Nn[0])}for(ve.position={start:Xs(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:Xs(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},ht=-1;++ht<t.transforms.length;)ve=t.transforms[ht](ve)||ve;return ve}function s(ce,ve,Fe){let Ze=ve-1,ht=-1,Nn=!1,Rn,on,Vt,vn;for(;++Ze<=Fe;){const vt=ce[Ze];switch(vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{vt[0]==="enter"?ht++:ht--,vn=void 0;break}case"lineEndingBlank":{vt[0]==="enter"&&(Rn&&!vn&&!ht&&!Vt&&(Vt=Ze),vn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:vn=void 0}if(!ht&&vt[0]==="enter"&&vt[1].type==="listItemPrefix"||ht===-1&&vt[0]==="exit"&&(vt[1].type==="listUnordered"||vt[1].type==="listOrdered")){if(Rn){let ye=Ze;for(on=void 0;ye--;){const He=ce[ye];if(He[1].type==="lineEnding"||He[1].type==="lineEndingBlank"){if(He[0]==="exit")continue;on&&(ce[on][1].type="lineEndingBlank",Nn=!0),He[1].type="lineEnding",on=ye}else if(!(He[1].type==="linePrefix"||He[1].type==="blockQuotePrefix"||He[1].type==="blockQuotePrefixWhitespace"||He[1].type==="blockQuoteMarker"||He[1].type==="listItemIndent"))break}Vt&&(!on||Vt<on)&&(Rn._spread=!0),Rn.end=Object.assign({},on?ce[on][1].start:vt[1].end),ce.splice(on||Ze,0,["exit",Rn,vt[2]]),Ze++,Fe++}if(vt[1].type==="listItemPrefix"){const ye={type:"listItem",_spread:!1,start:Object.assign({},vt[1].start),end:void 0};Rn=ye,ce.splice(Ze,0,["enter",ye,vt[2]]),Ze++,Fe++,Vt=void 0,vn=!0}}}return ce[ve][1]._spread=Nn,Fe}function o(ce,ve){return Fe;function Fe(Ze){c.call(this,ce(Ze),Ze),ve&&ve.call(this,Ze)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(ce,ve,Fe){this.stack[this.stack.length-1].children.push(ce),this.stack.push(ce),this.tokenStack.push([ve,Fe||void 0]),ce.position={start:Xs(ve.start),end:void 0}}function f(ce){return ve;function ve(Fe){ce&&ce.call(this,Fe),d.call(this,Fe)}}function d(ce,ve){const Fe=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==ce.type&&(ve?ve.call(this,ce,Ze[0]):(Ze[1]||O_).call(this,ce,Ze[0]));else throw new Error("Cannot close `"+ce.type+"` ("+Kc({start:ce.start,end:ce.end})+"): it’s not open");Fe.position.end=Xs(ce.end)}function m(){return pE(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(ce){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(ce),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=ce}function S(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=ce}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ce.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ce.replace(/(\r?\n|\r)$/g,"")}function N(ce){const ve=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=ve,Fe.identifier=hi(this.sliceSerialize(ce)).toLowerCase()}function k(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ce}function R(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ce}function B(ce){const ve=this.stack[this.stack.length-1];if(!ve.depth){const Fe=this.sliceSerialize(ce).length;ve.depth=Fe}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function j(ce){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(ce).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function q(ce){const Fe=this.stack[this.stack.length-1].children;let Ze=Fe[Fe.length-1];(!Ze||Ze.type!=="text")&&(Ze=rt(),Ze.position={start:Xs(ce.start),end:void 0},Fe.push(Ze)),this.stack.push(Ze)}function L(ce){const ve=this.stack.pop();ve.value+=this.sliceSerialize(ce),ve.position.end=Xs(ce.end)}function X(ce){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Fe=ve.children[ve.children.length-1];Fe.position.end=Xs(ce.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ve.type)&&(q.call(this,ce),L.call(this,ce))}function Q(){this.data.atHardBreak=!0}function ee(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ce}function ne(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ce}function Z(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ce}function D(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=ve,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 ve=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=ve,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function $(ce){const ve=this.sliceSerialize(ce),Fe=this.stack[this.stack.length-2];Fe.label=KJ(ve),Fe.identifier=hi(ve).toLowerCase()}function te(){const ce=this.stack[this.stack.length-1],ve=this.resume(),Fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Fe.type==="link"){const Ze=ce.children;Fe.children=Ze}else Fe.alt=ve}function F(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ce}function V(){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ce}function ie(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function de(ce){const ve=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=ve,Fe.identifier=hi(this.sliceSerialize(ce)).toLowerCase(),this.data.referenceType="full"}function xe(ce){this.data.characterReferenceType=ce.type}function Te(ce){const ve=this.sliceSerialize(ce),Fe=this.data.characterReferenceType;let Ze;Fe?(Ze=$6(ve,Fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=bE(ve);const ht=this.stack[this.stack.length-1];ht.value+=Ze}function he(ce){const ve=this.stack.pop();ve.position.end=Xs(ce.end)}function Se(ce){L.call(this,ce);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(ce)}function Ce(ce){L.call(this,ce);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(ce)}function Pe(){return{type:"blockquote",children:[]}}function _e(){return{type:"code",lang:null,meta:null,value:""}}function je(){return{type:"inlineCode",value:""}}function wt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function tn(){return{type:"heading",depth:0,children:[]}}function Lt(){return{type:"break"}}function nn(){return{type:"html",value:""}}function Zr(){return{type:"image",title:null,url:"",alt:null}}function jn(){return{type:"link",title:null,url:"",children:[]}}function Tn(ce){return{type:"list",ordered:ce.type==="listOrdered",start:null,spread:ce._spread,children:[]}}function Ei(ce){return{type:"listItem",spread:ce._spread,checked:null,children:[]}}function Jr(){return{type:"paragraph",children:[]}}function ei(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function yt(){return{type:"thematicBreak"}}}function Xs(e){return{line:e.line,column:e.column,offset:e.offset}}function SI(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?SI(e,r):gie(e,r)}}function gie(e,t){let n;for(n in t)if(vI.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 O_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Kc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Kc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Kc({start:t.start,end:t.end})+") is still open")}function bie(e){const t=this;t.parser=n;function n(r){return mie(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function yie(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 xie(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
401
- `}]}function Eie(e,t){const n=t.value?t.value+`
402
- `:"",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 Tie(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vie(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sie(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Tu(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,c+=1,e.footnoteCounts.set(r,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const d={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,d),e.applyData(t,d)}function Cie(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 wie(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function CI(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 Aie(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return CI(e,t);const s={src:Tu(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 _ie(e,t){const n={src:Tu(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 kie(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 Nie(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return CI(e,t);const s={href:Tu(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 Rie(e,t){const n={href:Tu(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 Die(e,t,n){const r=e.all(t),s=n?Oie(n):wI(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 c=-1;for(;++c<r.length;){const m=r[c];(s||c!==0||m.type!=="element"||m.tagName!=="p")&&l.push({type:"text",value:`
403
- `}),m.type==="element"&&m.tagName==="p"&&!s?l.push(...m.children):l.push(m)}const f=r[r.length-1];f&&(s||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
404
- `});const d={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,d),e.applyData(t,d)}function Oie(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=wI(n[r])}return t}function wI(e){const t=e.spread;return t??e.children.length>1}function Mie(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 Iie(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lie(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Pie(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jie(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)},c=Vi(t.children[1]),f=dp(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),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 Bie(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,c=l?l.length:t.children.length;let f=-1;const d=[];for(;++f<c;){const p=t.children[f],b={},x=l?l[f]:void 0;x&&(b.align=x);let S={type:"element",tagName:o,properties:b,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),d.push(S)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,m),e.applyData(t,m)}function Fie(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const M_=9,I_=32;function Uie(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const o=[];for(;r;)o.push(L_(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return o.push(L_(t.slice(s),s>0,!1)),o.join("")}function L_(e,t,n){let r=0,s=e.length;if(t){let o=e.codePointAt(r);for(;o===M_||o===I_;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(s-1);for(;o===M_||o===I_;)s--,o=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function Hie(e,t){const n={type:"text",value:Uie(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function zie(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Vie={blockquote:yie,break:xie,code:Eie,delete:Tie,emphasis:vie,footnoteReference:Sie,heading:Cie,html:wie,imageReference:Aie,image:_ie,inlineCode:kie,linkReference:Nie,link:Rie,listItem:Die,list:Mie,paragraph:Iie,root:Lie,strong:Pie,table:jie,tableCell:Fie,tableRow:Bie,text:Hie,thematicBreak:zie,toml:_h,yaml:_h,definition:_h,footnoteDefinition:_h};function _h(){}function qie(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 $ie(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Yie(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||qie,r=e.options.footnoteBackLabel||$ie,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[f]);if(!d)continue;const m=e.all(d),p=String(d.identifier).toUpperCase(),b=Tu(p.toLowerCase());let x=0;const S=[],C=e.footnoteCounts.get(p);for(;C!==void 0&&++x<=C;){S.length>0&&S.push({type:"text",value:" "});let N=typeof n=="string"?n:n(f,x);typeof N=="string"&&(N={type:"text",value:N}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,x),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const w=m[m.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const N=w.children[w.children.length-1];N&&N.type==="text"?N.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...S)}else m.push(...S);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(d,A),c.push(A)}if(c.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:`
405
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
406
- `}]}}const xy={}.hasOwnProperty,Gie={};function Kie(e,t){const n=t||Gie,r=new Map,s=new Map,o=new Map,l={...Vie,...n.handlers},c={all:d,applyData:Xie,definitionById:r,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:l,one:f,options:n,patch:Qie,wrap:Zie};return ru(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:s,b=String(m.identifier).toUpperCase();p.has(b)||p.set(b,m)}}),c;function f(m,p){const b=m.type,x=c.handlers[b];if(xy.call(c.handlers,b)&&x)return x(c,m,p);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in m){const{children:C,...w}=m,A=So(w);return A.children=c.all(m),A}return So(m)}return(c.options.unknownHandler||Wie)(c,m,p)}function d(m){const p=[];if("children"in m){const b=m.children;let x=-1;for(;++x<b.length;){const S=c.one(b[x],m);if(S){if(x&&b[x-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=P_(S.value)),!Array.isArray(S)&&S.type==="element")){const C=S.children[0];C&&C.type==="text"&&(C.value=P_(C.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function Qie(e,t){e.position&&(t.position=T6(e))}function Xie(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 Wie(e,t){const n=t.data||{},r="value"in t&&!(xy.call(n,"hProperties")||xy.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 Zie(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
407
- `});++r<e.length;)r&&n.push({type:"text",value:`
408
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
409
- `}),n}function P_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function j_(e,t){const n=Kie(e,t),r=n.one(e,void 0),s=Yie(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
410
- `},s),o}function Jie(e,t){return e&&"run"in e?async function(n,r){const s=j_(n,{file:r,...t});await e.run(s,r)}:function(n,r){return j_(n,{file:r,...e||t})}}function B_(e){if(e)throw e}var q1,F_;function ese(){if(F_)return q1;F_=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},o=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var m=e.call(d,"constructor"),p=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!m&&!p)return!1;var b;for(b in d);return typeof b>"u"||e.call(d,b)},l=function(d,m){n&&m.name==="__proto__"?n(d,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):d[m.name]=m.newValue},c=function(d,m){if(m==="__proto__")if(e.call(d,m)){if(r)return r(d,m).value}else return;return d[m]};return q1=function f(){var d,m,p,b,x,S,C=arguments[0],w=1,A=arguments.length,N=!1;for(typeof C=="boolean"&&(N=C,C=arguments[1]||{},w=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});w<A;++w)if(d=arguments[w],d!=null)for(m in d)p=c(C,m),b=c(d,m),C!==b&&(N&&b&&(o(b)||(x=s(b)))?(x?(x=!1,S=p&&s(p)?p:[]):S=p&&o(p)?p:{},l(C,{name:m,newValue:f(N,S,b)})):typeof b<"u"&&l(C,{name:m,newValue:b}));return C},q1}var tse=ese();const $1=Tf(tse);function Ey(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 nse(){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);c(null,...s);function c(f,...d){const m=e[++o];let p=-1;if(f){l(f);return}for(;++p<s.length;)(d[p]===null||d[p]===void 0)&&(d[p]=s[p]);s=d,m?rse(m,c)(...d):l(null,...d)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function rse(e,t){let n;return r;function r(...l){const c=e.length>l.length;let f;c&&l.push(s);try{f=e.apply(this,l)}catch(d){const m=d;if(c&&n)throw m;return s(m)}c||(f&&f.then&&typeof f.then=="function"?f.then(o,s):f instanceof Error?s(f):o(f))}function s(l,...c){n||(n=!0,t(l,...c))}function o(l){s(null,l)}}const _i={basename:ise,dirname:sse,extname:ase,join:ose,sep:"/"};function ise(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Vf(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,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else l<0&&(o=!0,l=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function sse(e){if(Vf(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 ase(e){Vf(e);let t=e.length,n=-1,r=0,s=-1,o=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===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 ose(...e){let t=-1,n;for(;++t<e.length;)Vf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":lse(n)}function lse(e){Vf(e);const t=e.codePointAt(0)===47;let n=use(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function use(e,t){let n="",r=0,s=-1,o=0,l=-1,c,f;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===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(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),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 c===46&&o>-1?o++:o=-1}return n}function Vf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const cse={cwd:fse};function fse(){return"/"}function Ty(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function dse(e){if(typeof e=="string")e=new URL(e);else if(!Ty(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 hse(e)}function hse(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 Y1=["history","path","basename","stem","extname","dirname"];class mse{constructor(t){let n;t?Ty(t)?n={path:t}:typeof t=="string"||pse(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":cse.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Y1.length;){const o=Y1[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)Y1.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?_i.basename(this.path):void 0}set basename(t){K1(t,"basename"),G1(t,"basename"),this.path=_i.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?_i.dirname(this.path):void 0}set dirname(t){U_(this.basename,"dirname"),this.path=_i.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?_i.extname(this.path):void 0}set extname(t){if(G1(t,"extname"),U_(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=_i.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ty(t)&&(t=dse(t)),K1(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?_i.basename(this.path,this.extname):void 0}set stem(t){K1(t,"stem"),G1(t,"stem"),this.path=_i.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 $n(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 G1(e,t){if(e&&e.includes(_i.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_i.sep+"`")}function K1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function U_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function pse(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gse=(function(e){const r=this.constructor.prototype,s=r[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),bse={}.hasOwnProperty;class CE extends gse{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=nse()}copy(){const t=new CE;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data($1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(W1("data",this.frozen),this.namespace[t]=n,this):bse.call(this.namespace,t)&&this.namespace[t]||void 0:t?(W1("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=kh(t),r=this.parser||this.Parser;return Q1("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Q1("process",this.parser||this.Parser),X1("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,l){const c=kh(t),f=r.parse(c);r.run(f,c,function(m,p,b){if(m||!p||!b)return d(m);const x=p,S=r.stringify(x,b);Ese(S)?b.value=S:b.result=S,d(m,b)});function d(m,p){m||!p?l(m):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Q1("processSync",this.parser||this.Parser),X1("processSync",this.compiler||this.Compiler),this.process(t,s),z_("processSync","process",n),r;function s(o,l){n=!0,B_(o),r=l}}run(t,n,r){H_(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,c){const f=kh(n);s.run(t,f,d);function d(m,p,b){const x=p||t;m?c(m):l?l(x):r(void 0,x,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,o),z_("runSync","run",r),s;function o(l,c){B_(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=kh(n),s=this.compiler||this.Compiler;return X1("stringify",s),H_(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(W1("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(d){if(typeof d=="function")f(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[m,...p]=d;f(m,p)}else l(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function l(d){if(!("plugins"in d)&&!("settings"in d))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");c(d.plugins),d.settings&&(s.settings=$1(!0,s.settings,d.settings))}function c(d){let m=-1;if(d!=null)if(Array.isArray(d))for(;++m<d.length;){const p=d[m];o(p)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function f(d,m){let p=-1,b=-1;for(;++p<r.length;)if(r[p][0]===d){b=p;break}if(b===-1)r.push([d,...m]);else if(m.length>0){let[x,...S]=m;const C=r[b][1];Ey(C)&&Ey(x)&&(x=$1(!0,C,x)),r[b]=[d,x,...S]}}}}const yse=new CE().freeze();function Q1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function X1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function W1(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 H_(e){if(!Ey(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function z_(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kh(e){return xse(e)?e:new mse(e)}function xse(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ese(e){return typeof e=="string"||Tse(e)}function Tse(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function wE(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Io=wE();function AI(e){Io=e}var Qc={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(rr.caret,"$1"),n=n.replace(s,l),r},getRegex:()=>new RegExp(n,t)};return r}var vse=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),rr={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")},Sse=/^(?:[ \t]*(?:\n|$))+/,Cse=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,wse=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,qf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ase=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,AE=/(?:[*+-]|\d{1,9}[.)])/,_I=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,kI=Tt(_I).replace(/bull/g,AE).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(),_se=Tt(_I).replace(/bull/g,AE).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(),_E=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kse=/^[^\n]+/,kE=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Nse=Tt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kE).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rse=Tt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,AE).getRegex(),gp="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",NE=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Dse=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",NE).replace("tag",gp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),NI=Tt(_E).replace("hr",qf).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",gp).getRegex(),Ose=Tt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",NI).getRegex(),RE={blockquote:Ose,code:Cse,def:Nse,fences:wse,heading:Ase,hr:qf,html:Dse,lheading:kI,list:Rse,newline:Sse,paragraph:NI,table:Qc,text:kse},V_=Tt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",qf).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",gp).getRegex(),Mse={...RE,lheading:_se,table:V_,paragraph:Tt(_E).replace("hr",qf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",V_).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",gp).getRegex()},Ise={...RE,html:Tt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",NE).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:Qc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Tt(_E).replace("hr",qf).replace("heading",` *#{1,6} *[^
411
- ]`).replace("lheading",kI).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lse=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pse=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,RI=/^( {2,}|\\)\n(?!\s*$)/,jse=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,bp=/[\p{P}\p{S}]/u,DE=/[\s\p{P}\p{S}]/u,DI=/[^\s\p{P}\p{S}]/u,Bse=Tt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,DE).getRegex(),OI=/(?!~)[\p{P}\p{S}]/u,Fse=/(?!~)[\s\p{P}\p{S}]/u,Use=/(?:[^\s\p{P}\p{S}]|~)/u,Hse=Tt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",vse?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),MI=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,zse=Tt(MI,"u").replace(/punct/g,bp).getRegex(),Vse=Tt(MI,"u").replace(/punct/g,OI).getRegex(),II="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",qse=Tt(II,"gu").replace(/notPunctSpace/g,DI).replace(/punctSpace/g,DE).replace(/punct/g,bp).getRegex(),$se=Tt(II,"gu").replace(/notPunctSpace/g,Use).replace(/punctSpace/g,Fse).replace(/punct/g,OI).getRegex(),Yse=Tt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,DI).replace(/punctSpace/g,DE).replace(/punct/g,bp).getRegex(),Gse=Tt(/\\(punct)/,"gu").replace(/punct/g,bp).getRegex(),Kse=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(),Qse=Tt(NE).replace("(?:-->|$)","-->").getRegex(),Xse=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",Qse).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wm=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Wse=Tt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",wm).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),LI=Tt(/^!?\[(label)\]\[(ref)\]/).replace("label",wm).replace("ref",kE).getRegex(),PI=Tt(/^!?\[(ref)\](?:\[\])?/).replace("ref",kE).getRegex(),Zse=Tt("reflink|nolink(?!\\()","g").replace("reflink",LI).replace("nolink",PI).getRegex(),q_=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,OE={_backpedal:Qc,anyPunctuation:Gse,autolink:Kse,blockSkip:Hse,br:RI,code:Pse,del:Qc,emStrongLDelim:zse,emStrongRDelimAst:qse,emStrongRDelimUnd:Yse,escape:Lse,link:Wse,nolink:PI,punctuation:Bse,reflink:LI,reflinkSearch:Zse,tag:Xse,text:jse,url:Qc},Jse={...OE,link:Tt(/^!?\[(label)\]\((.*?)\)/).replace("label",wm).getRegex(),reflink:Tt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wm).getRegex()},vy={...OE,emStrongRDelimAst:$se,emStrongLDelim:Vse,url:Tt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",q_).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",q_).getRegex()},eae={...vy,br:Tt(RI).replace("{2,}","*").getRegex(),text:Tt(vy.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Nh={normal:RE,gfm:Mse,pedantic:Ise},wc={normal:OE,gfm:vy,breaks:eae,pedantic:Jse},tae={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$_=e=>tae[e];function fs(e,t){if(t){if(rr.escapeTest.test(e))return e.replace(rr.escapeReplace,$_)}else if(rr.escapeTestNoEncode.test(e))return e.replace(rr.escapeReplaceNoEncode,$_);return e}function Y_(e){try{e=encodeURI(e).replace(rr.percentDecode,"%")}catch{return null}return e}function G_(e,t){var o;let n=e.replace(rr.findPipe,(l,c,f)=>{let d=!1,m=c;for(;--m>=0&&f[m]==="\\";)d=!d;return d?"|":" |"}),r=n.split(rr.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(rr.slashPipe,"|");return r}function Ac(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 nae(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 K_(e,t,n,r,s){let o=t.href,l=t.title||null,c=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:l,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,f}function rae(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let s=r[1];return t.split(`
412
- `).map(o=>{let l=o.match(n.other.beginningSpace);if(l===null)return o;let[c]=l;return c.length>=s.length?o.slice(s.length):o}).join(`
413
- `)}var Am=class{constructor(e){$e(this,"options");$e(this,"rules");$e(this,"lexer");this.options=e||Io}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:Ac(n,`
414
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=rae(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=Ac(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:Ac(t[0],`
415
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Ac(t[0],`
416
- `).split(`
417
- `),r="",s="",o=[];for(;n.length>0;){let l=!1,c=[],f;for(f=0;f<n.length;f++)if(this.rules.other.blockquoteStart.test(n[f]))c.push(n[f]),l=!0;else if(!l)c.push(n[f]);else break;n=n.slice(f);let d=c.join(`
418
- `),m=d.replace(this.rules.other.blockquoteSetextReplace,`
419
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
420
- ${d}`:d,s=s?`${s}
421
- ${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 b=o.at(-1);if((b==null?void 0:b.type)==="code")break;if((b==null?void 0:b.type)==="blockquote"){let x=b,S=x.raw+`
422
- `+n.join(`
423
- `),C=this.blockquote(S);o[o.length-1]=C,r=r.substring(0,r.length-x.raw.length)+C.raw,s=s.substring(0,s.length-x.text.length)+C.text;break}else if((b==null?void 0:b.type)==="list"){let x=b,S=x.raw+`
424
- `+n.join(`
425
- `),C=this.list(S);o[o.length-1]=C,r=r.substring(0,r.length-b.raw.length)+C.raw,s=s.substring(0,s.length-x.raw.length)+C.raw,n=S.substring(o.at(-1).raw.length).split(`
426
- `);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 c=this.rules.other.listItemRegex(s),f=!1;for(;e;){let m=!1,p="",b="";if(!(t=c.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let x=t[2].split(`
427
- `,1)[0].replace(this.rules.other.listReplaceTabs,A=>" ".repeat(3*A.length)),S=e.split(`
428
- `,1)[0],C=!x.trim(),w=0;if(this.options.pedantic?(w=2,b=x.trimStart()):C?w=t[1].length+1:(w=t[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=x.slice(w),w+=t[1].length),C&&this.rules.other.blankLine.test(S)&&(p+=S+`
429
- `,e=e.substring(S.length+1),m=!0),!m){let A=this.rules.other.nextBulletRegex(w),N=this.rules.other.hrRegex(w),k=this.rules.other.fencesBeginRegex(w),R=this.rules.other.headingBeginRegex(w),B=this.rules.other.htmlBeginRegex(w);for(;e;){let O=e.split(`
430
- `,1)[0],j;if(S=O,this.options.pedantic?(S=S.replace(this.rules.other.listReplaceNesting," "),j=S):j=S.replace(this.rules.other.tabCharGlobal," "),k.test(S)||R.test(S)||B.test(S)||A.test(S)||N.test(S))break;if(j.search(this.rules.other.nonSpaceChar)>=w||!S.trim())b+=`
431
- `+j.slice(w);else{if(C||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(x)||R.test(x)||N.test(x))break;b+=`
432
- `+S}!C&&!S.trim()&&(C=!0),p+=O+`
433
- `,e=e.substring(O.length+1),x=j.slice(w)}}l.loose||(f?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(f=!0)),l.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(b),loose:!1,text:b,tokens:[]}),l.raw+=p}let d=l.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.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 b=this.lexer.inlineQueue.length-1;b>=0;b--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[b].src)){this.lexer.inlineQueue[b].src=this.lexer.inlineQueue[b].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(m.raw);if(p){let b={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};m.checked=b.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=b.raw+m.tokens[0].raw,m.tokens[0].text=b.raw+m.tokens[0].text,m.tokens[0].tokens.unshift(b)):m.tokens.unshift({type:"paragraph",raw:b.raw,text:b.raw,tokens:[b]}):m.tokens.unshift(b)}}if(!l.loose){let p=m.tokens.filter(x=>x.type==="space"),b=p.length>0&&p.some(x=>this.rules.other.anyLine.test(x.raw));l.loose=b}}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=G_(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(`
434
- `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let c of r)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<n.length;c++)o.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:o.align[c]});for(let c of s)o.rows.push(G_(c,o.header.length).map((f,d)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:o.align[d]})));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)===`
435
- `?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=Ac(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=nae(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)),K_(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 K_(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,c=s,f=0,d=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+s);(r=d.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]){c+=l;continue}else if((r[5]||r[6])&&s%3&&!((s+l)%3)){f+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+f);let m=[...r[0]][0].length,p=e.slice(0,s+r.index+m+l);if(Math.min(s,l)%2){let x=p.slice(1,-1);return{type:"em",raw:p,text:x,tokens:this.lexer.inlineTokens(x)}}let b=p.slice(2,-2);return{type:"strong",raw:p,text:b,tokens:this.lexer.inlineTokens(b)}}}}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}}}},Gr=class Sy{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||Io,this.options.tokenizer=this.options.tokenizer||new Am,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:rr,block:Nh.normal,inline:wc.normal};this.options.pedantic?(n.block=Nh.pedantic,n.inline=wc.pedantic):this.options.gfm&&(n.block=Nh.gfm,this.options.breaks?n.inline=wc.breaks:n.inline=wc.gfm),this.tokenizer.rules=n}static get rules(){return{block:Nh,inline:wc}}static lex(t,n){return new Sy(n).lex(t)}static lexInline(t,n){return new Sy(n).inlineTokens(t)}lex(t){t=t.replace(rr.carriageReturn,`
436
- `),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(rr.tabCharGlobal," ").replace(rr.spaceLine,""));t;){let c;if((o=(s=this.options.extensions)==null?void 0:s.block)!=null&&o.some(d=>(c=d.call({lexer:this},t,n))?(t=t.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(t)){t=t.substring(c.raw.length);let d=n.at(-1);c.raw.length===1&&d!==void 0?d.raw+=`
437
- `:n.push(c);continue}if(c=this.tokenizer.code(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
438
- `)?"":`
439
- `)+c.raw,d.text+=`
440
- `+c.text,this.inlineQueue.at(-1).src=d.text):n.push(c);continue}if(c=this.tokenizer.fences(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
441
- `)?"":`
442
- `)+c.raw,d.text+=`
443
- `+c.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(t)){t=t.substring(c.raw.length),n.push(c);continue}let f=t;if((l=this.options.extensions)!=null&&l.startBlock){let d=1/0,m=t.slice(1),p;this.options.extensions.startBlock.forEach(b=>{p=b.call({lexer:this},m),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(this.state.top&&(c=this.tokenizer.paragraph(f))){let d=n.at(-1);r&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
444
- `)?"":`
445
- `)+c.raw,d.text+=`
446
- `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(c),r=f.length!==t.length,t=t.substring(c.raw.length);continue}if(c=this.tokenizer.text(t)){t=t.substring(c.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
447
- `)?"":`
448
- `)+c.raw,d.text+=`
449
- `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(c);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var f,d,m,p,b;let r=t,s=null;if(this.tokens.links){let x=Object.keys(this.tokens.links);if(x.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)x.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=((d=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:d.call({lexer:this},r))??r;let l=!1,c="";for(;t;){l||(c=""),l=!1;let x;if((p=(m=this.options.extensions)==null?void 0:m.inline)!=null&&p.some(C=>(x=C.call({lexer:this},t,n))?(t=t.substring(x.raw.length),n.push(x),!0):!1))continue;if(x=this.tokenizer.escape(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.tag(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.link(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(x.raw.length);let C=n.at(-1);x.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=x.raw,C.text+=x.text):n.push(x);continue}if(x=this.tokenizer.emStrong(t,r,c)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.codespan(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.br(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.del(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.autolink(t)){t=t.substring(x.raw.length),n.push(x);continue}if(!this.state.inLink&&(x=this.tokenizer.url(t))){t=t.substring(x.raw.length),n.push(x);continue}let S=t;if((b=this.options.extensions)!=null&&b.startInline){let C=1/0,w=t.slice(1),A;this.options.extensions.startInline.forEach(N=>{A=N.call({lexer:this},w),typeof A=="number"&&A>=0&&(C=Math.min(C,A))}),C<1/0&&C>=0&&(S=t.substring(0,C+1))}if(x=this.tokenizer.inlineText(S)){t=t.substring(x.raw.length),x.raw.slice(-1)!=="_"&&(c=x.raw.slice(-1)),l=!0;let C=n.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=x.raw,C.text+=x.text):n.push(x);continue}if(t){let C="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return n}},_m=class{constructor(e){$e(this,"options");$e(this,"parser");this.options=e||Io}space(e){return""}code({text:e,lang:t,escaped:n}){var o;let r=(o=(t||"").match(rr.notSpaceStart))==null?void 0:o[0],s=e.replace(rr.endingNewline,"")+`
450
- `;return r?'<pre><code class="language-'+fs(r)+'">'+(n?s:fs(s,!0))+`</code></pre>
451
- `:"<pre><code>"+(n?s:fs(s,!0))+`</code></pre>
452
- `}blockquote({tokens:e}){return`<blockquote>
453
- ${this.parser.parse(e)}</blockquote>
454
- `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
455
- `}hr(e){return`<hr>
456
- `}list(e){let t=e.ordered,n=e.start,r="";for(let l=0;l<e.items.length;l++){let c=e.items[l];r+=this.listitem(c)}let s=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+s+o+`>
457
- `+r+"</"+s+`>
458
- `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
459
- `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
460
- `}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>
461
- <thead>
462
- `+t+`</thead>
463
- `+r+`</table>
464
- `}tablerow({text:e}){return`<tr>
465
- ${e}</tr>
466
- `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
467
- `}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>${fs(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=Y_(e);if(s===null)return r;e=s;let o='<a href="'+e+'"';return t&&(o+=' title="'+fs(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=Y_(e);if(s===null)return fs(n);e=s;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${fs(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:fs(e.text)}},ME=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}},ci=class Cy{constructor(t){$e(this,"options");$e(this,"renderer");$e(this,"textRenderer");this.options=t||Io,this.options.renderer=this.options.renderer||new _m,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ME}static parse(t,n){return new Cy(n).parse(t)}static parseInline(t,n){return new Cy(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 f=l,d=this.options.extensions.renderers[f.type].call({parser:this},f);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(f.type)){n+=d||"";continue}}let c=l;switch(c.type){case"space":{n+=this.renderer.space(c);break}case"hr":{n+=this.renderer.hr(c);break}case"heading":{n+=this.renderer.heading(c);break}case"code":{n+=this.renderer.code(c);break}case"table":{n+=this.renderer.table(c);break}case"blockquote":{n+=this.renderer.blockquote(c);break}case"list":{n+=this.renderer.list(c);break}case"checkbox":{n+=this.renderer.checkbox(c);break}case"html":{n+=this.renderer.html(c);break}case"def":{n+=this.renderer.def(c);break}case"paragraph":{n+=this.renderer.paragraph(c);break}case"text":{n+=this.renderer.text(c);break}default:{let f='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}parseInline(t,n=this.renderer){var s,o;let r="";for(let l=0;l<t.length;l++){let c=t[l];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[c.type]){let d=this.options.extensions.renderers[c.type].call({parser:this},c);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=d||"";continue}}let f=c;switch(f.type){case"escape":{r+=n.text(f);break}case"html":{r+=n.html(f);break}case"link":{r+=n.link(f);break}case"image":{r+=n.image(f);break}case"checkbox":{r+=n.checkbox(f);break}case"strong":{r+=n.strong(f);break}case"em":{r+=n.em(f);break}case"codespan":{r+=n.codespan(f);break}case"br":{r+=n.br(f);break}case"del":{r+=n.del(f);break}case"text":{r+=n.text(f);break}default:{let d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return r}},Oh,Ic=(Oh=class{constructor(e){$e(this,"options");$e(this,"block");this.options=e||Io}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Gr.lex:Gr.lexInline}provideParser(){return this.block?ci.parse:ci.parseInline}},$e(Oh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),$e(Oh,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Oh),iae=class{constructor(...t){$e(this,"defaults",wE());$e(this,"options",this.setOptions);$e(this,"parse",this.parseMarkdown(!0));$e(this,"parseInline",this.parseMarkdown(!1));$e(this,"Parser",ci);$e(this,"Renderer",_m);$e(this,"TextRenderer",ME);$e(this,"Lexer",Gr);$e(this,"Tokenizer",Am);$e(this,"Hooks",Ic);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 c=l;for(let f of c.header)r=r.concat(this.walkTokens(f.tokens,n));for(let f of c.rows)for(let d of f)r=r.concat(this.walkTokens(d.tokens,n));break}case"list":{let c=l;r=r.concat(this.walkTokens(c.items,n));break}default:{let c=l;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(f=>{let d=c[f].flat(1/0);r=r.concat(this.walkTokens(d,n))}):c.tokens&&(r=r.concat(this.walkTokens(c.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(...c){let f=o.renderer.apply(this,c);return f===!1&&(f=l.apply(this,c)),f}: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 _m(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 c=l,f=r.renderer[c],d=o[c];o[c]=(...m)=>{let p=f.apply(o,m);return p===!1&&(p=d.apply(o,m)),p||""}}s.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new Am(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 c=l,f=r.tokenizer[c],d=o[c];o[c]=(...m)=>{let p=f.apply(o,m);return p===!1&&(p=d.apply(o,m)),p}}s.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new Ic;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 c=l,f=r.hooks[c],d=o[c];Ic.passThroughHooks.has(l)?o[c]=m=>{if(this.defaults.async&&Ic.passThroughHooksRespectAsync.has(l))return(async()=>{let b=await f.call(o,m);return d.call(o,b)})();let p=f.call(o,m);return d.call(o,p)}:o[c]=(...m)=>{if(this.defaults.async)return(async()=>{let b=await f.apply(o,m);return b===!1&&(b=await d.apply(o,m)),b})();let p=f.apply(o,m);return p===!1&&(p=d.apply(o,m)),p}}s.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,l=r.walkTokens;s.walkTokens=function(c){let f=[];return f.push(l.call(this,c)),o&&(f=f.concat(o.call(this,c))),f}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Gr.lex(t,n??this.defaults)}parser(t,n){return ci.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 c=o.hooks?await o.hooks.preprocess(n):n,f=await(o.hooks?await o.hooks.provideLexer():t?Gr.lex:Gr.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(f):f;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let m=await(o.hooks?await o.hooks.provideParser():t?ci.parse:ci.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(m):m})().catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let c=(o.hooks?o.hooks.provideLexer():t?Gr.lex:Gr.lexInline)(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let f=(o.hooks?o.hooks.provideParser():t?ci.parse:ci.parseInline)(c,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(c){return l(c)}}}onError(t,n){return r=>{if(r.message+=`
468
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+fs(r.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(r);throw r}}},wo=new iae;function It(e,t){return wo.parse(e,t)}It.options=It.setOptions=function(e){return wo.setOptions(e),It.defaults=wo.defaults,AI(It.defaults),It};It.getDefaults=wE;It.defaults=Io;It.use=function(...e){return wo.use(...e),It.defaults=wo.defaults,AI(It.defaults),It};It.walkTokens=function(e,t){return wo.walkTokens(e,t)};It.parseInline=wo.parseInline;It.Parser=ci;It.parser=ci.parse;It.Renderer=_m;It.TextRenderer=ME;It.Lexer=Gr;It.lexer=Gr.lex;It.Tokenizer=Am;It.Hooks=Ic;It.parse=It;It.options;It.setOptions;It.use;It.walkTokens;It.parseInline;ci.parse;Gr.lex;var sae=300,aae="300px",oae=500;function lae(e={}){let{immediate:t=!1,debounceDelay:n=sae,rootMargin:r=aae,idleTimeout:s=oae}=e,[o,l]=E.useState(!1),c=E.useRef(null),f=E.useRef(null),d=E.useRef(null),m=E.useMemo(()=>x=>{let S=Date.now();return window.setTimeout(()=>{x({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-S))})},1)},[]),p=E.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(x,S)=>window.requestIdleCallback(x,S):m,[m]),b=E.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?x=>window.cancelIdleCallback(x):x=>{clearTimeout(x)},[]);return E.useEffect(()=>{if(t){l(!0);return}let x=c.current;if(!x)return;f.current&&(clearTimeout(f.current),f.current=null),d.current&&(b(d.current),d.current=null);let S=()=>{f.current&&(clearTimeout(f.current),f.current=null),d.current&&(b(d.current),d.current=null)},C=k=>{d.current=p(R=>{R.timeRemaining()>0||R.didTimeout?(l(!0),k.disconnect()):d.current=p(()=>{l(!0),k.disconnect()},{timeout:s/2})},{timeout:s})},w=k=>{S(),f.current=window.setTimeout(()=>{var R,B;let O=k.takeRecords();(O.length===0||(B=(R=O.at(-1))==null?void 0:R.isIntersecting)!=null&&B)&&C(k)},n)},A=(k,R)=>{k.isIntersecting?w(R):S()},N=new IntersectionObserver(k=>{for(let R of k)A(R,N)},{rootMargin:r,threshold:0});return N.observe(x),()=>{f.current&&clearTimeout(f.current),d.current&&b(d.current),N.disconnect()}},[t,n,r,s,b,p]),{shouldRender:o,containerRef:c}}var IE=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),LE=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),yp=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),uae=e=>g.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[g.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),cae=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),fae=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),jI=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),Q_=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),dae=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),hae=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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)=>X3(By(e)),Hl=(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)},mae=E.createContext({code:""}),BI=()=>E.useContext(mae),X_=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:s,code:o,...l})=>{let[c,f]=E.useState(!1),d=E.useRef(0),{code:m}=BI(),{isAnimating:p}=E.useContext(Wr),b=o??m,x=async()=>{var C;if(typeof window>"u"||!((C=navigator==null?void 0:navigator.clipboard)!=null&&C.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{c||(await navigator.clipboard.writeText(b),f(!0),e==null||e(),d.current=window.setTimeout(()=>f(!1),n))}catch(w){t==null||t(w)}};E.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);let S=c?IE:LE;return g.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:x,title:"Copy Code",type:"button",...l,children:r??g.jsx(S,{size:14})})},W_={"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"},pae=({onDownload:e,onError:t,language:n,children:r,className:s,code:o,...l})=>{let{code:c}=BI(),{isAnimating:f}=E.useContext(Wr),d=o??c,m=`file.${n&&n in W_?W_[n]:"txt"}`,p="text/plain",b=()=>{try{Hl(m,d,p),e==null||e()}catch(x){t==null||t(x)}};return g.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:f,onClick:b,title:"Download file",type:"button",...l,children:r??g.jsx(yp,{size:14})})},Z_=()=>g.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[g.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),g.jsx("div",{className:"flex w-full items-center justify-center p-4",children:g.jsx(uae,{className:"size-4 animate-spin"})})]}),gae=/\.[^/.]+$/,bae=({node:e,className:t,src:n,alt:r,...s})=>{let o=async()=>{if(n)try{let l=await(await fetch(n)).blob(),c=new URL(n,window.location.origin).pathname.split("/").pop()||"",f=c.split(".").pop(),d=c.includes(".")&&f!==void 0&&f.length<=4,m="";if(d)m=c;else{let p=l.type,b="png";p.includes("jpeg")||p.includes("jpg")?b="jpg":p.includes("png")?b="png":p.includes("svg")?b="svg":p.includes("gif")?b="gif":p.includes("webp")&&(b="webp"),m=`${(r||c||"image").replace(gae,"")}.${b}`}Hl(m,l,l.type)}catch{window.open(n,"_blank")}};return n?g.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[g.jsx("img",{alt:r,className:Ge("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...s}),g.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),g.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:g.jsx(yp,{size:14})})]}):null},Xc=0,yae=()=>{Xc+=1,Xc===1&&(document.body.style.overflow="hidden")},xae=()=>{Xc=Math.max(0,Xc-1),Xc===0&&(document.body.style.overflow="")},Eae=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[s,o]=E.useState(!1),l=E.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch{}},[e]),c=E.useCallback(()=>{r(),n()},[r,n]);return E.useEffect(()=>{if(t){yae();let f=d=>{d.key==="Escape"&&n()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),xae()}}},[t,n]),t?g.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:f=>{f.key==="Escape"&&n()},role:"button",tabIndex:0,children:g.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:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:[g.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:g.jsx(jI,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(Q_,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.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}),g.jsxs("div",{className:"flex gap-2",children:[g.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?g.jsxs(g.Fragment,{children:[g.jsx(IE,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(LE,{size:14}),g.jsx("span",{children:"Copy link"})]})}),g.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:c,type:"button",children:[g.jsx(Q_,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},wy=E.createContext(null),FI=()=>E.useContext(wy),Woe=()=>{var e;let t=FI();return(e=t==null?void 0:t.code)!=null?e:null},PE=()=>{var e;let t=FI();return(e=t==null?void 0:t.mermaid)!=null?e:null},Tae=(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))),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let f=document.createElement("canvas"),d=c.width*r,m=c.height*r;f.width=d,f.height=m;let p=f.getContext("2d");if(!p){o(new Error("Failed to create 2D canvas context for PNG export"));return}p.drawImage(c,0,0,d,m),f.toBlob(b=>{if(!b){o(new Error("Failed to create PNG blob"));return}s(b)},"image/png")},c.onerror=()=>o(new Error("Failed to load SVG image")),c.src=l})},vae=({chart:e,children:t,className:n,onDownload:r,config:s,onError:o})=>{let[l,c]=E.useState(!1),f=E.useRef(null),{isAnimating:d}=E.useContext(Wr),m=PE(),p=async b=>{try{if(b==="mmd"){Hl("diagram.mmd",e,"text/plain"),c(!1),r==null||r(b);return}if(!m){o==null||o(new Error("Mermaid plugin not available"));return}let x=m.getMermaid(s),S=e.split("").reduce((A,N)=>(A<<5)-A+N.charCodeAt(0)|0,0),C=`mermaid-${Math.abs(S)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:w}=await x.render(C,e);if(!w){o==null||o(new Error("SVG not found. Please wait for the diagram to render."));return}if(b==="svg"){Hl("diagram.svg",w,"image/svg+xml"),c(!1),r==null||r(b);return}if(b==="png"){let A=await Tae(w);Hl("diagram.png",A,"image/png"),r==null||r(b),c(!1);return}}catch(x){o==null||o(x)}};return E.useEffect(()=>{let b=x=>{let S=x.composedPath();f.current&&!S.includes(f.current)&&c(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),g.jsxs("div",{className:"relative",ref:f,children:[g.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:d,onClick:()=>c(!l),title:"Download diagram",type:"button",children:t??g.jsx(yp,{size:14})}),l?g.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:[g.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"}),g.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"}),g.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]})},Wc=0,Sae=()=>{Wc+=1,Wc===1&&(document.body.style.overflow="hidden")},Cae=()=>{Wc=Math.max(0,Wc-1),Wc===0&&(document.body.style.overflow="")},wae=({chart:e,config:t,onFullscreen:n,onExit:r,className:s,...o})=>{let[l,c]=E.useState(!1),{isAnimating:f,controls:d}=E.useContext(Wr),m=(()=>{if(typeof d=="boolean")return d;let b=d.mermaid;return b===!1?!1:b===!0||b===void 0?!0:b.panZoom!==!1})(),p=()=>{c(!l)};return E.useEffect(()=>{if(l){Sae();let b=x=>{x.key==="Escape"&&c(!1)};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b),Cae()}}},[l]),E.useEffect(()=>{l?n==null||n():r&&r()},[l,n,r]),g.jsxs(g.Fragment,{children:[g.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:f,onClick:p,title:"View fullscreen",type:"button",...o,children:g.jsx(cae,{size:14})}),l?g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:p,onKeyDown:b=>{b.key==="Escape"&&p()},role:"button",tabIndex:0,children:[g.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:g.jsx(jI,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:b=>b.stopPropagation(),onKeyDown:b=>b.stopPropagation(),role:"presentation",children:g.jsx(p4,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:m})})]}):null]})},UI=e=>{var t,n;let r=[],s=[],o=e.querySelectorAll("thead th");for(let c of o)r.push(((t=c.textContent)==null?void 0:t.trim())||"");let l=e.querySelectorAll("tbody tr");for(let c of l){let f=[],d=c.querySelectorAll("td");for(let m of d)f.push(((n=m.textContent)==null?void 0:n.trim())||"");s.push(f)}return{headers:r,rows:s}},HI=e=>{let{headers:t,rows:n}=e,r=c=>{let f=!1,d=!1;for(let m of c){if(m==='"'){f=!0,d=!0;break}(m===","||m===`
469
- `)&&(f=!0)}return f?d?`"${c.replace(/"/g,'""')}"`:`"${c}"`:c},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 c of n)o[l]=c.map(r).join(","),l+=1;return o.join(`
470
- `)},Aae=e=>{let{headers:t,rows:n}=e,r=c=>{let f=!1;for(let m of c)if(m===" "||m===`
471
- `||m==="\r"){f=!0;break}if(!f)return c;let d=[];for(let m of c)m===" "?d.push("\\t"):m===`
472
- `?d.push("\\n"):m==="\r"?d.push("\\r"):d.push(m);return d.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 c of n)o[l]=c.map(r).join(" "),l+=1;return o.join(`
473
- `)},Z1=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("")},_ae=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),s=0,o=t.map(c=>Z1(c));r[s]=`| ${o.join(" | ")} |`,s+=1;let l=new Array(t.length);for(let c=0;c<t.length;c+=1)l[c]="---";r[s]=`| ${l.join(" | ")} |`,s+=1;for(let c of n)if(c.length<t.length){let f=new Array(t.length);for(let d=0;d<t.length;d+=1)f[d]=d<c.length?Z1(c[d]):"";r[s]=`| ${f.join(" | ")} |`,s+=1}else{let f=c.map(d=>Z1(d));r[s]=`| ${f.join(" | ")} |`,s+=1}return r.join(`
474
- `)},kae=({children:e,className:t,onCopy:n,onError:r,timeout:s=2e3})=>{let[o,l]=E.useState(!1),[c,f]=E.useState(!1),d=E.useRef(null),m=E.useRef(0),{isAnimating:p}=E.useContext(Wr),b=async S=>{var C,w;if(typeof window>"u"||!((C=navigator==null?void 0:navigator.clipboard)!=null&&C.write)){r==null||r(new Error("Clipboard API not available"));return}try{let A=(w=d.current)==null?void 0:w.closest('[data-streamdown="table-wrapper"]'),N=A==null?void 0:A.querySelector("table");if(!N){r==null||r(new Error("Table not found"));return}let k=UI(N),R=S==="csv"?HI(k):Aae(k),B=new ClipboardItem({"text/plain":new Blob([R],{type:"text/plain"}),"text/html":new Blob([N.outerHTML],{type:"text/html"})});await navigator.clipboard.write([B]),f(!0),l(!1),n==null||n(S),m.current=window.setTimeout(()=>f(!1),s)}catch(A){r==null||r(A)}};E.useEffect(()=>{let S=C=>{let w=C.composedPath();d.current&&!w.includes(d.current)&&l(!1)};return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S),window.clearTimeout(m.current)}},[]);let x=c?IE:LE;return g.jsxs("div",{className:"relative",ref:d,children:[g.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??g.jsx(x,{size:14})}),o?g.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:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>b("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>b("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},Nae=({children:e,className:t,onDownload:n,onError:r})=>{let[s,o]=E.useState(!1),l=E.useRef(null),{isAnimating:c}=E.useContext(Wr),f=d=>{var m;try{let p=(m=l.current)==null?void 0:m.closest('[data-streamdown="table-wrapper"]'),b=p==null?void 0:p.querySelector("table");if(!b){r==null||r(new Error("Table not found"));return}let x=UI(b),S=d==="csv"?HI(x):_ae(x);Hl(`table.${d==="csv"?"csv":"md"}`,S,d==="csv"?"text/csv":"text/markdown"),o(!1),n==null||n(d)}catch(p){r==null||r(p)}};return E.useEffect(()=>{let d=m=>{let p=m.composedPath();l.current&&!p.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]),g.jsxs("div",{className:"relative",ref:l,children:[g.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:c,onClick:()=>o(!s),title:"Download table",type:"button",children:e??g.jsx(yp,{size:14})}),s?g.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:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},Rae=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(kae,{}),g.jsx(Nae,{})]}):null,g.jsx("div",{className:"overflow-x-auto",children:g.jsx("table",{className:Ge("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),Dae=E.lazy(()=>ky(()=>import("./code-block-37QAKDTI-D1V_F2_H.js"),[]).then(e=>({default:e.CodeBlock}))),Oae=E.lazy(()=>ky(()=>Promise.resolve().then(()=>qoe),void 0).then(e=>({default:e.Mermaid}))),Mae=/language-([^\s]+)/;function xp(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 en(e,t){return e.className===t.className&&xp(e.node,t.node)}var Ay=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Rh=(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},jE=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:Ge("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>en(e,t));jE.displayName="MarkdownOl";var zI=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:Ge("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&xp(e.node,t.node));zI.displayName="MarkdownLi";var VI=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:Ge("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>en(e,t));VI.displayName="MarkdownUl";var qI=E.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:Ge("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>en(e,t));qI.displayName="MarkdownHr";var $I=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:Ge("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>en(e,t));$I.displayName="MarkdownStrong";var Iae=({children:e,className:t,href:n,node:r,...s})=>{let{linkSafety:o}=E.useContext(Wr),[l,c]=E.useState(!1),f=n==="streamdown:incomplete-link",d=E.useCallback(async x=>{if(!(!(o!=null&&o.enabled&&n)||f)){if(x.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}c(!0)}},[o,n,f]),m=E.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),p=E.useCallback(()=>{c(!1)},[]),b={url:n??"",isOpen:l,onClose:p,onConfirm:m};return o!=null&&o.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:Ge("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":f,"data-streamdown":"link",onClick:d,type:"button",children:e}),o.renderModal?o.renderModal(b):g.jsx(Eae,{...b})]}):g.jsx("a",{className:Ge("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":f,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...s,children:e})},YI=E.memo(Iae,(e,t)=>en(e,t)&&e.href===t.href);YI.displayName="MarkdownA";var GI=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:Ge("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>en(e,t));GI.displayName="MarkdownH1";var KI=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:Ge("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>en(e,t));KI.displayName="MarkdownH2";var QI=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:Ge("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>en(e,t));QI.displayName="MarkdownH3";var XI=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:Ge("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>en(e,t));XI.displayName="MarkdownH4";var WI=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:Ge("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>en(e,t));WI.displayName="MarkdownH5";var ZI=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:Ge("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>en(e,t));ZI.displayName="MarkdownH6";var JI=E.memo(({children:e,className:t,node:n,...r})=>{let{controls:s}=E.useContext(Wr),o=Ay(s,"table");return g.jsx(Rae,{className:t,showControls:o,...r,children:e})},(e,t)=>en(e,t));JI.displayName="MarkdownTable";var e4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:Ge("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>en(e,t));e4.displayName="MarkdownThead";var t4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:Ge("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>en(e,t));t4.displayName="MarkdownTbody";var n4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:Ge("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>en(e,t));n4.displayName="MarkdownTr";var r4=E.memo(({children:e,className:t,node:n,...r})=>g.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)=>en(e,t));r4.displayName="MarkdownTh";var i4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:Ge("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>en(e,t));i4.displayName="MarkdownTd";var s4=E.memo(({children:e,className:t,node:n,...r})=>g.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)=>en(e,t));s4.displayName="MarkdownBlockquote";var a4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:Ge("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>en(e,t));a4.displayName="MarkdownSup";var o4=E.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:Ge("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>en(e,t));o4.displayName="MarkdownSub";var l4=E.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let s=l=>{var c,f;if(!E.isValidElement(l))return!1;let d=Array.isArray(l.props.children)?l.props.children:[l.props.children],m=!1,p=!1;for(let b of d)if(b){if(typeof b=="string")b.trim()!==""&&(m=!0);else if(E.isValidElement(b))if(((c=b.props)==null?void 0:c["data-footnote-backref"])!==void 0)p=!0;else{let x=Array.isArray(b.props.children)?b.props.children:[b.props.children];for(let S of x){if(typeof S=="string"&&S.trim()!==""){m=!0;break}if(E.isValidElement(S)&&((f=S.props)==null?void 0:f["data-footnote-backref"])===void 0){m=!0;break}}}}return p&&!m},o=Array.isArray(e)?e.map(l=>{if(!E.isValidElement(l))return l;if(l.type===jE){let c=(Array.isArray(l.props.children)?l.props.children:[l.props.children]).filter(f=>!s(f));return c.length===0?null:{...l,props:{...l.props,children:c}}}return l}):e;return(Array.isArray(o)?o.some(l=>l!==null):o!==null)?g.jsx("section",{className:t,...r,children:o}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>en(e,t));l4.displayName="MarkdownSection";var Lae=({node:e,className:t,children:n,...r})=>{var s,o,l;let c=((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:f,controls:d}=E.useContext(Wr),m=PE();if(c)return g.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(Mae),b=(l=p==null?void 0:p.at(1))!=null?l:"",x="";if(E.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?x=n.props.children:typeof n=="string"&&(x=n),b==="mermaid"&&m){let C=Ay(d,"mermaid"),w=Rh(d,"download"),A=Rh(d,"copy"),N=Rh(d,"fullscreen"),k=Rh(d,"panZoom"),R=C&&(w||A||N);return g.jsx(E.Suspense,{fallback:g.jsx(Z_,{}),children:g.jsxs("div",{className:Ge("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[R?g.jsxs("div",{className:"flex items-center justify-end gap-2",children:[w?g.jsx(vae,{chart:x,config:f==null?void 0:f.config}):null,A?g.jsx(X_,{code:x}):null,N?g.jsx(wae,{chart:x,config:f==null?void 0:f.config}):null]}):null,g.jsx(Oae,{chart:x,config:f==null?void 0:f.config,showControls:k})]})})}let S=Ay(d,"code");return g.jsx(E.Suspense,{fallback:g.jsx(Z_,{}),children:g.jsx(Dae,{className:Ge("overflow-x-auto border-border border-t",t),code:x,language:b,children:S?g.jsxs(g.Fragment,{children:[g.jsx(pae,{code:x,language:b}),g.jsx(X_,{})]}):null})})},u4=E.memo(Lae,(e,t)=>e.className===t.className&&xp(e.node,t.node));u4.displayName="MarkdownCode";var c4=E.memo(bae,(e,t)=>e.className===t.className&&xp(e.node,t.node));c4.displayName="MarkdownImg";var f4=E.memo(({children:e,className:t,node:n,...r})=>{var s,o;let l=(Array.isArray(e)?e:[e]).filter(c=>c!=null&&c!=="");if(l.length===1&&E.isValidElement(l[0])){let c=l[0].props.node,f=c==null?void 0:c.tagName;if(f==="img")return g.jsx(g.Fragment,{children:e});if(f==="code"&&((s=c==null?void 0:c.position)==null?void 0:s.start.line)!==((o=c==null?void 0:c.position)==null?void 0:o.end.line))return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{className:t,...r,children:e})},(e,t)=>en(e,t));f4.displayName="MarkdownParagraph";var Pae={ol:jE,li:zI,ul:VI,hr:qI,strong:$I,a:YI,h1:GI,h2:KI,h3:QI,h4:XI,h5:WI,h6:ZI,table:JI,thead:e4,tbody:t4,tr:n4,th:r4,td:i4,blockquote:s4,code:u4,img:c4,pre:({children:e})=>e,sup:a4,sub:o4,p:f4,section:l4},J_=[],e3={allowDangerousHtml:!0},Dh=new WeakMap,jae=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 b=0;b<m.length;b+=1){let x=m[b];if(b>0&&(p+=","),Array.isArray(x)){let[S,C]=x;if(typeof S=="function"){let w=Dh.get(S);w||(w=S.name,Dh.set(S,w)),p+=w}else p+=String(S);p+=":",p+=JSON.stringify(C)}else if(typeof x=="function"){let S=Dh.get(x);S||(S=x.name,Dh.set(x,S)),p+=S}else p+=String(x)}return p},l=o(n),c=o(r),f=s?JSON.stringify(s):"",d=`${c}::${l}::${f}`;return this.keyCache.set(e,d),d}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()}},t3=new jae,d4=e=>{let t=Bae(e),n=e.children||"";return Uae(t.runSync(t.parse(n),n),e)},Bae=e=>{let t=t3.get(e);if(t)return t;let n=Fae(e);return t3.set(e,n),n},Fae=e=>{let t=e.rehypePlugins||J_,n=e.remarkPlugins||J_,r=e.remarkRehypeOptions?{...e3,...e.remarkRehypeOptions}:e3;return yse().use(bie).use(n).use(Jie,r).use(t)},Uae=(e,t)=>wre(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0}),Hae=/\[\^[^\]\s]{1,200}\](?!:)/,zae=/\[\^[^\]\s]{1,200}\]:/,Vae=/<\/(\w+)>/,qae=/<(\w+)[\s>]/,J1=e=>{let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" "||e[t]===`
475
- `||e[t]==="\r");)t+=1;return t+1<e.length&&e[t]==="$"&&e[t+1]==="$"},$ae=e=>{let t=e.length-1;for(;t>=0&&(e[t]===" "||e[t]===" "||e[t]===`
476
- `||e[t]==="\r");)t-=1;return t>=1&&e[t]==="$"&&e[t-1]==="$"},eb=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},Yae=e=>{let t=Hae.test(e),n=zae.test(e);if(t||n)return[e];let r=Gr.lex(e,{gfm:!0}),s=[],o=[];for(let l of r){let c=l.raw,f=s.length;if(o.length>0){if(s[f-1]+=c,l.type==="html"){let d=c.match(Vae);if(d){let m=d[1];o.at(-1)===m&&o.pop()}}continue}if(l.type==="html"&&l.block){let d=c.match(qae);if(d){let m=d[1];c.includes(`</${m}>`)||o.push(m)}}if(c.trim()==="$$"&&f>0){let d=s[f-1],m=J1(d),p=eb(d);if(m&&p%2===1){s[f-1]=d+c;continue}}if(f>0&&$ae(c)){let d=s[f-1],m=J1(d),p=eb(d),b=eb(c);if(m&&p%2===1&&!J1(c)&&b===1){s[f-1]=d+c;continue}}s.push(c)}return s},Gae={raw:pZ,sanitize:[wZ,{}],harden:[HK,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Kae={gfm:[sne,{}]},Qae=Object.values(Gae),Xae=Object.values(Kae),Wae={block:" ▋",circle:" ●"},Zae={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Wr=E.createContext(Zae),h4=E.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx(d4,{...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)});h4.displayName="Block";var Jae=["github-light","github-dark"],m4=E.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:s=Qae,remarkPlugins:o=Xae,className:l,shikiTheme:c=Jae,mermaid:f,controls:d=!0,isAnimating:m=!1,BlockComponent:p=h4,parseMarkdownIntoBlocksFn:b=Yae,caret:x,plugins:S,remend:C,linkSafety:w={enabled:!0},...A})=>{let N=E.useId(),[k,R]=E.useTransition(),B=E.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?ure(e,C):e,[e,t,n,C]),O=E.useMemo(()=>b(B),[B,b]),[j,P]=E.useState(O);E.useEffect(()=>{t==="streaming"?R(()=>{P(O)}):P(O)},[O,t]);let q=t==="streaming"?j:O,L=E.useMemo(()=>q.map((D,H)=>`${N}-${H}`),[q.length,N]),X=E.useMemo(()=>{var D,H;return{shikiTheme:(H=(D=S==null?void 0:S.code)==null?void 0:D.getThemes())!=null?H:c,controls:d,isAnimating:m,mode:t,mermaid:f,linkSafety:w}},[c,d,m,t,f,w,S==null?void 0:S.code]),Q=E.useMemo(()=>({...Pae,...r}),[r]),ee=E.useMemo(()=>{let D=[];return S!=null&&S.cjk&&(D=[...D,...S.cjk.remarkPluginsBefore]),D=[...D,...o],S!=null&&S.cjk&&(D=[...D,...S.cjk.remarkPluginsAfter]),S!=null&&S.math&&(D=[...D,S.math.remarkPlugin]),D},[o,S==null?void 0:S.math,S==null?void 0:S.cjk]),ne=E.useMemo(()=>S!=null&&S.math?[...s,S.math.rehypePlugin]:s,[s,S==null?void 0:S.math]),Z=E.useMemo(()=>x&&m?{"--streamdown-caret":`"${Wae[x]}"`}:void 0,[x,m]);return t==="static"?g.jsx(wy.Provider,{value:S??null,children:g.jsx(Wr.Provider,{value:X,children:g.jsx("div",{className:Ge("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",l),children:g.jsx(d4,{components:Q,rehypePlugins:ne,remarkPlugins:ee,...A,children:e})})})}):g.jsx(wy.Provider,{value:S??null,children:g.jsx(Wr.Provider,{value:X,children:g.jsxs("div",{className:Ge("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",x?"*:last:after:inline *:last:after:align-baseline *:last:after:content-(--streamdown-caret)":null,l),style:Z,children:[q.length===0&&x&&m&&g.jsx("span",{}),q.map((D,H)=>g.jsx(p,{components:Q,content:D,index:H,rehypePlugins:ne,remarkPlugins:ee,shouldParseIncompleteMarkdown:n,...A},L[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);m4.displayName="Streamdown";var eoe=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:s=.1,showControls:o=!0,initialZoom:l=1,fullscreen:c=!1})=>{let f=E.useRef(null),d=E.useRef(null),[m,p]=E.useState(l),[b,x]=E.useState({x:0,y:0}),[S,C]=E.useState(!1),[w,A]=E.useState({x:0,y:0}),[N,k]=E.useState({x:0,y:0}),R=E.useCallback(Q=>{p(ee=>Math.max(n,Math.min(r,ee+Q)))},[n,r]),B=E.useCallback(()=>{R(s)},[R,s]),O=E.useCallback(()=>{R(-s)},[R,s]),j=E.useCallback(()=>{p(l),x({x:0,y:0})},[l]),P=E.useCallback(Q=>{Q.preventDefault();let ee=Q.deltaY>0?-s:s;R(ee)},[R,s]),q=E.useCallback(Q=>{if(Q.button!==0||Q.isPrimary===!1)return;C(!0),A({x:Q.clientX,y:Q.clientY}),k(b);let ee=Q.currentTarget;ee instanceof HTMLElement&&ee.setPointerCapture(Q.pointerId)},[b]),L=E.useCallback(Q=>{if(!S)return;Q.preventDefault();let ee=Q.clientX-w.x,ne=Q.clientY-w.y;x({x:N.x+ee,y:N.y+ne})},[S,w,N]),X=E.useCallback(Q=>{C(!1);let ee=Q.currentTarget;ee instanceof HTMLElement&&ee.releasePointerCapture(Q.pointerId)},[]);return E.useEffect(()=>{let Q=f.current;if(Q)return Q.addEventListener("wheel",P,{passive:!1}),()=>{Q.removeEventListener("wheel",P)}},[P]),E.useEffect(()=>{let Q=d.current;if(Q&&S)return document.body.style.userSelect="none",Q.addEventListener("pointermove",L,{passive:!1}),Q.addEventListener("pointerup",X),Q.addEventListener("pointercancel",X),()=>{document.body.style.userSelect="",Q.removeEventListener("pointermove",L),Q.removeEventListener("pointerup",X),Q.removeEventListener("pointercancel",X)}},[S,L,X]),g.jsxs("div",{className:Ge("relative flex flex-col",c?"h-full w-full":"min-h-28 w-full",t),ref:f,style:{cursor:S?"grabbing":"grab"},children:[o?g.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",c?"bottom-4 left-4":"bottom-2 left-2"),children:[g.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:B,title:"Zoom in",type:"button",children:g.jsx(dae,{size:16})}),g.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:g.jsx(hae,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:j,title:"Reset zoom and pan",type:"button",children:g.jsx(fae,{size:16})})]}):null,g.jsx("div",{className:Ge("flex-1 origin-center transition-transform duration-150 ease-out",c?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:q,ref:d,role:"application",style:{transform:`translate(${b.x}px, ${b.y}px) scale(${m})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},p4=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:s=!0})=>{let[o,l]=E.useState(null),[c,f]=E.useState(!1),[d,m]=E.useState(""),[p,b]=E.useState(""),[x,S]=E.useState(0),{mermaid:C}=E.useContext(Wr),w=PE(),A=C==null?void 0:C.errorComponent,{shouldRender:N,containerRef:k}=lae({immediate:r});if(E.useEffect(()=>{if(N){if(!w){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{l(null),f(!0);let B=w.getMermaid(n),O=e.split("").reduce((q,L)=>(q<<5)-q+L.charCodeAt(0)|0,0),j=`mermaid-${Math.abs(O)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:P}=await B.render(j,e);m(P),b(P)}catch(B){if(!(p||d)){let O=B instanceof Error?B.message:"Failed to render Mermaid chart";l(O)}}finally{f(!1)}})()}},[e,n,x,N,w]),!(N||d||p))return g.jsx("div",{className:Ge("my-4 min-h-[200px]",t),ref:k});if(c&&!d&&!p)return g.jsx("div",{className:Ge("my-4 flex justify-center p-4",t),ref:k,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(o&&!d&&!p){let B=()=>S(O=>O+1);return A?g.jsx("div",{ref:k,children:g.jsx(A,{chart:e,error:o,retry:B})}):g.jsxs("div",{className:Ge("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:k,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",o]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let R=d||p;return g.jsx("div",{className:Ge("size-full",t),"data-streamdown":"mermaid",ref:k,children:g.jsx(eoe,{className:Ge(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:Ge("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:R},role:"img"})})})};function toe({url:e,isOpen:t,onClose:n,onConfirm:r}){return t?_o.createPortal(g.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:g.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:[g.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:g.jsx(kf,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 text-lg font-semibold",children:[g.jsx(Mw,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:"bg-muted rounded-md p-3 font-mono text-sm break-all",children:e}),g.jsxs("div",{className:"flex gap-3",children:[g.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:[g.jsx(KN,{size:14}),"Copy link"]}),g.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:[g.jsx(Mw,{size:14}),"Open link"]})]})]})}),document.body):null}const noe={enabled:!0,renderModal:e=>g.jsx(toe,{...e})};function roe({content:e,isStreaming:t=!1}){return g.jsx("div",{className:Ye("relative",t&&"streaming-cursor"),children:g.jsx(m4,{shikiTheme:["github-light","github-dark"],linkSafety:noe,children:e})})}function ioe({toolCall:e,defaultExpanded:t=!1}){const[n,r]=E.useState(t),s={pending:g.jsx(lf,{className:"size-(--size-icon-xs) animate-spin"}),running:g.jsx(lf,{className:"size-(--size-icon-xs) animate-spin text-blue-500"}),complete:g.jsx(Mi,{className:"size-(--size-icon-xs) text-green-500"}),error:g.jsx(kf,{className:"size-(--size-icon-xs) text-red-500"})}[e.status];return g.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:[g.jsxs("button",{onClick:()=>r(!n),className:"flex w-full items-center gap-2 px-3 py-1",children:[s,g.jsx("span",{className:"text-3xs font-mono",children:Q8(e.toolName,e.input)}),g.jsx(dt.div,{animate:{rotate:n?180:0},transition:{type:"spring",stiffness:400,damping:30},className:"ml-auto",children:g.jsx(Lm,{className:"size-(--size-icon-xs)"})})]}),g.jsx(En,{initial:!1,children:n&&g.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:g.jsxs("div",{className:"border-t px-3 pt-1 pb-3",children:[e.input&&g.jsx(J3,{toolName:e.toolName,input:e.input}),e.result&&g.jsx("pre",{className:"mt-2 overflow-x-auto border-t pt-2 text-xs whitespace-pre-wrap",children:e.result})]})})})]})}const soe=E.forwardRef(function({sessionId:t,toolCallId:n,toolName:r,input:s,isActive:o=!1},l){const c=Dr(),[f,d]=E.useState(!1),[m,p]=E.useState(null),b=E.useCallback(async()=>{if(!(f||m)){d(!0);try{await c.approveTool(t,n),p("approved")}catch(S){console.error("Approval failed:",S)}finally{d(!1)}}},[f,m,c,t,n]),x=E.useCallback(async()=>{if(!(f||m)){d(!0);try{await c.denyTool(t,n),p("denied")}catch(S){console.error("Deny failed:",S)}finally{d(!1)}}},[f,m,c,t,n]);return E.useImperativeHandle(l,()=>({approve(){b()},deny(){x()}}),[b,x]),m?g.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:[g.jsx("span",{className:"font-mono",children:r}),g.jsx("span",{className:"ml-2 text-xs",children:m==="approved"?"Approved":"Denied"})]}):g.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:[g.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[g.jsx(yx,{className:"size-(--size-icon-md) text-amber-500"}),g.jsx("span",{className:"font-semibold",children:"Tool approval required"})]}),g.jsx("div",{className:"mb-2 font-mono text-xs",children:r}),s&&g.jsx("div",{className:"bg-muted mb-3 rounded p-2",children:g.jsx(J3,{toolName:r,input:s})}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("button",{onClick:b,disabled:f,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:[g.jsx(Mi,{className:"size-(--size-icon-xs)"})," Approve",o&&g.jsx(Ja,{className:"ml-1.5",children:"Enter"})]}),g.jsxs("button",{onClick:x,disabled:f,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:[g.jsx(kf,{className:"size-(--size-icon-xs)"})," Deny",o&&g.jsx(Ja,{className:"ml-1.5",children:"Esc"})]})]})]})}),aoe=E.forwardRef(function({sessionId:t,toolCallId:n,questions:r,answers:s,isActive:o=!1,focusedOptionIndex:l=-1},c){const f=Dr(),[d,m]=E.useState({}),[p,b]=E.useState({}),[x,S]=E.useState(!!s),[C,w]=E.useState(!1),[A,N]=E.useState(null),[k,R]=E.useState("0"),B=r[Number(k)]||r[0],O=Number(k),j=B?B.options.length+1:0;function P(D,H){m($=>({...$,[D]:H}))}function q(D,H,$){m(te=>{const F=te[D]||[];return $?{...te,[D]:[...F,H]}:{...te,[D]:F.filter(V=>V!==H)}})}function L(D,H){b($=>({...$,[D]:H}))}function X(D){var $,te;const H=d[D];if(!H)return!1;if(r[D].multiSelect){const F=H;return F.length>0&&(!F.includes("__other__")||!!(($=p[D])!=null&&$.trim()))}return H!=="__other__"||!!((te=p[D])!=null&&te.trim())}function Q(){return r.every((D,H)=>X(H))}function ee(D,H){if(s&&s[String(H)]){const $=s[String(H)];if(D.multiSelect)try{return JSON.parse($).join(", ")}catch{return $}return $}if(!s){const $=d[H];return $?D.multiSelect?$.map(te=>te==="__other__"?p[H]:te).join(", "):$==="__other__"?p[H]:$:null}return null}const ne=E.useCallback(async()=>{if(!Q()||C)return;w(!0),N(null);const D={};r.forEach((H,$)=>{var F;const te=d[$];if(H.multiSelect){const V=te.map(ie=>{var I;return ie==="__other__"?((I=p[$])==null?void 0:I.trim())||"":ie});D[String($)]=JSON.stringify(V)}else D[String($)]=te==="__other__"?((F=p[$])==null?void 0:F.trim())||"":te});try{await f.submitAnswers(t,n,D),S(!0)}catch(H){N(H instanceof Error?H.message:"Failed to submit answers")}finally{w(!1)}},[d,p,C,f,t,n,r]);if(E.useImperativeHandle(c,()=>({toggleOption(D){if(!B||x||C)return;if(D===B.options.length){B.multiSelect?(d[O]||[]).includes("__other__")?q(O,"__other__",!1):q(O,"__other__",!0):P(O,"__other__");return}const H=B.options[D];H&&(B.multiSelect?(d[O]||[]).includes(H.label)?q(O,H.label,!1):q(O,H.label,!0):P(O,H.label))},navigateOption(D){},navigateQuestion(D){if(r.length<=1)return;const H=Number(k);D==="next"&&H<r.length-1?R(String(H+1)):D==="prev"&&H>0&&R(String(H-1))},submit(){ne()},getOptionCount(){return j},getActiveTab(){return k}}),[B,O,k,d,x,C,j,ne,r.length]),x){const D=s?Object.values(s).some(H=>H!==""):Object.keys(d).length>0;return g.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:D?g.jsxs("div",{className:"flex items-start gap-2",children:[g.jsx(Mi,{className:"mt-0.5 size-(--size-icon-md) shrink-0 text-emerald-500"}),g.jsx("div",{className:"min-w-0 space-y-1.5",children:r.map((H,$)=>{const te=ee(H,$);return te?g.jsxs("div",{children:[g.jsx("span",{className:"text-xs font-semibold text-emerald-700 dark:text-emerald-300",children:H.header}),g.jsx("p",{className:"text-sm break-words text-emerald-600 dark:text-emerald-400",children:te})]},$):null})})]}):g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Mi,{className:"size-(--size-icon-md) text-emerald-500"}),g.jsx("span",{className:"text-emerald-600 dark:text-emerald-400",children:"Questions answered"})]})})}function Z(D,H){return g.jsxs("div",{children:[g.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[g.jsx(XN,{className:"size-(--size-icon-sm) text-amber-500"}),g.jsx("span",{className:"text-sm font-semibold",children:D.header})]}),g.jsx("p",{className:"text-foreground mb-2",children:D.question}),g.jsxs("div",{className:"ml-1 space-y-1.5",children:[D.options.map(($,te)=>{const F=D.multiSelect?(d[H]||[]).includes($.label):d[H]===$.label;return g.jsxs("label",{className:Ye("flex cursor-pointer items-start gap-2 rounded px-2 py-1.5 transition-all duration-150",F?"bg-amber-500/15":"hover:bg-amber-500/5",o&&l===te&&"ring-1 ring-amber-500/50"),children:[g.jsx("input",{type:D.multiSelect?"checkbox":"radio",name:`q-${H}`,checked:F,disabled:C,onChange:V=>{D.multiSelect?q(H,$.label,V.target.checked):P(H,$.label)},className:"mt-0.5 accent-amber-500"}),g.jsxs("div",{children:[g.jsxs("span",{className:"font-medium",children:[$.label,o&&te<9&&g.jsx(Ja,{className:"ml-1.5",children:te+1})]}),$.description&&g.jsx("p",{className:"text-muted-foreground mt-0.5 text-xs",children:$.description})]})]},te)}),g.jsxs("label",{className:Ye("flex cursor-pointer items-start gap-2 rounded px-2 py-1.5 transition-all duration-150",D.multiSelect?(d[H]||[]).includes("__other__")?"bg-amber-500/15":"hover:bg-amber-500/5":d[H]==="__other__"?"bg-amber-500/15":"hover:bg-amber-500/5",o&&l===D.options.length&&"ring-1 ring-amber-500/50"),children:[g.jsx("input",{type:D.multiSelect?"checkbox":"radio",name:`q-${H}`,checked:D.multiSelect?(d[H]||[]).includes("__other__"):d[H]==="__other__",disabled:C,onChange:$=>{D.multiSelect?q(H,"__other__",$.target.checked):P(H,"__other__")},className:"mt-0.5 accent-amber-500"}),g.jsxs("div",{className:"flex-1",children:[g.jsxs("span",{className:"font-medium",children:["Other",o&&D.options.length<9&&g.jsx(Ja,{className:"ml-1.5",children:D.options.length+1})]}),(D.multiSelect?(d[H]||[]).includes("__other__"):d[H]==="__other__")&&g.jsx("textarea",{placeholder:"Type your answer...",rows:2,value:p[H]||"",disabled:C,onChange:$=>L(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 g.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?Z(r[0],0):g.jsxs(CM,{value:k,onValueChange:R,children:[g.jsx(nE,{className:"mb-3 h-auto flex-wrap gap-1.5 bg-transparent p-0",children:r.map((D,H)=>g.jsxs(Il,{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:[X(H)&&g.jsx(Mi,{className:"mr-1 size-3"}),g.jsx("span",{className:"max-w-[120px] truncate",children:D.header})]},H))}),o&&r.length>1&&g.jsxs("div",{className:"text-2xs text-muted-foreground mb-2 flex items-center gap-1",children:[g.jsx(Ja,{children:"←"}),g.jsx(Ja,{children:"→"}),g.jsx("span",{children:"navigate questions"})]}),r.map((D,H)=>g.jsx(Ll,{value:String(H),className:"mt-0",children:Z(D,H)},H))]}),A&&g.jsx("p",{className:"mt-2 text-xs text-red-500",children:A}),g.jsx("button",{onClick:ne,disabled:!Q()||C,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:C?g.jsx(g.Fragment,{children:"Submitting..."}):g.jsxs(g.Fragment,{children:[g.jsx(Mi,{className:"size-(--size-icon-xs)"})," Submit",o&&g.jsx(Ja,{className:"ml-1.5",children:"Enter"})]})})]})});function ooe(e,t){const n=E.useRef(e),[r,s]=E.useState(!(t&&n.current==="complete"));return E.useEffect(()=>{if(t&&e==="complete"&&n.current!=="complete"){const o=setTimeout(()=>s(!1),ys.TOOL_CALL_AUTO_HIDE_MS);return()=>clearTimeout(o)}},[e,t]),t?r:!0}function loe({part:e,autoHide:t,expandToolCalls:n}){const r=ooe(e.status,t);return g.jsx(En,{children:r&&g.jsx(dt.div,{exit:{height:0,opacity:0},transition:{duration:.3,ease:[.4,0,.2,1]},className:"overflow-hidden",children:g.jsx(ioe,{toolCall:{toolCallId:e.toolCallId,toolName:e.toolName,input:e.input||"",result:e.result,status:e.status},defaultExpanded:n})},e.toolCallId)})}function uoe(e){try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}}function coe({message:e,grouping:t,sessionId:n,isNew:r=!1,isStreaming:s=!1,activeToolCallId:o,onToolRef:l,focusedOptionIndex:c=-1}){const f=e.role==="user",{showTimestamps:d,expandToolCalls:m,autoHideToolCalls:p}=Gt(),[b,x]=E.useState(!1),{position:S,groupIndex:C}=t,w=S==="only"||S==="first",A=S==="only"||S==="first",N=S==="only"||S==="last",k=E.useCallback(j=>{l==null||l(j)},[l]),R=E.useCallback(j=>{l==null||l(j)},[l]),B=e.parts??[];let O=-1;if(!f){for(let j=B.length-1;j>=0;j--)if(B[j].type==="text"){O=j;break}}return g.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",A?"pt-4":"pt-0.5",N?"pb-3":"pb-0.5",f?"bg-user-msg hover:bg-user-msg/90":"hover:bg-muted/20"),children:[A&&C>0&&g.jsx("div",{className:"bg-border/20 absolute inset-x-0 top-0 h-px"}),e.timestamp&&g.jsx("span",{className:Ye("absolute top-1 right-4 hidden text-xs transition-colors duration-150 sm:inline",d?"text-muted-foreground/60":"text-muted-foreground/0 group-hover:text-muted-foreground/60"),children:uoe(e.timestamp)}),g.jsx("div",{className:"mt-[3px] w-4 flex-shrink-0",children:w&&(f?g.jsx(of,{className:"text-muted-foreground size-(--size-icon-md)"}):g.jsx("span",{className:"text-muted-foreground flex size-(--size-icon-md) items-center justify-center text-[10px]",children:"●"}))}),g.jsx("div",{className:"max-w-[80ch] min-w-0 flex-1",children:f?e.messageType==="command"?g.jsx("div",{className:"text-muted-foreground truncate font-mono text-sm",children:e.content}):e.messageType==="compaction"?g.jsxs("div",{className:"w-full",children:[g.jsxs("button",{onClick:()=>x(!b),className:"text-muted-foreground/60 hover:text-muted-foreground flex w-full items-center gap-2 text-xs transition-colors",children:[g.jsx("div",{className:"bg-border/40 h-px flex-1"}),g.jsx(of,{className:Ye("size-3 transition-transform duration-200",b&&"rotate-90")}),g.jsx("span",{children:"Context compacted"}),g.jsx("div",{className:"bg-border/40 h-px flex-1"})]}),b&&g.jsx("div",{className:"text-muted-foreground/60 mt-2 text-xs whitespace-pre-wrap",children:e.content})]}):g.jsx("div",{className:"break-words whitespace-pre-wrap",children:e.content}):B.map((j,P)=>{if(j.type==="text")return g.jsx("div",{className:"msg-assistant",children:g.jsx(roe,{content:j.text,isStreaming:s&&P===O})},`text-${P}`);if(j.interactiveType==="approval"){const q=j.toolCallId===o;return g.jsx(soe,{ref:q?k:void 0,sessionId:n,toolCallId:j.toolCallId,toolName:j.toolName,input:j.input||"",isActive:q},j.toolCallId)}if(j.interactiveType==="question"&&j.questions){const q=j.toolCallId===o;return g.jsx(aoe,{ref:q?R:void 0,sessionId:n,toolCallId:j.toolCallId,questions:j.questions,answers:j.answers,isActive:q,focusedOptionIndex:q?c:-1},j.toolCallId)}return g.jsx(loe,{part:j,autoHide:p,expandToolCalls:m},j.toolCallId)})})]})}function foe(e,t){const n=E.useRef(0),r=E.useRef(null),s=E.useCallback(()=>{if(e.length===0)return"";if(e.length===1)return e[0];let c;do c=e[Math.floor(Math.random()*e.length)];while(c===r.current);return r.current=c,c},[e]),[o,l]=E.useState(()=>s());return E.useEffect(()=>{const c=setInterval(()=>{n.current+=1,l(s())},t);return()=>clearInterval(c)},[t,s]),{verb:o,key:`verb-${n.current}`}}const doe=["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"],n3=["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"],hoe={name:"default",icon:"✨",iconAnimation:"shimmer-pulse",verbs:doe,verbInterval:3500};function r3(e){return e>=1e3?`~${(e/1e3).toFixed(1)}k tokens`:`~${Math.round(e)} tokens`}function moe({status:e,streamStartTime:t,estimatedTokens:n,theme:r=hoe,permissionMode:s="default",isWaitingForUser:o,waitingType:l}){const c=E.useMemo(()=>s==="bypassPermissions"?[...r.verbs,...n3]:r.verbs,[r.verbs,s]),{formatted:f}=E9(e==="streaming"?t:null),{verb:d,key:m}=foe(c,r.verbInterval),p=n3.includes(d),b=E.useRef(f),x=E.useRef(n),[S,C]=E.useState(!1);E.useEffect(()=>{e==="streaming"&&(b.current=f,x.current=n,C(!1))},[e,f,n]);const w=E.useRef(e);if(E.useEffect(()=>{w.current==="streaming"&&e==="idle"&&x.current>0&&C(!0),w.current=e},[e]),e==="idle"&&!S)return null;if(e==="idle"&&S)return g.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:[g.jsx("span",{children:b.current}),g.jsx("span",{"aria-hidden":"true",children:"·"}),g.jsx("span",{children:r3(x.current)})]});if(e==="streaming"&&o){const R=l==="approval"?yx:XN,B=l==="approval"?"Waiting for your approval":"Waiting for your answer";return g.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:[g.jsx(R,{className:"size-3 text-amber-500"}),g.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:B}),g.jsx("span",{className:"text-muted-foreground/70 ml-1.5 tabular-nums",children:f})]})}const A=p?"☠":r.icon,N=p?"text-amber-500/60":"text-muted-foreground",k=p?"text-amber-500/70 font-bold":"text-muted-foreground font-bold";return g.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:[g.jsx("span",{"aria-hidden":"true",className:k,style:r.iconAnimation?{animation:`${r.iconAnimation} 2s ease-in-out infinite`}:void 0,children:A}),g.jsx("span",{className:`relative inline-flex min-w-[140px] ${N}`,children:g.jsx(En,{mode:"wait",children:g.jsx(dt.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0},exit:{opacity:0,y:-2},transition:{duration:.3},children:d},m)})}),g.jsx("span",{className:"text-muted-foreground/70 ml-1.5 tabular-nums",children:f}),g.jsx("span",{className:"text-muted-foreground/60 ml-1.5",children:r3(n)})]})}function poe(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,c=o!==n.role;l&&r>0&&t++;let f;return l&&c?f="only":l?f="first":c?f="last":f="middle",{position:f,groupIndex:t}})}const goe=E.forwardRef(function({messages:t,sessionId:n,status:r,isTextStreaming:s,onScrollStateChange:o,streamStartTime:l,estimatedTokens:c,permissionMode:f,isWaitingForUser:d,waitingType:m,activeToolCallId:p,onToolRef:b,focusedOptionIndex:x},S){const C=E.useRef(null),[w,A]=E.useState(null),N=E.useRef(!0),k=E.useRef(null),R=E.useRef(0),B=E.useMemo(()=>poe(t),[t]);E.useEffect(()=>{w===null&&t.length>0&&A(t.length)},[t.length,w]);const O=IK({count:t.length,getScrollElement:()=>C.current,estimateSize:()=>80,overscan:5,measureElement:L=>(L==null?void 0:L.getBoundingClientRect().height)??80}),j=E.useRef(!1),P=E.useCallback(()=>{const L=C.current;if(!L)return;const X=L.scrollHeight-L.scrollTop-L.clientHeight,Q=X<200,ee=N.current!==Q;N.current=Q,ee&&(o==null||o({isAtBottom:Q,distanceFromBottom:X}))},[o]);E.useEffect(()=>{const L=C.current;if(!L)return;const X=()=>{j.current=!0},Q=()=>{j.current=!1};return L.addEventListener("scroll",P,{passive:!0}),L.addEventListener("touchstart",X,{passive:!0}),L.addEventListener("touchend",Q,{passive:!0}),L.addEventListener("touchcancel",Q,{passive:!0}),()=>{L.removeEventListener("scroll",P),L.removeEventListener("touchstart",X),L.removeEventListener("touchend",Q),L.removeEventListener("touchcancel",Q)}},[P]),E.useEffect(()=>{const L=C.current;if(!L||t.length===0)return;let X=!1;const Q=new IntersectionObserver(([ee])=>{ee.isIntersecting?X&&(X=!1,requestAnimationFrame(()=>{const ne=C.current;ne&&(ne.scrollTop=ne.scrollHeight-ne.clientHeight)})):X=!0},{threshold:.1});return Q.observe(L),()=>Q.disconnect()},[t.length]),E.useEffect(()=>{const L=k.current;if(!L)return;const X=new ResizeObserver(()=>{N.current&&!j.current&&(cancelAnimationFrame(R.current),R.current=requestAnimationFrame(()=>{const Q=C.current;Q&&(Q.scrollTop=Q.scrollHeight-Q.clientHeight)}))});return X.observe(L),()=>{X.disconnect(),cancelAnimationFrame(R.current)}},[]),E.useEffect(()=>{t.length>0&&N.current&&!j.current&&requestAnimationFrame(()=>{const L=C.current;L&&(L.scrollTop=L.scrollHeight-L.clientHeight)})},[t.length]);const q=E.useCallback(()=>{const L=C.current;L&&(L.scrollTop=L.scrollHeight-L.clientHeight)},[]);return E.useImperativeHandle(S,()=>({scrollToBottom:q}),[q]),g.jsx("div",{ref:C,className:"chat-scroll-area h-full overflow-y-auto pt-12",children:g.jsxs("div",{ref:k,style:{height:O.getTotalSize(),position:"relative",width:"100%"},children:[O.getVirtualItems().map(L=>{const X=t[L.index],Q=w!==null&&L.index>=w,ne=L.index===t.length-1&&X.role==="assistant"&&!!s;return g.jsx("div",{"data-index":L.index,ref:O.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${L.start}px)`},children:g.jsx(coe,{message:X,grouping:B[L.index],sessionId:n,isNew:Q,isStreaming:ne,activeToolCallId:p,onToolRef:b,focusedOptionIndex:x})},L.key)}),g.jsx("div",{style:{position:"absolute",top:O.getTotalSize(),left:0,width:"100%"},children:g.jsx(moe,{status:r??"idle",streamStartTime:l??null,estimatedTokens:c??0,permissionMode:f,isWaitingForUser:d,waitingType:m})})]})})}),boe=E.forwardRef(function({value:t,onChange:n,onSubmit:r,isLoading:s,sessionBusy:o=!1,onStop:l,onEscape:c,onClear:f,isPaletteOpen:d,onArrowUp:m,onArrowDown:p,onCommandSelect:b,activeDescendantId:x,onCursorChange:S},C){const w=E.useRef(null),A=E.useRef(0);E.useImperativeHandle(C,()=>({focus:()=>{var D;return(D=w.current)==null?void 0:D.focus()},focusAt:D=>{const H=w.current;H&&(H.focus(),H.setSelectionRange(D,D))}}));const[N,k]=E.useState(!1),R=Ao(),B=E.useCallback(D=>{if(D.key==="Escape"){const H=Date.now();d?(c==null||c(),A.current=H):t.trim()&&H-A.current<500?(f==null||f(),A.current=0):(c==null||c(),A.current=H);return}if(d){if(D.key==="ArrowDown"){D.preventDefault(),p==null||p();return}if(D.key==="ArrowUp"){D.preventDefault(),m==null||m();return}if(D.key==="Enter"&&!D.shiftKey){D.preventDefault(),b==null||b();return}if(D.key==="Tab"){D.preventDefault(),b==null||b();return}}D.key==="Enter"&&!D.shiftKey&&!R&&(D.preventDefault(),!s&&t.trim()&&r())},[s,R,t,r,c,f,d,m,p,b]),O=E.useCallback(()=>k(!0),[]),j=E.useCallback(()=>{k(!1),d&&(c==null||c())},[d,c]),P=E.useCallback(D=>{n(D.target.value),S==null||S(D.target.selectionStart);const H=w.current;H&&(H.style.height="auto",H.style.height=`${Math.min(H.scrollHeight,200)}px`)},[n,S]),q=E.useCallback(()=>{w.current&&(S==null||S(w.current.selectionStart))},[S]);E.useEffect(()=>{const D=w.current;if(!D||t!=="")return;const H=D.scrollHeight,$=24;if(H<=$)return;D.style.height=`${H}px`,D.style.transition="height 200ms ease",requestAnimationFrame(()=>{D.style.height=`${$}px`});const te=()=>{D.style.transition="",D.style.height=""};return D.addEventListener("transitionend",te,{once:!0}),()=>D.removeEventListener("transitionend",te)},[t]);const L=t.trim().length>0,X=s||L,Q=L&&!s&&!o,ne=s?RH:R?GN:VU,Z=s||o;return g.jsxs("div",{className:"flex flex-col gap-1.5",children:[o&&g.jsx("div",{className:"px-1 text-xs text-amber-600 dark:text-amber-500",children:"Session is busy. Please wait..."}),g.jsxs("div",{className:Ye("flex items-end gap-1.5 rounded-xl border p-1.5 pl-3 transition-colors duration-150",N?"border-ring":"border-border"),children:[g.jsx("textarea",{ref:w,value:t,onChange:P,onKeyDown:B,onFocus:O,onBlur:j,onSelect:q,role:"combobox","aria-autocomplete":"list","aria-controls":d?x!=null&&x.startsWith("file-")?"file-palette-listbox":"command-palette-listbox":void 0,"aria-expanded":d??!1,"aria-activedescendant":d?x: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:Z}),g.jsx(dt.button,{animate:{opacity:Q?.5:0,scale:Q?1:.8},transition:{duration:.15},whileHover:Q?{opacity:1}:void 0,onClick:f,disabled:!Q,type:"button",className:Ye("text-muted-foreground hover:text-foreground shrink-0 rounded-lg p-1 transition-colors",!Q&&"pointer-events-none"),"aria-label":"Clear message",children:g.jsx(kf,{className:"size-(--size-icon-sm)"})}),g.jsx(dt.button,{animate:{opacity:X?1:0,scale:X?1:.8},transition:{duration:.15},whileHover:X&&!o?{scale:1.1}:void 0,whileTap:X&&!o?{scale:.9}:void 0,onClick:s?l:r,disabled:!X||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",(!X||o)&&"pointer-events-none opacity-50"),"aria-label":s?"Stop generating":"Send message",children:g.jsx(ne,{className:"size-(--size-icon-sm)"})})]})]})}),i3={in_progress:g.jsx(lf,{className:"size-(--size-icon-xs) shrink-0 animate-spin text-blue-400"}),pending:g.jsx(PU,{className:"text-muted-foreground size-(--size-icon-xs) shrink-0"}),completed:g.jsx(IU,{className:"size-(--size-icon-xs) shrink-0 text-green-500"})},s3=10;function yoe({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,c=e.filter(p=>p.status==="in_progress").length,f=e.filter(p=>p.status==="pending").length,d=e.slice(0,s3),m=e.length-s3;return g.jsxs("div",{className:"border-t px-4 py-2",children:[g.jsx(En,{children:t&&!n&&g.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:[g.jsx(lf,{className:"size-(--size-icon-xs) shrink-0 animate-spin"}),g.jsx("span",{className:"truncate",children:t})]})}),g.jsxs("button",{onClick:r,className:"text-muted-foreground hover:text-foreground flex w-full items-center gap-1.5 text-xs",children:[n?g.jsx(of,{className:"size-(--size-icon-xs)"}):g.jsx(Lm,{className:"size-(--size-icon-xs)"}),g.jsx(uH,{className:"size-(--size-icon-xs)"}),g.jsxs("span",{children:[e.length," task",e.length!==1?"s":""," (",l," done",c>0?`, ${c} in progress`:"",", ",f," open)",m>0&&` +${m} more`]})]}),g.jsx(En,{children:!n&&g.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:d.map(p=>{const b=p.id===s&&p.status==="completed";return g.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:b?{scale:[1,1.05,1]}:void 0,transition:b?{type:"spring",stiffness:400,damping:10}:void 0,onAnimationComplete:()=>{b&&(o==null||o())},children:[b&&g.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%"}}),b?g.jsx(dt.span,{initial:{scale:1},animate:{scale:[1,1.4,1]},transition:{type:"spring",stiffness:400,damping:10},children:i3[p.status]}):i3[p.status],g.jsx("span",{className:"truncate",children:p.subject})]},p.id)})})})]})}function xoe({celebration:e,onComplete:t}){const n=E.useRef(null),r=(e==null?void 0:e.level)==="major",s=E.useCallback(()=>{t()},[t]);return E.useEffect(()=>{if(!r)return;let o=!1;f9({particleCount:40,origin:{x:.5,y:.6},colors:["#FFD700","#FFC107","#F7B500"]}).then(c=>{if(o){c();return}n.current=c});const l=setTimeout(()=>{s()},ys.CELEBRATION_DISPLAY_MS);return()=>{var c;o=!0,(c=n.current)==null||c.call(n),n.current=null,clearTimeout(l)}},[r,s]),g.jsx(En,{children:r&&g.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:d9})})}function Eoe({filteredCommands:e,selectedIndex:t,onSelect:n}){const r=E.useMemo(()=>{const s=[],o=new Map;let l=0;for(const c of e)o.has(c.namespace)||o.set(c.namespace,[]),o.get(c.namespace).push({cmd:c,index:l++});for(const[c,f]of o)s.push({namespace:c,items:f});return s},[e]);return E.useEffect(()=>{const s=document.getElementById(`command-item-${t}`);s&&s.scrollIntoView({block:"nearest"})},[t]),g.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:g.jsx("div",{id:"command-palette-listbox",role:"listbox",className:"max-h-72 overflow-y-auto p-2",children:e.length===0?g.jsx("div",{className:"text-muted-foreground px-2 py-4 text-center text-sm",children:"No commands found."}):r.map(({namespace:s,items:o})=>g.jsxs("div",{children:[g.jsx("div",{className:"text-muted-foreground px-2 py-1.5 text-xs font-medium",children:s}),o.map(({cmd:l,index:c})=>{const f=c===t;return g.jsxs("div",{id:`command-item-${c}`,role:"option","aria-selected":f,"data-selected":f,tabIndex:f?0:-1,onClick:()=>n(l),onKeyDown:d=>{d.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:[g.jsx("span",{className:"font-mono text-sm",children:l.fullCommand}),g.jsx("span",{className:"text-muted-foreground truncate text-xs",children:l.description}),l.argumentHint&&g.jsx("span",{className:"text-muted-foreground/60 ml-auto text-xs",children:l.argumentHint})]},l.fullCommand)})]},s))})})}function Toe({text:e,indices:t,startOffset:n=0}){const r=new Set(t.map(s=>s-n));return g.jsx(g.Fragment,{children:e.split("").map((s,o)=>r.has(o)?g.jsx("span",{className:"text-foreground font-semibold",children:s},o):g.jsx("span",{children:s},o))})}function voe({filteredFiles:e,selectedIndex:t,onSelect:n}){return E.useEffect(()=>{const r=document.getElementById(`file-item-${t}`);r&&r.scrollIntoView({block:"nearest"})},[t]),g.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:g.jsx("div",{id:"file-palette-listbox",role:"listbox",className:"max-h-72 overflow-y-auto p-2",children:e.length===0?g.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?Uc:eH;return g.jsxs("div",{id:`file-item-${s}`,role:"option","aria-selected":o,"data-selected":o,tabIndex:o?0:-1,onClick:()=>n(r),onKeyDown:c=>{c.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:[g.jsx(l,{className:"text-muted-foreground size-4 shrink-0"}),g.jsx("span",{className:"truncate text-sm",children:g.jsx(Toe,{text:r.filename,indices:r.indices,startOffset:r.directory.length})}),r.directory&&g.jsx("span",{className:"text-muted-foreground truncate text-xs",children:r.directory})]},r.path)})})})}function Soe(e){const t=Dr();return gi({queryKey:["files",{cwd:e??null}],queryFn:()=>t.listFiles(e),enabled:!!e,staleTime:fi.FILES_STALE_TIME_MS,gcTime:fi.FILES_GC_TIME_MS})}const Coe=[{trigger:"/",label:"Commands",icon:IH,ariaLabel:"Insert slash command trigger"},{trigger:"@",label:"Files",icon:ZU,ariaLabel:"Insert file mention trigger"}];function a3({onChipClick:e}){return g.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:Coe.map(t=>g.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:[g.jsx(t.icon,{className:"size-3"}),g.jsx("kbd",{className:"font-mono text-[10px] opacity-60",children:t.trigger}),t.label]},t.trigger))})}function woe({collapsed:e,onToggle:t}){return g.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:g.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 Aoe({cwd:e}){const t=e.split("/").filter(Boolean).pop()??e;return g.jsxs("span",{className:"inline-flex items-center gap-1",title:e,children:[g.jsx(Uc,{className:"size-(--size-icon-xs)"}),g.jsx("span",{children:t})]})}const tb=[{value:"default",label:"Default",icon:yx,description:"Prompt for each tool call"},{value:"acceptEdits",label:"Accept Edits",icon:AH,description:"Auto-approve file edits"},{value:"plan",label:"Plan Mode",icon:BU,description:"Research only, no edits"},{value:"bypassPermissions",label:"Bypass All",icon:WN,description:"Auto-approve everything"}];function _oe({mode:e,onChangeMode:t}){const n=tb.find(o=>o.value===e)??tb[0],r=n.icon,s=e==="bypassPermissions";return g.jsxs(pM,{children:[g.jsx(gM,{asChild:!0,children:g.jsxs("button",{className:`hover:text-foreground inline-flex items-center gap-1 transition-colors duration-150 ${s?"text-red-500":""}`,children:[g.jsx(r,{className:"size-(--size-icon-xs)"}),g.jsx("span",{children:n.label})]})}),g.jsxs(bM,{side:"top",align:"start",className:"w-56",children:[g.jsx(yM,{children:"Permission Mode"}),g.jsx(EM,{value:e,onValueChange:o=>t(o),children:tb.map(o=>{const l=o.value==="bypassPermissions";return g.jsx(TM,{value:o.value,icon:o.icon,description:o.description,className:l?"text-red-500":"",children:o.label},o.value)})})]})]})}const g4=[{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 koe(e){const t=g4.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 Noe({model:e,onChangeModel:t}){return g.jsxs(pM,{children:[g.jsx(gM,{asChild:!0,children:g.jsxs("button",{className:"hover:text-foreground inline-flex items-center gap-1 transition-colors duration-150",children:[g.jsx(NU,{className:"size-(--size-icon-xs)"}),g.jsx("span",{children:koe(e)})]})}),g.jsxs(bM,{side:"top",align:"start",className:"w-44",children:[g.jsx(yM,{children:"Model"}),g.jsx(EM,{value:e,onValueChange:t,children:g4.map(n=>g.jsx(TM,{value:n.value,children:n.label},n.value))})]})]})}function Roe({costUsd:e}){return g.jsxs("span",{className:"inline-flex items-center gap-1",children:[g.jsx($U,{className:"size-(--size-icon-xs)"}),g.jsxs("span",{children:["$",e.toFixed(2)]})]})}function Doe({percent:e}){const t=e>=95?"text-red-500":e>=80?"text-amber-500":"";return g.jsxs("span",{className:`inline-flex items-center gap-1 ${t}`,children:[g.jsx(oH,{className:"size-(--size-icon-xs)"}),g.jsxs("span",{children:[e,"%"]})]})}function Ooe(e){const t=Dr();return gi({queryKey:["git-status",e],queryFn:()=>t.getGitStatus(e??void 0),enabled:!!e,refetchInterval:fi.GIT_STATUS_REFETCH_MS,refetchIntervalInBackground:!1,staleTime:fi.GIT_STATUS_STALE_TIME_MS})}function Moe(e){return!!e&&!("error"in e)}function Ioe({data:e}){if(!e)return null;if(!Moe(e))return g.jsxs("span",{className:"text-muted-foreground/50 inline-flex items-center gap-1",title:"Not a git repository",children:[g.jsx(Iw,{className:"size-(--size-icon-xs)"}),g.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 g.jsxs("span",{className:"inline-flex items-center gap-1",title:s,children:[g.jsx(Iw,{className:"size-(--size-icon-xs)"}),g.jsx("span",{className:"max-w-[25ch] truncate",children:e.branch}),e.ahead>0&&g.jsxs("span",{className:"text-muted-foreground inline-flex items-center gap-0.5",children:[g.jsx(GN,{className:"size-(--size-icon-xs)"}),e.ahead]}),e.behind>0&&g.jsxs("span",{className:"text-muted-foreground inline-flex items-center gap-0.5",children:[g.jsx(YN,{className:"size-(--size-icon-xs)"}),e.behind]}),t>0&&g.jsxs("span",{className:"text-muted-foreground",children:["· ",n]})]})}function Loe({enabled:e,onToggle:t}){const n=e?PH:BH;return g.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:g.jsx(n,{className:"size-(--size-icon-xs)"})})}function Poe({version:e,latestVersion:t}){const[n,r]=E.useState(!1),s=t!==null&&joe(t,e);return g.jsxs("span",{className:"relative inline-flex items-center",children:[g.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&&g.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:[g.jsxs("p",{className:"font-medium",children:["Update available: v",e," → v",t]}),g.jsxs("p",{className:"text-muted-foreground mt-1",children:["Run"," ",g.jsx("code",{className:"bg-muted rounded px-1 py-0.5 font-mono text-[10px]",children:"npm update -g dorkos"})," ","to update"]})]})]})}function joe(e,t){const[n,r,s]=e.split(".").map(Number),[o,l,c]=t.split(".").map(Number);return n!==o?n>o:r!==l?r>l:s>c}const Boe={duration:.2,ease:[.4,0,.2,1]};function o3({sessionId:e,sessionStatus:t,isStreaming:n}){const r=ak(e,t,n),{showStatusBarCwd:s,showStatusBarPermission:o,showStatusBarModel:l,showStatusBarCost:c,showStatusBarContext:f,showStatusBarGit:d,showStatusBarSound:m,showStatusBarVersion:p,enableNotificationSound:b,setEnableNotificationSound:x}=Gt(),{data:S}=Ooe(r.cwd),C=Dr(),{data:w}=gi({queryKey:["config"],queryFn:()=>C.getConfig(),staleTime:300*1e3}),A=[];s&&r.cwd&&A.push({key:"cwd",node:g.jsx(Aoe,{cwd:r.cwd})}),d&&A.push({key:"git",node:g.jsx(Ioe,{data:S})}),o&&A.push({key:"permission",node:g.jsx(_oe,{mode:r.permissionMode,onChangeMode:k=>r.updateSession({permissionMode:k})})}),l&&A.push({key:"model",node:g.jsx(Noe,{model:r.model,onChangeModel:k=>r.updateSession({model:k})})}),c&&r.costUsd!==null&&A.push({key:"cost",node:g.jsx(Roe,{costUsd:r.costUsd})}),f&&r.contextPercent!==null&&A.push({key:"context",node:g.jsx(Doe,{percent:r.contextPercent})}),m&&A.push({key:"sound",node:g.jsx(Loe,{enabled:b,onToggle:()=>x(!b)})}),p&&w&&A.push({key:"version",node:g.jsx(Poe,{version:w.version,latestVersion:w.latestVersion})});const N=A.length>0;return g.jsx(En,{initial:!1,children:N&&g.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:g.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:g.jsx(En,{initial:!1,mode:"popLayout",children:A.map((k,R)=>g.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:Boe,className:"inline-flex items-center gap-2",children:[R>0&&g.jsx(Foe,{}),k.node]},k.key))})})})})}function Foe(){return g.jsx("span",{className:"text-muted-foreground/30","aria-hidden":"true",children:"·"})}function Uoe(){const e=Gt(d=>d.showTaskCelebrations),[t,n]=E.useState(null),[r,s]=E.useState(null),o=E.useRef(null),l=E.useRef(!1);E.useEffect(()=>{const d=window.matchMedia("(prefers-reduced-motion: reduce)");l.current=d.matches;const m=p=>{l.current=p.matches};return d.addEventListener("change",m),()=>d.removeEventListener("change",m)},[]),T9({timeoutMs:El.IDLE_TIMEOUT_MS,onIdle:E.useCallback(()=>{var d;(d=o.current)==null||d.setIdle(!0)},[]),onReturn:E.useCallback(()=>{var d,m;(d=o.current)==null||d.setIdle(!1),(m=o.current)==null||m.onUserReturn()},[])}),E.useEffect(()=>{const d=new c9({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=d,()=>d.destroy()},[e]);const c=E.useCallback((d,m)=>{var p;d.action==="update"&&d.task.status==="completed"&&d.task.id&&((p=o.current)==null||p.onTaskCompleted(d.task.id,m))},[]),f=E.useCallback(()=>{n(null),s(null)},[]);return{handleTaskEvent:c,activeCelebration:t,celebratingTaskId:r,clearCelebration:f}}function l3({sessionId:e,transformContent:t}){const[,n]=km(),r=E.useRef(null),s=E.useRef(null),o=EK(e),l=Uoe(),c=Gt(ye=>ye.enableNotificationSound),f=E.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:d,input:m,setInput:p,handleSubmit:b,status:x,error:S,sessionBusy:C,stop:w,isLoadingHistory:A,sessionStatus:N,streamStartTime:k,estimatedTokens:R,isTextStreaming:B,isWaitingForUser:O,waitingType:j,activeInteraction:P}=pK(e,{transformContent:t,onTaskEvent:f,onSessionIdChange:n,onStreamingDone:E.useCallback(()=>{c&&n9()},[c])}),{permissionMode:q}=ak(e,N,x==="streaming"),L=E.useRef(null),[X,Q]=E.useState(0),[ee,ne]=E.useState(0),Z=E.useCallback(ye=>{L.current=ye,ne(ye&&"getOptionCount"in ye?ye.getOptionCount():0)},[]);E.useEffect(()=>{Q(0),ne(0)},[P==null?void 0:P.toolCallId]);const D=E.useMemo(()=>P?{type:P.interactiveType,toolCallId:P.toolCallId}:null,[P]);v9({activeInteraction:D,onApprove:E.useCallback(()=>{const ye=L.current;ye&&"approve"in ye&&ye.approve()},[]),onDeny:E.useCallback(()=>{const ye=L.current;ye&&"deny"in ye&&ye.deny()},[]),onToggleOption:E.useCallback(ye=>{const He=L.current;He&&"toggleOption"in He&&(He.toggleOption(ye),Q(ye))},[]),onNavigateOption:E.useCallback(ye=>{Q(He=>{const Ae=L.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:E.useCallback(ye=>{const He=L.current;He&&"navigateQuestion"in He&&(He.navigateQuestion(ye),Q(0),ne(He.getOptionCount()))},[]),onSubmit:E.useCallback(()=>{const ye=L.current;ye&&"submit"in ye&&ye.submit()},[]),optionCount:ee,focusedIndex:X});const[H,$]=E.useState(0),[te,F]=E.useState(!0),[V,ie]=E.useState(!1),I=E.useRef(d.length),de=E.useCallback(ye=>{F(ye.isAtBottom)},[]),xe=E.useCallback(()=>{var ye;(ye=r.current)==null||ye.scrollToBottom(),F(!0),ie(!1)},[]);E.useEffect(()=>{const ye=I.current;I.current=d.length,d.length>ye&&!te&&ie(!0)},[d.length,te]),E.useEffect(()=>{te&&ie(!1)},[te]);const Te=Ao(),[he,Se]=E.useState(!1),[Ce,Pe]=E.useState(()=>Te?parseInt(localStorage.getItem(Jn.GESTURE_HINT_COUNT)||"0",10)<3:!1);E.useEffect(()=>{if(!Ce)return;const ye=setTimeout(()=>{Pe(!1);const He=parseInt(localStorage.getItem(Jn.GESTURE_HINT_COUNT)||"0",10);localStorage.setItem(Jn.GESTURE_HINT_COUNT,String(He+1))},ys.GESTURE_HINT_DISMISS_MS);return()=>clearTimeout(ye)},[Ce]);const _e=E.useCallback(()=>{Pe(!1);const ye=parseInt(localStorage.getItem(Jn.GESTURE_HINT_COUNT)||"0",10);localStorage.setItem(Jn.GESTURE_HINT_COUNT,String(ye+1))},[]),je=80,wt=500,Re=(ye,He)=>{const{offset:Ae,velocity:Ve}=He;Ae.y>je||Ve.y>wt?Se(!0):(Ae.y<-je||Ve.y<-wt)&&Se(!1)},tn=Gt(ye=>ye.setIsStreaming),Lt=Gt(ye=>ye.setIsWaitingForUser),nn=Gt(ye=>ye.setActiveForm);E.useEffect(()=>(tn(x==="streaming"),()=>tn(!1)),[x,tn]),E.useEffect(()=>(Lt(O),()=>Lt(!1)),[O,Lt]),E.useEffect(()=>(nn(o.activeForm),()=>nn(null)),[o.activeForm,nn]);const Zr=Gt(ye=>ye.showShortcutChips),[jn]=Nm(),{data:Tn}=gK(jn),Ei=E.useMemo(()=>(Tn==null?void 0:Tn.commands)??[],[Tn]),{data:Jr}=Soe(jn),ei=E.useMemo(()=>{if(!(Jr!=null&&Jr.files))return[];const ye=[],He=new Set;for(const Ae of Jr.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 Ut=st.slice(0,kt).join("/")+"/";He.has(Ut)||(He.add(Ut),ye.push({path:Ut,filename:st[kt-1]+"/",directory:kt>1?st.slice(0,kt-1).join("/")+"/":"",isDirectory:!0}))}}return ye},[Jr]),rt=TK({commands:Ei,input:m,cursorPos:H}),yt=vK({fileEntries:ei,input:m,cursorPos:H});function ce(ye,He){if(yt.detectFileTrigger(ye,He)){rt.setShowCommands(!1);return}if(rt.detectCommandTrigger(ye,He)){yt.setShowFiles(!1);return}yt.setShowFiles(!1),rt.setShowCommands(!1)}function ve(ye){p(ye),ce(ye,H||ye.length)}const Fe=E.useCallback(ye=>{$(ye),ce(m,ye)},[m]);function Ze(ye){const He=rt.handleCommandSelect(ye);p(He)}function ht(ye){const He=yt.handleFileSelect(ye);p(He.newValue),He.newCursorPos!==void 0&&$(He.newCursorPos)}const Nn=E.useCallback(()=>{yt.showFiles?yt.handleArrowDown():rt.handleArrowDown()},[yt.showFiles,yt.handleArrowDown,rt.handleArrowDown]),Rn=E.useCallback(()=>{yt.showFiles?yt.handleArrowUp():rt.handleArrowUp()},[yt.showFiles,yt.handleArrowUp,rt.handleArrowUp]),on=E.useCallback(()=>{if(yt.showFiles){const ye=yt.handleKeyboardSelect();ye&&(p(ye.newValue),ye.newCursorPos!==void 0&&$(ye.newCursorPos))}else if(rt.showCommands){const ye=rt.handleKeyboardSelect();ye&&p(ye)}},[yt.showFiles,rt.showCommands]),Vt=E.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),yt.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]),vn=rt.showCommands||yt.showFiles,vt=yt.showFiles&&yt.filteredFiles.length>0?`file-item-${yt.fileSelectedIndex}`:rt.showCommands&&rt.filteredCommands.length>0?`command-item-${rt.selectedIndex}`:void 0;return g.jsxs("div",{className:"flex h-full flex-col",children:[g.jsxs("div",{className:"relative min-h-0 flex-1",children:[A?g.jsx("div",{className:"flex h-full items-center justify-center",children:g.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:[g.jsxs("div",{className:"flex gap-1",children:[g.jsx("span",{className:"bg-muted-foreground h-2 w-2 rounded-full",style:{animation:"typing-dot 1.4s ease-in-out infinite",animationDelay:"0s"}}),g.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"}}),g.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..."]})}):d.length===0?g.jsx("div",{className:"flex h-full items-center justify-center",children:g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"text-muted-foreground text-base",children:"Start a conversation"}),g.jsx("p",{className:"text-muted-foreground/60 mt-2 text-sm",children:"Type a message below to begin"})]})}):g.jsx(goe,{ref:r,messages:d,sessionId:e,status:x,isTextStreaming:B,onScrollStateChange:de,streamStartTime:k,estimatedTokens:R,permissionMode:q,isWaitingForUser:O,waitingType:j??void 0,activeToolCallId:(P==null?void 0:P.toolCallId)??null,onToolRef:Z,focusedOptionIndex:X}),g.jsx(En,{children:V&&!te&&g.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"})}),g.jsx(En,{children:!te&&d.length>0&&!A&&g.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:g.jsx(YN,{className:"size-(--size-icon-md)"})})})]}),g.jsx(xoe,{celebration:l.activeCelebration,onComplete:l.clearCelebration}),g.jsx(yoe,{tasks:o.tasks,activeForm:o.activeForm,isCollapsed:o.isCollapsed,onToggleCollapse:o.toggleCollapse,celebratingTaskId:l.celebratingTaskId,onCelebrationComplete:l.clearCelebration}),S&&g.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:S}),g.jsxs("div",{className:"chat-input-container relative border-t p-4",children:[g.jsxs(En,{children:[rt.showCommands&&g.jsx(Eoe,{filteredCommands:rt.filteredCommands,selectedIndex:rt.selectedIndex,onSelect:Ze}),yt.showFiles&&g.jsx(voe,{filteredFiles:yt.filteredFiles,selectedIndex:yt.fileSelectedIndex,onSelect:ht})]}),g.jsx(boe,{ref:s,value:m,onChange:ve,onSubmit:b,isLoading:x==="streaming",sessionBusy:C,onStop:w,onEscape:()=>{rt.setShowCommands(!1),yt.setShowFiles(!1)},onClear:()=>{p(""),rt.setShowCommands(!1),yt.setShowFiles(!1)},isPaletteOpen:vn,onArrowUp:Rn,onArrowDown:Nn,onCommandSelect:on,activeDescendantId:vt,onCursorChange:Fe}),Te&&g.jsxs(g.Fragment,{children:[g.jsx(dt.div,{animate:Ce?{y:[0,8,0]}:void 0,transition:Ce?{duration:1.2,repeat:2}:void 0,children:g.jsx(woe,{collapsed:he,onToggle:()=>Se(ye=>!ye)})}),g.jsx(En,{children:Ce&&g.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"})}),g.jsx(En,{initial:!1,children:!he&&g.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:[Zr&&g.jsx(a3,{onChipClick:Vt}),g.jsx(o3,{sessionId:e,sessionStatus:N,isStreaming:x==="streaming"})]})})]}),!Te&&g.jsxs(g.Fragment,{children:[g.jsx(En,{children:Zr&&g.jsx(a3,{onChipClick:Vt})}),g.jsx(o3,{sessionId:e,sessionStatus:N,isStreaming:x==="streaming"})]})]})]})}function Hoe({transformContent:e,embedded:t}={}){const{sidebarOpen:n,setSidebarOpen:r,toggleSidebar:s}=Gt(),[o]=km(),l=Ao(),c=E.useRef(null);k9();const[f]=Nm(),d=Gt(b=>b.isStreaming),m=Gt(b=>b.activeForm),p=Gt(b=>b.isWaitingForUser);return b9({cwd:t?null:f,isStreaming:d}),y9({cwd:t?null:f,activeForm:m,isStreaming:d,isWaitingForUser:p}),E.useEffect(()=>{if(!(t||l)||!n)return;const x=t?c.current:document;if(!x)return;const S=C=>{C.key==="Escape"&&r(!1)};return x.addEventListener("keydown",S),()=>x.removeEventListener("keydown",S)},[t,l,n,r]),t?g.jsx(Ew,{reducedMotion:"user",children:g.jsxs("div",{ref:c,className:"bg-background text-foreground relative flex h-full flex-col",children:[g.jsx(Pw,{sessionId:o}),g.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[g.jsx(En,{children:n&&g.jsxs(g.Fragment,{children:[g.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"}),g.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:g.jsx(D1,{})})]})}),g.jsx(En,{children:!n&&g.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:g.jsx(Lw,{className:"size-(--size-icon-md)"})})}),g.jsx("main",{className:"h-full flex-1 overflow-hidden",children:o?g.jsx(l3,{sessionId:o,transformContent:e},o):g.jsx("div",{className:"flex h-full flex-1 items-center justify-center",children:g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"text-muted-foreground text-base",children:"New conversation"}),g.jsx("p",{className:"text-muted-foreground/60 mt-2 text-sm",children:"Select a session or start a new one"})]})})})]})]})}):g.jsx(Ew,{reducedMotion:"user",children:g.jsxs("div",{ref:c,className:"bg-background text-foreground flex h-dvh flex-col",children:[g.jsx(Pw,{sessionId:o}),g.jsxs("div",{className:"relative flex flex-1 overflow-hidden",children:[g.jsx(En,{children:!n&&g.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:g.jsx(Lw,{className:"size-(--size-icon-md)"})})}),l?g.jsx(En,{children:n&&g.jsxs(g.Fragment,{children:[g.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"}),g.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:g.jsx(D1,{})})]})}):g.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:g.jsx("div",{className:"h-full w-80 overflow-y-auto",children:g.jsx(D1,{})})}),g.jsx("main",{className:"flex-1 overflow-hidden",children:o?g.jsx(l3,{sessionId:o,transformContent:e},o):g.jsx("div",{className:"flex h-full flex-1 items-center justify-center",children:g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"text-muted-foreground text-base",children:"New conversation"}),g.jsx("p",{className:"text-muted-foreground/60 mt-2 text-sm",children:"Select a session or start a new one"})]})})})]})]})})}const zoe=new dP({defaultOptions:{queries:{staleTime:fi.DEFAULT_STALE_TIME_MS,retry:fi.DEFAULT_RETRY}}}),Voe=new G8("/api");zL.createRoot(document.getElementById("root")).render(g.jsx(we.StrictMode,{children:g.jsx(KP,{children:g.jsxs(hP,{client:zoe,children:[g.jsx(QP,{transport:Voe,children:g.jsx(Hoe,{})}),!1]})})}));const qoe=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:p4},Symbol.toStringTag,{value:"Module"}));export{Wr as N,mae as a,Ge as b,Woe as c,g as j,E as r};