better-grill 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,86 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ee=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function te(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ee)}catch(e){ee(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function L(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else te(L.bind(null,e))}var ne={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ne,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=L,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=te,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),N=Symbol.for(`react.profiler`),P=Symbol.for(`react.consumer`),F=Symbol.for(`react.context`),I=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),L=Symbol.for(`react.memo`),ne=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),ie=Symbol.for(`react.legacy_hidden`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.for(`react.view_transition`),R=Symbol.for(`react.recoverable`),se=Symbol.iterator;function ce(e){return typeof e!=`object`||!e?null:(e=se&&e[se]||e[`@@iterator`],typeof e==`function`?e:null)}var le=Symbol.for(`react.client.reference`);function ue(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case N:return`Profiler`;case M:return`StrictMode`;case ee:return`Suspense`;case te:return`SuspenseList`;case re:return`Activity`;case oe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case F:return e.displayName||`Context`;case P:return(e._context.displayName||`Context`)+`.Consumer`;case I:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case L:return t=e.displayName||null,t===null?ue(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var de=Array.isArray,z=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},me=[],he=-1;function ge(e){return{current:e}}function _e(e){0>he||(e.current=me[he],me[he]=null,he--)}function ve(e,t){he++,me[he]=e.current,e.current=t}var ye=ge(null),be=ge(null),xe=ge(null),Se=ge(null);function Ce(e,t){switch(ve(xe,t),ve(be,e),ve(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=vp(t),e=yp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ye),ve(ye,e)}function we(){_e(ye),_e(be),_e(xe)}function Te(e){var t=e.memoizedState;t!==null&&(mh._currentValue=t.memoizedState,ve(Se,e)),t=ye.current;var n=yp(t,e.type);t!==n&&(ve(be,e),ve(ye,n))}function Ee(e){be.current===e&&(_e(ye),_e(be)),Se.current===e&&(_e(Se),mh._currentValue=pe)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+De+e+Oe}var Ae=!1;function je(e,t){if(!e||Ae)return``;Ae=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ke(`Activity`);case 30:return ke(`ViewTransition`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=Me(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ze(n),i=1<<r;t|=e[r],n&=~i}return t}function ct(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 lt(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ft(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&pt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function pt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ht(e,t){var n=t&-t;return n=n&42?1:gt(n),(n&(e.suspendedLanes|t))===0?n:0}function gt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function _t(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function vt(){var e=fe.p;return e===0?(e=window.event,e===void 0?32:Ah(e.type)):e}function yt(e,t){var n=fe.p;try{return fe.p=e,t()}finally{fe.p=n}}var bt=Math.random().toString(36).slice(2),xt=`__reactFiber$`+bt,St=`__reactProps$`+bt,Ct=`__reactContainer$`+bt,wt=`__reactEvents$`+bt,Tt=`__reactListeners$`+bt,Et=`__reactHandles$`+bt,Dt=`__reactResources$`+bt,Ot=`__reactMarker$`+bt,kt=`__reactLoad$`+bt;function At(e){delete e[xt],delete e[St],delete e[Tt],delete e[Et]}function jt(e){var t;if(t=e[xt])return t;for(var n=e.parentNode;n;){if(t=n[Ct]||n[xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bm(e);e!==null;){if(n=e[xt])return n;e=bm(e)}return t}e=n,n=e.parentNode}return null}function Mt(e){if(e=e[xt]||e[Ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Pt(e){var t=e[Dt];return t||=e[Dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ft(e){e[Ot]=!0}function It(e){e[kt]=void 0}var Lt=new Set,Rt={};function zt(e,t){Bt(e,t),Bt(e+`Capture`,t)}function Bt(e,t){for(Rt[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var Vt=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]*$`),Ht={},Ut={};function Wt(e){return Pe.call(Ut,e)?!0:Pe.call(Ht,e)?!1:Vt.test(e)?Ut[e]=!0:(Ht[e]=!0,!1)}var Gt=!1;function Kt(){var e=Gt;return Gt=!1,e}function B(e,t,n){if(Wt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function qt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function V(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Yt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Xt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zt(e){if(!e._valueTracker){var t=Yt(e)?`checked`:`value`;e._valueTracker=Xt(e,t,``+e[t])}}function Qt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Yt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var $t=/[\n"\\]/g;function en(e){return e.replace($t,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function tn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Jt(t)):e.value!==``+Jt(t)&&(e.value=``+Jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):rn(e,Jt(n)):o===`number`&&e.value==t?rn(e,Jt(e.value)):rn(e,Jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Jt(s):e.removeAttribute(`name`)}function nn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Zt(e);return}n=n==null?``:``+Jt(n),t=t==null?n:``+Jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Zt(e)}function rn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function an(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function on(e,t,n){if(t!=null&&(t=``+Jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Jt(n)}function sn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(de(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Zt(e)}function cn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ln=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 un(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||ln.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function dn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Gt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(un(e,a,r),Gt=!0)}else for(var o in t)t.hasOwnProperty(o)&&un(e,o,t[o])}function fn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){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 pn=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`],[`maskType`,`mask-type`],[`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`]]),mn=/^[\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 hn(e){return mn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function gn(){}var _n=null;function vn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yn=null,bn=null;function xn(e){var t=Mt(e);if(t&&(e=t.stateNode)){var n=e[St]||null;a:switch(e=t.stateNode,t.type){case`input`:if(tn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+en(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[St]||null;if(!a)throw Error(i(90));tn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Qt(r)}break a;case`textarea`:on(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}}}var Sn=!1;function Cn(e,t,n){if(Sn)return e(t,n);Sn=!0;try{return e(t)}finally{if(Sn=!1,(yn!==null||bn!==null)&&(Wd(),yn&&(t=yn,e=bn,bn=yn=null,xn(t),e)))for(t=0;t<e.length;t++)xn(e[t])}}function wn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[St]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Tn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,En=!1;if(Tn)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){En=!0}}),window.addEventListener(`test`,Dn,Dn),window.removeEventListener(`test`,Dn,Dn)}catch{En=!1}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return An=i.slice(e,1<r?1-r:void 0)}function Mn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nn(){return!0}function Pn(){return!1}function H(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Nn:Pn,this.isPropagationStopped=Pn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},In=H(Fn),U=D({},Fn,{view:0,detail:0}),Ln=H(U),Rn,zn,Bn,Vn=D({},U,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Bn&&(Bn&&e.type===`mousemove`?(Rn=e.screenX-Bn.screenX,zn=e.screenY-Bn.screenY):zn=Rn=0,Bn=e),Rn)},movementY:function(e){return`movementY`in e?e.movementY:zn}}),Hn=H(Vn),Un=H(D({},Vn,{dataTransfer:0})),Wn=H(D({},U,{relatedTarget:0})),Gn=H(D({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0})),Kn=H(D({},Fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),qn=H(D({},Fn,{data:0})),Jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Yn={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`},Xn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Xn[e])?!!t[e]:!1}function Qn(){return Zn}var $n=H(D({},U,{key:function(e){if(e.key){var t=Jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Yn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qn,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),er=H(D({},Vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),tr=H(D({},Fn,{submitter:0})),nr=H(D({},U,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qn})),rr=H(D({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ir=H(D({},Vn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ar=H(D({},Fn,{newState:0,oldState:0,source:0})),or=[9,13,27,32],sr=Tn&&`CompositionEvent`in window,cr=null;Tn&&`documentMode`in document&&(cr=document.documentMode);var lr=Tn&&`TextEvent`in window&&!cr,ur=Tn&&(!sr||cr&&8<cr&&11>=cr),dr=` `,fr=!1;function pr(e,t){switch(e){case`keyup`:return or.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function mr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var hr=!1;function gr(e,t){switch(e){case`compositionend`:return mr(t);case`keypress`:return t.which===32?(fr=!0,dr):null;case`textInput`:return e=t.data,e===dr&&fr?null:e;default:return null}}function _r(e,t){if(hr)return e===`compositionend`||!sr&&pr(e,t)?(e=jn(),An=kn=On=null,hr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return ur&&t.locale!==`ko`?null:t.data;default:return null}}var vr={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 yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!vr[e.type]:t===`textarea`}function br(e,t,n,r){yn?bn?bn.push(r):bn=[r]:yn=r,t=tp(t,`onChange`),0<t.length&&(n=new In(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var xr=null,Sr=null;function Cr(e){qf(e,0)}function wr(e){if(Qt(Nt(e)))return e}function Tr(e,t){if(e===`change`)return t}var Er=!1;if(Tn){var Dr;if(Tn){var Or=`oninput`in document;if(!Or){var kr=document.createElement(`div`);kr.setAttribute(`oninput`,`return;`),Or=typeof kr.oninput==`function`}Dr=Or}else Dr=!1;Er=Dr&&(!document.documentMode||9<document.documentMode)}function Ar(){xr&&(xr.detachEvent(`onpropertychange`,jr),Sr=xr=null)}function jr(e){if(e.propertyName===`value`&&wr(Sr)){var t=[];br(t,Sr,e,vn(e)),Cn(Cr,t)}}function Mr(e,t,n){e===`focusin`?(Ar(),xr=t,Sr=n,xr.attachEvent(`onpropertychange`,jr)):e===`focusout`&&Ar()}function Nr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return wr(Sr)}function Pr(e,t){if(e===`click`)return wr(t)}function Fr(e,t){if(e===`input`||e===`change`)return wr(t)}function Ir(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Lr=typeof Object.is==`function`?Object.is:Ir;function Rr(e,t){if(Lr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Pe.call(t,i)||!Lr(e[i],t[i]))return!1}return!0}function zr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vr(e,t){var n=Br(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Br(n)}}function Hr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ur(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=zr(e.document)}return t}function Wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Gr=Tn&&`documentMode`in document&&11>=document.documentMode,Kr=null,qr=null,Jr=null,Yr=!1;function Xr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yr||Kr==null||Kr!==zr(r)||(r=Kr,`selectionStart`in r&&Wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Jr&&Rr(Jr,r)||(Jr=r,r=tp(qr,`onSelect`),0<r.length&&(t=new In(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Kr)))}function Zr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Qr={animationend:Zr(`Animation`,`AnimationEnd`),animationiteration:Zr(`Animation`,`AnimationIteration`),animationstart:Zr(`Animation`,`AnimationStart`),transitionrun:Zr(`Transition`,`TransitionRun`),transitionstart:Zr(`Transition`,`TransitionStart`),transitioncancel:Zr(`Transition`,`TransitionCancel`),transitionend:Zr(`Transition`,`TransitionEnd`)},$r={},ei={};Tn&&(ei=document.createElement(`div`).style,`AnimationEvent`in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),`TransitionEvent`in window||delete Qr.transitionend.transition);function ti(e){if($r[e])return $r[e];if(!Qr[e])return e;var t=Qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ei)return $r[e]=t[n];return e}var ni=ti(`animationend`),ri=ti(`animationiteration`),ii=ti(`animationstart`),ai=ti(`transitionrun`),oi=ti(`transitionstart`),si=ti(`transitioncancel`),ci=ti(`transitionend`),li=new Map,ui=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);ui.push(`scrollEnd`);function di(e,t){li.set(e,t),zt(t,[e])}var fi=0;function pi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Td.identifierPrefix;var n=fi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function mi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Nd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function hi(e,t){return e=mi(e),t=mi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var gi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},_i=[],vi=0,yi=0;function bi(){for(var e=vi,t=yi=vi=0;t<e;){var n=_i[t];_i[t++]=null;var r=_i[t];_i[t++]=null;var i=_i[t];_i[t++]=null;var a=_i[t];if(_i[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ci(n,i,a)}}function W(e,t,n,r){_i[vi++]=e,_i[vi++]=t,_i[vi++]=n,_i[vi++]=r,yi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function xi(e,t,n,r){return W(e,t,n,r),wi(e)}function Si(e,t){return W(e,null,null,t),wi(e)}function Ci(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function wi(e){if(50<Pd)throw Pd=0,Fd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ti={};function Ei(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Di(e,t,n,r){return new Ei(e,t,n,r)}function Oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ki(e,t){var n=e.alternate;return n===null?(n=Di(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ai(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ji(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Oi(r)&&(s=1);else if(typeof r==`string`)s=eh(e,n,ye.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case re:return e=Di(31,n,t,a),e.elementType=re,e.lanes=o,e;case j:return Mi(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=Di(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case ee:return e=Di(13,n,t,a),e.elementType=ee,e.lanes=o,e;case te:return e=Di(19,n,t,a),e.elementType=te,e.lanes=o,e;case ie:case oe:return e=a|32,e=Di(30,n,t,e),e.elementType=oe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case F:s=10;break a;case P:s=9;break a;case I:s=11;break a;case L:s=14;break a;case ne:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Di(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Mi(e,t,n,r){return e=Di(7,e,r,t),e.lanes=n,e}function Ni(e,t,n){return e=Di(6,e,null,t),e.lanes=n,e}function Pi(e){var t=Di(18,null,null,0);return t.stateNode=e,t}function Fi(e,t,n){return t=Di(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ii=new WeakMap;function Li(e,t){if(typeof e==`object`&&e){var n=Ii.get(e);return n===void 0?(t={value:e,source:t,stack:Ne(t)},Ii.set(e,t),t):n}return{value:e,source:t,stack:Ne(t)}}var Ri=[],zi=0,Bi=null,Vi=0,Hi=[],Ui=0,Wi=null,Gi=1,Ki=``;function qi(e,t){Ri[zi++]=Vi,Ri[zi++]=Bi,Bi=e,Vi=t}function Ji(e,t,n){Hi[Ui++]=Gi,Hi[Ui++]=Ki,Hi[Ui++]=Wi,Wi=e;var r=Gi;e=Ki;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Gi=1<<32-Ze(t)+i|n<<i|r,Ki=a+e}else Gi=1<<a|n<<i|r,Ki=e}function Yi(e){e.return!==null&&(qi(e,1),Ji(e,1,0))}function Xi(e){for(;e===Bi;)Bi=Ri[--zi],Ri[zi]=null,Vi=Ri[--zi],Ri[zi]=null;for(;e===Wi;)Wi=Hi[--Ui],Hi[Ui]=null,Ki=Hi[--Ui],Hi[Ui]=null,Gi=Hi[--Ui],Hi[Ui]=null}function Zi(e,t){Hi[Ui++]=Gi,Hi[Ui++]=Ki,Hi[Ui++]=Wi,Gi=t.id,Ki=t.overflow,Wi=e}var Qi=null,$i=null,ea=!1,ta=null,na=!1,ra=Error(i(519));function ia(e){throw ua(Li(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ra}function aa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[xt]=e,t[St]=r,n){case`dialog`:Jf(`cancel`,t),Jf(`close`,t);break;case`iframe`:case`object`:case`embed`:Jf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Gf.length;n++)Jf(Gf[n],t);break;case`source`:Jf(`error`,t);break;case`img`:case`image`:case`link`:Jf(`error`,t),Jf(`load`,t);break;case`details`:Jf(`toggle`,t);break;case`input`:Jf(`invalid`,t),nn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Jf(`invalid`,t);break;case`textarea`:Jf(`invalid`,t),sn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||sp(t.textContent,n)?(r.popover!=null&&(Jf(`beforetoggle`,t),Jf(`toggle`,t)),r.onScroll!=null&&Jf(`scroll`,t),r.onScrollEnd!=null&&Jf(`scrollend`,t),r.onClick!=null&&(t.onclick=gn),t=!0):t=!1,t||ia(e,!0)}function oa(e){for(Qi=e.return;Qi;)switch(Qi.tag){case 5:case 31:case 13:na=!1;return;case 27:case 3:na=!0;return;default:Qi=Qi.return}}function sa(e){if(e!==Qi)return!1;if(!ea)return oa(e),ea=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||xp(e.type,e.memoizedProps)),n=!n),n&&$i&&ia(e),oa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));$i=ym(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));$i=ym(e)}else t===27?(t=$i,Ap(e.type)?(e=vm,vm=null,$i=e):$i=t):$i=Qi?_m(e.stateNode.nextSibling):null;return!0}function ca(){$i=Qi=null,ea=!1}function la(){var e=ta;return e!==null&&(_d===null?_d=e:_d.push.apply(_d,e),ta=null),e}function ua(e){ta===null?ta=[e]:ta.push(e)}var da=ge(null),fa=null,pa=null;function G(e,t,n){ve(da,t._currentValue),t._currentValue=n}function ma(e){e._currentValue=da.current,_e(da)}function ha(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ga(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ha(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ha(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ha(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function _a(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Lr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[mh]:e.push(mh))}a=a.return}return e!==null&&ga(t,e,n,r),t.flags|=262144,e!==null}function va(e){for(e=e.firstContext;e!==null;){if(!Lr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ya(e){fa=e,pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ba(e){return Sa(fa,e)}function xa(e,t){return fa===null&&ya(e),Sa(e,t)}function Sa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},pa===null){if(e===null)throw Error(i(308));pa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pa=pa.next=t;return n}var Ca=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},wa=t.unstable_scheduleCallback,Ta=t.unstable_NormalPriority,Ea={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Da(){return{controller:new Ca,data:new Map,refCount:0}}function Oa(e){e.refCount--,e.refCount===0&&wa(Ta,function(){e.controller.abort()})}function ka(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Aa=null;function ja(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ma=null,Na=0,Pa=0,Fa=null;function Ia(e,t){if(Ma===null){var n=Ma=[];Na=0,Pa=Bf(),Fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Na++,t.then(La,La),t}function La(){if(--Na===0&&(Aa=null,Ma!==null)){Fa!==null&&(Fa.status=`fulfilled`);var e=Ma;Ma=null,Pa=0,Fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ra(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var za=z.S;z.S=function(e,t){if(bd=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Ia(e,t),Aa!==null)for(var n=Ef;n!==null;)ka(n,Aa),n=n.next;if(n=e.types,n!==null){for(var r=Ef;r!==null;)ka(r,n),r=r.next;if(Pa!==0){r=Aa,r===null&&(r=Aa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}za!==null&&za(e,t)};var Ba=ge(null);function Va(){var e=Ba.current;return e===null?td.pooledCache:e}function Ha(e,t){t===null?ve(Ba,Ba.current):ve(Ba,t.pool)}function Ua(){var e=Va();return e===null?null:{parent:Ea._currentValue,pool:e}}var Wa=Error(i(460)),Ga=Error(i(474)),Ka=Error(i(542)),qa={then:function(){}};function Ja(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(gn,gn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,$a(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(gn,gn);else{if(e=td,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,$a(e),e}throw Za=t,Wa}}function Xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Za=e,Wa):e}}var Za=null;function Qa(){if(Za===null)throw Error(i(459));var e=Za;return Za=null,e}function $a(e){if(e===Wa||e===Ka)throw Error(i(483))}var eo=null,to=0;function no(e){var t=to;return to+=1,eo===null&&(eo=[]),Ya(eo,e,t)}function ro(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function io(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ao(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ki(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ni(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),ro(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ne&&Xa(i)===t.type)?(t=a(t,n.props),ro(t,n),t.return=e,t):(t=ji(n.type,n.key,n.props,null,e.mode,r),ro(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Fi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Mi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ni(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=ji(t.type,t.key,t.props,null,e.mode,n),ro(n,t),n.return=e,n;case A:return t=Fi(t,e.mode,n),t.return=e,t;case ne:return t=Xa(t),f(e,t,n)}if(de(t)||ce(t))return t=Mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,no(t),n);if(t.$$typeof===F)return f(e,xa(e,t),n);io(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case ne:return n=Xa(n),p(e,t,n,r)}if(de(n)||ce(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,no(n),r);if(n.$$typeof===F)return p(e,t,xa(e,n),r);io(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ne:return r=Xa(r),m(e,t,n,r,i)}if(de(r)||ce(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,no(r),i);if(r.$$typeof===F)return m(e,t,n,xa(t,r),i);io(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),ea&&qi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ea&&qi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),ea&&qi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ea&&qi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ea&&qi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ea&&qi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),ro(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ne&&Xa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ro(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Mi(o.props.children,e.mode,c,o.key),ro(c,o),c.return=e,e=c):(c=ji(o.type,o.key,o.props,null,e.mode,c),ro(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Fi(o,e.mode,c),c.return=e,e=c}return s(e);case ne:return o=Xa(o),_(e,r,o,c)}if(de(o))return h(e,r,o,c);if(ce(o)){if(l=ce(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,no(o),c);if(o.$$typeof===F)return _(e,r,xa(e,o),c);io(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Ni(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{to=0;var i=_(e,t,n,r);return eo=null,i}catch(t){if(t===Wa||t===Ka)throw t;var a=Di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var oo=ao(!0),so=ao(!1),co=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function po(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ed&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=wi(e),Ci(e,null,n),t}return W(e,r,t,n),wi(e)}function mo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}function ho(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var go=!1;function _o(){if(go){var e=Fa;if(e!==null)throw e}}function vo(e,t,n,r){go=!1;var i=e.updateQueue;co=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(rd&f)===f:(r&f)===f){f!==0&&f===Pa&&(go=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:co=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),dd|=o,e.lanes=o,e.memoizedState=d}}function yo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function bo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)yo(n[e],t)}var xo=ge(null),So=ge(0);function Co(e,t){e=ld,ve(So,e),ve(xo,t),ld=e|t.baseLanes}function wo(){ve(So,ld),ve(xo,xo.current)}function To(){ld=So.current,_e(xo),_e(So)}var Eo=ge(null),Do=null;function Oo(e){var t=e.alternate;ve(No,No.current&1),ve(Eo,e),Do===null&&(t===null||xo.current!==null||t.memoizedState!==null)&&(Do=e)}function ko(e){ve(No,No.current),ve(Eo,e),Do===null&&(Do=e)}function Ao(e){e.tag===22?(ve(No,No.current),ve(Eo,e),Do===null&&(Do=e)):jo()}function jo(){ve(No,No.current),ve(Eo,Eo.current)}function Mo(e){_e(Eo),Do===e&&(Do=null),_e(No)}var No=ge(0);function Po(e,t){ve(Eo,Eo.current),ve(No,t)}function Fo(e){_e(No),_e(Eo),Do===e&&(Do=null)}function Io(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mm(n)||hm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lo=0,Ro=null,zo=null,Bo=null,Vo=!1,Ho=!1,Uo=!1,Wo=0,Go=0,Ko=null,qo=0;function Jo(){throw Error(i(321))}function Yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Lr(e[n],t[n]))return!1;return!0}function Xo(e,t,n,r,i,a){return Lo=a,Ro=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?pc:mc,Uo=!1,a=n(r,i),Uo=!1,Ho&&(a=Qo(t,n,r,i)),Zo(e),a}function Zo(e){z.H=fc;var t=zo!==null&&zo.next!==null;if(Lo=0,Bo=zo=Ro=null,Vo=!1,Go=0,Ko=null,t)throw Error(i(300));e===null||jc||(e=e.dependencies,e!==null&&va(e)&&(jc=!0))}function Qo(e,t,n,r){Ro=e;var a=0;do{if(Ho&&(Ko=null),Go=0,Ho=!1,25<=a)throw Error(i(301));if(a+=1,Bo=zo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}z.H=hc,o=t(n,r)}while(Ho);return o}function $o(){var e=z.H,t=e.useState()[0];return t=typeof t.then==`function`?os(t):t,e=e.useState()[0],(zo===null?null:zo.memoizedState)!==e&&(Ro.flags|=1024),t}function es(){var e=Wo!==0;return Wo=0,e}function ts(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ns(e){if(Vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Vo=!1}Lo=0,Bo=zo=Ro=null,Ho=!1,Go=Wo=0,Ko=null}function rs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bo===null?Ro.memoizedState=Bo=e:Bo=Bo.next=e,Bo}function is(){if(zo===null){var e=Ro.alternate;e=e===null?null:e.memoizedState}else e=zo.next;var t=Bo===null?Ro.memoizedState:Bo.next;if(t!==null)Bo=t,zo=e;else{if(e===null)throw Ro.alternate===null?Error(i(467)):Error(i(310));zo=e,e={memoizedState:zo.memoizedState,baseState:zo.baseState,baseQueue:zo.baseQueue,queue:zo.queue,next:null},Bo===null?Ro.memoizedState=Bo=e:Bo=Bo.next=e}return Bo}function as(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function os(e){var t=Go;return Go+=1,Ko===null&&(Ko=[]),e=Ya(Ko,e,t),t=Ro,(Bo===null?t.memoizedState:Bo.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?pc:mc),e}function ss(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return os(e);if(e.$$typeof===R)return;if(e.$$typeof===F)return ba(e)}throw Error(i(438,String(e)))}function cs(e){var t=null,n=Ro.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Ro.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=as(),Ro.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ae;return t.index++,n}function ls(e,t){return typeof t==`function`?t(e):t}function us(e){return ds(is(),zo,e)}function ds(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Lo&f)===f:(rd&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Pa&&(d=!0);else if((Lo&p)===p){u=u.next,p===Pa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,Ro.lanes|=p,dd|=p;f=u.action,Uo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,Ro.lanes|=f,dd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Lr(o,e.memoizedState)&&(jc=!0,d&&(n=Fa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function fs(e){var t=is(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Lr(o,t.memoizedState)||(jc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ps(e,t,n){var r=Ro,a=is(),o=ea;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Lr((zo||a).memoizedState,n);if(s&&(a.memoizedState=n,jc=!0),a=a.queue,Rs(gs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Bo!==null&&!!(Bo.memoizedState.tag&1),Ns(e?9:8,{destroy:void 0},hs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,td===null)throw Error(i(349));o||Lo&127||ms(r,t,n)}return n}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ro.updateQueue,t===null?(t=as(),Ro.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&vs(e)}function gs(e,t,n){return n(function(){_s(t)&&vs(e)})}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lr(e,n)}catch{return!0}}function vs(e){var t=Si(e,2);t!==null&&zd(t,e,2)}function ys(e){var t=rs();if(typeof e==`function`){var n=e;if(e=n(),Uo){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:e},t}function bs(e,t,n,r){return e.baseState=n,ds(e,zo,typeof r==`function`?r:ls)}function xs(e,t,n,r,a){if(lc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};z.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=z.T,o={};o.types=a===null?null:a.types,z.T=o;try{var s=n(i,r),c=z.S;c!==null&&c(o,s),Cs(e,t,s)}catch(n){Ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),z.T=a}}else try{a=n(i,r),Cs(e,t,a)}catch(n){Ts(e,t,n)}}function Cs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ws(e,t,n)},function(n){return Ts(e,t,n)}):ws(e,t,n)}function ws(e,t,n){t.status=`fulfilled`,t.value=n,Es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ss(e,n)))}function Ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Es(t),t=t.next;while(t!==r)}e.action=null}function Es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function Os(e,t){if(ea){var n=td.formState;if(n!==null){a:{var r=Ro;if(ea){if($i){b:{for(var i=$i,a=na;i.nodeType!==8;){if(!a){i=null;break b}if(i=_m(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){$i=_m(i.nextSibling),r=i.data===`F!`;break a}}ia(r)}r=!1}r&&(t=n[0])}}return n=rs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=oc.bind(null,Ro,r),r.dispatch=n,r=ys(!1),a=cc.bind(null,Ro,!1,r.queue),r=rs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=xs.bind(null,Ro,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ks(e){return As(is(),zo,e)}function As(e,t,n){if(t=ds(e,t,Ds)[0],e=us(ls)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=os(t)}catch(e){throw e===Wa?Ka:e}else r=t;t=is();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Ro.flags|=2048,Ns(9,{destroy:void 0},js.bind(null,i,n),null)),[r,a,e]}function js(e,t){e.action=t}function Ms(e){var t=is(),n=zo;if(n!==null)return As(t,n,e);is(),t=t.memoizedState,n=is();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Ro.updateQueue,t===null&&(t=as(),Ro.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ps(){return is().memoizedState}function Fs(e,t,n,r){var i=rs();Ro.flags|=e,i.memoizedState=Ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function Is(e,t,n,r){var i=is();r=r===void 0?null:r;var a=i.memoizedState.inst;zo!==null&&r!==null&&Yo(r,zo.memoizedState.deps)?i.memoizedState=Ns(t,a,n,r):(Ro.flags|=e,i.memoizedState=Ns(1|t,a,n,r))}function Ls(e,t){Fs(8390656,8,e,t)}function Rs(e,t){Is(2048,8,e,t)}function zs(e){Ro.flags|=4;var t=Ro.updateQueue;if(t===null)t=as(),Ro.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bs(e){var t=is().memoizedState;return zs({ref:t,nextImpl:e}),function(){if(ed&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vs(e,t){return Is(4,2,e,t)}function Hs(e,t){return Is(4,4,e,t)}function Us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ws(e,t,n){n=n==null?null:n.concat([e]),Is(4,4,Us.bind(null,t,e),n)}function Gs(){}function Ks(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Yo(t,r[1]))return r[0];if(r=e(),Uo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function Js(e,t,n){return n===void 0||Lo&1073741824&&!(rd&261930)?e.memoizedState=t:(e.memoizedState=n,e=Ld(),Ro.lanes|=e,dd|=e,n)}function Ys(e,t,n,r){return Lr(n,t)?n:xo.current===null?!(Lo&106)||Lo&1073741824&&!(rd&261930)?(jc=!0,e.memoizedState=n):(e=Ld(),Ro.lanes|=e,dd|=e,t):(e=Js(e,n,r),Lr(e,t)||(jc=!0),e)}function Xs(e,t,n,r,i){var a=fe.p;fe.p=a!==0&&8>a?a:8;var o=z.T,s={};s.types=o===null?null:o.types,z.T=s,cc(e,!1,t,n);try{var c=i(),l=z.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,Ra(c,r),Id(e)):sc(e,t,r,Id(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},Id())}finally{fe.p=a,o!==null&&s.types!==null&&(o.types=s.types),z.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,pe,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},Id())}function tc(){return ba(mh)}function nc(){return is().memoizedState}function rc(){return is().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Id();e=fo(n);var r=po(t,e,n);r!==null&&(zd(r,t,n),mo(r,t,n)),t={cache:Da()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=Id();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=xi(e,t,n,r),n!==null&&(zd(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,Id())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Lr(s,o))return W(e,t,i,0),td===null&&bi(),!1}catch{}if(n=xi(e,t,i,r),n!==null)return zd(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:Bf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=xi(e,n,r,2),t!==null&&zd(t,e,2)}function lc(e){var t=e.alternate;return e===Ro||t!==null&&t===Ro}function uc(e,t){Ho=Vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}var fc={readContext:ba,use:ss,useCallback:Jo,useContext:Jo,useEffect:Jo,useImperativeHandle:Jo,useLayoutEffect:Jo,useInsertionEffect:Jo,useMemo:Jo,useReducer:Jo,useRef:Jo,useState:Jo,useDebugValue:Jo,useDeferredValue:Jo,useTransition:Jo,useSyncExternalStore:Jo,useId:Jo,useHostTransitionStatus:Jo,useFormState:Jo,useActionState:Jo,useOptimistic:Jo,useMemoCache:Jo,useCacheRefresh:Jo,useEffectEvent:Jo},pc={readContext:ba,use:ss,useCallback:function(e,t){return rs().memoizedState=[e,t===void 0?null:t],e},useContext:ba,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=rs();t=t===void 0?null:t;var r=e();if(Uo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=rs();if(n!==void 0){var i=n(t);if(Uo){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ac.bind(null,Ro,e),[r.memoizedState,e]},useRef:function(e){var t=rs();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,Ro,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(rs(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,Ro,e.queue,!0,!1),rs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Ro,a=rs();if(ea){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),td===null)throw Error(i(349));rd&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=rs(),t=td.identifierPrefix;if(ea){var n=Ki,r=Gi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Wo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=qo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Os,useActionState:Os,useOptimistic:function(e){var t=rs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,Ro,!0,n),n.dispatch=t,[e,t]},useMemoCache:cs,useCacheRefresh:function(){return rs().memoizedState=ic.bind(null,Ro)},useEffectEvent:function(e){var t=rs(),n={impl:e};return t.memoizedState=n,function(){if(ed&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},mc={readContext:ba,use:ss,useCallback:Ks,useContext:ba,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:us,useRef:Ps,useState:function(){return us(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){return Ys(is(),zo.memoizedState,e,t)},useTransition:function(){var e=us(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){return bs(is(),zo,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs},hc={readContext:ba,use:ss,useCallback:Ks,useContext:ba,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:fs,useRef:Ps,useState:function(){return fs(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=is();return zo===null?Js(n,e,t):Ys(n,zo.memoizedState,e,t)},useTransition:function(){var e=fs(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){var n=is();return zo===null?(n.baseState=e,[e,n.queue.dispatch]):bs(n,zo,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs};function gc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Id(),i=fo(r);i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(zd(t,e,r),mo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Id(),i=fo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(zd(t,e,r),mo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Id(),r=fo(n);r.tag=2,t!=null&&(r.callback=t),t=po(e,r,n),t!==null&&(zd(t,e,n),mo(t,e,n))}};function vc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Rr(n,r)||!Rr(i,a):!0}function yc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function bc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function xc(e){gi(e)}function Sc(e){console.error(e)}function Cc(e){gi(e)}function wc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ec(e,t,n){return n=fo(n),n.tag=3,n.payload={element:null},n.callback=function(){wc(e,t)},n}function Dc(e){return e=fo(e),e.tag=3,e}function Oc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Tc(t,n,r),typeof i!=`function`&&(Cd===null?Cd=new Set([this]):Cd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function kc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&_a(t,n,a,!0),n=Eo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Do===null?Zd():n.alternate===null&&ud===0&&(ud=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===qa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),bf(e,r,a)),!1;case 22:return n.flags|=65536,r===qa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),bf(e,r,a)),!1}throw Error(i(435,n.tag))}return bf(e,r,a),Zd(),!1}if(ea)return t=Eo.current,t===null?(r!==ra&&(t=Error(i(423),{cause:r}),ua(Li(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Li(r,n),a=Ec(e.stateNode,r,a),ho(e,a),ud!==4&&(ud=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ra&&(e=Error(i(422),{cause:r}),ua(Li(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Li(o,n),gd===null?gd=[o]:gd.push(o),ud!==4&&(ud=2),t===null)return!0;r=Li(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ec(n.stateNode,r,e),ho(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(Cd===null||!Cd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Dc(a),Oc(a,e,n,r),ho(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ac=Error(i(461)),jc=!1;function Mc(e,t,n,r){t.child=e===null?so(t,null,n,r):oo(t,e.child,n,r)}function Nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ya(t),r=Xo(e,t,n,o,a,i),s=es(),e!==null&&!jc?(ts(e,t,i),sl(e,t,i)):(ea&&s&&Yi(t),t.flags|=1,Mc(e,t,r,i),t.child)}function Pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Fc(e,t,a,r,i)):(e=ji(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!cl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Rr:n,n(o,r)&&e.ref===t.ref)return sl(e,t,i)}return t.flags|=1,e=ki(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Rr(a,r)&&e.ref===t.ref){if(jc=!1,t.pendingProps=r=a,cl(e,i))e.flags&131072&&(jc=!0);else return t.lanes=e.lanes,sl(e,t,i)}}return Uc(e,t,n,r,i)}function Ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ha(t,a===null?null:a.cachePool),a===null?wo():Co(t,a),Ao(t);else return r=t.lanes=536870912,Rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ha(t,null),wo(),jo()):(Ha(t,a.cachePool),Co(t,a),jo(),t.memoizedState=null);return Mc(e,t,i,n),t.child}function Lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rc(e,t,n,r,i){var a=Va();return a=a===null?null:{parent:Ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ha(t,null),wo(),Ao(t),e!==null&&_a(e,t,r,!0),t.childLanes=i,null}function zc(e,t){return t=Qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bc(e,t,n){return oo(t,e.child,null,n),e=zc(t,t.pendingProps),e.flags|=2,Mo(t),t.memoizedState=null,e}function Vc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(ea){if(r.mode===`hidden`)return e=zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lc(null,e);if(ko(t),(e=$i)?(e=pm(e,na),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wi===null?null:{id:Gi,overflow:Ki},retryLane:536870912,hydrationErrors:null},n=Pi(e),n.return=t,t.child=n,Qi=t,$i=null)):e=null,e===null)throw ia(t);return t.lanes=536870912,null}return zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ko(t),a){if(t.flags&256)t.flags&=-257,t=Bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(jc||_a(e,t,n,!1),a=(n&e.childLanes)!==0,jc||a){if(xo.current===null){if(r=td,r!==null&&(s=ht(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Si(e,s),zd(r,e,s),Ac;Zd()}t=Bc(e,t,n)}else e=o.treeContext,$i=_m(s.nextSibling),Qi=t,ea=!0,ta=null,na=!1,e!==null&&Zi(t,e),t=zc(t,r),t.flags|=134221824;return t}return e=ki(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Uc(e,t,n,r,i){return ya(t),n=Xo(e,t,n,r,void 0,i),r=es(),e!==null&&!jc?(ts(e,t,i),sl(e,t,i)):(ea&&r&&Yi(t),t.flags|=1,Mc(e,t,n,i),t.child)}function Wc(e,t,n,r,i,a){return ya(t),t.updateQueue=null,n=Qo(t,r,n,i),Zo(e),r=es(),e!==null&&!jc?(ts(e,t,a),sl(e,t,a)):(ea&&r&&Yi(t),t.flags|=1,Mc(e,t,n,a),t.child)}function Gc(e,t,n,r,i){if(ya(t),t.stateNode===null){var a=Ti,o=n.contextType;typeof o==`object`&&o&&(a=ba(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=_c,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},lo(t),o=n.contextType,a.context=typeof o==`object`&&o?ba(o):Ti,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(gc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&_c.enqueueReplaceState(a,a.state,null),vo(t,r,a,i),_o(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=bc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ti,typeof u==`object`&&u&&(o=ba(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&yc(t,a,r,o),co=!1;var f=t.memoizedState;a.state=f,vo(t,r,a,i),_o(),l=t.memoizedState,s||f!==l||co?(typeof d==`function`&&(gc(t,n,d,r),l=t.memoizedState),(c=co||vc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,uo(e,t),o=t.memoizedProps,u=bc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ti,typeof l==`object`&&l&&(c=ba(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&yc(t,a,r,c),co=!1,f=t.memoizedState,a.state=f,vo(t,r,a,i),_o();var p=t.memoizedState;o!==d||f!==p||co||e!==null&&e.dependencies!==null&&va(e.dependencies)?(typeof s==`function`&&(gc(t,n,s,r),p=t.memoizedState),(u=co||vc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&va(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Hc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=oo(t,e.child,null,i),t.child=oo(t,null,n,i)):Mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=sl(e,t,i),e}function Kc(e,t,n,r){return ca(),t.flags|=256,Mc(e,t,n,r),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Ua()}}function Yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=md),e}function Xc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(No.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(ea){if(i?Oo(t):jo(),(e=$i)?(e=pm(e,na),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Wi===null?null:{id:Gi,overflow:Ki},retryLane:536870912,hydrationErrors:null},n=Pi(e),n.return=t,t.child=n,Qi=t,$i=null)):e=null,e===null)throw ia(t);return t.lanes=hm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(jo(),i=t.mode,a=Qc({mode:`hidden`,children:a},i),r=Mi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Jc(n),r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(null,r)):(Oo(t),Zc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return el(e,t,a,o,r,c,s,n)}return i?(jo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=ki(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Mi(i,a,n,null),i.flags|=2):i=ki(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Lc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Jc(n):(a=i.cachePool,a===null?a=Ua():(s=Ea._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(e.child,r)):(Oo(t),n=e.child,e=n.sibling,n=ki(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Zc(e,t){return t=Qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Qc(e,t){return e=Di(22,e,null,t),e.lanes=0,e}function $c(e,t,n){return oo(t,e.child,null,n),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function el(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Oo(t),t.flags&=-257,$c(e,t,c)):t.memoizedState===null?(jo(),o=a.fallback,s=t.mode,a=Qc({mode:`visible`,children:a.children},s),o=Mi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,oo(t,e.child,null,c),a=t.child,a.memoizedState=Jc(c),a.childLanes=Yc(e,r,c),t.memoizedState=qc,Lc(null,a)):(jo(),t.child=e.child,t.flags|=128,null);if(Oo(t),hm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ua({value:a,source:null,stack:null})),$c(e,t,c)}if(jc||_a(e,t,c,!1),r=(c&e.childLanes)!==0,jc||r){if(xo.current!==null)return $c(e,t,c);if(r=td,r!==null&&(a=ht(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Si(e,a),zd(r,e,a),Ac;return mm(o)||Zd(),$c(e,t,c)}return mm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,$i=_m(o.nextSibling),Qi=t,ea=!0,ta=null,na=!1,e!==null&&Zi(t,e),t=Zc(t,a.children),t.flags|=134221824,t)}function tl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ha(e.return,t,n)}function nl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Io(n)===null&&(t=e),e=e.sibling}return t}function rl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function il(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function al(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=No.current;if(t.flags&128)return Po(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Po(t,o),i===`backwards`&&e!==null?(il(e),Mc(e,t,r,n),il(e)):Mc(e,t,r,n),r=ea?Vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tl(e,n,t);else if(e.tag===19)tl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,il(t)),rl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Io(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rl(t,!0,n,null,a,r);break;case`together`:rl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rl(t,!1,i,n,a,r)}return t.child}function ol(e,t,n){var r=t.pendingProps;return G(t,t.type,r.value),Mc(e,t,r.children,n),t.child}function sl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),dd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(_a(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ki(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ki(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&va(e)))}function ll(e,t,n){switch(t.tag){case 3:Ce(t,t.stateNode.containerInfo),G(t,Ea,e.memoizedState.cache),ca();break;case 27:case 5:Te(t);break;case 4:Ce(t,t.stateNode.containerInfo);break;case 10:G(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ko(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Oo(t),t.flags|=128,null;r=_a(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Xc(e,t,n):(Oo(t),e=sl(e,t,n),e===null?null:e.sibling)}Oo(t);break;case 19:if(t.flags&128)return al(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(_a(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return al(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Po(t,No.current),r)break;return null;case 22:return t.lanes=0,Ic(e,t,n,t.pendingProps);case 24:G(t,Ea,e.memoizedState.cache)}return sl(e,t,n)}function ul(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)jc=!0;else{if(!cl(e,n)&&!(t.flags&128))return jc=!1,ll(e,t,n);jc=!!(e.flags&131072)}}else jc=!1,ea&&t.flags&1048576&&Ji(t,Vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Xa(t.elementType),t.type=e,typeof e==`function`)Oi(e)?(r=bc(e,r),t.tag=1,t=Gc(null,t,e,r,n)):(t.tag=0,t=Uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===I){t.tag=11,t=Nc(null,t,e,r,n);break a}if(a===L){t.tag=14,t=Pc(null,t,e,r,n);break a}if(a===F){t.tag=10,t.type=e,t=ol(null,t,n);break a}}throw t=ue(e)||e,Error(i(306,t,``))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=bc(r,t.pendingProps),Gc(e,t,r,a,n);case 3:a:{if(Ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,uo(e,t),vo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,G(t,Ea,r),r!==o.cache&&ga(t,[Ea],n,!0),_o(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Kc(e,t,r,n);break a}if(r!==a){a=Li(Error(i(424)),t),ua(a),t=Kc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for($i=_m(e.firstChild),Qi=t,ea=!0,ta=null,na=!0,n=so(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ca(),r===a){t=sl(e,t,n);break a}Mc(e,t,r,n)}t=t.child}return t;case 26:return Hc(e,t),e===null?(n=Bm(t.type,null,t.pendingProps,null))?t.memoizedState=n:ea||(t.stateNode=bp(t.type,t.pendingProps,xe.current,t)):t.memoizedState=Bm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Te(t),e===null&&ea&&(r=t.stateNode=Cm(t.type,t.pendingProps,xe.current),Qi=t,na=!0,a=$i,Ap(t.type)?(vm=a,$i=_m(r.firstChild)):$i=a),Mc(e,t,t.pendingProps.children,n),Hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ea&&((a=r=$i)&&(r=dm(r,t.type,t.pendingProps,na),r===null?a=!1:(t.stateNode=r,Qi=t,$i=_m(r.firstChild),na=!1,a=!0)),a||ia(t)),Te(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,xp(a,o)?r=null:s!==null&&xp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Xo(e,t,$o,null,null,n),mh._currentValue=a),Hc(e,t),Mc(e,t,r,n),t.child;case 6:return e===null&&ea&&((e=n=$i)&&(n=fm(n,t.pendingProps,na),n===null?e=!1:(t.stateNode=n,Qi=t,$i=null,e=!0)),e||ia(t)),null;case 13:return Xc(e,t,n);case 4:return Ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):Mc(e,t,r,n),t.child;case 11:return Nc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Hc(e,t),Mc(e,t,r,n),t.child;case 8:return Mc(e,t,t.pendingProps.children,n),t.child;case 12:return Mc(e,t,t.pendingProps.children,n),t.child;case 10:return ol(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ya(t),a=ba(a),r=r(a),t.flags|=1,Mc(e,t,r,n),t.child;case 14:return Pc(e,t,t.type,t.pendingProps,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return Vc(e,t,n);case 22:return Ic(e,t,n,t.pendingProps);case 24:return ya(t),r=ba(Ea),e===null?(a=Va(),a===null&&(a=td,o=Da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},lo(t),G(t,Ea,a)):((e.lanes&n)!==0&&(uo(e,t),vo(t,null,null,n),_o()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,G(t,Ea,r),r!==a.cache&&ga(t,[Ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),G(t,Ea,r))),Mc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:ea&&Yi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Hc(e,t),Mc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function dl(e){e.flags|=4}function fl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?th(t,r):th(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Jd())e.flags|=8192;else throw Za=qa,Ga}}else e.flags&=-16777217}function pl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!nh(t)){if(Jd())e.flags|=8192;else throw Za=qa,Ga}}function ml(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:lt(),e.lanes|=t,hd|=t)}function hl(e,t){if(!ea)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function gl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function _l(e,t,n){var r=t.pendingProps;switch(Xi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gl(t),null;case 1:return gl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ma(Ea),we(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(sa(t)?dl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,la())),gl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(dl(t),o===null?(gl(t),fl(t,a,null,r,n)):(gl(t),pl(t,o))):o?o===e.memoizedState?(gl(t),t.flags&=-16777217):(dl(t),gl(t),pl(t,o)):(e=e.memoizedProps,e!==r&&dl(t),gl(t),fl(t,a,e,r,n)),null;case 27:if(Ee(t),n=xe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}e=ye.current,sa(t)?aa(t,e):(e=Cm(a,r,n),t.stateNode=e,dl(t))}return gl(t),t.subtreeFlags&=-33554433,null;case 5:if(Ee(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}if(o=ye.current,sa(t))aa(t,o);else{var s=_p(xe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[xt]=t,o[St]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(up(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&dl(t)}}return gl(t),t.subtreeFlags&=-33554433,fl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,sa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Qi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||sp(e.nodeValue,n)),e||ia(t,!0)}else e=_p(e).createTextNode(r),e[xt]=t,t.stateNode=e}return gl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=sa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[xt]=t}else ca(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),e=!1}else n=la(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Mo(t),t):(Mo(t),null);if(t.flags&128)throw Error(i(558))}return gl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=sa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[xt]=t}else ca(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),a=!1}else a=la(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Mo(t),t):(Mo(t),null)}return Mo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ml(t,t.updateQueue),gl(t),null);case 4:return we(),e===null&&Zf(t.stateNode.containerInfo),t.flags|=67108864,gl(t),null;case 10:return ma(t.type),gl(t),null;case 19:if(Fo(t),r=t.memoizedState,r===null)return gl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)hl(r,!1);else{if(ud!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Io(e),o!==null){for(t.flags|=128,hl(r,!1),e=o.updateQueue,t.updateQueue=e,ml(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ai(n,e),n=n.sibling;return Po(t,No.current&1|2),ea&&qi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>xd&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Io(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ml(t,e),hl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!ea)return gl(t),null}else 2*ze()-r.renderingStartTime>xd&&n!==536870912&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,o=No.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||ea?Po(t,o):(n=o,ve(Eo,t),ve(No,n),Do===null&&(Do=t)),ea&&qi(t,r.treeForkCount),e}return gl(t),null;case 22:case 23:return Mo(t),To(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(gl(t),t.subtreeFlags&6&&(t.flags|=8192)):gl(t),n=t.updateQueue,n!==null&&ml(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&_e(Ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ma(Ea),gl(t),null;case 25:return null;case 30:return t.flags|=33554432,gl(t),null}throw Error(i(156,t.tag))}function vl(e,t){switch(Xi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ma(Ea),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Mo(t),t.alternate===null)throw Error(i(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Mo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return we(),null;case 10:return ma(t.type),null;case 22:case 23:return Mo(t),To(),e!==null&&_e(Ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ma(Ea),null;case 25:return null;default:return null}}function yl(e,t){switch(Xi(t),t.tag){case 3:ma(Ea),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&Mo(t);break;case 13:Mo(t);break;case 19:Fo(t);break;case 10:ma(t.type);break;case 22:case 23:Mo(t),To(),e!==null&&_e(Ba);break;case 24:ma(Ea)}}function bl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){yf(t,t.return,e)}}function xl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){yf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){yf(t,t.return,e)}}function Sl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{bo(t,n)}catch(t){yf(e,e.return,t)}}}function Cl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){yf(e,t,n)}}function wl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=pi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Hp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Up(e);m(e.child,!1,om,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){yf(e,t,n)}}function Tl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){yf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){yf(e,t,n)}else n.current=null}}function El(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)cm(e.stateNode,t[n])}function Dl(e){for(var t=e.return;t!==null&&(Al(t)&&cm(e.stateNode,t.stateNode),!kl(t));)t=t.return}function Ol(e){for(var t=e.return;t!==null&&(Al(t)&&lm(e.stateNode,t.stateNode),!kl(t));)t=t.return}function kl(e){return e.tag===5||e.tag===3||e.tag===27}function Al(e){return e&&e.tag===7&&e.stateNode!==null}function jl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){yf(e,e.return,t)}}function Ml(e,t,n){try{var r=e.stateNode;fp(r,e.type,n,t),r[St]=t}catch(t){yf(e,e.return,t)}}function Nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ap(e.type)||e.tag===4}function Pl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ap(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gn)),El(e,r),Gt=!0;else if(i!==4&&(i===27&&(El(e,r),r=null,Ap(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Fl(e,t,n,r),e=e.sibling;e!==null;)Fl(e,t,n,r),e=e.sibling}function Il(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),El(e,r),Gt=!0;else if(i!==4&&(i===27&&(El(e,r),r=null,Ap(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Il(e,t,n,r),e=e.sibling;e!==null;)Il(e,t,n,r),e=e.sibling}function Ll(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);up(t,r,n),t[xt]=e,t[St]=n}catch(t){yf(e,e.return,t)}}var Rl=!1,zl=null;function Bl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Rl=!0)}var Vl=null;function Hl(){var e=Vl;return Vl=null,e}var Ul=0;function Wl(e,t,n,r,i){return Ul=0,Gl(e.child,t,n,r,i)}function Gl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Ip(o);r.push(s),s.view&&(a=!0)}else a||Ip(o).view&&(a=!0);Rl=!0,Np(o,Ul===0?t:t+`_`+Ul,n),Ul++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Gl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Kl(e,t){for(;e!==null;)e.tag===5?Pp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Kl(e.child,t)),e=e.sibling}function ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(ql(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=hi(t.default,t.share),t!==`none`&&(Wl(e,n,t,null,!1)||Kl(e.child,!1))}e=e.sibling}}function Jl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=pi(r,n),a=hi(r.default,n.paired?r.share:r.enter);a===`none`?ql(e):Wl(e,i,a,null,!1)?(ql(e),n.paired||t||Rd(e,r.onEnter)):Kl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e,t),e=e.sibling;else ql(e)}function Yl(e){if(zl!==null&&zl.size!==0){var t=zl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=hi(n.default,n.share);if(a!==`none`&&(Wl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Rd(e,n.onShare)):Kl(e.child,!1)),t.delete(r),t.size===0)break}}}Yl(e)}e=e.sibling}}}function Xl(e){if(e.tag===30){var t=e.memoizedProps,n=pi(t,e.stateNode),r=zl===null?void 0:zl.get(n),i=hi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Wl(e,n,i,null,!1)?r===void 0?Rd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,zl.delete(n),Rd(e,t.onShare)):Kl(e.child,!1)),zl!==null&&Yl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e),e=e.sibling;else zl!==null&&Yl(e)}function Zl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=pi(t,e.stateNode);t=hi(t.default,t.update),e.flags&=-5,t!==`none`&&Wl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Zl(e);e=e.sibling}}function Ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Kl(e.child,!1))}Ql(e)}e=e.sibling}}function $l(e){if(e.tag===30)e.stateNode.paired=null,Kl(e.child,!1),Ql(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e),e=e.sibling;else Ql(e)}function eu(e){for(e=e.child;e!==null;)e.tag===30?Kl(e.child,!1):e.subtreeFlags&33554432&&eu(e),e=e.sibling}function tu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Ul<a.length){var l=a[Ul],u=Ip(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Np(c,Ul===0?n:n+`_`+Ul,i),s&&e.flags&4||(Vl===null&&(Vl=[]),Vl.push(c,Ul===0?r:r+`_`+Ul,t.memoizedProps)),Ul++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:tu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function nu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=pi(n,r),a=hi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Lp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Ul=0,i=tu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Rd(e,n.onUpdate))}else e.subtreeFlags&33554432&&nu(e,t);e=e.sibling}}var ru=!1,iu=!1,au=!1,ou=!1,su=typeof WeakSet==`function`?WeakSet:Set,cu=null,lu=!1,uu=!1,du=!1,fu=!1;function pu(e,t,n){if(e=e.containerInfo,hp=Ch,e=Ur(e),Wr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(gp={focusedElem:e,selectionRange:r},Ch=!1,n=(n&335544064)===n,cu=t,t=n?9270:1024;cu!==null;){if(e=cu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Xl(r[a]);if(e.alternate===null&&e.flags&2)n&&Bl(e),mu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Xl(r),mu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Bl(e),mu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,cu=r):(n&&Zl(e),mu(n))}}zl=null}function mu(e){for(;cu!==null;){var t=cu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=bc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){yf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)um(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:um(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=pi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=hi(a.default,a.update),a!==`none`&&Wl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,cu=r;break}cu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fu(e,n),r&4&&bl(5,n);break;case 1:if(Fu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){yf(n,n.return,e)}else{var i=bc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){yf(n,n.return,e)}}}r&64&&Sl(n),r&512&&wl(n,n.return);break;case 3:if(Fu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{bo(e,t)}catch(e){yf(n,n.return,e)}}break;case 27:t===null&&r&4&&Ll(n);case 26:case 5:Fu(e,n),t===null&&r&4&&jl(n),r&512&&wl(n,n.return);break;case 12:Fu(e,n);break;case 31:Fu(e,n),r&4&&wu(e,n);break;case 13:Fu(e,n),r&4&&Tu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Cf.bind(null,n),gm(e,n))));break;case 22:if(r=n.memoizedState!==null||ru,!r){var a=t!==null&&t.memoizedState!==null||iu;t=ru,i=iu,ru=r,(iu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Lu(e,n,r)):Fu(e,n),ru=t,iu=i}break;case 30:Fu(e,n),r&512&&wl(n,n.return);break;case 7:r&512&&wl(n,n.return);default:Fu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){yf(e,e.return,t)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Gt=!0}catch(t){yf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Mp(s,!0):Mp(e.stateNode,!1)}catch(t){yf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&At(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var bu=null,xu=!1;function Su(e,t,n){for(n=n.child;n!==null;)Cu(e,t,n),n=n.sibling}function Cu(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:iu||Tl(n,t),Su(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!iu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:iu||Tl(n,t),Ol(n);var r=bu,i=xu;Ap(n.type)&&(bu=n.stateNode,xu=!1),Su(e,t,n),wm(n.stateNode,n.type,n.memoizedProps),bu=r,xu=i;break;case 5:iu||Tl(n,t),Ol(n);case 6:if(n.tag===6&&Ol(n),r=bu,i=xu,bu=null,Su(e,t,n),bu=r,xu=i,bu!==null){if(xu)try{(bu.nodeType===9?bu.body:bu.nodeName===`HTML`?bu.ownerDocument.body:bu).removeChild(n.stateNode),Gt=!0}catch(e){yf(n,t,e)}else try{bu.removeChild(n.stateNode),Gt=!0}catch(e){yf(n,t,e)}}break;case 18:bu!==null&&(xu?(e=bu,jp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Yh(e)):jp(bu,n.stateNode));break;case 4:r=bu,i=xu,bu=n.stateNode.containerInfo,xu=!0,Su(e,t,n),bu=r,xu=i;break;case 0:case 11:case 14:case 15:xl(2,n,t),iu||xl(4,n,t),Su(e,t,n);break;case 1:iu||(Tl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Cl(n,t,r)),Su(e,t,n);break;case 21:Su(e,t,n);break;case 22:iu=(r=iu)||n.memoizedState!==null,Su(e,t,n),iu=r;break;case 30:Tl(n,t),Su(e,t,n);break;case 7:iu||Tl(n,t),Su(e,t,n);break;default:Su(e,t,n)}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Yh(e)}catch(e){yf(t,t.return,e)}}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yh(e)}catch(e){yf(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new su),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new su),t;default:throw Error(i(435,e.tag))}}function Du(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=wf.bind(null,e,t);t.then(r,r)}})}function Ou(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Ap(l.type)){bu=l.stateNode,xu=!1;break a}break;case 5:bu=l.stateNode,xu=!1;break a;case 3:case 4:bu=l.stateNode.containerInfo,xu=!0;break a}l=l.return}if(bu===null)throw Error(i(160));Cu(s,c,o),bu=null,xu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Au(t,e,n),t=t.sibling}var ku=null;function Au(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Ou(t,e,n),ju(e),a&4&&(xl(3,e,e.return),bl(3,e),xl(5,e,e.return));break;case 1:Ou(t,e,n),ju(e),a&512&&(iu||r===null||Tl(r,r.return)),a&64&&ru&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=ku,Ou(t,e,n),ju(e),a&512&&(iu||r===null||Tl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(ru)e.stateNode=bp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ot]||r[xt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),up(r,t,n),r[xt]=e,Ft(r),t=r;break a;case`link`:if(o=Qm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),up(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Qm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),up(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[xt]=e,Ft(r),t=r}e.stateNode=t}}else ru||$m(o,e.type,e.stateNode)}else e.stateNode=qm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ml(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||iu||t.parentNode.removeChild(t)):a.count--,n===null?ru||$m(o,e.type,e.stateNode):qm(o,n,e.memoizedProps))}break;case 27:Ou(t,e,n),ju(e),a&512&&(iu||r===null||Tl(r,r.return)),r!==null&&a&4&&Ml(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=au,au=!1,Ou(t,e,n),au=o,ju(e),a&512&&(iu||r===null||Tl(r,r.return)),e.flags&32){t=e.stateNode;try{cn(t,``),Gt=!0}catch(t){yf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ml(e,t,r===null?t:r.memoizedProps)),a&1024&&(ou=!0);break;case 6:if(Ou(t,e,n),ju(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Gt=!0}catch(t){yf(e,e.return,t)}}break;case 3:if(Gt=!1,Zm=null,o=ku,ku=Om(t.containerInfo),Ou(t,e,n),ku=o,ju(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Yh(t.containerInfo)}catch(t){yf(e,e.return,t)}ou&&(ou=!1,Mu(e)),Gt=!1;break;case 4:a=au,au=ru,r=Kt(),o=ku,ku=Om(e.stateNode.containerInfo),Ou(t,e,n),ju(e),ku=o,Gt&&uu&&(du=!0),Gt=r,au=a;break;case 12:Ou(t,e,n),ju(e);break;case 31:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:Ou(t,e,n),ju(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(yd=ze()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=ru,l=iu,u=au;ru=c||o,au=u||o,iu=l||s,Ou(t,e,n),iu=l,au=u,ru=c,ju(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||ru||iu||(t=s||iu,n=ru,r=iu,ru=o||ru,iu=t,Iu(e,2),ru=n,iu=r),!o&&au||gu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:a&512&&(iu||r===null||Tl(r,r.return)),a=Kt(),o=uu,s=(n&335544064)===n,c=e.memoizedProps,uu=s&&hi(c.default,c.update)!==`none`,Ou(t,e,n),ju(e),s&&r!==null&&Gt&&(e.flags|=4),uu=o,Gt=a;break;case 21:break;case 7:a&512&&(iu||r===null||Tl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ou(t,e,n),ju(e)}}function ju(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Nl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Al(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(kl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Il(e,Pl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(cn(l,``),n.flags&=-33),Il(e,Pl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Fl(e,Pl(e),u,s);break;default:throw Error(i(161))}}catch(t){yf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ch=!0,t.reset(),Ch=!1),e=e.sibling}}function Nu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling;else nu(t,!1)}function Pu(e,t){var n=e.alternate;if(n===null)Jl(e,!1);else switch(e.tag){case 3:if(fu=lu=!1,Hl(),Nu(t,e),!lu&&!du){if(e=Vl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Pp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),fu=!0}Vl=null;break;case 5:Nu(t,e);break;case 4:r=lu,lu=!1,Nu(t,e),lu&&(du=!0),lu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Nu(t,e):Jl(e,!1));break;case 30:r=lu,i=Hl(),lu=!1,Nu(t,e),lu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=pi(a,o),o=pi(n.memoizedProps,o);var s=hi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Ul=0,t=tu(e,n,t,o,s,a,!0),Ul!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Rd(e,e.memoizedProps.onUpdate),Vl=i):i!==null&&(i.push.apply(i,Vl),Vl=i),lu=e.flags&32?!0:r;break;default:Nu(t,e)}}function Fu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Iu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:xl(4,n,n.return),Iu(n,r);break;case 1:Tl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Cl(n,n.return,i),Iu(n,r);break;case 27:r&2&&wm(n.stateNode,n.type,n.memoizedProps);case 5:Tl(n,n.return),n.tag!==5&&n.tag!==27||Ol(n),Iu(n,r);break;case 6:Ol(n);break;case 26:Tl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||iu||i.parentNode.removeChild(i),Iu(n,r);break;case 22:n.memoizedState===null&&Iu(n,r);break;case 30:Tl(n,n.return),Iu(n,r);break;case 7:Tl(n,n.return);default:Iu(n,r)}e=e.sibling}}function Lu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Lu(i,a,n),bl(4,a);break;case 1:if(Lu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){yf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)yo(l[i],c)}catch(e){yf(r,r.return,e)}}s&&o&64&&Sl(a),wl(a,a.return);break;case 27:n&2&&Ll(a);case 5:a.tag!==5&&a.tag!==27||Dl(a),Lu(i,a,n),s&&r===null&&o&4&&jl(a),wl(a,a.return);break;case 6:Dl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||ru||$m(Om(c.ownerDocument),a.type,c),Lu(i,a,n),s&&r===null&&o&4&&jl(a),wl(a,a.return);break;case 12:Lu(i,a,n);break;case 31:Lu(i,a,n),s&&o&4&&wu(i,a);break;case 13:Lu(i,a,n),s&&o&4&&Tu(i,a);break;case 22:a.memoizedState===null&&Lu(i,a,n),wl(a,a.return);break;case 30:Lu(i,a,n),wl(a,a.return);break;case 7:wl(a,a.return);default:Lu(i,a,n)}t=t.sibling}}function Ru(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Oa(n))}function zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Oa(e))}function Bu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Vu(e,t,n,r),t=t.sibling;else i&&eu(t)}function Vu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&$l(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Bu(e,t,n,r),a&2048&&bl(9,t);break;case 1:Bu(e,t,n,r);break;case 3:Bu(e,t,n,r),i&&fu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Oa(a)));break;case 12:if(a&2048){Bu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){yf(t,t.return,e)}}else Bu(e,t,n,r);break;case 31:Bu(e,t,n,r);break;case 13:Bu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&$l(t),o._visibility&2?Bu(e,t,n,r):(o._visibility|=2,Hu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&$l(s),o._visibility&2?Bu(e,t,n,r):Uu(e,t)),a&2048&&Ru(s,t);break;case 24:Bu(e,t,n,r),a&2048&&zu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Kl(a.child,!0),Kl(t.child,!0))),Bu(e,t,n,r);break;default:Bu(e,t,n,r)}}function Hu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Hu(a,o,s,c,i),bl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Hu(a,o,s,c,i)):u._visibility&2?Hu(a,o,s,c,i):Uu(a,o),i&&l&2048&&Ru(o.alternate,o);break;case 24:Hu(a,o,s,c,i),i&&l&2048&&zu(o.alternate,o);break;default:Hu(a,o,s,c,i)}t=t.sibling}}function Uu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Uu(n,r),i&2048&&Ru(r.alternate,r);break;case 24:Uu(n,r),i&2048&&zu(r.alternate,r);break;default:Uu(n,r)}t=t.sibling}}var Wu=8192;function Gu(e,t,n){if(e.subtreeFlags&Wu)for(e=e.child;e!==null;)Ku(e,t,n),e=e.sibling}function Ku(e,t,n){switch(e.tag){case 26:Gu(e,t,n),e.flags&Wu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&ih(n,e)):ah(n,ku,e.memoizedState,e.memoizedProps));break;case 5:Gu(e,t,n),e.flags&Wu&&(e=e.stateNode,(t&335544128)===t&&ih(n,e));break;case 3:case 4:var r=ku;ku=Om(e.stateNode.containerInfo),Gu(e,t,n),ku=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Wu,Wu=16777216,Gu(e,t,n),Wu=r):Gu(e,t,n));break;case 30:if((e.flags&Wu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,zl===null&&(zl=new Map),zl.set(r,i)}Gu(e,t,n);break;default:Gu(e,t,n)}}function qu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yu(e),e=e.sibling}function Yu(e){switch(e.tag){case 0:case 11:case 15:Ju(e),e.flags&2048&&xl(9,e,e.return);break;case 3:Ju(e);break;case 12:Ju(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xu(e)):Ju(e);break;default:Ju(e)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xl(8,t,t.return),Xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Xu(t));break;default:Xu(t)}e=e.sibling}}function Zu(e,t){for(;cu!==null;){var n=cu;switch(n.tag){case 0:case 11:case 15:xl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cu=r;else a:for(n=e;cu!==null;){r=cu;var i=r.sibling,a=r.return;if(yu(r),r===n){cu=null;break a}if(i!==null){i.return=a,cu=i;break a}cu=a}}}var Qu={getCacheForType:function(e){var t=ba(Ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ba(Ea).controller.signal}},$u=typeof WeakMap==`function`?WeakMap:Map,ed=0,td=null,nd=null,rd=0,id=0,ad=null,od=!1,sd=!1,cd=!1,ld=0,ud=0,dd=0,fd=0,pd=0,md=0,hd=0,gd=null,_d=null,vd=!1,yd=0,bd=0,xd=1/0,Sd=null,Cd=null,wd=0,Td=null,Ed=null,Dd=0,Od=0,kd=null,Ad=null,jd=null,Md=null,Nd=null,Pd=0,Fd=null;function Id(){return ed&2&&rd!==0?rd&-rd:z.T===null?vt():Bf()}function Ld(){if(md===0){if(!(rd&536870912)||ea){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),md=e}else md=536870912}return e=Eo.current,e!==null&&(e.flags|=32),md}function Rd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Hp(pi(e.memoizedProps,n))),Md===null&&(Md=[]),Md.push(t.bind(null,r))}}function zd(e,t,n){(e===td&&(id===2||id===9)||e.cancelPendingCommit!==null)&&(Kd(e,0),Ud(e,rd,md,!1)),dt(e,n),(!(ed&2)||e!==td)&&(e===td&&(!(ed&2)&&(fd|=n),ud===4&&Ud(e,rd,md,!1)),Mf(e))}function Bd(e,t,n){if(ed&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ot(e,t),a=r?ef(e,t):Qd(e,t,!0),o=r;do{if(a===0){sd&&!r&&Ud(e,t,0,!1);break}if(n=e.current.alternate,o&&!Hd(n)){a=Qd(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=gd;var l=c.current.memoizedState.isDehydrated;if(l&&(Kd(c,s).flags|=256),s=Qd(c,s,!1),s!==2&&s!==6){if(cd&&!l){c.errorRecoveryDisabledLanes|=o,fd|=o,a=4;break a}o=_d,_d=a,o!==null&&(_d===null?_d=o:_d.push.apply(_d,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Kd(e,0),Ud(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ud(r,t,md,!od);break a;case 2:_d=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=yd+300-ze(),10<a)){if(Ud(r,t,md,!od),at(r,0,!0)!==0)break a;Dd=t,r.timeoutHandle=wp(Vd.bind(null,r,n,_d,Sd,vd,t,md,fd,hd,od,o,`Throttled`,-0,0),a);break a}Vd(r,n,_d,Sd,vd,t,md,fd,hd,od,o,null,-0,0)}break}while(1);Mf(e)}function Vd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gn},zl=null,Ku(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=lh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?yd-ze():(a&4194048)===a?bd-ze():0,m=sh(d,m),m!==null)){Dd=a,e.cancelPendingCommit=m(cf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ud(e,a,o,!l);return}cf(e,t,a,n,r,i,o,s,c,l,u,d)}function Hd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Lr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ud(e,t,n,r){t=st(e,t),t&=~pd,t&=~fd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&pt(e,n,t)}function Wd(){return ed&6?!0:(Nf(0,!1),!1)}function Gd(){if(nd!==null){if(id===0)var e=nd.return;else e=nd,pa=fa=null,ns(e),eo=null,to=0,e=nd;for(;e!==null;)yl(e.alternate,e),e=e.return;nd=null}}function Kd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Tp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Dd=0,Gd(),td=e,nd=n=ki(e.current,null),rd=t,id=0,ad=null,od=!1,sd=ot(e,t),cd=!1,hd=md=pd=fd=dd=ud=0,_d=gd=null,vd=!1,ld=st(e,t),bi(),n}function qd(e,t){Ro=null,z.H=fc,t===Wa||t===Ka?(t=Qa(),id=3):t===Ga?(t=Qa(),id=4):id=t===Ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ad=t,nd===null&&(ud=1,wc(e,Li(t,e.current)))}function Jd(){var e=Eo.current;return e===null?!0:(rd&4194048)===rd?Do===null:(rd&62914560)===rd||rd&536870912?e===Do:!1}function Yd(){var e=z.H;return z.H=fc,e===null?fc:e}function Xd(){var e=z.A;return z.A=Qu,e}function Zd(){ud=4,od||(rd&4194048)!==rd&&Eo.current!==null||(sd=!0),!(dd&134217727)&&!(fd&134217727)||td===null||Ud(td,rd,md,!1)}function Qd(e,t,n){var r=ed;ed|=2;var i=Yd(),a=Xd();(td!==e||rd!==t)&&(Sd=null,Kd(e,t)),t=!1;var o=ud;a:do try{if(id!==0&&nd!==null){var s=nd,c=ad;switch(id){case 8:Gd(),o=6;break a;case 3:case 2:case 9:case 6:Eo.current===null&&(t=!0);var l=id;if(id=0,ad=null,af(e,s,c,l),n&&sd){o=0;break a}break;default:l=id,id=0,ad=null,af(e,s,c,l)}}$d(),o=ud;break}catch(t){qd(e,t)}while(1);return t&&e.shellSuspendCounter++,pa=fa=null,ed=r,z.H=i,z.A=a,nd===null&&(td=null,rd=0,bi()),o}function $d(){for(;nd!==null;)nf(nd)}function ef(e,t){var n=ed;ed|=2;var r=Yd(),a=Xd();td!==e||rd!==t?(Sd=null,xd=ze()+500,Kd(e,t)):sd=ot(e,t);a:do try{if(id!==0&&nd!==null){t=nd;var o=ad;b:switch(id){case 1:id=0,ad=null,af(e,t,o,1);break;case 2:case 9:if(Ja(o)){id=0,ad=null,rf(t);break}t=function(){id!==2&&id!==9||td!==e||(id=7),Mf(e)},o.then(t,t);break a;case 3:id=7;break a;case 4:id=5;break a;case 7:Ja(o)?(id=0,ad=null,rf(t)):(id=0,ad=null,af(e,t,o,7));break;case 5:var s=null;switch(nd.tag){case 26:s=nd.memoizedState;case 5:case 27:var c=nd;if(s?nh(s):c.stateNode.complete){id=0,ad=null;var l=c.sibling;if(l!==null)nd=l;else{var u=c.return;u===null?nd=null:(nd=u,of(u))}break b}}id=0,ad=null,af(e,t,o,5);break;case 6:id=0,ad=null,af(e,t,o,6);break;case 8:Gd(),ud=6;break a;default:throw Error(i(462))}}tf();break}catch(t){qd(e,t)}while(1);return pa=fa=null,z.H=r,z.A=a,ed=n,nd===null?(td=null,rd=0,bi(),ud):0}function tf(){for(;nd!==null&&!Le();)nf(nd)}function nf(e){var t=ul(e.alternate,e,ld);e.memoizedProps=e.pendingProps,t===null?of(e):nd=t}function rf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wc(n,t,t.pendingProps,t.type,void 0,rd);break;case 11:t=Wc(n,t,t.pendingProps,t.type.render,t.ref,rd);break;case 5:ns(t);var r=t;r===Qi&&(ea?(oa(r),r.tag===5&&r.stateNode!=null&&($i=r.stateNode)):(oa(r),ea=!0));default:yl(n,t),t=nd=Ai(t,ld),t=ul(n,t,ld)}e.memoizedProps=e.pendingProps,t===null?of(e):nd=t}function af(e,t,n,r){pa=fa=null,ns(t),eo=null,to=0;var i=t.return;try{if(kc(e,i,t,n,rd)){ud=1,wc(e,Li(n,e.current)),nd=null;return}}catch(t){if(i!==null)throw nd=i,t;ud=1,wc(e,Li(n,e.current)),nd=null;return}t.flags&32768?(ea||r===1?e=!0:sd||rd&536870912?e=!1:(od=e=!0,(r===2||r===9||r===3||r===6)&&(r=Eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),sf(t,e)):of(t)}function of(e){var t=e;do{if(t.flags&32768){sf(t,od);return}e=t.return;var n=_l(t.alternate,t,ld);if(n!==null){nd=n;return}if(t=t.sibling,t!==null){nd=t;return}nd=t=e}while(t!==null);ud===0&&(ud=5)}function sf(e,t){do{var n=vl(e.alternate,e);if(n!==null){n.flags&=32767,nd=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){nd=e;return}nd=e=n}while(e!==null);ud=6,nd=null}function cf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do gf();while(wd!==0);if(ed&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===td&&(nd=td=null,rd=0),Ed=t,Td=e,Dd=n,kd=a,Ad=r,lf(e,t,n,s,c,l,f)}}function lf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Od=s,s|=yi,ft(e,n,s,r,i,a),Md=null,(n&335544064)===n?(Nd=ja(e),r=10262):(Nd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Tf(Ue,function(){return _f(),null})):(e.callbackNode=null,e.callbackPriority=0),Rl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=z.T,z.T=null,i=fe.p,fe.p=2,a=ed,ed|=4;try{pu(e,t,n)}finally{ed=a,fe.p=i,z.T=r}}wd=1,Rl?jd=Bp(o,e.containerInfo,Nd,ff,pf,df,mf,_f,uf,null,null):(ff(),pf(),mf())}function uf(e){if(wd!==0){var t=Td.onRecoverableError;t(e,{componentStack:null})}}function df(){wd===3&&(wd=0,Pu(Ed,Td),wd=4)}function ff(){if(wd===1){wd=0;var e=Td,t=Ed,n=Dd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=z.T,z.T=null;var i=fe.p;fe.p=2;var a=ed;ed|=4;try{uu=du=!1,Au(t,e,n),n=gp;var o=Ur(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Hr(s.ownerDocument.documentElement,s)){if(c!==null&&Wr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Vr(s,h),v=Vr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Ch=!!hp,gp=hp=null}finally{ed=a,fe.p=i,z.T=r}}e.current=t,wd=2}}function pf(){if(wd===2){wd=0;var e=Td,t=Ed,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=z.T,z.T=null;var r=fe.p;fe.p=2;var i=ed;ed|=4;try{hu(e,t.alternate,t)}finally{ed=i,fe.p=r,z.T=n}}wd=3}}function mf(){if(wd===4||wd===3){wd=0;var e=jd;jd=null,Re();var t=Td,n=Ed,r=Dd,i=Ad,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?wd=5:(wd=0,Ed=Td=null,hf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Cd=null),_t(r),n=n.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=z.T,a=fe.p,fe.p=2,z.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{z.T=n,fe.p=a}}if(i=Md,o=Nd,Nd=null,i!==null&&(Md=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Dd&3&&gf(),Mf(t),a=t.pendingLanes,r&261930&&a&42?t===Fd?Pd++:(Pd=0,Fd=t):(Pd=0,Fd=null),Nf(0,!1)}}function hf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Oa(t)))}function gf(){return jd!==null&&(jd.skipTransition(),jd=null),ff(),pf(),mf(),_f()}function _f(){if(wd!==5)return!1;var e=Td,t=Od;Od=0;var n=_t(Dd),r=z.T,a=fe.p;try{fe.p=32>n?32:n,z.T=null,n=kd,kd=null;var o=Td,s=Dd;if(wd=0,Ed=Td=null,Dd=0,ed&6)throw Error(i(331));var c=ed;if(ed|=4,Yu(o.current),Vu(o,o.current,s,n),ed=c,Nf(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{fe.p=a,z.T=r,hf(e,t)}}function vf(e,t,n){t=Li(n,t),t=Ec(e.stateNode,t,2),e=po(e,t,2),e!==null&&(dt(e,2),Mf(e))}function yf(e,t,n){if(e.tag===3)vf(e,e,n);else for(;t!==null;){if(t.tag===3){vf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Cd===null||!Cd.has(r))){e=Li(n,e),n=Dc(2),r=po(t,n,2),r!==null&&(Oc(n,r,t,e),dt(r,2),Mf(r));break}}t=t.return}}function bf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(cd=!0,i.add(n),e=xf.bind(null,e,t,n),t.then(e,e))}function xf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,td===e&&(rd&n)===n&&(ud===4||ud===3&&(rd&62914560)===rd&&300>ze()-yd?ed&2?pd|=n:Kd(e,0):pd|=n,hd===rd&&(hd=0)),Mf(e)}function Sf(e,t){t===0&&(t=lt()),e=Si(e,t),e!==null&&(dt(e,t),Mf(e))}function Cf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sf(e,n)}function wf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Sf(e,n)}function Tf(e,t){return Fe(e,t)}var Ef=null,Df=null,Of=!1,kf=!1,Af=!1,jf=0;function Mf(e){e!==Df&&e.next===null&&(Df===null?Ef=Df=e:Df=Df.next=e),kf=!0,Of||(Of=!0,zf())}function Nf(e,t){if(!Af&&kf){Af=!0;do for(var n=!1,r=Ef;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Rf(r,a))}else a=rd,a=at(r,r===td?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,Rf(r,a))}r=r.next}while(n);Af=!1}}function Pf(){Ff()}function Ff(){kf=Of=!1;var e=0;jf!==0&&Cp()&&(e=jf);for(var t=ze(),n=null,r=Ef;r!==null;){var i=r.next,a=If(r,t);a===0?(r.next=null,n===null?Ef=i:n.next=i,i===null&&(Df=n)):(n=r,(e!==0||a&3)&&(kf=!0)),r=i}wd!==0&&wd!==5||Nf(e,!1),jf!==0&&(jf=0)}function If(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ct(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=td,n=rd,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(id===2||id===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),_t(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=Lf.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function Lf(e,t){if(wd!==0&&wd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(gf()&&e.callbackNode!==n)return null;var r=rd;return r=at(e,e===td?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Bd(e,r,t),If(e,ze()),e.callbackNode!=null&&e.callbackNode===n?Lf.bind(null,e):null)}function Rf(e,t){if(gf())return null;Bd(e,t,!0)}function zf(){Op(function(){ed&6?Fe(Ve,Pf):Ff()})}function Bf(){if(jf===0){var e=Pa;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),jf=e}return jf}function Vf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:hn(e)}function Hf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Vf((i[St]||null).action),o=r.submitter;o&&(t=(t=o[St]||null)?Vf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new In(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(jf!==0){var e=new FormData(i,o);Qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Uf=0;Uf<ui.length;Uf++){var Wf=ui[Uf];di(Wf.toLowerCase(),`on`+(Wf[0].toUpperCase()+Wf.slice(1)))}di(ni,`onAnimationEnd`),di(ri,`onAnimationIteration`),di(ii,`onAnimationStart`),di(`dblclick`,`onDoubleClick`),di(`focusin`,`onFocus`),di(`focusout`,`onBlur`),di(ai,`onTransitionRun`),di(oi,`onTransitionStart`),di(si,`onTransitionCancel`),di(ci,`onTransitionEnd`),Bt(`onMouseEnter`,[`mouseout`,`mouseover`]),Bt(`onMouseLeave`,[`mouseout`,`mouseover`]),Bt(`onPointerEnter`,[`pointerout`,`pointerover`]),Bt(`onPointerLeave`,[`pointerout`,`pointerover`]),zt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),zt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),zt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),zt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Gf=`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(` `),Kf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Gf));function qf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){gi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){gi(e)}i.currentTarget=null,a=c}}}}function Jf(e,t){var n=t[wt];n===void 0&&(n=t[wt]=new Set);var r=e+`__bubble`;n.has(r)||(Qf(t,e,2,!1),n.add(r))}function Yf(e,t,n){var r=0;t&&(r|=4),Qf(n,e,r,t)}var Xf=`_reactListening`+Math.random().toString(36).slice(2);function Zf(e){if(!e[Xf]){e[Xf]=!0,Lt.forEach(function(t){t!==`selectionchange`&&(Kf.has(t)||Yf(t,!1,e),Yf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xf]||(t[Xf]=!0,Yf(`selectionchange`,!1,t))}}function Qf(e,t,n,r){switch(Ah(t)){case 2:var i=wh;break;case 8:i=Th;break;default:i=Eh}n=i.bind(null,t,n,e),i=void 0,!En||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function $f(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=jt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Cn(function(){var r=a,i=vn(n),s=[];a:{var c=li.get(e);if(c!==void 0){var l=In,u=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:l=$n;break;case`focusin`:u=`focus`,l=Wn;break;case`focusout`:u=`blur`,l=Wn;break;case`beforeblur`:case`afterblur`:l=Wn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Hn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Un;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=nr;break;case ni:case ri:case ii:l=Gn;break;case ci:l=rr;break;case`scroll`:case`scrollend`:l=Ln;break;case`wheel`:l=ir;break;case`copy`:case`cut`:case`paste`:l=Kn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=er;break;case`submit`:l=tr;break;case`toggle`:case`beforetoggle`:l=ar}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=wn(m,p),g!=null&&d.push(ep(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==_n&&(u=n.relatedTarget||n.fromElement)&&(jt(u)||u[Ct]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?jt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Hn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=er,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Nt(c),h=l==null?u:Nt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,jt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,np):null,c!==null&&rp(s,u,c,d,!1),l!==null&&f!==null&&rp(s,f,l,d,!0)))}a:{if(c=r?Nt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Tr;else if(yr(c)){if(Er)_=Fr;else{_=Nr;var v=Mr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&fn(r.elementType)&&(_=Tr):_=Pr;if(_&&=_(e,r)){br(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Nt(r):window,e){case`focusin`:(yr(v)||v.contentEditable===`true`)&&(Kr=v,qr=r,Jr=null);break;case`focusout`:Jr=qr=Kr=null;break;case`mousedown`:Yr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Yr=!1,Xr(s,n,i);break;case`selectionchange`:if(Gr)break;case`keydown`:case`keyup`:Xr(s,n,i)}var y;if(sr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else hr?pr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(ur&&n.locale!==`ko`&&(hr||b!==`onCompositionStart`?b===`onCompositionEnd`&&hr&&(y=jn()):(On=i,kn=`value`in On?On.value:On.textContent,hr=!0)),v=tp(r,b),0<v.length&&(b=new qn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=mr(n),y!==null&&(b.data=y)))),(y=lr?gr(e,n):_r(e,n))&&(b=tp(r,`onBeforeInput`),0<b.length&&(v=new qn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Hf(s,e,r,n,i)}qf(s,t)})}function ep(e,t,n){return{instance:e,listener:t,currentTarget:n}}function tp(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=wn(e,n),i!=null&&r.unshift(ep(e,i,a)),i=wn(e,t),i!=null&&r.push(ep(e,i,a))),e.tag===3)return r;e=e.return}return[]}function np(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rp(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=wn(n,a),l!=null&&o.unshift(ep(n,l,c))):i||(l=wn(n,a),l!=null&&o.push(ep(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ip=/\r\n?/g,ap=/\u0000|\uFFFD/g;function op(e){return(typeof e==`string`?e:``+e).replace(ip,`
9
+ `).replace(ap,``)}function sp(e,t){return t=op(t),op(e)===t}function cp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&cn(e,``+r);else return;break;case`className`:qt(e,`class`,r);break;case`tabIndex`:qt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:qt(e,n,r);break;case`style`:dn(e,r,o);return;case`data`:if(t!==`object`){qt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&cp(e,t,`name`,a.name,a,null),cp(e,t,`formEncType`,a.formEncType,a,null),cp(e,t,`formMethod`,a.formMethod,a,null),cp(e,t,`formTarget`,a.formTarget,a,null)):(cp(e,t,`encType`,a.encType,a,null),cp(e,t,`method`,a.method,a,null),cp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=gn);return;case`onScroll`:r!=null&&Jf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Jf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=hn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`: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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Jf(`beforetoggle`,e),Jf(`toggle`,e),B(e,`popover`,r);break;case`xlinkActuate`:V(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:V(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:V(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:V(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:V(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:V(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:V(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:V(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:V(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:B(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=pn.get(n)||n,B(e,n,r);else return}Gt=!0}function lp(e,t,n,r,a,o){switch(n){case`style`:dn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)cn(e,``+r);else return;break;case`onScroll`:r!=null&&Jf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Jf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=gn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Rt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[St]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Gt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):B(e,n,r)}return}Gt=!0}function up(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Jf(`error`,e),Jf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:cp(e,t,o,s,n,null)}}a&&cp(e,t,`srcSet`,n.srcSet,n,null),r&&cp(e,t,`src`,n.src,n,null);return;case`input`:Jf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:cp(e,t,r,d,n,null)}}nn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Jf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:cp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&an(e,!!r,n,!0):an(e,!!r,t,!1);return;case`textarea`:for(s in Jf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:cp(e,t,s,c,n,null)}sn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:cp(e,t,l,r,n,null)}return;case`dialog`:Jf(`beforetoggle`,e),Jf(`toggle`,e),Jf(`cancel`,e),Jf(`close`,e);break;case`iframe`:case`object`:Jf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Gf.length;r++)Jf(Gf[r],e);break;case`image`:Jf(`error`,e),Jf(`load`,e);break;case`details`:Jf(`toggle`,e);break;case`embed`:case`source`:case`link`:Jf(`error`,e),Jf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:cp(e,t,u,r,n,null)}return;default:if(fn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&lp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&cp(e,t,c,r,n,null))}var dp={};function fp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||cp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Gt=!0),o=m;break;case`name`:m!==f&&(Gt=!0),a=m;break;case`checked`:m!==f&&(Gt=!0),u=m;break;case`defaultChecked`:m!==f&&(Gt=!0),d=m;break;case`value`:m!==f&&(Gt=!0),s=m;break;case`defaultValue`:m!==f&&(Gt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&cp(e,t,p,m,r,f)}}tn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||cp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Gt=!0),p=o;break;case`defaultValue`:o!==l&&(Gt=!0),c=o;break;case`multiple`:o!==l&&(Gt=!0),s=o;default:o!==l&&cp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?an(e,!!n,n?[]:``,!1):an(e,!!n,t,!0)):an(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:cp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Gt=!0),p=a;break;case`defaultValue`:a!==o&&(Gt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&cp(e,t,s,a,r,o)}on(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:cp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Gt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:cp(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&cp(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:cp(e,t,u,p,r,m)}return;default:if(fn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&lp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||lp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&cp(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||cp(e,t,f,p,r,m)}function pp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function mp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&pp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&pp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var hp=null,gp=null;function _p(e){return e.nodeType===9?e:e.ownerDocument}function vp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function yp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function bp(e,t,n,r){return n=_p(n).createElement(e),n[xt]=r,n[St]=t,up(n,e,t),Ft(n),n}function xp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Sp=null;function Cp(){var e=window.event;return e&&e.type===`popstate`?e!==Sp&&(Sp=e,!0):(Sp=null,!1)}var wp=typeof setTimeout==`function`?setTimeout:void 0,Tp=typeof clearTimeout==`function`?clearTimeout:void 0,Ep=typeof Promise==`function`?Promise:void 0,Dp=typeof requestAnimationFrame==`function`?requestAnimationFrame:wp,Op=typeof queueMicrotask==`function`?queueMicrotask:Ep===void 0?wp:function(e){return Ep.resolve(null).then(e).catch(kp)};function kp(e){setTimeout(function(){throw e})}function Ap(e){return e===`head`}function jp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Yh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Tm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Tm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Tm(e.ownerDocument.body)}n=i}while(n);Yh(t)}function Mp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Np(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Pp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Fp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ip(e){return Fp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Lp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Fp(t,n,e)}function Rp(e){return e.documentElement.clientHeight}function zp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Bp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Rp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=rh(f),u>oh){s.length=o;break}f=new Promise(zp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Vp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Vp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Vp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Vp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Hp(e){return{name:e,group:new Vp(`group`,e),imagePair:new Vp(`image-pair`,e),old:new Vp(`old`,e),new:new Vp(`new`,e)}}function Up(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Up.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Jp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Kp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Wp,e,s,r)}this._eventListeners=a}};function Wp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Up.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Jp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Kp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Gp,e,n,i),r.splice(t,1),a!==null&&a()}};function Gp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Kp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function qp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Jp(e,t,n,r){if(e.length===0)return-1;r=qp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&qp(a.optionsOrUseCapture)===r)return i}return-1}Up.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Kp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Kp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Up.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Yp,e,void 0,void 0)};function Yp(e,t){return e.tag!==6&&(e=b(e),xm(e,t))}Up.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Xp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Yp(t[n],e);n--);};function Xp(e,t){return t.push(e),!1}Up.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=_p(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Zp,e,void 0,void 0))};function Zp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Up.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Qp,e,void 0,void 0)};function Qp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Up.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,$p,e,void 0,void 0);for(var n=t=0;n<em.length;n++){var r=em[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):em[t++]=r}em.length=t}};function $p(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var em=[],tm=!1;function nm(e,t,n){em.push({fragmentInstance:e,observer:t,instance:n}),tm||(tm=!0,Sm(function(){tm=!1;var e=em;em=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Up.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,rm,e,void 0,void 0),e};function rm(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Up.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Up.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Xp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||im(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function im(e,t,n,r,i){var a=jt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function am(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Up.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Xp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),am(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),am(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function om(e,t){return e=b(e),sm(e,t),!1}function sm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function cm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Kp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<em.length;i++){var a=em[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(em[r++]=a)}em.length=r,n.observe(e)}),sm(e,t))}function lm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Kp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?nm(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function um(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:um(n),At(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function dm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=_m(e.nextSibling),e===null)break}return null}function fm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=_m(e.nextSibling),e===null))return null;return e}function pm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=_m(e.nextSibling),e===null))return null;return e}function mm(e){return e.data===`$?`||e.data===`$~`}function hm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function gm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function _m(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var vm=null;function ym(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return _m(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function bm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function xm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function Sm(e){Dp(function(){Dp(function(t){return e(t)})})}function Cm(e,t,n){switch(t=_p(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function wm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&cp(e,t,r,null,dp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===gn&&(e.onclick=null),At(e)}function Tm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);At(e)}var Em=new Map,Dm=new Set;function Om(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var km=fe.d;fe.d={f:K,r:Am,D:Nm,C:Pm,L:Fm,m:Im,X:Rm,S:Lm,M:zm};function K(){var e=km.f(),t=Wd();return e||t}function Am(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?ec(t):km.r(e)}var jm=typeof document>`u`?null:document;function Mm(e,t,n){var r=jm;if(r&&typeof t==`string`&&t){var i=en(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Dm.has(i)||(Dm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),up(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Nm(e){km.D(e),Mm(`dns-prefetch`,e,null)}function Pm(e,t){km.C(e,t),Mm(`preconnect`,e,t)}function Fm(e,t,n){km.L(e,t,n);var r=jm;if(r&&e&&t){var i=`link[rel="preload"][as="`+en(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+en(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+en(n.imageSizes)+`"]`)):i+=`[href="`+en(e)+`"]`;var a=i;switch(t){case`style`:a=Vm(e);break;case`script`:a=Gm(e)}if(!(Em.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Em.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Hm(a))||t===`script`&&r.querySelector(Km(a))))){var o=r.createElement(`link`);up(o,`link`,e),t===`style`&&(o[kt]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function Im(e,t){km.m(e,t);var n=jm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+en(r)+`"][href="`+en(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Gm(e)}if(!Em.has(a)&&(e=D({rel:`modulepreload`,href:e},t),Em.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Km(a)))return}r=n.createElement(`link`),up(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function Lm(e,t,n){km.S(e,t,n);var r=jm;if(r&&e){var i=Pt(r).hoistableStyles,a=Vm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Hm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Em.get(a))&&Ym(e,n);var c=o=r.createElement(`link`);Ft(c),up(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Jm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Rm(e,t){km.X(e,t);var n=jm;if(n&&e){var r=Pt(n).hoistableScripts,i=Gm(e),a=r.get(i);a||(a=n.querySelector(Km(i)),a||(e=D({src:e,async:!0},t),(t=Em.get(i))&&Xm(e,t),a=n.createElement(`script`),Ft(a),up(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zm(e,t){km.M(e,t);var n=jm;if(n&&e){var r=Pt(n).hoistableScripts,i=Gm(e),a=r.get(i);a||(a=n.querySelector(Km(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=Em.get(i))&&Xm(e,t),a=n.createElement(`script`),Ft(a),up(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bm(e,t,n,r){var a=(a=xe.current)?Om(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Vm(n.href),t=Pt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Vm(n.href);var o=Pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Hm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Em.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Em.set(e,o)),Wm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Gm(n),t=Pt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Vm(e){return`href="`+en(e)+`"`}function Hm(e){return`link[rel="stylesheet"][`+e+`]`}function Um(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Wm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[kt]){r.loading=1;return}}else t=e.createElement(`link`),t[kt]=!0,t.onload=t.onerror=It.bind(null,t),up(t,`link`,n),Ft(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Gm(e){return`[src="`+en(e)+`"]`}function Km(e){return`script[async]`+e}function qm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+en(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),up(r,`style`,a),Jm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Vm(n.href);var o=e.querySelector(Hm(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Um(n),(a=Em.get(a))&&Ym(r,a),o=(e.ownerDocument||e).createElement(`link`),Ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),up(o,`link`,r),t.state.loading|=4,Jm(o,n.precedence,e),t.instance=o;case`script`:return o=Gm(n.src),(a=e.querySelector(Km(o)))?(t.instance=a,Ft(a),a):(r=n,(a=Em.get(o))&&(r=D({},n),Xm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),up(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Jm(r,n.precedence,e));return t.instance}function Jm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Ym(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Xm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Zm=null;function Qm(e,t,n){if(Zm===null){var r=new Map,i=Zm=new Map;i.set(n,r)}else i=Zm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ot]||a[xt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function $m(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function eh(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function th(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function nh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function rh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function ih(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=rh(t),e.suspenseyImages.push(t)),e=uh.bind(e),t.decode().then(e,e))}function ah(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Vm(r.href),a=t.querySelector(Hm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=lh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Um(r),(i=Em.get(i))&&Ym(r,i),a=a.createElement(`link`),Ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),up(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=lh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var oh=0;function sh(e,t){return e.stylesheets&&e.count===0&&fh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&fh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&oh===0&&(oh=62500*mp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&fh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>oh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ch(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)fh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function lh(){this.count--,ch(this)}function uh(){this.imgCount--,ch(this)}var dh=null;function fh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,dh=new Map,t.forEach(ph,e),dh=null,lh.call(e))}function ph(e,t){if(!(t.state.loading&4)){var n=dh.get(e);if(n)var r=n.get(null);else{n=new Map,dh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=lh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var mh={$$typeof:F,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function hh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function gh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new hh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Di(3,null,null,t),e.current=a,a.stateNode=e,t=Da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},lo(a),e}function _h(e){return e?(e=Ti,e):Ti}function vh(e,t,n,r,i,a){i=_h(i),r.context===null?r.context=i:r.pendingContext=i,r=fo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=po(e,r,t),n!==null&&(zd(n,e,t),mo(n,e,t))}function yh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bh(e,t){yh(e,t),(e=e.alternate)&&yh(e,t)}function xh(e){if(e.tag===13||e.tag===31){var t=Si(e,67108864);t!==null&&zd(t,e,67108864),bh(e,67108864)}}function Sh(e){if(e.tag===13||e.tag===31){var t=Id();t=gt(t);var n=Si(e,t);n!==null&&zd(n,e,t),bh(e,t)}}var Ch=!0;function wh(e,t,n,r){var i=z.T;z.T=null;var a=fe.p;try{fe.p=2,Eh(e,t,n,r)}finally{fe.p=a,z.T=i}}function Th(e,t,n,r){var i=z.T;z.T=null;var a=fe.p;try{fe.p=8,Eh(e,t,n,r)}finally{fe.p=a,z.T=i}}function Eh(e,t,n,r){if(Ch){var i=Dh(r);if(i===null)$f(e,t,r,Oh,n),zh(e,r);else if(Vh(i,e,t,n,r))r.stopPropagation();else if(zh(e,r),t&4&&-1<Rh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}Mf(a),!(ed&6)&&(xd=ze()+500,Nf(0,!1))}}break;case 31:case 13:s=Si(a,2),s!==null&&zd(s,a,2),Wd(),bh(a,2)}if(a=Dh(r),a===null&&$f(e,t,r,Oh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else $f(e,t,r,null,n)}}function Dh(e){return e=vn(e),kh(e)}var Oh=null;function kh(e){if(Oh=null,e=jt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Oh=e,null}function Ah(e){switch(e){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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var jh=!1,Mh=null,Nh=null,Ph=null,Fh=new Map,Ih=new Map,Lh=[],Rh=`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 zh(e,t){switch(e){case`focusin`:case`focusout`:Mh=null;break;case`dragenter`:case`dragleave`:Nh=null;break;case`mouseover`:case`mouseout`:Ph=null;break;case`pointerover`:case`pointerout`:Fh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ih.delete(t.pointerId)}}function Bh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Mt(t),t!==null&&xh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Vh(e,t,n,r,i){switch(t){case`focusin`:return Mh=Bh(Mh,e,t,n,r,i),!0;case`dragenter`:return Nh=Bh(Nh,e,t,n,r,i),!0;case`mouseover`:return Ph=Bh(Ph,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Fh.set(a,Bh(Fh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ih.set(a,Bh(Ih.get(a)||null,e,t,n,r,i)),!0}return!1}function Hh(e){var t=jt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,yt(e.priority,function(){Sh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,yt(e.priority,function(){Sh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Uh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Dh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_n=r,n.target.dispatchEvent(r),_n=null}else return t=Mt(n),t!==null&&xh(t),e.blockedOn=n,!1;t.shift()}return!0}function Wh(e,t,n){Uh(e)&&n.delete(t)}function Gh(){jh=!1,Mh!==null&&Uh(Mh)&&(Mh=null),Nh!==null&&Uh(Nh)&&(Nh=null),Ph!==null&&Uh(Ph)&&(Ph=null),Fh.forEach(Wh),Ih.forEach(Wh)}function Kh(e,n){e.blockedOn===n&&(e.blockedOn=null,jh||(jh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Gh)))}var qh=null;function Jh(e){qh!==e&&(qh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){qh===e&&(qh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(kh(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,Qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Yh(e){function t(t){return Kh(t,e)}Mh!==null&&Kh(Mh,e),Nh!==null&&Kh(Nh,e),Ph!==null&&Kh(Ph,e),Fh.forEach(t),Ih.forEach(t);for(var n=0;n<Lh.length;n++){var r=Lh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Lh.length&&(n=Lh[0],n.blockedOn===null);)Hh(n),n.blockedOn===null&&Lh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[St]||null;if(typeof a==`function`)o||Jh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[St]||null)s=o.formAction;else if(kh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Jh(n)}}}function Xh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Zh(e){this._internalRoot=e}Qh.prototype.render=Zh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;vh(n,Id(),e,t,null,null)},Qh.prototype.unmount=Zh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vh(e.current,2,null,e,null,null),Wd(),t[Ct]=null}};function Qh(e){this._internalRoot=e}Qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=vt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lh.length&&t!==0&&t<Lh[n].priority;n++);Lh.splice(n,0,e),n===0&&Hh(e)}};var $h=n.version;if($h!==`19.3.0`)throw Error(i(527,$h,`19.3.0`));fe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var eg={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:z,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var tg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tg.isDisabled&&tg.supportsFiber)try{Je=tg.inject(eg),Ye=tg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=xc,s=Sc,c=Cc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=gh(e,1,!1,null,null,n,r,null,o,s,c,Xh),e[Ct]=t.current,Zf(e),new Zh(t)}})),_=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function y(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:v(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var b=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},x=e=>{let t=b(e);return t.charAt(0).toUpperCase()+t.slice(1)},S=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),C={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function w(e){return e!=null}function T(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??C.width,a=e.size??e.height??C.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?S(...c):S(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??C[`stroke-width`])*Number(e.size??e.width??C.width)/Number(t.size??t.width??C.width):t.strokeWidth??C[`stroke-width`];return[`svg`,{...Object.entries(C).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&w(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&w(t.width)&&{[r(`width`)]:t.width},...`height`in t&&w(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function E(e,t={}){return T(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var D=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},O=l(d(),1),k=(0,O.createContext)({}),A=()=>(0,O.useContext)(k),j=(0,O.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=A()??{},y=!!c||D(d),[b,x,C=[]]=E(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:S(v,s),hasA11yProp:y,attributes:d});return(0,O.createElement)(b,{ref:f,...x},[...C.map(([e,t])=>(0,O.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function M(e,t=[],n=[]){let r=typeof e==`string`?y(e,t,n):e,i=(0,O.forwardRef)(({className:e,...t},n)=>(0,O.createElement)(j,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=x(r.name)),i}var N={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};N.node;var P=M(N),F={name:`book-open-text`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M16 13h2`,key:`weia3s`}],[`path`,{d:`M16 9h2`,key:`1n7gjm`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}],[`path`,{d:`M6 13h2`,key:`1cckiz`}],[`path`,{d:`M6 9h2`,key:`1k7j9f`}]]};F.node;var I=M(F),ee={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};ee.node;var te=M(ee),L={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};L.node;var ne=M(L),re={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};re.node;var ie=M(re),ae={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};ae.node;var oe=M(ae),R={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};R.node;var se=M(R),ce={name:`clipboard-check`,size:24,node:[[`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:`m9 14 2 2 4-4`,key:`df797q`}]]};ce.node;var le=M(ce),ue={name:`eye`,size:24,node:[[`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`}]]};ue.node;var de=M(ue),z={name:`fire-extinguisher`,size:24,node:[[`path`,{d:`M15 6.5V3a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v3.5`,key:`sqyvz`}],[`path`,{d:`M9 18h8`,key:`i7pszb`}],[`path`,{d:`M18 3h-3`,key:`7idoqj`}],[`path`,{d:`M11 3a6 6 0 0 0-6 6v11`,key:`1v5je3`}],[`path`,{d:`M5 13h4`,key:`svpcxo`}],[`path`,{d:`M17 10a4 4 0 0 0-8 0v10a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2Z`,key:`vsjego`}]]};z.node;var fe=M(z),pe={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};pe.node;var me=M(pe),he={name:`inbox`,size:24,node:[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]};he.node;var ge=M(he),_e={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};_e.node;var ve=M(_e),ye={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};ye.node;var be=M(ye),xe={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};xe.node;var Se=M(xe),Ce={name:`message-square`,size:24,node:[[`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`}]]};Ce.node;var we=M(Ce),Te={name:`moon`,size:24,node:[[`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`}]]};Te.node;var Ee=M(Te),De={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};De.node;var Oe=M(De),ke={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};ke.node;var Ae=M(ke),je={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};je.node;var Me=M(je),Ne={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};Ne.node;var Pe=M(Ne),Fe={name:`scan-eye`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`path`,{d:`M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0`,key:`11ak4c`}]]};Fe.node;var Ie=M(Fe),Le={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};Le.node;var Re=M(Le),ze={name:`shapes`,size:24,node:[[`path`,{d:`M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z`,key:`1bo67w`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`3.5`,key:`w3z12y`}]]};ze.node;var Be=M(ze),Ve={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Ve.node;var He=M(Ve),Ue={name:`sun`,size:24,node:[[`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`}]]};Ue.node;var We=M(Ue),Ge={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};Ge.node;var Ke=M(Ge),qe={name:`undo`,size:24,node:[[`path`,{d:`M3 7v6h6`,key:`1v2h90`}],[`path`,{d:`M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13`,key:`1r6uu6`}]]};qe.node;var Je=M(qe),Ye={name:`unplug`,size:24,node:[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]};Ye.node;var Xe=M(Ye),Ze={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Ze.node;var Qe=M(Ze),$e=_(),et=48,tt=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-et-t;return n},nt=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},rt=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-et;n+=i>>>1^-(i&1),t[r]=n}return t},it=384,at=[],ot=nt(tt(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),st=nt(tt(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),ct=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,lt=(()=>{let e=ot.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=ot[n];i<ot[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(ot[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=ot[i];a<ot[i+1];a++)n[r++]=e,e+=t[e]}return n})(),ut=tt(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),dt=nt(tt(`123333359346463635126536711576`)),ft=tt(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),pt=tt(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),mt=rt(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),ht=(()=>{let e=new Int32Array(319).fill(-1),t=rt(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=rt(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),gt=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),_t=rt(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),vt=rt(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),yt=rt(`02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~‚22…ˆ‡:22|22222222222G000q†OVI00000}š2›>40000ŒB00000I¨©000¬00000000000000021M®­00°“000000000000000000000–222›HGHa1º222¿2À2222ÉÌ000­°2±`),bt=new Int32Array(995),xt=new Int32Array(995),St=new Int32Array(995),Ct=``,wt=new Int32Array(1038);{let e=new Map,t=0,n=0;for(let r=0;r<_t.length;r++)for(let i of gt[yt[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),wt[a*2]=Ct.length,wt[a*2+1]=i.length,Ct+=i),bt[n]=_t[r],xt[n]=vt[r],St[n]=a,n++}}var Tt=rt(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),Et=nt(tt(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),Dt=rt(`2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222`),Ot=tt(`ij`),kt=tt(`—`),At=tt(`1`),jt={GROUP_COUNT:it,customValidatorNames:at,edgeStart:ot,labelStart:st,labelText:ct,edgeTarget:lt,nodeGroup:ut,nodeVlist:ht,vlistPat:dt,vlistOps:ft,vlistRef:pt,vlistGroup:mt,litAnchor:bt,litGroup:xt,litPool:St,poolOffsets:wt,poolText:Ct,adjGid:Tt,adjStart:Et,adjTgt:Dt,patGid:Ot,patTgt:kt,postfixLookupGroups:At,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},Mt=`line`in Error(),Nt=-1,Pt=-1,Ft=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},It=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15|0},Lt=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,N=new Uint8Array(M),P=0,F=!0;for(let e=0;e<m.length;e++){N[m[e]]=1;let t=_[g[e]*2+1];t>P&&(P=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(F=!1)}let I=1;for(;I<m.length*2;)I<<=1;let ee=new Int32Array(I).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Ft(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&I-1;for(;ee[n]!==-1;)n=n+1&I-1;ee[n]=e}let te=(e,t,n,r)=>{let i=(Ft(t,n,r)^Math.imul(e,2654435761)|0)&I-1,a=r-n;for(;;){let r=ee[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&I-1}},L=n.cacheSize??8192,ne=n.prefix??e.prefix??``,re=ne===``?``:ne+`:`,ie=re.length,ae=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),oe=/\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$/,R=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,se=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ce=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,le=0,ue=-1,de=-1,z=-1,fe=-1,pe=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,me=e=>/\s/.test(String.fromCharCode(e)),he=(e,t,n)=>{if(le=0,ue=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)le=1;else if(r===40&&i===41)le=2;else return;z=t+1,fe=n-1;let a=t+1;if(pe(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!pe(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(ue=t+1,de=a,z=a+1)}},ge=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},_e=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ve=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ye=e=>!!e&&!Number.isNaN(Number(e)),be=(e,t,n)=>{if(n-t<11||!ge(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&ge(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&ge(e,t+10,t+18,`-normal/`)},xe=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Se=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),Ce=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],we=(e,t,n,r)=>{if(e>=10){if(e>=25)return ae[e-25](t.slice(n,r));let i=e-10;if(le!==xe[i])return!1;if(ue>=0){for(let e of Se[i])if(ge(t,ue,de,e))return!0;return!1}switch(Ce[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(z,fe);return oe.test(e)&&!R.test(e)}case 3:return ye(t.slice(z,fe));case 4:return ce.test(t.slice(z,fe));default:return se.test(t.slice(z,fe))}}switch(e){case 0:return!0;case 1:return le===0;case 2:return le===1;case 3:return le===2;case 4:return _e.test(t.slice(n,r));case 5:return ye(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&ye(t.slice(n,r-1));case 8:return ve.test(t.slice(n,r));default:return be(t,n,r)}},Te=new Set(typeof E==`string`?E.split(` `):E),Ee=(e,t,n,r,i,a)=>{let o=Ft(t,n,r)^(i?2654435769:0)|0,s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},De=new Map,Oe=new Map,ke=2,Ae=4096,je=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Te.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Oe.get(s);return c===void 0&&Oe.set(s,c=ke++),c},Me=new Map,Ne=r,Pe=r+4096,Fe=()=>Ne++,Ie=2097152,Le=8192,Re=new Int32Array(Le),ze=Array(Le).fill(null),Be=new Int32Array(Le),Ve=new Int32Array(Le),He=new Uint8Array(Le),Ue=0,We=(e,t,n,r,i,a,o,s)=>{let c=e;if(ze[e]!==null){if(ze[e|1]===null)c=e|1;else if(!(Ue++&3))c=e|Ue>>2&1;else return}ze[c]=t.slice(n,r),Re[c]=i,Be[c]=a,Ve[c]=o,He[c]=s},Ge=()=>ze.fill(null),Ke=256,qe=[new Int32Array(Ke),new Int32Array(Ke),new Int32Array(Ke),new Int32Array(Ke)],[Je,Ye,Xe,Ze]=qe,Qe=new Uint8Array(Ke),$e=new Uint8Array(Ke),et=()=>{Ke*=2,qe=qe.map(e=>{let t=new Int32Array(Ke);return t.set(e),t}),[Je,Ye,Xe,Ze]=qe;let e=new Uint8Array(Ke);e.set(Qe),Qe=e,$e=new Uint8Array(Ke)},tt=64,nt=new Int32Array(tt),rt=new Int32Array(tt),it=new Int32Array(r),at=2048,ot=21,st=new Float64Array(at),ct=new Int32Array(at),lt=0,ut=(e,t)=>{if(e===0&&t<r)return it[t]===lt?1:(it[t]=lt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>ot;for(;ct[i]===lt;){if(st[i]===n)return 1;i=i+1&at-1}return st[i]=n,ct[i]=lt,0},dt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?Nt:Ee(Me,e,t+1,r,0,Fe)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=rt[t];if(r>n)continue;let i=nt[t],a=n-r;if(N[i]===1&&a>0&&a<=P){let t=e.charCodeAt(r);if(F===!1||t!==91&&t!==40){let t=te(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;he(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(we(d[t],e,r,n))return p[h+t]}return Nt},ft=e=>{let t=e.length,n=0,c=0,u=!1;(ke>Ae||De.size>Ae)&&(De=new Map,Oe=new Map,ke=2,Ge()),Ne>Pe&&(Me=new Map,Ne=r,Ge());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&me(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&me(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===Ke&&et();let _=n++;Je[_]=p,Ye[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15|0,y=v&8190;{let t=-1;if(Re[y]===v&&ze[y]!==null&&ze[y].length===g?t=y:Re[y|1]===v&&ze[y|1]!==null&&ze[y|1].length===g&&(t=y|1),t>=0){let n=ze[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){Xe[_]=Be[t],Ze[_]=Ve[t],Qe[_]=He[t];continue}}}let b=p;if(ie!==0){if(h-p<=ie||!e.startsWith(re,p)){Xe[_]=Nt,We(y,e,p,h,v,Nt,0,0);continue}b=p+ie}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let P=0,F=0,I=0,ee=-1,te=0;(l[0]>=0||N[0]===1)&&(nt[0]=0,rt[0]=M,te=1);let L=Pt,ne=0;for(let t=M;t<D;t++)if(t===A&&(L=F<I?Pt:P,ne=te),P!==Pt){let n=e.charCodeAt(t),r=-1;if(F<I)o.charCodeAt(F)===n?(F++,F===I&&(r=P=ee)):P=Pt;else{let e=i[P],t=i[P+1],c=Pt;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(F=e+1,I=a[i+1],ee=s[i],c=P);break}}P=c}if(r>=0&&(l[r]>=0||N[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(te===tt){tt*=2;let e=new Int32Array(tt);e.set(nt),nt=e;let t=new Int32Array(tt);t.set(rt),rt=t}nt[te]=r,rt[te]=t+2,te++}}A===D&&(L=F<I?Pt:P,ne=te);let ae=F<I?Pt:P,oe,R=!1;if(A>=0){if(R=!0,oe=dt(e,E,A,L,ne),oe!==Nt&&oe<r&&j[oe]){let t=dt(e,E,D,ae,te);t!==Nt&&t!==oe&&(oe=t,R=!1)}else oe===Nt&&(oe=dt(e,E,D,ae,te),R=!1)}else oe=dt(e,E,D,ae,te);let se=0,ce=0;oe===Nt?Xe[_]=Nt:(ce=+!!R,se=b>=C?+!!O:Ee(De,e,b,C,+!!O,e=>je(e,O)),Xe[_]=oe,Qe[_]=ce,Ze[_]=se),We(y,e,p,h,v,oe,se,ce)}if(n===0)return``;if(n===1)return Je[0]===0&&Ye[0]===t?e:e.slice(Je[0],Ye[0]);if(n*k>at){for(;n*k>at;)at<<=1,ot--;st=new Float64Array(at),ct=new Int32Array(at)}if(ke>=Ie||Ne>=Ie)throw Error(`cn: too many distinct classes in one merge`);lt=lt+1|0,lt===0&&(it.fill(0),ct.fill(0),lt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=Xe[e];if(t===Nt){$e[e]=1;continue}let n=Ze[e];if(ut(n,t)===1){$e[e]=0,f=!0;continue}if($e[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)ut(n,x[e]);if(Qe[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&ut(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!$e[m]){m++;continue}let t=Je[m],r=Ye[m],i=m+1;for(;i<n&&$e[i]&&Je[i]===r+1&&e.charCodeAt(r)===32;)r=Ye[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},pt=16384,mt=new Int32Array(pt*2),ht=0,gt=1,_t=Object.create(null),vt=Object.create(null),yt=new Map,bt=new Map,xt=0,St=0,Ct=()=>{ht^=pt,gt=gt+1|0,St=0},wt=e=>{let t=_t[e];if(t!==void 0)return t;let n=It(e,0,e.length),r=(n&16383)+ht,i=mt[r]===(n^gt)||mt[r^pt]===(n^gt-1);return i&&(t=vt[e],t!==void 0)?(_t[e]=t,t):(t=ft(e),i?(_t[e]=t,++xt>L&&(xt=0,vt=_t,_t=Object.create(null),Ct())):(mt[r]=n^gt,++St>pt&&Ct()),t)},Tt=e=>{let t=yt.get(e);if(t!==void 0)return t;let n=It(e,0,e.length),r=(n&16383)+ht,i=mt[r]===(n^gt)||mt[r^pt]===(n^gt-1);return i&&(t=bt.get(e),t!==void 0)?(yt.set(e,t),t):(t=ft(e),i?(yt.set(e,t),++xt>L&&(xt=0,bt=yt,yt=new Map,Ct())):(mt[r]=n^gt,++St>pt&&Ct()),t)},Et=e=>{let t=It(e,0,e.length),n=(t&16383)+ht;return mt[n]===(t^gt)||mt[n^pt]===(t^gt-1)||(mt[n]=t^gt,++St>pt&&Ct(),!1)},Dt=L===0?ft:Mt?e=>{let t=yt.get(e);return t===void 0?Tt(e):t}:wt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Dt(arguments[0]):Dt(Bt.apply(null,arguments))},mergeString:Dt,seenBefore:L===0?()=>!1:Et,mergeUncached:ft}},Rt=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Rt(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},zt=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Rt(i,t);a&&(n&&(n+=` `),n+=a)}return n},Bt=function(){return zt(arguments,!1)},Vt=256,Ht=16,Ut=1024,Wt=4096,Gt=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(Wt).fill(``),l=Array(Wt).fill(``),u=Array(Wt).fill(``));let i=It(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Rt(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>Ht&&(_.miss=Ht,_.skip=Ut,_.e.length=0,_.at=0);let u=_.e;u.length<Vt?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(Rt(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Kt=Lt(jt),B=Gt(Kt.mergeString,Kt);Kt.merge;var qt=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),V=o(((e,t)=>{t.exports=qt()}))(),Jt=[`M3 11h18`,`M4 11a8 6 0 0 0 16 0`,`M8 16.2 6.5 21`,`M16 16.2 17.5 21`];function Yt(e,t,n){let r=1.1*t,i=(8+n)/2;return`M${e} 8 C${e+r} ${8-(8-i)/3} ${e+r} ${i+(8-i)/3} ${e} ${i} C${e-r} ${i-(i-n)/3} ${e-r} ${n+(i-n)/3} ${e} ${n}`}var Xt=[[1,3],[.2,2.6],[-1,3],[-.2,3.4]],Zt=[8,12,16].map((e,t)=>{let n=[0,1,2,3,0].map(n=>{let[r,i]=Xt[(n+t)%Xt.length];return Yt(e,r,i)});return{rest:n[0],values:n.join(`;`)}}),Qt=`0;0.25;0.5;0.75;1`,$t=Array(Xt.length).fill(`0.45 0 0.55 1`).join(`;`),en=()=>window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function tn({hot:e=!0,className:t,...n}){let r=(0,O.useRef)(null);return(0,O.useEffect)(()=>{for(let t of r.current?.querySelectorAll(`animate`)??[])e&&!en()?t.beginElement():t.endElement()},[e]),(0,V.jsxs)(`svg`,{ref:r,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,"data-grill":e?`hot`:`still`,className:B(`size-4 shrink-0`,t),...n,children:[Jt.map(e=>(0,V.jsx)(`path`,{d:e},e)),Zt.map(({rest:e,values:t})=>(0,V.jsx)(`path`,{d:e,children:(0,V.jsx)(`animate`,{attributeName:`d`,values:t,keyTimes:Qt,keySplines:$t,calcMode:`spline`,dur:`1.6s`,begin:`indefinite`,repeatCount:`indefinite`})},e))]})}function nn({className:e}){let[t,n]=(0,O.useState)(!1);return(0,V.jsx)(`span`,{onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),className:B(`flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground shadow-sm`,e),children:(0,V.jsx)(tn,{hot:t,className:`size-4`})})}function rn(){return(0,V.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,V.jsx)(nn,{}),(0,V.jsx)(`span`,{className:`text-sm font-semibold tracking-tight`,children:`better grill`})]})}function an(){return typeof window<`u`}function on(e){return ln(e)?(e.nodeName||``).toLowerCase():`#document`}function sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cn(e){return((ln(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ln(e){return an()?e instanceof Node||e instanceof sn(e).Node:!1}function un(e){return an()?e instanceof Element||e instanceof sn(e).Element:!1}function dn(e){return an()?e instanceof HTMLElement||e instanceof sn(e).HTMLElement:!1}function fn(e){return!an()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof sn(e).ShadowRoot}function pn(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=wn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function mn(e){return/^(table|td|th)$/.test(on(e))}function hn(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var gn=/transform|translate|scale|rotate|perspective|filter/,_n=/paint|layout|strict|content/,vn=e=>!!e&&e!==`none`,yn;function bn(e){let t=un(e)?wn(e):e;return vn(t.transform)||vn(t.translate)||vn(t.scale)||vn(t.rotate)||vn(t.perspective)||!Sn()&&(vn(t.backdropFilter)||vn(t.filter))||gn.test(t.willChange||``)||_n.test(t.contain||``)}function xn(e){let t=En(e);for(;dn(t)&&!Cn(t);){if(bn(t))return t;if(hn(t))return null;t=En(t)}return null}function Sn(){return yn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),yn}function Cn(e){return/^(html|body|#document)$/.test(on(e))}function wn(e){return sn(e).getComputedStyle(e)}function Tn(e){return un(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function En(e){if(on(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||fn(e)&&e.host||cn(e);return fn(t)?t.host:t}function Dn(e){let t=En(e);return Cn(t)?(e.ownerDocument||e).body:dn(t)&&pn(t)?t:Dn(t)}function On(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Dn(e),i=r===e.ownerDocument?.body,a=sn(r);if(i){let e=kn(a);return t.concat(a,a.visualViewport||[],pn(r)?r:[],e&&n?On(e):[])}return t.concat(r,On(r,[],n))}function kn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var An={...O},jn={};function Mn(e,t){let n=O.useRef(jn);return n.current===jn&&(n.current=e(t)),n}var Nn=An.useInsertionEffect,Pn=Nn&&Nn!==An.useLayoutEffect?Nn:e=>e();function H(e){let t=Mn(Fn).current;return t.next=e,Pn(t.effect),t.trampoline}function Fn(){let e={next:void 0,callback:In,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function In(){}var U=typeof document<`u`?O.useLayoutEffect:()=>{};function Ln(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var Rn={};function zn(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Vn(t);let a=Vn(e);return t&&(a=Hn(a,t)),n&&(a=Hn(a,n)),r&&(a=Hn(a,r)),i&&(a=Hn(a,i)),a}function Bn(e){if(e.length===0)return Rn;if(e.length===1)return Vn(e[0]);let t=Vn(e[0]);for(let n=1;n<e.length;n+=1)t=Hn(t,e[n]);return t}function Vn(e){return Kn(e)?{...qn(e,Rn)}:Un(e)}function Hn(e,t){return Kn(t)?qn(t,e):Wn(e,t)}function Un(e){let t={...e};for(let e in t){let n=t[e];Gn(e,n)&&(t[e]=Yn(n))}return t}function Wn(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Ln(e.style,r);break;case`className`:e[n]=Zn(e.className,r);break;default:e[n]=Gn(n,r)?Jn(e[n],r):r}}return e}function Gn(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function Kn(e){return typeof e==`function`}function qn(e,t){return Kn(e)?e(t):e??Rn}function Jn(e,t){return t?e?(...n)=>{let r=n[0];if(Qn(r)){let i=r;Xn(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Yn(t):e}function Yn(e){return e&&((...t)=>{let n=t[0];return Qn(n)&&Xn(n),e(...t)})}function Xn(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Zn(e,t){return t?e?t+` `+e:t:e}function Qn(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function $n(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var er=$n(`https://base-ui.com/production-error`,`Base UI`),tr=O.createContext(void 0);function nr(e=!1){let t=O.useContext(tr);if(t===void 0&&!e)throw Error(er(16));return t}function rr(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:O.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function ir(e){return e?.ownerDocument||document}function ar(e,t,{detail:n=0}={}){e.dispatchEvent(new(sn(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function or(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=O.useRef(null),s=nr(!0),c=a??s!==void 0,{props:l}=rr({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=O.useCallback(()=>{let e=o.current;sr(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return U(u,[u]),{getButtonProps:O.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return zn({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Xn(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=sr(r),s=!i&&cr(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),ar(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),ar(r,e)))},onKeyUp(e){if(!t){if(Xn(e),a?.(e),e.target===e.currentTarget&&i&&c&&sr(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),ar(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:H(e=>{o.current=e,u()})}}function sr(e){return dn(e)&&e.tagName===`BUTTON`}function cr(e){return dn(e)&&e.tagName===`A`&&!!e.href}function lr(e,t,n,r){let i=Mn(dr).current;return fr(i,e,t,n,r)&&mr(i,[e,t,n,r]),i.callback}function ur(e){let t=Mn(dr).current;return pr(t,e)&&mr(t,e),t.callback}function dr(){return{callback:null,cleanup:null,refs:[]}}function fr(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function pr(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function mr(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var hr=19;function gr(e){return hr>=e}function _r(e){if(!O.isValidElement(e))return null;let t=e,n=t.props;return(gr(19)?n?.ref:t.ref)??null}function vr(){}var yr=Object.freeze([]),br=Object.freeze({});function xr(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Sr(e,t){return typeof e==`function`?e(t):e}function Cr(e,t){return typeof e==`function`?e(t):e}function wr(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Or(r));let i=Tr(t,n,r);if(n.enabled===!1)return null;let a=n.state??br;return kr(e,r,i,a)}function Tr(e,t,n){let{className:r,style:i}=e,{state:a=br,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Sr(r,a):void 0,d=l?Cr(i,a):void 0,f=l?xr(a,c):br,p=l&&s?Er(s):void 0,m=l?Ln(f,p)??{}:br;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?ur([m.ref,_r(n),...o]):lr(m.ref,_r(n),o):lr(null,null)),l?(u!==void 0&&(m.className=Zn(m.className,u)),d!==void 0&&(m.style=Ln(m.style,d)),m):br}function Er(e){return Array.isArray(e)?Bn(e):zn(void 0,e)}var Dr=Symbol.for(`react.lazy`);function Or(e){if(e?.$$typeof!==Dr)return e;let t=O.Children.toArray(e)[0];return O.isValidElement(t)?t:e}function kr(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=zn(n,t.props);return e.ref=n.ref,O.cloneElement(t,e)}if(e&&typeof e==`string`)return Ar(e,n);throw Error(er(8))}function Ar(e,t){return e===`button`?(0,O.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,O.createElement)(`img`,{alt:``,...t,key:t.key}):O.createElement(e,t)}var jr=O.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=or({disabled:i,focusableWhenDisabled:a,native:o});return wr(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})});function Mr(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Mr(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Nr(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Mr(e))&&(r&&(r+=` `),r+=t);return r}var Pr=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Fr=Nr,Ir=(e,t)=>n=>{if(t?.variants==null)return Fr(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Pr(t)||Pr(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Fr(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Lr=Ir(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function Rr({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,V.jsx)(jr,{"data-slot":`button`,className:B(Lr({variant:t,size:n,className:e})),...r})}function zr({error:e}){return(0,V.jsx)(`div`,{className:`grid min-h-svh place-items-center bg-background px-4`,children:(0,V.jsxs)(`div`,{className:`w-full max-w-md`,children:[(0,V.jsx)(rn,{}),(0,V.jsx)(`p`,{className:`mt-10 text-sm font-medium text-destructive`,children:`UI error`}),(0,V.jsx)(`h1`,{className:`mt-1 text-3xl font-semibold tracking-tight`,children:`The page crashed.`}),(0,V.jsx)(`p`,{className:`mt-3 text-muted-foreground`,children:`Nothing is lost: your answers and discussions live in the bridge, not in this tab. Reloading picks them up again.`}),(0,V.jsx)(`pre`,{className:`mt-5 max-h-32 overflow-auto rounded-lg border bg-muted px-4 py-3 font-mono text-xs whitespace-pre-wrap text-muted-foreground`,children:e.message}),(0,V.jsxs)(Rr,{className:`mt-6`,onClick:()=>window.location.reload(),children:[(0,V.jsx)(Pe,{"data-icon":`inline-start`}),`Reload`]})]})})}var Br=class extends O.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`UI crashed`,e,t.componentStack)}reset=()=>this.setState({error:null});render(){return this.state.error?this.props.fallback(this.state.error,this.reset):this.props.children}},Vr=[],Hr=void 0;function Ur(){return Hr}function Wr(e){Vr.push(e)}function Gr(e){let t=(t,n)=>{let r=Mn(qr).current,i;try{Hr=r;for(let e of Vr)e.before(r);i=e(t,n);for(let e of Vr)e.after(r);r.didInitialize=!0}finally{Hr=void 0}return i};return t.displayName=e.displayName||e.name,t}function Kr(e){return O.forwardRef(Gr(e))}function qr(){return{didInitialize:!1}}var Jr=O.createContext(void 0);function Yr(e){let t=O.useContext(Jr);if(t===void 0&&!e)throw Error(er(72));return t}function Xr(e){O.useEffect(e,yr)}var Zr=0,Qr=class e{static create(){return new e}currentId=Zr;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Zr,t()},e)}isStarted(){return this.currentId!==Zr}clear=()=>{this.currentId!==Zr&&(clearTimeout(this.currentId),this.currentId=Zr)};disposeEffect=()=>this.clear};function $r(){let e=Mn(Qr.create).current;return Xr(e.disposeEffect),e}function ei(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:ti,platform:ni,maxTouchPoints:ri}=ei(),ii=ti.toLowerCase(),ai=ni.toLowerCase(),oi=/^i(os$|p)/.test(ai)||ai===`macintel`&&ri>1,si=`android`,ci=ai===si||ii.includes(si),li=!oi&&ai.startsWith(`mac`);ai.startsWith(`win`),!ci&&/^(linux|chrome os)/.test(ai);var ui=li||oi,di=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!di&&ii.includes(`firefox`),!di&&ii.includes(`chrom`);var fi=ui,pi=/jsdom|happydom/.test(ii);function mi(e){e.preventDefault(),e.stopPropagation()}function hi(e){return`nativeEvent`in e}function gi(e){return e.pointerType===``&&e.isTrusted?!0:ci&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function _i(e){return pi?!1:!ci&&e.width===0&&e.height===0||ci&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function vi(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function yi(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function bi(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function W(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&fn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function xi(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Si=`data-base-ui-focusable`,Ci=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,wi=`data-starting-style`,Ti=`data-ending-style`,Ei={[wi]:``},Di={[Ti]:``},Oi={transitionStatus(e){return e===`starting`?Ei:e===`ending`?Di:null}},ki=`data-open`,Ai=`data-closed`,ji=`data-anchor-hidden`,Mi={"data-popup-open":``},Ni={[ki]:``},Pi={[Ai]:``},Fi={[ji]:``},Ii={open(e){return e?Mi:null}},Li={open(e){return e?Ni:Pi},anchorHidden(e){return e?Fi:null}},Ri={...Li,...Oi},zi=`data-trigger-disabled`;function Bi(e,t){if(!un(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(zi);for(let[,e]of t.entries())if(W(e,n))return!e.hasAttribute(zi);return!1}function Vi(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Hi(e){return e.matches(`html,body`)}function Ui(e){return dn(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Wi(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ci}`)!=null}function Gi(e){return e?e.getAttribute(`role`)===`combobox`&&Ui(e):!1}function Ki(e){if(!e||pi)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function qi(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Ji(e,t){return t!=null&&!vi(t)?0:typeof e==`function`?e():e}function Yi(e,t,n){let r=Ji(e,n);return typeof r==`number`?r:r?.[t]}function Xi(e){return typeof e==`function`?e():e}function Zi(e,t){return t||e===`click`||e===`mousedown`}function Qi(e){return e?.includes(`mouse`)&&e!==`mousedown`}var $i=`none`,ea=`trigger-press`,ta=`trigger-hover`,na=`trigger-focus`,ra=`outside-press`,ia=`close-press`,aa=`focus-out`,oa=`escape-key`,sa=`disabled`,ca=`imperative-action`;function la(e,t,n,r){let i=!1,a=!1,o=r??br;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var ua=O.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Qr,currentIdRef:{current:null},currentContextRef:{current:null}});function da(e,t){e.current=t.current}function fa(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=O.useRef(n),a=O.useRef(n),o=O.useRef(null),s=O.useRef(null),c=$r();return U(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:Yi(i.current,`open`),close:Yi(n,`close`)}},[n,o,i,a]),(0,V.jsx)(ua.Provider,{value:O.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function pa(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=O.useContext(ua),[f,p]=O.useState(!1),m=O.useRef(n);return U(()=>{m.current=n},[n]),U(()=>{function e(){l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current,d.clear()}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{(m.current||a.current!==t)&&d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),U(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:Yi(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,la($i))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),U(()=>()=>{if(a.current===i){if(l.current=null,!m.current)return;a.current=null,da(o,c),d.clear()}},[l,a,o,i,c,d]),O.useMemo(()=>({activeIdRef:a,hasProvider:u,delayRef:o,isInstantPhase:f}),[a,u,o,f])}function G(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ma(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function ha(e){let t=Mn(ga,e).current;return t.next=e,U(t.effect),t}function ga(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var _a=null;globalThis.requestAnimationFrame;var va=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},ya=class e{static create(){return new e}static request(e){return va.request(e)}static cancel(e){return va.cancel(e)}currentId=_a;request(e){this.cancel(),this.currentId=va.request(()=>{this.currentId=_a,e()})}cancel=()=>{this.currentId!==_a&&(va.cancel(this.currentId),this.currentId=_a)};disposeEffect=()=>this.cancel};function ba(){let e=Mn(ya.create).current;return Xr(e.disposeEffect),e}var xa={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Sa={...xa,position:`fixed`,top:0,left:0};({...xa});var Ca=O.forwardRef(function(e,t){let[n,r]=O.useState();U(()=>{fi&&di&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,V.jsx)(`span`,{...e,ref:t,style:Sa,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),wa=Math.min,Ta=Math.max,Ea=Math.round,Da=Math.floor,Oa=e=>({x:e,y:e}),ka={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Aa(e,t,n){return Ta(e,wa(t,n))}function ja(e,t){return typeof e==`function`?e(t):e}function Ma(e){return e.split(`-`)[0]}function Na(e){return e.split(`-`)[1]}function Pa(e){return e===`x`?`y`:`x`}function Fa(e){return e===`y`?`height`:`width`}function Ia(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function La(e){return Pa(Ia(e))}function Ra(e,t,n){n===void 0&&(n=!1);let r=Na(e),i=La(e),a=Fa(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=qa(o)),[o,qa(o)]}function za(e){let t=qa(e);return[Ba(e),t,Ba(t)]}function Ba(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Va=[`left`,`right`],Ha=[`right`,`left`],Ua=[`top`,`bottom`],Wa=[`bottom`,`top`];function Ga(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ha:Va:t?Va:Ha;case`left`:case`right`:return t?Ua:Wa;default:return[]}}function Ka(e,t,n,r){let i=Na(e),a=Ga(Ma(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ba)))),a}function qa(e){let t=Ma(e);return ka[t]+e.slice(t.length)}function Ja(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ya(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ja(e)}function Xa(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Za(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Qa(e,t=e?wn(e):null){return!e||!e.isConnected||!t||Za(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var $a=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function eo(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return fn(n)?n.host:null}function to(e){for(let t of Array.from(e.children))if(on(t)===`summary`)return t;return null}function no(e,t){let n=to(t);return!!n&&(e===n||W(n,e))}function ro(e){let t=e?on(e):``;return e!=null&&e.matches($a)&&(t!==`summary`||e.parentElement!=null&&on(e.parentElement)===`details`&&to(e.parentElement)===e)&&(t!==`details`||to(e)==null)&&(t!==`input`||e.type!==`hidden`)}function io(e){if(!ro(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=eo(t)){let n=t!==e,r=on(t)===`slot`;if(t.hasAttribute(`inert`)||n&&on(t)===`details`&&!t.open&&!no(e,t)||t.hasAttribute(`hidden`)||!r&&!ao(t,n))return!1}return!0}function ao(e,t){let n=wn(e);return t?n.display!==`none`:Qa(e,n)}function oo(e){let t=e.tabIndex;if(t<0){let t=on(e);if(t===`details`||t===`audio`||t===`video`||dn(e)&&e.isContentEditable)return 0}return t}function so(e){if(on(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function co(e,t){let n=so(e);if(!n)return!0;let r=t.find(e=>{let t=so(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=so(e);return t?.name===n.name&&t.form===n.form})===n}function lo(e){if(dn(e)&&on(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return dn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function uo(e,t){lo(e).forEach(e=>{ro(e)&&t.push(e),uo(e,t)})}function fo(e,t,n){lo(e).forEach(e=>{dn(e)&&e.matches(t)&&n.push(e),fo(e,t,n)})}function po(e){return io(e)&&oo(e)>=0}function mo(e){let t=[];return uo(e,t),t.filter(io)}function ho(e){let t=mo(e);return t.filter(e=>oo(e)>=0&&co(e,t))}function go(e,t){let n=ho(e),r=n.length;if(r===0)return;let i=bi(ir(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function _o(e){return go(ir(e).body,1)||e}function vo(e){return go(ir(e).body,-1)||e}function yo(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!W(n,r)}function bo(e){ho(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function xo(e){let t=[];fo(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function So(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...So(e,t.id,n)])}function Co(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function wo(e){return`data-base-ui-${e}`}var To=0;function Eo(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(To);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),vr;let o=requestAnimationFrame(a);return To=o,()=>{To===o&&(cancelAnimationFrame(o),To=0)}}var Do={inert:new WeakMap,"aria-hidden":new WeakMap},Oo=`data-base-ui-inert`,ko={inert:new WeakSet,"aria-hidden":new WeakSet},Ao=new WeakMap,jo=0;function Mo(e){return ko[e]}function No(e){return e?fn(e)?e.host:No(e.parentNode):null}var Po=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=No(t);return e.contains(n)?n:null}).filter(e=>e!=null),Fo=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Io=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{on(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Lo(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Po(t,e),l=i?Io(t,Fo(c),new Set(c)):[],u=[],d=[];if(a){let e=Do[a],n=Mo(a);s=n,o=e;let r=Po(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);Io(t,Fo(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(Ao.get(e)||0)+1;Ao.set(e,t),d.push(e),t===1&&e.setAttribute(Oo,``)}),jo+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(Ao.get(e)||0)-1;Ao.set(e,t),t||e.removeAttribute(Oo)}),--jo,jo||(Do.inert=new WeakMap,Do[`aria-hidden`]=new WeakMap,ko.inert=new WeakSet,ko[`aria-hidden`]=new WeakSet,Ao=new WeakMap)}}function Ro(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=ir(e[0]).body;return Lo(e,a,n,r,{mark:i})}var zo=0;function Bo(e,t=`mui`){let[n,r]=O.useState(e),i=e||n;return O.useEffect(()=>{n??(zo+=1,r(`${t}-${zo}`))},[n,t]),i}var Vo=An.useId;function Ho(e,t){if(Vo!==void 0){let n=Vo();return e??(t?`${t}-${n}`:n)}return Bo(e,t)}var Uo={style:{transition:`none`}},Wo={fallbackAxisSide:`end`},Go={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ko=l(h(),1),qo=O.createContext(null),Jo=()=>O.useContext(qo),Yo=wo(`portal`);function Xo(e={}){let{ref:t,container:n,componentProps:r=br,elementProps:i}=e,a=Ho(),o=Jo()?.portalNode,[s,c]=O.useState(null),[l,u]=O.useState(null),d=H(e=>{e!==null&&u(e)}),f=O.useRef(null);U(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(ln(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=wr(`div`,r,{ref:[t,d],props:[{id:a,[Yo]:``},i]}),m=s&&p?Ko.createPortal(p,s):null;return{node:l,nodeId:O.isValidElement(p)?p.props.id:void 0,subtree:m}}var Zo=O.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Xo({container:o,ref:t,componentProps:e,elementProps:c}),f=O.useRef(null),p=O.useRef(null),m=O.useRef(null),h=O.useRef(null),[g,_]=O.useState(null),v=O.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;O.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&yo(e)&&(e.type===`focusin`?v.current&&=(xo(l),!1):(bo(l),v.current=!0))}return ma(G(l,`focusin`,e,!0),G(l,`focusout`,e,!0))},[l,y]),U(()=>{l&&b===!0&&v.current&&(xo(l),v.current=!1)},[b,l]);let S=O.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,V.jsxs)(O.Fragment,{children:[d,(0,V.jsxs)(qo.Provider,{value:S,children:[x&&l&&(0,V.jsx)(Ca,{"data-type":`outside`,ref:f,onFocus:e=>{yo(e,l)?m.current?.focus():vo(g?g.domReference:null)?.focus()}}),x&&l&&(0,V.jsx)(`span`,{role:s,"aria-owns":u,style:Go}),l&&Ko.createPortal(a,l),x&&l&&(0,V.jsx)(Ca,{"data-type":`outside`,ref:p,onFocus:e=>{yo(e,l)?h.current?.focus():(_o(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,la(`focus-out`,e.nativeEvent)))}})]})]})});function Qo(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var $o=class{nodesRef={current:[]};events=Qo();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},es=O.createContext(null),ts=O.createContext(null),ns=()=>O.useContext(es)?.id||null,rs=e=>{let t=O.useContext(ts);return e??t};function is(e){let t=Ho(),n=rs(e),r=ns();return U(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function as(e){let{children:t,id:n}=e,r=ns();return(0,V.jsx)(es.Provider,{value:O.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function os(e){let{children:t,externalTree:n}=e,r=Mn(()=>n??new $o).current;return(0,V.jsx)(ts.Provider,{value:r,children:t})}function ss(e){return e==null?e:`current`in e?e.current:e}function cs(e,t){let n=sn(xi(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var ls=20,us=[];function ds(){us=us.filter(e=>e.deref()?.isConnected)}function fs(e){ds(),e&&on(e)!==`body`&&(us.push(new WeakRef(e)),us.length>ls&&(us=us.slice(-20)))}function ps(){return ds(),us[us.length-1]?.deref()}function ms(e){return e?po(e)?e:ho(e)[0]||e:null}function hs(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=mo(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return po(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function gs(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=H(()=>b.current.floatingContext?.nodeId),S=i===!1,C=Gi(_)&&S,w=ha(i),T=ha(a),E=ha(l),D=ha(g),k=rs(p),A=Jo(),j=O.useRef(!1),M=O.useRef(!1),N=O.useRef(!1),P=O.useRef(null),F=O.useRef(``),I=O.useRef(``),ee=O.useRef(null),te=O.useRef(null),L=lr(ee,f,A?.beforeInsideRef),ne=lr(te,A?.afterInsideRef),re=$r(),ie=$r(),ae=ba(),oe=A!=null,R=qi(v),se=H((e=R)=>e?ho(e):[]),ce=H(()=>m?.().filter(e=>e!=null)??[]);O.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&W(R,bi(ir(R)))&&se().length===0&&!C&&mi(e)}return G(ir(R),`keydown`,e)},[r,R,s,C,se]),O.useEffect(()=>{if(r||!g)return;let e=ir(R);function t(){N.current=!1}function n(e){let t=xi(e),n=ce(),r=W(v,t)||W(_,t)||W(A?.portalNode,t)||n.some(e=>e===t||W(e,t));N.current=!r,I.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(M.current=!0,ie.start(0,()=>{M.current=!1}))}function i(){I.current=`keyboard`}return ma(G(e,`pointerdown`,n,!0),G(e,`pointerup`,t,!0),G(e,`pointercancel`,t,!0),G(e,`keydown`,i,!0),t)},[r,v,_,R,g,A,ie,ce]),O.useEffect(()=>{if(r||!c)return;let e=ir(R);function t(){M.current=!0,ie.start(0,()=>{M.current=!1})}function n(e){let t=xi(e);po(t)&&(P.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=xi(t);s&&n==null&&i!=null&&W(v,i)&&fs(i),queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=ce(),f=n?.hasAttribute(wo(`focus-guard`))&&[ee.current,te.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,ss(d),ss(u)].includes(n),p=!(W(_,n)||W(v,n)||W(n,v)||W(A?.portalNode,n)||l.some(e=>e===n||W(e,n))||c.hasMatchingElement(e=>W(e,n))||f||k&&(So(k.nodesRef.current,a).find(e=>W(e.context?.elements.floating,n)||W(e.context?.elements.domReference,n))||Co(k.nodesRef.current,a).find(e=>[e.context?.elements.floating,qi(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&R&&hs(R),o&&r!==_&&!Qa(i)&&bi(e)===e.body){if(dn(R)&&(R.focus(),o===`popup`)){ae.request(()=>{R.focus()});return}let e=se(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||R;dn(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!M.current&&(C||n!==ps())&&(j.current=!0,h.setOpen(!1,la(aa,t)))})}function a(){N.current||(b.current.insideReactTree=!0,re.start(0,()=>{b.current.insideReactTree=!1}))}let l=dn(_)?_:null;if(v||l)return ma(l&&G(l,`focusout`,i),l&&G(l,`pointerdown`,t),v&&G(v,`focusin`,n),v&&G(v,`focusout`,i),v&&A&&G(v,`focusout`,a,!0))},[r,_,v,R,s,k,A,h,c,o,se,C,x,b,re,ie,ae,u,d,ce]),O.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${wo(`portal`)}]`)||[]),t=(k?Co(k.nodesRef.current,x()):[]).find(e=>Gi(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Ro([v,...e,ee.current,te.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ce(),t,ss(d),ss(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=Ro([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,A,C,k,x,u,d,ce]),U(()=>{if(!g||r||!dn(R))return;F.current=``,I.current=``;let e=ir(R),t=bi(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(E.current||``):n;if(r===void 0||r===!1||W(R,t))return;let i=null,a=()=>(i??=se(R),i[0]||R),o;o=r===!0||r===null?a():ss(r),o||=a();let s=W(R,bi(e));Eo(o,{preventScroll:o===R,shouldFocus(){if(!D.current)return!1;if(s)return!0;let t=bi(e);return!(t!==o&&W(R,t))}})})},[r,g,R,se,w,E,D]),U(()=>{if(r||!R)return;let e=ir(R),t=bi(e),n=E.current==null;fs(t);function i(e){if(e.open||(F.current=cs(e.nativeEvent,I.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(gi(e.nativeEvent)||_i(e.nativeEvent))j.current=!1;else{let e=!1;ir(R).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&on(t)!==`body`?t:null,s=n?o||a:a||o;return s||=ps()||null,typeof i==`boolean`?s:ss(i)||s||null}return()=>{y.off(`openchange`,i);let t=bi(e),n=ce(),r=W(v,t)||n.some(e=>e===t||W(e,t))||k&&So(k.nodesRef.current,x(),!1).some(e=>W(e.context?.elements.floating,t)),o=T.current,s=F.current,c=a(s);queueMicrotask(()=>{let n=ms(c),i=typeof o!=`boolean`;if(o&&!j.current&&dn(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,R,T,E,y,k,_,x,ce]),U(()=>{if(!di||g||!v)return;let e=bi(ir(v));dn(e)&&Ui(e)&&W(v,e)&&e.blur()},[g,v]),U(()=>{if(!r&&A)return A.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,s,g,h,c,_]),U(()=>{if(!r&&R)return hs(R),()=>{queueMicrotask(ds)}},[r,R]);let le=!r&&(!s||!C)&&(oe||s);return(0,V.jsxs)(O.Fragment,{children:[le&&(0,V.jsx)(Ca,{"data-type":`inside`,ref:L,onFocus:e=>{if(s){let e=se();Eo(e[e.length-1])}else A?.portalNode&&(j.current=!1,yo(e,A.portalNode)?_o(_)?.focus():ss(d??A.beforeOutsideRef)?.focus())}}),n,le&&(0,V.jsx)(Ca,{"data-type":`inside`,ref:ne,onFocus:e=>{s?Eo(se()[0]):A?.portalNode&&(c&&(j.current=!0),yo(e,A.portalNode)?vo(_)?.focus():ss(u??A.afterOutsideRef)?.focus())}})]})}function _s(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function vs(e){return e!=null&&e.clientX!=null}function ys(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=O.useRef(!1),u=O.useRef(null),[d,f]=O.useState(),[p,m]=O.useState([]),h=H(e=>{i.set(`positionReference`,e)}),g=H((e,t,n)=>{l.current||(!c.current.openEvent||vs(c.current.openEvent))&&i.set(`positionReference`,_s(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),_=H(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),v=vi(d)?o:a;O.useEffect(()=>{if(!n){h(s);return}if(!v)return;function e(){u.current?.(),u.current=null}let t=sn(o);function r(t){let n=xi(t);W(o,n)?e():g(t.clientX,t.clientY)}return!c.current.openEvent||vs(c.current.openEvent)?u.current=G(t,`mousemove`,r):h(s),e},[v,n,o,c,s,i,g,h,p]),O.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),O.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),O.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let y=O.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return O.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}function bs(){return!1}function xs(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Ss(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=bs,bubbles:s,externalTree:c}=t,l=`rootStore`in e?e.rootStore:e,u=l.useState(`open`),d=l.useState(`floatingElement`),{dataRef:f,events:p}=l.context,m=rs(c),h=H(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=H(()=>a),{escapeKey:y,outsidePress:b}=xs(s),x=O.useRef(!1),S=O.useRef(!1),C=O.useRef(!1),w=O.useRef(!1),T=O.useRef(!1),E=O.useRef(``),D=O.useRef(null),k=$r(),A=$r(),j=H(()=>{A.clear(),f.current.insideReactTree=!1}),M=H(e=>{let t=f.current.floatingContext?.nodeId;return(m?So(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=H(e=>Vi(e,l.select(`floatingElement`))||Vi(e,l.select(`domReferenceElement`))),P=H(e=>{o()&&l.setOpen(!1,la(ea,e.nativeEvent))}),F=H(e=>{if(!u||!n||!r||e.key!==`Escape`||T.current||!y&&M(`__escapeKeyBubbles`))return;let t=la(oa,hi(e)?e.nativeEvent:e);l.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),I=H(()=>{f.current.insideReactTree=!0,A.start(0,j)}),ee=H(e=>{if(!u||!n||e.button!==0)return;let t=xi(e.nativeEvent);W(l.select(`floatingElement`),t)&&(x.current||(x.current=!0,S.current=!1))}),te=H(e=>{u&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});O.useEffect(()=>{function e(e){e.open||(w.current=!1)}return p.on(`openchange`,e),()=>{p.off(`openchange`,e)}},[p]),O.useEffect(()=>{if(!u||!n)return u||(w.current=!1),j;f.current.__escapeKeyBubbles=y,f.current.__outsidePressBubbles=b;let e=new Qr,t=new Qr,i=ir(d);function a(){e.clear(),T.current=!0}function o(){e.start(di?5:0,()=>{T.current=!1})}function s(){C.current=!0,t.start(0,()=>{C.current=!1})}function c(){x.current=!1,S.current=!1}function p(){let e=E.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function h(e){let t=p();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=f.current.floatingContext?.nodeId,n=m&&So(m.nodesRef.current,t).some(t=>Vi(e,t.context?.elements.floating));return N(e)||n}function A(e){if(h(e)){e.type!==`click`&&!N(e)&&(t.clear(),C.current=!1),j();return}if(f.current.insideReactTree){j();return}let n=xi(e),r=`[${wo(`inert`)}]`,i=un(n)?n.getRootNode():null,a=Array.from((fn(i)?i:ir(l.select(`floatingElement`))).querySelectorAll(r)),o=l.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>W(e,n))))return;let s=un(n)?n:null;for(;s&&!Cn(s);){let e=En(s);if(Cn(e)||!un(e))break;s=e}if(!(a.length&&un(n)&&!Hi(n)&&!W(n,l.select(`floatingElement`))&&a.every(e=>!W(s,e)))){if(dn(n)&&!(`touches`in e)){let t=Cn(n),r=wn(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!O(e)){if(p()===`intentional`){if(e.detail!==0&&!gi(e)&&!w.current)return;if(C.current){t.clear(),C.current=!1;return}}(typeof g!=`function`||g(e))&&(M(`__outsidePressBubbles`)||(l.setOpen(!1,la(ra,e)),j()))}}}function P(e){p()===`sloppy`&&e.pointerType!==`touch`&&l.select(`open`)&&n&&!N(e)&&A(e)}function I(e){if(p()!==`sloppy`||!l.select(`open`)||!n||N(e))return;let t=e.touches[0];t&&(D.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},k.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function ee(e,t){let n=xi(e);if(!n)return;let r=G(n,e.type,()=>{t(e),r()})}function te(e){E.current=`touch`,ee(e,I)}function L(e){k.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),E.current=e.pointerType),(e.type!==`mousedown`||!D.current||D.current.dismissOnMouseDown)&&ee(e,e=>{e.type===`pointerdown`?P(e):A(e)})}function ne(e){if(e.type===`pointercancel`&&(w.current=!1),!x.current)return;let n=S.current;if(c(),p()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!O(e)){if(n){s();return}(typeof g!=`function`||g(e))&&(t.clear(),C.current=!0,j())}}}function re(e){if(p()!==`sloppy`||!D.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-D.current.startX),r=Math.abs(t.clientY-D.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(D.current.dismissOnTouchEnd=!0),i>10&&(A(e),k.clear(),D.current=null)}function ie(e){ee(e,re)}function ae(e){p()===`sloppy`&&D.current&&!N(e)&&(D.current.dismissOnTouchEnd&&A(e),k.clear(),D.current=null)}function oe(e){ee(e,ae)}let R=ma(r&&ma(G(i,`keydown`,F),G(i,`compositionstart`,a),G(i,`compositionend`,o)),_&&ma(G(i,`click`,L,!0),G(i,`pointerdown`,L,!0),G(i,`pointerup`,ne,!0),G(i,`pointercancel`,ne,!0),G(i,`mousedown`,L,!0),G(i,`mouseup`,ne,!0),G(i,`touchstart`,te,{capture:!0,passive:!0}),G(i,`touchmove`,ie,{capture:!0,passive:!0}),G(i,`touchend`,oe,{capture:!0,passive:!0})));return()=>{R(),e.clear(),t.clear(),c(),C.current=!1,j()}},[f,d,r,_,g,u,n,y,b,F,j,v,M,N,m,l,k]);let L=O.useMemo(()=>({onKeyDown:F,onPointerDown:P,onClick:P}),[F,P]),ne=O.useMemo(()=>({onKeyDown:F,onPointerDown:te,onMouseDown:te,onClickCapture:I,onMouseDownCapture(e){I(),ee(e)},onPointerDownCapture(e){I(),ee(e)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[F,I,ee,te]);return O.useMemo(()=>n?{reference:L,floating:ne,trigger:L}:{},[n,L,ne])}function Cs(e,t,n){let{reference:r,floating:i}=e,a=Ia(t),o=La(t),s=Fa(o),c=Ma(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Na(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function ws(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ja(t,e),p=Ya(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Xa(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Xa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ts=50,Es=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ws},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Cs(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ts&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Cs(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ds=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ja(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ma(r),_=Ia(o),v=Ma(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[qa(o)]:za(o)),x=p!==`none`;!d&&x&&b.push(...Ka(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Ra(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Ia(t)||T.every(e=>Ia(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ia(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},Os=new Set([`left`,`top`]);async function ks(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ma(n),s=Na(n),c=Ia(n)===`y`,l=Os.has(o)?-1:1,u=a&&c?-1:1,d=ja(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var As=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ks(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},js=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ja(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ia(i),p=Pa(f),m=u[p],h=u[f],g=(e,t)=>Aa(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ms=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ja(e,t),u={x:n,y:r},d=Ia(i),f=Pa(d),p=u[f],m=u[d],h=ja(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Os.has(Ma(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ns=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=ja(e,t),c=await i.detectOverflow(t,s),l=Ma(n),u=Na(n),d=Ia(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=wa(p-c[m],g),y=wa(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Ta(c.left,c.right):S=p-2*Ta(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ps(e){let t=wn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=dn(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ea(n)!==a||Ea(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Fs(e){return un(e)?e:e.contextElement}function Is(e){let t=Fs(e);if(!dn(t))return Oa(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ps(t),o=(a?Ea(n.width):n.width)/r,s=(a?Ea(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ls=Oa(0);function Rs(e){let t=sn(e);return!Sn()||!t.visualViewport?Ls:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zs(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===sn(e)}function Bs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Fs(e),o=Oa(1);t&&(r?un(r)&&(o=Is(r)):o=Is(e));let s=zs(a,n,r)?Rs(a):Oa(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=sn(a),t=un(r)?sn(r):r,n=e,i=kn(n);for(;i&&t!==n;){let e=Is(i),t=i.getBoundingClientRect(),r=wn(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=sn(i),i=kn(n)}}return Xa({width:u,height:d,x:c,y:l})}function Vs(e,t){let n=Tn(e).scrollLeft;return t?t.left+n:Bs(cn(e)).left+n}function Hs(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Vs(e,n),y:n.top+t.scrollTop}}function Us(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=cn(r),s=t?hn(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Oa(1),u=Oa(0),d=dn(r);if((d||!a)&&((on(r)!==`body`||pn(o))&&(c=Tn(r)),d)){let e=Bs(r);l=Is(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Hs(o,c):Oa(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ws(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Gs(e){let t=Tn(e),n=e.ownerDocument.body,r=Ta(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ta(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Vs(e),o=-t.scrollTop;return wn(n).direction===`rtl`&&(a+=Ta(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Ks=25;function qs(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=sn(e),a=cn(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Sn()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Vs(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Ks&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Js(e,t){let n=Bs(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Is(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ys(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=qs(e,n,t);else if(t===`document`)r=Gs(cn(e));else if(un(t))r=Js(t,n);else{let n=Rs(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Xa(r)}function Xs(e,t){let n=t.get(e);if(n)return n;let r=On(e,[],!1).filter(e=>un(e)&&on(e)!==`body`),i=null,a=wn(e).position===`fixed`,o=a?En(e):e;for(;un(o)&&!Cn(o);){let e=wn(o),t=bn(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=En(o)}return t.set(e,r),r}function Zs(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?hn(t)?[]:Xs(t,this._c):[].concat(n),r],o=Ys(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ys(t,a[e],i);s=Ta(n.top,s),c=wa(n.right,c),l=wa(n.bottom,l),u=Ta(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Qs(e){let{width:t,height:n}=Ps(e);return{width:t,height:n}}function $s(e,t,n){let r=dn(t),i=cn(t),a=n===`fixed`,o=Bs(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Oa(0);if((r||!a)&&((on(t)!==`body`||pn(i))&&(s=Tn(t)),r)){let e=Bs(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Vs(i));let l=i&&!r&&!a?Hs(i,s):Oa(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function ec(e){return wn(e).position===`static`}function tc(e,t){if(!dn(e)||wn(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return cn(e)===n&&(n=n.ownerDocument.body),n}function nc(e,t){let n=sn(e);if(hn(e))return n;if(!dn(e)){let t=En(e);for(;t&&!Cn(t);){if(un(t)&&!ec(t))return t;t=En(t)}return n}let r=tc(e,t);for(;r&&mn(r)&&ec(r);)r=tc(r,t);return r&&Cn(r)&&ec(r)&&!bn(r)?n:r||xn(e)||n}var rc=async function(e){let t=this.getOffsetParent||nc,n=this.getDimensions,r=await n(e.floating);return{reference:$s(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ic(e){return wn(e).direction===`rtl`}var ac={convertOffsetParentRelativeRectToViewportRelativeRect:Us,getDocumentElement:cn,getClippingRect:Zs,getOffsetParent:nc,getElementRects:rc,getClientRects:Ws,getDimensions:Qs,getScale:Is,isElement:un,isRTL:ic};function oc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sc(e,t,n){let r=null,i,a=cn(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Da(d),h=Da(a.clientWidth-(u+f)),g=Da(a.clientHeight-(d+p)),_=Da(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ta(0,wa(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!oc(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=sn(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function cc(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Fs(e),u=i||a?[...l?On(l):[],...t?On(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?sc(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Bs(e):null;c&&g();function g(){let t=Bs(e);h&&!oc(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var lc=As,uc=js,dc=Ds,fc=Ns,pc=Ms,mc=(e,t,n)=>{let r=new Map,i=n??{},a={...ac,...i.platform,_c:r};return Es(e,t,{...i,platform:a})},hc=typeof document<`u`?O.useLayoutEffect:function(){};function gc(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,i;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(!gc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!gc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function _c(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vc(e,t){let n=_c(e);return Math.round(t*n)/n}function yc(e){let t=O.useRef(e);return hc(()=>{t.current=e}),t}function bc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=O.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=O.useState(r);gc(f,r)||p(r);let[m,h]=O.useState(null),[g,_]=O.useState(null),v=O.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=O.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=O.useRef(null),C=O.useRef(null),w=O.useRef(u),T=c!=null,E=yc(c),D=yc(i),k=yc(l),A=O.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),mc(S.current,C.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!gc(w.current,t)&&(w.current=t,Ko.flushSync(()=>{d(t)}))})},[f,t,n,D,k]);hc(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=O.useRef(!1);hc(()=>(j.current=!0,()=>{j.current=!1}),[]),hc(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,A);A()}},[b,x,A,E,T]);let M=O.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),N=O.useMemo(()=>({reference:b,floating:x}),[b,x]),P=O.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=vc(N.floating,u.x),r=vc(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,..._c(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return O.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var xc=(e,t)=>{let n=lc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sc=(e,t)=>{let n=uc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cc=(e,t)=>({fn:pc(e).fn,options:[e,t]}),wc=(e,t)=>{let n=dc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tc=(e,t)=>{let n=fc(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Ec(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function Dc(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function Oc(e){let t=[],n,r=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of Array.from(e).sort((e,t)=>e.top-t.top)){if(r=Math.min(r,s.left),i=Math.min(i,s.top),a=Math.max(a,s.right),o=Math.max(o,s.bottom),!n||s.top-n.top>n.height/2)t.push(Dc(s));else{let e=t[t.length-1];e.left=Math.min(e.left,s.left),e.right=Math.max(e.right,s.right),e.bottom=Math.max(e.bottom,s.bottom),e.width=e.right-e.left,e.height=e.bottom-e.top}n=s}return{lines:t,fallback:Ec(r,i,a,o)}}function kc(e,t,n){return e.findIndex(e=>t>e.left-2&&t<e.right+2&&n>e.top-2&&n<e.bottom+2)}function Ac(e){return Ec(e.left,e.top,e.right,e.bottom)}function jc(e,t,n){let{lines:r}=Oc(e.getClientRects());if(r.length<2)return;let i=kc(r,t,n);return{x:t,y:n,lineIndex:i===-1?void 0:i,element:e}}function Mc(e,t,n){let{lines:r,fallback:i}=Oc(e.getClientRects());if(r.length<2)return null;let a=n?.x,o=n?.y,s=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return Ac(r[n.lineIndex]);if(a!=null&&o!=null){let e=kc(r,a,o);if(e!==-1)return Ac(r[e])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&o!=null)return i;if(s===`t`||s===`b`){let e=r[0],t=r[r.length-1],n=s===`t`?e:t;return Ec(n.left,e.top,n.right,t.bottom)}let c=s===`l`,l=r[0].left,u=r[0].right,d=c?1/0:-1/0,f=r[0],p=r[0];for(let e of r){l=Math.min(l,e.left),u=Math.max(u,e.right);let t=c?e.left:e.right;c&&t<d||!c&&t>d?(d=t,f=e,p=e):t===d&&(p=e)}return Ec(l,f.top,u,p.bottom)}function Nc(e){return`contextElement`in e&&e.contextElement?e.contextElement:un(e)?e:void 0}function Pc(e,t){function n(t){Fc(e,t.currentTarget,t.clientX,t.clientY)}function r(e){t||n(e)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function Fc(e,t,n,r){let i=jc(t,n,r);return e.current=i,i}function Ic(e){return{name:`inline`,async fn(t){let n=t.elements.reference;if(typeof n?.getClientRects!=`function`)return{};let r=Nc(n),i=e.current,a=i?.element===n||i?.element===r?i:void 0,o=Mc(n,t.placement,a);if(!o||typeof t.platform.getElementRects!=`function`)return{};let s=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return o}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===s.reference.x&&t.rects.reference.y===s.reference.y&&t.rects.reference.width===s.reference.width&&t.rects.reference.height===s.reference.height?{}:{reset:{rects:s}}}}}var Lc=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Rc=o(((e,t)=>{t.exports=Lc()})),zc=o((e=>{var t=d(),n=Rc();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Bc=o(((e,t)=>{t.exports=zc()})),Vc=Rc(),Hc=Bc(),Uc=gr(19)?Kc:qc;function Wc(e,t,n,r,i){return Uc(e,t,n,r,i)}function Gc(e,t,n,r,i){let a=O.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Vc.useSyncExternalStore)(e.subscribe,a,a)}Wr({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Vc.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Kc(e,t,n,r,i){let a=Ur();if(!a)return Gc(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function qc(e,t,n,r,i){return(0,Hc.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Jc=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Wc(this,e,t,n,r)}},Yc=class extends Jc{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){O.useDebugValue(e);let n=this;U(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;U(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;U(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){O.useDebugValue(e);let n=this,r=t!==void 0;U(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return O.useDebugValue(e),Wc(this,this.selectors[e],t,n,r)}useContextCallback(e,t){O.useDebugValue(e);let n=H(t??vr);this.context[e]=n}useStateSetter(e){let t=O.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Xc={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Zc=class extends Yc{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Qo(),nested:n,triggerElements:i},Xc),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&yi(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Qc(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=O.useRef(null);r===void 0&&f.current===null&&(f.current=new Zc({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),U(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};un(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}function $c(e,t=!1,n=!1,r=!1){let[i,a]=O.useState(e&&t?`idle`:void 0),[o,s]=O.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),U(()=>{if(!e&&o&&i!==`ending`&&n){let e=ya.request(()=>{a(`ending`)});return()=>{ya.cancel(e)}}},[e,o,i,n]),U(()=>{if(!e||t)return;let n=ya.request(()=>{a(void 0)});return()=>{ya.cancel(n)}},[t,e]),U(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=ya.request(()=>{a(`idle`)});return()=>{ya.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}var el=null;function tl(e){if(!el){let e=[];el=e,queueMicrotask(()=>{el=null,Ko.flushSync(()=>{for(let t of e)t()})})}el.push(e)}function nl(e,t=!1,n=!1){let r=ba();return H((i,a=null)=>{r.cancel();let o=ss(e);if(o==null)return;let s=o,c=()=>{if(!n){Ko.flushSync(i);return}tl(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(s.getAnimations().some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=wi;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function rl(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=H(a),s=nl(r,n,i);O.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var il={tabIndex:-1,[Si]:``};function al(e){return t=>t!==`touch`||e.current}function ol(e,t=!1){let n=Ho(),r=ns()!=null,i=Mn(()=>e(n,r)).current;return Qc({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function sl({handle:e,store:t}){return U(()=>e.attachStore(t),[e,t]),null}function cl(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function ll(e,t){let n=O.useRef(null);return H(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),cl(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),cl(t))})}function ul(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s}}function dl(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function fl(e,t,n,r={}){let i=n.reason,a=i===ta,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=dl(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=ul(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?Ko.flushSync(l):l()}function pl(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=ll(e,n),o=H(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=H(e=>{a(e),e&&o(e)});return U(()=>(s(t.current),()=>s(null)),[s,t,n,e]),U(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function ml(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=O.useRef(null),i=e.useState(`open`);U(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=la($i);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function hl(e,t,n,r){let{mounted:i,setMounted:a,transitionStatus:o}=$c(e,!1,!1,r),s=t.useState(`preventUnmountingOnClose`),c=!e&&s;t.useSyncedValues({mounted:i,transitionStatus:o,preventUnmountingOnClose:c});let l=H(()=>{a(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return rl({enabled:i&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:o}}function gl(e,t){e.useSyncedValues(t),U(()=>()=>{e.update({activeTriggerProps:br,inactiveTriggerProps:br,popupProps:br})},[e])}function _l(e,t){U(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),U(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var vl=class{constructor(){this.idMap=new Map}add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}};function yl(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Zc({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:br,inactiveTriggerProps:br,popupProps:br}}var bl=e=>e.triggerIdProp??e.activeTriggerId,xl=e=>e.openProp??e.open,Sl=e=>(e.popupElement?.id??e.floatingId)||void 0;function Cl(e,t){return t!==void 0&&xl(e)&&bl(e)===t}function wl(e,t){return Cl(e,t)?!0:t!==void 0&&xl(e)&&bl(e)==null&&e.triggerCount===1}var Tl={open:xl,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:bl,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Sl,isTriggerActive:(e,t)=>t!==void 0&&bl(e)===t,isOpenedByTrigger:(e,t)=>Cl(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&bl(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>wl(e,t)?Sl(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function El(e){let t=O.useCallback(t=>e===void 0?vr:e.subscribeStore(t),[e]),n=O.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Vc.useSyncExternalStore)(t,n,()=>e?.serverStore)}function Dl(e){return Ol(e,e.rootContext)}function Ol(e,t){let{nodeId:n,externalTree:r}=e,i=t.useState(`referenceElement`),a=t.useState(`floatingElement`),o=t.useState(`domReferenceElement`),s=t.useState(`open`),c=t.useState(`floatingId`),[l,u]=O.useState(null),[d,f]=O.useState(void 0),[p,m]=O.useState(void 0),h=O.useRef(null),g=rs(r),_=O.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),v=bc({...e,elements:{..._,...l&&{reference:l}}}),y=un(d)?d:null,b=p===void 0?t.state.floatingElement:p;t.useSyncedValue(`referenceElement`,d??null),t.useSyncedValue(`domReferenceElement`,d===void 0?o:y),t.useSyncedValue(`floatingElement`,b);let x=O.useCallback(e=>{let t=un(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),v.refs.setReference(t)},[v.refs]),S=O.useCallback(e=>{(un(e)||e===null)&&(h.current=e,f(e)),(un(v.refs.reference.current)||v.refs.reference.current===null||e!==null&&!un(e))&&v.refs.setReference(e)},[v.refs,f]),C=O.useCallback(e=>{m(e),v.refs.setFloating(e)},[v.refs]),w=O.useMemo(()=>({...v.refs,setReference:S,setFloating:C,setPositionReference:x,domReference:h}),[v.refs,S,C,x]),T=O.useMemo(()=>({...v.elements,domReference:o}),[v.elements,o]),E=O.useMemo(()=>({...v,dataRef:t.context.dataRef,open:s,onOpenChange:t.setOpen,events:t.context.events,floatingId:c,refs:w,elements:T,nodeId:n,rootStore:t}),[v,w,T,n,t,s,c]);return U(()=>{o&&(h.current=o)},[o]),U(()=>{t.context.dataRef.current.floatingContext=E;let e=g?.nodesRef.current.find(e=>e.id===n);e&&(e.context=E)}),O.useMemo(()=>({...v,context:E,refs:w,elements:T,rootStore:t}),[v,w,T,E,t])}var kl=li&&di;function Al(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=O.useRef(!1),c=O.useRef(null),l=O.useRef(!0),u=$r();O.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=sn(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&dn(e)&&e===bi(ir(e))&&(s.current=!0,c.current=e)}function a(){l.current=!0}function o(){l.current=!1}return ma(G(t,`blur`,r),kl&&G(t,`keydown`,a,!0),kl&&G(t,`pointerdown`,o,!0))},[i,n]),O.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);un(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=O.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=xi(t.nativeEvent);if(un(a)){if(kl&&!t.relatedTarget){if(!l.current&&!Ui(a))return}else if(!Ki(a))return}let o=Bi(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,la(na,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,la(na,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=un(n)&&n.hasAttribute(wo(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=bi(ir(e));(n||t!==e)&&(W(o.current.floatingContext?.refs.floating.current,t)||W(e,t)||a||Bi(n??t,i.context.triggerElements)||i.setOpen(!1,la(na,r)))})}}},[o,r,i,u]);return O.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var jl=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Qr,this.restTimeout=new Qr,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Ml=new WeakMap;function Nl(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Ml.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Ml.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Pl(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Ml.get(n);a&&a!==e&&Nl(a),Nl(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Ml.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Fl(e){let t=e.context.dataRef.current,n=Mn(()=>t.hoverInteractionState??jl.create()).current;return t.hoverInteractionState||=n,Xr(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Il(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=rs(),d=ns(),f=Fl(a),p=$r(),m=H(()=>Zi(l.current.openEvent?.type,f.interactedInside)),h=H(()=>Qi(l.current.openEvent?.type)),g=H(()=>{Nl(f)});U(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),O.useEffect(()=>g,[g]),U(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&un(c)&&s){let e=c,t=s,n=ir(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r,o=f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body;return Pl(f,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),O.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&So(u.nodesRef.current,d).length>0)}function t(e){let t=Yi(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,la(ta,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=xi(e);if(!Wi(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,v),g()}function _(n){if(e()&&u){u.events.on(`floating.closed`,v);return}if(Bi(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&un(o)&&So(u.nodesRef.current,r,!1).some(e=>W(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&t(n)}}function v(t){u&&d&&!e()&&p.start(0,()=>{u.events.off(`floating.closed`,v),a.setOpen(!1,la(ta,t)),u.events.emit(`floating.closed`,t)})}let y=s;return ma(y&&G(y,`mouseenter`,c),y&&G(y,`mouseleave`,_),y&&G(y,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,v)})},[n,s,a,l,r,i,h,m,g,f,u,d,p])}var Ll={current:null};function Rl(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Ll,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,h=`rootStore`in e?e.rootStore:e,{dataRef:g,events:_}=h.context,v=rs(l),y=Fl(h),b=O.useRef(!1),x=ha(i),S=ha(r),C=ha(o),w=ha(n),T=ha(p),E=ha(f),D=H(()=>Zi(g.current.openEvent?.type,y.interactedInside)),k=H(()=>T.current?.()!==!1),A=H((e,t,n)=>{let r=h.context.triggerElements;if(r.hasElement(t))return!e||!W(e,t);if(!un(n))return!1;let i=n;return r.hasMatchingElement(e=>W(e,i))&&(!e||!W(e,i))}),j=H(()=>{y.handler&&=(ir(h.select(`domReferenceElement`)).removeEventListener(`mousemove`,y.handler),void 0)}),M=H(()=>{Nl(y)});return u&&(y.handleCloseOptions=i?.__options),O.useEffect(()=>j,[j]),O.useEffect(()=>{if(!n)return;function e(e){e.open?b.current=!1:(b.current=e.reason===ta,j(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return _.on(`openchange`,e),()=>{_.off(`openchange`,e)}},[n,_,y,j]),O.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=Yi(S.current,`close`,y.pointerType);n?y.openChangeTimeout.start(n,()=>{h.setOpen(!1,la(ta,e)),v?.events.emit(`floating.closed`,e)}):t&&(y.openChangeTimeout.clear(),h.setOpen(!1,la(ta,e)),v?.events.emit(`floating.closed`,e))}let t=c.current??(u?h.select(`domReferenceElement`):null);if(!un(t))return;function r(e){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,a&&!vi(y.pointerType))return;let t=Xi(C.current),n=Yi(S.current,`open`,y.pointerType),r=xi(e),i=e.currentTarget??null,o=h.select(`domReferenceElement`),s=i;if(un(r)&&!h.context.triggerElements.hasElement(r)){for(let e of h.context.triggerElements.elements())if(W(e,r)){s=e;break}}un(i)&&un(o)&&!h.context.triggerElements.hasElement(i)&&W(i,o)&&(s=o);let c=s!=null&&A(o,s,r),l=h.select(`open`),u=E.current?.()??h.select(`transitionStatus`)===`ending`,d=!l&&u&&b.current,f=!c&&un(s)&&un(o)&&W(o,s)&&d,p=t>0&&!n,m=c&&(l||d)||f,g=!l||c;if(m){k()&&h.setOpen(!0,la(ta,e,s));return}p||(n?y.openChangeTimeout.start(n,()=>{g&&k()&&h.setOpen(!0,la(ta,e,s))}):g&&k()&&h.setOpen(!0,la(ta,e,s)))}function i(t){if(D()){M();return}j();let n=ir(h.select(`domReferenceElement`));y.restTimeout.clear(),y.restTimeoutPending=!1;let r=g.current.floatingContext??d?.();if(!Bi(t.relatedTarget,h.context.triggerElements)){if(x.current&&r){h.select(`open`)||y.openChangeTimeout.clear();let i=c.current;y.handler=x.current({...r,tree:v,x:t.clientX,y:t.clientY,onClose(){M(),j(),w.current&&!D()&&i===h.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,y.handler),y.handler(t);return}(y.pointerType!==`touch`||!W(h.select(`floatingElement`),t.relatedTarget))&&e(t)}}function o(e){W(t,e.relatedTarget)||(y.openChangeTimeout.clear(),y.restTimeout.clear(),y.restTimeoutPending=!1)}let l=m?G(t,`mouseout`,o):void 0;return s?ma(G(t,`mousemove`,r,{once:!0}),G(t,`mouseenter`,r),G(t,`mouseleave`,i),l):ma(G(t,`mouseenter`,r),G(t,`mouseleave`,i),l)},[j,M,g,S,h,n,x,y,u,A,D,a,s,C,c,v,w,d,E,k,m]),O.useMemo(()=>{if(!n)return;function e(e){y.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=h.select(`domReferenceElement`),i=h.select(`open`),o=A(r,n,e.target);if(a&&!vi(y.pointerType))return;if(i&&o&&y.handleCloseOptions?.blockPointerEvents){let e=h.select(`floatingElement`);if(e){let t=y.handleCloseOptions?.getScope?.()??n.ownerDocument.body;Pl(y,{scopeElement:t,referenceElement:n,floatingElement:e})}}let s=Xi(C.current);if(i&&!o||s===0||!o&&y.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;y.restTimeout.clear();function c(){if(y.restTimeoutPending=!1,D())return;let e=h.select(`open`);!y.blockMouseMove&&(!e||o)&&k()&&h.setOpen(!0,la(ta,t,n))}y.pointerType===`touch`?Ko.flushSync(()=>{c()}):o&&i?c():(y.restTimeoutPending=!0,y.restTimeout.start(s,c))}}},[n,y,D,A,a,h,C,k])}var zl=.1,Bl=zl*zl,Vl=.5;function Hl(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Ul(e,t,n,r,i,a,o,s,c,l){let u=!1;return Hl(e,t,n,r,i,a)&&(u=!u),Hl(e,t,i,a,o,s)&&(u=!u),Hl(e,t,o,s,c,l)&&(u=!u),Hl(e,t,c,l,n,r)&&(u=!u),u}function Wl(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Gl(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Kl(e={}){let{blockPointerEvents:t=!1}=e,n=new Qr,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Bl;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=xi(r),g=r.type===`mouseleave`,_=W(u,h),v=W(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&un(r.relatedTarget)&&W(u,r.relatedTarget))return;function y(){return!!(s&&So(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Gl(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Gl(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Gl(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Gl(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!Wl(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Vl/2:Vl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Vl+1,o=C||T?S.bottom-Vl:S.top,s=C?T?S.bottom-Vl:S.top:S.bottom-Vl;M=Ul(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Vl/2:Vl*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Vl,o=C||T?S.top+Vl:S.bottom,s=C?T?S.top+Vl:S.bottom:S.top+Vl;M=Ul(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Vl/2:Vl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Vl+1,o=w||E?S.right-Vl:S.left,s=w?E?S.right-Vl:S.left:S.right-Vl;M=Ul(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Vl/2:Vl*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Vl,o=w||E?S.left+Vl:S.right,s=w?E?S.left+Vl:S.right:S.left+Vl;M=Ul(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var ql={...Tl,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Jl=class extends Yc{constructor(e,t,n){let r=new vl;super(Yl(e,r,t,n),Xl(r),ql)}setOpen=(e,t)=>{fl(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,la(ea,e))}};function Yl(e,t,n,r=!1){return{...yl(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Xl(e){return{popupRef:O.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Zl=Gr(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=ol((e,t)=>new Jl({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),ml(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=hl(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=O.useRef(null);U(()=>{m&&t&&p.setOpen(!1,la(sa))},[m,t,p]),U(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),U(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),O.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,la(ca))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,V.jsxs)(Jr.Provider,{value:p,children:[l&&(0,V.jsx)(sl,{handle:l,store:p}),T&&(0,V.jsx)(Ql,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Ql({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=Ss(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=ys(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=O.useMemo(()=>zn(a.reference,i.reference),[a.reference,i.reference]);return gl(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??br}),null}function $l(e){return Ho(e,`base-ui`)}var eu=O.createContext(void 0);function tu(){return O.useContext(eu)}var nu=`data-base-ui-tooltip-trigger`;function ru(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;e<t.length;e+=1){let n=t[e];if(un(n))return n}}let t=e.target;return un(t)?t:null}function iu(e){let t=e;for(;t;){let e=t.closest(`[${nu}]`);if(e)return e;let n=t.getRootNode();t=`host`in n&&un(n.host)?n.host:null}return null}var au=Kr(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=Yr(!0),m=El(a)??p;if(!m)throw Error(er(82));let h=$l(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=O.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=pl(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=tu(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=pa(v,{open:_}),k=Fl(v);m.useSyncedValue(`isInstantPhase`,E);let A=m.useState(`disabled`),j=s??A,M=ha(j),N=m.useState(`trackCursorAxis`),P=m.useState(`disableHoverablePopup`),F=O.useRef(!1),I=$r(),ee=O.useRef(void 0);function te(){return D&&w.current!=null?0:c??C??600}function L(e){let t=y.current;if(!t||!e)return!1;let n=iu(e);return n!==null&&n!==t&&W(t,n)}function ne(e){let t=L(e);return F.current=t,t&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,I.clear()),t}let re=Rl(v,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!P&&N!==`both`?Kl():null,restMs:te,delay(){return u==null&&D?{close:Yi(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!F.current}}),ie=Al(v,{enabled:!j}).reference,ae=e=>{let t=F.current,n=ru(e),r=ne(n),i=y.current,a=i&&n&&W(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,la(ta,e));return}if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&vi(ee.current)){let t=()=>{!F.current&&!M.current&&!m.select(`open`)&&m.setOpen(!0,la(ta,e,i))},n=te();n===0?(I.clear(),t()):I.start(n,t)}},oe=m.useState(`triggerProps`,S);return wr(`button`,e,{state:{open:_},ref:[t,x,y],props:[re,ie,S||N!==`none`?oe:void 0,{onMouseOver(e){ae(e.nativeEvent)},onFocus(e){L(ru(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){F.current=!1,I.clear(),ee.current=void 0},onPointerEnter(e){ee.current=e.pointerType},onPointerDown(e){ee.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[zi]:j?``:void 0,[nu]:j?void 0:``},f],stateAttributesMapping:Ii})}),ou=O.createContext(void 0);function su(){let e=O.useContext(ou);if(e===void 0)throw Error(er(70));return e}var cu=O.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Xo({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,V.jsxs)(O.Fragment,{children:[l,c&&Ko.createPortal(n,c)]})}),lu=O.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Yr().useState(`mounted`)||n?(0,V.jsx)(ou.Provider,{value:n,children:(0,V.jsx)(cu,{ref:t,...r})}):null}),uu=O.createContext(void 0);function du(){let e=O.useContext(uu);if(e===void 0)throw Error(er(71));return e}var fu=O.createContext(void 0);function pu(){return O.useContext(fu)?.direction??`ltr`}var mu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=ja(e,t)||{};if(l==null)return{};let f=Ya(u),p={x:n,y:r},m=La(i),h=Fa(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=Aa(k,j,A),N=!c.arrow&&Na(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),hu=(e,t)=>{let{name:n,fn:r}=mu(e);return{name:n,fn:r,options:[e,t]}},gu={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},_u={sideX:`left`,sideY:`top`},vu=`--available-width`,yu=`--available-height`,bu=`--anchor-width`,xu=`--anchor-height`,Su=`--transform-origin`,Cu=vu,wu=yu;function Tu(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Eu(e,t,n){let{rects:r,placement:i}=e;return{side:Tu(t,Ma(i),n),align:Na(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Du(e){return Ou(e,Dl)}function Ou(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,[C,w]=O.useState(null);!g&&C!==null&&w(null);let T=_.side||`flip`,E=_.align||`flip`,D=_.fallbackAxisSide||`end`,k=v?.crossAxis??!1,A=v?.rootBoundary,j=typeof n==`function`?n:void 0,M=H(j),N=j?M:n,P=ha(n),F=ha(g),I=pu()===`rtl`,ee=C||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":I?`left`:`right`,"inline-start":I?`right`:`left`}[i],te=o===`center`?ee:`${ee}-${o}`,L=l;typeof L==`number`?L={top:L,right:L,bottom:L,left:L}:L&&={top:L.top||0,right:L.right||0,bottom:L.bottom||0,left:L.left||0};let ne=+(i===`bottom`),re=+(i===`top`),ie=+(i===`right`),ae=+(i===`left`),oe={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:L},R=O.useRef(null),se=ha(a),ce=ha(s),le=typeof a==`function`?0:a,ue=typeof s==`function`?0:s,de=[];p&&de.push(p),de.push(xc(e=>{let t=Eu(e,i,I),n=typeof se.current==`function`?se.current(t):se.current,r=typeof ce.current==`function`?ce.current(t):ce.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[le,ue,I,i]));let z=E===`none`&&T!==`shift`,fe=!z&&(u||k||T===`shift`),pe=T===`none`?null:wc({...oe,padding:{top:L.top+1+ne,right:L.right+1+ae,bottom:L.bottom+1+re,left:L.left+1+ie},mainAxis:!k&&T===`flip`,crossAxis:E===`flip`&&`alignment`,fallbackAxisSideDirection:D}),me=z?null:Sc({...oe,rootBoundary:A,mainAxis:E!==`none`,crossAxis:fe,limiter:u||k?void 0:Cc(e=>{if(!R.current)return{};let{width:t,height:n}=R.current.getBoundingClientRect(),r=Ia(Ma(e.placement)),i=r===`y`?t:n,a=r===`y`?L.left+L.right:L.top+L.bottom;return{offset:i/2+a/2}})},[oe,u,k,A,L,E]);T===`shift`||E===`shift`||o===`center`?de.push(me,pe):de.push(pe,me),de.push(Tc({...oe,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!F.current)return;let i=e.style;i.setProperty(Cu,`${t}px`),i.setProperty(wu,`${n}px`);let a=sn(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(bu,`${u}px`),i.setProperty(xu,`${d}px`)}}),hu(e=>({element:R.current||ir(e.elements.floating).createElement(`div`),padding:R.current?d:0,offsetParent:`floating`}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=Ma(r),u=Na(r),d=Ia(l)===`y`,f=R.current,p=typeof a==`function`?a(Eu(e,i,I)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return fe&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(Su,d?`${m} ${h}`:`${h} ${m}`),{}}},gu,b),U(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let he=O.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:ge,elements:_e,x:ve,y:ye,middlewareData:be,update:xe,placement:Se,context:Ce,isPositioned:we,floatingStyles:Te}=t({rootContext:h,open:m?g:void 0,placement:te,middleware:de,strategy:r,whileElementsMounted:m?void 0:(...e)=>cc(...e,he),nodeId:y,externalTree:S}),{sideX:Ee,sideY:De}=be.adaptiveOrigin||_u,Oe=we?r:`fixed`,ke=O.useMemo(()=>{let e;return e=we?b?{position:Oe,[Ee]:ve,[De]:ye}:{...Te,position:Oe}:{position:Oe,top:0,left:0},e[Cu]=`100vw`,e[wu]=`100vh`,we||(e.opacity=0),e},[b,Oe,Ee,ve,De,ye,Te,we]),Ae=O.useRef(null);U(()=>{if(!g)return;let e=P.current,t=typeof e==`function`?e():e,n=(ku(t)?t.current:t)||null;n!==Ae.current&&(ge.setPositionReference(n),Ae.current=n)},[g,ge,N,P]),O.useEffect(()=>{if(!g)return;let e=P.current;typeof e!=`function`&&ku(e)&&e.current!==Ae.current&&(ge.setPositionReference(e.current),Ae.current=e.current)},[g,ge,N,P]),O.useEffect(()=>{if(m&&g&&_e.reference&&_e.floating)return cc(_e.reference,_e.floating,xe,he)},[m,g,_e,xe,he]);let je=Ma(Se),Me=Tu(i,je,I),Ne=Na(Se)||`center`,Pe=!!be.hide?.referenceHidden;U(()=>{x&&g&&we&&je!==ee&&w(je)},[x,g,we,je,ee]);let Fe=O.useMemo(()=>({position:`absolute`,top:be.arrow?.y,left:be.arrow?.x}),[be.arrow]),Ie=be.arrow?.centerOffset!==0;return O.useMemo(()=>({positionerStyles:ke,arrowStyles:Fe,arrowRef:R,arrowUncentered:Ie,side:Me,align:Ne,physicalSide:je,anchorHidden:Pe,refs:ge,context:Ce,isPositioned:we,update:xe}),[ke,Fe,R,Ie,Me,Ne,je,Pe,ge,Ce,we,xe])}function ku(e){return e!=null&&`current`in e}function Au(e){return e===`starting`?Uo:br}function ju(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),wr(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Au(r),i],stateAttributesMapping:Li})}var Mu=O.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Wo,style:g,..._}=e,v=Yr(),y=su(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=Du({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),k=ju(e,O.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,V.jsx)(uu.Provider,{value:D,children:k})}),Nu=O.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Yr(),{side:s,align:c}=du(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);rl({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Il(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return wr(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[il,f,Au(d),a],stateAttributesMapping:Ri})}),Pu=O.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Yr(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=du();return wr(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:Li})}),Fu=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=O.useMemo(()=>({open:t,close:n}),[t,n]);return(0,V.jsx)(eu.Provider,{value:t,children:(0,V.jsx)(fa,{delay:i,timeoutMs:r,children:e.children})})};function Iu(e){return gr(19)?e:e?`true`:void 0}function Lu({delay:e=0,...t}){return(0,V.jsx)(Fu,{"data-slot":`tooltip-provider`,delay:e,...t})}function Ru({...e}){return(0,V.jsx)(Zl,{"data-slot":`tooltip`,...e})}function zu({...e}){return(0,V.jsx)(au,{"data-slot":`tooltip-trigger`,...e})}function Bu({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,V.jsx)(lu,{children:(0,V.jsx)(Mu,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,V.jsxs)(Nu,{"data-slot":`tooltip-content`,className:B(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[a,(0,V.jsx)(Pu,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}var Vu={sidebarOpen:`better-grill:rail-expanded`,sidebarWidth:`better-grill:sidebar-width`,chatWidth:`better-grill:chat-width`,theme:`better-grill:theme`,warmUp:`better-grill:warm-up`},Hu=1e4,Uu=[1e3,2e3,4e3,8e3];function Wu(e,t){let[n,r]=(0,O.useState)(()=>{try{let n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}});return(0,O.useEffect)(()=>{try{localStorage.setItem(e,JSON.stringify(n))}catch{}},[e,n]),[n,r]}var Gu=(0,O.createContext)(null),Ku=()=>window.matchMedia(`(prefers-color-scheme: dark)`);function qu({children:e}){let[t,n]=Wu(Vu.theme,`system`),[r,i]=(0,O.useState)(()=>Ku().matches);(0,O.useEffect)(()=>{let e=Ku(),t=()=>i(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let a=t===`system`?r?`dark`:`light`:t;return(0,O.useLayoutEffect)(()=>{document.documentElement.classList.toggle(`dark`,a===`dark`)},[a]),(0,V.jsx)(Gu.Provider,{value:{theme:t,resolved:a,setTheme:n},children:e})}function Ju(){let e=(0,O.useContext)(Gu);if(!e)throw Error(`useTheme must be used within a ThemeProvider.`);return e}function Yu({children:e}){return(0,V.jsx)(qu,{children:(0,V.jsx)(Br,{fallback:e=>(0,V.jsx)(zr,{error:e}),children:(0,V.jsx)(Lu,{delay:300,children:e})})})}var Xu=(0,O.createContext)(null);function Zu(){return(0,O.useContext)(Xu)?.defaultOptions??{}}function Qu(e){return typeof e==`object`&&!!e&&`current`in e}var $u=`CapsLock.ContextMenu.Convert.KanaMode.NonConvert.Help.Insert.NumLock.Fn.FnLock.PrintScreen.ScrollLock.Pause.BrowserBack.BrowserFavorites.BrowserForward.BrowserHome.BrowserRefresh.BrowserSearch.BrowserStop.Eject.LaunchMail.MediaPlayPause.MediaStop.MediaTrackNext.MediaTrackPrevious.Power.AudioVolumeDown.AudioVolumeMute.AudioVolumeUp.WakeUp.Hyper.Super.Again.Copy.Cut.Find.Open.Paste.Props.Select.Undo.Hiragana.Katakana`.split(`.`),ed=[`Clear`,`Cancel`,`Standby`,`LaunchApplication1`,`LaunchApplication2`,`LaunchMediaPlayer`,`HangulMode`,`HanjaMode`,`Zenkaku`,`Hankaku`,`ZenkakuHankaku`],td=[`Control`,`Alt`,`Shift`,`Meta`];new Set(td);var nd={Control:`Control`,Ctrl:`Control`,control:`Control`,ctrl:`Control`,Shift:`Shift`,shift:`Shift`,Alt:`Alt`,Option:`Alt`,alt:`Alt`,option:`Alt`,Command:`Meta`,Cmd:`Meta`,Meta:`Meta`,command:`Meta`,cmd:`Meta`,meta:`Meta`,OS:`Meta`,os:`Meta`,Win:`Meta`,win:`Meta`,CommandOrControl:`Mod`,Mod:`Mod`,commandorcontrol:`Mod`,mod:`Mod`},rd=new Set(`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``)),id=new Set([`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]),ad=new Set([`F1`,`F2`,`F3`,`F4`,`F5`,`F6`,`F7`,`F8`,`F9`,`F10`,`F11`,`F12`,`F13`,`F14`,`F15`,`F16`,`F17`,`F18`,`F19`,`F20`,`F21`,`F22`,`F23`,`F24`]),od=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`]),sd=new Set([`Enter`,`Escape`,`Space`,`Tab`,`Backspace`,`Delete`]),cd=new Set(`/[]\\=-,.;\`'+?!@#$%^&*()_{}|:"<>~`.split(``)),ld={Backquote:"`",Backslash:`\\`,BracketLeft:`[`,BracketRight:`]`,Comma:`,`,Equal:`=`,Minus:`-`,Period:`.`,Quote:`'`,Semicolon:`;`,Slash:`/`},ud=new Set([...rd,...id,...ad,...od,...sd,...cd,...$u,...ed]),dd=new Map(Array.from(ud,e=>[e.toLowerCase(),e])),fd={Plus:`+`,plus:`+`,Esc:`Escape`,esc:`Escape`,escape:`Escape`,Return:`Enter`,return:`Enter`,enter:`Enter`," ":`Space`,space:`Space`,Spacebar:`Space`,spacebar:`Space`,tab:`Tab`,backspace:`Backspace`,Del:`Delete`,del:`Delete`,delete:`Delete`,Up:`ArrowUp`,up:`ArrowUp`,arrowup:`ArrowUp`,Down:`ArrowDown`,down:`ArrowDown`,arrowdown:`ArrowDown`,Left:`ArrowLeft`,left:`ArrowLeft`,arrowleft:`ArrowLeft`,Right:`ArrowRight`,right:`ArrowRight`,arrowright:`ArrowRight`,home:`Home`,end:`End`,pageup:`PageUp`,pagedown:`PageDown`,PgUp:`PageUp`,PgDn:`PageDown`,pgup:`PageUp`,pgdn:`PageDown`};function pd(e){return/^\p{Letter}$/u.test(e)}function md(e){if(!e)return``;if(e in fd)return fd[e];if(pd(e)){let t=e.toUpperCase();return t.length===1?t:e}return dd.get(e.toLowerCase())??e}var hd={Control:`⌃`,Alt:`⌥`,Shift:`⇧`,Meta:`⌘`,Mod:`⌘`},gd={Control:`Control`,Alt:`Option`,Shift:`Shift`,Meta:`Cmd`,Mod:`Cmd`},_d={Control:`Ctrl`,Alt:`Alt`,Shift:`Shift`,Meta:`Win`,Mod:`Ctrl`},vd={..._d,Meta:`Super`},yd={"`":`Backquote`,"\\":`Backslash`,"[":`Left Bracket`,"]":`Right Bracket`,",":`Comma`,"=":`Equal`,"-":`Minus`,".":`Period`,";":`Semicolon`},bd={ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`,Enter:`↵`,Escape:`Esc`,Backspace:`⌫`,Delete:`⌦`,Tab:`⇥`,Space:`␣`};function xd(){if(typeof navigator>`u`)return`linux`;let e=navigator.platform?.toLowerCase()??``,t=navigator.userAgent?.toLowerCase()??``;return e.includes(`mac`)||t.includes(`mac`)?`mac`:e.includes(`win`)||t.includes(`win`)?`windows`:`linux`}function Sd(e,t=xd()){return e===`Mod`?t===`mac`?`Meta`:`Control`:e}function Cd(e,t){let n=!1;try{n=t!==`mac`&&typeof e.getModifierState==`function`&&e.getModifierState(`AltGraph`)}catch{}let r=(e.key||``).normalize(`NFC`);return{key:md(r),code:e.code||``,ctrl:!!e.ctrlKey,shift:!!e.shiftKey,alt:!!e.altKey,meta:!!e.metaKey,altGraph:n,location:e.location,isComposing:!!e.isComposing||r===`Process`||r===`Unidentified`}}function wd(e){return/^Key[A-Z]$/i.test(e)?e.slice(3).toUpperCase():/^Digit[0-9]$/i.test(e)?e.slice(5):/^Numpad[0-9]$/i.test(e)?e.slice(6):ld[e]||{NumpadAdd:`+`,NumpadSubtract:`-`,NumpadMultiply:`*`,NumpadDivide:`/`,NumpadDecimal:`.`,NumpadEnter:`Enter`,Space:`Space`}[e]}function Td(e){return e!==``&&Array.from(e).length===1}function Ed(e){if(!e.endsWith(`+`))return e.split(`+`);let t=e.slice(0,-1).split(`+`);return t.at(-1)===``&&t.pop(),t.push(`+`),t}function Dd(e){return/^[A-Za-z]$/.test(e)}function Od(e){return/^\p{Script_Extensions=Latin}$/u.test(e)}function kd(e,t){return/^\p{Letter}$/u.test(e)&&/^\p{Letter}$/u.test(t)?e.localeCompare(t,void 0,{sensitivity:`accent`})===0:e===t}function Ad(e){if(/^\[.*\]$/s.test(e.trim()))throw Error(`Logical key must not contain a bracketed physical code. Use the code field instead.`)}function jd(e,t=xd()){let n=Ed(e),r=new Set,i=``;for(let e=0;e<n.length;e++){let a=n[e].trim();if(e===n.length-1)i=md(a);else{let e=nd[a]??nd[a.toLowerCase()];if(e){let n=Sd(e,t);r.add(n)}else n.length===1&&(i=md(a))}}!i&&n.length>0&&(i=md(n[n.length-1].trim()));let a=/^\[([A-Za-z][A-Za-z0-9]*)\]$/.exec(i)?.[1];return{...a===void 0?{key:i}:{code:a},ctrl:r.has(`Control`),shift:r.has(`Shift`),alt:r.has(`Alt`),meta:r.has(`Meta`),modifiers:td.filter(e=>r.has(e))}}function Md(e,t=xd()){e.code===void 0&&Ad(e.key);let n=e.ctrl??!1,r=e.shift??!1,i=e.alt??!1,a=e.meta??!1;e.mod&&(Sd(`Mod`,t)===`Control`?n=!0:a=!0);let o=td.filter(e=>{switch(e){case`Control`:return n;case`Shift`:return r;case`Alt`:return i;case`Meta`:return a;default:return!1}});return{...e.code===void 0?{key:md(e.key)}:{code:e.code},ctrl:n,shift:r,alt:i,meta:a,modifiers:o}}function Nd(e,t){e.code===void 0&&Ad(e.key);let n=t===`mac`?e.meta&&!e.ctrl:e.ctrl&&!e.meta,r=[];if(n)r.push(`Mod`),e.alt&&r.push(`Alt`),e.shift&&r.push(`Shift`);else for(let t of td)e.modifiers.includes(t)&&r.push(t);return r.push(e.code===void 0?md(e.key):`[${e.code}]`),r.join(`+`)}function Pd(e,t=xd()){return Nd(jd(e,t),t)}function Fd(e,t=xd()){return Nd(e,t)}function Id(e,t=xd()){return typeof e==`string`?Pd(e,t):Fd(Md(e,t),t)}function Ld(e){return e in nd||e.toLowerCase()in nd}function Rd(e,t=xd()){return typeof e==`string`?jd(e,t):Md(e,t)}function zd(e){e.code===void 0&&Ad(e.key);let t=[];for(let n of td)e.modifiers.includes(n)&&t.push(n);return t.push(e.code===void 0?e.key:`[${e.code}]`),t.join(`+`)}function Bd(e,t={}){let n=t.platform??xd(),r=t.useSymbols??!0,i=typeof r==`boolean`?r:r.modifiers??!0,a=typeof r==`boolean`?r:r.keys??!0,o=t.separatorToken??(n===`mac`&&i?` `:`+`),s=Ed(typeof e==`object`&&`modifiers`in e?Fd(e,n):Id(e,n)).map(e=>{if(Ld(e)){let t=nd[e]??nd[e.toLowerCase()];return n===`mac`?i?hd[t]:gd[t]:n===`windows`?_d[t]:vd[t]}let r=/^\[([A-Za-z][A-Za-z0-9]*)\]$/.exec(e)?.[1],o=t.keyLabels?.[r??e];if(o!==void 0)return o;let s=r?.startsWith(`Numpad`)??!1,c=r??e,l=r?t.layoutMap?.get(r):void 0;l?c=md(l):r&&(c=/^Key[A-Z]$/.test(r)?r.slice(3):/^Digit[0-9]$/.test(r)?r.slice(5):s?r.slice(6):ld[r]??r);let u=(a?bd:yd)[c]??c;return s?`Numpad ${u.replace(/([a-z])([A-Z])/g,`$1 $2`)}`:u});return t.parts?s:s.join(o)}function Vd(e,t,n=xd()){let r=typeof t==`string`?jd(t,n):t,i=Cd(e,n),a={matched:!1,score:0};if(i.isComposing&&(r.code!==void 0||Td(r.key))||i.altGraph&&(r.ctrl||r.alt))return a;if(r.code!==void 0)return Hd(i,r,!1)&&i.code===r.code?l(`code`,3):a;let o=kd(i.key,r.key),s=o&&Td(i.key)&&!/^\p{Letter}$/u.test(i.key)&&!r.shift;if(o&&Hd(i,r,s))return l(`key`,s?2:3);if(Dd(i.key)||Od(i.key)&&i.code.startsWith(`Key`)&&!i.alt||!Hd(i,r,!1))return a;let c=wd(i.code);return c!==void 0&&kd(c,r.key)?l(`fallback`,1):a;function l(e,t){return{matched:!0,score:t,source:e,identity:{key:i.key,code:i.code}}}}function Hd(e,t,n){let r=!e.altGraph&&e.ctrl,i=!e.altGraph&&e.alt;return r!==t.ctrl||i!==t.alt||e.meta!==t.meta?!1:e.shift===t.shift||n&&e.shift}function Ud(e,t,n=xd()){let r=Rd(e,n),i=Rd(t,n);return r.ctrl===i.ctrl&&r.alt===i.alt&&r.shift===i.shift&&r.meta===i.meta&&(r.code!==void 0||i.code!==void 0?r.code===i.code:kd(r.key,i.key))}var Wd=new Set,Gd=new WeakSet,Kd=new Map,qd=e=>e.code||`key:${e.key}`;function Jd(e){return Wd.size>0||Gd.has(e)||Kd.has(qd(e))}var Yd={preventDefault:!0,stopPropagation:!0,eventType:`keydown`,enabled:!0,ignoreInputs:!0,conflictBehavior:`warn`};function Xd(e){return!(e.ctrl||e.meta||e.key===`Escape`||e.code===`Escape`)}function Zd(e,t,n,r){if(n!==`allow`){if(n===`warn`){console.warn(`'${t}' is already registered. Multiple handlers will be triggered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to suppress this warning.`);return}if(n===`error`)throw Error(`'${t}' is already registered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to allow multiple registrations.`);r(e)}}function Qd(e,t){let n=e,r=t,i=Object.keys(n);return i.length===Object.keys(r).length&&i.every(e=>e===`meta`&&n[e]&&r[e]?Qd(n[e],r[e]):Object.is(n[e],r[e]))}function $d(e){if(!e)return!1;if(e instanceof HTMLInputElement){let t=e.type.toLowerCase();return t!==`button`&&t!==`submit`&&t!==`reset`}return!!(e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable)}function ef(e){return typeof document>`u`?null:typeof Document<`u`&&e instanceof Document||typeof Node<`u`&&e.nodeType===Node.DOCUMENT_NODE?e.activeElement:typeof HTMLElement<`u`&&e instanceof HTMLElement?e.ownerDocument.activeElement??null:e.document.activeElement??null}function tf(e,t,n){let r=ef(t);return r&&$d(r)&&r!==n||e.composedPath().some(e=>$d(e)&&e!==n)?!0:$d(e.target)&&e.target!==n}function nf(e,t){return t===document||t===window?e.currentTarget===t||e.currentTarget===document.documentElement:t===window?e.currentTarget===window||e.currentTarget===document||e.currentTarget===document.documentElement:!!(t instanceof HTMLElement&&(e.currentTarget===t||e.target instanceof Node&&t.contains(e.target)))}function rf({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function af(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var of=[],sf=0,{link:cf,unlink:lf,propagate:uf,checkDirty:df,shallowPropagate:ff}=rf({update(e){return e._update()},notify(e){of[mf++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,_f(e))}}),pf=0,mf=0,hf,gf=0;function _f(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=lf(n,e)}function vf(){if(!(gf>0)){for(;pf<mf;){let e=of[pf];of[pf++]=void 0,e.notify()}pf=0,mf=0}}function yf(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return hf!==void 0&&cf(i,hf,sf),i._snapshot},subscribe(e){let t=af(e),n={current:!1},r=bf(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=hf,o=t?.compare??Object.is;if(n)hf=i,++sf,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{hf=a,n&&(i.flags&=-5),_f(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&df(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&ff(e)}}else e&32&&(i.flags=e&-33);return hf!==void 0&&cf(i,hf,sf),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(uf(e),ff(e),vf())}},i}function bf(e){let t=()=>{let t=hf;hf=n,++sf,n.depsTail=void 0,n.flags=6;try{return e()}finally{hf=t,n.flags&=-5,_f(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&df(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,_f(this)}};return t(),n}var xf=class{constructor(e,t){this.atom=yf(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(af(e))}},Sf=0;function Cf(){return`hotkey_${++Sf}`}var wf=class e{static#e=null;#t;#n=new Map;#r=new Map;constructor(){this.registrations=new xf(new Map),this.#t=xd()}static getInstance(){return e.#e||=new e,e.#e}static resetInstance(){e.#e&&=(e.#e.destroy(),null)}register(e,t,n={}){if(typeof document>`u`&&!n.target){let e=t;return{id:Cf(),unregister:()=>{},get callback(){return e},set callback(t){e=t},setOptions:()=>{},get isActive(){return!1}}}let r=Cf(),i=n.platform??this.#t,a=typeof e==`string`?jd(e,i):Md(e,i),o=typeof e==`string`?e:zd(a),s=n.target??document,c=n.conflictBehavior??`warn`,l=this.#d(o,s);l&&Zd(l.id,o,c,e=>this.#i(e));let u=n.ignoreInputs??Xd(a),d={id:r,hotkey:o,parsedHotkey:a,callback:t,options:{...Yd,requireReset:!1,...n,platform:i,ignoreInputs:u},hasFired:!1,triggerCount:0,target:s};this.registrations.setState(e=>new Map(e).set(r,d)),this.#r.has(s)||this.#r.set(s,new Set),this.#r.get(s).add(r),this.#a(s);let f=this;return{get id(){return r},unregister:()=>{f.#i(r)},get callback(){return f.registrations.state.get(r)?.callback??t},set callback(e){let t=f.registrations.state.get(r);t&&(t.callback=e)},setOptions:e=>{f.registrations.setState(t=>{let n=t.get(r);if(n&&!Qd(n.options,{...n.options,...e})){let i=new Map(t);return i.set(r,{...n,options:{...n.options,...e}}),i}return t})},get isActive(){return f.registrations.state.has(r)}}}#i(e){let t=this.registrations.state.get(e);if(!t)return;let n=t.target;this.registrations.setState(t=>{let n=new Map(t);return n.delete(e),n});let r=this.#r.get(n);r&&(r.delete(e),r.size===0&&this.#o(n))}#a(e){if(typeof document>`u`||this.#n.has(e))return;let t=this.#l(e),n=this.#u(e);e.addEventListener(`keydown`,t),e.addEventListener(`keyup`,n),this.#n.set(e,{keydown:t,keyup:n})}#o(e){if(typeof document>`u`)return;let t=this.#n.get(e);t&&(e.removeEventListener(`keydown`,t.keydown),e.removeEventListener(`keyup`,t.keyup),this.#n.delete(e),this.#r.delete(e))}#s(e,t,n){if(n===`keyup`)for(let n of this.#r.get(t)??[]){let t=this.registrations.state.get(n);t?.hasFired&&this.#f(t,e)&&(t.hasFired=!1,t.activeMatch=void 0)}if(Jd(e))return;let r=this.#r.get(t);if(!r)return;let i=new Map,a=0;for(let o of r){let r=this.registrations.state.get(o);if(!r||!r.options.enabled||r.options.eventType!==n||!nf(e,t)||r.options.ignoreInputs!==!1&&tf(e,t,r.target))continue;let s=Vd(e,r.parsedHotkey,r.options.platform);s.matched&&(i.set(o,s),a=Math.max(a,s.score))}for(let o of r){let r=this.registrations.state.get(o);if(r&&nf(e,t)&&r.options.enabled&&!(r.options.ignoreInputs!==!1&&tf(e,t,r.target))){if(n===`keydown`){if(r.options.eventType!==`keydown`)continue;let t=i.get(o);t?.matched&&t.score===a&&(r.options.preventDefault&&e.preventDefault(),r.options.stopPropagation&&e.stopPropagation(),(!r.options.requireReset||!r.hasFired)&&(this.#c(r,e),r.options.requireReset&&(r.hasFired=!0,r.activeMatch=t.identity)))}else if(r.options.eventType===`keyup`){let t=i.get(o);t?.matched&&t.score===a&&this.#c(r,e)}}}}#c(e,t){e.options.preventDefault&&t.preventDefault(),e.options.stopPropagation&&t.stopPropagation(),e.triggerCount++,this.registrations.setState(e=>new Map(e));let n={hotkey:e.hotkey,parsedHotkey:e.parsedHotkey};e.callback(t,n)}#l(e){return t=>{this.#s(t,e,`keydown`)}}#u(e){return t=>{this.#s(t,e,`keyup`)}}#d(e,t){for(let n of this.registrations.state.values())if(Ud(n.hotkey,e,n.options.platform)&&n.target===t)return n;return null}#f(e,t){let n=e.parsedHotkey,r=md(t.key);if(e.activeMatch?.code&&t.code===e.activeMatch.code)return!0;if(n.code!==void 0){if(t.code===n.code)return!0}else{let e=n.key.length===1?n.key.toUpperCase():n.key;if((r.length===1?r.toUpperCase():r)===e)return!0}return!!(n.ctrl&&r===`Control`||n.shift&&r===`Shift`||n.alt&&r===`Alt`||n.meta&&r===`Meta`)}triggerRegistration(e){let t=this.registrations.state.get(e);if(!t)return!1;let n=t.parsedHotkey,r=new KeyboardEvent(t.options.eventType??`keydown`,{...n.code===void 0?{key:n.key}:{code:n.code},ctrlKey:n.ctrl,shiftKey:n.shift,altKey:n.alt,metaKey:n.meta,bubbles:!0,cancelable:!0});return t.triggerCount++,this.registrations.setState(e=>new Map(e)),t.callback(r,{hotkey:t.hotkey,parsedHotkey:t.parsedHotkey}),!0}getRegistrationCount(){return this.registrations.state.size}isRegistered(e,t){for(let n of this.registrations.state.values())if(Ud(n.hotkey,e,n.options.platform)&&(t===void 0||n.target===t))return!0;return!1}destroy(){for(let e of this.#n.keys())this.#o(e);this.registrations.setState(()=>new Map),this.#n.clear(),this.#r.clear()}};function Tf(){return wf.getInstance()}function Ef(e,t,n={}){let r={...Zu().hotkey,...n},i=Tf(),a=(0,O.useRef)(null),o=(0,O.useRef)(t),s=(0,O.useRef)(r),c=(0,O.useRef)(i);o.current=t,s.current=r,c.current=i;let l=(0,O.useRef)(null),u=(0,O.useRef)(null),d=Id(e,r.platform??xd()),{target:f,...p}=r;(0,O.useEffect)(()=>{let e=Qu(s.current.target)?s.current.target.current:s.current.target??(typeof document<`u`?document:null);if(!e){a.current?.isActive&&(a.current.unregister(),a.current=null),l.current=null,u.current=null;return}let t=l.current!==null&&l.current!==e,n=u.current!==null&&u.current!==d;a.current?.isActive&&(t||n)&&(a.current.unregister(),a.current=null),(!a.current||!a.current.isActive)&&(a.current=c.current.register(d,o.current,{...s.current,target:e})),l.current=e,u.current=d}),(0,O.useEffect)(()=>()=>{a.current?.isActive&&(a.current.unregister(),a.current=null)},[]),(0,O.useEffect)(()=>{a.current?.isActive&&(a.current.callback=t,a.current.setOptions(p))})}var Df=Ir(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function Of({className:e,variant:t,...n}){return(0,V.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:B(Df({variant:t}),e),...n})}function kf({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`alert-title`,className:B(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,e),...t})}function Af({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`alert-description`,className:B(`text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),...t})}function jf({what:e,error:t,onReset:n}){return(0,V.jsxs)(Of,{variant:`destructive`,className:`border-dashed border-destructive/40 px-4 py-3`,children:[(0,V.jsx)(Ke,{}),(0,V.jsxs)(kf,{children:[e,` failed to render`]}),(0,V.jsxs)(Af,{children:[(0,V.jsx)(`p`,{children:`This part of the page hit a bug. The rest keeps working, and nothing was lost in the bridge.`}),(0,V.jsx)(`p`,{className:`truncate font-mono text-xs`,title:t.message,children:t.message}),(0,V.jsx)(Rr,{variant:`outline`,size:`sm`,className:`mt-2`,onClick:n,children:`Try again`})]})]})}function Mf(e){return wr(e.defaultTagName??`div`,e,e)}var Nf=768;function Pf(){let[e,t]=O.useState(void 0);return O.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<Nf)};return e.addEventListener(`change`,n),t(window.innerWidth<Nf),()=>e.removeEventListener(`change`,n)},[]),!!e}var Ff=`data-valid`,If=`data-invalid`,Lf={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Rf={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},zf={valid(e){return e===null?null:e?{[Ff]:``}:{[If]:``}}},Bf={invalid:void 0,name:void 0,validityData:{state:Lf,errors:[],error:``,value:``,initialValue:null},setValidityData:vr,disabled:void 0,setTouched:vr,setDirty:vr,setFilled:vr,setFocused:vr,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Rf,registerFieldControl:vr,validation:{getValidationProps:(e,t=br)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:vr,getInputControl:()=>null,commit:async()=>{},change:vr}},Vf=O.createContext(Bf);function Hf(e=!0){let t=O.useContext(Vf);if(t.setValidityData===vr&&!e)throw Error(er(28));return t}var Uf=O.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:vr,validationMode:`onSubmit`,submitCountRef:{current:0}});function Wf(){return O.useContext(Uf)}var Gf=O.createContext({controlId:void 0,registerControlId:vr,resetControlId:vr,labelId:void 0,setLabelId:vr,messageIds:[],setMessageIds:vr,getDescriptionProps:e=>e});function Kf(){return O.useContext(Gf)}function qf(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=Kf(),o=$l(),s=Mn(()=>Symbol()),c=O.useRef(!1),l=O.useRef(!1),u=H(()=>{c.current&&i!==vr&&(c.current=!1,i(s.current,void 0))});return U(()=>{if(!n||i===vr){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}if(e===void 0){u();return}c.current=!0,i(s.current,e)},[t,n,i,a,o,s,u]),U(()=>u,[u]),(n?r:void 0)??t??o}function Jf({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=O.useRef(e!==void 0),[a,o]=O.useState(t);return[i&&e!==void 0?e:a,O.useCallback(e=>{i||o(e)},[])]}function Yf(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Hf(),s=Mn(()=>Symbol());U(()=>{let c=s.current;if(!i){o(c,void 0);return}o(c,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),U(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}function Xf(e,t){let n=O.useRef(e),r=H(t);U(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}var Zf=O.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=Hf(),{clearErrors:C,elementRef:w,submitCountRef:T}=Wf(),E=h||s,D=m??a,k={...p,disabled:E},{labelId:A}=Kf(),j=qf({id:i}),[M]=Jf({controlled:o,default:l,name:`FieldControl`,state:`value`}),N=o!==void 0,P=N?M:void 0,F=P==null?void 0:String(P),I=H(()=>S.inputRef.current?.value);Yf(S.inputRef,j,F,I,!E,a),U(()=>{let e=F??S.inputRef.current?.value;e!==void 0&&b(e!==``)},[F,S.inputRef,b]),Xf(F,()=>{F!==void 0&&(C(D),_(F!==(v.initialValue??``)),S.change(F))});let ee=O.useRef(null),te=$r();return U(()=>{u&&ee.current===bi(ir(ee.current))&&y(!0)},[u,y]),wr(`input`,e,{ref:[t,ee],state:k,props:[{id:j,disabled:E,name:D,ref:S.inputRef,"aria-labelledby":A,autoFocus:u,...N?{value:P}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=la($i,e.nativeEvent);c?.(t,n),!N&&(_(t!==(v.initialValue??``)),b(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(C(D),S.change(t)))},onFocus(){y(!0)},onBlur(e){if(g(!0),y(!1),x===`onBlur`){let t=e.currentTarget.value;S.commit(t),N&&queueMicrotask(()=>{let e=S.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&S.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===w.current&&!e.defaultPrevented){let t=e.currentTarget,n=T.current;te.start(0,()=>{T.current===n&&S.commit(t.value)})}else S.commit(t)}}},f,e=>S.getValidationProps(E,e)],stateAttributesMapping:zf})}),Qf=O.forwardRef(function(e,t){return(0,V.jsx)(Zf,{ref:t,...e})});function $f({className:e,type:t,...n}){return(0,V.jsx)(Qf,{type:t,"data-slot":`input`,className:B(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}var ep=O.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return wr(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function tp({className:e,orientation:t=`horizontal`,...n}){return(0,V.jsx)(ep,{"data-slot":`separator`,orientation:t,className:B(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...n})}var np=O.createContext(void 0);function rp(e){let t=O.useContext(np);if(!e&&t===void 0)throw Error(er(27));return t}var ip=O.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=rp(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return wr(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Ri,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),ap=O.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=rp(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=or({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,la(ia,e.nativeEvent))}return wr(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),op=O.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=rp(),c=$l(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),wr(`p`,e,{ref:t,props:[{id:c},o]})}),sp=O.createContext(void 0);function cp(){let e=O.useContext(sp);if(e===void 0)throw Error(er(26));return e}var lp=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),up=`--nested-dialogs`,dp=`data-nested-dialog-open`,fp={...Li,...Oi,nestedDialogOpen(e){return e?{[dp]:``}:null}},pp=O.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=rp(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);cp(),rl({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?al(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=wr(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...il,hidden:!m,onKeyDown(e){lp.has(e.key)&&e.stopPropagation()},style:{[up]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:fp});return(0,V.jsx)(gs,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})}),mp=O.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,V.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),hp=O.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=rp(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,V.jsx)(sp.Provider,{value:n,children:(0,V.jsxs)(Zo,{ref:t,...r,children:[a&&o===!0&&(0,V.jsx)(mp,{ref:i.context.internalBackdropRef,inert:Iu(!s)}),e.children]})}):null}),gp={},_p={},vp=``;function yp(e,t){return pn(e)?e:t}function bp(e,t,n){return/hidden|clip/.test(e.getComputedStyle(yp(t,n)).overflowY)}function xp(e){if(typeof document>`u`)return!1;let t=ir(e);return sn(t).innerWidth-t.documentElement.clientWidth>0}function Sp(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=ir(e),n=t.documentElement,r=t.body,i=yp(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Cp(e){let t=ir(e),n=t.documentElement,r=t.body,i=yp(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function wp(e){let t=ir(e),n=t.documentElement,r=t.body,i=sn(n),a=0,o=0,s=!1,c=ya.create();if(di&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,gp={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},vp=n.style.scrollBehavior,_p={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=yp(n,r);if(s=Sp(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,gp),Object.assign(r.style,_p),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=vp)}function d(){u(),c.request(l)}l();let f=G(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Tp=new class{lockCount=0;restore=null;timeoutLock=Qr.create();timeoutUnlock=Qr.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=ir(e),n=t.documentElement,r=t.body,i=sn(n);if(bp(i,n,r)){let t=new i.MutationObserver(()=>{bp(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=oi||!xp(e);this.restore=a?Cp(e):wp(e)}};function Ep(e=!0,t=null){U(()=>{if(e)return Tp.acquire(t)},[e,t])}function Dp({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=O.useState(0),[u,d]=O.useState(0),f=c===0,p=Ss(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=xi(t);if(f&&!i){if(a){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||W(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:f});return Ep(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),U(()=>(t?.onNestedDialogOpen&&(r?t.onNestedDialogOpen(c+1,u+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,c,u,t]),gl(e,{activeTriggerProps:p.reference,inactiveTriggerProps:p.trigger,popupProps:p.floating,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var Op={...Tl,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},kp=class extends Yc{constructor(e,t,n){let r=new vl,i=Ap(e,r,t,n);super(i,jp(r),Op)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(ul(this.state,e,t.trigger)))}};function Ap(e,t,n,r=!1){return{...yl(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function jp(e){return{popupRef:O.createRef(),backdropRef:O.createRef(),internalBackdropRef:O.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Mp(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=rp(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=ol((e,t)=>new kp({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);_l(b,x),ml(b);let{forceUnmount:w}=hl(x,b);O.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,la(ca))}),[w,b]);let T=x||S;return(0,V.jsxs)(np.Provider,{value:b,children:[u&&(0,V.jsx)(sl,{handle:u,store:b}),T&&(0,V.jsx)(Dp,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var Np=Gr(function(e){return Mp(`dialog`,e)}),Pp=O.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=rp(),c=$l(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),wr(`h2`,e,{ref:t,props:[{id:c},o]})});function Fp({...e}){return(0,V.jsx)(Np,{"data-slot":`sheet`,...e})}function Ip({...e}){return(0,V.jsx)(hp,{"data-slot":`sheet-portal`,...e})}function Lp({className:e,...t}){return(0,V.jsx)(ip,{"data-slot":`sheet-overlay`,className:B(`fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,e),...t})}function Rp({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,V.jsxs)(Ip,{children:[(0,V.jsx)(Lp,{}),(0,V.jsxs)(pp,{"data-slot":`sheet-content`,"data-side":n,className:B(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...i,children:[t,r&&(0,V.jsxs)(ap,{"data-slot":`sheet-close`,render:(0,V.jsx)(Rr,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`}),children:[(0,V.jsx)(Qe,{}),(0,V.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function zp({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`sheet-header`,className:B(`flex flex-col gap-0.5 p-4`,e),...t})}function Bp({className:e,...t}){return(0,V.jsx)(Pp,{"data-slot":`sheet-title`,className:B(`font-heading text-base font-medium text-foreground`,e),...t})}function Vp({className:e,...t}){return(0,V.jsx)(op,{"data-slot":`sheet-description`,className:B(`text-sm text-muted-foreground`,e),...t})}function Hp({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`skeleton`,className:B(`animate-pulse rounded-md bg-muted`,e),...t})}var Up=`sidebar_state`,Wp=604800,Gp=`16rem`,Kp=`18rem`,qp=`3rem`,Jp=`b`,Yp=O.createContext(null);function Xp(){let e=O.useContext(Yp);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Zp({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=Pf(),[c,l]=O.useState(!1),[u,d]=O.useState(e),f=t??u,p=O.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t),document.cookie=`${Up}=${t}; path=/; max-age=${Wp}`},[n,f]),m=O.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);O.useEffect(()=>{let e=e=>{e.key===Jp&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=O.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return(0,V.jsx)(Yp.Provider,{value:g,children:(0,V.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":Gp,"--sidebar-width-icon":qp,...i},className:B(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})}function Qp({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=Xp();return n===`none`?(0,V.jsx)(`div`,{"data-slot":`sidebar`,className:B(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?(0,V.jsx)(Fp,{open:l,onOpenChange:u,...o,children:(0,V.jsxs)(Rp,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Kp},side:e,children:[(0,V.jsxs)(zp,{className:`sr-only`,children:[(0,V.jsx)(Bp,{children:`Sidebar`}),(0,V.jsx)(Vp,{children:`Displays the mobile sidebar.`})]}),(0,V.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,V.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,V.jsx)(`div`,{"data-slot":`sidebar-gap`,className:B(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(6)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,V.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:B(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,t===`floating`||t===`inset`?`p-3 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(6)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...o,children:(0,V.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-xl group-data-[variant=floating]:shadow-md group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:i})})]})}function $p({className:e,onClick:t,...n}){let{toggleSidebar:r}=Xp();return(0,V.jsxs)(Rr,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,className:B(e),onClick:e=>{t?.(e),r()},...n,children:[(0,V.jsx)(Oe,{}),(0,V.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function em({className:e,...t}){return(0,V.jsx)(`main`,{"data-slot":`sidebar-inset`,className:B(`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...t})}function tm({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:B(`flex flex-col gap-2 p-2`,e),...t})}function nm({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:B(`flex flex-col gap-2 p-2`,e),...t})}function rm({className:e,...t}){return(0,V.jsx)(tp,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:B(`mx-2 w-auto bg-sidebar-border data-horizontal:w-auto`,e),...t})}function im({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:B(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function am({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:B(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function om({className:e,render:t,...n}){return Mf({defaultTagName:`div`,props:zn({className:B(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,e)},n),render:t,state:{slot:`sidebar-group-label`,sidebar:`group-label`}})}function sm({className:e,...t}){return(0,V.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:B(`flex w-full min-w-0 flex-col gap-0`,e),...t})}function cm({className:e,...t}){return(0,V.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:B(`group/menu-item relative`,e),...t})}var lm=Ir(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function um({render:e,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let{isMobile:s,state:c}=Xp(),l=Mf({defaultTagName:`button`,props:zn({className:B(lm({variant:n,size:r}),a)},o),render:i?(0,V.jsx)(zu,{render:e}):e,state:{slot:`sidebar-menu-button`,sidebar:`menu-button`,size:r,active:t}});return i?(typeof i==`string`&&(i={children:i}),(0,V.jsxs)(Ru,{children:[l,(0,V.jsx)(Bu,{side:`right`,align:`center`,hidden:c!==`collapsed`||s,...i})]})):l}function dm({className:e,render:t,showOnHover:n=!1,...r}){return Mf({defaultTagName:`button`,props:zn({className:B(`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0`,n&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0`,e)},r),render:t,state:{slot:`sidebar-menu-action`,sidebar:`menu-action`}})}function fm({className:e,showIcon:t=!1,...n}){let[r]=O.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return(0,V.jsxs)(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:B(`flex h-8 items-center gap-2 rounded-md px-2`,e),...n,children:[t&&(0,V.jsx)(Hp,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),(0,V.jsx)(Hp,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":r}})]})}var pm={lockIn:`Mod+Enter`,submitAnswer:`Enter`,newLine:`Mod+Enter`,nextAnswer:`ArrowDown`,previousAnswer:`ArrowUp`,sendChat:`Enter`,closeChat:`Escape`,discuss:`D`,visualize:`V`,toggleSidebar:`[`};function mm({side:e,cssVar:t,width:n,min:r,max:i,initial:a,onResize:o,label:s,className:c}){let[l,u]=(0,O.useState)(!1),d=(0,O.useRef)(n),f=(0,O.useRef)(!1),p=e=>Math.round(Math.min(Math.max(e,r),i)),m=e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),d.current=n,f.current=!0,u(!0)},h=n=>{f.current&&(d.current=p(e===`left`?n.clientX:window.innerWidth-n.clientX),document.documentElement.style.setProperty(t,`${d.current}px`))},g=()=>{f.current&&(f.current=!1,u(!1),o(d.current))};(0,O.useEffect)(()=>{if(!l)return;let e=document.documentElement;return e.dataset.resizing=``,document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,()=>{delete e.dataset.resizing,document.body.style.cursor=``,document.body.style.userSelect=``}},[l]);let _=e===`left`?`ArrowRight`:`ArrowLeft`,v=e===`left`?`ArrowLeft`:`ArrowRight`;return(0,V.jsxs)(`div`,{role:`separator`,"aria-orientation":`vertical`,"aria-label":s,"aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":i,tabIndex:0,title:`Drag to resize · double-click to reset`,onPointerDown:m,onPointerMove:h,onPointerUp:g,onPointerCancel:g,onDoubleClick:()=>o(p(a)),onKeyDown:e=>{let t=e.shiftKey?80:20;e.key===_&&o(p(n+t)),e.key===v&&o(p(n-t))},className:B(`group/handle absolute inset-y-0 z-20 w-3 cursor-col-resize touch-none outline-none`,e===`left`?`-right-1.5`:`-left-1.5`,c),children:[(0,V.jsx)(`span`,{className:B(`absolute inset-y-0 left-1/2 w-0.5 -translate-x-1/2 transition-colors`,l?`bg-primary`:`bg-transparent group-hover/handle:bg-primary/50 group-focus-visible/handle:bg-primary/50`)}),(0,V.jsx)(`span`,{className:B(`absolute top-1/2 left-1/2 h-8 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full border bg-background opacity-0 transition-[opacity,background-color,border-color] group-hover/handle:opacity-100 group-focus-visible/handle:opacity-100`,l?`border-primary bg-primary opacity-100`:`group-hover/handle:border-primary`)})]})}function hm(e,t){(0,O.useLayoutEffect)(()=>{document.documentElement.style.setProperty(e,t)},[e,t])}var gm={min:340,initial:440,max:960};function _m(){return Math.min(gm.max,Math.round(window.innerWidth*.75))}function vm(e){return Math.round(Math.min(Math.max(e,gm.min),_m()))}function ym(){let[e,t]=Wu(Vu.chatWidth,gm.initial),n=vm(e);return hm(`--chat-w`,`${n}px`),[n,t]}function bm({open:e,children:t}){let[n,r]=ym();return(0,V.jsxs)(`div`,{"data-slot":`discussion-dock`,inert:!e,className:B(`fixed inset-y-0 right-0 z-40 w-[min(100vw,var(--chat-w))] py-3 pr-3 transition-transform duration-200 ease-linear`,!e&&`translate-x-full`),children:[e&&(0,V.jsx)(mm,{side:`right`,cssVar:`--chat-w`,width:n,min:gm.min,max:_m(),initial:gm.initial,onResize:r,label:`Resize discussion`,className:`-left-3`}),(0,V.jsx)(`div`,{className:`h-full overflow-hidden rounded-xl border shadow-md`,children:t})]})}function xm({className:e}){return(0,V.jsx)(`span`,{"aria-hidden":!0,className:B(`inline-flex shrink-0 items-center gap-[0.3em]`,e),children:[0,1,2].map(e=>(0,V.jsx)(`span`,{className:`size-[0.4em] rounded-full bg-current opacity-60 motion-safe:animate-coal`,style:{animationDelay:`${e*.16}s`}},e))})}function Sm({message:e,onRetry:t,onDismiss:n,className:r}){return(0,V.jsxs)(Of,{variant:`destructive`,className:B(`flex items-start gap-2 border-destructive/30 bg-destructive/5`,r),children:[(0,V.jsx)(ie,{className:`mt-0.5 size-4 shrink-0`}),(0,V.jsx)(Af,{className:`min-w-0 flex-1 text-destructive`,children:e}),t&&(0,V.jsx)(Rr,{variant:`ghost`,size:`xs`,onClick:t,className:`text-destructive hover:bg-destructive/10 hover:text-destructive`,children:`Retry`}),n&&(0,V.jsx)(Rr,{variant:`ghost`,size:`icon-xs`,onClick:n,"aria-label":`Dismiss`,className:`text-muted-foreground`,children:(0,V.jsx)(Qe,{})})]})}function Cm({className:e,...t}){return(0,V.jsx)(`kbd`,{"data-slot":`kbd`,className:B(`pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3`,e),...t})}function wm({className:e,...t}){return(0,V.jsx)(`kbd`,{"data-slot":`kbd-group`,className:B(`inline-flex items-center gap-1`,e),...t})}function Tm({hotkey:e,className:t}){let n=Bd(e,{parts:!0});return(0,V.jsx)(wm,{className:t,children:n.map(e=>(0,V.jsx)(Cm,{children:e},e))})}function Em({show:e}){return e?(0,V.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-20 flex items-center justify-center rounded-[inherit] border-2 border-dashed border-primary bg-background/85 backdrop-blur-sm animate-in fade-in-0`,children:(0,V.jsxs)(`span`,{className:`flex items-center gap-2 text-sm font-medium text-primary`,children:[(0,V.jsx)(me,{className:`size-4`}),`Drop images to attach`]})}):null}var Dm=(0,O.createContext)(null);function Om(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n==null?null:n.getTheme())}}}function km(){let e=(0,O.useContext)(Dm);return e??function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),e}function K(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Am(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function jm(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var Mm=jm();function Nm(){return Mm&&`documentMode`in document?document.documentMode:null}var Pm=Nm();function Fm(e){return Mm&&e.test(navigator.platform)}function Im(e){return Mm&&e.test(navigator.userAgent)}var Lm=Fm(/Mac|iPod|iPhone|iPad/),Rm=Im(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function zm(){return!(!Mm||!(`InputEvent`in window)||Pm)&&`getTargetRanges`in new window.InputEvent(`input`)}var Bm=zm();function Vm(){return Mm&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var Hm=Vm(),Um=Im(/Android/),Wm=Im(/Version\/[\d.]+.*Safari/)&&!Um,Gm=Im(/^(?=.*Chrome).*/i),Km=Mm&&Um&&Gm,qm=Im(/AppleWebKit\/[\d.]+/)&&Lm&&!Gm;function Jm(){return 2047}var Ym=Jm(),Xm=Wm||Hm||qm?`\xA0`:`​`,Zm=`
10
+
11
+ `,Qm=Rm?`\xA0`:Xm,$m={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},eh={directionless:1,unmergeable:2},th={center:2,end:6,justify:4,left:1,right:3,start:5};function nh(e){let t={};for(let n of Object.keys(e))t[e[n]]=n;return t}var rh=nh(th),ih={normal:0,segmented:2,token:1},ah=nh(ih),oh=Symbol.for(`@lexical/ctrlOrOtherKey`),sh=`$config`;function ch(){return Cw()._blockCursorElement}function lh(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-slot`)}var uh=qm||Hm||Wm;function dh(){let e=aw().createElement(`img`);e.setAttribute(`data-lexical-decorator-boundary`,`true`),e.alt=``;for(let[t,n]of[[`position`,`absolute`],[`width`,`0px`],[`height`,`0px`],[`border`,`0px`],[`margin`,`0px`],[`padding`,`0px`]])e.style.setProperty(t,n,`important`);return e}function fh(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-decorator-boundary`)}var ph=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&K(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&K(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&K(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&n===0?`before`:`after`;let r=mh(e,this.element);if(r===null)return`after`;let i=Array.prototype.indexOf.call(e.childNodes,r);if(i<0)return`after`;if(t===e)return n<=i?`before`:`after`;let a=mh(e,t);if(a===null)return`after`;let o=Array.prototype.indexOf.call(e.childNodes,a);return o>=0&&o<=i?`before`:`after`}getInsertionAnchor(){return this.before}};function mh(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}var hh=class e extends ph{withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()||this.getDecoratorBoundaryAnchor(`trailing`)}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;lh(t);)e=t,t=t.nextSibling;fh(t)&&(e=t,t=t.nextSibling);let n=e?e.nextSibling:this.element.firstChild;return n!==null&&n===ch()?n:e}getDecoratorBoundaryAnchor(e){let t;if(e===`leading`){let e=super.getFirstChildAnchor();for(t=e?e.nextSibling:this.element.firstChild;lh(t);)t=t.nextSibling}else t=this.before?this.before.previousSibling:this.element.lastChild,t!==null&&t===ch()&&(t=t.previousSibling);return fh(t)?t:null}setDecoratorBoundaryAnchor(e,t){let n=this.getDecoratorBoundaryAnchor(e);if(t!==(n!==null)){if(n!==null)this.element.removeChild(n);else if(e===`leading`){let e=this.getFirstChildAnchor();this.element.insertBefore(dh(),e?e.nextSibling:this.element.firstChild)}else this.element.insertBefore(dh(),this.before)}}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){let t=this.element,n=this.after===null?t.firstChild:this.after.nextSibling,r=e===`empty`&&lh(n)?null:e;if(t.__lexicalLastChildKind!==r){if(t.__lexicalLastChildKind=r,r===null)this.removeManagedLineBreak();else{let e=r===`decorator`&&uh;this.insertManagedLineBreak(e)}}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n=e.nodeName===`IMG`?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===(t.nodeName===`IMG`))return;this.removeManagedLineBreak()}let n=this.element,r=this.before||this.getDecoratorBoundaryAnchor(`trailing`),i=aw().createElement(`br`);if(i.setAttribute(`data-lexical-managed-linebreak`,`true`),n.insertBefore(i,r),e){let e=aw().createElement(`img`);e.setAttribute(`data-lexical-managed-linebreak`,`true`),e.style.setProperty(`display`,`inline`,`important`),e.style.setProperty(`border`,`0px`,`important`),e.style.setProperty(`margin`,`0px`,`important`),e.alt=``,n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==t;r=r.nextSibling)n++;return n}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset(),n=ch(),i=this.element.childNodes,a=Math.min(r,i.length),o=0;for(let e=t;e<a;e++)i[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let i=gh(t,n);i.push(r);let a=gh(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function gh(e,t){let n=[],r=t;for(;r!==e&&r!==null;r=r.parentNode){let e=0;for(let t=r.previousSibling;t!==null;t=t.previousSibling)e++;n.push(e)}return r!==e&&K(225),n.reverse()}function _h(){let e;try{e=`0.51.0+prod.esm`}catch{}return e??`"<unknown>+source"`}var vh=_h(),yh=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}},bh=null;function xh(e,t=1e3){return e instanceof Sh?e.clone():e.size<t?new Map(e):new Sh().init(new Map(e),void 0,e.size)}var Sh=class e{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new e().init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return t===void 0?this._old&&this._old.get(e):t}get(e){let t=this.getWithTombstone(e);return t===bh?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){let e=new Map(this._old);for(let[t,n]of this._nursery)n===bh?e.delete(t):e.set(t,n);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let r=this.getNursery();return n!==bh&&n!==void 0||(this._size++,n===bh&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,bh),this._size--),t}getOrInsert(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}getOrInsertComputed(e,t){let n=this.get(e);if(n!==void 0)return n;let r=t(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(e){if(t)for(let n of t){let t=n[0],r=e.get(t);r!==bh&&(r!==void 0&&(n[1]=r),yield n)}for(let n of e)n[1]===bh||t&&t.has(n[0])||(yield n)}else t&&(yield*t)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(let[t,n]of this.entries())e(n,t,this)}get[Symbol.toStringTag](){return`GenMap`}[Symbol.iterator](){return this.entries()}},Ch=!1;function wh(e,t,...n){let r=Ch,i;try{Ch=e,i=t()}finally{Ch=r}var a;return(a=i)===null||typeof a!=`object`&&typeof a!=`function`||typeof a.then!=`function`||K(421),i}function Th(){return Ch}function Eh(e){let t=e.exportJSON(Ch),n=e.constructor;return t.type!==n.getType()&&K(130,n.name),X(e)&&!Array.isArray(t.children)&&K(59,n.name),t}function Dh(e,t,n,r,i,a){if(X(e)){let o=e.getFirstChild();for(;o!==null;){let e=o.__key;o.__parent===t&&((X(o)||_T(o)&&o.__slots!==null)&&Dh(o,e,n,r,i,a),n.has(e)||a.delete(e),i.push(e)),o=o.getNextSibling()}}for(let o of _T(e)&&e.__slots!==null?e.__slots.values():[]){let e=r.get(o);e!==void 0&&vT(e)&&e.__slotHost===t&&((X(e)||_T(e)&&e.__slots!==null)&&Dh(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o))}}var Oh=!1,kh=0;function Ah(e){kh=e.timeStamp}function jh(e,t,n){let r=e.nodeName===`BR`,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&lC(e,n)!==void 0}function Mh(e,t,n){let r=QC(VC(n)),i=r&&cw(r,n._rootElement),a=null,o=null;i!==null&&i.anchorNode===e&&(a=i.anchorOffset,o=i.focusOffset);let s=e.nodeValue;s!==null&&CC(t,s,a,o,!1)}function Nh(e,t,n){if(J(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return ZS(t)&&n.isAttached()}function Ph(e,t,n){for(let r=e;r&&!Lw(r);r=FC(r)){let e=lC(r,t);if(e!==void 0){let t=oC(e,n);if(t)return Gx(t)||!hw(r)?void 0:[r,t]}}}function Fh(e,t,n){Oh=!0;let r=performance.now()-kh>100;try{Fx(e,()=>{let i=Y()||function(e){return e.read(`latest`,()=>{let e=Y();return e===null?null:e.clone()})}(e),a=new Map,o=e._editorState,s=e._blockCursorElement,c=!1,l=``;for(let n=0;n<t.length;n++){let u=t[n],d=u.type,f=u.target,p=Ph(f,e,o);if(!p)continue;let[m,h]=p;if(d===`characterData`)r&&q(h)&&ZS(f)&&Nh(i,f,h)&&Mh(f,h,e);else if(d===`childList`){c=!0;let t=u.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=sC(r),a=r.parentNode;if(!(a==null||r===s||i!==null||jh(r,a,e)||fh(r)||e._slotsUsed&&hw(r)&&r.hasAttribute(`data-lexical-slot`)||Lw(r))){if(Rm){let e=(hw(r)?r.innerText:null)||r.nodeValue;e&&(l+=e)}a.removeChild(r)}}let n=u.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];jh(r,f,e)||s===r?(f.appendChild(r),t++):fh(r)&&t++}r!==t&&a.set(m,h)}}}if(a.size>0)for(let[t,n]of a)n.reconcileObservedMutation(t,e);let u=n.takeRecords();if(u.length>0){for(let t=0;t<u.length;t++){let n=u[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],a=n.parentNode;a==null||n.nodeName!==`BR`||jh(n,i,e)||a.removeChild(n)}}n.takeRecords()}i!==null&&(c&&hC(i),Rm&&NC(e)&&i.insertRawText(l))})}finally{Oh=!1}}function Ih(e){let t=e._observer;t!==null&&Fh(e,t.takeRecords(),t)}function Lh(e){(function(e){kh===0&&VC(e).addEventListener(`textInput`,Ah,!0)})(e),e._observer=new MutationObserver((t,n)=>{Fh(e,t,n)})}function Rh(e,t,n){let{isEqual:r}=e;return t===n||r!==void 0&&r(t,n)}function zh(e,t){return Rh(e,t,e.defaultValue)}function Bh(e){return typeof e==`object`&&!!e}function Vh(e,t){let n=Kh(e,t).getter;return Bh(n)&&n.getterTable!==void 0||K(405,t),Gh(n.getterTable)}function Hh(e,t){let n=Kh(e,t).setter;return Bh(n)&&n.setterTable!==void 0||K(406,t),Gh(n.setterTable)}function Uh(e,t,n){let{meta:r}=Kh(e,t);for(let e=0;;)if(r.kind===`aliased`){if(e===n)return Gh(r.aliases);e++,r=r.inner.meta}else r.kind===`nullable`||r.kind===`optional`?r=r.inner.meta:r.kind===`array`?r=r.item.meta:K(407,t,String(n))}function Wh(e,t){let n=Kh(e,t),{setter:r}=n;Bh(r)&&r.setterTable!==void 0||K(408,t);let i=String(n.defaultValue);return $h(r.setterTable,i)||K(409,t,i),r.setterTable[i]}function Gh(e){return Object.assign(Object.create(null),e)}function Kh(e,t){let n=e.get(t);return n===void 0&&K(410,t),n}function qh(e,t,n,r,i){i!==void 0&&Jh.add(i);let a=n===void 0,o=a?e(void 0):n;return a&&Zh(o),Object.assign(e,{accepts:i,defaultValue:o,isEqual:r,meta:t})}var Jh=new WeakSet,Yh=new WeakSet;function Xh(e){return typeof e==`object`&&e&&Yh.add(e),e}function Zh(e){if(typeof e==`object`&&e&&!Object.isFrozen(e)&&!Yh.has(e)){Object.freeze(e);for(let t of Object.values(e))Zh(t)}}function Qh(e,t){let{accepts:n}=e;return n===void 0?function(e,t){let{accepts:n}=e;if(n!==void 0)return Qh(e,t)?{parsed:e(t)}:void 0;let r=e(t);return zh(e,r)&&t!==e.defaultValue?void 0:{parsed:r}}(e,t)!==void 0:n.call(e,t)}function $h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function eg(e=``){return qh(t=>typeof t==`string`?t:e,{kind:`string`},void 0,void 0,e=>typeof e==`string`)}var tg=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function ng(e=0,t={}){let{integer:n,clamp:r}=t,i=n&&t.min!==void 0?Math.ceil(t.min):t.min,a=n&&t.max!==void 0?Math.floor(t.max):t.max,o=e=>typeof e==`string`&&tg.test(e)?Number(e):e,s=e=>typeof e==`number`&&Number.isFinite(e)&&(!n||Number.isInteger(e)),c=e=>s(e)&&(i===void 0||e>=i)&&(a===void 0||e<=a);return qh(t=>{let n=o(t);return r&&s(n)?i!==void 0&&n<i?i:a!==void 0&&n>a?a:n:c(n)?n:e},{clamp:r,integer:n,kind:`number`,max:a,min:i},void 0,void 0,e=>r?s(o(e)):c(o(e)))}function rg(e,...t){let n=Xh(t.length===0?e[0]:t[0]),r=new Set(e);return qh(e=>e!==void 0&&r.has(e)?e:n,{kind:`enum`,values:e},n,void 0,e=>r.has(e)&&(e!==void 0||n===void 0))}function ig(){return e=>function(e){return{meta:{fields:e,kind:`node`}}}(e)}function ag(e,t){let n=e=>typeof e==`string`&&$h(t,e);return qh(r=>n(r)?t[r]:e(r),{aliases:t,inner:e,kind:`aliased`},e.defaultValue,e.isEqual,t=>n(t)||Qh(e,t))}function og(e,t){return cg(`withField`,e,{getter:{field:t.field,getterTable:t.getterTable,method:t.getter,when:t.when},setter:{field:t.field,method:t.setter,setterTable:t.setterTable}})}function sg(e,t){return cg(`withAccessors`,e,t)}function cg(e,t,n){return Object.assign(e=>t(e),{accepts:t.accepts,defaultValue:t.defaultValue,getter:n.getter,isEqual:t.isEqual,meta:t.meta,setter:n.setter})}var lg=`latest`,ug=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;schema;constructor(e,t){this.key=e;let n=`meta`in(r=t.parse)&&typeof r.meta==`object`&&r.meta!==null&&`kind`in r.meta&&typeof r.meta.kind==`string`&&`defaultValue`in r?t.parse:void 0;var r;this.schema=n,this.parse=t.parse.bind(t),this.unparse=(t.unparse||bg).bind(t),this.isEqual=t.isEqual?t.isEqual.bind(t):n!==void 0&&n.isEqual!==void 0?(e,t)=>Rh(n,e,t):Object.is,this.defaultValue=n===void 0?this.parse(void 0):n.defaultValue,this.resetOnCopyNode=t.resetOnCopyNode||!1}};function dg(e,t){return new ug(e,t)}function fg(e,t,n=lg){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function pg(e,t,n){let r;if(gx(),typeof n==`function`){let i=e.getLatest(),a=fg(i,t);if(r=n(a),t.isEqual(a,r))return i}else r=n;let i=e.getWritable();return _g(i).updateFromKnown(t,r),i}function mg(e){let t=new Map,n=new Set;for(let{ownNodeConfig:r}of dT(typeof e==`function`?e:e.replace))if(r&&r.stateConfigs)for(let e of r.stateConfigs){let r;`stateConfig`in e?(r=e.stateConfig,e.flat&&n.add(r.key)):r=e,t.set(r.key,r)}return{flatKeys:n,sharedConfigMap:t}}var hg=new Set([`__proto__`,`constructor`,`prototype`]),gg=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return yg(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){if(hg.has(i))continue;let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=yg(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){if(hg.has(e))return;let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function _g(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new gg(t,function(e){return e.__state?e.__state.sharedNodeState:VS(Cw(),e.getType()).sharedNodeState}(t));return t.__state=n,n}function vg(e,t){let n=e.getWritable(),r=t.$;return(n.__state||r)&&_g(e).updateFromJSON(r),n}function yg(e){if(e)for(let t in e)return e}function bg(e){return e}function xg(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function Sg(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function Cg(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function wg(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&xg(n,e,t)||t&&xg(n,t,e)||e&&Sg(n,e,t)||t&&Sg(n,t,e))}(c,l))}function Tg(e,t){let n=e.mergeWithSibling(t),r=bx()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Eg(e){let t,n,r=e;if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&q(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==``){if(wg(t,r)){r=Tg(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&q(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==``){if(wg(r,n)){r=Tg(r,n);break}break}n.remove()}}else r.remove()}function Dg(e){return Og(e.anchor),Og(e.focus),e}function Og(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),q(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!X(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var kg=Symbol.for(`@lexical/CachedTextSize`);function Ag(e,t){return qg.read(()=>{let n=0,r=e;for(let e=0;e<t&&r!==null;e++){let i=Kg.get(r);if(i===void 0&&K(345,r),X(i)){let a=Jg.get(r);if(a!==void 0&&X(a)&&a.__parent!==i.__parent)n+=i.getTextContentSize();else{let e=Yg.get(r),t=e&&e.__lexicalTextContent;typeof t!=`string`&&K(346,i.getType()),n+=t.length}e<t-1&&!i.isInline()&&(n+=2)}else{let e=i[kg];e===void 0&&K(347,i.getType(),r),n+=e}r=i.__next}return n},{editor:Pg})}function jg(e){X(e)||e[kg]===void 0&&(e[kg]=q(e)?e.__text.length:e.getTextContentSize())}var Mg=4,Ng,Pg,Fg,Ig=``,Lg=null,Rg=null,zg=null;function Bg(){return{firstTextKey:zg,format:Lg,style:Rg}}function Vg(e){e.firstTextKey!==null&&(Lg=e.format,Rg=e.style,zg=e.firstTextKey)}function Hg(e){if(zg!==null)return;let t=e.__lexicalFirstTextKey;if(t===void 0&&K(348),t===null)return;let n=Jg.get(t);q(n)&&(Lg=n.getFormat(),Rg=n.getStyle(),zg=t)}var Ug,Wg,Gg,Kg,qg,Jg,Yg,Xg,Zg,Qg,$g=!1,e_=!1;function t_(e,t){let n=Kg.get(e),r=Jg.has(e);if(t!==null){let n=D_(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(Pg._keyToDOMMap.delete(e),X(n)){let e=mT(n,Kg);n_(e,0,e.length-1,null)}if(n!==void 0){for(let e of d_(n).values()){let t=p_(e);t_(e,null),t!==null&&t.remove()}AC(Zg,Fg,Ug,n,`destroyed`)}}}function n_(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&t_(t,r)}}function r_(e,t){e.setProperty(`text-align`,t)}var i_=`40px`;function a_(e,t){let n=Ng.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty(`padding-inline-start`,t===0?``:`calc(${t} * var(--lexical-indent-base-value, ${i_}))`),OC(e,`class`),OC(e,`style`)}function o_(e,t){let n=e.style;t===0?r_(n,``):t===1?r_(n,`left`):t===2?r_(n,`center`):t===3?r_(n,`right`):t===4?r_(n,`justify`):t===5?r_(n,`start`):t===6&&r_(n,`end`),OC(e,`style`)}function s_(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(qx(e))return null;let n=e.getParent();return n===null||GC(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function c_(e){let t=aw().createElement(`div`);return t.setAttribute(`data-lexical-slot`,e),t.style.display=`none`,t}function l_(e,t,n){t||e.contentEditable===`false`?Rw(n,Pg):n.removeAttribute(`contenteditable`)}function u_(e,t,n){let r=Ig,i=Bg();Ig=``;let a=``,o=Gx(e);for(let[r,i]of n){let n=c_(r);l_(t,o,n),t.appendChild(n),Ig=``;let s=Bg();h_(i,Tw(e,n,Pg)),Vg(s),f_(e,r,t,n),a+=Ig}return Vg(i),Ig=r,a}function d_(e){return _T(e)&&e.__slots!==null?e.__slots:gT}function f_(e,t,n,r){let i=Qg.$getSlotTargetElement(e,t,n,Pg);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display=``)}function p_(e){let t=Yg.get(e);return t===void 0?null:t.parentElement}function m_(e,t,n){let r=d_(e),i=d_(t);for(let[e,t]of r)if(!i.has(e)){let e=p_(t);t_(t,null),e!==null&&e.remove()}let a=Ig,o=Bg(),s=``,c=null,l=Gx(t);for(let[e,a]of i){let i=r.get(e),o=i===void 0?null:p_(i);Ig=``;let u=Bg();if(o===null){o=c_(e);let r=null;for(let e of n.children)if(!e.hasAttribute(`data-lexical-slot`)){r=e;break}n.insertBefore(o,r),h_(a,Tw(t,o,Pg))}else i===a?S_(a,o):(i!==void 0&&t_(i,o),h_(a,Tw(t,o,Pg)));if(Vg(u),l_(n,l,o),f_(t,e,n,o),s+=Ig,o.parentElement===n){let e=c===null?n.firstChild:c.nextSibling;e!==o&&n.insertBefore(o,e),c=o}}return Vg(o),Ig=a,s}function h_(e,t){let n=Jg.get(e);if(n===void 0&&K(60),t!==null){let r=Kg.get(e);if(r!==void 0){let i=Yg.get(e);if(i!==void 0){let a=vT(r)?r.__slotHost:null,o=vT(n)?n.__slotHost:null,s=r.__parent!==n.__parent||a!==o,c=o!==null&&i.parentElement!==t.element;if(s||c)return t.insertChild(i),S_(e,t.element)}}}let r=Qg.$createDOM(n,Pg);if(function(e,t,n){let r=n._keyToDOMMap;cC(t,n,e),r.set(e,t)}(e,r,Pg),q(n)?r.setAttribute(`data-lexical-text`,`true`):Gx(n)&&(r.setAttribute(`data-lexical-decorator`,`true`),Iw(r,{captureSelection:!0})),X(n)){let e=n.__indent,t=n.__size;s_(r,n),e!==0&&a_(r,e);let i=d_(n),a=i.size>0?u_(n,r,i):``;if(t===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,Ig+=a,i.size>0&&(r.__lexicalSlotTextLength=a.length);else{let e=Ig,o=t-1;if(g_(mT(n,Jg),n,0,o,Tw(n,r,Pg)),a!==``){let t=r.__lexicalTextContent||``;r.__lexicalTextContent=a+t,Ig=e+a+t}i.size>0&&(r.__lexicalSlotTextLength=a.length)}let o=n.__format;o!==0&&o_(r,o),n.isInline()||(y_(null,n,r),v_(n,r))}else{let t=n.getTextContent();if(Gx(n)){let t=n.decorate(Pg,Ng);t!==null&&C_(e,t),r.contentEditable=`false`;let i=d_(n);i.size>0&&u_(n,r,i)}Ig+=t}return t!==null&&t.insertChild(r),Qg.$decorateDOM(n,null,r,Pg),jg(n),AC(Zg,Fg,Ug,n,`created`),r}function g_(e,t,n,r,i){let a=Ig,o=Bg();Ig=``,Lg=null,Rg=null,zg=null;let s=n;for(;s<=r;++s){let t=Bg();h_(e[s],i);let n=Jg.get(e[s]);n!==null&&q(n)?Lg===null&&(Lg=n.getFormat(),Rg=n.getStyle(),zg=n.__key):X(n)&&s<r&&!n.isInline()&&(Ig+=Zm),Vg(t)}let c=Pg._keyToDOMMap.get(t.__key);c===void 0&&K(349,t.__key),c.__lexicalTextContent=Ig,c.__lexicalFirstTextKey=zg,Ig=a+Ig,Vg(o)}function __(e,t){if(!e)return!1;let n=t.get(e);return Gx(n)&&!n.isInline()}function v_(e,t){let n=Tw(e,t,Pg);n.setDecoratorBoundaryAnchor(`leading`,__(e.__first,Jg)),n.setDecoratorBoundaryAnchor(`trailing`,__(e.__last,Jg))}function y_(e,t,n){let r=Tw(t,n,Pg),i=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return rS(e)?`line-break`:Gx(e)&&e.isInline()?`decorator`:null}return`empty`}return null}(t,Jg);r.setManagedLineBreak(i)}function b_(e,t,n){var r;Lg=null,Rg=null,zg=null,function(e,t,n){let r=Ig,i=e.__size,a=t.__size;Ig=``;let o=n.element,s=Pg._keyToDOMMap.get(t.__key);s===void 0&&K(351,t.__key);let c=a-i;if(!$g&&Math.abs(c)<=1&&i>=Mg&&e.__first===t.__first&&(c!==0||!Pg._cloneNotNeeded.has(e.__key))){let i=s.__lexicalTextContent,l=Xg.get(e.__key);if(!$g&&typeof i==`string`&&l!==void 0){let a=function(e,t){let n=t.size;if(n===0||n>=e.__size)return null;let r=e.__last,i=null,a=0;for(;r!==null&&a<n;){if(!t.has(r))return null;i=r;let e=Jg.get(r);if(e===void 0)return null;r=e.__prev,a++}return a!==n||r!==null&&t.has(r)?null:i}(t,l);if(a!==null){let u=l.size;if(c===0){let e=Ag(a,u),n=a,c=0;for(;n!==null&&c<u;){let e=Jg.get(n);if(e===void 0)break;let t=Bg();S_(n,o),q(e)&&Lg===null&&(Lg=e.getFormat(),Rg=e.getStyle(),zg=e.__key),Vg(t),n=e.__next,c++}let d=``;for(n=a,c=0;n!==null&&c<u;){let e=Jg.get(n);if(e===void 0)break;let t;if(X(e)){let r=Pg._keyToDOMMap.get(n),i=r&&r.__lexicalTextContent;typeof i!=`string`&&K(352,e.getType()),t=i}else t=e.getTextContent();d+=t,c<u-1&&X(e)&&!e.isInline()&&(d+=Zm),n=e.__next,c++}let f=s.__lexicalSlotTextLength||0,p=f>0?i.slice(f):i,m=p.slice(0,p.length-e)+d;s.__lexicalTextContent=m,Ig=r+m,x_(t,s,l);return}if(function(e,t,n,r,i,a,o,s){if(s!==1&&s!==-1||o!==(s===1?2:1))return!1;let c=o-s,l=e.__last;for(let e=0;e<c-1;e++){if(l===null)return!1;let e=Kg.get(l);if(e===void 0)return!1;l=e.__prev}if(l===null)return!1;let u=Jg.get(a),d=Kg.get(l);if(u===void 0||d===void 0||u.__prev!==d.__prev)return!1;let f=[],p=a;for(let e=0;e<o;e++){if(p===null)return!1;f.push(p);let e=Jg.get(p);p=e?e.__next:null}let m=[];p=l;for(let e=0;e<c;e++){if(p===null)return!1;m.push(p);let e=Kg.get(p);p=e?e.__next:null}let h=new Set(m),g=new Set(f),_=[],v=0,y=0;for(;v<c&&y<o;)if(f[y]===m[v])_.push({key:f[y],kind:`reconcile`}),v++,y++;else if(g.has(m[v])){if(h.has(f[y]))return!1;_.push({key:f[y],kind:`create`,nextIndex:y}),y++}else _.push({key:m[v],kind:`destroy`}),v++;for(;v<c;)_.push({key:m[v++],kind:`destroy`});for(;y<o;)_.push({key:f[y],kind:`create`,nextIndex:y}),y++;let b=Ag(l,c);for(let e of _){let t=Bg();if(e.kind===`reconcile`)S_(e.key,n.element);else if(e.kind===`destroy`)t_(e.key,n.element);else{let t=null;for(let n=e.nextIndex+1;n<o;n++){let e=Pg._keyToDOMMap.get(f[n]);if(e!==void 0){t=e;break}}h_(e.key,n.withBefore(t??n.before))}if(e.kind!==`destroy`){let t=Jg.get(e.key);t&&q(t)&&Lg===null&&(Lg=t.getFormat(),Rg=t.getStyle(),zg=t.__key)}Vg(t)}let x=``;for(let e=0;e<o;e++){let t=Jg.get(f[e]);if(t===void 0)return!1;let n;if(X(t)){let r=Pg._keyToDOMMap.get(f[e]),i=r&&r.__lexicalTextContent;typeof i!=`string`&&K(350,t.getType()),n=i}else n=t.getTextContent();x+=n,e<o-1&&X(t)&&!t.isInline()&&(x+=Zm)}let S=r.__lexicalSlotTextLength||0,C=S>0?i.slice(S):i;return r.__lexicalTextContent=C.slice(0,C.length-b)+x,!0}(e,0,n,s,i,a,u,c)){let e=s.__lexicalTextContent;typeof e!=`string`&&K(353),Ig=r+e,x_(t,s,l);return}}}if(c===0){let t=e.__first,n=0;for(;t!==null;){let e=Jg.get(t);if(e===void 0)break;let r=$g||Gg.has(t)||Wg.has(t),i=Bg();if(r)S_(t,o);else{let n,r;if(X(e)){r=Yg.get(t);let i=r&&r.__lexicalTextContent;typeof i!=`string`&&K(354,e.getType()),n=i}else n=e.getTextContent();Ig+=n,r!==void 0&&Hg(r)}q(e)?Lg===null&&(Lg=e.getFormat(),Rg=e.getStyle(),zg=e.__key):X(e)&&n<a-1&&!e.isInline()&&(Ig+=Zm),Vg(i),t=e.__next,n++}s.__lexicalTextContent=Ig,s.__lexicalFirstTextKey=zg,Ig=r+Ig;return}}if(i===1&&a===1){let r=e.__first,i=t.__first;if(r===i)S_(r,o);else{let e=D_(r),t=h_(i,null);try{e.parentNode===o?o.replaceChild(t,e):n.insertChild(t)}catch(n){if(typeof n==`object`&&n){let a=`${n.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw Error(a)}throw n}t_(r,null)}let a=Jg.get(i);q(a)&&Lg===null&&(Lg=a.getFormat(),Rg=a.getStyle(),zg=a.__key)}else{let r=mT(e,Kg),s=mT(t,Jg);if(r.length!==i&&K(227),s.length!==a&&K(228),i===0)a!==0&&g_(s,t,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&d_(t).size===0&&n.element.__lexicalLineBreak==null;n_(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f],i=Bg();if(e===r)u=w_(S_(r,a.element)),d++,f++;else{if(l===void 0&&(l=T_(n,f)),c===void 0)c=T_(t,d);else if(!c.has(e)){d++,Vg(i);continue}if(!l.has(e)){u=w_(D_(e)),t_(e,a.element),d++,c.delete(e),Vg(i);continue}if(c.has(r)){let e=PC(Pg,r);e!==u&&a.withBefore(u??a.before).insertChild(e),u=w_(S_(r,a.element)),d++,f++}else h_(r,a.withBefore(u??a.before)),f++}let o=Jg.get(r);o!==null&&q(o)?Lg===null&&(Lg=o.getFormat(),Rg=o.getStyle(),zg=o.__key):X(o)&&f<=s&&!o.isInline()&&(Ig+=Zm),Vg(i)}let p=d>o,m=f>s;if(p&&!m){let t=n[s+1],r=t===void 0?null:Pg.getElementByKey(t);g_(n,e,f,s,a.withBefore(r??a.before))}else m&&!p&&n_(t,d,o,a.element)})(t,r,s,i,a,n)}s.__lexicalTextContent=Ig,s.__lexicalFirstTextKey=zg,Ig=r+Ig}(e,t,Tw(t,n,Pg)),GC(t)||(r=t,Lg==null||Lg===r.__textFormat||e_||r.setTextFormat(Lg),function(e){Rg==null||Rg===e.__textStyle||e_||e.setTextStyle(Rg)}(t))}function x_(e,t,n){let r=t.__lexicalFirstTextKey;if(r!=null){let t=e.__key,i=r;for(;i!==null;){let e=Jg.get(i);if(e===void 0){i=null;break}if(e.__parent===t)break;i=e.__parent}if(i!==null&&!n.has(i)){let e=Jg.get(r);if(q(e))return Lg=e.getFormat(),void(Rg=e.getStyle())}}t.__lexicalFirstTextKey=zg}function S_(e,t){let n=Kg.get(e),r=Jg.get(e);n!==void 0&&r!==void 0||K(61);let i=$g||Gg.has(e)||Wg.has(e),a=PC(Pg,e);if(n===r&&!i){let e;if(X(n)){let t=a.__lexicalTextContent;typeof t!=`string`&&K(355,n.getType()),e=t,Hg(a)}else e=n.getTextContent();return Ig+=e,a}if(n!==r&&i&&AC(Zg,Fg,Ug,r,`updated`),Qg.$updateDOM(r,n,a,Pg)){let n=h_(e,null);return t===null&&K(62),t.replaceChild(n,a),t_(e,null),n}if(X(n)){X(r)||K(334,e);let t=r.__indent;($g||t!==n.__indent)&&a_(a,t);let o=r.__format;($g||o!==n.__format)&&o_(a,o);let s=i&&(d_(r).size>0||d_(n).size>0)?m_(n,r,a):``;if(i){let e=Ig;if(b_(n,r,a),r.isInline()||(qx(r)||y_(0,r,a),v_(r,a)),s!==``){let t=a.__lexicalTextContent||``;a.__lexicalTextContent=s+t,Ig=e+s+t,a.__lexicalSlotTextLength=s.length}else(d_(r).size>0||d_(n).size>0)&&(a.__lexicalSlotTextLength=0)}else{let e=a.__lexicalTextContent;typeof e!=`string`&&K(356,n.getType()),Ig+=e,Hg(a)}if(($g||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(s_(a,r),qx(r)&&!$g))for(let e of r.getChildren())X(e)&&s_(PC(Pg,e.getKey()),e)}else{let t=r.getTextContent();if(Gx(r)){let t=r.decorate(Pg,Ng);t!==null&&C_(e,t),i&&(d_(r).size>0||d_(n).size>0)&&m_(n,r,a)}Ig+=t}if(!e_&&qx(r)){let e=r.getLatest();if(e.__cachedText!==Ig){let t=e.getWritable();t.__cachedText=Ig,r=t}}return Qg.$decorateDOM(r,n,a,Pg),jg(r),a}function C_(e,t){let n=Pg._pendingDecorators,r=Pg._decorators;if(n===null){if(r[e]===t)return;n=dC(Pg)}n[e]=t}function w_(e){let t=e.nextSibling;return t!==null&&t===Pg._blockCursorElement&&(t=t.nextSibling),t}function T_(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function E_(e,t,n,r,i,a){Ig=``,Lg=null,Rg=null,zg=null,$g=r===2,Pg=n,Ng=n._config,Qg=n._config.dom||MS,Fg=n._nodes,Ug=Pg._listeners.mutation,Wg=i,Gg=a,Kg=e._nodeMap,qg=e,Jg=t._nodeMap,e_=t._readOnly,Yg=xh(n._keyToDOMMap),Xg=function(){let e=new Map,t=t=>{for(let n of t){let t=Jg.get(n);if(t===void 0)continue;let r=t.__parent;if(r===null)continue;let i=e.get(r);i===void 0&&(i=new Set,e.set(r,i)),i.add(n)}};return t(Wg.keys()),t(Gg),e}();let o=new Map;return Zg=o,S_(`root`,null),Pg=void 0,Fg=void 0,Wg=void 0,Gg=void 0,Kg=void 0,qg=void 0,Jg=void 0,Ng=void 0,Yg=void 0,Xg=void 0,Zg=void 0,Qg=MS,o}function D_(e){let t=Yg.get(e);return t===void 0&&K(75,e),t}function O_(e){return()=>{}}function k_(e){return{type:e}}var A_=k_(`SELECTION_CHANGE_COMMAND`),j_=k_(`CLICK_COMMAND`),M_=k_(`BEFORE_INPUT_COMMAND`),N_=k_(`INPUT_COMMAND`),P_=k_(`COMPOSITION_START_COMMAND`),F_=k_(`COMPOSITION_END_COMMAND`),I_=k_(`DELETE_CHARACTER_COMMAND`),L_=k_(`INSERT_LINE_BREAK_COMMAND`),R_=k_(`INSERT_PARAGRAPH_COMMAND`),z_=k_(`CONTROLLED_TEXT_INSERTION_COMMAND`),B_=k_(`PASTE_COMMAND`),V_=k_(`REMOVE_TEXT_COMMAND`),H_=k_(`DELETE_WORD_COMMAND`),U_=k_(`DELETE_LINE_COMMAND`),W_=k_(`FORMAT_TEXT_COMMAND`),G_=k_(`UNDO_COMMAND`),K_=k_(`REDO_COMMAND`),q_=k_(`KEYDOWN_COMMAND`),J_=k_(`KEY_ARROW_RIGHT_COMMAND`),Y_=k_(`MOVE_TO_END`),X_=k_(`KEY_ARROW_LEFT_COMMAND`),Z_=k_(`MOVE_TO_START`),Q_=k_(`KEY_ARROW_UP_COMMAND`),$_=k_(`KEY_ARROW_DOWN_COMMAND`),ev=k_(`KEY_ENTER_COMMAND`),tv=k_(`KEY_SPACE_COMMAND`),nv=k_(`KEY_BACKSPACE_COMMAND`),rv=k_(`KEY_ESCAPE_COMMAND`),iv=k_(`KEY_DELETE_COMMAND`),av=k_(`KEY_TAB_COMMAND`),ov=k_(`DROP_COMMAND`),sv=k_(`DRAGSTART_COMMAND`),cv=k_(`DRAGOVER_COMMAND`),lv=k_(`DRAGEND_COMMAND`),uv=k_(`COPY_COMMAND`),dv=k_(`CUT_COMMAND`),fv=k_(`SELECT_ALL_COMMAND`),pv=k_(`CLEAR_EDITOR_COMMAND`),mv=k_(`CLEAR_HISTORY_COMMAND`),hv=k_(`CAN_REDO_COMMAND`),gv=k_(`CAN_UNDO_COMMAND`),_v=k_(`FOCUS_COMMAND`),vv=k_(`BLUR_COMMAND`),yv=k_(`KEY_MODIFIER_COMMAND`);function bv(e,t){return{...t,[oh]:e}}var xv=bv(`metaKey`,{ctrlKey:!Lm,metaKey:Lm}),Sv=bv(`altKey`,{altKey:Lm,ctrlKey:!Lm}),Cv=[[`altKey`,1],[`ctrlKey`,2],[`metaKey`,4],[`shiftKey`,8]];function wv(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var Tv=class{byKey=new Map;byCode=new Map;add(e){let{key:t,modifiers:n={}}=e;t.length>0||K(399);let r=t.toLowerCase();for(let i of function(e){let t=[0];for(let[n,r]of Cv){let i=e[n]||!1;i===`any`?t=t.concat(t.map(e=>e|r)):i&&(t=t.map(e=>e|r))}return t}(n))wv(this.byKey,`${i}:${r}`,e),t.length===1&&(/[0-9]/.test(t)?wv(this.byCode,`${i}:Digit${t}`,e):/[a-z]/.test(r)&&wv(this.byCode,`${i}:Key${r.toUpperCase()}`,e));return this}matches(e){let t=e.key;if(!t)return[];let n=function(e){let t=0;for(let[n,r]of Cv)e[n]&&(t|=r);return t}(e),r=this.byKey.get(`${n}:${t.toLowerCase()}`),i=r?r.slice():[];if(this.byCode.size>0&&!(t.length===1&&t.charCodeAt(0)<=127)){let t=this.byCode.get(`${n}:${e.code}`);t&&i.push(...t)}return i}match(e){return this.matches(e)[0]}};function Ev(e){let t=new Tv;for(let n of e)t.add(n);return t}function Dv(e){let t=new Map;return{dispose(){for(let e of t.values())e.dispose();t.clear()},register(n,r){let i=t.get(n);i===void 0&&(i={dispose:e(n,r),holders:new Set},t.set(n,i));let a=()=>{let e=t.get(n);e&&e.holders.delete(a)&&e.holders.size===0&&(t.delete(n),e.dispose())};return i.holders.add(a),a}}}function Ov(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}var kv=Object.freeze({}),Av;function jv(){if(Av!==void 0)return Av;let e=[[`keydown`,ny],[`pointerdown`,Vv],[`compositionstart`,Xv],[`compositionend`,ty],[`input`,Jv],[`click`,Bv],[`cut`,kv],[`copy`,kv],[`dragstart`,kv],[`dragover`,kv],[`dragend`,kv],[`paste`,kv],[`focus`,kv],[`blur`,kv],[`drop`,kv]];return Bm&&e.push([`beforeinput`,(e,t)=>function(e,t){let n=e.inputType;n===`deleteCompositionText`||Rm&&NC(t)||n!==`insertCompositionText`&&Fx(t,()=>{Kv(e,t)||Z(t,M_,e)},{event:e})}(e,t)]),Av=e,e}var Mv=new WeakMap,Nv=new WeakMap,Pv=Dv(e=>(e.addEventListener(`selectionchange`,dy),()=>e.removeEventListener(`selectionchange`,dy)));function Fv(e,t,n,r,i,a){let o=e.anchor,s=e.focus,c=o.getNode(),l=bx(),u;if(a!==void 0)u=a;else{let e=QC(VC(l));u=e===null?null:cw(e,l._rootElement)}let d=u===null?null:u.anchorNode,f=o.key,p=l.getElementByKey(f),m=n.length;return f!==s.key||!q(c)||(!i&&(!Bm||l._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&m<2||vC(n))&&o.offset!==s.offset&&!c.isComposing()||XS(c)||c.isDirty()&&m>1||(i||!Bm)&&p!==null&&!c.isComposing()&&d!==Dw(c,p,l)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!c.isComposing()&&(c.getFormat()!==e.format||c.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=YS(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(q(t)||X(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,c)}function Iv(e,t){return ZS(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function Lv(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=cw(e,t._rootElement),s=t._inputState,c=s.isSelectionChangeFromDOMUpdate;if(c){s.isSelectionChangeFromDOMUpdate=!1;let e=s.selectionChangeFromDOMUpdatePoints;if(s.selectionChangeFromDOMUpdatePoints=null,Iv(r,i)&&Iv(a,o)&&!s.postDeleteSelectionToRestore&&(e===null||e.anchorNode===r&&e.anchorOffset===i&&e.focusNode===a&&e.focusOffset===o))return}Fx(t,()=>{if(!n)return void hC(null);if(!GS(t,r,a))return;let l=Y();if(s.postDeleteSelectionToRestore&&J(l)&&l.isCollapsed()){let e=l.anchor,t=s.postDeleteSelectionToRestore.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(l=s.postDeleteSelectionToRestore.clone(),hC(l))}if(s.postDeleteSelectionToRestore=null,J(l)){let n=l.anchor,c=n.getNode();if(l.isCollapsed()){e.type===`Range`&&r===a&&(l.dirty=!0);let i=VC(t).event,o=i?i.timeStamp:performance.now(),{format:u,style:d,offset:f,key:p,timeStamp:m}=s.collapsedSelectionFormat,h=pC(),g=!1===t.isComposing()&&h.getTextContent()===``;if(o<m+200&&n.offset===f&&n.key===p)Rv(l,u,d);else if(n.type===`text`)q(c)||K(141),zv(l,c);else if(n.type===`element`&&!g){X(c)||K(259);let e=n.getNode();e.isEmpty()?function(e,t){Rv(e,t.getTextFormat(),t.getTextStyle())}(l,e):Rv(l,l.format,``)}}else{let e=n.key,t=l.focus.key,r=l.getNodes(),a=r.length,s=l.isBackward(),c=s?o:i,u=s?i:o,d=s?t:e,f=s?e:t,p=Ym,m=!1;for(let e=0;e<a;e++){let t=r[e],n=t.getTextContentSize();if(q(t)&&n!==0&&!(e===0&&t.__key===d&&c===n||e===a-1&&t.__key===f&&u===0)&&(m=!0,p&=t.getFormat(),p===0))break}l.format=m?p:0}}let u=Ub();(c||(l===null?u!==null:l.dirty||!J(l)||!l.is(u)))&&Z(t,A_)})}function Rv(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function zv(e,t){Rv(e,t.getFormat(),t.getStyle())}function Bv(e,t){Fx(t,()=>{let n=Y(),r=QC(VC(t)),i=Ub();if(r){if(J(n)){let e=n.anchor,t=e.getNode();e.type===`element`&&e.offset===0&&n.isCollapsed()&&!qx(t)&&pC().getChildrenSize()===1&&t.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType===`touch`||e.pointerType===`pen`){let n=cw(r,t._rootElement).anchorNode;(hw(n)||ZS(n))&&hC(Hb(i,r,t,e))}}if(Rm&&r!==null&&r.rangeCount===0){let n=t._rootElement;if(n!==null&&e.target===n){let a=e.clientY,o=n.childNodes.length;for(let e=0;e<n.childNodes.length;e++){let t=n.childNodes[e];if(hw(t)){let n=t.getBoundingClientRect();if(a<=(n.top+n.bottom)/2){o=e;break}}}r.setBaseAndExtent(n,o,n,o);let s=Hb(i,r,t,e);s===null?r.removeAllRanges():hC(s)}}Z(t,j_,e)})}function Vv(e,t){let n=mw(e),r=e.pointerType;gw(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&Fx(t,()=>{zw(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}function Hv(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function Uv(e){let{lastKeyCode:t}=bx()._inputState;if(e==null||e.length<=1||t==null)return;let n=t.length===1?t:t===`Enter`?`
12
+ `:t===`Tab`?` `:null;if(!n)return;let r=Y();if(!J(r)||!r.isCollapsed())return;let i=r.anchor.getNode();if(!q(i))return;let{offset:a}=r.anchor;if(i.getTextContentSize()===a){let e=i.getNextSibling();if(n===`
13
+ `){if(Hm)return;if(rS(e))e.selectEnd();else if(!e){let e=pT(i,Rb),t=e&&e.getNextSibling();X(t)&&t.selectStart()}}else n===` `?sb(e)&&e.selectEnd():q(e)&&e.getTextContent()[0]===n&&e.select(1,1)}else i.getTextContent()[a]===n&&i.select(a+1,a+1)}function Wv(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function Gv(e){Wv(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>Wv(e),0)}function Kv(e,t){let n=mw(e);if(hw(n)&&zw(n,t))return!0;let r=t.getRootElement();if(r===null)return!1;let i=pw(r.ownerDocument);return i!==null&&r.contains(i)&&zw(i,t)}function qv(e){let t=e.inputType,n=Hv(e),r=bx(),i=r._inputState,a=Y();if(t===`insertText`&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(Wv(i),e.preventDefault(),J(a)&&!a.isCollapsed()){let e=a.isBackward()?a.anchor:a.focus;a.anchor.set(e.key,e.offset,e.type),a.focus.set(e.key,e.offset,e.type)}return!0}if(t===`deleteContentBackward`){if(a===null){let e=Ub();if(!J(e))return!0;hC(e.clone())}if(J(a)){let t=a.anchor.key===a.focus.key;if(function(e,t){return e.lastKeyCode===`MediaLast`&&t<e.lastKeyDownTimeStamp+30}(i,e.timeStamp)&&r.isComposing()&&t){if(iC(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{Fx(r,()=>{iC(null)})},30),J(a)){let e=a.anchor.getNode();e.markDirty(),q(e)||K(142),zv(a,e)}}else{if(iC(null),Hm&&n!==null&&!n.collapsed&&(a.applyDOMRange(n),!a.isCollapsed()))return e.preventDefault(),a.removeText(),!0;e.preventDefault();let o=a.anchor.getNode(),s=o.getTextContent(),c=o.canInsertTextAfter(),l=a.anchor.offset===0&&a.focus.offset===s.length,u=Km&&t&&!l&&c;if(u&&a.isCollapsed()&&(u=!Gx(MC(a.anchor,!0))),!u){Z(r,I_,!0);let e=Y();Km&&J(e)&&e.isCollapsed()&&(i.postDeleteSelectionToRestore=e,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!J(a))return t!==`historyUndo`&&t!==`historyRedo`||(e.preventDefault(),Z(r,t===`historyUndo`?G_:K_)),!0;let o=e.data;i.unprocessedBeforeInputData!==null&&SC(!1,r,i.unprocessedBeforeInputData),a.dirty&&i.unprocessedBeforeInputData===null||!a.isCollapsed()||qx(a.anchor.getNode())||n===null||a.applyDOMRange(n),i.unprocessedBeforeInputData=null;let s=a.anchor,c=a.focus,l=s.getNode(),u=c.getNode();if(t===`insertText`||t===`insertTranspose`){if(o===`
14
+ `)e.preventDefault(),Z(r,L_,!1);else if(o===Zm)e.preventDefault(),Z(r,R_);else if(o==null&&e.dataTransfer){let t=e.dataTransfer.getData(`text/plain`);e.preventDefault(),a.insertRawText(t)}else o!=null&&Fv(a,n,o,e.timeStamp,!0)?(e.preventDefault(),Z(r,z_,o),Uv(o)):i.unprocessedBeforeInputData=o;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case`insertFromYank`:case`insertFromDrop`:case`insertReplacementText`:Z(r,z_,e),Uv((e.dataTransfer?e.dataTransfer.getData(`text/plain`):null)??e.data);break;case`insertFromComposition`:{let t=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;let n=r._compositionKey;iC(null),t||Z(r,z_,e),$v(n);break}case`insertLineBreak`:iC(null),Z(r,L_,!1);break;case`insertParagraph`:iC(null),i.isInsertLineBreak&&!Hm?(i.isInsertLineBreak=!1,Z(r,L_,!1)):Z(r,R_);break;case`insertFromPaste`:case`insertFromPasteAsQuotation`:Z(r,B_,e);break;case`deleteByComposition`:(function(e,t){return e!==t||X(e)||X(t)||!YS(e)||!YS(t)})(l,u)&&Z(r,V_,e);break;case`deleteByDrag`:LC(wy),Z(r,V_,e);break;case`deleteByCut`:Z(r,V_,e);break;case`deleteContent`:Z(r,I_,!1);break;case`deleteWordBackward`:Z(r,H_,!0);break;case`deleteWordForward`:Z(r,H_,!1);break;case`deleteHardLineBackward`:case`deleteSoftLineBackward`:Z(r,U_,!0);break;case`deleteContentForward`:case`deleteHardLineForward`:case`deleteSoftLineForward`:Z(r,U_,!1);break;case`formatStrikeThrough`:Z(r,W_,`strikethrough`);break;case`formatBold`:Z(r,W_,`bold`);break;case`formatItalic`:Z(r,W_,`italic`);break;case`formatUnderline`:Z(r,W_,`underline`);break;case`historyUndo`:Z(r,G_);break;case`historyRedo`:Z(r,K_)}return!0}function Jv(e,t){e.stopPropagation();let n=t._inputState;Wv(n),Fx(t,()=>{Kv(e,t)||t.dispatchCommand(N_,e)},{event:e}),n.unprocessedBeforeInputData=null}function Yv(e){let t=bx(),n=t._inputState,r=Y(),i=e.data,a=Hv(e),o=!1;if(i!=null&&J(r)){let s=QC(VC(t)),c=s===null?null:cw(s,t._rootElement),l=e.inputType===`insertCompositionText`&&n.compositionPhase!==`ending-firefox`&&!t.isComposing();l&&(n.hadOrphanedCompositionEvents=!0);let u=r.anchor.getNode(),d=e.inputType===`insertCompositionText`&&n.compositionPhase!==`ending-firefox`&&t.isComposing()&&q(u)&&XS(u);if(!l&&!d&&Fv(r,a,i,e.timeStamp,!1,c)){if(o=!0,n.compositionPhase===`ending-firefox`){let e=ey(t,i);if(n.compositionPhase=`idle`,e)return LC(Ty),gC(),!0}let a=r.anchor.getNode();if(s===null||c===null)return!0;let l=r.isBackward(),u=l?r.anchor.offset:r.focus.offset,d=l?r.focus.offset:r.anchor.offset;Bm&&!r.isCollapsed()&&q(a)&&c.anchorNode!==null&&a.getTextContent().slice(0,u)+i+a.getTextContent().slice(u+d)===xC(c.anchorNode)||Z(t,z_,i);let f=i.length;Rm&&f>1&&e.inputType===`insertCompositionText`&&!t.isComposing()&&(r.anchor.offset-=f,r._cachedNodes=null,r._cachedIsBackward=null),Km&&t.isComposing()&&(n.lastKeyDownTimeStamp=0,iC(null))}}return o||(SC(!1,t,i===null?void 0:i),n.compositionPhase===`ending-firefox`&&(ey(t,i||void 0),LC(`composition-end`),n.compositionPhase=`idle`)),gC(),!0}function Xv(e,t){Z(t,P_,e)}function Zv(e){let t=bx(),n=t._inputState,r=Y();if(J(r)&&!t.isComposing()){n.compositionPhase=`composing`,n.hadOrphanedCompositionEvents=!1;let i=r.anchor,a=r.anchor.getNode();if(iC(i.key),LC(`composition-start`),e.timeStamp<n.lastKeyDownTimeStamp+30||i.type===`element`||!r.isCollapsed()||!Km&&(a.getFormat()!==r.format||q(a)&&a.getStyle()!==r.style)||q(a)&&(XS(a)||i.offset===0&&!a.canInsertTextBefore()||i.offset===a.getTextContentSize()&&!a.canInsertTextAfter())){Z(t,z_,Qm);let e=Y();J(e)&&iC(e.anchor.key)}}return!0}function Qv(e){let t=bx();return t._inputState.compositionPhase=`idle`,ey(t,e.data),LC(Ty),!0}function $v(e){if(e===null)return;let t=oC(e);if(!q(t)||t.getType()===`text`||XS(t)||!t.isAttached())return;let n=Y(),r=J(n)&&n.anchor.key===e?n.anchor.offset:null,i=nb(t.getTextContent());if(i.setFormat(t.getFormat()),i.setStyle(t.getStyle()),t.replace(i),r!==null){let e=Math.min(r,i.getTextContentSize());i.select(e,e)}}function ey(e,t){let n=e._compositionKey;if(iC(null),n!==null&&t!=null){if(t===``){let t=oC(n),r=e.getElementByKey(n),i=r!==null&&q(t)?Dw(t,r,e):null;if(i!==null&&i.nodeValue!==null&&q(t)){let n=QC(VC(e)),r=n&&cw(n,e._rootElement),a=null,o=null;r!==null&&r.anchorNode===i&&(a=r.anchorOffset,o=r.focusOffset),CC(t,i.nodeValue,a,o,!0)}return $v(n),!1}if(t[t.length-1]===`
15
+ `){let t=Y();if(J(t)||vb(t)){if(J(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}return Z(e,ev,null),$v(n),!1}}let r=oC(n);if(r!==null&&q(r)&&XS(r)){r.markDirty();let e=Y(),i=r.getTextContentSize(),a=J(e)&&e.anchor.key===n?e.anchor.offset:i;return r.select(a,a).insertText(t),!0}}return SC(!0,e,t),$v(n),!1}function ty(e,t){let n=t._inputState;Rm?n.compositionPhase=`ending-firefox`:Hm||!Wm&&!qm?Z(t,F_,e):(n.compositionPhase=`ending-safari`,n.compositionEndData=e.data)}function ny(e,t){let n=t._inputState;n.lastKeyDownTimeStamp=e.timeStamp,n.lastKeyCode=e.key,e.key!==`Backspace`&&Wv(n),t.isComposing()||Z(t,q_,e)}var ry={altKey:`any`,ctrlKey:`any`,metaKey:`any`,shiftKey:`any`},iy={ctrlKey:!0},ay={metaKey:!0},oy={shiftKey:`any`},sy={altKey:`any`,shiftKey:`any`};function cy(e){let t=bx(),n=t._inputState;if(e.key==null)return!0;if(n.compositionPhase===`ending-safari`){let r=function(e){return e.key===`Backspace`}(e);if(r&&Fx(t,()=>{ey(t,n.compositionEndData)}),n.compositionPhase=`idle`,n.compositionEndData=``,r)return!0}let r=t._keyDownShortcuts;r===null&&(r=Ev(function(){let e=(e,t,n)=>({key:e,modifiers:t,onMatch:(e,t)=>{Z(t,n,e)}}),t=(e,t,n,r)=>({key:e,modifiers:t,onMatch:(e,t)=>{e.preventDefault(),Z(t,n,r)}}),n=(e,t)=>({key:`Enter`,modifiers:e,onMatch:(e,n)=>{n._inputState.isInsertLineBreak=t,Z(n,ev,e)}}),r=(e,t)=>({key:e,modifiers:xv,onMatch:(e,n)=>{let r=n._editorState._selection;r===null||J(r)||(e.preventDefault(),Z(n,t,e))}});return[e(`ArrowRight`,oy,J_),e(`ArrowLeft`,oy,X_),e(`ArrowUp`,sy,Q_),e(`ArrowDown`,sy,$_),n({...ry,shiftKey:!0},!0),n({...ry,shiftKey:!1},!1),e(` `,ry,tv),{key:`Backspace`,modifiers:oy,onMatch:(e,t)=>{Z(t,nv,e)&&Gv(t._inputState)}},e(`Escape`,ry,rv),e(`Delete`,{},iv),t(`Backspace`,Sv,H_,!0),t(`Delete`,Sv,H_,!1),t(`b`,xv,W_,`bold`),t(`u`,xv,W_,`underline`),t(`i`,xv,W_,`italic`),e(`Tab`,oy,av),t(`z`,xv,G_,void 0),t(`z`,{...xv,shiftKey:!0},K_,void 0),...Lm?[{key:`o`,modifiers:iy,onMatch:(e,t)=>{e.preventDefault(),t._inputState.isInsertLineBreak=!0,Z(t,L_,!0)}},e(`ArrowLeft`,{metaKey:!0,...oy},Z_),e(`ArrowRight`,{metaKey:!0,...oy},Y_),t(`h`,iy,I_,!0),t(`d`,iy,I_,!1),t(`Backspace`,ay,U_,!0),t(`Delete`,ay,U_,!1),t(`k`,iy,U_,!1)]:[e(`Home`,oy,Z_),e(`End`,oy,Y_),t(`y`,iy,K_,void 0)],{key:`a`,modifiers:xv,onMatch:(e,t)=>{e.preventDefault(),Z(t,fv,e)&&Gv(t._inputState)}},r(`c`,uv),r(`x`,dv)]}()),t._keyDownShortcuts=r);let i=r.match(e);return i&&i.onMatch(e,t),function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(yv,e),!0}function ly(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}var uy=new Map;function dy(e){let t=$C(e.target);if(t===null)return;let n=IC(e.target),r=null,i=null,a=n===null?void 0:Nv.get(n);if(n!==null){if(a!==void 0){let e=a.editors,n=a.hasShadowEditor;if(n===void 0){n=!1;for(let t of e)if(t._rootElement!==null&&ew(t._rootElement.getRootNode())){n=!0;break}a.hasShadowEditor=n}if(n){let n=null,a=null;for(let o of e){let e=o._rootElement;if(e===null)continue;let s=cw(t,e).anchorNode;if(s!==null&&qS(s)===o){if(ew(e.getRootNode())){r=o,i=s;break}n===null&&(n=o,a=s)}}r===null&&n!==null&&(r=n,i=a)}else{let e=t.anchorNode;e===null||hw(e)&&e.shadowRoot!==null||(r=qS(e),r!==null&&(i=e))}}if(r===null){let e=pw(n);r=e===null?null:qS(e)}}if(r===null)return;if(r._inputState.isSelectionChangeFromMouseDown){if(a!==void 0)for(let e of a.editors)e._inputState.isSelectionChangeFromMouseDown=!1;Fx(r,()=>{let n=Ub(),a=i??cw(t,r._rootElement).anchorNode;(hw(a)||ZS(a))&&hC(Hb(n,t,r,e))})}let o=yC(r),s=o[o.length-1],c=s._key,l=uy.get(c),u=l||s;u!==r&&Lv(t,u,!1),Lv(t,r,!0),r===s?l&&uy.delete(c):uy.set(c,r)}function fy(e){e._lexicalHandled=!0}function py(e){return!0===e._lexicalHandled}var my=O_();function hy(e){let t=Mv.get(e);if(t===void 0)return void my();let n=Nv.get(t);if(n===void 0)return void my();Mv.delete(e);let r=JS(e);KS(r)?(function(e){if(e._parentEditor!==null){let t=yC(e),n=t[t.length-1]._key;uy.get(n)===e&&uy.delete(n)}else uy.delete(e._key)}(r),n.editors.delete(r),n.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&K(198);let i=ly(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}function gy(e,t,n){gx();let r=e.__key,i=e.getParent();if(i===null)return void(yT(e)!==null&&K(367,r,String(yT(e))));let a=function(e){let t=Y();if(!J(t)||!X(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),a=r.getNode();return zC(i,e)&&n.set(e.__key,0,`element`),zC(a,e)&&r.set(e.__key,0,`element`),t}(e),o=!1;if(J(a)&&t){let t=a.anchor,n=a.focus;t.key===r&&(qb(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(qb(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else vb(a)&&t&&e.isSelected()&&e.selectPrevious();if(J(a)&&t&&!o&&Wb(a,i)){let t=e.getIndexWithinParent();nC(e),Gb(a,i,t,-1)}else nC(e);n||GC(i)||i.canBeEmpty()||!i.isEmpty()||gy(i,t),t&&a&&qx(i)&&i.isEmpty()&&i.selectEnd()}var _y=Symbol.for(`ephemeral`);function vy(e){return e[_y]||!1}var yy={configurable:!0,enumerable:!1,value:void 0,writable:!0},by=class{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=oT(this);return e===void 0&&K(64,this.name),e}static clone(e){K(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||hT(this.constructor);return Object.assign(t,{extends:n}),typeof e==`string`&&Object.assign(t,{type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&=this.__state.getWritable(this).resetOnCopyNode()}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",yy),Object.defineProperty(this,kg,yy),tC(this,e)}getType(){return this.__type}isInline(){K(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e===`root`)return!0;let t=oC(e);if(t===null)break;e=t.__parent===null?yT(t):t.__parent}return!1}isSelected(e){let t=e||Y();if(t==null)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(q(this))return n;if(J(t)&&t.anchor.type===`element`&&t.focus.type===`element`){if(t.isCollapsed())return!1;let e=this.getParent();if(Gx(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:oC(e)}getParentOrThrow(){let e=this.getParent();return e===null&&K(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(GC(t)||yT(e)!==null)return X(e)||e===this&&Gx(e)||K(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&K(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:oC(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(t===null)return e;let n=t.getFirstChild();for(;n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return e===null?null:oC(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=X(this)?this:this.getParent(),n=X(e)?e:e.getParent(),r=t&&n?gE(t,n):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=gE(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?pE(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&K(279),!1)))}isParentOf(e){return zC(e,this)}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set,i=this;for(;i!==null;){let a=i.__key;if(r.has(a)||(r.add(a),n.push(i)),i===e)break;let o=X(i)?t?i.getFirstChild():i.getLastChild():null;if(o!==null){i=o;continue}let s=t?i.getNextSibling():i.getPreviousSibling();if(s!==null){i=s;continue}let c=i.getParentOrThrow();if(r.has(c.__key)||n.push(c),c===e)break;let l=null,u=c;do{if(u===null&&K(68),l=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),u===null)break;l!==null||r.has(u.__key)||n.push(u)}while(l===null);i=l}return t||n.reverse(),n}isDirty(){let e=bx()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(vy(this))return this;let e=oC(this.__key);return e===null&&K(113),e}getWritable(){if(vy(this))return this;gx();let e=vx(),t=bx(),n=e._nodeMap,r=this.__key,i=this.getLatest(),a=t._cloneNotNeeded,o=Y();if(o!==null&&o.setCachedNodes(null),a.has(r))return rC(i),i;let s=jw(i);return a.add(r),rC(s),n.set(r,s),s}getTextContent(){return NT(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){K(70)}updateDOM(e,t,n){K(71)}getDOMSlot(e){return new ph(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(e=!1){let t=function(e,t){let n=Uw(Hw(e.constructor)),{generated:r,isCompactDefault:i}=n,a=r===null?void 0:t?r.exportCompactJSON:r.exportJSON;return a===void 0?function(e,t,n){let r=n?{type:e.__type}:{};return X(e)&&(r.children=[]),(function(e,t,n,r){for(let i=0;i<t.length;i++){let a=t[i];if(r&&a.derived)continue;let o;if(a.kind===`ownField`){let t=tT(e)[a.field];o=a.getterTable===void 0?t:$h(a.getterTable,t)?a.getterTable[t]:void 0}else o=a.getter.call(e);a.kind===`ownField`&&a.when!==void 0&&(!nT(a,o)&&a.when.call(e)||(o=void 0)),r&&nT(a,o)||(n[a.key]=o)}})(e,t,r,n),n||(r.type=e.__type,r.version=1),r}(e,n.getters,t):t?a(e,i):a(e)}(this,e),n=this.__state?this.__state.toJSON():void 0;return n!==void 0&&Object.assign(t,n),t}static importJSON(e){K(18,this.name)}updateFromJSON(e){return aT(vg(this,e),e)}static transform(){return null}remove(e){gy(this,!0,e)}replace(e,t){gx();let n=Y();n!==null&&(n=n.clone()),JC(this,e);let r=this.getLatest(),i=this.__key,a=bT(r);a!==null&&K(400,i,r.getType(),a.getKey(),a.getType());let o=e.__key,s=e.getWritable(),c=this.getParentOrThrow().getWritable(),l=c.__size,u=s.getParent(),d=u!==null&&J(n)&&Wb(n,u),f=d?s.getIndexWithinParent():-1;nC(s),d&&u!==null&&J(n)&&Gb(n,u,f,-1);let p=r.getPreviousSibling(),m=r.getNextSibling(),h=r.__prev,g=r.__next,_=r.__parent;gy(r,!1,!0),p===null?c.__first=o:p.getWritable().__next=o,s.__prev=h,m===null?c.__last=o:m.getWritable().__prev=o,s.__next=g,s.__parent=_,c.__size=u!==null&&u.is(c)?l-1:l;let v=0;if(t&&(X(this)&&X(s)||K(139),v=s.getChildrenSize(),s.splice(v,0,this.getChildren())),J(n)){hC(n);let e=n.anchor,r=n.focus;e.key===i&&(t&&e.type===`element`?e.set(s.__key,v+e.offset,`element`):db(e,s)),r.key===i&&(t&&r.type===`element`?r.set(s.__key,v+r.offset,`element`):db(r,s))}return aC()===i&&iC(o),s}insertAfter(e,t=!0){gx(),JC(this,e);let n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();let i=r.getParent(),a=Y(),o=!1,s=!1,c=-1;if(i!==null&&t&&J(a)&&Wb(a,i)){let t=i.__key,n=a.anchor,r=a.focus;c=e.getIndexWithinParent(),o=n.type===`element`&&n.key===t&&n.offset===c+1,s=r.type===`element`&&r.key===t&&r.offset===c+1}nC(r),c!==-1&&i!==null&&J(a)&&Gb(a,i,c,-1);let l=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=r.__key,f=n.__next;if(l===null?u.__last=d:l.getWritable().__prev=d,u.__size++,n.__next=d,r.__next=f,r.__prev=n.__key,r.__parent=n.__parent,t&&J(a)){let e=u.__key;if(o||s||Wb(a,u)){let t=this.getIndexWithinParent();Gb(a,u,t+1),o&&a.anchor.set(e,t+2,`element`),s&&a.focus.set(e,t+2,`element`)}}return e}insertBefore(e,t=!0){gx(),JC(this,e);let n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();let i=r.__key,a=Y(),o=r.getParent(),s=o!==null&&t&&J(a)&&Wb(a,o),c=s?r.getIndexWithinParent():-1;nC(r),s&&o!==null&&J(a)&&Gb(a,o,c,-1);let l=this.getPreviousSibling(),u=this.getParentOrThrow().getWritable(),d=n.__prev,f=t&&J(a)&&Wb(a,u),p=f?this.getIndexWithinParent():-1;return l===null?u.__first=i:l.getWritable().__next=i,u.__size++,n.__prev=i,r.__prev=d,r.__next=n.__key,r.__parent=n.__parent,f&&J(a)&&Gb(a,u,p),e}isParentRequired(){return!1}createParentElementNode(){return DS()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){gx();let n=bT(this);if(n!==null)return n.selectPrevious(e,t);let r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(X(r))return r.select();if(!q(r)){let e=r.getIndexWithinParent()+1;return i.select(e,e)}return r.select(e,t)}selectNext(e,t){gx();let n=bT(this);if(n!==null)return n.selectNext(e,t);let r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(X(r))return r.select(0,0);if(!q(r)){let e=r.getIndexWithinParent();return i.select(e,e)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function xy(e){return e instanceof by}var Sy=`history-push`,Cy=`history-merge`,wy=`skip-selection-focus`,Ty=`composition-end`,Ey=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Dy(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!Ey.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function Oy(e,t,n,r,i){let a=Dy(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}var ky=e=>{let t=Vh(e,`format`),n=Hh(e,`format`),r=Wh(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=Oy(t.indent,0,0,1/0),e.__textFormat=Dy(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}};function Ay(e,t){e.__detail=t.__detail,e.__format=t.__format,e.__mode=t.__mode,e.__style=t.__style,e.__text=t.__text}var jy=e=>{let t=Vh(e,`mode`),n=Uh(e,`detail`,0),r=Uh(e,`format`,0),i=Hh(e,`mode`),a=Wh(e,`mode`);return{exportJSON:function(e){return{detail:e.__detail,format:e.__format,mode:t[e.__mode],style:e.__style,text:e.__text,type:e.__type,version:1}},exportCompactJSON:function(e){let n={type:e.__type},r=e.__detail;r!==void 0&&r!==0&&(n.detail=r);let i=e.__format;i!==void 0&&i!==0&&(n.format=i);let a=t[e.__mode];a!==void 0&&a!==`normal`&&(n.mode=a);let o=e.__style;o!==void 0&&o!==``&&(n.style=o);let s=e.__text;return s!==void 0&&s!==``&&(n.text=s),n},updateFromJSON:function(e,t){let o=t.detail;e.__detail=typeof o==`string`&&o in n?n[o]:Dy(o,0);let s=t.format;e.__format=typeof s==`string`&&s in r?r[s]:Dy(s,0);let c=t.mode;e.__mode=typeof c==`string`&&c in i?i[c]:a;let l=t.style;e.__style=typeof l==`string`?l:``;let u=t.text;return e.__text=typeof u==`string`?u:``,e},afterCloneFrom:Ay}},My=e=>{let t=Vh(e,`format`),n=Hh(e,`format`),r=Wh(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=Oy(t.indent,0,0,1/0),e.__textFormat=Dy(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}},Ny=()=>({exportJSON:function(e){return{type:e.__type,version:1}},exportCompactJSON:function(e){return{type:e.__type}}}),Py=e=>{let t=Vh(e,`mode`),n=Uh(e,`format`,0);return{exportJSON:function(e){return{detail:e.__detail,mode:t[e.__mode],text:e.__text,format:e.__format,style:e.__style,type:e.__type,version:1}},exportCompactJSON:function(e){let t={type:e.__type},n=e.__format;n!==void 0&&n!==0&&(t.format=n);let r=e.__style;return r!==void 0&&r!==``&&(t.style=r),t},updateFromJSON:function(e,t){let r=t.format;e.__format=typeof r==`string`&&r in n?n[r]:Dy(r,0);let i=t.style;return e.__style=typeof i==`string`?i:``,e}}},Fy=`!important`;function Iy(e){let t={};if(!e)return t;let n=``,r=``,i=null,a=!1,o=!1,s=!1,c=0,l=e.length,u=-1;for(let d=0;d<l;d++){let l=e[d];if(a)l===`*`&&e[d+1]===`/`&&(a=!1,d++);else if(o)u===-1&&(u=d),o=!1;else if(i===null){if(l!==`/`||e[d+1]!==`*`){if(l!==`"`&&l!==`'`){if(l!==`(`){if(l!==`)`){if(s||l!==`:`||c!==0){if(l===`;`&&c===0){u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1);let i=n.trim(),a=r.trim();i!==``&&a!==``&&(t[i]=a),n=``,r=``,s=!1;continue}u===-1&&(u=d)}else u!==-1&&(n+=e.slice(u,d),u=-1),s=!0}else u===-1&&(u=d),c=Math.max(0,c-1)}else u===-1&&(u=d),c++}else u===-1&&(u=d),i=l}else u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1),a=!0,d++}else u===-1&&(u=d),l===`\\`?o=!0:l===i&&(i=null)}u!==-1&&(s?r+=e.slice(u,l):n+=e.slice(u,l));let d=n.trim(),f=r.trim();return d!==``&&f!==``&&(t[d]=f),t}function Ly(e,t,n){let r=n.trimEnd(),i=r.length-10;i>=0&&r.slice(i).toLowerCase()===Fy?e.setProperty(t,r.slice(0,i).trim(),`important`):e.setProperty(t,n,``)}function Ry(e,t,n=``){if(t===n)return;let r=Iy(n),i=Iy(t);for(let t in i)delete r[t],Ly(e,t,i[t]);for(let t in r)e.removeProperty(t)}var zy=ig()({detail:og(ag(ng(),eh),{field:`__detail`}),format:og(ag(ng(),$m),{field:`__format`}),mode:og(rg([`normal`,`token`,`segmented`]),{field:`__mode`,getterTable:ah,setterTable:ih}),style:og(eg(),{field:`__style`}),text:og(eg(),{field:`__text`,getter:`getTextContent`,setter:`setTextContent`})});function By(e,t){return 16&t?`code`:t&128?`mark`:32&t?`sub`:64&t?`sup`:null}function Vy(e,t){return 1&t?`strong`:2&t?`em`:`span`}function Hy(e,t,n,r,i){let a=r.classList,o=kC(i,`base`);o!==void 0&&a.add(...o),o=kC(i,`underlineStrikethrough`);let s=!1,c=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,c||a.add(...o)):c&&a.remove(...o));for(let e in $m){let r=$m[e];if(o=kC(i,e),o!==void 0){if(n&r){if(s&&(e===`underline`||e===`strikethrough`)){t&r&&a.remove(...o);continue}((t&r)===0||c&&e===`underline`||e===`strikethrough`)&&a.add(...o)}else t&r&&a.remove(...o)}}OC(r,`class`)}function Uy(e,t,n){let r=n.isComposing(),i=e+(r?Xm:``),a=Cw(),o=ww(a).$getDOMSlot(n,t,a),s=o.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(aw().createTextNode(i));let c=s,l=c.nodeValue;if(l!==i){if(r||Rm){let[e,t,n]=function(e,t){let n=e.length,r=t.length,i=0,a=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;a+i<n&&a+i<r&&e[n-a-1]===t[r-a-1];)a++;return[i,n-i-a,t.slice(i,r-a)]}(l,i);t!==0&&c.deleteData(e,t),c.insertData(e,n)}else c.nodeValue=i}}function Wy(e,t,n,r,i,a){Uy(i,e,t);let o=a.theme.text;o!==void 0&&Hy(0,0,r,e,o)}function Gy(e,t){let n=aw().createElement(t);return n.appendChild(e),n}function Ky(e){return e!=null&&!0===e.__isInlineFormattable}var qy=class extends by{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config(`text`,{extends:by,generated:jy,importDOM:{"#text":()=>({conversion:Qy,priority:0}),b:()=>({conversion:Yy,priority:0}),code:()=>({conversion:tb,priority:0}),em:()=>({conversion:tb,priority:0}),i:()=>({conversion:tb,priority:0}),mark:()=>({conversion:tb,priority:0}),s:()=>({conversion:tb,priority:0}),span:()=>({conversion:Jy,priority:0}),strong:()=>({conversion:tb,priority:0}),sub:()=>({conversion:tb,priority:0}),sup:()=>({conversion:tb,priority:0}),u:()=>({conversion:tb,priority:0})},json:zy})}constructor(e=``,t){super(t),this.__text=e,this.__format=0,this.__style=``,this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return ah[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===aC()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=$m[e];return(this.getFormat()&t)!==0}isSimpleText(){let e=this.getLatest();return e.__type===`text`&&e.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return eC(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=By(0,n),i=Vy(0,n),a=r===null?i:r,o=aw().createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=aw().createElement(i),o.appendChild(s)),Wy(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&Ry(o.style,c),o}updateDOM(e,t,n){let r=this.__text,i=e.__format,a=this.__format,o=By(0,i),s=By(0,a),c=Vy(0,i),l=Vy(0,a);if((o===null?c:o)!==(s===null?l:s))return!0;if(o===s&&c!==l){let e=t.firstChild;e??K(48);let i=aw().createElement(l);return Wy(i,this,0,a,r,n),t.replaceChild(i,e),!1}let u=t;s!==null&&o!==null&&(u=t.firstChild,u??K(49)),Uy(r,u,this);let d=n.theme.text;d!==void 0&&i!==a&&Hy(0,i,a,u,d);let f=e.__style,p=this.__style;return f!==p&&(Ry(t.style,p,f),OC(t,`style`)),!1}exportDOM(e){let{element:t}=super.exportDOM(e);return hw(t)||K(132),t.style.whiteSpace=`pre-wrap`,this.hasFormat(`lowercase`)?t.style.textTransform=`lowercase`:this.hasFormat(`uppercase`)?t.style.textTransform=`uppercase`:this.hasFormat(`capitalize`)&&(t.style.textTransform=`capitalize`),this.hasFormat(`bold`)&&(t=Gy(t,`b`)),this.hasFormat(`italic`)&&(t=Gy(t,`i`)),this.hasFormat(`strikethrough`)&&(t=Gy(t,`s`)),this.hasFormat(`underline`)&&(t=Gy(t,`u`)),{element:t}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?$m[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?eh[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=eC(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=ih[e];if(this.getLatest().__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.getLatest().__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){gx();let n=e,r=t,i=Y(),a=this.getTextContent(),o=this.__key;if(typeof a==`string`){let e=a.length;n===void 0&&(n=e),r===void 0&&(r=e)}else n=0,r=0;if(!J(i))return zb(o,n,o,r,`text`,`text`);{let e=aC();e!==i.anchor.key&&e!==i.focus.key||iC(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),a=i.__text,o=n.length,s=e;s<0&&(s=o+s,s<0&&(s=0));let c=Y();if(r&&J(c)){let t=e+o;c.setTextNodeRange(i,t,i,t)}return i.__text=a.slice(0,s)+n+a.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){gx();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=aC(),a=n.length;e.sort((e,t)=>e-t),e.push(a);let o=[],s=e.length;for(let t=0,r=0;t<a&&r<=s;r++){let i=e[r];i>t&&(o.push(n.slice(t,i)),t=i)}let c=o.length;if(c===1)return[t];let l=o[0],u=t.getParent(),d,f=t.getFormat(),p=t.getStyle(),m=t.__detail,h=!1,g=null,_=null,v=Y();if(J(v)){let[e,t]=v.isBackward()?[v.focus,v.anchor]:[v.anchor,v.focus];e.type===`text`&&e.key===r&&(g=e),t.type===`text`&&t.key===r&&(_=t)}t.isSegmented()?(d=nb(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=Cg(t,d),h=!0):d=t.setTextContent(l);let y=[d];for(let e=1;e<c;e++){let n=nb(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=Cg(t,n);let a=n.__key;i===r&&iC(a),y.push(n)}let b=g?g.offset:null,x=_?_.offset:null,S=0;for(let e of y){if(!g&&!_)break;let t=S+e.getTextContentSize();if(g!==null&&b!==null&&b<=t&&b>=S&&(g.set(e.getKey(),b-S,`text`),b<t&&(g=null)),_!==null&&x!==null&&x<=t&&x>=S){_.set(e.getKey(),x-S,`text`);break}S=t}if(u!==null){(function(e){let t=e.getPreviousSibling(),n=e.getNextSibling();t!==null&&rC(t),n!==null&&rC(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),J(v)&&Gb(v,u,t,c-1)}return y}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||K(50);let n=this.__key,r=e.__key,i=this.__text,a=i.length;aC()===r&&iC(n);let o=Y();if(J(o)){let i=o.anchor,s=o.focus;i!==null&&i.key===r&&Jb(i,t,n,e,a),s!==null&&s.key===r&&Jb(s,t,n,e,a)}let s=e.__text,c=t?s+i:i+s;this.setTextContent(c);let l=this.getWritable();return e.remove(),l}isTextEntity(){return!1}};function Jy(e){return{forChild:rb(e.style),node:null}}function Yy(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:rb(t.style,n?void 0:`bold`),node:null}}var Xy=new WeakMap;function Zy(e){if(!hw(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function Qy(e){let t=e;e.parentElement===null&&K(129);let n=t.textContent||``;if(function(e){let t,n=e.parentNode,r=[e];for(;n!==null&&(t=Xy.get(n))===void 0&&!Zy(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)Xy.set(r[e],i);return i}(t)!==null)return{node:ex(n)};if(n=n.replace(/\r/g,``).replace(/[ \t\n]+/g,` `),n===``)return{node:null};if(n[0]===` `){let e=t,r=!0;for(;e!==null&&(e=$y(e,!1))!==null;){let t=e.textContent||``;if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===` `){let e=t,r=!0;for(;e!==null&&(e=$y(e,!0))!==null;)if((e.textContent||``).replace(/^( |\t|\r?\n)+/,``).length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===``?{node:null}:{node:nb(n)}}function $y(e,t){let n=e;for(;;){let e;for(;(e=t?n.nextSibling:n.previousSibling)===null;){let e=n.parentElement;if(e===null)return null;n=e}if(n=e,hw(n)){let e=n.style.display;if(e===``&&!yw(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(ZS(n))return n;if(n.nodeName===`BR`)return null}}var eb={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function tb(e){let t=eb[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:rb(e.style,t),node:null}}function nb(e=``){return qC(new qy(e))}function q(e){return e instanceof qy}function rb(e,t){let n=e.fontWeight,r=e.textDecoration.split(` `),i=n===`700`||n===`bold`,a=r.includes(`line-through`),o=e.fontStyle===`italic`,s=r.includes(`underline`),c=e.verticalAlign,l=e.textTransform;return e=>q(e)||Ky(e)?(i&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),a&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),o&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),s&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),c!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),c!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),l!==`lowercase`&&l!==`uppercase`&&l!==`capitalize`||e.hasFormat(l)||e.toggleFormat(l),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}var ib=ig()({detail:sg(ng(2),{getter:{field:`__detail`},setter:null}),mode:sg(rg([`normal`]),{getter:{field:`__mode`,getterTable:{0:`normal`}},setter:null}),text:sg(eg(` `),{getter:{field:`__text`,method:`getTextContent`},setter:null})}),ab=class extends qy{$config(){return this.config(`tab`,{extends:qy,generated:Py,json:ib})}constructor(e=void 0){super(` `,e),this.__detail=2}createDOM(e){let t=super.createDOM(e),n=kC(e.theme,`tab`);return n!==void 0&&t.classList.add(...n),t}setTextContent(e){return super.setTextContent(` `)}spliceText(e,t,n,r){return n===``&&t===0||n===` `&&t===1||K(286),this}setDetail(e){return e!==2&&K(127),this}setMode(e){return e!==`normal`&&K(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function ob(){return qC(new ab)}function sb(e){return e instanceof ab}var cb=class{key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:fE(gS(sS(this,`next`)),gS(sS(e,`next`)))<0}getNode(){let e=oC(this.key);return e===null&&K(20),e}set(e,t,n,r){let i=this._selection,a=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,hx()||(aC()===a&&iC(e),i!==null&&(i.setCachedNodes(null),J(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}};function lb(e,t,n){return new cb(e,t,n)}function ub(e,t){let n=t.__key,r=e.offset,i=`element`;if(q(t)){i=`text`;let e=t.getTextContentSize();r>e&&(r=e)}else if(!X(t)){let e=t.getNextSibling();if(q(e))n=e.__key,r=0,i=`text`;else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function db(e,t){if(X(t)){let n=t.getLastDescendant();X(n)||q(n)?ub(e,n):ub(e,t)}else ub(e,t)}function fb(e,t,n,r){let i=e.getNode(),a=i.getChildAtIndex(e.offset),o=nb();if(o.setFormat(n),o.setStyle(r),OS(a))a.splice(0,0,[o]);else if(a!==null){let e=GC(i)?DS().append(o):o;a.insertBefore(e)}else if(GC(i)){let e=i.getLastChild();X(e)&&!e.isInline()&&e.isEmpty()?e.append(o):i.append(DS().append(o))}else i.append(o);e.is(t)&&t.set(o.__key,0,`text`),e.set(o.__key,0,`text`)}function pb(e,t,n,r){let i=e.anchor.getNode();q(i)||K(398);let a=e.anchor.offset,o=nb(t);o.setFormat(n),o.setStyle(r);let s=i.getParentOrThrow();if(a===0)s.isInline()&&!i.__prev?s.insertBefore(o):i.insertBefore(o,!1);else if(a===i.getTextContentSize())s.isInline()&&!i.__next?s.insertAfter(o):i.insertAfter(o,!1);else{let[e]=i.splitText(a);e.insertAfter(o,!1)}i.getTextContent()===``&&i.isAttached()&&i.remove(),o.selectEnd(),o.isComposing()&&e.anchor.type===`text`&&e.anchor.set(e.anchor.key,e.anchor.offset-t.length,e.anchor.type)}var mb=class e{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!vb(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t=this.getNodes().filter(e=>yT(e)===null),n=t.length;if(n===0)return;let r=t[n-1],i;if(q(r))i=r.select();else{let e=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(e,e)}i.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=this._nodes,n=[];for(let e of t){let t=oC(e);t!==null&&n.push(t)}return hx()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t=``;for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes().filter(e=>yT(e)===null);if((Y()||Ub())===this&&e[0]){let t=QT(e[0],`next`);lS(uE(t,t))}for(let t of e)t.remove();hb()}};function hb(){let e=pC();if(e.isEmpty()){let t=DS();e.append(t),t.select()}}function gb(e){let t=function(e){let t=e.getNode();if(e.offset>0)return e.type===`element`&&X(t)?t.getChildAtIndex(e.offset-1):null;for(let e=t;e!==null&&!Sw(e)&&!GC(e);e=e.getParent()){let t=e.getPreviousSibling();if(t!==null)return t}return null}(e);return rS(t)&&rS(t.getPreviousSibling())}function J(e){return e instanceof _b}var _b=class e{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!J(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=function(e){let t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);let i=new Set,a=new Set;for(let n of e)if(JT(n)){let{origin:e}=n;t.length===0?i.add(e):(a.add(e),t.push(e))}else{let{origin:e}=n;X(e)&&a.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),qT(e.focus)&&X(e.focus.origin)&&e.focus.getNodeAtCaret()===null)for(let n=nE(e.focus.origin,`previous`);JT(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=iE(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!X(e)||a.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(t.length===0&&e.isCollapsed()){let n=gS(e.anchor),r=gS(e.anchor.getFlipped()),i=e=>KT(e)?e.origin:e.getNodeAtCaret(),a=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(a)}return t}(vS(dS(this),`next`));return hx()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){return this.anchor.set(e.__key,t,`text`),this.focus.set(n.__key,r,`text`),this}getTextContent(){let e=this.getNodes();if(e.length===0)return``;let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,a=r.isBefore(i),[o,s]=Sb(this),c=``,l=!0;for(let u=0;u<e.length;u++){let d=e[u];if(X(d)&&!d.isInline()){l||(c+=`
16
+ `);let e=``;for(let t of TT(d)){let n=ET(d,t);n!==null&&(e+=n.getTextContent())}e===``?l=!d.isEmpty():(c+=e,l=!1)}else if(l=!1,q(d)){let e=d.getTextContent();d===t?d===n?r.type===`element`&&i.type===`element`&&i.offset!==r.offset||(e=o<s?e.slice(o,s):e.slice(s,o)):e=a?e.slice(o):e.slice(s):d===n&&(e=a?e.slice(0,s):e.slice(0,o)),c+=e}else!Gx(d)&&!rS(d)||d===n&&this.isCollapsed()||(c+=d.getTextContent())}return c}applyDOMRange(e){let t=bx(),n=t.getEditorState()._selection,r=Lb(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(r===null)return;let[i,a,o]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(a.key,a.offset,a.type,!0),o&&(this.dirty=!0),Dg(this)}clone(){let t=this.anchor,n=this.focus;return new e(lb(t.key,t.offset,t.type),lb(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=eC(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=$m[e];return(this.format&t)!==0}insertRawText(e){this.insertNodes(ex(e))}insertText(e){let t=this.format,n=this.style;if(!this.isCollapsed()){let r=(this.focus.isBefore(this.anchor)?this.focus:this.anchor).getNode();if(q(r)&&(t=r.getFormat(),n=r.getStyle()),this.removeText(),this.format=t,this.style=n,e===``)return;if(aC()===null)return this.anchor.type===`element`&&fb(this.anchor,this.focus,t,n),void pb(this,e,t,n)}this.anchor.type===`element`&&fb(this.anchor,this.focus,t,n);let r=this.anchor.getNode();q(r)||K(398);let i=this.anchor.offset,a=r.getParentOrThrow(),o=r.getTextContentSize();if(XS(r)||i===0&&(!r.canInsertTextBefore()||!a.canInsertTextBefore()&&!r.__prev)||i===o&&(!r.canInsertTextAfter()||!a.canInsertTextAfter()&&!r.__next)){if(r.isSegmented()&&i!==0&&i!==o){if(aC()!==null)r.setMode(`normal`).setFormat(t).setStyle(n);else{let e=nb(r.getTextContent());e.setFormat(t),e.setStyle(n);let a=Y()===this;r.replace(e),this.setTextNodeRange(e,i,e,i),a&&Y()!==this&&hC(this)}e!==``&&this.insertText(e);return}if(e===``)return;if(i===0){let i=r.getPreviousSibling();if(q(i)&&i.canInsertTextAfter()&&!XS(i))i.select();else{let e=nb();e.setFormat(t),e.setStyle(n),a.canInsertTextBefore()?r.insertBefore(e):a.insertBefore(e),e.select()}this.insertText(e);return}if(i===o){let i=r.getNextSibling();if(q(i)&&i.canInsertTextBefore()&&!XS(i))i.select(0,0);else{let e=nb();e.setFormat(t),e.setStyle(n),a.canInsertTextAfter()?r.insertAfter(e):a.insertAfter(e),e.select(0,0)}this.insertText(e);return}let s=nb(e);s.setFormat(t),s.setStyle(n),r.replace(s),s.select();return}if(e===``)return;let s=a.isInline()&&i===0&&!r.__prev,c=a.isInline()&&i===o&&!r.__next,l=r.getFormat()!==t||r.getStyle()!==n;if(s||c||l){if(r.getTextContent()!==``||s||c)return void pb(this,e,t,n);r.setFormat(t),r.setStyle(n)}r.spliceText(i,0,e,!0),r.isComposing()&&this.anchor.type===`text`&&this.anchor.set(this.anchor.key,this.anchor.offset-e.length,this.anchor.type)}removeText(){let e=Y()===this,t=this.anchor.key;uS(this,hS(dS(this))),this.isCollapsed()&&function(e,t){let n=e.anchor;if(n.key===t)return;let r=n.getNode(),i=0,a=``;q(r)?(i=r.getFormat(),a=r.getStyle()):X(r)&&(i=r.getTextFormat(),a=r.getTextStyle()),e.format===i&&e.style===a||(e.format=i,e.style=a,e.dirty=!0)}(this,t),e&&Y()!==this&&hC(this)}formatText(e,t=null){bb(this,e,t)}insertNodes(e){if(e.length===0)return;this.isCollapsed()||this.removeText();let t=this.anchor.getNode();if(this.anchor.type===`element`&&X(t)&&t.isShadowRoot()&&yT(t)!==null){let n=t.getFirstChild()??t.append(DS()).getFirstChild();if(n!==null&&!X(n)){let e=DS();n.insertBefore(e),n=e}if(n!==null){n.selectStart();let t=Y();return J(t)||K(369),t.insertNodes(e)}}if(this.anchor.type===`element`&&GC(t)){let n=ax(e),r=n.getLastDescendant();t.splice(this.anchor.offset,0,n.getChildren()),r!==null&&r.selectEnd();return}let n=this.isBackward()?this.focus:this.anchor,r=n.getNode(),i=pT(r,Sw),a=e[e.length-1];if(X(i)&&`__language`in i){if(`__language`in e[0])this.insertText(e[0].getTextContent());else{let[,t]=nx(this);i.splice(t,0,e),a.selectEnd()}return}if(!e.some(e=>(X(e)||Gx(e))&&!e.isInline())){X(i)||K(211,r.constructor.name,r.getType());let[t,n]=nx(this,!0);(X(t)?t:i).splice(n,0,e),a.selectEnd();return}if(X(i)&&yT(i)!==null){let[,t]=nx(this),n=tx(e);i.splice(t,0,n);let r=n[n.length-1];r===void 0?i.select(t,t):r.selectEnd();return}if(i===null){let t=ax(e),n=t.getLastDescendant(),r=sS(this.anchor,`next`);for(let e of t.getChildren())r=CS(e,r);n!==null&&n.selectEnd();return}if(X(i)&&!i.isParentRequired()&&!GC(i.getParentOrThrow())){let[,t]=nx(this),n=tx(e);i.splice(t,0,n);let r=n[n.length-1];r===void 0?i.select(t,t):r.selectEnd();return}let o=ax(e),s=o.getLastDescendant(),c=o.getChildren(),l=gb(n),u=!X(i)||!i.isEmpty()?this.insertParagraph():null;u&&!i.isAttached()&&(r=this.anchor.getNode(),i=pT(r,Sw));let d=c[c.length-1],f=c[0];var p=f;l||!X(p)||!Sw(p)||p.isEmpty()||!X(i)||i.isEmpty()&&!i.canMergeWhenEmpty()||(X(i)||K(211,r.constructor.name,r.getType()),i.append(...f.getChildren()),f=c[1]),f&&(i===null&&K(212,r.constructor.name,r.getType()),function(e,t){let n=t.getParentOrThrow().getLastChild(),r=t,i=[t];for(;r!==n;)r.getNextSibling()||K(140),r=r.getNextSibling(),i.push(r);let a=e;for(let e of i)a=a.insertAfter(e)}(i,f));let m=pT(s,Sw),h=s.selectEnd();u&&(X(m)&&(u.canMergeWhenEmpty()||Sw(d))?(m.append(...u.getChildren()),u.remove()):u.isEmpty()&&u.remove()),X(i)&&i.isEmpty()&&i.remove();let g=X(i)?i.getLastChild():null;rS(g)&&m!==i&&g.remove();let _=gS(sS(h.anchor,`next`));cS(h.anchor,_),cS(h.focus,_)}insertParagraph(){this.isCollapsed()||this.removeText();let e=this.anchor.getNode();if(this.anchor.type===`element`&&GC(e)){let t=DS();return e.splice(this.anchor.offset,0,[t]),t.select(),t}let[,t]=nx(this),n=pT(this.anchor.getNode(),Sw);if(n!==null&&yT(n)!==null)return null;X(n)||K(213);let r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...i),a.selectStart(),a):null}insertLineBreak(e){let t=nS();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=[...this.getNodes()],t=e.length,n=e[0],r=e[t-1],[i,a]=Sb(this),o=this.isBackward(),[s,c]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[l,u]=o?[a,i]:[i,a];if(t===0)return[];if(t===1){if(q(n)&&!this.isCollapsed()){let e=n.splitText(l,u),t=l===0?e[0]:e[1];return t?(s.set(t.getKey(),0,`text`),c.set(t.getKey(),t.getTextContentSize(),`text`),[t]):[]}return[n]}if(q(n)&&(l===n.getTextContentSize()?e.shift():l!==0&&([,n]=n.splitText(l),e[0]=n,s.set(n.getKey(),0,`text`))),q(r)){let t=r.getTextContent().length;u===0?e.pop():u!==t&&([r]=r.splitText(u),e[e.length-1]=r,c.set(r.getKey(),r.getTextContentSize(),`text`))}return e}modify(e,t,n){if(ox(this,e,t,n))return;let r=e===`move`,i=bx(),a=QC(VC(i));if(!a)return;let o=i._blockCursorElement,s=i._rootElement,c=this.focus.getNode();s===null||o===null||!X(c)||c.isInline()||c.canBeEmpty()||ZC(o,i,s);let l=PC(i,this.focus.key),u=l;if(this.focus.type===`text`&&(u=q(c)?Dw(c,l,i):null),this.dirty){let e=PC(i,this.anchor.key),t=e;if(this.anchor.type===`text`){let n=this.anchor.getNode();t=q(n)?Dw(n,e,i):null}t&&u&&Yb(a,t,this.anchor.offset,u,this.focus.offset)}if(n===`character`&&q(c)&&c.isUnmergeable()&&(t?this.focus.offset===0:this.focus.offset===c.getTextContentSize())){let e=QT(c,t?`previous`:`next`).getNodeAtCaret();if(q(e)){if(!r){let n=e.getTextContentSize();t?this.focus.set(e.__key,n-1,`text`):this.focus.set(e.__key,1,`text`),this.dirty=!0;return}{let n=i.getElementByKey(e.getKey()),r=n?Dw(e,n,i):null;if(r){let e=t?r.length:0;Yb(a,r,e,r,e)}}}}if(Eb(a,e,t?`backward`:`forward`,n,s),a.rangeCount>0){let e=ow(a,i._rootElement),n=e||a.getRangeAt(0),o=this.anchor.getNode(),s=qx(o)?o:UC(o);this.applyDOMRange(n),this.dirty=!0,!r&&(Db(this,t,s),(e?a.direction!==`backward`:a.anchorNode===n.startContainer&&a.anchorOffset===n.startOffset)||Tb(this))}n===`lineboundary`&&ox(this,e,t,n,`decorators`)}forwardDeletion(e,t,n){if(!n&&(e.type===`element`&&X(t)&&e.offset===t.getChildrenSize()||e.type===`text`&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(e===null?null:e.getNextSibling());if(X(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e)){let e=X(n)?n.getNextSibling():null;if(!(X(n)&&n.isEmpty()&&X(e)&&e.isShadowRoot()))return}let r=sS(t,e?`previous`:`next`),i=cE(r);if(i.getTextSlices().every(e=>e===null||e.distance===0)){if(t.type===`element`){let e=r.getNodeAtCaret();if(X(e)&&XC(e)){let t=e.getParent();e.remove();let n=mC(t,e);n!==null&&n.selectStart();return}}let e={type:`initial`};for(let t of i.iterNodeCarets(`shadowRoot`))if(JT(t)){if(!t.origin.isInline()){if(t.origin.isShadowRoot()){if(e.type===`merge-block`)break;if(X(i.anchor.origin)&&i.anchor.origin.isEmpty()){let e=gS(t);uS(this,uE(e,e)),i.anchor.origin.remove()}return}e.type!==`merge-next-block`&&e.type!==`merge-block`||(e={block:e.block,caret:t,type:`merge-block`})}}else{if(e.type===`merge-block`)break;if(qT(t)){if(X(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(i.anchor.origin))break}else e={block:t.origin,type:`merge-next-block`};continue}if(Gx(t.origin)){if(!t.origin.isIsolated()){if(e.type===`merge-next-block`&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&X(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();let e=Vb();e.add(t.origin.getKey()),hC(e)}else{let e=t.origin,n=e.getParent();e.remove();let r=mC(n,e);r!==null&&r.selectStart()}}return}if(rS(t.origin))return void t.origin.remove();break}}if(e.type===`merge-block`){let{caret:t,block:n}=e;return TT(n).length>0?void 0:t.origin.isEmpty()&&!n.isEmpty()&&t.origin.getParent()===n.getParent()?void t.origin.remove(!0):(uS(this,uE(!t.origin.isEmpty()&&n.isEmpty()?fS(QT(n,t.direction)):i.anchor,t)),this.removeText())}for(let e=t.getNode();e!==null;){if(yT(e)!==null)return;if(X(e)&&e.isShadowRoot())break;e=e.getParent()}}let a=this.focus;if(Ob(this,e,`character`),this.isCollapsed()){if(e&&t.offset===0&&Cb(this,t.getNode()))return}else{let r=a.type===`text`?a.getNode():null;if(n=t.type===`text`?t.getNode():null,r!==null&&r.isSegmented()){let t=a.offset,i=r.getTextContentSize();if(r.is(n)||e&&t!==i||!e&&t!==0)return void jb(r,e,t)}else if(n!==null&&n.isSegmented()){let i=t.offset,a=n.getTextContentSize();if(n.is(r)||e&&i!==0||!e&&i!==a)return void jb(n,e,i)}(function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&n.type===`text`&&r.type===`text`){let e=n.offset,a=r.offset,o=e<a,s=o?e:a,c=o?a:e,l=c-1;s!==l&&(function(e){return!(vC(e)||Ab(e))})(i.getTextContent().slice(s,c))&&(t?r.set(r.key,l,r.type):n.set(n.key,l,n.type))}})(this,e)}}if(t||wb(this),this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type===`element`&&this.anchor.offset===0){let e=this.anchor.getNode();e.isEmpty()&&qx(e.getParent())&&e.getPreviousSibling()===null&&Cb(this,e),hb()}}deleteLine(e){let t=this.isCollapsed(),n=Pb(this.anchor);if(n!==null&&Gx(bT(n)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(e);this.isCollapsed()&&Ob(this,e,`lineboundary`),this.isCollapsed()?this.deleteCharacter(e):pT(this.anchor.getNode(),Sw)===pT(this.focus.getNode(),Sw)?(t||wb(this),this.removeText()):(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(e))}deleteWord(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;Ob(this,e,`word`)}this.isCollapsed()?this.deleteCharacter(e):(t||wb(this),this.removeText())}isBackward(){let e=this._cachedIsBackward;if(e!==null)return e;let t=this.focus.isBefore(this.anchor);return hx()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}};function vb(e){return e instanceof mb}function yb(e,t){if(vb(e)){for(let n of e.getNodes())Ky(n)&&n.setFormat(t(n.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void iC(null);let n=[];for(let r of e.getNodes())q(r)?n.push(r):X(r)?r.setTextFormat(t(r.getTextFormat())):Ky(r)&&r.setFormat(t(r.getFormat()));let r=n.length;if(r===0)return e.setFormat(t(e.format)),void iC(null);let i=e.anchor,a=e.focus,o=e.isBackward(),s=o?a:i,c=o?i:a,l=0,u=n[0],d=s.type===`element`?0:s.offset;if(s.type===`text`&&d===u.getTextContentSize()&&(l=1,u=n[1],d=0),u==null)return;let f=r-1,p=n[f],m=c.type===`text`?c.offset:p.getTextContentSize();if(u.is(p)){if(d===m)return;let n=t(u.getFormat());if(XS(u)||d===0&&m===u.getTextContentSize())u.setFormat(n);else{let e=u.splitText(d,m),t=d===0?e[0]:e[1];t.setFormat(n),s.type===`text`&&s.set(t.__key,0,`text`),c.type===`text`&&c.set(t.__key,m-d,`text`)}e.format=n;return}d===0||XS(u)||([,u]=u.splitText(d),d=0);let h=t(u.getFormat());u.setFormat(h);let g=t(p.getFormat());m>0&&(m===p.getTextContentSize()||XS(p)||([p]=p.splitText(m)),p.setFormat(g));for(let e=l+1;e<f;e++){let r=n[e];r.setFormat(t(r.getFormat()))}s.type===`text`&&s.set(u.__key,d,`text`),c.type===`text`&&c.set(p.__key,m,`text`),e.format=h|g}function bb(e,t,n=null){let r=n===null&&J(e)?eC(e.format,t,null):n;yb(e,e=>eC(e,t,r))}function xb(e){let t=e.offset;if(e.type===`text`)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Sb(e){let t=e.getStartEndPoints();if(t===null)return[0,0];let[n,r]=t;return n.type===`element`&&r.type===`element`&&n.key===r.key&&n.offset===r.offset?[0,0]:[xb(n),xb(r)]}function Cb(e,t){for(let n=t;n;n=n.getParent()){if(X(n)){if(n.collapseAtStart(e))return!0;if(GC(n))break}if(n.getPreviousSibling())break}return!1}function wb(e){let t=pC();!t.isEmpty()&&wS(t,e)&&(e.anchor.set(t.getKey(),0,`element`),e.focus.set(t.getKey(),t.getChildrenSize(),`element`))}function Tb(e){let t=e.focus,n=e.anchor,r=n.key,i=n.offset,a=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,i,a,!0)}function Eb(e,t,n,r,i){let a=r===`character`?cw(e,i):null,o=a&&a.focusNode,s=a?a.focusOffset:0;if(e.modify(t,n,r),a===null||!function(e,t,n){return e!==null&&e.nodeType===3&&(n===`backward`?t>0:n===`forward`&&t<e.length)}(o,s,n))return;let c=cw(e,i);c.focusNode===o&&c.focusOffset===s&&e.modify(t,n,r)}function Db(e,t,n){let r=e.getNodes(),i=r.filter(e=>zC(e,n));if(i.length===0||i.length===r.length)return!1;let a=t?i[0]:i[i.length-1],o=X(a)?a:a.getParentOrThrow();return t?o.selectStart():o.selectEnd(),!0}function Ob(e,t,n){if(ox(e,`extend`,t,n))return;let r=bx(),i=QC(VC(r));if(!i||typeof i.modify!=`function`)return;let a=r._blockCursorElement,o=r._rootElement,s=e.anchor,c=e.focus.getNode();o===null||a===null||!X(c)||c.isInline()||c.canBeEmpty()||ZC(a,r,o);let l=e=>{let t=e.getNode(),n=r.getElementByKey(e.key);return n!==null&&e.type===`text`&&q(t)?Dw(t,n,r):n},u=s.getNode(),d=l(s);if(d===null)return;let f=s.offset,p=e.isCollapsed(),m=e.focus,h=p?d:l(m);if(h===null)return;let g=m.offset;if(Yb(i,h,g,h,g),Eb(i,`move`,t?`backward`:`forward`,n,o),i.rangeCount===0)return;let _=ow(i,o)||i.getRangeAt(0),v=_.startContainer,y=_.startOffset;if(p&&n===`character`&&s.type===`text`&&q(u)&&u.isUnmergeable()&&f===(t?0:u.getTextContentSize())){let n=QT(u,t?`previous`:`next`).getNodeAtCaret();if(q(n)){let r=t?n.getTextContentSize()-1:1;e.focus.set(n.__key,r,`text`),e.dirty=!0;return}}if(p&&n===`character`&&s.type===`text`){let n=t?0:u.getTextContentSize(),r=v===d?y:f===n?-1:n;if(r>=0)return void(r!==f&&(e.focus.set(s.key,r,`text`),e.dirty=!0))}let[b,x,S,C]=t?[v,y,d,f]:[d,f,v,y],w=qx(u)?u:UC(u);e.applyDOMRange({collapsed:!1,endContainer:S,endOffset:C,startContainer:b,startOffset:x}),e.dirty=!0,!Db(e,t,w)&&t&&Tb(e),n===`lineboundary`&&ox(e,`extend`,t,n,`decorators`)}function kb(){try{let e=RegExp(`\\p{Emoji}`,`u`),t=e.test.bind(e);if(t(`❤️`)&&t(`#️⃣`)&&t(`👍`))return t}catch{}return()=>!1}var Ab=kb();function jb(e,t,n){let r=e,i=r.getTextContent().split(/(?=\s)/g),a=i.length,o=0,s=0;for(let e=0;e<a;e++){let r=e===a-1;if(s=o,o+=i[e].length,t&&o===n||o>n||r){i.splice(e,1),r&&(s=void 0);break}}let c=i.join(``).trim();c===``?r.remove():(r.setTextContent(c),r.select(s,s))}function Mb(e,t,n,r){let i,a=t,o=!1;if(hw(e)){let s=!1,c=e.childNodes,l=c.length,u=r._blockCursorElement;a===l&&l>0&&(s=!0,a=l-1),lC(e,r)!==void 0||zw(e,r)||(o=!0);let d=c[a],f=!1;if(d===u)d=c[a+1],f=!0;else if(u!==null){let n=u.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,u)&&a--}if(i=_C(d),q(i))a=eE(i,s?`next`:`previous`);else{let c=_C(e);if(c===null)return null;if(X(c)){let o=r.getElementByKey(c.getKey());o===null&&K(214);let l=Tw(c,o,r);[c,a]=l.resolveChildIndex(c,o,e,t),X(c)||K(215),s&&a>=c.getChildrenSize()&&(a=Math.max(0,c.getChildrenSize()-1));let u=c.getChildAtIndex(a);if(X(u)&&function(e,t,n){let r=e.getParent();return n===null||r===null||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){let e=s?u.getLastDescendant():u.getFirstDescendant();e===null?c=u:(u=e,c=X(u)?u:u.getParentOrThrow()),a=0}q(u)?(i=u,c=null,a=eE(u,s?`next`:`previous`)):u!==c&&s&&!f&&(X(c)||K(216),a=Math.min(c.getChildrenSize(),a+1))}else{let n=bT(c),i=n===null?c:n,o=i.getIndexWithinParent(),s=r.getElementByKey(c.getKey()),l=`after`;if(s!==null&&_C(e)===c){let n=Tw(c,s,r);n.element===s?t===0&&Gx(c)&&(l=`before`):l=n.resolveLeafPosition(s,e,t)}a=l===`before`?o:o+1,c=i.getParentOrThrow()}if(X(c))return[lb(c.__key,a,`element`),o]}}else i=_C(e);return q(i)?[lb(i.__key,eE(i,a,`clamp`),`text`),o]:null}function Nb(e,t,n){let r=e.offset,i=e.getNode();if(r===0){let r=i.getPreviousSibling(),a=i.getParent();if(t){if((n||!t)&&r===null&&X(a)&&a.isInline()){let t=a.getPreviousSibling();q(t)&&e.set(t.__key,t.getTextContent().length,`text`)}}else X(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),`element`):q(r)&&!i.isUnmergeable()&&e.set(r.__key,r.getTextContent().length,`text`)}else if(r===i.getTextContent().length){let r=i.getNextSibling(),a=i.getParent();if(t&&X(r)&&r.isInline())e.set(r.__key,0,`element`);else if((n||t)&&r===null&&X(a)&&a.isInline()&&!a.canInsertTextAfter()&&a.getTextContentSize()>1){let t=a.getNextSibling();q(t)&&e.set(t.__key,0,`text`)}}}function Pb(e){let t=oC(e.key);return t===null?null:ST(t)}function Fb(e,t,n){let r=Pb(e),i=Pb(t);if(r===i||r!==null&&i!==null&&r.is(i))return!1;let a=n(r,i);if(r!==null)return X(r)?t.set(r.getKey(),a?r.getChildrenSize():0,`element`):t.set(r.getKey(),a?r.getTextContentSize():0,`text`),!0;let o=bT(i);if(o===null)return!1;let s=o.getParent();if(s===null)return!1;let c=o.getIndexWithinParent();return t.set(s.getKey(),a?c+1:c,`element`),!0}function Ib(e){let t=Fb(e.anchor,e.focus,(t,n)=>function(e,t,n,r){if(n!==null&&r!==null){let e=bT(n),t=bT(r);if(e!==null&&e.is(t)){for(let t of wT(e).values()){if(t===n.getKey())return!0;if(t===r.getKey())return!1}return!0}return e===null||t===null||e.isBefore(t)}if(n!==null){let e=bT(n),r=oC(t.key);return e===null||r===null||!(!e.is(r)&&!e.isParentOf(r))||e.isBefore(r)}let i=bT(r),a=oC(e.key);return i!==null&&a!==null&&!i.is(a)&&!i.isParentOf(a)&&a.isBefore(i)}(e.anchor,e.focus,t,n));return t&&(e.dirty=!0),t}function Lb(e,t,n,r,i,a){if(e===null||n===null||!GS(i,e,n))return null;let o=Mb(e,t,J(a)?a.anchor:null,i);if(o===null)return null;let s=Mb(n,r,J(a)?a.focus:null,i);if(s===null)return null;let[c,l]=o,[u,d]=s;if(c.type===`element`&&u.type===`element`){let t=_C(e),r=_C(n);if(Gx(t)&&Gx(r))return null}let f=i._slotsUsed&&Fb(c,u,()=>(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return function(e,t){if(e.type===`text`&&t.type===`text`){let n=e.isBefore(t),r=e.is(t);Nb(e,n,r),Nb(t,!n,r),r&&t.set(e.key,e.offset,e.type)}}(c,u),[c,u,l||d||f]}function Rb(e){return X(e)&&!e.isInline()}function zb(e,t,n,r,i,a){let o=vx(),s=new _b(lb(e,t,i),lb(n,r,a),0,``);return s.dirty=!0,o._selection=s,s}function Bb(){return new _b(lb(`root`,0,`element`),lb(`root`,0,`element`),0,``)}function Vb(){return new mb(new Set)}function Hb(e,t,n,r){let i=n._window;if(i===null)return null;let a=r||i.event,o=a?a.type:void 0,s=o===`selectionchange`,c=!Oh&&(s||o===`beforeinput`||o===`compositionstart`||o===`compositionend`||o===`click`&&a&&a.detail===3||o===`drop`||o===void 0),l,u,d,f;if(J(e)&&!c)return e.clone();{if(t===null)return null;let r=cw(t,n._rootElement);if(l=r.anchorNode,u=r.focusNode,d=r.anchorOffset,f=r.focusOffset,(s||o===void 0)&&J(e)&&!GS(n,l,u))return e.clone()}let p=Lb(l,d,u,f,n,e);if(p===null)return null;let[m,h,g]=p,_=0,v=``;if(J(e)){let t=e.anchor;if(m.key===t.key)_=e.format,v=e.style;else{let e=m.getNode();q(e)?(_=e.getFormat(),v=e.getStyle()):X(e)&&(_=e.getTextFormat(),v=e.getTextStyle())}}let y=new _b(m,h,_,v);return g&&(y.dirty=!0),y}function Y(){return vx()._selection}function Ub(){return bx()._editorState._selection}function Wb(e,t){let n=t.__key;return e.anchor.key===n||e.focus.key===n}function Gb(e,t,n,r=1){if(!Wb(e,t))return;let i=e.anchor,a=e.focus,o=t.__key;if(e.isCollapsed()){let t=i.offset;if(n<=t&&r>0||n<t&&r<0){let n=Math.max(0,t+r);i.set(o,n,`element`),a.set(o,n,`element`),Kb(e)}}else{let s=e.isBackward(),c=s?a:i,l=c.getNode(),u=s?i:a,d=u.getNode();if(t.is(l)){let e=c.offset;(n<=e&&r>0||n<e&&r<0)&&c.set(o,Math.max(0,e+r),`element`)}if(t.is(d)){let e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(o,Math.max(0,e+r),`element`)}}Kb(e)}function Kb(e){let t=e.anchor,n=t.offset,r=e.focus,i=r.offset,a=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!X(a))return;let e=a.getChildrenSize(),i=n>=e,o=i?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(q(o)){let e=0;i&&(e=o.getTextContentSize()),t.set(o.__key,e,`text`),r.set(o.__key,e,`text`)}return}if(X(a)){let e=a.getChildrenSize(),r=n>=e,i=r?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(q(i)){let e=0;r&&(e=i.getTextContentSize()),t.set(i.__key,e,`text`)}}if(X(o)){let e=o.getChildrenSize(),t=i>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(i);if(q(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,`text`)}}}function qb(e,t,n,r,i){let a=null,o=0,s=null;r===null?i!==null&&(a=i.__key,q(i)?s=`text`:X(i)&&(s=`element`)):(a=r.__key,q(r)?(o=r.getTextContentSize(),s=`text`):X(r)&&(o=r.getChildrenSize(),s=`element`)),a!==null&&s!==null?e.set(a,o,s):(o=t.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),e.set(n.__key,o,`element`))}function Jb(e,t,n,r,i){e.type===`text`?e.set(n,e.offset+(t?0:i),`text`):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,`element`)}function Yb(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function Xb(e,t,n){let r=PC(e,t.getKey());if(X(t)){let i=Tw(t,r,e);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function Zb(e,t,n,r,i,a){let o=a.getRootNode(),s=QS(o)||ew(o)?pw(o):null;if(i.has(`collaboration`)&&s!==a||s!==null&&WS(s,s))return;let c=cw(r,a),l;if(!J(t))return void(e!==null&&GS(n,c.anchorNode,c.focusNode)&&r.removeAllRanges());let u=t.anchor,d=t.focus,f=u.getNode(),p=d.getNode(),[m,h]=Xb(n,f,u.offset),[g,_]=Xb(n,p,d.offset),v=t.format,y=t.style,b=t.isCollapsed(),x=m,S=g,C=!1;if(u.type===`text`?(x=q(f)?Dw(f,m,n):null,C=f.getFormat()!==v||f.getStyle()!==y):J(e)&&e.anchor.type===`text`&&(C=!0),d.type===`text`&&(S=q(p)?Dw(p,g,n):null),x!==null&&S!==null){if(b&&(e===null||C||J(e)&&(e.format!==v||e.style!==y))&&function(e,t,n,r,i,a){e._inputState.collapsedSelectionFormat={format:t,key:i,offset:r,style:n,timeStamp:a}}(n,v,y,h,u.key,performance.now()),(r.type!==`Range`||!b)&&c.anchorOffset===h&&c.focusOffset===_&&c.anchorNode===x&&c.focusNode===S){if(s===null||!a.contains(s)){let e=s===null?null:qS(s);e!==null&&e!==n||i.has(`skip-selection-focus`)||a.focus({preventScroll:!0})}if(u.type!==`element`)return}if(Yb(r,x,h,S,_),Rm&&t.isCollapsed()&&a!==null&&!i.has(`skip-selection-focus`)){let e=fw(a);if(e===null||!a.contains(e)){let e=pw(a.ownerDocument),t=e===null?null:qS(e);t!==null&&t!==n||a.focus({preventScroll:!0})}}if(!i.has(`skip-scroll-into-view`)&&t.isCollapsed()&&a!==null&&a===fw(a)){let e=J(t)&&t.anchor.type===`element`?x.childNodes[h]||null:(l===void 0&&(l=sw(r,a)),l);if(e!==null){let t;if(ZS(e)){let n=e.ownerDocument.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();(function(e,t,n){let r=IC(n),i=BC(r);if(r===null||i===null)return;let a=n.getBoundingClientRect();if(t.bottom<a.top)return;let{top:o,bottom:s}=t,c=0,l=0,u=n;for(;u!==null;){let t=u===r.body;if(t){let t=i.visualViewport;if(t){let e=t.offsetTop;c=e,l=e+t.height}else c=0,l=VC(e).innerHeight;let n=i.getComputedStyle(r.documentElement),a=parseFloat(n.scrollPaddingTop),o=parseFloat(n.scrollPaddingBottom);isFinite(a)&&(c+=a),isFinite(o)&&(l-=o)}else{let e=u===n?a:u.getBoundingClientRect();c=e.top,l=e.bottom}let d=0;if(o<c?d=-(c-o):s>l&&(d=s-l),d!==0){if(t)i.scrollBy(0,d);else{let e=u.scrollTop;u.scrollTop+=d;let t=u.scrollTop-e;o-=t,s-=t}}if(t)break;u=FC(u)}})(n,t,a)}}(function(e,t,n,r,i){let a=e._inputState;a.isSelectionChangeFromDOMUpdate=!0,a.selectionChangeFromDOMUpdatePoints=t!==void 0&&n!==void 0&&r!==void 0&&i!==void 0?{anchorNode:t,anchorOffset:n,focusNode:r,focusOffset:i}:null})(n,x,h,S,_)}}function Qb(e){let t=Y()||Ub();t===null&&(t=pC().selectEnd()),t.insertNodes(e)}function $b(e,t){for(let n of e.split(/(\r?\n|\t)/))n===`
17
+ `||n===`\r
18
+ `?t.linebreak():n===` `?t.tab():n!==``&&t.text(n)}function ex(e){let t=[];return $b(e,{linebreak:()=>t.push(nS()),tab:()=>t.push(ob()),text:e=>t.push(nb(e))}),t}function tx(e){let t=[];for(let n of e)rS(n)||(!X(n)&&!Gx(n)||n.isInline()?t.push(n):X(n)&&t.push(...tx(n.getChildren())));return t}function nx(e,t=!1){let n=e;e.isCollapsed()||n.removeText();let r=Y();J(r)&&(n=r),J(n)||K(161);let i=n.anchor,a=i.getNode(),o=i.offset;for(;!Sw(a)&&yT(a)===null;){let e=a;if([a,o]=rx(a,o,t),e.is(a))break}return[a,o]}function rx(e,t,n=!1){let r=e.getParent();if(!r){let e=DS();return pC().append(e),e.select(),[pC(),0]}if(q(e)){let n=e.splitText(t);if(n.length===0)return[r,e.getIndexWithinParent()];let i=t===0?0:1;return[r,n[0].getIndexWithinParent()+i]}if(!X(e)||t===0)return[r,e.getIndexWithinParent()];let i=e.getChildAtIndex(t);if(i){let r=new _b(lb(e.__key,t,`element`),lb(e.__key,t,`element`),0,``),a=e.insertNewAfter(r);if(a)a.append(i,...i.getNextSiblings());else if(n)return[e,t]}return[r,e.getIndexWithinParent()+1]}function ix(e){return rS(e)||HC(e)||q(e)||e.isParentRequired()}function ax(e){let t=DS(),n=null;for(let r=0;r<e.length;r++){let i=e[r];if(ix(i)){if(n===null){n=i.createParentElementNode(),t.append(n);let a=e[r+1];if(rS(i)&&(a===void 0||!ix(a)))continue}n.append(i)}else t.append(i),n=null}return t}function ox(e,t,n,r,i=`decorators-and-blocks`){if(t===`move`&&r===`character`&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let a=sS(e.focus,n?`previous`:`next`),o=r===`lineboundary`,s=t===`move`,c=a,l=i===`decorators-and-blocks`,u=!1;if(!_S(c)){for(let e of c){l=!1;let{origin:t}=e;if(Gx(t)){if(t.isIsolated()){u=!0;break}if(c=e,o&&t.isInline())continue}break}if(u)return!0;if(l)for(let e of cE(a).iterNodeCarets(t===`extend`?`shadowRoot`:`root`)){if(JT(e))e.origin.isInline()||(c=e);else{if(X(e.origin))continue;Gx(e.origin)&&!e.origin.isInline()&&(c=e)}break}}if(c===a)return!1;if(s&&!o&&Gx(c.origin)&&c.origin.isKeyboardSelectable()){let e=Vb();return e.add(c.origin.getKey()),hC(e),!0}return c=gS(c),s&&cS(e.anchor,c),cS(e.focus,c),l||!o}var sx=null,cx=null,lx=!1,ux=!1,dx=!1,fx=new Set,px=0,mx={characterData:!0,childList:!0,subtree:!0};function hx(){return lx||sx!==null&&sx._readOnly}function gx(){lx&&K(13)}function _x(){px>99&&K(14)}function vx(){return sx===null&&K(195,Sx()),sx}function yx(e){vx()!==null&&cx===null&&(cx=e),cx!==e&&Am(378)}function bx(){return cx===null&&K(337,Sx()),cx}function xx(){bx()._dirtyType=2}function Sx(){let e=0,t=new Set,n=IS.version;if(typeof window<`u`)for(let r of rw(document)){let i=JS(r);if(KS(i))e++;else if(i){let e=String(i.constructor.version||`<0.17.1`);e===n&&(e+=` (separately built, likely a bundler configuration issue)`),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(`, `)}`),r}function Cx(){return cx}function wx(e,t,n){let r=t.__type,i=VS(e,r),a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));let o=a.length;for(let e=0;e<o&&(a[e](t),t.isAttached());e++);}function Tx(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Ex(e,t){if(!t)return;let n=e._updateTags,r=t;Array.isArray(t)||(r=[t]);for(let e of r)n.add(e)}function Dx(e,t){let n=e.type,r=t.get(n);r===void 0&&K(17,n);let i=r.klass;e.type!==i.getType()&&K(18,i.name);let a=i.importJSON(e),o=e.children;if(X(a)&&Array.isArray(o))for(let e=0;e<o.length;e++){let n=Dx(o[e],t);a.append(n)}let s=e.$slots;if(s){_T(a)||K(379,i.name);for(let e in s)IT(a,e,Dx(s[e],t))}return a}function Ox(e,t,n){let r=sx,i=lx,a=cx;sx=t,lx=!0,cx=e;try{return n()}finally{sx=r,lx=i,cx=a}}function kx(e,t){let n=dx;dx=!0;try{(function(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return void(!e._updating&&e._deferred.length>0&&Mx(e,e._deferred));let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=sx,u=lx,d=cx,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){cx=e,sx=n,lx=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=E_(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),ux)throw t;AS(e,null,r,n),Lh(e),e._dirtyType=2,ux=!0,kx(e,a),ux=!1;return}finally{p.observe(r,mx),e._updating=f,sx=l,lx=u,cx=d}}n._readOnly||=!0;let h=e._dirtyLeaves,g=e._dirtyElements,_=e._normalizedNodes,v=e._updateTags;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set),e._updateTags=new Set,function(e,t){let n=e._decorators,r=e._pendingDecorators||n,i=t._nodeMap,a;for(a in r)i.has(a)||(r===n&&(r=dC(e)),delete r[a])}(e,n);let y=i?null:QC(VC(e));if(e._editable&&y!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){cx=e,sx=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&ZC(t,e,r),Zb(o,s,e,y,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(J(n)&&n.isCollapsed()&&n.anchor.type===`element`&&t.contains(fw(t))){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())XC(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);t!==null&&XC(t)&&(s=!0,c=e.getElementByKey(t.__key))}if(s){let n=Tw(a,e.getElementByKey(a.__key),e).element;r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=aw().createElement(`div`);n.contentEditable=`false`,n.setAttribute(`data-lexical-cursor`,`true`);let r=t.blockCursor;return r!==void 0&&(typeof r==`string`&&(r=t.blockCursor=vE(r)),r!==void 0&&n.classList.add(...r)),n}(e._config)),t.style.caretColor=`transparent`,c===null?n.appendChild(r):n.insertBefore(r,c);return}}r!==null&&ZC(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,mx),cx=d,sx=l}}m!==null&&function(e,t,n,r,i){let a=Array.from(e._listeners.mutation),o=a.length;for(let e=0;e<o;e++){let[o,s]=a[e];for(let e of s){let a=t.get(e);a!==void 0&&o(a,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,v,h,a),J(s)||s===null||o!==null&&o.is(s)||e.dispatchCommand(A_);let b=e._pendingDecorators;b!==null&&(e._decorators=b,e._pendingDecorators=null,Ax(`decorator`,e,!0,b)),function(e,t,n){let r=fC(t),i=fC(n);r!==i&&Ax(`textcontent`,e,!0,i)}(e,t||a,n),Ax(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v}),!f&&Mx(e,e._deferred),(function(e){let t=e._updates;if(t.length===0)return void(e._cascadeCount=0);if(function(e){fx.has(e)||(fx.add(e),setTimeout(()=>{fx.delete(e),e._cascadeCount=0},0))}(e),e._cascadeCount++>99)return e._updates=[],e._cascadeCount=0,void e._onWarn(Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${e._config.namespace}`));let n=t.shift();if(n){let[t,r]=n;Px(e,t,r)}})(e)})(e,t)}finally{dx=n}}function Ax(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=t._listeners[e],i=Array.from(n);for(let[e,t]of i){t&&t();let i=e(...r),a=typeof i==`function`?i:void 0;n.has(e)?n.set(e,a):a&&a()}}finally{t._updating=i}}function jx(e,t,n,r){let i=yC(e),a;if(!dx)for(let e=0;e<i.length;e++)i[e]._updating||(i[e]._cascadeCount=0);for(let e=4;e>=0;e--)for(let o=0;o<i.length;o++){let s=i[o];if(o>0&&s._updating){a=s;break}let c=s._commands.get(t);if(c!==void 0){let t=c[e];if(t.size>0){let e=!1;if(Fx(s,()=>{for(let i of t)if(i(n,r))return void(e=!0)}),e)return e}}}return a&&a.update(()=>{jx(a,t,n,r)}),!1}function Mx(e,t){if(e._deferred=[],t.length!==0){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function Nx(e,t){let n=e._updates,r=t||!1;for(;n.length!==0;){let t=n.shift();if(t){let[n,i]=t,a=e._pendingEditorState,o;i!==void 0&&(o=i.onUpdate,i.skipTransforms&&(r=!0),i.discrete&&(a===null&&K(191),a._flushSync=!0),o&&e._deferred.push(o),Ex(e,i.tag)),a==null?Px(e,n,i):n()}}return r}function Px(e,t,n){let r=e._updateTags,i,a=!1,o=!1;n!==void 0&&(i=n.onUpdate,Ex(e,n.tag),a=n.skipTransforms||!1,o=n.discrete||!1),i&&e._deferred.push(i);let s=e._editorState,c=e._pendingEditorState,l=!1;(c===null||c._readOnly)&&(c=e._pendingEditorState=Jx(c||s),l=!0),c._flushSync=o;let u=sx,d=lx,f=cx,p=e._updating;sx=c,lx=!1,e._updating=!0,cx=e;let m=e._headless||e.getRootElement()===null;RS(null);try{l&&(m?s._selection!==null&&(c._selection=s._selection.clone()):c._selection=function(e,t){let n=e.getEditorState()._selection,r=QC(VC(e));return J(n)||n==null?Hb(n,r,e,t):n.clone()}(e,n&&n.event||null));let r=e._compositionKey;t(),a=Nx(e,a),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(J(r)){let e=r.anchor,t=r.focus,i;if(e.type===`text`&&(i=e.getNode(),i.selectionTransform(n,r)),t.type===`text`){let e=t.getNode();i!==e&&e.selectionTransform(n,r)}}}(c,e),e._dirtyType!==0&&(a?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);q(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&Eg(t)}}(c,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=aC(),o=new Map,s=n,c=s.size,l=r,u=l.size;for(;c>0||u>0;){if(c>0){t._dirtyLeaves=new Set;for(let e of s){let r=i.get(e);q(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&Eg(r),r!==void 0&&Tx(r,a)&&wx(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){px++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,l.delete(`root`)&&l.set(`root`,!0);for(let e of l){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let c=i.get(n);c!==void 0&&Tx(c,a)&&wx(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,px++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),Nx(e),function(e,t,n,r){let i=e._nodeMap,a=t._nodeMap,o=[];for(let[e]of r){let t=a.get(e);t!==void 0&&(t.isAttached()||(X(t)&&Dh(t,e,i,a,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of n){let t=a.get(e);t===void 0||t.isAttached()||(_T(t)&&t.__slots!==null&&Dh(t,e,i,a,o,n),i.has(e)||n.delete(e),o.push(e))}for(let e of o)a.delete(e);let s=bx(),c=s._compositionKey;c===null||a.has(c)||(s._compositionKey=null)}(s,c,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(c._flushSync=!0);let i=c._selection;if(J(i)){e._slotsUsed&&Ib(i);let t=c._nodeMap,n=i.anchor.key,r=i.focus.key;t.get(n)!==void 0&&t.get(r)!==void 0||K(19)}else vb(i)&&i._nodes.size===0&&(c._selection=null)}catch(t){t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),kx(e);return}finally{sx=u,lx=d,cx=f,e._updating=p,px=0}e._dirtyType!==0||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(r!==null){if(r.dirty||!r.is(n))return!0}else if(n!==null)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,kx(e)):l&&US(()=>{kx(e)}):(c._flushSync=!1,l&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Fx(e,t,n){cx===e&&n===void 0?hx()?Px(e,t,n):t():Px(e,t,n)}function Ix(){return{...rh,0:``}}function Lx(){return{...th,"":0}}var Rx=Ix(),zx=Lx(),Bx=ig()({direction:og(rg([null,`ltr`,`rtl`]),{field:`__dir`}),format:og(rg([``,`left`,`start`,`center`,`right`,`end`,`justify`]),{field:`__format`,getter:`getFormatType`,getterTable:Rx,setter:`setFormat`,setterTable:zx}),indent:og(ng(0,{integer:!0,min:0}),{field:`__indent`}),textFormat:sg(ng(),{getter:{field:`__textFormat`,method:`getSerializedTextFormat`,when:`shouldSerializeTextStyles`},setter:{field:`__textFormat`}}),textStyle:sg(eg(),{getter:{field:`__textStyle`,method:`getSerializedTextStyle`,when:`shouldSerializeTextStyles`},setter:{field:`__textStyle`}})});function Vx(e){if(GC(e)){let t=null;for(let n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}var Hx=class extends by{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for(`ElementNode`),{$transform:Vx,extends:by,generated:ky,json:Bx})}constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style=``,this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=``,this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&K(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__style=e.__style,function(e,t){e.__dir=t.__dir,e.__format=t.__format,e.__indent=t.__indent,e.__textFormat=t.__textFormat,e.__textStyle=t.__textStyle}(this,e)}getFormat(){return this.getLatest().__format}getFormatType(){return rh[this.getFormat()]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&TT(this).length===0}isDirty(){let e=bx()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[];for(let t of TT(this)){let n=ET(this,t);if(X(n))for(let t of n.getAllTextNodes())e.push(t)}let t=this.getFirstChild();for(;t!==null;){if(q(t)&&e.push(t),X(t))for(let n of t.getAllTextNodes())e.push(n);t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;X(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;X(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;if(e>=n){let e=t[n-1];return X(e)&&e.getLastDescendant()||e||null}let r=t[e];return X(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return e===null?null:oC(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&K(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:oC(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&K(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=NT(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),X(i)&&r!==n-1&&!i.isInline()&&(e+=Zm)}return e}getTextContentSize(){let e=function(e){let t=0;for(let n of TT(e)){let r=ET(e,n);r!==null&&(t+=r.getTextContentSize())}return t}(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),X(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==``){let t=th[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=$m[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return eC(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){gx();let n=Y(),r=e,i=t,a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){let e=this.getFirstChild();if(q(e)||X(e))return e.select(0,0)}else if(!(e!==void 0&&e!==a||t!==void 0&&t!==a)){let e=this.getLastChild();if(q(e)||X(e))return e.select()}}r===void 0&&(r=a),i===void 0&&(i=a);let o=this.__key;return J(n)?(n.anchor.set(o,r,`element`),n.focus.set(o,i,`element`),n.dirty=!0,n):zb(o,r,o,i,`element`,`element`)}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){let t=this.getWritable();return t.__format=e!==``&&th[e]||0,t}setStyle(e){let t=this.getWritable();return t.__style=e||``,t}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){let t=this.getWritable();return t.__indent=e,t}splice(e,t,n){vy(this)&&K(324,this.__key,this.__type);let r=this.getChildrenSize(),i=this.getWritable();e+t<=r||K(226,String(e),String(t),String(r));for(let e of n);let a=i.__key,o=[],s=[],c=this.getChildAtIndex(e+t),l=null,u=r-t+n.length;if(e!==0){if(e===r)l=this.getLastChild();else{let t=this.getChildAtIndex(e);t!==null&&(l=t.getPreviousSibling())}}if(t>0){let e=l===null?this.getFirstChild():l.getNextSibling();for(let n=0;n<t;n++){e===null&&K(100);let t=e.getNextSibling(),n=e.__key;nC(e.getWritable()),s.push(n),e=t}}let d=l;for(let e of n){d!==null&&e.is(d)&&(l=d=d.getPreviousSibling()),c!==null&&e.is(c)&&(c=c.getNextSibling());let t=e.getWritable();t.__parent===a&&u--,nC(t);let n=e.__key;if(d===null)i.__first=n,t.__prev=null;else{let e=d.getWritable();e.__next=n,t.__prev=e.__key}e.__key===a&&K(76),t.__parent=a,o.push(n),d=e}if(c===null)d!==null&&(d.getWritable().__next=null,i.__last=d.__key);else{let e=c.getWritable();if(d!==null){let t=d.getWritable();e.__prev=d.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=u,s.length){let e=Y();if(J(e)){let t=new Set(s),n=new Set(o),{anchor:r,focus:i}=e;Ux(r,t,n)&&qb(r,r.getNode(),this,l,c),Ux(i,t,n)&&qb(i,i.getNode(),this,l,c),u!==0||this.canBeEmpty()||GC(this)||this.remove()}}return i}getDOMSlot(e){return new hh(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(hw(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+`px`,t.setAttribute(`data-lexical-indent`,String(e)));let n=this.getDirection();n&&(t.dir=n)}return{element:t}}shouldSerializeTextStyles(){if(GC(this))return!1;for(let e=this.getFirstChild();e!==null;e=e.getNextSibling())if(q(e))return!1;return!0}getSerializedTextFormat(){let e=this.getTextFormat();return e!==0&&this.shouldSerializeTextStyles()?e:void 0}getSerializedTextStyle(){let e=this.getTextStyle();return e!==``&&this.shouldSerializeTextStyles()?e:void 0}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let n=Tw(this,e,t),r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());i!==null&&(r==null?(n.insertChild(i),r=i):r!==i&&n.replaceChild(i,r),r=r.nextSibling)}}};function X(e){return e instanceof Hx}function Ux(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}var Wx=class extends by{__slotHost;__slots;constructor(e){super(e),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&K(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function Gx(e){return e instanceof Wx}var Kx=class extends Hx{__cachedText;$config(){return this.config(`root`,{extends:Hx})}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){K(51)}getTextContent(){let e=this.__cachedText;return e===null||!hx()&&bx()._dirtyType!==0?super.getTextContent():e}remove(){K(52)}replace(e){K(53)}insertBefore(e){K(54)}insertAfter(e){K(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)X(e)||Gx(e)||K(282);return super.splice(e,t,n)}static importJSON(e){return pC().updateFromJSON(e)}collapseAtStart(){return!0}};function qx(e){return e instanceof Kx}function Jx(e){return new Qx(xh(e._nodeMap),null,e._slotsUsed)}function Yx(){return new Qx(new Map([[`root`,new Kx]]),null,!1)}function Xx(e){let t=e.constructor,n=Eh(e);if(X(e)){let t=n.children,r=e.getChildren();for(let e=0;e<r.length;e++)t.push(Xx(r[e]))}let r=TT(e);if(r.length>0){let i={};for(let n of r){let r=ET(e,n);r===null&&K(366,t.name,n),i[n]=Xx(r)}n.$slots=i}return n}function Zx(e){return e instanceof Qx}var Qx=class e{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(e,t=null,n=!1){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size<=1&&this._selection===null}read(e,t){return Ox(t&&t.editor||null,this,e)}clone(t){let n=new e(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return n._readOnly=!0,n._parsed=this._parsed,n}toJSON(e){return wh(typeof e==`boolean`&&e,()=>Ox(null,this,()=>({root:Xx(pC())})))}},$x=class extends Hx{$config(){return this.config(`artificial`,{extends:Hx})}createDOM(e){return aw().createElement(`div`)}},eS=class extends by{$config(){return this.config(`linebreak`,{extends:by,generated:Ny,importDOM:{br:e=>iS(e)||aS(e)?null:{conversion:tS,priority:0}}})}getTextContent(){return`
19
+ `}createDOM(){return aw().createElement(`br`)}updateDOM(){return!1}isInline(){return!0}};function tS(e){return{node:nS()}}function nS(){return qC(new eS)}function rS(e){return e instanceof eS}function iS(e){let t=e.parentElement;if(t!==null&&xw(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&oS(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&oS(n))return!0}}return!1}function aS(e){let t=e.parentElement;if(t!==null&&xw(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&oS(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&oS(r))return!0}return!1}function oS(e){return ZS(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||``)}function sS(e,t){let{type:n,key:r,offset:i}=e,a=YC(e.key);return n===`text`?(q(a)||K(266,a.getType(),r),$T(a,t,i)):(X(a)||K(267,a.getType(),r),yS(a,e.offset,t))}function cS(e,t){let{origin:n,direction:r}=t,i=r===`next`;KT(t)?e.set(n.getKey(),t.offset,`text`):qT(t)?q(n)?e.set(n.getKey(),eE(n,r),`text`):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!i,`element`):(JT(t)&&X(n)||K(268),e.set(n.getKey(),i?0:n.getChildrenSize(),`element`))}function lS(e){let t=Y(),n=J(t)?t:Bb();return uS(n,e),hC(n),n}function uS(e,t){cS(e.anchor,t.anchor),cS(e.focus,t.focus)}function dS(e){let{anchor:t,focus:n}=e,r=sS(t,`next`),i=sS(n,`next`),a=fE(r,i)<=0?`next`:`previous`;return uE(sE(r,a),sE(i,a))}function fS(e){let{direction:t,origin:n}=e,r=QT(n,HT(t)).getNodeAtCaret();return r?QT(r,t):nE(n.getParentOrThrow(),t)}function pS(e,t=`root`){let n=[e];for(let r=JT(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(fS(r));return n}function mS(e){return!!e&&e.origin.isAttached()}function hS(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let n=`root`,r=`next`,i=t,a=vS(e,r),o=a.anchor.origin;for(;o!==null&&!GC(o);)o=o.getParent();let s=X(o)?o.getFirstChild():null,c=pS(a.anchor,n),l=pS(a.focus.getFlipped(),n),u=new Set,d=[];for(let e of a.iterNodeCarets(n))if(JT(e))u.add(e.origin.getKey());else if(qT(e)){let{origin:t}=e;X(t)&&!u.has(t.getKey())||d.push(t)}let f=new Set;for(let e of d){let t=e.getParent();t===null||u.has(t.getKey())||f.add(t),nC(e)}for(let e of f)!e.canBeEmpty()&&!GC(e)&&e.isEmpty()&&e.isAttached()&&e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),a=fS(QT(t,r)),o=t.getMode();if(Math.abs(e.distance)===n&&i===`removeEmptySlices`||o===`token`&&e.distance!==0)a.remove();else if(e.distance!==0){i=`removeEmptySlices`;let t=e.removeTextSlice(),n=e.caret.origin;if(o===`segmented`){let e=t.origin,n=nb(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());a.replaceOrInsert(n),t=$T(n,r,t.offset)}n.is(c[0].origin)&&(c[0]=t),n.is(l[0].origin)&&(l[0]=t.getFlipped())}}let p,m;for(let e of c)if(mS(e)){p=gS(e);break}for(let e of l)if(mS(e)){m=gS(e);break}let h=function(e,t,n){if(!e||!t)return null;let r=e.getParentAtCaret(),i=t.getParentAtCaret();if(!r||!i)return null;let a=r.getParents().reverse();a.push(r);let o=i.getParents().reverse();o.push(i);let s=Math.min(a.length,o.length),c=0;for(;c<s&&a[c]===o[c];c++);let l=(e,t)=>{let n;for(let r=c;r<e.length;r++){let i=e[r];if(GC(i))return;!n&&t(i)&&(n=i)}return n},u=l(a,Sw),d=u&&l(o,e=>n.has(e.getKey())&&Sw(e));return d&&TT(d).length>0?null:u&&d?[u,d]:null}(p,m,u);if(h){let[e,t]=h;nE(e,`previous`).splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}else if(m){let e=function(e){if(JT(e)){let t=e.origin;if(Sw(t))return t}else{let t=e.getParentAtCaret();if(t&&Sw(t))return t}return null}(m),t=e&&e.getParent(),n=e&&e.getParents().findLast(WC);if(e&&t&&!qx(t)&&e.isEmpty()&&u.has(e.getKey())&&TT(e).length===0&&(!n||u.has(n.getKey()))){e.remove(!0);let n=t;for(;n&&!qx(n)&&n.isEmpty();){let e=n.getParent();if(e&&qx(e)&&e.getChildrenSize()<=1&&n.canBeEmpty())break;let t=n;n=e,t.remove(!0)}}}mC(o,s)===null&&mC(pC(),null);let g=[p,m,...c,...l].find(mS);if(g)return lE(sE(gS(g),e.direction));K(269,JSON.stringify(c.map(e=>e.origin.__key)))}function gS(e){let t=function(e){let t=e;for(;JT(t);){let e=iE(t);if(!JT(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(q(t.origin))return KT(t)?t:$T(t.origin,n,n);let r=t.getAdjacentCaret();return qT(r)&&q(r.origin)?$T(r.origin,n,HT(n)):t}function _S(e){return KT(e)&&e.offset!==eE(e.origin,e.direction)}function vS(e,t){return e.direction===t?e:uE(sE(e.focus,t),sE(e.anchor,t))}function yS(e,t,n){let r=nE(e,`next`);for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(e===null)break;r=e}return sE(r,n)}function bS(e){let{origin:t,offset:n,direction:r}=e;if(n===eE(t,r))return e.getSiblingCaret();if(n===eE(t,HT(r)))return fS(e.getSiblingCaret());let[i]=t.splitText(n);return q(i)||K(281),sE(QT(i,`next`),r)}function xS(e,t){return!0}function SS(e,{$copyElementNode:t=KC,$splitTextPointCaretNext:n=bS,rootMode:r=`shadowRoot`,$shouldSplit:i=xS,removeEmptyDestination:a=!1}={}){if(KT(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(JT(e)){let e=fS(o);if(a&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,`first`))return e}let r=function(e){let t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||!a&&n.canBeEmpty()&&i(n,`last`))&&o.insert(t(n).splice(0,0,r))}return o}function CS(e,t,n){let r=sE(t,`next`);KT(r)&&(r.offset===0?r=QT(r.origin,`previous`).getFlipped():r.offset===r.origin.getTextContentSize()&&(r=QT(r.origin,`next`))),r.origin.is(e)&&(qT(r)||K(342,e.getKey(),e.getType()),r=fS(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=r;e;e=SS(e,n))r=e;return KT(r)&&K(283),r.insert(e.isInline()?DS().append(e):e),sE(QT(e.getLatest(),`next`),t.direction)}function wS(e,t){let n=vS(J(t)?dS(t):t,`next`),r=ST(n.anchor.origin),i=ST(e.getLatest());if(r===null?i!==null:!r.is(i))return!1;let a=gS(nE(e,`next`)),o=sE(gS(nE(e,`previous`)),`next`);return fE(n.anchor,a)<=0&&fE(n.focus,o)>=0}var TS=class extends Hx{$config(){return this.config(`paragraph`,{extends:Hx,generated:My,importDOM:{p:()=>({conversion:ES,priority:0})}})}createDOM(e){let t=aw().createElement(`p`),n=kC(e.theme,`paragraph`);return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(hw(t)){this.isEmpty()&&t.append(aw().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}exportJSON(e=!1){let t=super.exportJSON(e);if(t.textFormat===void 0||t.textStyle===void 0){let n=this.getChildren().find(q),r=n?n.getFormat():this.getTextFormat(),i=n?n.getStyle():this.getTextStyle();e&&r===0||(t.textFormat=r),e&&i===``||(t.textStyle=i)}return t}extractWithChild(e,t,n){if(!J(t)||this.getFormatType()===``&&this.getIndent()===0&&this.getStyle()===``)return!1;if(wS(this,t)){let e=this.getTextContent();return e!==``&&t.getTextContent()===e}return!1}insertNewAfter(e,t){let n=DS();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){if(this.getChildren().every(e=>q(e)&&!/\S/.test(e.getTextContent()))){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function ES(e){let t=DS();if(Fw(t,e),Nw(e,t),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in th&&t.setFormat(n)}return Pw(t,e),{node:t}}function DS(){return qC(new TS)}function OS(e){return e instanceof TS}function kS(e){console.warn(e)}function AS(e,t,n,r,i){let a=e._keyToDOMMap;a.clear(),e._editorState=Yx(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},compositionEndData:``,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null};let o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=``,function(e,t){let n=`__lexicalKey_${t._key}`;delete e[n]}(t,e)),n!==null&&(n.textContent=``,a.set(`root`,n),cC(n,e,`root`))}function jS(e){let t=new Set,n=new Set;for(let{klass:r,ownNodeConfig:i}of dT(e)){let e=r.transform;if(!n.has(e)){n.add(e);let i=r.transform();i&&t.add(i)}if(i){let e=i.$transform;e&&t.add(e)}}return t}var MS={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=HS(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,r,i)=>X(e)&&e.extractWithChild(t,n,r),$getDOMSlot:(e,t,n)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,n,r)=>null,$shouldExclude:(e,t,n)=>X(e)&&e.excludeFromCopy(`html`),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,r)=>e.updateDOM(t,n,r._config)};function NS(e){let t=e||{},n=Cx(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=Yx(),s=t.namespace||(i===null?bC():i._config.namespace),c=t.editorState,l=[Kx,qy,eS,ab,TS,$x,...t.nodes||[]],{onError:u,onWarn:d,html:f}=t,p=t.editable===void 0||t.editable,m;if(e===void 0&&n!==null)m=n._nodes;else{m=new Map;for(let e=0;e<l.length;e++){let n=l[e],r=null,i=null;if(n&&typeof n==`object`){let e=n;n=e.replace,r=e.with,i=e.withKlass||null}if(typeof n!=`function`||!n.prototype||!(n===by||n.prototype instanceof by)){let r=`<unknown>`;try{r=JSON.parse(vh)}catch{}K(365,String(e-l.length+(t.nodes?t.nodes.length:0)),typeof n==`function`?`${n.name}${typeof n.getType==`function`?` (type ${String(n.getType())})`:``}`:String(n),String(r))}oT(n);let a=n.getType(),o=jS(n);m.set(a,{exportDOM:f&&f.export?f.export.get(n):void 0,klass:n,replace:r,replaceWithKlass:i,sharedNodeState:mg(l[e]),transforms:o})}}let h=new IS(o,i,m,{disableEvents:a,dom:{...MS,...e&&e.dom},namespace:s,theme:r},u||console.error,d||kS,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);r===void 0&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(t==null||r.has(t))return;r.add(t);let n=t.call(e.klass);n!==null&&i(n)}),t&&i(t),n}(m,f?f.import:void 0),p,e);return c!==void 0&&(h._pendingEditorState=c,h._dirtyType=2),function(e){e.registerCommand(M_,qv,0),e.registerCommand(N_,Yv,0),e.registerCommand(P_,Zv,0),e.registerCommand(F_,Qv,0),e.registerCommand(q_,cy,0)}(h),h}function PS(e,t){let n=e.get(t);e.delete(t),n&&n()}function FS(e,t,n){return e.set(t,n),PS.bind(null,e,t)}var IS=class{static version=vh;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_keyDownShortcuts;_inputState;_createEditorArgs;constructor(e,t,n,r,i,a,o,s,c){this._createEditorArgs=c,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Sh,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=bC(),this._onError=i,this._onWarn=a,this._htmlConversions=o,this._editable=s,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._keyDownShortcuts=null,this._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},compositionEndData:``,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return FS(this._listeners.update,e)}registerEditableListener(e){return FS(this._listeners.editable,e)}registerDecoratorListener(e){return FS(this._listeners.decorator,e)}registerTextContentListener(e){return FS(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return yE(FS(t,e,e(this._rootElement,null)||void 0),()=>function(e,t,n){let r=e.get(t);r&&r(),e.set(t,t(...n)||void 0)}(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&K(35);let r=this._commands;r.has(e)||r.set(e,[new yh,new yh,new yh,new yh,new yh]);let i=r.get(e);i===void 0&&K(36,String(e));let a=function(e){return 7&e}(n),o=i[a];return a===n?o.addBack(t):o.addFront(t),()=>{o.delete(t),i.every(e=>e.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);let o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&K(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=Aw(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,`created`);i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set([`registerMutationListener`])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return function(e,t){let n=Aw(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}r.length!==0&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=oC(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:Cy}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,...t){return Z(this,e,...t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=kC(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,AS(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||hy(t),n!=null&&t.classList.remove(...n)),e!==null){let t=BC(e),r=e.style;r.userSelect=`text`,r.whiteSpace=`pre-wrap`,r.wordBreak=`break-word`,e.setAttribute(`data-lexical-editor`,`true`),this._window=t,this._dirtyType=2,Lh(this),this._updateTags.add(Cy),kx(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;Mv.set(e,n);let r=Nv.get(n);r===void 0&&(r={editors:new Set,hasShadowEditor:void 0},Nv.set(n,r)),r.editors.add(t),r.hasShadowEditor=void 0,e.__lexicalEditor=t;let i=ly(e);i.push(Pv.register(n));let a=jv();for(let n=0;n<a.length;n++){let[r,o]=a[n],s=typeof o==`function`?e=>{py(e)||(fy(e),(t.isEditable()||r===`click`)&&o(e,t))}:e=>{if(py(e))return;fy(e);let n=t.isEditable();switch(r){case`cut`:return n&&Z(t,dv,e);case`copy`:return Z(t,uv,e);case`paste`:return n&&Z(t,B_,e);case`dragstart`:return n&&Z(t,sv,e);case`dragover`:return n&&Z(t,cv,e);case`dragend`:return n&&Z(t,lv,e);case`focus`:return n&&Z(t,_v,e);case`blur`:return n&&Z(t,vv,e);case`drop`:return n&&Z(t,ov,e)}};i.push(Ov(e,r,s))}}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(Cy),kx(this);Ax(`root`,this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&K(38);let n=e;n._readOnly&&(n=Jx(e),n._selection=e._selection?e._selection.clone():null),Ih(this);let r=this._pendingEditorState,i=t===void 0?null:t.tag;r===null||r.isEmpty()||(i!=null&&this._updateTags.add(i),kx(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,Fx(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(let[e,t]of n._nodeMap.entries())X(t)?this._dirtyElements.set(e,!0):this._dirtyLeaves.add(e)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return function(e,t,n){let r=Yx(),i=sx,a=lx,o=cx,s=t._dirtyElements,c=t._dirtyLeaves,l=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,sx=r,lx=!1,cx=t,RS(null);try{let i=t._nodes;Dx(e.root,i),n&&n(),r._readOnly=!0,r._parsed=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=c,t._cloneNotNeeded=l,t._dirtyType=u,sx=i,lx=a,cx=o}return r}(typeof e==`string`?JSON.parse(e):e,this,t)}read(...e){let[t,n]=e.length===1?[`force-commit`,e[0]]:e;return t===`force-commit`&&kx(this),(t===`pending`?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){(function(e,t,n){e._updating?e._updates.push([t,n]):Px(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),Fx(this,()=>{let r=Y(),i=pC();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||hC(r.clone()),LC(`focus`),RC(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=QC(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Ax(`editable`,this,!0,e),this._slotsUsed&&this.update(()=>xx()))}toJSON(){return{editorState:this._editorState.toJSON(Th())}}},LS=null;function RS(e){LS=e}var zS=Symbol(`INTERNAL_SKIP_AFTER_CLONE_FROM`),BS=1;function VS(e,t){let n=HS(e,t);return n===void 0&&K(30,t),n}function HS(e,t){return e._nodes.get(t)}var US=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function WS(e,t){let n=t===void 0?(()=>{let t=e.getRootNode();return QS(t)||ew(t)?pw(t):null})():t;if(!hw(n)||n.hasAttribute(`data-lexical-slot`))return!1;let r=uC(n),i=n.nodeName;return xy(r)&&(i===`INPUT`||i===`TEXTAREA`||n.contentEditable===`true`&&JS(n)==null)}function GS(e,t,n){let r=e.getRootElement();if(!r)return!1;try{if(!t||!r.contains(t)||!r.contains(n))return!1}catch{return!1}return qS(t)===e&&e.read(`latest`,()=>!WS(t))}function KS(e){return e instanceof IS}function qS(e){let t=e;for(;t!=null;){let e=JS(t);if(KS(e))return e;t=FC(t)}return null}function JS(e){return e?e.__lexicalEditor:null}function YS(e){return sb(e)||e.isToken()}function XS(e){return YS(e)||e.isSegmented()}function ZS(e){return gw(e)&&e.nodeType===3}function QS(e){return gw(e)&&e.nodeType===9}function $S(e){let t=e;for(;t!=null;){if(ZS(t))return t;t=t.firstChild}return null}function eC(e,t,n){let r=$m[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~$m.superscript:t===`superscript`?i&=~$m.subscript:t===`lowercase`?(i&=~$m.uppercase,i&=~$m.capitalize):t===`uppercase`?(i&=~$m.lowercase,i&=~$m.capitalize):t===`capitalize`&&(i&=~$m.lowercase,i&=~$m.uppercase),i}function tC(e,t){let n=function(){let e=LS;return LS=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);gx(),_x();let r=bx(),i=vx(),a=``+BS++;i._nodeMap.set(a,e),X(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.add(a),r._dirtyType===0&&(r._dirtyType=1),e.__key=a}function nC(e){yT(e)!==null&&K(380,e.__key,String(yT(e)));let t=e.getParent();if(t!==null){let n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),a=e.getNextSibling(),o=a===null?null:a.__key,s=i===null?null:i.__key,c=i===null?null:i.getWritable(),l=a===null?null:a.getWritable();i===null&&(r.__first=o),a===null&&(r.__last=s),c!==null&&(c.__next=o),l!==null&&(l.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function rC(e){_x(),vy(e)&&K(323,e.__key,e.__type);let t=e.getLatest(),n=t.__parent===null?vT(t)?t.__slotHost:null:t.__parent,r=vx(),i=bx(),a=r._nodeMap,o=i._dirtyElements;n!==null&&function(e,t,n){let r=e;for(;r!==null;){if(n.has(r))return;let e=t.get(r);if(e===void 0)break;n.set(r,!1),r=e.__parent===null?vT(e)?e.__slotHost:null:e.__parent}}(n,a,o);let s=t.__key;i._dirtyType===0&&(i._dirtyType=1),X(e)?o.set(s,!0):i._dirtyLeaves.add(s)}function iC(e){gx();let t=bx(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=oC(n);e!==null&&e.getWritable()}if(e!==null){let t=oC(e);t!==null&&t.getWritable()}}}function aC(){return hx()?null:bx()._compositionKey}function oC(e,t){let n=(t||vx())._nodeMap.get(e);return n===void 0?null:n}function sC(e,t){let n=lC(e,bx());return n===void 0?null:oC(n,t)}function cC(e,t,n){e[`__lexicalKey_${t._key}`]=n}function lC(e,t){return e[`__lexicalKey_${t._key}`]}function uC(e,t){let n=e;for(;n!=null;){let e=sC(n,t);if(e!==null)return e;n=FC(n)}return null}function dC(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function fC(e){return e.read(()=>pC().getTextContent())}function pC(){return vx()._nodeMap.get(`root`)}function mC(e,t){if(!(GC(e)&&e.isAttached()&&e.isEmpty()&&(qx(e)||t!==null&&Sw(t))))return null;let n=DS();return e.append(n),n}function hC(e){gx();let t=vx();e!==null&&(e.dirty=!0,e.setCachedNodes(null),J(e)&&bx()._slotsUsed&&Ib(e)),t._selection=e}function gC(){gx(),Ih(bx())}function _C(e){let t=function(e,t){let n=e;for(;n!=null;){let e=lC(n,t);if(e!==void 0)return e;n=FC(n)}return null}(e,bx());return t===null?null:oC(t)}function vC(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function yC(e){let t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}function bC(){return Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5)}function xC(e){return ZS(e)?e.nodeValue:null}function SC(e,t,n){let r=QC(VC(t));if(r===null)return;let i=cw(r,t._rootElement),a=i.anchorNode,{anchorOffset:o,focusOffset:s}=i;if(a!==null){let t=xC(a),r=uC(a);if(t!==null&&q(r)){if((t===Xm||t===Qm)&&n){let e=n.length;t=n,o=e,s=e}t!==null&&CC(r,t,o,s,e)}}}function CC(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing();if(a.isToken()&&o)return;let s=t;if((o||i)&&(t.endsWith(Xm)&&(s=t.slice(0,-Xm.length)),i)){let e=Qm,t;for(;(t=s.indexOf(e))!==-1;)s=s.slice(0,t)+s.slice(t+e.length),n!==null&&n>t&&(n=Math.max(t,n-e.length)),r!==null&&r>t&&(r=Math.max(t,r-e.length))}let c=a.getTextContent();if(i||s!==c){let t=Y();if(s===``){if(iC(null),Wm||Hm||qm)a.remove();else{let e=bx();wC(a,``,t),setTimeout(()=>{e.update(()=>{a.isAttached()&&a.getTextContent()===``&&a.remove()})},20)}return}let i=a.getParent(),c=Ub(),l=a.getTextContentSize(),u=aC(),d=a.getKey();if(a.isToken()&&!o||u!==null&&d===u&&!o||J(c)&&(i!==null&&!i.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===e.__key&&c.anchor.offset===0&&!a.canInsertTextBefore()&&!o||c.focus.key===e.__key&&c.focus.offset===l&&!a.canInsertTextAfter()&&!o))return void a.markDirty();if(!J(t)||n===null||r===null)return void wC(a,s,t);if(t.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=nb(a.getTextContent());a.replace(e),a=e}wC(a,s,t)}}}function wC(e,t,n){if(e.setTextContent(t),J(n)){let t=e.getKey(),r=!1;for(let i of[`anchor`,`focus`]){let a=n[i];a.type===`text`&&a.key===t&&(a.offset=eE(e,a.offset,`clamp`),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function TC(e){let t=e;for(;t!==null;){let e=t.getParent();if(e===null)return null;if(qx(e))return t;t=e}return null}function EC(e,t){let{anchor:n,focus:r}=e,i=n.key,a=n.offset,o=n.type,s=r.key,c=r.offset,l=r.type;if(Dg(e),!qx(t))return e;let u=TC(n.getNode());return X(u)&&u.isShadowRoot()&&u.is(TC(r.getNode()))&&(n.set(i,a,o),r.set(s,c,l)),e}function DC(e){let t=pC();if(J(e)){let t=e.anchor,n=e.focus,r=t.getNode();if(qx(r))return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),EC(e,r),e;let i=r.getTopLevelElementOrThrow(),a=i.getParent();return a===null?(X(i)&&(t.set(i.getKey(),0,`element`),n.set(i.getKey(),i.getChildrenSize(),`element`),EC(e,i)),e):(t.set(a.getKey(),0,`element`),n.set(a.getKey(),a.getChildrenSize(),`element`),EC(e,a),e)}{let e=t.select(0,t.getChildrenSize());return hC(EC(e,t)),e}}function OC(e,t){e.getAttribute(t)===``&&e.removeAttribute(t)}function kC(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;let i=e[t];if(typeof i==`string`){let e=vE(i);return n[t]=e,e}return i}function AC(e,t,n,r,i){if(n.size===0)return;let a=r.__type,o=r.__key,s=t.get(a);s===void 0&&K(33,a);let c=s.klass,l=e.get(c);l===void 0&&(l=new Map,e.set(c,l));let u=l.get(o),d=u===`destroyed`&&i===`created`;(u===void 0||d)&&l.set(o,d?`updated`:i)}function jC(e,t,n){let r=e.getParent(),i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function MC(e,t){let n=e.offset;if(e.type===`element`)return jC(e.getNode(),t,n);{let r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return e===null?jC(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function NC(e){let t=VC(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function Z(e,t,...n){return jx(e,t,n[0],e)}function PC(e,t){let n=e._keyToDOMMap.get(t);return n===void 0&&K(75,t),n}function FC(e){let t=e.assignedSlot||e.parentElement;if(t!==null)return t;let n=e.parentNode;return ew(n)?n.host:null}function IC(e){return QS(e)?e:hw(e)?e.ownerDocument:null}function LC(e){gx(),bx()._updateTags.add(e)}function RC(e){gx(),bx()._deferred.push(e)}function zC(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function BC(e){let t=IC(e);return t?t.defaultView:null}function VC(e){let t=e._window;return t===null&&K(78),t}function HC(e){return X(e)&&e.isInline()||Gx(e)&&e.isInline()}function UC(e){let t=e.getLatest();for(;t!==null;){if(yT(t)!==null&&X(t))return t;let e=t.getParentOrThrow();if(GC(e))return e;t=e}return t}function WC(e){return X(e)&&e.isShadowRoot()}function GC(e){return qx(e)||WC(e)}function KC(e,t=!1){let n=e.constructor.clone(e,zS);return tC(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function qC(e){let t=bx(),n=e.getType(),r=HS(t,n);r===void 0&&K(200,e.constructor.name,n);let{replace:i,replaceWithKlass:a}=r;if(i!==null){let t=i(e),r=t.constructor;return a===null?t instanceof e.constructor&&r!==e.constructor||K(202,r.name,r.getType(),e.constructor.name,n):t instanceof a||K(201,a.name,a.getType(),r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&K(203,e.constructor.name,n,r.name,r.getType()),t}return e}function JC(e,t){!qx(e.getParent())||X(t)||Gx(t)||K(99)}function YC(e){let t=oC(e);return t===null&&K(63,e),t}function XC(e){if(!e||e.isInline())return!1;if(Gx(e))return!0;if(X(e)){if(e.isShadowRoot()){let t=e.getParent();return!(X(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function ZC(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function QC(e){return Mm?(e||window).getSelection():null}function $C(e){let t=BC(e);return t?t.getSelection():null}function ew(e){return _w(e)&&`host`in e}var tw=[];function nw(e){let t=e.getRootNode();if(t===e||!ew(t))return tw;let n=[t],r=t.host;for(;;){let e=r.getRootNode();if(e===r||!ew(e))break;n.push(e),r=e.host}return n}function*rw(e){let t=[e],n;for(;n=t.pop();){yield*n.querySelectorAll(`[data-lexical-editor="true"]`);let e=(QS(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r;for(;r=e.nextNode();)r.shadowRoot&&t.push(r.shadowRoot)}}function iw(e){return e===null?document:e.ownerDocument}function aw(){let e=Cx();return iw(e===null?null:e._rootElement)}function ow(e,t){if(t===null||typeof e.getComposedRanges!=`function`)return null;let n=nw(t);if(n.length===0)return null;let r=e.getComposedRanges;try{let t=r.call(e,{shadowRoots:n})[0];if(t!==void 0)return t}catch{}try{let t=r.apply(e,n)[0];if(t!==void 0)return t}catch{}return null}function sw(e,t){let n=ow(e,t);if(n!==null){let e=lw(n);if(e!==null)return e}return e.rangeCount>0?e.getRangeAt(0):null}function cw(e,t){let n=ow(e,t);return n===null?e:uw(n,dw(e))}function lw(e){let t=e.startContainer.ownerDocument;if(t===null)return null;let n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch{return null}}function uw(e,t){let{startContainer:n,startOffset:r,endContainer:i,endOffset:a}=e;return t===`backward`?{anchorNode:i,anchorOffset:a,direction:t,focusNode:n,focusOffset:r}:{anchorNode:n,anchorOffset:r,direction:t,focusNode:i,focusOffset:a}}function dw(e){return e.direction}function fw(e){let t=e.getRootNode();return QS(t)||ew(t)?t.activeElement:null}function pw(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){let e=t.shadowRoot.activeElement;if(e===null)break;t=e}return t}function mw(e){let t=e.target;if(t!==null&&hw(t)&&t.shadowRoot!==null&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0)return t[0]}return t}function hw(e){return gw(e)&&e.nodeType===1}function gw(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function _w(e){return gw(e)&&e.nodeType===11}var vw=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function yw(e){return!(!hw(e)||!e.style.display.startsWith(`inline`))||vw.test(e.nodeName)}var bw=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function xw(e){return(!hw(e)||!e.style.display.startsWith(`inline`))&&bw.test(e.nodeName)}function Sw(e){if(Gx(e)&&!e.isInline())return!0;if(!X(e)||GC(e))return!1;let t=e.getFirstChild(),n=t===null||rS(t)||q(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function Cw(){return bx()}function ww(e=Cw()){return e._config.dom||MS}function Tw(e,t,n=Cw()){let r=ww(n).$getDOMSlot(e,t,n);return X(e)&&(Ew(r)||K(344,e.getKey(),e.getType())),r}function Ew(e){return e instanceof hh}function Dw(e,t,n=Cw()){return $S(Tw(e,t,n).element)}var Ow=new WeakMap,kw=new Map;function Aw(e){if(!e._readOnly&&e.isEmpty())return kw;e._readOnly||K(192);let t=Ow.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),Ow.set(e,t)),t}function jw(e){let t=e.constructor.clone(e,zS);return t.afterCloneFrom(e),t}function Mw(e){return(t=jw(e))[_y]=!0,t;var t}function Nw(e,t){let n=e.getAttribute(`data-lexical-indent`);if(n!==null){let e=parseInt(n,10);if(Number.isFinite(e)&&e>=0)return void t.setIndent(e)}let r=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(r/40);t.setIndent(i)}function Pw(e,t){let n=t.getAttribute(`dir`);return n===`ltr`||n===`rtl`?e.setDirection(n):e}function Fw(e,t){let n=t.style.textAlign;return n&&n in th?e.setFormat(n):e}function Iw(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function Lw(e){return!0===e.__lexicalUnmanaged}function Rw(e,t=Cw()){let n=t.isEditable();e.contentEditable=n?`true`:`false`,n?e.__lexicalEditor=t:delete e.__lexicalEditor}function zw(e,t){let n=e;for(;n!=null;){if(!0===n.__lexicalCapturedSelection)return!0;if(hw(n)&&n.hasAttribute(`data-lexical-slot`)||lC(n,t)!==void 0)return!1;n=FC(n)}return!1}function Bw(e,t){return $h(e,t)&&e[t]!==by[t]}var Vw=new WeakMap;function Hw(e){let t=Vw.get(e);return t===void 0?function(e){let t=e.prototype!=null&&sh in e.prototype?e.prototype[sh]():void 0,n=function(e){if(!(e===by||e.prototype instanceof by)){let t=`<unknown>`,n=`<unknown>`;try{t=e.getType()}catch{}try{IS.version&&(n=JSON.parse(IS.version))}catch{}K(290,e.name,t,n)}return e===Wx||e===Hx||e===by}(e),r=!n&&Bw(e,`getType`)?e.getType:void 0,i=r&&!(Ww in r)?r.call(e):void 0,a,o=i;if(t){if(i)a=t[i];else{for(let[e,n]of Object.entries(t))o=e,a=n;if(!a)for(let e of Object.getOwnPropertySymbols(t)){let n=t[e];if(n){a=n;break}}}}let s={compiled:void 0,composed:void 0,config:{declaresOwnConfig:$h(e.prototype,sh),klass:e,ownNodeConfig:a,ownNodeType:o},ownFieldsValidated:!1};Vw.set(e,s);try{let t=function(e){let t=e.prototype,n=new Map,{fieldsBaseFirst:r}=Zw(e);for(let[i,a]of r){let r=eT(e,i,a);if(r===null)continue;if(Bh(r)){let t=r.field;if(t===`__proto__`&&K(430,e.name,i),r.setterTable!==void 0){let{setterTable:t}=r,{meta:n}=a;for(let r of n.kind===`enum`?n.values:[a.defaultValue])$h(t,String(r))||K(431,e.name,i,JSON.stringify(r))}n.set(i,{field:t,key:i,kind:`ownField`,schema:a,setterTable:r.setterTable});continue}let o=t[r];typeof o!=`function`&&K(432,e.name,i,r),n.set(i,{key:i,kind:`field`,schema:a,setter:o})}return n.size===0?Gw:[...n.values()]}(e),r=function(e){let t=e.prototype,n=new Map;for(let[r,i]of Zw(e).fieldsDerivedFirst){let a=$w(e,r,i);if(a===null)continue;if(Bh(a)){let o=a.field;o===`__proto__`&&K(426,e.name,r);let s=a.when,c;if(s!==void 0){let n=t[s];typeof n!=`function`&&K(427,e.name,r,s),c=n}n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,field:o,getterTable:a.getterTable,isEqual:i.isEqual,key:r,kind:`ownField`,schema:i,when:c});continue}let o=t[a];typeof o!=`function`&&K(428,e.name,r,a),n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,getter:o,isEqual:i.isEqual,key:r,kind:`method`,schema:i})}return n.size===0?Qw:[...n.values()]}(e),i=Zw(e),c=function(e,t,n){let r,i=e;for(let{klass:t,ownNodeConfig:n}of dT(e))n&&n.generated!==void 0&&(r===void 0?(r=n.generated,i=t):n.generated===r&&(i=t));return r===void 0?null:i===e||function(e,t){if(e.getters.length!==t.getters.length||e.setters.length!==t.setters.length)return!1;for(let n=0;n<e.getters.length;n++){let r=e.getters[n],i=t.getters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.derived!==i.derived||r.isEqual!==i.isEqual||!Object.is(r.defaultValue,i.defaultValue)||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.getterTable===void 0!=(i.getterTable===void 0)))return!1}for(let n=0;n<e.setters.length;n++){let r=e.setters[n],i=t.setters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.setterTable===void 0!=(i.setterTable===void 0)))return!1}return!0}(n,Uw(Hw(i)))?r:null}(e,0,{getters:r,setters:t});s.compiled={flatStates:i.flatStates,generated:c===null?null:c(i.fields),getters:r,isCompactDefault:rT(r),setters:t},function(e,t,n,r){if(!t&&n){if(!Bw(e,`getType`)){let t=e,r=function(){return this===t?n:by.getType.call(this)};r[Ww]=!0,e.getType=r}if(Bw(e,`clone`)||(e.clone=(t,n)=>{RS(t);let r=new e;return n!==zS&&r.afterCloneFrom(t),r}),Bw(e,`importJSON`)||(e.importJSON=r&&r.$importJSON||function(e){return t=>{let n=fT(e);return n.updateFromJSON===by.prototype.updateFromJSON?function(e,t){return aT(e.__state||t.$!==void 0?vg(e,t):e,t)}(n,t):n.updateFromJSON(t)}}(e)),!Bw(e,`importDOM`)&&r){let{importDOM:t}=r;t&&(e.importDOM=()=>t)}}}(e,n,o,a),function(e){for(let{klass:t,ownNodeConfig:n}of dT(e)){let e=t.prototype;if($h(e,`afterCloneFrom`))continue;let r=uT(t);if(r.length===0)continue;let i=Object.getPrototypeOf(e),a=n&&n.generated!==void 0?Uw(Hw(t)).generated:null,o=a!==null&&a.afterCloneFrom||((e,t)=>{let n=e,i=t;for(let e=0;e<r.length;e++){let t=r[e];n[t]=i[t]}});e.afterCloneFrom=function(e){i.afterCloneFrom.call(this,e),o(this,e)},e.afterCloneFrom[cT]=!0}}(e)}catch(t){throw Vw.delete(e),t}return s}(e):t}function Uw(e){let{compiled:t}=e;return t===void 0&&K(422,e.config.klass.name),t}var Ww=Symbol(`lexical.synthesizedGetType`),Gw=[];function Kw(e,t,n,r){let i=n.method===void 0?r:n.method,a=Zw(e).declaredBy.get(t);if(a===void 0)return n;let o=e.prototype,s=a.prototype;return qw(o,s,i)&&qw(o,s,r)?n:i}function qw(e,t,n){return e[n]===t[n]}function Jw(e){return`set${e.charAt(0).toUpperCase()}${e.slice(1)}`}function Yw(e){return`get${e.charAt(0).toUpperCase()}${e.slice(1)}`}var Xw={declaredBy:new Map,fields:new Map,fieldsBaseFirst:[],fieldsDerivedFirst:[],flatStates:[]};function Zw(e){let t=Hw(e);return t.composed===void 0&&(t.composed=function(e){let t=[],n=[],r=[];for(let{klass:i,ownNodeConfig:a}of dT(e)){let e=a&&a.json;n.push(i),t.push(e&&e.meta.kind===`node`?Object.entries(e.meta.fields):[]);let o=[];if(a&&a.stateConfigs)for(let e of a.stateConfigs)`stateConfig`in e&&e.flat&&o.push(e.stateConfig);r.push(o)}let i=new Map;for(let e=0;e<t.length;e++)for(let[n,r]of t[e])i.has(n)||i.set(n,r);let a=new Map,o=new Map,s=new Map;for(let e=t.length-1;e>=0;e--){for(let[r,s]of t[e]){let t=i.get(r);t===void 0||a.has(r)||a.set(r,t),t===void 0||s!==t||o.has(r)||o.set(r,n[e])}for(let t of r[e])s.has(t.key)||s.set(t.key,t)}return i.size===0&&s.size===0?Xw:{declaredBy:o,fields:a,fieldsBaseFirst:[...a],fieldsDerivedFirst:[...i],flatStates:[...s.values()]}}(e)),t.composed}var Qw=[];function $w(e,t,n){let r=n.getter;if(r===null)return null;let i=r===void 0?Yw(t):r;return Bh(i)?Kw(e,t,i,Yw(t)):i}function eT(e,t,n){let r=n.setter;if(r===null)return null;let i=r===void 0?Jw(t):r;return Bh(i)?Kw(e,t,i,Jw(t)):i}function tT(e){return e}function nT(e,t){let{defaultValue:n,isEqual:r}=e;return t===void 0||t===n||r!==void 0&&r(t,n)}function rT(e){let t;return(n,r)=>{t===void 0&&(t=new Map(e.map(e=>[e.key,e])));let i=t.get(n);return i!==void 0&&nT(i,r)}}function iT(e){let{setterTable:t,schema:n}=e,{defaultValue:r}=n;return t===void 0?r:t[String(r)]}function aT(e,t){let{flatStates:n,generated:r,setters:i}=Uw(Hw(e.constructor)),a=function(e,t,n){let r=e;for(let e=0;e<n.length;e++){let i=n[e],a=t[i.key];if(a!==void 0){let e=i.parse(a);r=pg(r,i,()=>e)}}return r}(e,t,n);return r!==null&&r.updateFromJSON!==void 0?r.updateFromJSON(a,t):function(e,t,n){for(let r=0;r<n.length;r++){let i=n[r],a=i.schema(t[i.key]);i.kind===`ownField`?tT(e)[i.field]=i.setterTable===void 0?a:$h(i.setterTable,a)?i.setterTable[a]:iT(i):i.setter.call(e,a)}return e}(a,t,i)}function oT(e){return Hw(e).config}function sT(e){let t=[];for(let n of[e.getter,e.setter])Bh(n)&&n.field!==`__proto__`&&!t.includes(n.field)&&t.push(n.field);return t}var cT=`__lexicalSynthesizedAfterCloneFrom`;function lT(e){let{declaredBy:t,fieldsBaseFirst:n}=Zw(e),r=[];for(let[i,a]of n)if(t.get(i)===e)for(let e of sT(a))r.includes(e)||r.push(e);return r}function uT(e){let t=lT(e);if(t.length===0)return t;let n=new Set;for(let{klass:t}of dT(e))if(t!==e)for(let e of lT(t))n.add(e);return n.size===0?t:t.filter(e=>!n.has(e))}function*dT(e){for(let t=e;t&&(t===by||xy(t.prototype));){let e=oT(t),n=e.declaresOwnConfig;yield n?e:{...e,ownNodeConfig:void 0},t=n&&e.ownNodeConfig&&e.ownNodeConfig.extends||hT(t)}}function fT(e){let t=Cw();gx();let n=t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e)),r=new n.klass;return n.replace===null?r:qC(r)}var pT=(e,t)=>{let n=e;for(;n!=null&&!qx(n);){if(t(n))return n;n=n.getParent()}return null};function mT(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t===null?oC(r):t.get(r);e??K(174),n.push(r),r=e.__next}return n}function hT(e){let t=Object.getPrototypeOf(e);if(typeof t==`function`&&t!==Function.prototype)return t;let n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}var gT=new Map;function _T(e){return X(e)||Gx(e)}function vT(e){return X(e)||Gx(e)}function yT(e){let t=e.getLatest();return vT(t)?t.__slotHost:null}function bT(e){let t=yT(e);if(t===null)return null;let n=oC(t);return X(n)||Gx(n)||K(370),n}function xT(e){let t=bT(e);if(t===null)return null;let n=e.getLatest().__key;for(let[e,r]of wT(t))if(r===n)return e;return null}function ST(e){let t=e.getLatest();for(;t!==null;){if(yT(t)!==null)return t;t=t.getParent()}return null}function CT(e){if(e===null)return null;let t=J(e)?e.anchor.getNode():e.getNodes()[0]??null;return t===null?null:ST(t)}function wT(e){let t=e.getLatest();return _T(t)&&t.__slots!==null?t.__slots:gT}function TT(e){return Array.from(wT(e).keys())}function ET(e,t){let n=wT(e).get(t);return n===void 0?null:oC(n)}var DT=[`__proto__`,`constructor`,`prototype`],OT=Symbol(`slotMapOwner`);function kT(e){let t=e.__slots;return t!==null&&t[OT]===e||(t=new Map(t),t[OT]=e,e.__slots=t),t}var AT=new WeakMap,jT=[];function MT(e){for(let{ownNodeConfig:t}of dT(e)){let e=t&&t.slots;if(e)return e}return jT}function NT(e){let t=``;for(let n of TT(e)){let r=ET(e,n);r!==null&&(t+=r.getTextContent())}return t}function PT(e,t,n){let r=n.get(e),i=n.get(t);return r===void 0?i===void 0?e<t?-1:+(e>t):1:i===void 0?-1:r-i}function FT(e){let t=e.__slots;if(t===null||t.size<2)return;let n=function(e){let t=AT.get(e);if(t===void 0){let n=MT(e),r=new Map;for(let t of n)DT.includes(t)&&K(371,e.name,t),r.has(t)&&K(372,e.name,t),r.set(t,r.size);t=r,AT.set(e,t)}return t}(e.constructor),r=null,i=!0;for(let e of t.keys()){if(r!==null&&PT(r,e,n)>0){i=!1;break}r=e}if(i)return;let a=Array.from(t).sort(([e],[t])=>PT(e,t,n));t.clear();for(let[e,n]of a)t.set(e,n)}function IT(e,t,n){t!==`__proto__`&&t!==`constructor`&&t!==`prototype`||K(373,t);let r=e.getLatest();if(r.__slots!==null&&r.__slots.get(t)===n.getLatest().__key)return r;(!X(n)&&!Gx(n)||n.isInline())&&K(374,n.__key);let i=e.getWritable(),a=kT(i),o=a.get(t);o!==void 0&&LT(o);let s=n.getWritable(),c=bT(s);if(c!==null){let e=xT(s);e!==null&&kT(c.getWritable()).delete(e),s.__slotHost=null}return nC(s),s.__slotHost=i.__key,a.set(t,s.__key),FT(i),bx()._slotsUsed=!0,vx()._slotsUsed=!0,i}function LT(e){let t=oC(e);if(t===null)return;let n=t.getWritable();vT(n)||K(377,e),n.__slotHost=null,n.remove()}var RT={next:`previous`,previous:`next`},zT=class{origin;constructor(e){this.origin=e}[Symbol.iterator](){return dE({hasNext:qT,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return QT(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return QT(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,n=`next`){let r=n===this.direction?t:Array.from(t).reverse(),i=this,a=this.getParentAtCaret(),o=new Map;for(let t=i.getAdjacentCaret();t!==null&&o.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();o.set(e.getKey(),e)}for(let e of r){if(o.size>0){let t=i.getNodeAtCaret();if(t){if(o.delete(t.getKey()),o.delete(e.getKey()),!(t.is(e)||i.origin.is(e))){let n=e.getParent();n&&n.is(a)&&e.remove(),t.replace(e)}}else t===null&&K(263,Array.from(o).join(` `))}else i.insert(e);i=QT(e,this.direction)}for(let e of o.values())e.remove();return this}},BT=class e extends zT{type=`child`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:nE(e,this.direction)}getParentCaret(e=`root`){return QT(UT(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=HT(this.direction);return QT(this.getNodeAtCaret(),e)||nE(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}},VT={root:qx,shadowRoot:GC};function HT(e){return RT[e]}function UT(e,t=`root`){return e===null||VT[t](e)?null:yT(e)===null?e:null}var WT=class e extends zT{type=`sibling`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:QT(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return X(this.origin)?nE(this.origin,this.direction):null}getParentCaret(e=`root`){return QT(UT(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=HT(this.direction);return QT(this.getNodeAtCaret(),e)||nE(this.origin.getParentOrThrow(),e)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof e||t instanceof GT)&&this.direction===t.direction&&this.origin.is(t.origin)}},GT=class e extends zT{type=`text`;offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:$T(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e=`root`){return QT(UT(this.getParentAtCaret(),e),this.direction)}getFlipped(){return $T(this.origin,HT(this.direction),this.offset)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof WT||t instanceof e)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return QT(this.origin,this.direction)}};function KT(e){return e instanceof GT}function qT(e){return e instanceof WT}function JT(e){return e instanceof BT}var YT={next:class extends GT{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends GT{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},XT={next:class extends WT{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends WT{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},ZT={next:class extends BT{direction=`next`;getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends BT{direction=`previous`;getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function QT(e,t){return e?new XT[t](e):null}function $T(e,t,n){return e?new YT[t](e,eE(e,n)):null}function eE(e,t,n=`error`){let r=e.getTextContentSize(),i=t===`next`?r:t===`previous`?0:t;return(i<0||i>r)&&(n!==`clamp`&&Am(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function tE(e,t){return new oE(e,t)}function nE(e,t){return X(e)?new ZT[t](e):null}function rE(e){return e&&e.getChildCaret()||e}function iE(e){return e&&rE(e.getAdjacentCaret())}var aE=class e{type=`node-caret-range`;direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new e(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return KT(t)?function(e,t){let{direction:n,origin:r}=e;return tE(e,eE(r,t===`focus`?HT(n):n)-e.offset)}(t,e):null},t=e(`anchor`),n=e(`focus`);if(t&&n){let{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[tE(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e=`root`){let t=KT(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=KT(n),i=t=>t.isSameNodeCaret(n)?null:iE(t)||t.getParentCaret(e);return dE({hasNext:e=>e!==null&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets(`root`)}},oE=class{type=`slice`;caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return $T(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}};function sE(e,t){return e.direction===t?e:e.getFlipped()}function cE(e){return uE(e,sE(nE(pC(),HT(e.direction)),e.direction))}function lE(e){return uE(e,e)}function uE(e,t){return e.direction!==t.direction&&K(265),new aE(e,t,e.direction)}function dE(e){let{initial:t,hasNext:n,step:r,map:i}=e,a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};let e={done:!1,value:i(a)};return a=r(a),e}}}function fE(e,t){let n=gE(e.origin,t.origin);switch(n===null&&K(275,e.origin.getKey(),t.origin.getKey()),n.type){case`same`:{let n=e.type===`text`,r=t.type===`text`;return n&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:n?-1:r?1:e.type===`child`?-1:1}case`ancestor`:return e.type===`child`?-1:1;case`descendant`:return t.type===`child`?1:-1;case`branch`:return pE(n)}}function pE(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,a=t,o=n;for(;a&&o;a=a.getNextSibling(),o=o.getNextSibling()){if(a.__key===i)return-1;if(o.__key===r)return 1}return a===null?1:-1}function mE(e,t){return t.is(e)}function hE(e){return X(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function gE(e,t){if(e.is(t))return{commonAncestor:e,type:`same`};let n=new Map;for(let[t,r]=hE(e);t;r=t,t=t.getParent())n.set(t,r);for(let[r,i]=hE(t);r;i=r,r=r.getParent()){let a=n.get(r);if(a!==void 0)return a===null?(mE(e,r)||K(276),{commonAncestor:r,type:`ancestor`}):i===null?(mE(t,r)||K(277),{commonAncestor:r,type:`descendant`}):((X(a)||mE(e,a))&&(X(i)||mE(t,i))&&r.is(a.getParent())&&r.is(i.getParent())||K(278),{a,b:i,commonAncestor:r,type:`branch`})}return null}function _E(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e}function vE(...e){let t=[];for(let n of e)if(n&&typeof n==`string`)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}function yE(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}var bE=Mm?O.useLayoutEffect:O.useEffect,xE={tag:Cy};function SE({initialConfig:e,children:t}){let n=(0,O.useMemo)(()=>{let{theme:t,namespace:n,nodes:r,onError:i,onWarn:a,editorState:o,html:s}=e,c=Om(null,t),l=NS({editable:e.editable,html:s,namespace:n,nodes:r,onError:e=>i(e,l),...a?{onWarn:e=>a(e,l)}:{},theme:t});return function(e,t){if(t!==null){if(t===void 0)e.update(()=>{let t=pC();if(t.isEmpty()){let n=DS();t.append(n);let r=e.getRootElement(),i=Mm&&r!==null?fw(r):null;(Y()!==null||i!==null&&i===r)&&n.select()}},xE);else if(t!==null)switch(typeof t){case`string`:{let n=e.parseEditorState(t);e.setEditorState(n,xE);break}case`object`:e.setEditorState(t,xE);break;case`function`:e.update(()=>{pC().isEmpty()&&t(e)},xE)}}}(l,o),[l,c]},[]);return bE(()=>{let t=e.editable,[r]=n;r.setEditable(t===void 0||t)},[]),(0,V.jsx)(Dm.Provider,{value:n,children:t})}function CE(){return pC().getTextContent()}function wE(e,t=!0){if(e)return!1;let n=CE();return t&&(n=n.trim()),n===``}function TE(e){if(!wE(e,!1))return!1;let t=pC().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){let n=t[e];if(Gx(n))return!1;if(X(n)){if(!OS(n)||n.__indent!==0)return!1;let e=n.getChildren(),t=e.length;for(let n=0;n<t;n++){let t=e[n];if(!q(t))return!1}}}return!0}function EE(e){return()=>TE(e)}var DE=Mm?O.useLayoutEffect:O.useEffect;function OE({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:a,ariaExpanded:o,ariaInvalid:s,ariaLabel:c,ariaLabelledBy:l,ariaMultiline:u,ariaOwns:d,ariaRequired:f,autoCapitalize:p,className:m,id:h,role:g=`textbox`,spellCheck:_=!0,style:v,tabIndex:y,"data-testid":b,...x},S){let[C,w]=(0,O.useState)(e.isEditable()),T=(0,O.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),E=(0,O.useMemo)(()=>function(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n!=null&&(n.current=t)}}(S,T),[T,S]);return DE(()=>(w(e.isEditable()),e.registerEditableListener(e=>{w(e)})),[e]),(0,V.jsx)(`div`,{"aria-activedescendant":C?t:void 0,"aria-autocomplete":C?n:`none`,"aria-controls":C?r:void 0,"aria-describedby":i,...a==null?{}:{"aria-errormessage":a},"aria-expanded":C&&g===`combobox`?!!o:void 0,...s==null?{}:{"aria-invalid":s},"aria-label":c,"aria-labelledby":l,"aria-multiline":u,"aria-owns":C?d:void 0,"aria-readonly":!C||void 0,"aria-required":f,autoCapitalize:p,className:m,contentEditable:C,"data-testid":b,id:h,ref:E,role:g,spellCheck:_,style:v,tabIndex:y??(C?void 0:-1),...x})}var kE=(0,O.forwardRef)(OE);function AE(e){return e.read(`latest`,EE(e.isComposing()))}var jE=(0,O.forwardRef)(ME);function ME(e,t){let{placeholder:n,...r}=e,[i]=km();return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(kE,{editor:i,...r,ref:t}),n!=null&&(0,V.jsx)(NE,{editor:i,content:n})]})}function NE({content:e,editor:t}){let n=function(e){let[t,n]=(0,O.useState)(()=>AE(e));return DE(()=>{function t(){let t=AE(e);n(t)}return t(),yE(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[r,i]=(0,O.useState)(t.isEditable());if(DE(()=>(i(t.isEditable()),t.registerEditableListener(e=>{i(e)})),[t]),!n)return null;let a=null;return typeof e==`function`?a=e(r):e!==null&&(a=e),a===null?null:(0,V.jsx)(`div`,{"aria-hidden":!0,children:a})}var PE=class extends O.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){this.props.onError(e instanceof Error?e:Error(String(e),{cause:e}),t)}render(){return this.state.hasError?this.props.fallback:this.props.children}};function FE({children:e,fallback:t,onError:n}){return(0,V.jsx)(PE,{fallback:t===void 0?(0,V.jsx)(`div`,{style:{border:`1px solid #f00`,color:`#f00`,padding:`8px`},children:`An error was thrown.`}):t,onError:n,children:e})}var IE=Symbol.for(`preact-signals`);function LE(){if(HE>1)HE--;else{var e,t=!1;for((function(){var e=GE;for(GE=void 0;e!==void 0;){var t=e.S;if(t.v===e.v)for(var n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();VE!==void 0;){var n=VE;for(VE=void 0,UE++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&XE(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(UE=0,HE--,t)throw e}}var RE,zE=void 0;function BE(e){var t=zE,n=RE;zE=void 0,RE=void 0;try{return e()}finally{zE=t,RE=n}}var VE=void 0,HE=0,UE=0,WE=0,GE=void 0,KE=0;function qE(e){if(zE!==void 0){var t=e.n;if(t===void 0||t.t!==zE)return t={i:0,S:e,p:zE.s,n:void 0,t:zE,e:void 0,x:void 0,r:t},zE.s!==void 0&&(zE.s.n=t),zE.s=t,e.n=t,32&zE.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=zE.s,t.n=void 0,zE.s.n=t,zE.s=t),t}}function JE(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}JE.prototype.brand=IE,JE.prototype.h=function(){return!0},JE.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?BE(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},JE.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&BE(function(){var e;(e=t.Z)==null||e.call(t)}))}},JE.prototype.subscribe=function(e){var t=this;return iD(function(){var n=t.value;BE(function(){return e(n)})},{name:`sub`})},JE.prototype.valueOf=function(){return this.value},JE.prototype.toString=function(){return this.value+``},JE.prototype.toJSON=function(){return this.value},JE.prototype.peek=function(){var e=this;return BE(function(){return e.value})},Object.defineProperty(JE.prototype,"value",{get:function(){var e=qE(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(UE>100)throw Error(`Cycle detected`);(function(e){HE!==0&&UE===0&&e.l!==WE&&(e.l=WE,GE={S:e,v:e.v,i:e.i,o:GE})})(this),this.v=e,this.i++,KE++,HE++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{LE()}}}});function YE(e,t){return new JE(e,t)}function XE(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ZE(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function QE(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function $E(e,t){JE.call(this,void 0,t),this.x=e,this.s=void 0,this.g=KE-1,this.f=4}$E.prototype=new JE,$E.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===KE))return!0;if(this.g=KE,this.f|=1,this.i>0&&!XE(this))return this.f&=-2,!0;var e=zE;try{ZE(this),zE=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return zE=e,QE(this),this.f&=-2,!0},$E.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}JE.prototype.S.call(this,e)},$E.prototype.U=function(e){if(this.t!==void 0&&(JE.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},$E.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty($E.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=qE(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function eD(e){var t=e.m;if(e.m=void 0,typeof t==`function`){HE++;var n=zE;zE=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,tD(e),t}finally{zE=n,LE()}}}function tD(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,eD(e)}function nD(e){if(zE!==this)throw Error(`Out-of-order effect`);QE(this),zE=e,this.f&=-2,8&this.f&&tD(this),LE()}function rD(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,RE&&RE.push(this)}rD.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},rD.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,eD(this),ZE(this),HE++;var e=zE;return zE=this,nD.bind(this,e)},rD.prototype.N=function(){2&this.f||(this.f|=2,this.u=VE,VE=this)},rD.prototype.d=function(){this.f|=8,1&this.f||tD(this)},rD.prototype.dispose=function(){this.d()};function iD(e,t){var n=new rD(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}function aD(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}var oD={tag:Cy};function sD(){let e=pC();e.isEmpty()&&e.append(DS())}var cD={config:{setOptions:oD,updateOptions:oD},init:({$initialEditorState:e=sD})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){let i=r.getInitResult();if(!i.initialized){i.initialized=!0;let{$initialEditorState:r}=i;if(Zx(r))e.setEditorState(r,n);else if(typeof r==`function`)e.update(()=>{r(e)},t);else if(r&&(typeof r==`string`||typeof r==`object`)){let t=e.parseEditorState(r);e.setEditorState(t,n)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[Kx,qy,eS,ab,TS]};function lD(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function uD(){let e;try{e=`0.51.0+prod.esm`}catch{}return e??`"<unknown>+source"`}var dD=uD(),fD=new Set([`__proto__`,`constructor`,`prototype`]);function pD(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)!fD.has(e)&&Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=pD(n[e],r[e]));return e}return t}var mD=0,hD=1,gD=2,_D=3,vD=4,yD=5,bD=6,xD=7;function SD(e){return e.id===mD}function CD(e){return e.id===gD}function wD(e){return function(e){return e.id===hD}(e)||lD(305,String(e.id),String(hD)),Object.assign(e,{id:gD})}var TD=new Set,ED=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:mD}}mergeConfigs(){let e=this.extension.config||{},t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):_E;for(let n of this.configs)e=t(e,n);return e}init(e){let t=this.state;CD(t)||lD(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:_D,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:vD,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==vD&&lD(307,String(t.id),String(yD)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:yD,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==yD&&lD(308,String(n.id),String(yD));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:bD})}(n),()=>{let e=this.state;e.id!==xD&&lD(309,String(n.id),String(xD)),this.state=function(e){return Object.assign(e,{id:yD})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==bD&&lD(310,String(t.id),String(bD)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:xD})}(t),n}getSignal(){return this._signal===void 0&&lD(311),this._signal}getInitResult(){this.extension.init===void 0&&lD(312,this.extension.name);let e=this.state;return function(e){return e.id>=vD}(e)||lD(313,String(e.id),String(vD)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=_D}(e)||lD(314,String(e.id),String(_D)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&lD(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&lD(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=xD}(e)||lD(316,String(e.id),String(xD)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||TD}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=yD})(e)||lD(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},DD=Symbol.for(`@lexical/extension/LexicalBuilder`);function OD(){}function kD(e){throw e}function AD(e){return Array.isArray(e)?e:[e]}var jD=dD,MD=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=jD,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[AD(cD)];for(let e of t)n.push(AD(e));return new e(n)}static maybeFromEditor(t){let n=t[DD];return n&&(n.PACKAGE_VERSION!==jD&&lD(292,n.PACKAGE_VERSION,jD),n instanceof e||lD(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&lD(294),n}constructEditor(){let{$initialEditorState:e,onError:t,onWarn:n,...r}=this.buildCreateEditorArgs(),i=Object.assign(NS({...r,...t?{onError:e=>{t(e,i)}}:{},...n?{onWarn:e=>{n(e,i)}}:{}}),{[DD]:this});for(let e of this.sortedExtensionReps())e.build(i);return i}buildEditor(){let e=OD;function t(){try{e()}finally{e=OD}}let n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=yE(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&lD(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);if(r){let e=r.get(t);e?e.push(...n):r.set(t,n)}else this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&lD(296);let[t]=AD(e);typeof t.name!=`string`&&lD(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&lD(298,t.name),!n){n=new ED(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&lD(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&lD(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=AD(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(CD(i))return;let a=n.extension.name;var o;SD(i)||lD(300,a,r||`[unknown]`),SD(o=i)||lD(304,String(o.id),String(mD)),i=Object.assign(o,{id:hD}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=wD(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())SD(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&lD(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],i=n.signal;for(let n of t){let t=n.register(e,i);t&&r.push(t)}for(let n of t){let t=n.afterRegistration(e);t&&r.push(t)}return yE(...r)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.onWarn!==void 0&&(e.onWarn=o.onWarn),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of aD(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&lD(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&pD(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=Array.from(t));let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=kD,e}};function ND(e,t){let n=MD.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function PD(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;let a=t._selection,o=e._selection;if(i)return 1;if(!(J(a)&&J(o)&&o.isCollapsed()&&a.isCollapsed()))return 0;let s=function(e,t,n){let r=e._nodeMap,i=[];for(let e of t){let t=r.get(e);t!==void 0&&i.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);n===void 0||qx(n)||i.push(n)}return i}(t,n,r);if(s.length===0)return 0;if(s.length>1){let n=t._nodeMap,r=n.get(a.anchor.key),i=n.get(o.anchor.key);return r&&i&&!e._nodeMap.has(r.__key)&&q(r)&&r.__text.length===1&&a.anchor.offset===1?2:0}let c=s[0],l=e._nodeMap.get(c.__key);if(!q(l)||!q(c)||l.__mode!==c.__mode)return 0;let u=l.__text,d=c.__text;if(u===d)return 0;let f=a.anchor,p=o.anchor;if(f.key!==p.key||f.type!==`text`)return 0;let m=f.offset,h=p.offset,g=d.length-u.length;return g===1&&h===m-1?2:g===-1&&h===m+1?3:g===-1&&h===m?4:0}function FD(e,t,n){let r=n(),i=0,a=r,o=0,s=null;return(c,l,u,d,f,p)=>{let m=n();if(p.has(`composition-start`)&&(a=r,o=i,s=c),p.has(`historic`))return i=0,r=m,2;p.has(`composition-end`)&&s&&(r=a,i=o,c=s);let h=p.has(`paste`)||p.has(`cut`)?0:PD(c,l,d,f,e.isComposing()),g=(()=>{let n=u===null||u.editor===e,a=p.has(Sy);if(!a&&n&&p.has(`history-merge`))return 0;if(h===1)return 2;if(c===null)return 1;let o=l._selection;if(!(d.size>0||f.size>0))return o===null?2:0;let s=typeof t==`number`?t:t.peek();return!1===a&&h!==0&&h===i&&m<r+s&&n||d.size===1&&function(e,t,n){let r=t._nodeMap.get(e),i=n._nodeMap.get(e),a=t._selection,o=n._selection;return!(J(a)&&J(o)&&a.anchor.type===`element`&&a.focus.type===`element`&&o.anchor.type===`text`&&o.focus.type===`text`||!q(r)||!q(i)||r.__parent!==i.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>i.exportJSON()))}(Array.from(d)[0],c,l)?0:1})();return r=m,i=h,g}}function ID(e,t){if(t!==null&&t.editor===e.editor)return t;let{editor:n}=e,r=n.getEditorState();return r.isEmpty()?null:{editor:n,editorState:r}}function LD(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}function RD(e,t,n,r=Date.now,i,a=null){let o=FD(e,n,r),s=()=>{i&&i(t)};return s(),yE(e.registerCommand(G_,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(i.length!==0){let a=t.current,o=i.pop();if(o){let t=ID(o,a);t!==null&&(r.push(t),e.dispatchCommand(hv,!0))}i.length===0&&e.dispatchCommand(gv,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:`historic`})}}(e,t,i),!0),0),e.registerCommand(K_,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(r.length!==0){let a=t.current,o=r.pop();if(o){let t=ID(o,a);t!==null&&(i.push(t),e.dispatchCommand(gv,!0))}r.length===0&&e.dispatchCommand(hv,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:`historic`})}}(e,t,i),!0),0),e.registerCommand(pv,()=>(LD(t,i),!1),0),e.registerCommand(mv,()=>(LD(t,i),e.dispatchCommand(hv,!1),e.dispatchCommand(gv,!1),!0),0),e.registerUpdateListener(({editorState:n,prevEditorState:r,dirtyLeaves:i,dirtyElements:c,tags:l})=>{let u=t.current,d=t.redoStack,f=t.undoStack,p=u===null?null:u.editorState;if(u!==null&&n===p)return;let m=o(r,n,u,i,c,l);if(m===1){d.length!==0&&(t.redoStack=[],e.dispatchCommand(hv,!1));let n=function(e,t,n){return n===null?null:n.editor===e?{...n}:t.isEmpty()?null:{editor:e,editorState:t}}(e,r,u);if(n!==null){f.push(n);let t=typeof a==`number`||a===null?a:a.peek();t!==null&&f.length>t&&f.splice(0,f.length-t),e.dispatchCommand(gv,!0)}}else if(m===2)return;t.current={editor:e,editorState:n},s()}))}function zD(){return{current:null,redoStack:[],undoStack:[]}}function BD({delay:e,externalHistoryState:t}){let[n]=km();return function(e,t,n=1e3){let r=(0,O.useMemo)(()=>t||zD(),[t]);(0,O.useEffect)(()=>RD(e,r,n),[n,e,r])}(n,t,e),null}var VD=Mm?O.useLayoutEffect:O.useEffect;function HD(e){let[t]=km(),n=(0,O.useMemo)(()=>e(t),[t,e]),[r,i]=(0,O.useState)(()=>n.initialValueFn()),a=(0,O.useRef)(r);return VD(()=>{let{initialValueFn:e,subscribe:t}=n,r=e();return a.current!==r&&(a.current=r,i(r)),t(e=>{a.current=e,i(e)})},[n,e]),r}function UD(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function WD(){return HD(UD)}var GD={name:`@lexical/react/ReactProvider`};function KD(e,t){let n;return YE(e(),{unwatched(){n&&=(n(),void 0)},watched(){this.value=e(),n=t(this)}})}var qD={bold:`bold`,italic:`italic`,strikeThrough:`strikethrough`,subscript:`subscript`,superscript:`superscript`,underline:`underline`},JD=Symbol.for(`@lexical/dragon/WindowState`);function YD(e,t,n){let r=function(e){let t=e[JD];return t===void 0&&(t={dispose:()=>{},editors:new Map,installs:new Set},e[JD]=t),t}(e);if(r.installs.size===0){let t=$D.bind(e);e.addEventListener(`message`,t,!0),r.dispose=()=>{e.removeEventListener(`message`,t,!0)}}if(r.installs.add(t),n){let e=r.editors.get(n)||new Set;e.add(t),r.editors.set(n,e)}return XD.bind(null,e,r,t,n)}function XD(e,t,n,r){if(r){let e=t.editors.get(r);e&&e.delete(n)&&e.size===0&&t.editors.delete(r)}t.installs.delete(n)&&t.installs.size===0&&(t.dispose(),delete e[JD])}function ZD(e){return e&&e.ownerDocument.defaultView}function QD(e){let t=KD(()=>ZD(e.getRootElement()),t=>e.registerRootListener(e=>{t.value=ZD(e)}));return iD(()=>{let n=t.value;if(n)return YD(n,Symbol(`@lexical/dragon/editorInstall`),e)})}function $D(e){if(e.origin!==this.location.origin)return;let t=function(e){let t=e[JD];if(t===void 0)return null;let n=JS(pw(e.document));return KS(n)&&t.editors.has(n)?n:null}(this);if(t===null)return;let n=e.data;if(typeof n==`string`){let r;try{r=JSON.parse(n)}catch{return}if(r&&r.protocol===`nuanria_messaging`&&r.type===`request`){let n=r.payload;if(n&&n.functionId===`makeChanges`){let r=n.args;if(Array.isArray(r)){let[n,i,a,o,s,c]=r;if(![n,i,o,s].every(Number.isFinite)||typeof a!=`string`&&a!==-1)return;t.update(()=>{let t=Y();if(J(t)){let r=t.anchor,l=r.getNode(),u=0,d=0;if(q(l)&&n>=0&&i>=0&&(u=n,d=n+i,t.setTextNodeRange(l,u,l,d)),typeof a!=`string`||u===d&&a===``||(t.insertRawText(a),l=r.getNode()),q(l)){let e=l.getTextContentSize();u=Math.min(Math.max(o,0),e),d=o<0||s<0?u:Math.min(o+s,e),t.setTextNodeRange(l,u,l,d)}if(typeof c==`string`&&s>0&&!t.isCollapsed()){let e=qD[c];e!==void 0&&t.formatText(e)}e.stopImmediatePropagation()}})}}}}}function eO(e){let t=Cw().getElementByKey(e.getKey());if(t===null)return null;let n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function tO(e){let t=qx(e)?e:e.getParent();return t&&eO(t)}function nO(e,t,n=`self`){let r=e.getStartEndPoints();if(t.isSelected(e)&&!XS(t)&&r!==null){let[i,a]=r,o=e.isBackward(),s=i.getNode(),c=a.getNode(),l=t.is(s),u=t.is(c);if(l||u){let[r,i]=Sb(e),a=s.is(c),l=t.is(o?c:s),u=t.is(o?s:c),d,f=0;a?(f=r>i?i:r,d=r>i?r:i):l?(f=o?i:r,d=void 0):u&&(f=0,d=o?r:i);let p=t.__text.slice(f,d);p!==t.__text&&(n===`clone`&&(t=Mw(t)),t.__text=p)}}return t}function rO(e){let t=iO(e);return t!==null&&t.writingMode===`vertical-rl`}function iO(e){let t=e.anchor.getNode();return X(t)?eO(t):tO(t)}function aO(e,t){let n=rO(e)?!t:t;sO(e)&&(n=!n);let r=sS(e.focus,n?`previous`:`next`);if(_S(r))return!1;if(KT(r)&&!sb(r.origin)&&r.origin.isUnmergeable()){let e=r.getNodeAtCaret();if(q(e)&&!sb(e))return!0}for(let e of cE(r)){if(JT(e))return!e.origin.isInline();if(!X(e.origin)){if(Gx(e.origin))return!0;break}}return!1}function oO(e,t,n,r){e.modify(t?`extend`:`move`,n,r)}function sO(e){let t=iO(e);return t!==null&&t.direction===`rtl`}function cO(e,t,n){let r=sO(e),i;i=rO(e)||r?!n:n,oO(e,t,i,`character`)}function lO(e,t){if(e==null)return!1;let n=Object.getPrototypeOf(e);return n!=null&&n.constructor!=null&&n.constructor.name===t.name}function uO(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var dO;function fO(e,t){let{key:n}=t;return e&&n in e?e[n]:t.defaultValue}function pO(e){return dO&&dO.editor===e?dO:void 0}function mO(e,t){if(`cfg`in t){let{cfg:n,updater:r}=t;return[n,r(fO(e,n))]}return t}function hO(e,t){let n=t;for(let r of e){let[e,i]=mO(n,r),a=e.key;if(n===t&&fO(n,e)===i)continue;let o=n===t||n===void 0?gO(t):n;o[a]=i,n=o}return n}function gO(e){return Object.create(e||null)}function _O(e,t){return[e,t]}function vO(e,t,n,r=Cw()){let i=dO,a=pO(r);try{return dO={...a,editor:r,[e]:t},n()}finally{dO=i}}function yO(e,t=()=>{}){return(n,r=Cw())=>i=>{let a=pO(r),o=a&&a[e],s=hO(n,o||t(r));return s&&s!==o?vO(e,s,i,r):i()}}function bO(e,t,n,r){return Object.assign(dg(Symbol(t),{isEqual:r,parse:n}),{[e]:!0})}var xO=`@lexical/html/DOM`,SO=Symbol.for(`@lexical/html/DOMExportContext`);function CO(e,t,n){return bO(SO,e,t,n)}var wO=CO(`isExport`,Boolean);function TO(e){let t=ND(e,xO);return t?t.output.defaults:void 0}function EO(e){let t=ND(e,xO);return t?t.output.runtime:void 0}function DO(e=Cw()){let t=EO(e);return t?t.getSessionConfig():ww(e)}var OO=yO(SO,TO);function kO(e,t=null,n=Cw()){return OO([_O(wO,!0)],n)(()=>{let r=pC(),i=DO(n),a=CT(t),o=e.append.bind(e);for(let e of(X(a)?a:r).getChildren())jO(n,e,o,t,i);return e})}function AO(e,t=null){return(typeof document>`u`||typeof window>`u`&&global.window===void 0)&&uO(338),yx(e),kO(aw().createElement(`div`),t,e).innerHTML}function jO(e,t,n,r=null,i=ww(e)){let a=i.$shouldInclude(t,r,e),o=i.$shouldExclude(t,r,e),s=t;r!==null&&q(t)&&(s=nO(r,t,`clone`));let{element:c,after:l,append:u,$getChildNodes:d}=i.$exportDOM(s,e);if(!c)return!1;let f=aw().createDocumentFragment(),p=d?d():X(s)?s.getChildren():[],m=a&&vb(r)&&X(t)?null:r,h=f.append.bind(f),g=null;for(let n of p){let o=jO(e,n,h,m,i);o&&(g=n),!a&&o&&i.$extractWithChild(t,n,r,`html`,e)&&(a=!0)}if(a&&!o){if((hw(c)||_w(c))&&(u?u(f):c.append(f),function(e,t){let n=e.lastChild;if(rS(t)&&hw(e)&&xw(e)&&n!==null&&n.nodeName===`BR`){let t=aw().createElement(`br`);t.setAttribute(`data-lexical-managed-linebreak`,`true`),e.append(t)}}(c,g)),_w(c)){if(l){let e=l.call(s,c);e&&c.replaceChildren(e)}n(c)}else if(n(c),l){let e=l.call(s,c);e&&c.replaceWith(e)}}else n(f);return a}function MO(e,t,n=null){let r=iw(n),i=n?nw(n):[],a=n!==null&&i.length>0;if(a&&typeof r.caretPositionFromPoint==`function`){let a=r.caretPositionFromPoint(e,t,{shadowRoots:i});if(a!==null&&function(e,t){for(let n=e;n!==null;){if(n===t)return!0;n=FC(n)}return!1}(a.offsetNode,n))return{node:a.offsetNode,offset:a.offset}}if(a){let i=n.getRootNode();if(ew(i)){let a=i.elementFromPoint(e,t);if(a!==null&&n.contains(a)){let n=function(e,t,n,r){let i=r.createRange(),a=e=>t<e.top?e.top-t:t>e.bottom?t-e.bottom:0,o=t=>e<t.left?t.left-e:e>t.right?e-t.right:0,s=r.createTreeWalker(n,NodeFilter.SHOW_TEXT),c=null,l=1/0,u=1/0;for(let e=s.nextNode();e;e=s.nextNode()){i.selectNodeContents(e);for(let t of i.getClientRects()){let n=a(t),r=o(t);(n<l||n===l&&r<u)&&(l=n,u=r,c=e)}}if(c===null)return null;let d=0,f=1/0,p=1/0;for(let t=0;t<=c.length;t++){i.setStart(c,t),i.collapse(!0);let n=i.getBoundingClientRect(),r=a(n),o=Math.abs(e-n.left);(r<f||r===f&&o<p)&&(f=r,p=o,d=t)}return{node:c,offset:d}}(e,t,a,r);if(n!==null)return n}}}if(typeof r.caretRangeFromPoint==`function`){let n=r.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(typeof r.caretPositionFromPoint==`function`){let n=r.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}function NO(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function PO(e,t=Y()){return t??NO(166),J(t)&&t.isCollapsed()||t.getNodes().length===0?``:AO(e,t)}function FO(e,t){let n=e.getData(`text/plain`)||e.getData(`text/uri-list`);n!=null&&t.insertRawText(n)}var IO=`application/x-lexical-drag`;function LO(e,t){let n={editorKey:t.getKey()};e.setData(IO,JSON.stringify(n))}function RO(e,t,n){let r=e.dataTransfer;if(r===null)return!1;let i=function(e){let t=e.getData(IO);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}return(r=n)!==null&&typeof r==`object`&&`editorKey`in r&&typeof r.editorKey==`string`?n:null;var r}(r);if(i===null)return!1;let a=function(e,t){let n=MO(e.clientX,e.clientY,t.getRootElement());if(n===null)return null;let r=uC(n.node);if(r===null)return null;if(q(r))return $T(r,`next`,n.offset);if(X(r))return yS(r,n.offset,`next`);let i=r.getParent();return i===null?null:yS(i,r.getIndexWithinParent()+1,`next`)}(e,t);if(a===null)return!1;let o=SS(a);if(o===null)return!1;let s=i.editorKey===t.getKey(),c=Y();if(s){if(!J(c)||c.isCollapsed())return!1;if(function(e,t){let{anchor:n,focus:r}=vS(dS(t),`next`);return fE(n,e)<0&&fE(e,r)<0}(a,c))return e.preventDefault(),!0;c.removeText()}if(!o.origin.isAttached())return e.preventDefault(),!0;if(n(r,lS(lE(o)),t),!s){let e=t.getRootElement(),n=e?e.ownerDocument:null,r=n?function(e,t){for(let n of rw(t)){let t=JS(n);if(KS(t)&&t.getKey()===e&&hw(n))return n}return null}(i.editorKey,n):null;r!==null&&r.dispatchEvent(new InputEvent(`beforeinput`,{bubbles:!0,cancelable:!0,inputType:`deleteByDrag`}))}return e.preventDefault(),!0}function zO(e,t){return RO(e,t,(e,t)=>FO(e,t))}function BO(e,t){t.update(()=>{if(e!==null){let n=lO(e,KeyboardEvent)?null:e.clipboardData,r=Y();if(r!==null&&!r.isCollapsed()&&n!=null){e.preventDefault();let i=PO(t);i!==null&&n.setData(`text/html`,i),n.setData(`text/plain`,r.getTextContent())}}})}function VO(e){return yE(e.registerCommand(I_,e=>{let t=Y();return!!J(t)&&(t.deleteCharacter(e),!0)},0),e.registerCommand(H_,e=>{let t=Y();return!!J(t)&&(t.deleteWord(e),!0)},0),e.registerCommand(U_,e=>{let t=Y();return!!J(t)&&(t.deleteLine(e),!0)},0),e.registerCommand(z_,e=>{let t=Y();if(!J(t))return!1;if(typeof e==`string`)t.insertText(e);else{let n=e.dataTransfer;if(n!=null)FO(n,t);else{let n=e.data;n&&t.insertText(n)}}return!0},0),e.registerCommand(V_,()=>{let e=Y();return!!J(e)&&(e.removeText(),!0)},0),e.registerCommand(L_,e=>{let t=Y();return!!J(t)&&(t.insertLineBreak(e),!0)},0),e.registerCommand(R_,()=>{let e=Y();return!!J(e)&&(e.insertLineBreak(),!0)},0),e.registerCommand(X_,e=>{let t=Y();if(!J(t))return!1;let n=e,r=n.shiftKey;return!!aO(t,!0)&&(n.preventDefault(),cO(t,r,!0),!0)},0),e.registerCommand(J_,e=>{let t=Y();if(!J(t))return!1;let n=e,r=n.shiftKey;return!!aO(t,!1)&&(n.preventDefault(),cO(t,r,!1),!0)},0),e.registerCommand(nv,t=>!!J(Y())&&(!Hm||!Bm)&&(t.preventDefault(),e.dispatchCommand(I_,!0)),0),e.registerCommand(iv,t=>!!J(Y())&&(t.preventDefault(),e.dispatchCommand(I_,!1)),0),e.registerCommand(ev,t=>{if(!J(Y()))return!1;if(t!==null){if((Hm||Wm||qm)&&Bm)return!1;t.preventDefault()}return e.dispatchCommand(L_,!1)},0),e.registerCommand(fv,()=>{let e=Y();return DC(J(e)&&ST(e.anchor.getNode())!==null?e:null),!0},0),e.registerCommand(uv,t=>!!J(Y())&&(BO(t,e),!0),0),e.registerCommand(dv,t=>!!J(Y())&&(function(e,t){BO(e,t),t.update(()=>{let e=Y();J(e)&&e.removeText()},{tag:`cut`})}(t,e),!0),0),e.registerCommand(B_,t=>!!J(Y())&&(function(e,t){e.preventDefault(),t.update(()=>{let t=Y(),n=lO(e,ClipboardEvent)?e.clipboardData:null;n!=null&&J(t)&&FO(n,t)},{tag:`paste`})}(t,e),!0),0),e.registerCommand(ov,t=>zO(t,e),0),e.registerCommand(sv,t=>{let n=Y();return!!J(n)&&(n.isCollapsed()||t.dataTransfer===null||LO(t.dataTransfer,e),!0)},0))}function HO(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function UO(e,t){let[n,r]=(0,O.useMemo)(()=>[t=>e.registerDecoratorListener(t),()=>e.getDecorators()],[e]),i=(0,O.useSyncExternalStore)(n,r,r),a=function(e){let[t,n]=(0,O.useMemo)(()=>[e.registerRootListener.bind(e),e.getRootElement.bind(e)],[e]);return(0,O.useSyncExternalStore)(t,n,n)}(e);return(0,O.useMemo)(()=>{let n=t=>e._onError(t),r=[];for(let a in i){let o=e.getElementByKey(a);if(o!==null){let e=(0,V.jsx)(t,{onError:n,children:(0,V.jsx)(O.Suspense,{fallback:null,children:i[a]})});r.push((0,Ko.createPortal)(e,o,a))}}return r},[t,i,e,a])}function WO({editor:e,ErrorBoundary:t}){return UO(e,t)}function GO({editor:e,ErrorBoundary:t}){return function(e){let t=MD.maybeFromEditor(e);if(t&&t.hasExtensionByName(GD.name)){for(let e of[`@lexical/plain-text`,`@lexical/rich-text`])t.hasExtensionByName(e)&&HO(320,e);return!0}return!1}(e)?null:(0,V.jsx)(WO,{editor:e,ErrorBoundary:t})}var KO=Mm?O.useLayoutEffect:O.useEffect;function qO(e){return e.read(`latest`,EE(e.isComposing()))}function JO({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){let[r]=km();return function(e){KO(()=>yE(VO(e),QD(e)),[e])}(r),(0,V.jsxs)(V.Fragment,{children:[e,(0,V.jsx)(YO,{content:t}),(0,V.jsx)(GO,{editor:r,ErrorBoundary:n})]})}function YO({content:e}){let[t]=km(),n=function(e){let[t,n]=(0,O.useState)(()=>qO(e));return KO(()=>{function t(){let t=qO(e);n(t)}return t(),yE(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),r=WD();return n?typeof e==`function`?e(r):e:null}var XO={"image/png":`png`,"image/jpeg":`jpg`,"image/gif":`gif`,"image/webp":`webp`},ZO=10485760,QO=class extends Error{};function $O(e,t){return tk(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)})}function ek(e){return tk(e,{method:`GET`})}async function tk(e,t){let n;try{n=await fetch(e,{...t,signal:AbortSignal.timeout(Hu)})}catch(e){throw e instanceof DOMException&&e.name===`TimeoutError`?new QO(`The bridge did not answer within ${Hu/1e3} seconds. Try again.`):new QO(`Can't reach the bridge. Is the Claude Code session still running?`)}if(!n.ok){let e=(await n.json().catch(()=>null))?.error??n.statusText;throw n.status>=500?new QO(`The bridge hit an error: ${e}. Its log path was printed by \`grill start\`.`):new QO(e||`Request failed (${n.status}).`)}return await n.json()}var nk=e=>`/api/images/${e}`;function rk(e){return e in XO}function ik(e){if(!e)return[];let t=[...e.items].flatMap(e=>e.kind===`file`?[e.getAsFile()]:[]);return(t.length>0?t:[...e.files]).filter(e=>!!e&&rk(e.type))}function ak(e){return rk(e.type)?e.size>10485760?`${e.name||`That image`} is over ${ZO/1024/1024} MB.`:null:`${e.name||`That file`} is not a PNG, JPEG, GIF or WebP image.`}async function ok(e){let t=ak(e);if(t)throw new QO(t);let{id:n}=await $O(`/api/images`,{type:e.type,data:await sk(e)});return n}function sk(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).split(`,`,2)[1]??``),r.onerror=()=>n(new QO(`Couldn't read ${e.name||`the image`}.`)),r.readAsDataURL(e)})}var ck=(0,O.createContext)({attachments:new Map,numbers:new Map}),lk=()=>(0,O.useContext)(ck),uk=O.createContext(void 0);function dk(e){let t=O.useContext(uk);if(t===void 0&&!e)throw Error(er(50));return t}var fk={...Tl,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay},pk=class extends Yc{constructor(e,t,n){let r=new vl;super(mk(e,r,t,n),hk(r),fk)}setOpen=(e,t)=>{let{inlineRectCoordsRef:n}=this.context;fl(this,e,t,{onBeforeDispatch(){let r=t.event;e&&t.reason===`trigger-hover`&&t.trigger&&`clientX`in r&&`clientY`in r&&n.current?.element!==t.trigger&&Fc(n,t.trigger,r.clientX,r.clientY)}})}};function mk(e,t,n,r=!1){return{...yl(t,n,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:300,...e}}function hk(e){return{popupRef:O.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}function gk(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:i,actionsRef:a,handle:o,triggerId:s,defaultTriggerId:c=null,children:l}=e,u=ol((e,r)=>new pk({open:n,openProp:t,activeTriggerId:c,triggerIdProp:s},e,r));u.useControlledProp(`openProp`,t),u.useControlledProp(`triggerIdProp`,s),u.useContextCallback(`onOpenChange`,r),u.useContextCallback(`onOpenChangeComplete`,i);let d=u.useState(`open`),f=u.useState(`activeTriggerId`),p=u.useState(`mounted`),m=u.useState(`payload`);ml(u,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:h}=hl(d,u,()=>{u.context.inlineRectCoordsRef.current=void 0});U(()=>{d&&(f??u.set(`payload`,void 0))},[u,f,d]),O.useImperativeHandle(a,()=>({unmount:h,close:()=>u.setOpen(!1,la(ca))}),[h,u]);let g=d||p;return(0,V.jsxs)(uk.Provider,{value:u,children:[o&&(0,V.jsx)(sl,{handle:o,store:u}),g&&(0,V.jsx)(_k,{store:u}),typeof l==`function`?l({payload:m}):l]})}function _k({store:e}){let t=Ss(e.useState(`floatingRootContext`));return gl(e,{activeTriggerProps:t.reference,inactiveTriggerProps:t.trigger,popupProps:t.floating}),null}var vk=Gr(function(e){return dk(!0)?(0,V.jsx)(gk,{...e}):(0,V.jsx)(os,{children:(0,V.jsx)(gk,{...e})})}),yk=O.createContext(void 0);function bk(){let e=O.useContext(yk);if(e===void 0)throw Error(er(48));return e}var xk=O.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return dk().useState(`mounted`)||n?(0,V.jsx)(yk.Provider,{value:n,children:(0,V.jsx)(cu,{ref:t,...r})}):null}),Sk=Kr(function(e,t){let{render:n,className:r,delay:i,closeDelay:a,id:o,payload:s,handle:c,style:l,...u}=e,d=dk(!0),f=El(c)??d;if(!f)throw Error(er(89));let p=$l(o),m=f.useState(`isTriggerActive`,p),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`floatingRootContext`),_=f.context.inlineRectCoordsRef,v=O.useRef(null),y=i??600,b=a??300,{registerTrigger:x,isMountedByThisTrigger:S}=pl(p,v,f,{payload:s,closeDelay:b}),C=Rl(g,{mouseOnly:!0,move:!1,handleClose:Kl(),delay:()=>({open:y,close:b}),triggerElementRef:v,isActiveTrigger:m,isClosing:()=>f.select(`transitionStatus`)===`ending`}),w=Al(g,{delay:y}),T={open:h},E=f.useState(`triggerProps`,S),D=Pc(_,h);return wr(`a`,e,{state:T,ref:[t,x,v],props:[C,w.reference,E,D,{id:p},u],stateAttributesMapping:Ii})}),Ck=O.createContext(void 0);function wk(){let e=O.useContext(Ck);if(e===void 0)throw Error(er(49));return e}var Tk=O.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Wo,style:g,..._}=e,v=dk(),y=bk(),b=is(),x=v.useState(`open`),S=v.useState(`mounted`),C=v.useState(`floatingRootContext`),w=v.useState(`instantType`),T=v.useState(`transitionStatus`),E=v.useState(`adaptiveOrigin`),D=v.context.inlineRectCoordsRef,O=Du({anchor:i,floatingRootContext:C,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:y,nodeId:b,collisionAvoidance:h,adaptiveOrigin:E,inline:Ic(D)}),k=O.update;U(()=>{x&&S&&k()},[x,S,k]);let A=ju(e,{open:x,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:w},{styles:O.positionerStyles,transitionStatus:T,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!S,inert:!x});return(0,V.jsx)(Ck.Provider,{value:O,children:(0,V.jsx)(as,{id:b,children:A})})}),Ek=O.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,o=dk(),{side:s,align:c}=wk(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`closeDelay`);return rl({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Il(p,{closeDelay:m}),wr(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,o.useStateSetter(`popupElement`)],props:[il,f,Au(d),a],stateAttributesMapping:Ri})});function Dk({...e}){return(0,V.jsx)(vk,{"data-slot":`hover-card`,...e})}function Ok({...e}){return(0,V.jsx)(Sk,{"data-slot":`hover-card-trigger`,...e})}function kk({className:e,side:t=`bottom`,sideOffset:n=4,align:r=`center`,alignOffset:i=4,...a}){return(0,V.jsx)(xk,{"data-slot":`hover-card-portal`,children:(0,V.jsx)(Tk,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,V.jsx)(Ek,{"data-slot":`hover-card-content`,className:B(`z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}function Ak({className:e,...t}){return(0,V.jsx)(be,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:B(`size-4 animate-spin`,e),...t})}function jk({number:e,src:t,href:n,uploading:r,tone:i=`default`}){let a=`Image ${e}`;return(0,V.jsxs)(Dk,{children:[(0,V.jsxs)(Ok,{delay:150,closeDelay:100,render:n?(0,V.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`}):(0,V.jsx)(`span`,{}),className:B(`mx-px inline-flex items-center gap-1 rounded-md px-1.5 align-baseline text-[0.85em] leading-snug font-medium whitespace-nowrap select-none`,i===`inverse`?`bg-primary-foreground/20 text-primary-foreground hover:bg-primary-foreground/30`:`bg-primary/10 text-primary hover:bg-primary/15`,n?`cursor-zoom-in`:`cursor-default`),children:[r?(0,V.jsx)(Ak,{className:`size-3`,"aria-label":`Uploading`}):(0,V.jsx)(de,{className:`size-3`,"aria-hidden":!0}),a]}),(0,V.jsx)(kk,{side:`top`,className:`w-auto p-1.5`,children:(0,V.jsx)(`img`,{src:t,alt:a,className:`block max-h-72 max-w-80 rounded-md object-contain`})})]})}function Mk({attachment:e}){let{attachments:t,numbers:n}=lk(),r=t.get(e);return r?(0,V.jsx)(jk,{number:n.get(e)??0,src:r.id?nk(r.id):r.preview,uploading:!r.id}):null}var Nk=class e extends Wx{__attachment;static getType(){return`image-attachment`}static clone(t){return new e(t.__attachment,t.__key)}static importJSON(e){return Pk(e.attachment)}constructor(e,t){super(t),this.__attachment=e}exportJSON(){return{...super.exportJSON(),attachment:this.__attachment}}getAttachment(){return this.getLatest().__attachment}createDOM(){return document.createElement(`span`)}updateDOM(){return!1}isInline(){return!0}isKeyboardSelectable(){return!1}getTextContent(){return`[Image]`}decorate(){return(0,V.jsx)(Mk,{attachment:this.__attachment})}};function Pk(e){return new Nk(e)}function Fk(e){return e instanceof Nk}var Ik=e=>`[Image ${e}]`,Lk=/\[Image (\d+)\]/g,Rk={text:``,images:[],uploading:!1,empty:!0};function zk(e){let{initialText:t=``,initialImages:n=[]}=e,r={namespace:`image-text`,nodes:[Nk],editable:!e.disabled,theme:{paragraph:`m-0`},onError:e=>{throw e},editorState:()=>Wk(t,n)};return(0,V.jsx)(SE,{initialConfig:r,children:(0,V.jsx)(Bk,{...e})})}function Bk({ref:e,initialImages:t=[],placeholder:n,disabled:r=!1,invalid:i,className:a,editableProps:o,onChange:s,onSubmit:c,onError:l}){let[u]=km(),[d,f]=(0,O.useState)(()=>Vk(t)),[p,m]=(0,O.useState)(()=>u.getEditorState().read(Uk)),h=(0,O.useRef)(new Set),{draft:g,numbers:_}=(0,O.useMemo)(()=>Gk(p,d),[p,d]),v=(0,O.useRef)({insertFiles:(e,t)=>{},onSubmit:c,onChange:s,attachments:d});(0,O.useEffect)(()=>{v.current={insertFiles:b,onSubmit:c,onChange:s,attachments:d}}),(0,O.useEffect)(()=>v.current.onChange(g),[g]),(0,O.useEffect)(()=>{let e=()=>{let e=u.getEditorState().read(Uk);m(t=>Kk(t,e)?t:e)};return e(),u.registerUpdateListener(e)},[u]),(0,O.useEffect)(()=>u.setEditable(!r),[u,r]),(0,O.useEffect)(()=>{let e=h.current;return()=>{for(let t of e)URL.revokeObjectURL(t);e.clear()}},[]);let y=e=>{f(t=>{let n=new Map(t);return n.delete(e),n}),u.update(()=>{for(let t of Hk())t.getAttachment()===e&&t.remove()})},b=(e,t)=>{let n=8-_.size;e.length>n&&l(`Up to 8 images each.`);let r=[];for(let t of e.slice(0,Math.max(n,0))){let e=ak(t);if(e){l(e);continue}let n=crypto.randomUUID(),i=URL.createObjectURL(t);h.current.add(i),r.push(n),f(e=>new Map(e).set(n,{preview:i})),ok(t).then(e=>f(t=>t.has(n)?new Map(t).set(n,{id:e,preview:i}):t),e=>{l(e instanceof Error?e.message:String(e)),y(n)})}r.length!==0&&(u.update(()=>{if(t){let e=Bb();e.applyDOMRange(t),hC(e)}J(Y())||pC().selectEnd(),Qb(r.flatMap(e=>[Pk(e),nb(` `)]))}),u.focus())},x=e=>{for(let e of h.current)URL.revokeObjectURL(e);h.current.clear(),f(e)},S=(e,t)=>{x(Vk(t)),u.update(()=>Wk(e,t)),u.dispatchCommand(mv,void 0)};return(0,O.useImperativeHandle)(e,()=>({insertFiles:e=>b(e),clear:()=>S(``,[]),reset:S,focus:()=>u.focus()})),(0,O.useEffect)(()=>yE(u.registerCommand(ev,e=>{if(!e||e.isComposing)return!1;if(e.preventDefault(),e.shiftKey||e.metaKey||e.ctrlKey)return u.dispatchCommand(L_,!1);let{attachments:t,onSubmit:n}=v.current;return n(Gk(Uk(),t).draft),!0},3),u.registerCommand(B_,e=>{let t=`clipboardData`in e?ik(e.clipboardData):[];return t.length!==0&&(e.preventDefault(),v.current.insertFiles(t),!0)},3),u.registerCommand(ov,e=>{let t=ik(e.dataTransfer);return t.length!==0&&(e.preventDefault(),v.current.insertFiles(t,qk(e.clientX,e.clientY)),!0)},3)),[u]),(0,V.jsx)(ck.Provider,{value:{attachments:d,numbers:_},children:(0,V.jsxs)(`div`,{className:`relative w-full min-w-0 flex-1`,children:[(0,V.jsx)(JO,{contentEditable:(0,V.jsx)(jE,{...o,"data-slot":`input-group-control`,"aria-invalid":i||void 0,"aria-disabled":r||void 0,"aria-placeholder":n,placeholder:(0,V.jsx)(`div`,{className:`pointer-events-none absolute top-2 left-2.5 text-base text-muted-foreground select-none md:text-sm`,children:n}),className:B(`w-full overflow-y-auto px-2.5 py-2 text-base break-words whitespace-pre-wrap outline-none md:text-sm`,r&&`cursor-not-allowed`,a)}),ErrorBoundary:FE}),(0,V.jsx)(BD,{})]})})}function Vk(e){return new Map(e.map(e=>[e,{id:e,preview:nk(e)}]))}function Hk(){return pC().getChildren().flatMap(e=>X(e)?e.getChildren().filter(Fk):[])}function Uk(){let e=[];return pC().getChildren().forEach((t,n)=>{if(n>0&&e.push(`
20
+ `),X(t))for(let n of t.getChildren())Fk(n)?e.push({attachment:n.getAttachment()}):rS(n)?e.push(`
21
+ `):q(n)&&e.push(n.getTextContent())}),e}function Wk(e,t){let n=pC();n.clear();let r=DS(),i=new Set;e.split(Lk).forEach((e,n)=>{if(n%2==1){let n=t[Number(e)-1];n?(i.add(n),r.append(Pk(n))):r.append(nb(Ik(Number(e))));return}e.split(`
22
+ `).forEach((e,t)=>{t>0&&r.append(nS()),e&&r.append(nb(e))})});for(let e of t)i.has(e)||r.append(nb(` `),Pk(e));n.append(r)}function Gk(e,t){let n=new Map,r=[],i=``,a=!1;for(let o of e){if(typeof o==`string`){i+=o;continue}let e=n.get(o.attachment);if(e===void 0){e=n.size+1,n.set(o.attachment,e);let i=t.get(o.attachment)?.id;i?r.push(i):a=!0}i+=Ik(e)}return{draft:{text:i,images:r,uploading:a,empty:i.trim()===``},numbers:n}}function Kk(e,t){return e.length===t.length&&e.every((e,n)=>{let r=t[n];return typeof e==`string`?e===r:typeof r!=`string`&&r?.attachment===e.attachment})}function qk(e,t){if(document.caretPositionFromPoint){let n=document.caretPositionFromPoint(e,t);if(!n)return;let r=document.createRange();return r.setStart(n.offsetNode,n.offset),r}return document.caretRangeFromPoint?.(e,t)??void 0}var Jk=Ir(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function Yk({className:e,variant:t=`default`,render:n,...r}){return Mf({defaultTagName:`span`,props:zn({className:B(Jk({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}function Xk({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`empty`,className:B(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function Zk({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`empty-header`,className:B(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var Qk=Ir(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function $k({className:e,variant:t=`default`,...n}){return(0,V.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:B(Qk({variant:t,className:e})),...n})}function eA({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`empty-title`,className:B(`font-heading text-sm font-medium tracking-tight`,e),...t})}function tA({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`empty-description`,className:B(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function nA({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`empty-content`,className:B(`flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance`,e),...t})}function rA({className:e,...t}){return(0,V.jsx)(`textarea`,{"data-slot":`textarea`,className:B(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function iA({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:B(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var aA=Ir(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function oA({className:e,align:t=`inline-start`,...n}){return(0,V.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:B(aA({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var sA=Ir(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function cA({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,V.jsx)(Rr,{type:t,"data-size":r,variant:n,className:B(sA({size:r}),e),...i})}function lA(e){let[t,n]=(0,O.useState)(!1),[r,i]=(0,O.useState)(null);return{run:async(...t)=>{n(!0),i(null);try{return await e(...t),!0}catch(e){return i(e instanceof Error?e.message:String(e)),!1}finally{n(!1)}},pending:t,error:r,clearError:()=>i(null)}}var uA=e=>!!e.dataTransfer?.types.includes(`Files`);function dA({disabled:e=!1,onFiles:t,onReject:n}){let[r,i]=(0,O.useState)(!1);(0,O.useEffect)(()=>{let e=e=>{!e.defaultPrevented&&uA(e)&&(e.preventDefault(),e.type===`dragover`&&(e.dataTransfer.dropEffect=`none`))};return window.addEventListener(`dragover`,e),window.addEventListener(`drop`,e),()=>{window.removeEventListener(`dragover`,e),window.removeEventListener(`drop`,e)}},[]);let a=t=>!e&&uA(t);return{dragging:r,dropZone:{onDragEnter(e){a(e)&&(e.preventDefault(),i(!0))},onDragOver(e){a(e)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)},onDragLeave(e){e.currentTarget.contains(e.relatedTarget)||i(!1)},onDrop(e){if(i(!1),e.defaultPrevented||!a(e))return;e.preventDefault();let r=ik(e.dataTransfer);r.length>0?t(r):n(`Only PNG, JPEG, GIF and WebP images can be attached.`)}}}}function fA(e,t){return e.ended?`ended`:t.status===`open`?null:`offline`}var pA={ended:`Session has ended.`,offline:`Bridge unreachable. Reconnecting…`};function mA(e){return[...e].filter(e=>e.status!==`dropped`)}function hA(e,t){return t.flatMap(t=>e.questions[t]??[])}function gA(e){let t=e.rounds.at(-1)?.number??0;return e.rounds.filter(e=>e.number<t).flatMap(t=>mA(hA(e,t.questionIds))).filter(e=>e.status===`answered`&&!e.answer?.sent)}function _A(e){return e.options.filter(t=>e.answer?.optionIds.includes(t.id)).map(e=>e.label)}function vA(e){let t=e.answer?.text?.replace(/[*_`#>]/g,``);return[_A(e).join(` + `),t].filter(Boolean).join(` — `)}function yA(e){return e.chat.filter(e=>e.role===`claude`).length}function bA(e){return e.chat.at(-1)?.role===`user`}var xA=(e,t)=>$O(`/api/questions/${e}/chat`,t);function SA({text:e,images:t=[],tone:n}){let r=new Set,i=e.split(Lk).map((e,i)=>{if(i%2==0)return(0,V.jsx)(O.Fragment,{children:e},i);let a=Number(e),o=t[a-1];return o?(r.add(a),(0,V.jsx)(jk,{number:a,src:nk(o),href:nk(o),tone:n},i)):(0,V.jsx)(O.Fragment,{children:`[Image ${e}]`},i)}),a=t.flatMap((e,t)=>r.has(t+1)?[]:[{id:e,number:t+1}]);return(0,V.jsxs)(V.Fragment,{children:[i,a.map(({id:e,number:t})=>(0,V.jsxs)(O.Fragment,{children:[` `,(0,V.jsx)(jk,{number:t,src:nk(e),href:nk(e),tone:n})]},e))]})}function CA(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var wA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,TA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,EA={};function DA(e,t){return((t||EA).jsx?TA:wA).test(e)}var OA=/[ \t\n\f\r]/g;function kA(e){return typeof e==`object`?e.type===`text`&&AA(e.value):AA(e)}function AA(e){return e.replace(OA,``)===``}var jA=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};jA.prototype.normal={},jA.prototype.property={},jA.prototype.space=void 0;function MA(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new jA(n,r,t)}function NA(e){return e.toLowerCase()}var PA=class{constructor(e,t){this.attribute=t,this.property=e}};PA.prototype.attribute=``,PA.prototype.booleanish=!1,PA.prototype.boolean=!1,PA.prototype.commaOrSpaceSeparated=!1,PA.prototype.commaSeparated=!1,PA.prototype.defined=!1,PA.prototype.mustUseProperty=!1,PA.prototype.number=!1,PA.prototype.overloadedBoolean=!1,PA.prototype.property=``,PA.prototype.spaceSeparated=!1,PA.prototype.space=void 0;var FA=s({boolean:()=>LA,booleanish:()=>RA,commaOrSpaceSeparated:()=>HA,commaSeparated:()=>VA,number:()=>Q,overloadedBoolean:()=>zA,spaceSeparated:()=>BA}),IA=0,LA=UA(),RA=UA(),zA=UA(),Q=UA(),BA=UA(),VA=UA(),HA=UA();function UA(){return 2**++IA}var WA=Object.keys(FA),GA=class extends PA{constructor(e,t,n,r){let i=-1;if(super(e,t),KA(this,`space`,r),typeof n==`number`)for(;++i<WA.length;){let e=WA[i];KA(this,WA[i],(n&FA[e])===FA[e])}}};GA.prototype.defined=!0;function KA(e,t,n){n&&(e[t]=n)}function qA(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new GA(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[NA(r)]=r,n[NA(a.attribute)]=r}return new jA(t,n,e.space)}var JA=qA({properties:{ariaActiveDescendant:null,ariaAtomic:RA,ariaAutoComplete:null,ariaBusy:RA,ariaChecked:RA,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:BA,ariaCurrent:null,ariaDescribedBy:BA,ariaDetails:null,ariaDisabled:RA,ariaDropEffect:BA,ariaErrorMessage:null,ariaExpanded:RA,ariaFlowTo:BA,ariaGrabbed:RA,ariaHasPopup:null,ariaHidden:RA,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:BA,ariaLevel:Q,ariaLive:null,ariaModal:RA,ariaMultiLine:RA,ariaMultiSelectable:RA,ariaOrientation:null,ariaOwns:BA,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:RA,ariaReadOnly:RA,ariaRelevant:null,ariaRequired:RA,ariaRoleDescription:BA,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:RA,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function YA(e,t){return t in e?e[t]:t}function XA(e,t){return YA(e,t.toLowerCase())}var ZA=qA({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:VA,acceptCharset:BA,accessKey:BA,action:null,allow:null,allowFullScreen:LA,allowPaymentRequest:LA,allowUserMedia:LA,alpha:LA,alt:null,as:null,async:LA,autoCapitalize:null,autoComplete:BA,autoFocus:LA,autoPlay:LA,blocking:BA,capture:null,charSet:null,checked:LA,cite:null,className:BA,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:RA,controls:LA,controlsList:BA,coords:Q|VA,crossOrigin:null,data:null,dateTime:null,decoding:null,default:LA,defer:LA,dir:null,dirName:null,disabled:LA,download:zA,draggable:RA,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:LA,formTarget:null,headers:BA,height:Q,hidden:zA,high:Q,href:null,hrefLang:null,htmlFor:BA,httpEquiv:BA,id:null,imageSizes:null,imageSrcSet:null,inert:LA,inputMode:null,integrity:null,is:null,isMap:LA,itemId:null,itemProp:BA,itemRef:BA,itemScope:LA,itemType:BA,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:LA,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:LA,muted:LA,name:null,nonce:null,noModule:LA,noValidate:LA,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:LA,optimum:Q,pattern:null,ping:BA,placeholder:null,playsInline:LA,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:LA,referrerPolicy:null,rel:BA,required:LA,reversed:LA,rows:Q,rowSpan:Q,sandbox:BA,scope:null,scoped:LA,seamless:LA,selected:LA,shadowRootClonable:LA,shadowRootCustomElementRegistry:LA,shadowRootDelegatesFocus:LA,shadowRootMode:null,shadowRootSerializable:LA,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:RA,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:LA,useMap:null,value:RA,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:BA,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:LA,declare:LA,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:LA,noHref:LA,noShade:LA,noWrap:LA,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:RA,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:LA,disablePictureInPicture:LA,disableRemotePlayback:LA,exportParts:VA,part:BA,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:XA}),QA=qA({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:HA,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:BA,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:LA,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:VA,g2:VA,glyphName:VA,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:HA,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:BA,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:HA,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:HA,rev:HA,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:HA,requiredFeatures:HA,requiredFonts:HA,requiredFormats:HA,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:HA,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:HA,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:HA,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:YA}),$A=qA({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()}}),ej=qA({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:XA}),tj=qA({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),nj={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`},rj=/[A-Z]/g,ij=/-[a-z]/g,aj=/^data[-\w.:]+$/i;function oj(e,t){let n=NA(t),r=t,i=PA;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&aj.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ij,cj);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ij.test(e)){let n=e.replace(rj,sj);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=GA}return new i(r,t)}function sj(e){return`-`+e.toLowerCase()}function cj(e){return e.charAt(1).toUpperCase()}var lj=MA([JA,ZA,$A,ej,tj],`html`),uj=MA([JA,QA,$A,ej,tj],`svg`);function dj(e){return e.join(` `).trim()}var fj=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
23
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),pj=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(fj());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),mj=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),hj=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(pj()),r=mj();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),gj=vj(`end`),_j=vj(`start`);function vj(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function yj(e){let t=_j(e),n=gj(e);if(t&&n)return{start:t,end:n}}function bj(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Sj(e.position):`start`in e||`end`in e?Sj(e):`line`in e||`column`in e?xj(e):``}function xj(e){return Cj(e&&e.line)+`:`+Cj(e&&e.column)}function Sj(e){return xj(e&&e.start)+`-`+xj(e&&e.end)}function Cj(e){return e&&typeof e==`number`?e:1}var wj=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=bj(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};wj.prototype.file=``,wj.prototype.name=``,wj.prototype.reason=``,wj.prototype.message=``,wj.prototype.stack=``,wj.prototype.column=void 0,wj.prototype.line=void 0,wj.prototype.ancestors=void 0,wj.prototype.cause=void 0,wj.prototype.fatal=void 0,wj.prototype.place=void 0,wj.prototype.ruleId=void 0,wj.prototype.source=void 0;var Tj=l(hj(),1),Ej={}.hasOwnProperty,Dj=new Map,Oj=/[A-Z]/g,kj=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Aj=new Set([`td`,`th`]),jj=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Mj(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Uj(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Hj(n,t.jsx,t.jsxs)}let i={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`?uj:lj,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Nj(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Nj(e,t,n){if(t.type===`element`)return Pj(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Fj(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Lj(e,t,n);if(t.type===`mdxjsEsm`)return Ij(e,t);if(t.type===`root`)return Rj(e,t,n);if(t.type===`text`)return zj(e,t)}function Pj(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=uj,e.schema=i),e.ancestors.push(t);let a=Yj(e,t.tagName,!1),o=Wj(e,t),s=Kj(e,t);return kj.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!kA(e)})),Bj(e,o,a,t),Vj(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Fj(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Xj(e,t.position)}function Ij(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xj(e,t.position)}function Lj(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=uj,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Yj(e,t.name,!0),o=Gj(e,t),s=Kj(e,t);return Bj(e,o,a,t),Vj(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Rj(e,t,n){let r={};return Vj(r,Kj(e,t)),e.create(t,e.Fragment,r,n)}function zj(e,t){return t.value}function Bj(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vj(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Hj(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Uj(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=_j(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Wj(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ej.call(t.properties,i)){let a=qj(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Aj.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Gj(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Xj(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Xj(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Kj(e,t){let n=[],r=-1,i=e.passKeys?new Map:Dj;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Nj(e,a,o);s!==void 0&&n.push(s)}return n}function qj(e,t,n){let r=oj(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?CA(n):dj(n)),r.property===`style`){let t=typeof n==`object`?n:Jj(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Zj(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?nj[r.property]||r.property:r.attribute,n]}}function Jj(e,t){try{return(0,Tj.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new wj("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=jj+`#cannot-parse-style-attribute`,r}}function Yj(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=DA(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=DA(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ej.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xj(e)}function Xj(e,t){let n=new wj("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=jj+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Zj(e){let t={},n;for(n in e)Ej.call(e,n)&&(t[Qj(n)]=e[n]);return t}function Qj(e){let t=e.replace(Oj,$j);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function $j(e){return`-`+e.toLowerCase()}var eM={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},tM={};function nM(e,t){let n=t||tM;return rM(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function rM(e,t,n){if(aM(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 iM(e.children,t,n)}return Array.isArray(e)?iM(e,t,n):``}function iM(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=rM(e[i],t,n);return r.join(``)}function aM(e){return!!(e&&typeof e==`object`)}var oM=document.createElement(`i`);function sM(e){let t=`&`+e+`;`;oM.innerHTML=t;let n=oM.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function cM(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function lM(e,t){return e.length>0?(cM(e,e.length,0,t),e):t}var uM={}.hasOwnProperty;function dM(e){let t={},n=-1;for(;++n<e.length;)fM(t,e[n]);return t}function fM(e,t){let n;for(n in t){let r=(uM.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){uM.call(r,a)||(r[a]=[]);let e=i[a];pM(r[a],Array.isArray(e)?e:e?[e]:[])}}}function pM(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);cM(e,0,0,r)}function mM(e,t){let 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)}function hM(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var gM=DM(/[A-Za-z]/),_M=DM(/[\dA-Za-z]/),vM=DM(/[#-'*+\--9=?A-Z^-~]/);function yM(e){return e!==null&&(e<32||e===127)}var bM=DM(/\d/),xM=DM(/[\dA-Fa-f]/),SM=DM(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function CM(e){return e!==null&&(e<0||e===32)}function wM(e){return e===-2||e===-1||e===32}var TM=DM(/\p{P}|\p{S}/u),EM=DM(/\s/);function DM(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function OM(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&_M(e.charCodeAt(n+1))&&_M(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function kM(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return wM(r)?(e.enter(n),s(r)):t(r)}function s(r){return wM(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var AM={tokenize:jM};function jM(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),kM(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var MM={tokenize:PM},NM={tokenize:FM};function PM(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return cM(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(NM,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(NM,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;cM(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function FM(e,t,n){return kM(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function IM(e){if(e===null||CM(e)||EM(e))return 1;if(TM(e))return 2}function LM(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var RM={name:`attention`,resolveAll:zM,tokenize:BM};function zM(e,t){let n=-1,r,i,a,o,s,c,l,u;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;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};VM(d,-c),VM(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=lM(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=lM(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=lM(l,LM(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=lM(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=lM(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,cM(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function BM(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=IM(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=IM(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function VM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var HM={name:`autolink`,tokenize:UM};function UM(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return gM(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||_M(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||_M(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||yM(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):vM(t)?(e.consume(t),l):n(t)}function u(e){return _M(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||_M(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var WM={partial:!0,tokenize:GM};function GM(e,t,n){return r;function r(t){return wM(t)?kM(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var KM={continuation:{tokenize:JM},exit:YM,name:`blockQuote`,tokenize:qM};function qM(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return wM(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function JM(e,t,n){let r=this;return i;function i(t){return wM(t)?kM(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(KM,t,n)(r)}}function YM(e){e.exit(`blockQuote`)}var XM={name:`characterEscape`,tokenize:ZM};function ZM(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return SM(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var QM={name:`characterReference`,tokenize:$M};function $M(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=_M,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=xM,u):(e.enter(`characterReferenceValue`),a=7,o=bM,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===_M&&!sM(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var eN={partial:!0,tokenize:rN},tN={concrete:!0,name:`codeFenced`,tokenize:nN};function nN(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),wM(t)?kM(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(eN,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):wM(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),kM(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&wM(t)?kM(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(eN,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),wM(t)?kM(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),wM(t)?kM(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function rN(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var iN={name:`codeIndented`,tokenize:oN},aN={partial:!0,tokenize:sN};function oN(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),kM(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(aN,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function sN(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):kM(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var cN={name:`codeText`,previous:uN,resolve:lN,tokenize:dN};function lN(e){let t=e.length-4,n=3,r,i;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;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function uN(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function dN(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var fN=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&pN(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),pN(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pN(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);pN(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);pN(this.left,t.reverse())}}}};function pN(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 mN(e){let t={},n=-1,r,i,a,o,s,c,l,u=new fN(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,hN(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return cM(e,0,1/0,u.slice(0)),!l}function hN(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var gN={resolve:vN,tokenize:yN},_N={partial:!0,tokenize:bN};function vN(e){return mN(e),e}function yN(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(_N,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function bN(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),kM(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function xN(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||yM(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||CM(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||yM(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function SN(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!wM(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function CN(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),kM(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function wN(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):wM(i)?kM(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var TN={name:`definition`,tokenize:DN},EN={partial:!0,tokenize:ON};function DN(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return SN.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=hM(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return CM(t)?wN(e,l)(t):l(t)}function l(t){return xN(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(EN,d,d)(t)}function d(t){return wM(t)?kM(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ON(e,t,n){return r;function r(t){return CM(t)?wN(e,i)(t):n(t)}function i(t){return CN(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return wM(t)?kM(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var kN={name:`hardBreakEscape`,tokenize:AN};function AN(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var jN={name:`headingAtx`,resolve:MN,tokenize:NN};function MN(e,t){let n=e.length-2,r=3,i,a;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&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},cM(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function NN(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||CM(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):wM(n)?kM(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||CM(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var PN=`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`.split(`.`),FN=[`pre`,`script`,`style`,`textarea`],IN={concrete:!0,name:`htmlFlow`,resolveTo:zN,tokenize:BN},LN={partial:!0,tokenize:HN},RN={partial:!0,tokenize:VN};function zN(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 BN(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):gM(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):gM(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return gM(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||CM(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&FN.includes(l)?(i=1,r.interrupt?t(s):O(s)):PN.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||_M(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return wM(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||gM(t)?(e.consume(t),b):wM(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||_M(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):wM(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):wM(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||CM(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||wM(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):wM(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),ee):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(LN,te,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(RN,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return FN.includes(n)?(e.consume(t),ee):O(t)}return gM(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),ee):t===45&&i===2?(e.consume(t),I):O(t)}function ee(t){return t===null||$(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),ee)}function te(n){return e.exit(`htmlFlow`),t(n)}}function VN(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function HN(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(WM,t,n)}}var UN={name:`htmlText`,tokenize:WN};function WN(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):gM(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):gM(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):$(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return gM(t)?(e.consume(t),S):n(t)}function S(t){return t===45||_M(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,N(t)):wM(t)?(e.consume(t),C):M(t)}function w(t){return t===45||_M(t)?(e.consume(t),w):t===47||t===62||CM(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||gM(t)?(e.consume(t),E):$(t)?(o=T,N(t)):wM(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||_M(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,N(t)):wM(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,N(t)):wM(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):$(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||CM(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||CM(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return wM(t)?kM(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var GN={name:`labelEnd`,resolveAll:YN,resolveTo:XN,tokenize:ZN},KN={tokenize:QN},qN={tokenize:$N},JN={tokenize:eP};function YN(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&cM(e,0,e.length,n),e}function XN(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=lM(s,e.slice(a+1,a+r+3)),s=lM(s,[[`enter`,u,t]]),s=lM(s,LM(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=lM(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=lM(s,e.slice(o+1)),s=lM(s,[[`exit`,c,t]]),cM(e,a,e.length,s),e}function ZN(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(hM(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(KN,u,o?u:d)(t):t===91?e.attempt(qN,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(JN,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function QN(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return CM(t)?wN(e,a)(t):a(t)}function a(t){return t===41?u(t):xN(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return CM(t)?wN(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?CN(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return CM(t)?wN(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function $N(e,t,n){let r=this;return i;function i(t){return SN.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(hM(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function eP(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var tP={name:`labelStartImage`,resolveAll:GN.resolveAll,tokenize:nP};function nP(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var rP={name:`labelStartLink`,resolveAll:GN.resolveAll,tokenize:iP};function iP(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var aP={name:`lineEnding`,tokenize:oP};function oP(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),kM(e,t,`linePrefix`)}}var sP={name:`thematicBreak`,tokenize:cP};function cP(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),wM(t)?kM(e,s,`whitespace`)(t):s(t))}}var lP={continuation:{tokenize:pP},exit:hP,name:`list`,tokenize:fP},uP={partial:!0,tokenize:gP},dP={partial:!0,tokenize:mP};function fP(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:bM(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(sP,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return bM(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(WM,r.interrupt?n:u,e.attempt(uP,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return wM(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function pP(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(WM,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kM(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!wM(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dP,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,kM(e,e.attempt(lP,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function mP(e,t,n){let r=this;return kM(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function hP(e){e.exit(this.containerState.type)}function gP(e,t,n){let r=this;return kM(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!wM(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var _P={name:`setextUnderline`,resolveTo:vP,tokenize:yP};function vP(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function yP(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),wM(t)?kM(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var bP={tokenize:xP};function xP(e){let t=this,n=e.attempt(WM,r,e.attempt(this.parser.constructs.flowInitial,i,kM(e,e.attempt(this.parser.constructs.flow,i,e.attempt(gN,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var SP={resolveAll:EP()},CP=TP(`string`),wP=TP(`text`);function TP(e){return{resolveAll:EP(e===`text`?DP:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function EP(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function DP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var OP=s({attentionMarkers:()=>IP,contentInitial:()=>AP,disable:()=>LP,document:()=>kP,flow:()=>MP,flowInitial:()=>jP,insideSpan:()=>FP,string:()=>NP,text:()=>PP}),kP={42:lP,43:lP,45:lP,48:lP,49:lP,50:lP,51:lP,52:lP,53:lP,54:lP,55:lP,56:lP,57:lP,62:KM},AP={91:TN},jP={[-2]:iN,[-1]:iN,32:iN},MP={35:jN,42:sP,45:[_P,sP],60:IN,61:_P,95:sP,96:tN,126:tN},NP={38:QM,92:XM},PP={[-5]:aP,[-4]:aP,[-3]:aP,33:tP,38:QM,42:RM,60:[HM,UN],91:rP,92:[kN,XM],93:GN,95:RM,96:cN},FP={null:[RM,SP]},IP={null:[42,95]},LP={null:[]};function RP(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=lM(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=LM(a,l.events,l),l.events):[]}function f(e,t){return BP(p(e),t)}function p(e){return zP(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&cM(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function zP(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function BP(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
24
+ `;break;case-3:o=`\r
25
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function VP(e){let t={constructs:dM([OP,...(e||{}).extensions||[]]),content:n(AM),defined:[],document:n(MM),flow:n(bP),lazy:{},string:n(CP),text:n(wP)};return t;function n(e){return n;function n(n){return RP(t,e,n)}}}function HP(e){for(;!mN(e););return e}var UP=/[\0\t\n\r]/g;function WP(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(UP.lastIndex=u,c=UP.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var GP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function KP(e){return e.replace(GP,qP)}function qP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return mM(n.slice(t?2:1),t?16:10)}return sM(n)||e}var JP={}.hasOwnProperty;function YP(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),XP(n)(HP(VP(n).document().write(WP()(e,t,!0))))}function XP(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(he),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(z),blockQuote:a(se),characterEscape:T,characterReference:T,codeFenced:a(ce),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ce,o),codeText:a(le,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(de),hardBreakEscape:a(fe),hardBreakTrailing:a(fe),htmlFlow:a(pe,o),htmlFlowData:T,htmlText:a(pe,o),htmlTextData:T,image:a(me),label:o,link:a(he),listItem:a(_e),listItemValue:f,listOrdered:a(ge,d),listUnordered:a(ge),paragraph:a(ve),reference:L,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(z),strong:a(ye),thematicBreak:a(xe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:R,autolinkProtocol:oe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ie,characterReference:ae,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ne,resourceDestinationString:I,resourceTitleString:ee,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};QP(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];JP.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||eF).call(a,void 0,e[0])}for(r.position={start:ZP(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ZP(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ZP(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||eF).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+bj({start:e.start,end:e.end})+`): it’s not open`);n.position.end=ZP(e.end)}function u(){return nM(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hM(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=be(),n.position={start:ZP(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ZP(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=ZP(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=KP(t),n.identifier=hM(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function L(){this.data.referenceType=`collapsed`}function ne(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hM(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function re(e){this.data.characterReferenceType=e.type}function ie(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=mM(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=sM(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=ZP(e.end)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function R(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function se(){return{type:`blockquote`,children:[]}}function ce(){return{type:`code`,lang:null,meta:null,value:``}}function le(){return{type:`inlineCode`,value:``}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function de(){return{type:`emphasis`,children:[]}}function z(){return{type:`heading`,depth:0,children:[]}}function fe(){return{type:`break`}}function pe(){return{type:`html`,value:``}}function me(){return{type:`image`,title:null,url:``,alt:null}}function he(){return{type:`link`,title:null,url:``,children:[]}}function ge(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function _e(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ve(){return{type:`paragraph`,children:[]}}function ye(){return{type:`strong`,children:[]}}function be(){return{type:`text`,value:``}}function xe(){return{type:`thematicBreak`}}}function ZP(e){return{line:e.line,column:e.column,offset:e.offset}}function QP(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?QP(e,r):$P(e,r)}}function $P(e,t){let n;for(n in t)if(JP.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function eF(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+bj({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bj({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+bj({start:t.start,end:t.end})+`) is still open`)}function tF(e){let t=this;t.parser=n;function n(n){return YP(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function nF(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function rF(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
26
+ `}]}function iF(e,t){let n=t.value?t.value+`
27
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function aF(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oF(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sF(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=OM(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function cF(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lF(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function uF(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function dF(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uF(e,t);let i={src:OM(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function fF(e,t){let n={src:OM(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function pF(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function mF(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uF(e,t);let i={href:OM(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hF(e,t){let n={href:OM(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gF(e,t,n){let r=e.all(t),i=n?_F(n):vF(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
28
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
29
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function _F(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=vF(n[r])}return t}function vF(e){return e.spread??e.children.length>1}function yF(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function bF(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xF(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function SF(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CF(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=_j(t.children[1]),o=gj(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function wF(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function TF(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var EF=9,DF=32;function OF(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(kF(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(kF(t.slice(i),i>0,!1)),a.join(``)}function kF(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===EF||t===DF;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===EF||t===DF;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function AF(e,t){let n={type:`text`,value:OF(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function jF(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var MF={blockquote:nF,break:rF,code:iF,delete:aF,emphasis:oF,footnoteReference:sF,heading:cF,html:lF,imageReference:dF,image:fF,inlineCode:pF,linkReference:mF,link:hF,listItem:gF,list:yF,paragraph:bF,root:xF,strong:SF,table:CF,tableCell:TF,tableRow:wF,text:AF,thematicBreak:jF,toml:NF,yaml:NF,definition:NF,footnoteDefinition:NF};function NF(){}var{defineProperty:PF}=Object,FF=typeof self==`object`?self:globalThis,IF=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new FF[e](t)},LF=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?PF(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof FF[e]==`function`?IF(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(IF(a,o),i)};return r},RF=e=>LF(new Map,e)(0),zF=``,{toString:BF}={},{keys:VF,is:HF}=Object,UF=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=BF.call(e).slice(8,-1);switch(n){case`Array`:return[1,zF];case`Object`:return[2,zF];case`Date`:return[3,zF];case`RegExp`:return[4,zF];case`Map`:return[5,zF];case`Set`:return[6,zF];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},WF=([e,t])=>e===0&&(t===`function`||t===`symbol`),GF=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=UF(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&HF(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of VF(o))(e||!WF(UF(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?zF:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(WF(UF(n))||WF(UF(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!WF(UF(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},KF=(e,{json:t,lossy:n}={})=>{let r=[];return GF(!(t||n),!!t,new Map,r)(e),r},qF=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?RF(KF(e,t)):structuredClone(e):(e,t)=>RF(KF(e,t));function JF(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function YF(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function XF(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||JF,r=e.options.footnoteBackLabel||YF,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=OM(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...qF(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
30
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
31
+ `}]}}var ZF=(function(e){if(e==null)return nI;if(typeof e==`function`)return tI(e);if(typeof e==`object`)return Array.isArray(e)?QF(e):$F(e);if(typeof e==`string`)return eI(e);throw Error(`Expected function, string, or object as test`)});function QF(e){let t=[],n=-1;for(;++n<e.length;)t[n]=ZF(e[n]);return tI(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function $F(e){let t=e;return tI(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function eI(e){return tI(t);function t(t){return t&&t.type===e}}function tI(e){return t;function t(t,n,r){return!!(rI(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function nI(){return!0}function rI(e){return typeof e==`object`&&!!e&&`type`in e}function iI(e){return e}var aI=[];function oI(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=ZF(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+iI(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=aI,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=sI(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function sI(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?aI:[e]}function cI(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),oI(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var lI={}.hasOwnProperty,uI={};function dI(e,t){let n=t||uI,r=new Map,i=new Map,a={all:s,applyData:pI,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...MF,...n.handlers},one:o,options:n,patch:fI,wrap:hI};return cI(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(lI.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=qF(n);return r.children=a.all(e),r}return qF(e)}return(a.options.unknownHandler||mI)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=gI(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=gI(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function fI(e,t){e.position&&(t.position=yj(e))}function pI(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,qF(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function mI(e,t){let n=t.data||{},r=`value`in t&&!(lI.call(n,`hProperties`)||lI.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 hI(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
32
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
33
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
34
+ `}),n}function gI(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function _I(e,t){let n=dI(e,t),r=n.one(e,void 0),i=XF(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
35
+ `},i)),a}function vI(e,t){return e&&`run`in e?async function(n,r){let i=_I(n,{file:r,...t});await e.run(i,r)}:function(n,r){return _I(n,{file:r,...e||t})}}function yI(e){if(e)throw e}var bI=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function xI(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function SI(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?CI(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function CI(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var wI={basename:TI,dirname:EI,extname:DI,join:OI,sep:`/`};function TI(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);jI(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function EI(e){if(jI(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||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function DI(e){jI(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function OI(...e){let t=-1,n;for(;++t<e.length;)jI(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:kI(n)}function kI(e){jI(e);let t=e.codePointAt(0)===47,n=AI(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function AI(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function jI(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var MI={cwd:NI};function NI(){return`/`}function PI(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function FI(e){if(typeof e==`string`)e=new URL(e);else if(!PI(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return II(e)}function II(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var LI=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],RI=class{constructor(e){let t;t=e?PI(e)?{path:e}:typeof e==`string`||HI(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:MI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<LI.length;){let e=LI[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)LI.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?wI.basename(this.path):void 0}set basename(e){BI(e,`basename`),zI(e,`basename`),this.path=wI.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?wI.dirname(this.path):void 0}set dirname(e){VI(this.basename,`dirname`),this.path=wI.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?wI.extname(this.path):void 0}set extname(e){if(zI(e,`extname`),VI(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=wI.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){PI(e)&&(e=FI(e)),BI(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?wI.basename(this.path,this.extname):void 0}set stem(e){BI(e,`stem`),zI(e,`stem`),this.path=wI.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new wj(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function zI(e,t){if(e&&e.includes(wI.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+wI.sep+"`")}function BI(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function VI(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function HI(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var UI=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),WI=l(bI(),1),GI={}.hasOwnProperty,KI=new class e extends UI{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=SI()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,WI.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(YI(`data`,this.frozen),this.namespace[e]=t,this):GI.call(this.namespace,e)&&this.namespace[e]||void 0:e?(YI(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=QI(e),n=this.parser||this.Parser;return qI(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),qI(`process`,this.parser||this.Parser),JI(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=QI(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);eL(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),qI(`processSync`,this.parser||this.Parser),JI(`processSync`,this.compiler||this.Compiler),this.process(e,r),ZI(`processSync`,`process`,t),n;function r(e,r){t=!0,yI(e),n=r}}run(e,t,n){XI(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=QI(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),ZI(`runSync`,`run`,n),r;function i(e,t){yI(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=QI(t),r=this.compiler||this.Compiler;return JI(`stringify`,r),XI(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(YI(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,WI.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];xI(o)&&xI(r)&&(r=(0,WI.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function qI(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function JI(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function YI(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function XI(e){if(!xI(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function ZI(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function QI(e){return $I(e)?e:new RI(e)}function $I(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function eL(e){return typeof e==`string`||tL(e)}function tL(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var nL=[],rL={allowDangerousHtml:!0},iL=/^(https?|ircs?|mailto|xmpp)$/i,aL=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function oL(e){let t=sL(e),n=cL(e);return lL(t.runSync(t.parse(n),n),e)}function sL(e){let t=e.rehypePlugins||nL,n=e.remarkPlugins||nL,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rL}:rL;return KI().use(tF).use(n).use(vI,r).use(t)}function cL(e){let t=e.children||``,n=new RI;return typeof t==`string`?n.value=t:``+t,n}function lL(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||uL;for(let e of aL)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return cI(e,l),Mj(e,{Fragment:V.Fragment,components:i,ignoreInvalidStyle:!0,jsx:V.jsx,jsxs:V.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in eM)if(Object.hasOwn(eM,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=eM[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function uL(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||iL.test(e.slice(0,t))?e:``}function dL(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function fL(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function pL(e,t,n){let r=ZF((n||{}).ignore||[]),i=mL(t),a=-1;for(;++a<i.length;)oI(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function mL(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([hL(e[0]),gL(e[1])])}return t}function hL(e){return typeof e==`string`?new RegExp(fL(e),`g`):e}function gL(e){return typeof e==`function`?e:function(){return e}}var _L=`phrasing`,vL=[`autolink`,`link`,`image`,`label`];function yL(){return{transforms:[DL],enter:{literalAutolink:xL,literalAutolinkEmail:SL,literalAutolinkHttp:SL,literalAutolinkWww:SL},exit:{literalAutolink:EL,literalAutolinkEmail:TL,literalAutolinkHttp:CL,literalAutolinkWww:wL}}}function bL(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:_L,notInConstruct:vL},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:_L,notInConstruct:vL},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:_L,notInConstruct:vL}]}}function xL(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function SL(e){this.config.enter.autolinkProtocol.call(this,e)}function CL(e){this.config.exit.autolinkProtocol.call(this,e)}function wL(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function TL(e){this.config.exit.autolinkEmail.call(this,e)}function EL(e){this.exit(e)}function DL(e){pL(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OL],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,kL]],{ignore:[`link`,`linkReference`]})}function OL(e,t,n,r,i){let a=``;if(!ML(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!AL(n)))return!1;let o=jL(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function kL(e,t,n,r){return!ML(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function AL(e){let 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 jL(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=dL(e,`(`),a=dL(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function ML(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||EM(n)||TM(n))&&(!t||n!==47)}HL.peek=VL;function NL(){this.buffer()}function PL(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function FL(){this.buffer()}function IL(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function LL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hM(this.sliceSerialize(e)).toLowerCase(),n.label=t}function RL(e){this.exit(e)}function zL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hM(this.sliceSerialize(e)).toLowerCase(),n.label=t}function BL(e){this.exit(e)}function VL(){return`[`}function HL(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function UL(){return{enter:{gfmFootnoteCallString:NL,gfmFootnoteCall:PL,gfmFootnoteDefinitionLabelString:FL,gfmFootnoteDefinition:IL},exit:{gfmFootnoteCallString:LL,gfmFootnoteCall:RL,gfmFootnoteDefinitionLabelString:zL,gfmFootnoteDefinition:BL}}}function WL(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:HL},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
36
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?KL:GL))),s(),o}}function GL(e,t,n){return t===0?e:KL(e,t,n)}function KL(e,t,n){return(n?``:` `)+e}var qL=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];QL.peek=$L;function JL(){return{canContainEols:[`delete`],enter:{strikethrough:XL},exit:{strikethrough:ZL}}}function YL(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:qL}],handlers:{delete:QL}}}function XL(e){this.enter({type:`delete`,children:[]},e)}function ZL(e){this.exit(e)}function QL(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function $L(){return`~`}function eR(e){return e.length}function tR(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||eR,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=nR(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=rR(r[d]);else{let e=rR(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
37
+ `)}function nR(e){return e==null?``:String(e)}function rR(e){let 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 iR(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),aR);return i(),o}function aR(e,t,n){return`>`+(n?``:` `)+e}function oR(e,t){return sR(e,t.inConstruct,!0)&&!sR(e,t.notInConstruct,!1)}function sR(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 cR(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
38
+ `&&oR(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
39
+ `}function lR(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function uR(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 dR(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function fR(e,t,n,r){let i=dR(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(uR(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,pR);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(lR(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
40
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
41
+ `),a&&(u+=s.move(a+`
42
+ `)),u+=s.move(c),l(),u}function pR(e,t,n){return(n?``:` `)+e}function mR(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function hR(e,t,n,r){let i=mR(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
43
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function gR(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function _R(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function vR(e,t,n){let r=IM(e),i=IM(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}yR.peek=bR;function yR(e,t,n,r){let i=gR(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=vR(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=_R(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=vR(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+_R(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function bR(e,t,n){return n.options.emphasis||`*`}function xR(e,t){let n=!1;return cI(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&nM(e)&&(t.options.setext||n))}function SR(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(xR(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
44
+ `,after:`
45
+ `});return r(),t(),o+`
46
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
47
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
48
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=_R(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}CR.peek=wR;function CR(e){return e.value||``}function wR(){return`<`}TR.peek=ER;function TR(e,t,n,r){let i=mR(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function ER(){return`!`}DR.peek=OR;function DR(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function OR(){return`!`}kR.peek=AR;function kR(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function AR(){return"`"}function jR(e,t){let n=nM(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))}MR.peek=NR;function MR(e,t,n,r){let i=mR(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(jR(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function NR(e,t,n){return jR(e,n)?`<`:`[`}PR.peek=FR;function PR(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function FR(){return`[`}function IR(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function LR(e){let t=IR(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function RR(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function zR(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function BR(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?RR(n):IR(n),s=e.ordered?o===`.`?`)`:`.`:LR(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.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&&(c=!0),zR(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function VR(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function HR(e,t,n,r){let i=VR(n),a=n.bulletCurrent||IR(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function UR(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var WR=ZF([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function GR(e,t,n,r){return(e.children.some(function(e){return WR(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function KR(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qR.peek=JR;function qR(e,t,n,r){let i=KR(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=vR(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=_R(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=vR(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+_R(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function JR(e,t,n){return n.options.strong||`*`}function YR(e,t,n,r){return n.safe(e.value,r)}function XR(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ZR(e,t,n){let r=(zR(n)+(n.options.ruleSpaces?` `:``)).repeat(XR(n));return n.options.ruleSpaces?r.slice(0,-1):r}var QR={blockquote:iR,break:cR,code:fR,definition:hR,emphasis:yR,hardBreak:cR,heading:SR,html:CR,image:TR,imageReference:DR,inlineCode:kR,link:MR,linkReference:PR,list:BR,listItem:HR,paragraph:UR,root:GR,strong:qR,text:YR,thematicBreak:ZR};function $R(){return{enter:{table:ez,tableData:iz,tableHeader:iz,tableRow:nz},exit:{codeText:az,table:tz,tableData:rz,tableHeader:rz,tableRow:rz}}}function ez(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function tz(e){this.exit(e),this.data.inTable=void 0}function nz(e){this.enter({type:`tableRow`,children:[]},e)}function rz(e){this.exit(e)}function iz(e){this.enter({type:`tableCell`,children:[]},e)}function az(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oz));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oz(e,t){return t===`|`?t:e}function sz(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
49
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
50
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return tR(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=QR.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function cz(){return{exit:{taskListCheckValueChecked:uz,taskListCheckValueUnchecked:uz,paragraph:dz}}}function lz(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:fz}}}function uz(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function dz(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function fz(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=QR.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function pz(){return[yL(),UL(),JL(),$R(),cz()]}function mz(e){return{extensions:[bL(),WL(e),YL(),sz(e),lz()]}}var hz={tokenize:kz,partial:!0},gz={tokenize:Az,partial:!0},_z={tokenize:jz,partial:!0},vz={tokenize:Mz,partial:!0},yz={tokenize:Nz,partial:!0},bz={name:`wwwAutolink`,tokenize:Dz,previous:Pz},xz={name:`protocolAutolink`,tokenize:Oz,previous:Fz},Sz={name:`emailAutolink`,tokenize:Ez,previous:Iz},Cz={};function wz(){return{text:Cz}}for(var Tz=48;Tz<123;)Cz[Tz]=Sz,Tz++,Tz===58?Tz=65:Tz===91&&(Tz=97);Cz[43]=Sz,Cz[45]=Sz,Cz[46]=Sz,Cz[95]=Sz,Cz[72]=[Sz,xz],Cz[104]=[Sz,xz],Cz[87]=[Sz,bz],Cz[119]=[Sz,bz];function Ez(e,t,n){let r=this,i,a;return o;function o(t){return!Lz(t)||!Iz.call(r,r.previous)||Rz(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Lz(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(yz,u,l)(t):t===45||t===95||_M(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&gM(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Dz(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Pz.call(r,r.previous)||Rz(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(hz,e.attempt(gz,e.attempt(_z,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Oz(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Fz.call(r,r.previous)&&!Rz(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(gM(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||yM(t)||CM(t)||EM(t)||TM(t)?n(t):e.attempt(gz,e.attempt(_z,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function kz(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Az(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(vz,c,s)(t):t===null||CM(t)||EM(t)||t!==45&&TM(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function jz(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(vz,t,a)(o):o===null||CM(o)||EM(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Mz(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||CM(o)||EM(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||CM(e)||EM(e)?t(e):r(e)}function a(e){return gM(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):gM(t)?(e.consume(t),o):n(t)}}function Nz(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return _M(e)?n(e):t(e)}}function Pz(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||CM(e)}function Fz(e){return!gM(e)}function Iz(e){return!(e===47||Lz(e))}function Lz(e){return e===43||e===45||e===46||e===95||_M(e)}function Rz(e){let t=e.length,n=!1;for(;t--;){let 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}var zz={tokenize:qz,partial:!0};function Bz(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Wz,continuation:{tokenize:Gz},exit:Kz}},text:{91:{name:`gfmFootnoteCall`,tokenize:Uz},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Vz,resolveTo:Hz}}}}function Vz(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=hM(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Hz(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`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Uz(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||CM(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(hM(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return CM(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Wz(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||CM(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=hM(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return CM(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),kM(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Gz(e,t,n){return e.check(WM,t,e.attempt(zz,t,n))}function Kz(e){e.exit(`gfmFootnoteDefinition`)}function qz(e,t,n){let r=this;return kM(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Jz(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&cM(o,o.length,0,LM(s,e.slice(r+1,n),t)),cM(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),cM(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=IM(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=IM(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Yz=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Xz(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Xz(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Zz(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Qz(){return{flow:{null:{name:`table`,tokenize:$z,resolveAll:eB}}}}function $z(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):wM(t)?kM(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||CM(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,wM(t)?kM(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return wM(t)?kM(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||$(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return wM(t)?kM(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||$(n)?(e.exit(`tableRow`),t(n)):wM(n)?kM(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||CM(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function eB(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Yz;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(nB(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=tB(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=tB(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=tB(f,t,o,i,n,d)):(o[0]=o[1],d=tB(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&nB(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Zz(t.events,n))}return e}function tB(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},rB(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=rB(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=rB(t.events,n[2]),a=rB(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},rB(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function nB(e,t,n,r,i){let a=[],o=rB(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function rB(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var iB={name:`tasklistCheck`,tokenize:oB};function aB(){return{text:{91:iB}}}function oB(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return CM(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return $(r)?t(r):wM(r)?e.check({tokenize:sB},t,n)(r):n(r)}}function sB(e,t,n){return kM(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function cB(e){return dM([wz(),Bz(),Jz(e),Qz(),aB()])}var lB={};function uB(e){let t=this,n=e||lB,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(cB(n)),a.push(pz()),o.push(mz(n))}function dB({children:e,className:t}){return(0,V.jsx)(`div`,{className:B(`md`,t),children:(0,V.jsx)(oL,{remarkPlugins:[uB],components:{a:e=>(0,V.jsx)(`a`,{...e,target:`_blank`,rel:`noreferrer`})},children:e})})}function fB({message:e}){return e.role===`user`?(0,V.jsx)(`div`,{className:`flex justify-end animate-in fade-in-0 slide-in-from-bottom-1`,children:(0,V.jsx)(`div`,{className:`max-w-[85%] rounded-2xl rounded-br-sm bg-primary px-3.5 py-2 text-sm whitespace-pre-wrap text-primary-foreground`,children:(0,V.jsx)(SA,{text:e.text,images:e.images,tone:`inverse`})})}):(0,V.jsxs)(`div`,{className:`flex gap-2.5 animate-in fade-in-0 slide-in-from-bottom-1`,children:[(0,V.jsx)(mB,{}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:`Claude`}),(0,V.jsx)(dB,{className:`text-sm`,children:e.text})]})]})}function pB({queued:e}){return(0,V.jsxs)(`div`,{role:`status`,className:`flex items-end gap-2.5 animate-in fade-in-0 slide-in-from-bottom-1`,children:[(0,V.jsx)(mB,{}),(0,V.jsxs)(`span`,{className:`flex h-7 items-center rounded-2xl rounded-bl-sm bg-muted px-3 text-base text-primary`,children:[(0,V.jsx)(xm,{}),(0,V.jsx)(`span`,{className:`sr-only`,children:e?`Queued. Claude is busy and will answer next.`:`Claude is reading your message.`})]})]})}function mB(){return(0,V.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary`,children:(0,V.jsx)(He,{className:`size-3.5`})})}function hB({question:e,lock:t,claude:n,onClose:r}){let[i,a]=(0,O.useState)(Rk),[o,s]=(0,O.useState)(null),c=lA(xA),l=(0,O.useRef)(null),u=(0,O.useRef)(null),d=dA({disabled:!!t,onFiles:e=>u.current?.insertFiles(e),onReject:s}),f=bA(e),p=c.pending,m=!i.empty,h=m&&!i.uploading&&!p&&!t;(0,O.useEffect)(()=>{l.current?.scrollTo({top:l.current.scrollHeight,behavior:`smooth`})},[e.chat.length,f]),(0,O.useEffect)(()=>{u.current?.focus()},[e.id]);let g=async(n=i)=>{n.empty||n.uploading||p||t||await c.run(e.id,{text:n.text.trim(),images:n.images})&&u.current?.clear()};return Ef(pm.closeChat,()=>{document.querySelector(`[role="dialog"], [role="alertdialog"]`)||r()},{enabled:!m,preventDefault:!1,stopPropagation:!1}),(0,V.jsxs)(`aside`,{className:`relative flex h-full flex-col bg-background`,...d.dropZone,children:[(0,V.jsx)(Em,{show:d.dragging}),(0,V.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center gap-2 border-b px-3`,children:[(0,V.jsx)(Yk,{className:`font-mono`,children:e.id}),(0,V.jsx)(`h2`,{className:`min-w-0 flex-1 truncate text-sm font-semibold`,title:e.title,children:e.title}),e.status===`answered`&&(e.answer?.by===`claude`?(0,V.jsx)(Yk,{variant:`secondary`,className:`bg-primary/10 text-primary`,children:`Resolved by Claude`}):(0,V.jsx)(Yk,{variant:`secondary`,className:`bg-success/10 text-success`,children:`Answered`})),e.status===`dropped`&&(0,V.jsx)(Yk,{variant:`outline`,children:`Dropped`}),(0,V.jsxs)(Ru,{children:[(0,V.jsx)(zu,{render:(0,V.jsx)(Rr,{variant:`ghost`,size:`icon-sm`,onClick:r,"aria-label":`Close discussion`}),children:(0,V.jsx)(Qe,{})}),(0,V.jsxs)(Bu,{children:[`Close `,(0,V.jsx)(Tm,{hotkey:pm.closeChat})]})]})]}),e.status===`dropped`&&(0,V.jsxs)(`p`,{className:`border-b bg-muted/50 px-4 py-2 text-sm text-muted-foreground`,children:[`Claude dropped this question`,e.dropReason?`: ${e.dropReason}`:`.`,` You can still talk about it.`]}),(0,V.jsxs)(`div`,{ref:l,className:`flex-1 space-y-5 overflow-y-auto px-4 py-5`,"aria-live":`polite`,children:[e.chat.length===0&&(0,V.jsx)(Xk,{className:`h-full p-4 pb-[12svh]`,children:(0,V.jsxs)(Zk,{children:[(0,V.jsx)($k,{variant:`icon`,children:(0,V.jsx)(we,{})}),(0,V.jsx)(eA,{children:`Push back, ask why`}),(0,V.jsx)(tA,{children:`Claude answers with this question in mind, and can settle it for you.`})]})}),e.chat.map(e=>(0,V.jsx)(fB,{message:e},e.id)),f&&!t&&(0,V.jsx)(pB,{queued:n!==`listening`}),f&&t===`ended`&&(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The session ended before Claude replied.`})]}),(0,V.jsxs)(`div`,{className:`border-t p-3`,children:[c.error&&(0,V.jsx)(Sm,{className:`mb-2`,message:c.error,onRetry:()=>void g(),onDismiss:c.clearError}),o&&(0,V.jsx)(Sm,{className:`mb-2`,message:o,onDismiss:()=>s(null)}),(0,V.jsxs)(iA,{className:B(`bg-background`,!t&&`has-disabled:bg-background has-disabled:opacity-100 dark:has-disabled:bg-input/30`),children:[(0,V.jsx)(zk,{ref:u,disabled:!!t,invalid:!!c.error,onChange:e=>{e.empty||c.clearError(),a(e)},onSubmit:e=>void g(e),onError:s,placeholder:t?pA[t]:`Ask about this question… (paste or drop images)`,className:`max-h-40 min-h-14`}),(0,V.jsxs)(oA,{align:`block-end`,children:[(0,V.jsx)(`span`,{className:`self-end text-xs text-muted-foreground`,children:p?`Sending…`:i.uploading?`Uploading image…`:`Enter to send · ${Bd(pm.newLine)} for new line`}),(0,V.jsx)(cA,{variant:`default`,size:`icon-sm`,className:`ml-auto rounded-full`,onClick:()=>void g(),disabled:!h,"aria-label":p?`Sending`:`Send`,children:p?(0,V.jsx)(xm,{}):(0,V.jsx)(P,{})})]})]})]})]})}function gB(e){let[t,n]=(0,O.useState)({}),r=e?.id,i=e?yA(e):0;return(0,O.useEffect)(()=>{r&&n(e=>({...e,[r]:i}))},[r,i]),(0,O.useCallback)(e=>yA(e)-(t[e.id]??0),[t])}function _B(){let{resolved:e,setTheme:t}=Ju(),n=e===`dark`?`light`:`dark`,r=n===`dark`?`Dark theme`:`Light theme`;return(0,V.jsx)(cm,{children:(0,V.jsxs)(um,{tooltip:r,onClick:()=>t(n),"aria-label":`Switch to ${n} theme`,children:[n===`dark`?(0,V.jsx)(Ee,{}):(0,V.jsx)(We,{}),(0,V.jsx)(`span`,{children:r})]})})}var vB={round:e=>`round-${e}`,question:e=>`q-${e}`,summary:`summary`};function yB(){let{toggleSidebar:e}=Xp();Ef(pm.toggleSidebar,e)}var bB={min:240,initial:320,max:520};function xB(){let[e,t]=Wu(Vu.sidebarWidth,bB.initial),n=Math.min(Math.max(e,bB.min),bB.max);return hm(`--app-sidebar-w`,`${n}px`),[n,t]}function SB({value:e,className:t}){let n=Math.min(Math.max(e,0),1)*100;return(0,V.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,strokeWidth:2,"aria-hidden":!0,className:B(`-rotate-90`,t),children:[(0,V.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`,className:`stroke-current opacity-20`}),(0,V.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`,pathLength:100,strokeDasharray:100,strokeDashoffset:100-n,strokeLinecap:`round`,className:B(`stroke-current transition-[stroke-dashoffset] duration-500 ease-out`,n===0&&`opacity-0`)})]})}function CB(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Jf({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=$c(a,!0,!0),u=$l(),[d,f]=O.useState(),p=d===null?void 0:d??u,m=H(e=>{let t=!a,n=la(ea,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return O.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var wB=O.createContext(void 0);function TB(){let e=O.useContext(wB);if(e===void 0)throw Error(er(15));return e}var EB=`data-open`,DB=`data-closed`,OB=wi,kB=`data-panel-open`,AB={[EB]:``},jB={[DB]:``},MB={open(e){return e?{[kB]:``}:null}},NB={open(e){return e?AB:jB},...Oi},PB=O.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=H(o),d=CB({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=O.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=O.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=wr(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:NB});return(0,V.jsx)(wB.Provider,{value:p,children:m})}),FB={...MB,...Oi},IB=O.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=TB(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=or({disabled:c,focusableWhenDisabled:!0,native:u});return wr(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:FB})}),LB={height:void 0,width:void 0};function RB(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=O.useRef(null),f=O.useRef(null),[p,m]=O.useState(LB),h=O.useRef(LB),g=O.useRef(!1),_=O.useRef(s),v=O.useRef(!1),[y,b]=O.useState(!1),x=O.useRef(null),S=lr(t,d),C=ha(s),w=nl(d),T=!s&&!a,E=y?`idle`:u,D=s&&(_.current||v.current),k=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?h.current:p,A=n&&T&&f.current!==`css-animation`,j=H((e,t=!0)=>{t&&(h.current=e),m(e)}),M=H(()=>{x.current?.(),x.current=null}),N=H(e=>{M(),x.current=()=>{x.current=null,e()}}),P=H(()=>{s&&a&&f.current===`css-animation`&&(v.current=!0)});U(()=>{y&&u!==`starting`&&b(!1)},[y,u]),O.useEffect(()=>()=>{P(),M()},[P,M]),U(()=>{let e=d.current;if(!e)return;!s&&x.current&&M();let t=BB(e,D);if(f.current=t,s&&u===`idle`&&_.current&&t===`css-animation`){h.current=zB(e);return}if(s&&u===`starting`){let n=g.current;if(g.current=!1,t===`none`){j(zB(e)),b(!0);return}if(t===`css-transition`){let t=UB(e);if(j(zB(e)),!n)return t;let r=HB(e,`transition-duration`,`0s`);return N(r),b(!0),t}j(zB(e));let r=HB(e,`animation-name`,`none`);if(!n){r();return}let i=HB(e,`animation-duration`,`0s`);r(),N(i),b(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(_.current=!1,v.current=!1,t===`none`){j(LB,!1),c(!1);return}j(zB(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=zB(e);if(!(n.height>0||n.width>0)){c(!1);return}j(n),t===`css-animation`&&HB(e,`animation-name`,`none`)()},[a,s,M,j,c,N,D,u]),rl({enabled:s&&a&&E===`idle`,open:!0,ref:d,onComplete(){s&&j(LB,!1)}}),O.useEffect(()=>{if(s||!a||E!==`ending`||!d.current)return;let e=new AbortController,t=-1;function n(){C.current||(c(!1),j(LB,!1))}return t=ya.request(()=>{w(n,e.signal)}),()=>{ya.cancel(t),e.abort()}},[C,a,s,E,w,j,c]),U(()=>{let e=d.current;e&&n&&T&&e.setAttribute(`hidden`,`until-found`)},[T,n]),O.useEffect(function(){let e=d.current;if(!e)return;function t(e){let t=la($i,e);o(!0,t),!t.isCanceled&&(g.current=!0,l(!0))}return G(e,`beforematch`,t)},[o,l]);let F=i||n||a||s;return{height:k.height,props:{...A?{[OB]:``}:void 0,hidden:T,id:r},ref:S,shouldPreventOpenAnimation:D,shouldRender:F,transitionStatus:E,width:k.width}}function zB(e){return{height:e.scrollHeight,width:e.scrollWidth}}function BB(e,t){let n=sn(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&VB(n.animationDuration),i=VB(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function VB(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function HB(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function UB(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=ya.request(n);return()=>{ya.cancel(r),n()}}var WB=`--collapsible-panel-height`,GB=`--collapsible-panel-width`,KB=O.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=TB(),v=r??!1,y=i??!1,b=o||void 0,x=b??l;U(()=>(m(e=>b??(e===null?void 0:e)),()=>{m(e=>e===b?null:e)}),[b,m]);let{height:S,props:C,ref:w,shouldPreventOpenAnimation:T,shouldRender:E,transitionStatus:D,width:O}=RB({externalRef:t,hiddenUntilFound:v,id:x,keepMounted:y,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:h,transitionStatus:_}),k={...g,transitionStatus:D},A=Cr(s,k),j=wr(`div`,{...e,style:void 0},{state:k,ref:w,props:[C,{style:{[WB]:S===void 0?`auto`:`${S}px`,[GB]:O===void 0?`auto`:`${O}px`}},c,A?{style:A}:void 0,T?{style:{animationName:`none`}}:void 0],stateAttributesMapping:NB});return E?j:null});function qB({...e}){return(0,V.jsx)(PB,{"data-slot":`collapsible`,...e})}function JB({...e}){return(0,V.jsx)(IB,{"data-slot":`collapsible-trigger`,...e})}function YB({...e}){return(0,V.jsx)(KB,{"data-slot":`collapsible-content`,...e})}function XB(e){return String(e).padStart(2,`0`)}function ZB(e){let t=Math.max(0,Math.floor(e/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m ${String(t%60).padStart(2,`0`)}s`}function QB(e){return e.status===`dropped`?`border border-dashed border-muted-foreground/40 text-muted-foreground line-through`:e.status===`answered`?e.answer?.sent?`bg-success text-background`:`bg-success/15 text-success`:`border-[1.5px] border-muted-foreground/40 text-muted-foreground`}function $B({question:e,attention:t=!1,pending:n=!1}){return(0,V.jsxs)(`span`,{className:B(`relative flex size-5 shrink-0 items-center justify-center rounded-full text-[10px] font-semibold tabular-nums`,QB(e)),children:[e.id.replace(/^\D+/,``),t&&(0,V.jsx)(`span`,{className:B(`absolute -top-1 -right-1 hidden size-2 rounded-full bg-primary ring-2 ring-sidebar group-data-[collapsible=icon]:block`,n&&`animate-pulse`)})]})}function eV({question:e,active:t,unread:n,onJump:r,onOpenChat:i}){let a=bA(e),o=a||n>0,s=e.chat.length>0||a;return(0,V.jsxs)(cm,{children:[(0,V.jsxs)(um,{isActive:t,tooltip:`${e.id} · ${e.title}`,onClick:r,className:`h-auto items-start py-1.5 group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:p-1.5!`,children:[(0,V.jsx)($B,{question:e,attention:o,pending:a}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1 group-data-[collapsible=icon]:hidden`,children:[(0,V.jsx)(`span`,{className:B(`line-clamp-2 leading-snug`,e.status===`dropped`&&`text-muted-foreground line-through`,e.status===`answered`&&`text-muted-foreground`),children:e.title}),e.status===`answered`&&(0,V.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground/80`,children:vA(e)})]})]}),s&&(0,V.jsxs)(dm,{onClick:i,"aria-label":`Open discussion for ${e.id}`,className:`top-1.5!`,children:[(0,V.jsx)(we,{className:B(!o&&`text-muted-foreground`)}),o&&(0,V.jsx)(`span`,{className:B(`absolute -top-0.5 -right-0.5 size-2 rounded-full bg-primary ring-2 ring-sidebar`,a&&`animate-pulse`)})]})]})}function tV({round:e,questions:t,current:n,chatFor:r,unread:i,onJump:a,onOpenChat:o,toggled:s,onToggle:c}){let l=mA(t),u=l.filter(e=>e.status===`answered`).length,d=l.length>0&&u===l.length,f=vB.round(e.number),p=n===f||e.questionIds.some(e=>n===vB.question(e)),m=s??(!d||p),h=e.title??`Round ${e.number}`;return(0,V.jsx)(qB,{open:m,onOpenChange:c,children:(0,V.jsxs)(am,{children:[(0,V.jsxs)(om,{render:(0,V.jsx)(JB,{}),className:`mb-1 gap-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:pointer-events-none`,children:[(0,V.jsx)(`span`,{className:B(`font-semibold tabular-nums`,d?`text-success`:`text-primary`),children:XB(e.number)}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:h}),(0,V.jsxs)(`span`,{className:B(`flex items-center gap-1 tabular-nums`,d&&`text-success`),children:[d&&(0,V.jsx)(oe,{className:`size-3.5`}),u,`/`,l.length]}),(0,V.jsx)(ne,{className:B(`size-3.5 transition-transform duration-200`,m&&`rotate-90`)})]}),(0,V.jsx)(`p`,{className:B(`mb-1 hidden text-center text-[10px] font-semibold tabular-nums group-data-[collapsible=icon]:block`,d?`text-success`:`text-primary`),children:XB(e.number)}),!m&&(0,V.jsx)(sm,{className:`hidden group-data-[collapsible=icon]:flex`,children:(0,V.jsx)(cm,{children:(0,V.jsxs)(um,{tooltip:`${h} · ${u}/${l.length} settled`,onClick:()=>{if(!d)return c(!0);c(void 0),a(f)},className:d?`text-success hover:text-success`:`text-primary hover:text-primary`,children:[d?(0,V.jsx)(oe,{}):(0,V.jsx)(se,{}),(0,V.jsx)(`span`,{children:h})]})})}),(0,V.jsx)(YB,{className:`h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 ease-out data-ending-style:h-0 data-starting-style:h-0`,children:(0,V.jsxs)(sm,{className:`gap-0.5`,children:[t.map(e=>(0,V.jsx)(eV,{question:e,active:n===vB.question(e.id)||r===e.id,unread:i(e),onJump:()=>a(vB.question(e.id)),onOpenChat:()=>o(e.id)},e.id)),d&&(0,V.jsx)(cm,{className:`animate-in fade-in-0 slide-in-from-top-1 animation-duration-200`,children:(0,V.jsxs)(um,{tooltip:`Round ${XB(e.number)} review`,isActive:n===f,onClick:()=>a(f),className:`text-primary hover:text-primary data-active:text-primary`,children:[(0,V.jsx)(Ie,{}),(0,V.jsx)(`span`,{children:`Review`})]})})]})})]})})}function nV({state:e,current:t,onJump:n,chatFor:r,unread:i,onOpenChat:a}){let{isMobile:o,setOpenMobile:s,state:c}=Xp(),[l,u]=xB(),[d,f]=(0,O.useState)({});yB();let p=e=>{n(e),o&&s(!1)};return(0,V.jsxs)(Qp,{variant:`floating`,collapsible:`icon`,"aria-label":`Rounds and questions`,children:[(0,V.jsxs)(tm,{className:`h-12 flex-row items-center border-b px-2`,children:[(0,V.jsx)(nn,{}),(0,V.jsx)(`span`,{className:`truncate text-sm font-semibold tracking-tight group-data-[collapsible=icon]:hidden`,children:`better grill`})]}),(0,V.jsxs)(im,{className:`group-data-[collapsible=icon]:overflow-x-hidden group-data-[collapsible=icon]:overflow-y-auto`,children:[e.rounds.length===0&&(0,V.jsx)(iV,{ended:e.ended}),e.rounds.map((n,o)=>(0,V.jsxs)(O.Fragment,{children:[o>0&&(0,V.jsx)(rm,{}),(0,V.jsx)(tV,{round:n,questions:hA(e,n.questionIds),current:t,chatFor:r,unread:i,onJump:p,onOpenChat:a,toggled:d[n.number],onToggle:e=>f(t=>({...t,[n.number]:e}))})]},n.number)),e.summary&&(0,V.jsx)(am,{children:(0,V.jsx)(sm,{children:(0,V.jsx)(cm,{children:(0,V.jsxs)(um,{tooltip:`Summary`,isActive:t===vB.summary,onClick:()=>p(vB.summary),className:`text-primary hover:text-primary data-active:text-primary`,children:[(0,V.jsx)(le,{}),(0,V.jsx)(`span`,{children:`Summary`})]})})})})]}),(0,V.jsx)(nm,{className:`border-t`,children:(0,V.jsxs)(sm,{className:`gap-0.5`,children:[(0,V.jsx)(rV,{state:e,onJump:p}),(0,V.jsx)(_B,{})]})}),!o&&c===`expanded`&&(0,V.jsx)(mm,{side:`left`,cssVar:`--app-sidebar-w`,width:l,min:bB.min,max:bB.max,initial:bB.initial,onResize:u,label:`Resize panel`,className:`right-0`})]})}function rV({state:e,onJump:t}){let n=mA(Object.values(e.questions));if(n.length===0)return null;let r=n.filter(e=>e.status===`answered`).length,i=r===n.length,a=n.find(e=>e.status===`open`),o=a?vB.question(a.id):e.summary?vB.summary:null;return(0,V.jsx)(cm,{children:(0,V.jsxs)(um,{tooltip:`${r}/${n.length} settled`,disabled:!o,onClick:()=>o&&t(o),"aria-label":`${r} of ${n.length} settled`,children:[(0,V.jsx)(SB,{value:r/n.length,className:i?`text-success`:`text-primary`}),(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center justify-between gap-2`,children:[(0,V.jsx)(`span`,{className:`truncate`,children:i?`All settled`:`Settled`}),(0,V.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:[r,`/`,n.length]})]})]})})}function iV({ended:e}){return(0,V.jsx)(am,{children:e?(0,V.jsx)(`p`,{className:`px-2 pt-2 text-xs text-muted-foreground group-data-[collapsible=icon]:hidden`,children:`No rounds were posted.`}):(0,V.jsx)(sm,{children:[0,1,2].map(e=>(0,V.jsx)(cm,{children:(0,V.jsx)(fm,{showIcon:!0})},e))})})}function aV({hotkey:e,...t}){return e?(0,V.jsxs)(Ru,{children:[(0,V.jsx)(zu,{render:(0,V.jsx)(oV,{...t})}),(0,V.jsxs)(Bu,{children:[t.active?`Close discussion`:`Discuss`,` `,(0,V.jsx)(Tm,{hotkey:e})]})]}):(0,V.jsx)(oV,{...t})}function oV({count:e,unread:t,active:n,onClick:r,compact:i=!1,...a}){let o=i&&e===0;return(0,V.jsxs)(Rr,{...a,variant:n?`secondary`:`outline`,size:o?`icon-sm`:i?`sm`:`default`,onClick:r,"aria-pressed":n,"aria-label":i?`Discuss`:void 0,className:B(`relative`,n&&`border-primary/40 bg-primary/10 text-primary hover:bg-primary/15`),children:[(0,V.jsx)(we,{"data-icon":o?void 0:`inline-start`}),!i&&`Discuss`,e>0&&(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:e}),t>0&&(0,V.jsxs)(`span`,{className:`absolute -top-1 -right-1 flex size-2.5`,children:[(0,V.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-primary opacity-60`}),(0,V.jsx)(`span`,{className:`relative inline-flex size-2.5 rounded-full bg-primary ring-2 ring-background`})]})]})}function sV({children:e}){return(0,V.jsxs)(`section`,{className:`mt-10`,children:[(0,V.jsxs)(`div`,{className:`mb-4`,children:[(0,V.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs font-medium tracking-wide text-primary uppercase`,children:[(0,V.jsx)(Me,{className:`size-3.5`}),`Also sending`]}),(0,V.jsx)(`h3`,{className:`mt-0.5 text-lg font-semibold tracking-tight`,children:`Changed from earlier rounds`})]}),(0,V.jsx)(`div`,{className:`grid gap-4`,children:e})]})}function cV({question:e}){return(0,V.jsxs)(`article`,{id:vB.question(e.id),className:`scroll-mt-20 rounded-xl border border-dashed px-5 py-4 text-muted-foreground`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,V.jsx)(Yk,{variant:`outline`,className:`font-mono text-muted-foreground`,children:e.id}),(0,V.jsx)(`span`,{className:`text-sm font-medium line-through decoration-muted-foreground/60`,children:e.title}),(0,V.jsx)(Yk,{variant:`ghost`,className:`ml-auto`,children:`Dropped`})]}),e.dropReason&&(0,V.jsx)(`p`,{className:`mt-2 text-sm italic`,children:e.dropReason})]})}function lV({children:e,className:t}){return(0,V.jsxs)(`p`,{className:B(`inline-flex items-center gap-1.5 text-xs text-muted-foreground`,t),children:[(0,V.jsx)(Se,{className:`size-3 shrink-0`}),e]})}function uV({pending:e,label:t,pendingLabel:n}){return e?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(xm,{}),n]}):(0,V.jsx)(V.Fragment,{children:t})}function dV({slot:e,children:t}){return(0,Ko.createPortal)((0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute -inset-x-3 -top-24 -bottom-3 canvas [mask-image:linear-gradient(to_bottom,transparent,black_65%)]`}),(0,V.jsx)(`div`,{className:`relative flex items-center gap-2 rounded-xl border bg-popover/95 px-4 py-3 shadow-lg backdrop-blur-md sm:px-5`,children:t})]}),e)}function fV({className:e,size:t=`default`,...n}){return(0,V.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:B(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function pV({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`card-header`,className:B(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,e),...t})}function mV({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`card-title`,className:B(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function hV({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`card-description`,className:B(`text-sm text-muted-foreground`,e),...t})}function gV({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`card-content`,className:B(`px-(--card-spacing)`,e),...t})}function _V({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`card-footer`,className:B(`flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)`,e),...t})}function vV(e,t){let n=window.getSelection();if(!n?.rangeCount||!n.isCollapsed)return!1;let r=n.getRangeAt(0);if(!e.contains(r.startContainer))return!1;let i=document.createRange();return i.selectNodeContents(e),t===-1?i.setEnd(r.startContainer,r.startOffset):i.setStart(r.endContainer,r.endOffset),i.toString().length===0}var yV=(e,t)=>$O(`/api/questions/${e}/answer`,t),bV=`[data-answer-item]:not(:disabled)`;function xV(e){e.focus({preventScroll:!0,focusVisible:!0}),e.scrollIntoView({block:`nearest`,behavior:`smooth`})}function SV(){let e=document.activeElement;return!!e&&e!==document.body&&!!e.closest(`input, textarea, [contenteditable=true]`)}function CV(e,t){let n=[...document.querySelectorAll(bV)],r=n[n.indexOf(e)+t];return!n.includes(e)||!r?!1:(xV(r),!0)}function wV(e){let t=e.querySelector(bV);return t&&xV(t),!!t}function TV(){if(SV())return;let e=document.querySelector(`${bV}[aria-checked=true]`);e?xV(e):wV(document)}var EV=null,DV=new Set;function OV(e){if(EV!==e){EV=e;for(let e of DV)e()}}function kV(e){return DV.add(e),()=>DV.delete(e)}function AV(e){return(0,O.useSyncExternalStore)(kV,()=>EV===e)}function jV({question:e,selected:t,disabled:n,onToggle:r}){let i=e.multiSelect;return(0,V.jsx)(`div`,{role:i?`group`:`radiogroup`,className:`grid gap-2`,children:e.options.map((a,o)=>{let s=t.includes(a.id),c=e.recommended===a.id;return(0,V.jsxs)(`button`,{type:`button`,role:i?`checkbox`:`radio`,"aria-checked":s,disabled:n,onClick:()=>r(a.id),"data-answer-item":!0,"data-option-id":a.id,className:B(`group/option flex scroll-mt-20 scroll-mb-32 items-start gap-3 rounded-lg border bg-background p-3 text-left transition-[color,background-color,border-color,box-shadow] outline-none`,`hover:bg-muted/50 focus:border-ring focus:ring-3 focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-60`,`dark:bg-input/20 dark:hover:bg-input/40`,s&&`border-primary bg-primary/5 ring-1 ring-primary hover:bg-primary/5 dark:bg-primary/10 dark:hover:bg-primary/10`),children:[(0,V.jsx)(`span`,{"aria-hidden":!0,className:B(`mt-0.5 flex size-5 shrink-0 items-center justify-center border text-[10px] font-medium text-muted-foreground transition-colors`,i?`rounded-md`:`rounded-full`,s?`border-primary bg-primary text-primary-foreground`:`border-input group-hover/option:border-foreground/30`),children:s?(0,V.jsx)(te,{className:`size-3`,strokeWidth:3}):String.fromCharCode(65+o)}),(0,V.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,V.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,V.jsx)(`span`,{className:`text-sm font-medium`,children:a.label}),c&&(0,V.jsxs)(Yk,{variant:`secondary`,className:`bg-primary/10 text-primary`,children:[(0,V.jsx)(He,{"data-icon":`inline-start`}),`Recommended`]})]}),a.description&&(0,V.jsx)(`span`,{className:`mt-0.5 block text-sm text-muted-foreground`,children:a.description})]})]},a.id)})})}function MV({question:e,lock:t,discussing:n,unread:r,onDiscuss:i,onLockedIn:a,actionsSlot:o,extraActions:s,hidden:c=!1}){let l=t!==null,[u,d]=(0,O.useState)(e.answer?.optionIds??[]),[f,p]=(0,O.useState)(()=>NV(e)),[m,h]=(0,O.useState)(null),g=lA(yV),_=(0,O.useRef)(null),v=dA({disabled:l,onFiles:e=>_.current?.insertFiles(e),onReject:h}),y=t=>{g.clearError(),d(n=>e.multiSelect?n.includes(t)?n.filter(e=>e!==t):[...n,t]:n[0]===t?[]:[t])},b=e.answer,x=e.status===`answered`,S=(e,t=f)=>PV(e,b?.optionIds??[])&&t.text.trim()===(b?.text??``).trim()&&PV(t.images,b?.images??[])&&!t.uploading,C=x&&!S(u),w=g.pending,T=u.length>0||!f.empty,E=!l&&!w&&!f.uploading&&T&&(!x||C),D=()=>{g.clearError(),d(b?.optionIds??[]),_.current?.reset(b?.text??``,b?.images??[])},k=(0,O.useRef)(null),[A,j]=(0,O.useState)(null),M=async(t=u,n=f)=>{if(!(l||w||n.uploading||t.length===0&&n.empty)){if(x&&S(t,n)){a();return}await g.run(e.id,{optionIds:t,text:n.text.trim()||void 0,images:n.images})&&a()}},N=t=>{let n=e.multiSelect&&u.length>0?u:[t];d(n),M(n)},P=AV(e.id);Ef(pm.lockIn,e=>{e.target.closest(`input, textarea, [contenteditable=true]`)||M()},{enabled:P&&E&&!c,conflictBehavior:`allow`});let F=()=>OV(e.id),I={target:k,ignoreInputs:!1,preventDefault:!1,stopPropagation:!1},ee=(e,t)=>{let n=e.target;n.matches(`[data-answer-item]`)&&(!n.isContentEditable||vV(n,t))&&CV(n,t)&&e.preventDefault()};Ef(pm.nextAnswer,e=>ee(e,1),I),Ef(pm.previousAnswer,e=>ee(e,-1),I),Ef(pm.submitAnswer,e=>{let t=e.target;t.dataset.optionId&&(e.preventDefault(),N(t.dataset.optionId))},I);let te=e=>{let t=e.target;j(t.dataset.optionId?`option`:t.isContentEditable?`text`:null)},L=e.options.length===0?`Open answer`:e.multiSelect?`Pick any`:`Pick one`,ne=(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(aV,{count:e.chat.length,unread:r,active:n,onClick:i,hotkey:pm.discuss}),s,(0,V.jsx)(`div`,{className:`flex-1`}),t?(0,V.jsx)(lV,{children:pA[t]}):A===`option`?(0,V.jsxs)(FV,{children:[(0,V.jsx)(Tm,{hotkey:pm.previousAnswer}),(0,V.jsx)(Tm,{hotkey:pm.nextAnswer}),` move`,(0,V.jsx)(Tm,{hotkey:pm.submitAnswer,className:`ml-1.5`}),` lock in`]}):A===`text`?(0,V.jsxs)(FV,{children:[(0,V.jsx)(Tm,{hotkey:pm.submitAnswer}),` lock in`,(0,V.jsx)(Tm,{hotkey:pm.newLine,className:`ml-1.5`}),` new line`]}):P&&T?(0,V.jsxs)(FV,{children:[(0,V.jsx)(Tm,{hotkey:pm.lockIn}),` lock in`]}):(0,V.jsx)(`span`,{className:`hidden text-xs text-muted-foreground sm:inline`,children:e.options.length>0?`Pick, type or drop an image`:`Type an answer or drop an image`}),C&&(0,V.jsx)(Rr,{variant:`ghost`,disabled:w,onClick:D,children:`Discard changes`}),(0,V.jsx)(Rr,{disabled:!E,onClick:()=>void M(),children:(0,V.jsx)(uV,{pending:w,pendingLabel:`Locking in…`,label:x?`Update answer`:`Lock in`})})]}),re=(0,V.jsxs)(fV,{ref:k,id:vB.question(e.id),"data-question-editor":!0,onPointerDownCapture:F,onFocusCapture:e=>{F(),te(e)},onBlurCapture:e=>{k.current?.contains(e.relatedTarget)||j(null)},...v.dropZone,className:B(`relative scroll-mt-20 gap-5 pt-5 shadow-xs transition-shadow`,n?`ring-1 ring-primary/45`:`hover:shadow-sm`),children:[(0,V.jsx)(Em,{show:v.dragging}),(0,V.jsxs)(pV,{className:`grid-cols-1 gap-2 px-5 sm:px-6`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(Yk,{className:`font-mono`,children:e.id}),(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:L}),e.editedAt&&(0,V.jsxs)(Yk,{variant:`secondary`,className:`bg-primary/10 text-primary`,children:[(0,V.jsx)(He,{"data-icon":`inline-start`}),`Edited by Claude`]}),x&&(0,V.jsxs)(Yk,{variant:`secondary`,className:`bg-success/10 text-success`,children:[(0,V.jsx)(oe,{"data-icon":`inline-start`}),b?.sent?`Sent to Claude`:`Locked in`]}),b?.by===`claude`&&(0,V.jsxs)(Yk,{variant:`secondary`,className:`bg-primary/10 text-primary`,children:[(0,V.jsx)(He,{"data-icon":`inline-start`}),`Resolved in discussion by Claude`]})]}),(0,V.jsx)(mV,{className:`text-xl font-semibold tracking-tight text-balance`,children:e.title}),e.body&&(0,V.jsx)(hV,{children:(0,V.jsx)(dB,{children:e.body})})]}),(0,V.jsxs)(gV,{className:`grid grid-cols-1 gap-4 px-5 sm:px-6`,children:[e.options.length>0&&(0,V.jsx)(jV,{question:e,selected:u,disabled:l||w,onToggle:y}),e.recommendation&&(0,V.jsxs)(Of,{className:`border-primary/20 bg-primary/5`,children:[(0,V.jsx)(He,{className:`text-primary`}),(0,V.jsx)(kf,{className:`text-primary`,children:`Claude's pick`}),(0,V.jsx)(Af,{className:`text-foreground/80`,children:(0,V.jsx)(dB,{children:e.recommendation})})]}),(0,V.jsx)(iA,{className:`h-auto`,children:(0,V.jsx)(zk,{ref:_,initialText:b?.text,initialImages:b?.images,disabled:l||w,invalid:!!g.error,editableProps:{"data-answer-item":!(l||w)||void 0},onChange:e=>{e.text!==f.text&&g.clearError(),p(e)},onSubmit:e=>void M(u,e),onError:h,placeholder:e.options.length===0?`Your answer… (paste or drop images)`:u.length>0?`Add a note to your pick (optional)…`:`Or write your own answer…`,className:`max-h-80 min-h-20 scroll-mt-20 scroll-mb-32`})}),m&&(0,V.jsx)(Sm,{message:m,onDismiss:()=>h(null)}),g.error&&(0,V.jsx)(Sm,{message:g.error,onRetry:()=>void M(),onDismiss:g.clearError})]})]});return o?(0,V.jsxs)(V.Fragment,{children:[re,(0,V.jsx)(dV,{slot:o,children:ne})]}):re}function NV(e){let t=e.answer?.text??``,n=e.answer?.images??[];return{text:t,images:n,uploading:!1,empty:!t.trim()&&n.length===0}}function PV(e,t){return e.length===t.length&&e.every(e=>t.includes(e))}function FV({children:e}){return(0,V.jsx)(`span`,{className:`hidden items-center gap-1 text-xs text-muted-foreground sm:inline-flex`,children:e})}function IV(e){let{question:t}=e;return t.status===`dropped`?(0,V.jsx)(cV,{question:t}):(0,V.jsx)(MV,{...e},t.answer?.at??`open`)}function LV({question:e,discussing:t,unread:n,onDiscuss:r,onOpen:i}){if(e.status===`dropped`)return(0,V.jsx)(cV,{question:e});let a=e.answer,o=_A(e),s=e.status===`open`,c=!!a?.sent,l=s?`Not answered yet`:c?`Sent to Claude`:`Locked in, not sent yet`;return(0,V.jsx)(fV,{id:vB.question(e.id),size:`sm`,className:B(`scroll-mt-20 px-4 transition-shadow`,t&&`ring-1 ring-primary/45`),children:(0,V.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,V.jsxs)(Ru,{children:[(0,V.jsx)(zu,{render:(0,V.jsx)(`span`,{}),className:B(`mt-0.5 shrink-0`,s?`text-muted-foreground`:`text-success`),"aria-label":l,children:s?(0,V.jsx)(se,{className:`size-5`}):c?(0,V.jsx)(oe,{className:`size-5 fill-success text-background`}):(0,V.jsx)(oe,{className:`size-5`})}),(0,V.jsx)(Bu,{children:l})]}),(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:e.id}),(0,V.jsx)(`h3`,{className:`text-sm font-medium text-muted-foreground`,children:e.title})]}),s&&(0,V.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground italic`,children:`Not answered yet`}),a?.by===`claude`&&(0,V.jsxs)(Yk,{variant:`secondary`,className:`mt-1.5 bg-primary/10 text-primary`,children:[(0,V.jsx)(He,{"data-icon":`inline-start`}),`Resolved in discussion by Claude · change it if that's wrong`]}),o.length>0&&(0,V.jsx)(`p`,{className:`mt-1 text-sm font-semibold`,children:o.join(` + `)}),a?.text&&(a.by===`claude`?(0,V.jsx)(dB,{className:`mt-1 text-sm`,children:a.text}):(0,V.jsx)(`p`,{className:`mt-1 text-sm whitespace-pre-wrap text-muted-foreground italic`,children:(0,V.jsx)(SA,{text:a.text,images:a.images})}))]}),(0,V.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,V.jsx)(aV,{count:e.chat.length,unread:n,active:t,onClick:r,compact:!0}),(0,V.jsxs)(Rr,{variant:`ghost`,size:`sm`,onClick:i,children:[!s&&(0,V.jsx)(Ae,{"data-icon":`inline-start`}),s?`Answer`:`Change`]})]})]})})}function RV({questions:e}){let t=mA(e),n=t.filter(e=>e.status===`answered`);return t.length===0?null:n.length===t.length&&n.every(e=>e.answer?.sent)?(0,V.jsxs)(Yk,{variant:`secondary`,className:`bg-success/10 text-success`,children:[(0,V.jsx)(Re,{"data-icon":`inline-start`}),`Sent to Claude`]}):(0,V.jsx)(Yk,{variant:`outline`,className:`text-muted-foreground tabular-nums`,children:(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`span`,{className:`text-foreground`,children:n.length}),`/`,t.length,` locked in`]})})}function zV({round:e,questions:t,review:n=!1,children:r}){return(0,V.jsxs)(`section`,{id:vB.round(e.number),className:`scroll-mt-20`,children:[(0,V.jsxs)(`div`,{className:`mb-4 flex items-end gap-4`,children:[(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsxs)(`p`,{className:`text-xs font-medium tracking-wide text-primary uppercase`,children:[`Round `,XB(e.number),n&&` · Review`]}),(0,V.jsx)(`h2`,{className:`mt-0.5 truncate text-2xl font-semibold tracking-tight`,children:e.title??`Round ${e.number}`})]}),(0,V.jsx)(RV,{questions:t})]}),(0,V.jsx)(`div`,{className:`grid gap-4`,children:r})]})}var BV=()=>$O(`/api/send`,{});function VV(e,t){let n=lA(BV),r=mA(Object.values(e.questions)),i=r.filter(e=>e.status===`open`),a=r.filter(e=>e.status===`answered`&&!e.answer?.sent);return{open:i,unsent:a,changes:gA(e).length,ready:!e.ended&&i.length===0&&a.length>0&&!t&&!n.pending,idle:i.length===0&&a.length===0,action:n,send:()=>void n.run()}}function HV(e=1e3){let[t,n]=(0,O.useState)(()=>Date.now());return(0,O.useEffect)(()=>{let t=setInterval(()=>n(Date.now()),e);return()=>clearInterval(t)},[e]),t}function UV({since:e,lock:t}){let n=HV()-e;return(0,V.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`mb-12 animate-in fade-in-0 slide-in-from-bottom-1 animation-duration-300`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border border-dashed px-4 py-3 font-mono text-xs`,children:[(0,V.jsx)(Ak,{className:`size-4 text-primary`}),(0,V.jsxs)(`span`,{className:`min-w-0 flex-1 text-foreground`,children:[`Claude is working through your answers`,(0,V.jsx)(`span`,{className:`ml-1 inline-block h-3 w-1.5 translate-y-0.5 bg-primary motion-safe:animate-blink`})]}),(0,V.jsx)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:ZB(n)})]}),t===`offline`&&(0,V.jsx)(lV,{className:`mt-2 px-1 text-destructive`,children:`Bridge unreachable. The next round shows up once it reconnects.`}),!t&&n>=12e4&&(0,V.jsx)(lV,{className:`mt-2 px-1`,children:`Taking a while. Claude may be researching facts with sub-agents. The terminal shows what it is doing.`})]})}function WV({state:e,lock:t,onJump:n,showBar:r}){let{open:i,unsent:a,changes:o,ready:s,idle:c,action:l,send:u}=VV(e,t),d=l.pending,f=(0,O.useRef)(null);return(0,O.useEffect)(()=>{s&&document.activeElement===document.body&&f.current?.focus({preventScroll:!0})},[s]),e.ended?null:c?e.awaitingSince?(0,V.jsx)(UV,{since:e.awaitingSince,lock:t}):null:r?(0,V.jsx)(`div`,{className:`mb-12`,children:(0,V.jsxs)(`div`,{className:B(`flex flex-wrap items-center gap-x-4 gap-y-3 rounded-xl border bg-popover/95 px-4 py-3 shadow-lg backdrop-blur-md transition-[border-color,box-shadow] sm:px-5`,s&&`border-primary/50 shadow-primary/15 ring-4 ring-primary/10`),children:[(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[i.length>0?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`p`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,V.jsx)(se,{className:`size-4 text-primary`}),(0,V.jsx)(`span`,{className:`tabular-nums`,children:i.length}),` still open`]}),(0,V.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-1`,children:i.map(e=>(0,V.jsx)(Yk,{variant:`outline`,className:`font-mono text-muted-foreground hover:bg-muted hover:text-foreground`,render:(0,V.jsx)(`button`,{type:`button`,onClick:()=>n(vB.question(e.id))}),children:e.id},e.id))})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`p`,{className:`text-sm font-semibold`,children:`All locked in.`}),(0,V.jsxs)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:[a.length,` `,a.length===1?`answer`:`answers`,o>0&&` · ${o} changed from earlier rounds`,` · you can still change anything`]})]}),t&&(0,V.jsx)(lV,{className:`mt-1.5`,children:pA[t]}),l.error&&(0,V.jsx)(Sm,{className:`mt-2`,message:l.error,onRetry:u,onDismiss:l.clearError})]}),(0,V.jsxs)(Rr,{ref:f,size:`lg`,disabled:!s,onClick:u,className:`px-4`,children:[!d&&(0,V.jsx)(Re,{"data-icon":`inline-start`}),(0,V.jsx)(uV,{pending:d,pendingLabel:`Sending…`,label:`Send to Claude`})]})]})}):null}function GV({state:e,lock:t,onJump:n}){let{open:r,unsent:i,ready:a,idle:o,action:s,send:c}=VV(e,t);if(e.ended||o)return null;let l=r[0],u=s.error??(t?pA[t]:l?`Next open: ${l.id}`:`${i.length} locked in, ready to send`);return(0,V.jsxs)(Ru,{children:[(0,V.jsx)(zu,{render:l?(0,V.jsx)(Rr,{variant:`outline`,size:`sm`,onClick:()=>n(vB.question(l.id))}):(0,V.jsx)(Rr,{size:`sm`,disabled:!a,onClick:c,className:B(s.error&&`ring-2 ring-destructive/50`)}),children:l?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(se,{"data-icon":`inline-start`,className:`text-primary`}),(0,V.jsx)(`span`,{className:`tabular-nums`,children:r.length}),` open`]}):(0,V.jsxs)(V.Fragment,{children:[!s.pending&&(0,V.jsx)(Re,{"data-icon":`inline-start`}),(0,V.jsx)(uV,{pending:s.pending,pendingLabel:`Sending…`,label:`Send ${i.length}`})]})}),(0,V.jsx)(Bu,{side:`bottom`,children:u})]})}function KV(){let[e,t]=(0,O.useState)(null),[n,r]=(0,O.useState)(()=>({status:`connecting`,since:Date.now(),attempts:0,everOpened:!1})),i=(0,O.useRef)(!1);return(0,O.useEffect)(()=>{let e=null,n,a=0,o=!1,s=()=>{e=new EventSource(`/api/stream`),e.onopen=()=>{a=0,r({status:`open`,since:Date.now(),attempts:0,everOpened:!0})},e.onmessage=e=>{try{let n=JSON.parse(e.data);i.current=n.ended,t(n)}catch(e){console.error(`Bad frame from bridge`,e)}},e.onerror=()=>{if(e?.close(),!o){if(i.current){r(e=>({...e,status:`closed`,since:Date.now()}));return}a+=1,r(e=>({status:`reconnecting`,since:e.status===`reconnecting`?e.since:Date.now(),attempts:a,everOpened:e.everOpened})),n=setTimeout(s,Uu[Math.min(a-1,Uu.length-1)])}}};return s(),()=>{o=!0,clearTimeout(n),e?.close()}},[]),{state:e,connection:n}}var qV=3,JV=300,YV=34,XV=2*Math.PI*YV;function ZV({title:e}){let[t,n]=(0,O.useState)(qV),[r,i]=(0,O.useState)(!1),a=(0,O.useRef)(null),o=()=>{window.close(),setTimeout(()=>i(!0),300)};return(0,O.useEffect)(()=>{let e=a.current?.animate([{strokeDashoffset:0},{strokeDashoffset:XV}],{duration:qV*1e3,easing:`linear`,fill:`forwards`});return()=>e?.cancel()},[]),(0,O.useEffect)(()=>{let e=t>0?setTimeout(()=>n(e=>e-1),1e3):setTimeout(o,JV);return()=>clearTimeout(e)},[t]),(0,V.jsx)(`div`,{className:`fixed inset-0 z-[90] grid place-items-center bg-background/95 backdrop-blur-md animate-in fade-in-0`,children:(0,V.jsxs)(`div`,{className:`px-4 text-center`,children:[(0,V.jsxs)(`div`,{className:`relative mx-auto size-20`,children:[(0,V.jsxs)(`svg`,{viewBox:`0 0 80 80`,className:`size-20 -rotate-90`,"aria-hidden":!0,children:[(0,V.jsx)(`circle`,{cx:`40`,cy:`40`,r:YV,fill:`none`,stroke:`var(--border)`,strokeWidth:`4`}),(0,V.jsx)(`circle`,{ref:a,cx:`40`,cy:`40`,r:YV,fill:`none`,stroke:`var(--primary)`,strokeWidth:`4`,strokeLinecap:`round`,strokeDasharray:XV})]}),(0,V.jsx)(`span`,{className:`absolute inset-0 grid place-items-center text-2xl font-semibold tabular-nums`,children:r?(0,V.jsx)(te,{className:`size-7 text-success`}):t})]}),(0,V.jsx)(`h2`,{className:`mt-6 text-3xl font-semibold tracking-tight`,children:e}),(0,V.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:r?`Your browser kept this tab open. Close it whenever you like.`:`Back to your terminal. This tab closes in ${t}s.`}),!r&&(0,V.jsx)(Rr,{variant:`ghost`,size:`sm`,className:`mt-4 text-muted-foreground`,onClick:o,children:`Close now`})]})})}function QV({state:e,connection:t}){let[n,r]=(0,O.useState)(!1),i=(0,O.useRef)(t.status);if((0,O.useEffect)(()=>{let e=i.current;if(i.current=t.status,e===`reconnecting`&&t.status===`open`){r(!0);let e=setTimeout(()=>r(!1),2500);return()=>clearTimeout(e)}},[t.status]),e.ended){let t=e.summary?.status===`confirmed`;return(0,V.jsxs)(eH,{tone:`muted`,children:[(0,V.jsx)(ve,{className:`size-3.5`}),t?`Summary confirmed. Claude takes it from here in the terminal.`:`Session closed. Back to your terminal.`]})}if(t.status===`reconnecting`){let e=t.attempts>=6;return(0,V.jsxs)(eH,{tone:`alert`,children:[(0,V.jsx)(xm,{className:`text-sm`}),(0,V.jsx)(`span`,{children:e?(0,V.jsxs)(V.Fragment,{children:[`The bridge has been gone for a while. If its Claude Code session was closed, run`,` `,(0,V.jsx)(`code`,{className:`font-mono font-medium`,children:`/better-grill`}),` again. Still retrying.`]}):(0,V.jsxs)(V.Fragment,{children:[`Lost the bridge. Reconnecting`,t.attempts>1?` (attempt ${t.attempts})`:``,`… Everything you locked in is kept in the bridge.`]})}),(0,V.jsx)(Rr,{variant:`link`,size:`xs`,className:`h-auto px-0 text-current`,onClick:()=>window.location.reload(),children:`Reload`})]})}return n?(0,V.jsxs)(eH,{tone:`ok`,children:[(0,V.jsx)(te,{className:`size-3.5`}),`Reconnected. You're up to date.`]}):null}var $V={muted:`bg-muted/80 text-muted-foreground`,alert:`bg-destructive/10 text-destructive`,ok:`bg-success/10 text-success`};function eH({tone:e,children:t}){return(0,V.jsx)(`div`,{role:e===`alert`?`alert`:`status`,className:B(`flex items-center justify-center gap-2 rounded-lg border px-4 py-2 text-center text-xs font-medium shadow-sm backdrop-blur-md animate-in fade-in-0 slide-in-from-top-1`,$V[e]),children:t})}function tH(e){return Mp(`alert-dialog`,e)}function nH({...e}){return(0,V.jsx)(tH,{"data-slot":`alert-dialog`,...e})}function rH({...e}){return(0,V.jsx)(hp,{"data-slot":`alert-dialog-portal`,...e})}function iH({className:e,...t}){return(0,V.jsx)(ip,{"data-slot":`alert-dialog-overlay`,className:B(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function aH({className:e,size:t=`default`,...n}){return(0,V.jsxs)(rH,{children:[(0,V.jsx)(iH,{}),(0,V.jsx)(pp,{"data-slot":`alert-dialog-content`,"data-size":t,className:B(`group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...n})]})}function oH({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:B(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function sH({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:B(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function cH({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`alert-dialog-media`,className:B(`mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6`,e),...t})}function lH({className:e,...t}){return(0,V.jsx)(Pp,{"data-slot":`alert-dialog-title`,className:B(`font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function uH({className:e,...t}){return(0,V.jsx)(op,{"data-slot":`alert-dialog-description`,className:B(`text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function dH({className:e,...t}){return(0,V.jsx)(Rr,{"data-slot":`alert-dialog-action`,className:B(e),...t})}function fH({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,V.jsx)(ap,{"data-slot":`alert-dialog-cancel`,className:B(e),render:(0,V.jsx)(Rr,{variant:t,size:n}),...r})}var pH=()=>$O(`/api/end`,{});function mH({open:e,unsent:t,openCount:n,onCancel:r,onEnded:i}){let a=lA(pH),o=a.pending,s=async()=>{await a.run()&&i()};return(0,V.jsx)(nH,{open:e,onOpenChange:e=>{!e&&!o&&r()},onOpenChangeComplete:e=>{e&&a.clearError()},children:(0,V.jsxs)(aH,{children:[(0,V.jsxs)(oH,{children:[(0,V.jsx)(cH,{className:`bg-destructive/10 text-destructive`,children:(0,V.jsx)(fe,{})}),(0,V.jsx)(lH,{children:`Stop the grill here?`}),(0,V.jsx)(uH,{children:`Claude gets everything you have locked in and wraps up in the terminal. This tab closes itself afterwards.`})]}),(t>0||n>0)&&(0,V.jsxs)(`ul`,{className:`space-y-1 rounded-lg bg-muted/60 px-3 py-2 text-sm text-muted-foreground`,children:[t>0&&(0,V.jsxs)(`li`,{children:[(0,V.jsx)(`span`,{className:`font-medium text-foreground tabular-nums`,children:t}),` locked-in`,` `,t===1?`answer`:`answers`,` not sent yet, will be sent`]}),n>0&&(0,V.jsxs)(`li`,{children:[(0,V.jsx)(`span`,{className:`font-medium text-foreground tabular-nums`,children:n}),` `,n===1?`question`:`questions`,` still open, will stay unanswered`]})]}),a.error&&(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(Sm,{message:a.error,onRetry:()=>void s()}),(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`If the bridge is gone, there is nothing left to end.`,` `,(0,V.jsx)(Rr,{variant:`link`,className:`h-auto p-0`,onClick:i,children:`Close this tab anyway`})]})]}),(0,V.jsxs)(sH,{children:[(0,V.jsx)(fH,{disabled:o,children:`Keep grilling`}),(0,V.jsx)(dH,{variant:`destructive`,disabled:o,onClick:()=>void s(),children:(0,V.jsx)(uV,{pending:o,pendingLabel:`Ending…`,label:`End session`})})]})]})})}var hH=[{stage:`connecting`,active:`Connecting to your session`,done:`Connected to your session`},{stage:`reading`,active:`Claude is reading your request`}],gH={connecting:performance.timeOrigin},_H=``;function vH(e,t){if(_H!==`${e}:${t}`){_H=`${e}:${t}`;try{let t=JSON.parse(localStorage.getItem(Vu.warmUp)??`null`);if(t?.session===e)for(let[e,n]of Object.entries(t.reached))gH[e]=Math.min(gH[e]??n,n);localStorage.setItem(Vu.warmUp,JSON.stringify({session:e,reached:gH}))}catch{}}}var yH=[`M4.5 14Q6.7 11.8 8.7 13.1V17H4.5Z`,`M9.3 13.1Q12 11.1 14.7 13.1V17H9.3Z`,`M15.3 13.1Q17.3 11.8 19.5 14V17H15.3Z`],bH=`M4.5 11a7.5 5.5 0 0 0 15 0Z`,xH=[[34,-10,2.6,0],[46,8,2.2,.7],[58,-6,2.9,1.3],[66,12,2.4,.3],[40,14,3.1,1.9],[52,-14,2.7,2.4],[30,6,2.3,1.6],[62,-10,3.3,.9]],SH=900,CH=!1;function wH({stage:e,session:t,className:n}){let[r]=(0,O.useState)(()=>!CH),[i,a]=(0,O.useState)(CH);(0,O.useEffect)(()=>{if(CH=!0,i)return;let e=setTimeout(()=>a(!0),SH);return()=>clearTimeout(e)},[i]),gH[e]??=Date.now(),t!==void 0&&vH(t,e);let o=hH.findIndex(t=>t.stage===e);return(0,V.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:B(`flex w-full flex-col items-center text-center`,r&&`animate-in fill-mode-both fade-in-0 zoom-in-95 animation-duration-700`,n),children:[(0,V.jsxs)(`div`,{className:`relative size-40`,children:[(0,V.jsx)(`div`,{"aria-hidden":!0,className:B(`absolute -inset-8 transition-opacity duration-1000`,i?`opacity-100`:`opacity-0`),children:(0,V.jsx)(`div`,{className:`size-full bg-[radial-gradient(closest-side,color-mix(in_oklab,var(--primary)_28%,transparent),transparent)] motion-safe:animate-glow`})}),(0,V.jsx)(`div`,{"aria-hidden":!0,className:`absolute inset-x-0 top-[18%] h-[30%] motion-reduce:hidden`,children:i&&xH.map(([e,t,n,r])=>(0,V.jsx)(`span`,{className:`absolute bottom-0 size-1 rounded-full bg-primary animate-ember`,style:{left:`${e}%`,"--ember-drift":`${t}px`,animationDuration:`${n}s`,animationDelay:`${r}s`}},e))}),(0,V.jsxs)(`svg`,{"aria-hidden":!0,viewBox:`0 0 24 24`,className:`absolute inset-0 size-full overflow-visible`,children:[(0,V.jsx)(`clipPath`,{id:`warm-up-bowl`,children:(0,V.jsx)(`path`,{d:bH})}),(0,V.jsx)(`g`,{clipPath:`url(#warm-up-bowl)`,children:yH.map((e,t)=>(0,V.jsx)(`path`,{d:e,className:`fill-primary`,style:{transformBox:`fill-box`,transformOrigin:`bottom`,animation:[r&&`ignite 500ms ease-out ${150+t*200}ms both`,`flicker ${2+t*.4}s ease-in-out ${r?700+t*200:0}ms infinite`].filter(Boolean).join(`, `)}},e))})]}),(0,V.jsx)(tn,{hot:i,strokeWidth:1.1,className:`absolute inset-0 size-full text-foreground`})]}),(0,V.jsx)(`h2`,{className:`mt-2 text-xl font-semibold tracking-tight`,children:`Firing up the grill`}),(0,V.jsxs)(`div`,{className:`mt-6 w-full max-w-md overflow-hidden rounded-xl border bg-card text-left shadow-sm`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 border-b bg-muted/40 px-3 py-2`,children:[[0,1,2].map(e=>(0,V.jsx)(`span`,{className:`size-2 rounded-full bg-border`},e)),(0,V.jsx)(`span`,{className:`ml-2 font-mono text-[11px] text-muted-foreground`,children:`better-grill`})]}),(0,V.jsx)(`ol`,{className:`min-h-[4.375rem] space-y-1.5 px-3.5 py-3 font-mono text-xs`,children:hH.slice(0,o+1).map(({stage:e,...t},n)=>{let r=gH[e];if(r===void 0)return null;let i=hH.slice(n+1,o+1).find(e=>gH[e.stage]!==void 0),a=i&&gH[i.stage];return(0,V.jsxs)(`li`,{className:`flex min-h-5 items-center gap-3 animate-in fill-mode-both fade-in-0 slide-in-from-bottom-1 animation-duration-300`,children:[(0,V.jsx)(`time`,{className:`shrink-0 text-muted-foreground/70 tabular-nums`,children:EH(r)}),a===void 0?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Ak,{className:`size-3 text-primary`}),(0,V.jsxs)(`span`,{className:`min-w-0 flex-1 text-foreground`,children:[t.active,(0,V.jsx)(`span`,{className:`ml-1 inline-block h-3 w-1.5 translate-y-0.5 bg-primary motion-safe:animate-blink`})]}),(0,V.jsx)(TH,{since:r})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(te,{className:`size-3 shrink-0 text-success`}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 text-muted-foreground`,children:t.done}),(0,V.jsx)(`span`,{className:`shrink-0 text-muted-foreground/70 tabular-nums`,children:ZB(a-r)})]})]},e)})})]})]})}function TH({since:e}){let t=HV();return(0,V.jsx)(Yk,{variant:`outline`,className:`text-muted-foreground tabular-nums`,children:ZB(t-e)})}var EH=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1});function DH(){return(0,V.jsxs)(`div`,{className:`flex min-h-svh`,"aria-busy":!0,children:[(0,V.jsx)(`div`,{className:`hidden w-80 shrink-0 p-3 md:flex`,children:(0,V.jsxs)(`aside`,{className:`flex flex-1 flex-col rounded-xl bg-sidebar shadow-md ring-1 ring-sidebar-border`,children:[(0,V.jsxs)(`div`,{className:`flex h-12 items-center gap-2 border-b px-2`,children:[(0,V.jsx)(nn,{}),(0,V.jsx)(`span`,{className:`text-sm font-semibold tracking-tight`,children:`better grill`})]}),(0,V.jsx)(`div`,{className:`p-2`,children:[0,1,2].map(e=>(0,V.jsx)(fm,{showIcon:!0},e))})]})}),(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col pt-3 pr-3`,children:[(0,V.jsx)(`header`,{className:`h-12 shrink-0 rounded-xl border bg-background/80 shadow-md`}),(0,V.jsx)(`main`,{className:`grid flex-1 place-items-center px-4 pt-8 pb-[16svh]`,children:(0,V.jsx)(wH,{stage:`connecting`})})]})]})}function OH({state:e}){return(0,V.jsx)(wH,{stage:`reading`,session:e.startedAt})}function kH(){return(0,V.jsx)(Xk,{className:`animate-in fade-in-0 animation-duration-500`,children:(0,V.jsxs)(Zk,{children:[(0,V.jsx)($k,{variant:`icon`,className:`size-10`,children:(0,V.jsx)(ge,{className:`size-5`})}),(0,V.jsx)(eA,{className:`text-base`,children:`No questions this time`}),(0,V.jsxs)(tA,{children:[`Run `,(0,V.jsx)(`code`,{className:`font-mono whitespace-nowrap text-foreground`,children:`/better-grill`}),` to start again.`]})]})})}function AH(e,t){return e.ended?{label:`Session closed`,dot:`bg-muted-foreground/50`}:t.status===`reconnecting`?{label:`Reconnecting`,dot:`bg-destructive`,ping:!0}:e.claude===`listening`?{label:`Claude listening`,dot:`bg-success`,ping:!0}:{label:`Claude thinking`,dot:`bg-primary animate-pulse`}}function jH({state:e,connection:t}){let{label:n,dot:r,ping:i}=AH(e,t);return(0,V.jsxs)(Yk,{variant:`outline`,className:`h-6 gap-2 px-2.5 text-muted-foreground`,children:[(0,V.jsxs)(`span`,{className:`relative flex size-2`,children:[i&&(0,V.jsx)(`span`,{className:B(`absolute inline-flex size-full animate-ping rounded-full opacity-60`,r)}),(0,V.jsx)(`span`,{className:B(`relative inline-flex size-2 rounded-full`,r)})]}),n]})}function MH({state:e,connection:t,onEnd:n,actions:r}){return(0,V.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center gap-3 rounded-xl border bg-background/80 px-3 shadow-md backdrop-blur-md supports-backdrop-filter:bg-background/60`,children:[(0,V.jsxs)(Ru,{children:[(0,V.jsx)(zu,{render:(0,V.jsx)($p,{})}),(0,V.jsxs)(Bu,{side:`bottom`,children:[`Toggle panel `,(0,V.jsx)(Tm,{hotkey:pm.toggleSidebar})]})]}),(0,V.jsx)(tp,{orientation:`vertical`,className:`h-4 data-vertical:self-center`}),(0,V.jsx)(`h1`,{className:`min-w-0 truncate text-sm font-medium`,children:e.title}),e.mode===`docs`&&(0,V.jsxs)(Ru,{children:[(0,V.jsx)(zu,{render:(0,V.jsxs)(Yk,{variant:`outline`,className:`hidden text-muted-foreground sm:inline-flex`,children:[(0,V.jsx)(I,{"data-icon":`inline-start`}),`With docs`]})}),(0,V.jsx)(Bu,{side:`bottom`,children:`Claude records the glossary and ADRs as decisions settle`})]}),(0,V.jsx)(`div`,{className:`flex-1`}),(0,V.jsx)(jH,{state:e,connection:t}),!e.ended&&(0,V.jsxs)(Rr,{variant:`outline`,size:`sm`,onClick:n,children:[(0,V.jsx)(fe,{"data-icon":`inline-start`}),(0,V.jsx)(`span`,{className:`hidden sm:inline`,children:`End session`})]}),r]})}function NH({connection:e}){return(0,V.jsx)(`div`,{className:`grid min-h-svh place-items-center bg-background px-4`,children:(0,V.jsxs)(Xk,{className:`animate-in fade-in-0 animation-duration-300`,children:[(0,V.jsxs)(Zk,{children:[(0,V.jsx)($k,{className:`size-10 rounded-lg bg-destructive/10 text-destructive`,children:(0,V.jsx)(Xe,{className:`size-5`})}),(0,V.jsx)(eA,{className:`text-base`,children:`Can't reach this session`}),(0,V.jsxs)(tA,{children:[`It has probably ended. Run `,(0,V.jsx)(`code`,{className:`font-mono whitespace-nowrap text-foreground`,children:`/better-grill`}),` to start a new one.`]})]}),(0,V.jsxs)(nA,{children:[(0,V.jsxs)(Rr,{onClick:()=>window.location.reload(),children:[(0,V.jsx)(Pe,{"data-icon":`inline-start`}),`Retry`]}),(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Retrying automatically · attempt `,e.attempts]})]})]})})}function PH(e){let t=e.rounds.flatMap(t=>[...t.questionIds.filter(t=>e.questions[t]).map(e=>({key:vB.question(e),kind:`question`,id:e,round:t.number})),{key:vB.round(t.number),kind:`review`,round:t.number}]);return e.summary&&t.push({key:vB.summary,kind:`summary`}),t}var FH=e=>e.kind===`question`,IH=e=>t=>e.questions[t.id]?.status===`open`;function LH(e,t){return t.filter(FH).find(IH(e))??t.find(e=>e.kind===`summary`)??t.at(-1)}function RH(e,t,n){let r=t.filter(e=>e.kind!==`summary`&&e.round===n);return r.filter(FH).find(IH(e))??r.find(e=>e.kind===`review`)}function zH(e,t,n){let r=t.filter(FH),i=r.findIndex(e=>e.id===n),a=[...r.slice(i+1),...r.slice(0,Math.max(i,0))],o=r[i]?.round;return a.find(IH(e))??t.find(e=>e.kind===`review`&&e.round===o)}function BH(e){let[t,n]=(0,O.useState)(null),[r,i]=(0,O.useState)(null),a=e?PH(e):[],o=e?.rounds.length??0,s=!!e?.summary;if(e&&(r?.rounds!==o||r.summary!==s)){i({rounds:o,summary:s});let t=r?s&&!r.summary?a.find(e=>e.key===vB.summary):o>r.rounds?RH(e,a,o):void 0:LH(e,a);t&&n(t.key)}return{current:a.find(e=>e.key===t)??(e?LH(e,a):void 0),go:n,lockedIn:(0,O.useCallback)(t=>{if(!e)return;let r=zH(e,PH(e),t);n(e=>r&&(e===null||e===vB.question(t))?r.key:e)},[e])}}var VH=(e,t)=>$O(`/api/summary/respond`,{confirmed:e,text:t});function HH({summary:e,lock:t,onConfirmed:n}){let[r,i]=(0,O.useState)(!1),[a,o]=(0,O.useState)(``),[s,c]=(0,O.useState)(null),l=lA(VH),u=l.pending,d=async e=>{c(e),await l.run(e,e?void 0:a.trim()||void 0)&&(i(!1),o(``),e&&n())},f=e.status===`pending`&&!t;return(0,V.jsxs)(fV,{id:vB.summary,className:`scroll-mt-20 gap-5 pt-5 ring-primary/30 animate-in fade-in-0 slide-in-from-bottom-2 animation-duration-500`,children:[(0,V.jsxs)(pV,{className:`px-5 sm:px-6`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex size-10 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,V.jsx)(le,{className:`size-5`})}),(0,V.jsx)(hV,{className:`font-medium text-primary`,children:`Shared understanding?`}),(0,V.jsx)(mV,{className:`text-2xl font-semibold tracking-tight`,children:`Here is what we settled`})]}),(0,V.jsxs)(gV,{className:`space-y-4 px-5 sm:px-6`,children:[(0,V.jsx)(dB,{className:`text-sm`,children:e.markdown}),e.status===`confirmed`&&(0,V.jsxs)(Of,{className:`border-success/30 bg-success/5 text-success`,children:[(0,V.jsx)(te,{}),(0,V.jsx)(Af,{className:`text-success`,children:`Confirmed. Claude takes it from here.`})]}),e.status===`rejected`&&(0,V.jsxs)(Of,{children:[(0,V.jsx)(Je,{}),(0,V.jsxs)(Af,{children:[`Sent back to Claude`,e.feedback?`: “${e.feedback}”`:`.`]})]}),e.status===`pending`&&t&&(0,V.jsxs)(lV,{children:[pA[t],` The summary can't be answered now.`]}),f&&r&&(0,V.jsx)(rA,{value:a,disabled:u,onChange:e=>{l.clearError(),o(e.target.value)},autoFocus:!0,rows:3,placeholder:`What is missing or wrong?`}),f&&l.error&&(0,V.jsx)(Sm,{message:l.error,onRetry:s===null?void 0:()=>void d(s),onDismiss:l.clearError})]}),f&&(0,V.jsx)(_V,{className:`flex-wrap gap-2 px-5 sm:px-6`,children:r?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Rr,{disabled:u||!a.trim(),onClick:()=>void d(!1),children:(0,V.jsx)(uV,{pending:u,pendingLabel:`Sending back…`,label:`Send back to Claude`})}),(0,V.jsx)(Rr,{variant:`ghost`,disabled:u,onClick:()=>i(!1),children:`Cancel`})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(Rr,{disabled:u,onClick:()=>void d(!0),children:[!u&&(0,V.jsx)(te,{"data-icon":`inline-start`}),(0,V.jsx)(uV,{pending:u,pendingLabel:`Confirming…`,label:`Yes, that's it`})]}),(0,V.jsx)(Rr,{variant:`outline`,disabled:u,onClick:()=>i(!0),children:`Not yet`})]})})]})}var UH=(e,t)=>$O(`/api/questions/${e}/visualize`,t),WH=new Map;function GH(e,t){let n=`${e}@${t}`,r=WH.get(n);return r||(r=ek(`/api/questions/${e}/visualization`),r.catch(()=>WH.delete(n)),WH.set(n,r)),r}function KH(e,t){let[n,r]=(0,O.useState)(null),[i,a]=(0,O.useState)(null),[o,s]=(0,O.useState)(0);return(0,O.useEffect)(()=>{if(t===0)return;let n=!0;return a(null),GH(e,t).then(e=>n&&r(e.html),e=>n&&a(e instanceof Error?e.message:String(e))),()=>{n=!1}},[e,t,o]),{html:t===0?null:n,error:i,retry:()=>s(e=>e+1)}}var qH=`better-grill:size`,JH=2e4,YH=[`default-src 'none'`,`script-src 'unsafe-inline' https://cdnjs.cloudflare.com https://cdn.jsdelivr.net`,`style-src 'unsafe-inline'`,`img-src data: blob:`,`media-src data: blob:`,`font-src data:`,`connect-src 'none'`,`form-action 'none'`,`base-uri 'none'`].join(`; `),XH={"--background":`--card`,"--foreground":`--card-foreground`,"--card":`--popover`,"--muted":`--muted`,"--muted-foreground":`--muted-foreground`,"--border":`--border`,"--primary":`--primary`,"--primary-foreground":`--primary-foreground`,"--success":`--success`,"--destructive":`--destructive`,"--series-1":`--series-1`,"--series-2":`--series-2`,"--series-3":`--series-3`,"--series-4":`--series-4`,"--series-5":`--series-5`,"--radius":`--radius`},ZH=`--font-sans: "Geist Variable", ui-sans-serif, system-ui, sans-serif; --font-mono: "Geist Mono Variable", ui-monospace, monospace;`,QH=`(() => {
51
+ let last = -1;
52
+ const post = () => {
53
+ const body = document.body;
54
+ const height = Math.ceil(Math.max(body.getBoundingClientRect().height, body.scrollHeight));
55
+ if (height === last) return;
56
+ last = height;
57
+ parent.postMessage({ type: "${qH}", height }, "*");
58
+ };
59
+ addEventListener("DOMContentLoaded", () => {
60
+ new ResizeObserver(post).observe(document.body);
61
+ post();
62
+ });
63
+ addEventListener("load", post);
64
+ document.fonts?.ready.then(post);
65
+ })();`;function $H(){let e=getComputedStyle(document.documentElement);return Object.entries(XH).map(([t,n])=>`${t}: ${e.getPropertyValue(n).trim()};`).join(` `)}function eU({fragment:e,theme:t,tokens:n,fontFaces:r}){return`<!doctype html>
66
+ <html lang="en" data-theme="${t}">
67
+ <head>
68
+ <meta charset="utf-8">
69
+ <meta http-equiv="Content-Security-Policy" content="${YH}">
70
+ <meta name="viewport" content="width=device-width, initial-scale=1">
71
+ <style>
72
+ ${r}
73
+ :root { color-scheme: ${t}; ${n} ${ZH} }
74
+ *, *::before, *::after { box-sizing: border-box; }
75
+ /* The frame grows to the page, so the page itself never scrolls. */
76
+ html { -webkit-text-size-adjust: 100%; overflow: hidden; }
77
+ body { display: flow-root; margin: 0; padding: 2px; font: 14px/1.5 var(--font-sans); color: var(--foreground); background: var(--background); -webkit-font-smoothing: antialiased; }
78
+ img, svg, video, canvas { max-width: 100%; }
79
+ [hidden] { display: none !important; }
80
+ </style>
81
+ <script>${QH}<\/script>
82
+ </head>
83
+ <body>
84
+ ${e}
85
+ </body>
86
+ </html>`}var tU=`modulepreload`,nU=function(e){return`/`+e},rU={},iU=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=nU(t,n),t=s(t),t in rU)return;rU[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:tU,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},aU,oU=()=>aU??=iU(()=>import(`./fonts-CJmUTqBe.js`).then(e=>e.FONT_FACES),[]);function sU({html:e,title:t,className:n}){let{resolved:r}=Ju(),i=(0,O.useRef)(null),[a,o]=(0,O.useState)(null),[s,c]=(0,O.useState)(null);return(0,O.useEffect)(()=>{let t=!0;return oU().then(n=>{t&&o(eU({fragment:e,theme:r,tokens:$H(),fontFaces:n}))}),()=>{t=!1}},[e,r]),(0,O.useEffect)(()=>{let e=e=>{if(e.source!==i.current?.contentWindow)return;let t=e.data;t?.type===`better-grill:size`&&typeof t.height==`number`&&Number.isFinite(t.height)&&c(Math.min(Math.max(Math.round(t.height),0),JH))};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[]),(0,V.jsxs)(`div`,{className:B(`relative`,n),children:[s===null&&(0,V.jsx)(`div`,{className:`grid h-48 place-items-center`,children:(0,V.jsx)(Ak,{className:`size-5 text-muted-foreground`})}),a&&(0,V.jsx)(`iframe`,{ref:i,title:t,srcDoc:a,sandbox:`allow-scripts`,referrerPolicy:`no-referrer`,style:s===null?void 0:{height:s},className:B(`block w-full border-0`,s===null&&`pointer-events-none absolute inset-0 h-48 opacity-0`)})]})}function cU({question:e,lock:t,actionsSlot:n,actions:r}){let i=e.visualization,a=i?.version??0,o=i?.status===`pending`,s=KH(e.id,a),c=!!i?.readyAt&&!!e.editedAt&&e.editedAt>i.readyAt,l=(0,V.jsxs)(fV,{className:`relative gap-5 pt-5 shadow-xs`,children:[(0,V.jsxs)(pV,{className:`grid-cols-1 gap-2 px-5 sm:px-6`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(Yk,{className:`font-mono`,children:e.id}),(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Visualization`}),o&&a>0&&(0,V.jsxs)(Yk,{variant:`secondary`,className:`bg-primary/10 text-primary`,children:[(0,V.jsx)(Ak,{"data-icon":`inline-start`}),`Regenerating`]}),c&&(0,V.jsxs)(Yk,{variant:`secondary`,children:[(0,V.jsx)(Ke,{"data-icon":`inline-start`}),`Made before Claude's last edit`]})]}),(0,V.jsx)(mV,{className:`text-xl font-semibold tracking-tight text-balance`,children:e.title})]}),(0,V.jsxs)(gV,{className:`grid grid-cols-1 gap-4 px-5 sm:px-6`,children:[a>0?s.html===null?s.error?(0,V.jsx)(Sm,{message:s.error,onRetry:s.retry}):(0,V.jsx)(`div`,{className:`grid h-48 place-items-center`,children:(0,V.jsx)(Ak,{className:`size-5 text-muted-foreground`})}):(0,V.jsx)(sU,{html:s.html,title:`Visualization of ${e.id}: ${e.title}`}):o?(0,V.jsx)(lU,{since:i.requestedAt,note:i.note,lock:t}):i?.status===`failed`?null:(0,V.jsxs)(Xk,{className:`border`,children:[(0,V.jsxs)(Zk,{children:[(0,V.jsx)($k,{variant:`icon`,children:(0,V.jsx)(Be,{})}),(0,V.jsx)(eA,{children:`No visualization yet`}),(0,V.jsx)(tA,{children:`Claude visualizes the question right here, so it's easier to understand. It takes a minute or two, and you can keep answering meanwhile.`})]}),(0,V.jsx)(nA,{className:`max-w-md`,children:(0,V.jsx)(uU,{question:e,lock:t,label:`Visualize`})})]}),i?.status===`failed`&&(0,V.jsxs)(Of,{children:[(0,V.jsx)(ie,{}),(0,V.jsx)(kf,{children:`No visualization for this one`}),(0,V.jsx)(Af,{children:i.reason})]}),(a>0||i?.status===`failed`)&&!o&&(0,V.jsx)(uU,{question:e,lock:t,label:a>0?`Regenerate`:`Try again`,className:`border-t pt-4`})]})]});return n?(0,V.jsxs)(V.Fragment,{children:[l,(0,V.jsxs)(dV,{slot:n,children:[r,(0,V.jsx)(`div`,{className:`flex-1`}),t&&(0,V.jsx)(lV,{children:pA[t]})]})]}):l}function lU({since:e,note:t,lock:n}){let r=HV();return(0,V.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`grid gap-2`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border border-dashed px-4 py-3 font-mono text-xs`,children:[(0,V.jsx)(Ak,{className:`size-4 text-primary`}),(0,V.jsxs)(`span`,{className:`min-w-0 flex-1 text-foreground`,children:[`Claude is visualizing this question`,(0,V.jsx)(`span`,{className:`ml-1 inline-block h-3 w-1.5 translate-y-0.5 bg-primary motion-safe:animate-blink`})]}),(0,V.jsx)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:ZB(r-e)})]}),t&&(0,V.jsxs)(`p`,{className:`px-1 text-xs text-muted-foreground`,children:[`You asked: `,t]}),n===`offline`&&(0,V.jsx)(lV,{className:`px-1 text-destructive`,children:`Bridge unreachable. The visualization shows up once it reconnects.`})]})}function uU({question:e,lock:t,label:n,className:r}){let[i,a]=(0,O.useState)(``),o=lA(UH),s=!!t||o.pending,c=async t=>{t.preventDefault(),!s&&await o.run(e.id,{note:i.trim()||void 0})&&a(``)};return(0,V.jsxs)(`form`,{onSubmit:e=>void c(e),className:B(`grid w-full gap-2`,r),children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,V.jsx)($f,{value:i,onChange:e=>{o.clearError(),a(e.target.value)},disabled:s,maxLength:2e3,"aria-label":`What the visualization should show`,placeholder:n===`Regenerate`?`What should change? (optional)`:`What to focus on (optional)`,className:`min-w-48 flex-1`}),(0,V.jsx)(Rr,{type:`submit`,variant:n===`Visualize`?`default`:`outline`,disabled:s,children:(0,V.jsx)(uV,{pending:o.pending,label:n,pendingLabel:`Asking…`})})]}),o.error&&(0,V.jsx)(Sm,{message:o.error,onDismiss:o.clearError})]})}function dU({active:e,working:t,unseen:n,onClick:r,hotkey:i}){return(0,V.jsxs)(Ru,{children:[(0,V.jsx)(zu,{render:(0,V.jsxs)(Rr,{variant:e?`secondary`:`outline`,onClick:r,"aria-pressed":e,className:B(`relative`,e&&`border-primary/40 bg-primary/10 text-primary hover:bg-primary/15`),children:[t?(0,V.jsx)(Ak,{"data-icon":`inline-start`}):(0,V.jsx)(Be,{"data-icon":`inline-start`}),`Visualization`,n&&!e&&(0,V.jsxs)(`span`,{className:`absolute -top-1 -right-1 flex size-2.5`,children:[(0,V.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-primary opacity-60`}),(0,V.jsx)(`span`,{className:`relative inline-flex size-2.5 rounded-full bg-primary ring-2 ring-background`})]})]})}),(0,V.jsxs)(Bu,{children:[e?`Back to the question`:t?`Claude is visualizing it`:`Show the visualization`,` `,(0,V.jsx)(Tm,{hotkey:i})]})]})}function fU(e){let[t,n]=(0,O.useState)({}),[r,i]=(0,O.useState)({}),a=(0,O.useCallback)(e=>!!t[e],[t]),o=(0,O.useCallback)(e=>n(t=>({...t,[e]:!t[e]})),[]),s=e&&t[e.id]?e.id:null,c=e?.visualization?.version??0;return(0,O.useEffect)(()=>{s&&i(e=>e[s]===c?e:{...e,[s]:c})},[s,c]),{showing:a,toggle:o,unseen:(0,O.useCallback)(e=>(e.visualization?.version??0)>(r[e.id]??0),[r])}}function pU(e,t){let[n,r]=(0,O.useState)(e);return e!==null&&e!==n&&r(e),(0,O.useEffect)(()=>{if(e!==null)return;let n=setTimeout(()=>r(null),t);return()=>clearTimeout(n)},[e,t]),e??n}function mU(){let{state:e,connection:t}=KV(),[n,r]=(0,O.useState)(null),[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(null),[c,l]=Wu(Vu.sidebarOpen,!0),[u,d]=(0,O.useState)(null),f=n?e?.questions[n]:void 0,p=pU(n,200),m=p?e?.questions[p]:void 0,h=(0,O.useCallback)(()=>r(null),[]),g=gB(f),{current:_,go:v,lockedIn:y}=BH(e),b=_?.kind===`question`?_.id:null,x=b?e?.questions[b]:void 0,S=fU(x);if((0,O.useEffect)(()=>{b&&r(e=>e&&e!==b?b:e)},[b]),Ef(pm.discuss,()=>r(e=>b&&e!==b?b:null)),Ef(pm.visualize,()=>b&&S.toggle(b),{enabled:!!x&&x.status!==`dropped`}),(0,O.useEffect)(()=>{window.scrollTo({top:0}),TV()},[_?.key]),!e)return t.status===`reconnecting`&&t.attempts>=2?(0,V.jsx)(NH,{connection:t}):(0,V.jsx)(DH,{});let C=fA(e,t),w=mA(Object.values(e.questions)),T=_?.kind===`summary`?void 0:e.rounds.find(e=>e.number===_?.round),E=_?.kind===`question`,D=_?.kind===`review`&&T===e.rounds.at(-1)?gA(e):[],k=e=>({question:e,discussing:n===e.id,unread:g(e),onDiscuss:()=>r(t=>t===e.id?null:e.id)}),A=t=>{let n=e.questions[t];if(!n)return null;let r=S.showing(t)&&n.status!==`dropped`,{discussing:i,unread:a,onDiscuss:o}=k(n),s=(0,V.jsx)(dU,{active:r,working:n.visualization?.status===`pending`,unseen:S.unseen(n),onClick:()=>S.toggle(t),hotkey:pm.visualize});return(0,V.jsxs)(Br,{fallback:(e,n)=>(0,V.jsx)(jf,{what:`Question ${t}`,error:e,onReset:n}),children:[(0,V.jsx)(`div`,{hidden:r,children:(0,V.jsx)(IV,{...k(n),lock:C,onLockedIn:()=>y(t),actionsSlot:r?null:u,extraActions:s,hidden:r})}),(r||n.visualization)&&(0,V.jsx)(`div`,{hidden:!r,children:(0,V.jsx)(cU,{question:n,lock:C,actionsSlot:r?u:null,actions:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(aV,{count:n.chat.length,unread:a,active:i,onClick:o,hotkey:pm.discuss}),s]})})})]},`${t}-${n.editedAt??0}`)},j=t=>{let n=e.questions[t];return n?(0,V.jsx)(Br,{fallback:(e,n)=>(0,V.jsx)(jf,{what:`Question ${t}`,error:e,onReset:n}),children:(0,V.jsx)(LV,{...k(n),onOpen:()=>v(vB.question(t))})},t):null};return(0,V.jsxs)(Zp,{open:c,onOpenChange:l,style:{"--sidebar-width":`var(--app-sidebar-w, 20rem)`},children:[(0,V.jsx)(nV,{state:e,current:_?.key??null,onJump:v,chatFor:n,unread:g,onOpenChat:r}),(0,V.jsxs)(em,{className:B(`min-w-0 bg-transparent pr-3 transition-[padding] duration-200 ease-linear`,f&&`pr-[calc(var(--chat-w)+0.75rem)]`),children:[(0,V.jsxs)(`div`,{className:`pointer-events-none sticky top-0 z-30 space-y-2 pt-3 *:pointer-events-auto before:absolute before:inset-x-0 before:top-0 before:h-3 before:canvas`,children:[(0,V.jsx)(MH,{state:e,connection:t,onEnd:()=>a(!0),actions:(0,V.jsx)(GV,{state:e,lock:C,onJump:v})}),(0,V.jsx)(QV,{state:e,connection:t})]}),e.rounds.length===0?(0,V.jsx)(`div`,{className:`grid flex-1 place-items-center px-4 pt-8 pb-[16svh]`,children:e.ended?(0,V.jsx)(kH,{}):(0,V.jsx)(OH,{state:e})}):(0,V.jsx)(`div`,{className:B(`px-8 pt-8`,E?`flex flex-1 flex-col pb-3`:`pb-32`),children:(0,V.jsxs)(`div`,{className:B(`mx-auto max-w-3xl`,E&&`flex w-full flex-1 flex-col`),children:[_&&(0,V.jsxs)(`div`,{className:`mb-6 animate-in fill-mode-both fade-in-0 slide-in-from-bottom-2 animation-duration-300`,children:[_.kind===`summary`&&e.summary&&(0,V.jsx)(Br,{fallback:(e,t)=>(0,V.jsx)(jf,{what:`Summary`,error:e,onReset:t}),children:(0,V.jsx)(HH,{summary:e.summary,lock:C,onConfirmed:()=>s(`Summary confirmed`)})}),T&&_.kind!==`summary`&&(0,V.jsx)(zV,{round:T,questions:hA(e,T.questionIds),review:_.kind===`review`,children:_.kind===`question`?A(_.id):T.questionIds.map(j)}),D.length>0&&(0,V.jsx)(sV,{children:D.map(e=>j(e.id))})]},_.key),(0,V.jsx)(WV,{state:e,lock:C,onJump:v,showBar:_?.kind===`review`}),E&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{"aria-hidden":!0,className:`min-h-20 flex-1`}),(0,V.jsx)(`div`,{ref:d,className:`sticky bottom-3 z-20`})]})]})})]}),(0,V.jsx)(bm,{open:!!f,children:m&&(0,V.jsx)(Br,{fallback:(e,t)=>(0,V.jsx)(`div`,{className:`h-full bg-background p-4`,children:(0,V.jsx)(jf,{what:`Discussion`,error:e,onReset:t})}),children:(0,V.jsx)(hB,{question:m,lock:C,claude:e.claude,onClose:h})},m.id)}),(0,V.jsx)(mH,{open:i,unsent:w.filter(e=>e.status===`answered`&&!e.answer?.sent).length,openCount:w.filter(e=>e.status===`open`).length,onCancel:()=>a(!1),onEnded:()=>{a(!1),s(`Session ended`)}}),o&&(0,V.jsx)(ZV,{title:o})]})}function hU(){return(0,V.jsx)(Yu,{children:(0,V.jsx)(mU,{})})}(0,$e.createRoot)(document.getElementById(`root`)).render((0,V.jsx)(O.StrictMode,{children:(0,V.jsx)(hU,{})}));