@okhay-p/mivra 0.1.6 → 0.1.7
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.
- package/dist/{chunk-DYXNHODU.js → chunk-M62PZTK3.js} +117 -4
- package/dist/chunk-M62PZTK3.js.map +7 -0
- package/dist/{chunk-KE5ZEREE.js → chunk-T5WM74CI.js} +2 -1
- package/dist/{chunk-B47HA6IQ.js → chunk-TKDX5OCX.js} +739 -478
- package/dist/chunk-TKDX5OCX.js.map +7 -0
- package/dist/cli.js +492 -123
- package/dist/cli.js.map +4 -4
- package/dist/{client-4UG5W5NJ.js → client-76YUHG4T.js} +2 -2
- package/dist/exercise-child.js +1 -1
- package/dist/extract-child.js +2 -2
- package/dist/python-child.js +1 -1
- package/dist/{start-SX3BCBIN.js → start-GVAACONX.js} +14504 -12040
- package/dist/start-GVAACONX.js.map +7 -0
- package/drizzle/0021_strange_gamma_corps.sql +2 -0
- package/drizzle/0022_fast_forgotten_one.sql +28 -0
- package/drizzle/0023_low_wiccan.sql +17 -0
- package/drizzle/0024_windy_annihilus.sql +1 -0
- package/drizzle/0025_brief_rictor.sql +6 -0
- package/drizzle/0026_greedy_sally_floyd.sql +1 -0
- package/drizzle/0027_regular_calypso.sql +41 -0
- package/drizzle/0028_lazy_agent_zero.sql +17 -0
- package/drizzle/meta/0021_snapshot.json +2313 -0
- package/drizzle/meta/0022_snapshot.json +2529 -0
- package/drizzle/meta/0023_snapshot.json +2654 -0
- package/drizzle/meta/0024_snapshot.json +2662 -0
- package/drizzle/meta/0025_snapshot.json +2707 -0
- package/drizzle/meta/0026_snapshot.json +2714 -0
- package/drizzle/meta/0027_snapshot.json +2816 -0
- package/drizzle/meta/0028_snapshot.json +2940 -0
- package/drizzle/meta/_journal.json +56 -0
- package/package.json +1 -1
- package/web/assets/exercise-workers/{exercise.worker-DzC1lTCg.js → exercise.worker-LCHlYekD.js} +11 -11
- package/web/assets/exercise-workers/python-exercise.worker-DeTriNjh.js +236 -0
- package/web/assets/index-CQjNLnxP.js +540 -0
- package/web/assets/index-DpV5il_3.css +1 -0
- package/web/assets/{module-ES6BEMUI-Chb6aYUZ.js → module-ES6BEMUI-B2wjplZC.js} +1 -1
- package/web/assets/render.worker-OksjuBjV.js +537 -0
- package/web/index.html +2 -2
- package/dist/chunk-B47HA6IQ.js.map +0 -7
- package/dist/chunk-DYXNHODU.js.map +0 -7
- package/dist/start-SX3BCBIN.js.map +0 -7
- package/web/assets/exercise-workers/python-exercise.worker-CtSr-syJ.js +0 -236
- package/web/assets/index-D3M-SX0V.js +0 -538
- package/web/assets/index-DUFQVtIh.css +0 -1
- package/web/assets/render.worker-D6KYAHiU.js +0 -537
- /package/dist/{chunk-KE5ZEREE.js.map → chunk-T5WM74CI.js.map} +0 -0
- /package/dist/{client-4UG5W5NJ.js.map → client-76YUHG4T.js.map} +0 -0
|
@@ -1,538 +0,0 @@
|
|
|
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,t.exports),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 ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function ie(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 ae(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,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+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+re(a,u),c+=ae(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+re(a,u++),c+=ae(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ae(ie(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 oe(e,t,n){if(e==null)return e;var r=[],i=0;return ae(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function k(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 se=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 ce(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,se)}catch(e){se(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function le(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 ce(le.bind(null,e))}var ue={map:oe,forEach:function(e,t,n){oe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return oe(e,function(){t++}),t},toArray:function(e){return oe(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ue,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=le,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=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:k}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ce,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.1`})),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&&ne(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&&ne(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 ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function ne(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,ne(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.1`})),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`),ee=Symbol.for(`react.transitional.element`),te=Symbol.for(`react.portal`),ne=Symbol.for(`react.fragment`),re=Symbol.for(`react.strict_mode`),ie=Symbol.for(`react.profiler`),ae=Symbol.for(`react.consumer`),oe=Symbol.for(`react.context`),k=Symbol.for(`react.forward_ref`),se=Symbol.for(`react.suspense`),ce=Symbol.for(`react.suspense_list`),le=Symbol.for(`react.memo`),ue=Symbol.for(`react.lazy`),de=Symbol.for(`react.activity`),fe=Symbol.for(`react.legacy_hidden`),pe=Symbol.for(`react.memo_cache_sentinel`),me=Symbol.for(`react.view_transition`),he=Symbol.for(`react.recoverable`),ge=Symbol.iterator;function _e(e){return typeof e!=`object`||!e?null:(e=ge&&e[ge]||e[`@@iterator`],typeof e==`function`?e:null)}var ve=Symbol.for(`react.client.reference`);function ye(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ne:return`Fragment`;case ie:return`Profiler`;case re:return`StrictMode`;case se:return`Suspense`;case ce:return`SuspenseList`;case de:return`Activity`;case me:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case te:return`Portal`;case oe:return e.displayName||`Context`;case ae:return(e._context.displayName||`Context`)+`.Consumer`;case k:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case le:return t=e.displayName||null,t===null?ye(e.type)||`Memo`:t;case ue:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var be=Array.isArray,xe=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Se=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ce={pending:!1,data:null,method:null,action:null},we=[],Te=-1;function Ee(e){return{current:e}}function De(e){0>Te||(e.current=we[Te],we[Te]=null,Te--)}function Oe(e,t){Te++,we[Te]=e.current,e.current=t}var ke=Ee(null),Ae=Ee(null),je=Ee(null),Me=Ee(null);function Ne(e,t){switch(Oe(je,t),Oe(Ae,e),Oe(ke,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Mp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Mp(t),e=Np(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}De(ke),Oe(ke,e)}function Pe(){De(ke),De(Ae),De(je)}function Fe(e){var t=e.memoizedState;t!==null&&(Dh._currentValue=t.memoizedState,Oe(Me,e)),t=ke.current;var n=Np(t,e.type);t!==n&&(Oe(Ae,e),Oe(ke,n))}function Ie(e){Ae.current===e&&(De(ke),De(Ae)),Me.current===e&&(De(Me),Dh._currentValue=Ce)}var Le,Re;function ze(e){if(Le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Le=t&&t[1]||``,Re=-1<e.stack.indexOf(`
|
|
2
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
-
`+Le+e+Re}var Be=!1;function Ve(e,t){if(!e||Be)return``;Be=!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{Be=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ze(n):``}function He(e,t){switch(e.tag){case 26:case 27:case 5:return ze(e.type);case 16:return ze(`Lazy`);case 13:return e.child!==t&&t!==null?ze(`Suspense Fallback`):ze(`Suspense`);case 19:return ze(`SuspenseList`);case 0:case 15:return Ve(e.type,!1);case 11:return Ve(e.type.render,!1);case 1:return Ve(e.type,!0);case 31:return ze(`Activity`);case 30:return ze(`ViewTransition`);default:return``}}function Ue(e){try{var t=``,n=null;do t+=He(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
-
Error generating stack: `+e.message+`
|
|
8
|
-
`+e.stack}}var We=Object.prototype.hasOwnProperty,Ge=t.unstable_scheduleCallback,Ke=t.unstable_cancelCallback,qe=t.unstable_shouldYield,Je=t.unstable_requestPaint,Ye=t.unstable_now,Xe=t.unstable_getCurrentPriorityLevel,Ze=t.unstable_ImmediatePriority,Qe=t.unstable_UserBlockingPriority,$e=t.unstable_NormalPriority,et=t.unstable_LowPriority,tt=t.unstable_IdlePriority,nt=t.log,rt=t.unstable_setDisableYieldValue,it=null,at=null;function ot(e){if(typeof nt==`function`&&rt(e),at&&typeof at.setStrictMode==`function`)try{at.setStrictMode(it,e)}catch{}}var st=Math.clz32?Math.clz32:ut,ct=Math.log,lt=Math.LN2;function ut(e){return e>>>=0,e===0?32:31-(ct(e)/lt|0)|0}var dt=256,ft=262144,pt=4194304;function mt(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 ht(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=mt(n))):i=mt(o):i=mt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=mt(n))):i=mt(o)):i=mt(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 gt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _t(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-st(n),i=1<<r;t|=e[r],n&=~i}return t}function vt(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 yt(){var e=pt;return pt<<=1,!(pt&62914560)&&(pt=4194304),e}function bt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function St(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-st(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&&Ct(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ct(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-st(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function wt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Tt(e,t){var n=t&-t;return n=n&42?1:Et(n),(n&(e.suspendedLanes|t))===0?n:0}function Et(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 Dt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ot(){var e=Se.p;return e===0?(e=window.event,e===void 0?32:Uh(e.type)):e}function kt(e,t){var n=Se.p;try{return Se.p=e,t()}finally{Se.p=n}}var At=Math.random().toString(36).slice(2),jt=`__reactFiber$`+At,Mt=`__reactProps$`+At,Nt=`__reactContainer$`+At,Pt=`__reactEvents$`+At,Ft=`__reactListeners$`+At,A=`__reactHandles$`+At,It=`__reactResources$`+At,Lt=`__reactMarker$`+At,Rt=`__reactLoad$`+At;function zt(e){delete e[jt],delete e[Mt],delete e[Ft],delete e[A]}function Bt(e){var t;if(t=e[jt])return t;for(var n=e.parentNode;n;){if(t=n[Nt]||n[jt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Nm(e);e!==null;){if(n=e[jt])return n;e=Nm(e)}return t}e=n,n=e.parentNode}return null}function Vt(e){if(e=e[jt]||e[Nt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ut(e){var t=e[It];return t||=e[It]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Wt(e){e[Lt]=!0}function Gt(e){e[Rt]=void 0}var Kt=new Set,qt={};function Jt(e,t){Yt(e,t),Yt(e+`Capture`,t)}function Yt(e,t){for(qt[e]=t,e=0;e<t.length;e++)Kt.add(t[e])}var Xt=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]*$`),Zt={},Qt={};function $t(e){return We.call(Qt,e)?!0:We.call(Zt,e)?!1:Xt.test(e)?Qt[e]=!0:(Zt[e]=!0,!1)}var en=!1;function tn(){var e=en;return en=!1,e}function nn(e,t,n){if($t(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 rn(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 an(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 on(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function sn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function j(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 cn(e){if(!e._valueTracker){var t=sn(e)?`checked`:`value`;e._valueTracker=j(e,t,``+e[t])}}function ln(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=sn(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var un=/[\n"\\]/g;function dn(e){return e.replace(un,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function fn(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=``+on(t)):e.value!==``+on(t)&&(e.value=``+on(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):mn(e,on(n)):o===`number`&&e.value==t?mn(e,on(e.value)):mn(e,on(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=``+on(s):e.removeAttribute(`name`)}function pn(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)){cn(e);return}n=n==null?``:``+on(n),t=t==null?n:``+on(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),cn(e)}function mn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function hn(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=``+on(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 gn(e,t,n){t!=null&&(t=``+on(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+on(n)}function _n(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(be(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=on(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),cn(e)}function vn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var yn=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 bn(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||yn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function xn(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]=``,en=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(bn(e,a,r),en=!0)}else for(var o in t)t.hasOwnProperty(o)&&bn(e,o,t[o])}function Sn(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 Cn=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`]]),wn=/^[\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 Tn(e){return wn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function En(){}var Dn=null;function On(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kn=null,An=null;function jn(e){var t=Vt(e);if(t&&(e=t.stateNode)){var n=e[Mt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(fn(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="`+dn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Mt]||null;if(!a)throw Error(i(90));fn(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&&ln(r)}break a;case`textarea`:gn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&hn(e,!!n.multiple,t,!1)}}}var Mn=!1;function Nn(e,t,n){if(Mn)return e(t,n);Mn=!0;try{return e(t)}finally{if(Mn=!1,(kn!==null||An!==null)&&(af(),kn&&(t=kn,e=An,An=kn=null,jn(t),e)))for(t=0;t<e.length;t++)jn(e[t])}}function Pn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Mt]||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 Fn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,In=!1;if(Fn)try{var Ln={};Object.defineProperty(Ln,"passive",{get:function(){In=!0}}),window.addEventListener(`test`,Ln,Ln),window.removeEventListener(`test`,Ln,Ln)}catch{In=!1}var Rn=null,zn=null,Bn=null;function Vn(){if(Bn)return Bn;var e,t=zn,n=t.length,r,i=`value`in Rn?Rn.value:Rn.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 Bn=i.slice(e,1<r?1-r:void 0)}function Hn(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 Un(){return!0}function Wn(){return!1}function Gn(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)?Un:Wn,this.isPropagationStopped=Wn,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=Un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Un)},persist:function(){},isPersistent:Un}),t}var Kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qn=Gn(Kn),Jn=D({},Kn,{view:0,detail:0}),Yn=Gn(Jn),Xn,Zn,Qn,$n=D({},Jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ur,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!==Qn&&(Qn&&e.type===`mousemove`?(Xn=e.screenX-Qn.screenX,Zn=e.screenY-Qn.screenY):Zn=Xn=0,Qn=e),Xn)},movementY:function(e){return`movementY`in e?e.movementY:Zn}}),er=Gn($n),tr=Gn(D({},$n,{dataTransfer:0})),nr=Gn(D({},Jn,{relatedTarget:0})),rr=Gn(D({},Kn,{animationName:0,elapsedTime:0,pseudoElement:0})),ir=Gn(D({},Kn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),ar=Gn(D({},Kn,{data:0})),or={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},sr={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`},cr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function lr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cr[e])?!!t[e]:!1}function ur(){return lr}var dr=Gn(D({},Jn,{key:function(e){if(e.key){var t=or[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?sr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ur,charCode:function(e){return e.type===`keypress`?Hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),fr=Gn(D({},$n,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),pr=Gn(D({},Kn,{submitter:0})),mr=Gn(D({},Jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ur})),hr=Gn(D({},Kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),gr=Gn(D({},$n,{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})),_r=Gn(D({},Kn,{newState:0,oldState:0,source:0})),vr=[9,13,27,32],yr=Fn&&`CompositionEvent`in window,br=null;Fn&&`documentMode`in document&&(br=document.documentMode);var xr=Fn&&`TextEvent`in window&&!br,Sr=Fn&&(!yr||br&&8<br&&11>=br),Cr=` `,wr=!1;function Tr(e,t){switch(e){case`keyup`:return vr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Dr=!1;function Or(e,t){switch(e){case`compositionend`:return Er(t);case`keypress`:return t.which===32?(wr=!0,Cr):null;case`textInput`:return e=t.data,e===Cr&&wr?null:e;default:return null}}function kr(e,t){if(Dr)return e===`compositionend`||!yr&&Tr(e,t)?(e=Vn(),Bn=zn=Rn=null,Dr=!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 Sr&&t.locale!==`ko`?null:t.data;default:return null}}var Ar={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 jr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Ar[e.type]:t===`textarea`}function Mr(e,t,n,r){kn?An?An.push(r):An=[r]:kn=r,t=hp(t,`onChange`),0<t.length&&(n=new qn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Nr=null,Pr=null;function Fr(e){sp(e,0)}function Ir(e){if(ln(Ht(e)))return e}function Lr(e,t){if(e===`change`)return t}var Rr=!1;if(Fn){var zr;if(Fn){var Br=`oninput`in document;if(!Br){var Vr=document.createElement(`div`);Vr.setAttribute(`oninput`,`return;`),Br=typeof Vr.oninput==`function`}zr=Br}else zr=!1;Rr=zr&&(!document.documentMode||9<document.documentMode)}function Hr(){Nr&&(Nr.detachEvent(`onpropertychange`,Ur),Pr=Nr=null)}function Ur(e){if(e.propertyName===`value`&&Ir(Pr)){var t=[];Mr(t,Pr,e,On(e)),Nn(Fr,t)}}function Wr(e,t,n){e===`focusin`?(Hr(),Nr=t,Pr=n,Nr.attachEvent(`onpropertychange`,Ur)):e===`focusout`&&Hr()}function Gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ir(Pr)}function Kr(e,t){if(e===`click`)return Ir(t)}function qr(e,t){if(e===`input`||e===`change`)return Ir(t)}function Jr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Yr=typeof Object.is==`function`?Object.is:Jr;function Xr(e,t){if(Yr(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(!We.call(t,i)||!Yr(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 Qr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $r(e,t){var n=Qr(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=Qr(n)}}function ei(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ei(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ti(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 ni(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 ri=Fn&&`documentMode`in document&&11>=document.documentMode,ii=null,ai=null,oi=null,si=!1;function ci(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;si||ii==null||ii!==Zr(r)||(r=ii,`selectionStart`in r&&ni(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}),oi&&Xr(oi,r)||(oi=r,r=hp(ai,`onSelect`),0<r.length&&(t=new qn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=ii)))}function li(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ui={animationend:li(`Animation`,`AnimationEnd`),animationiteration:li(`Animation`,`AnimationIteration`),animationstart:li(`Animation`,`AnimationStart`),transitionrun:li(`Transition`,`TransitionRun`),transitionstart:li(`Transition`,`TransitionStart`),transitioncancel:li(`Transition`,`TransitionCancel`),transitionend:li(`Transition`,`TransitionEnd`)},di={},fi={};Fn&&(fi=document.createElement(`div`).style,`AnimationEvent`in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),`TransitionEvent`in window||delete ui.transitionend.transition);function pi(e){if(di[e])return di[e];if(!ui[e])return e;var t=ui[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in fi)return di[e]=t[n];return e}var mi=pi(`animationend`),hi=pi(`animationiteration`),gi=pi(`animationstart`),_i=pi(`transitionrun`),vi=pi(`transitionstart`),yi=pi(`transitioncancel`),bi=pi(`transitionend`),xi=new Map,Si=`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(` `);Si.push(`scrollEnd`);function Ci(e,t){xi.set(e,t),Jt(t,[e])}var wi=0;function Ti(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=zd.identifierPrefix;var n=wi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function Ei(e){if(e==null||typeof e==`string`)return e;var t=null,n=qd;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 Di(e,t){return e=Ei(e),t=Ei(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Oi=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)},ki=[],Ai=0,ji=0;function Mi(){for(var e=Ai,t=ji=Ai=0;t<e;){var n=ki[t];ki[t++]=null;var r=ki[t];ki[t++]=null;var i=ki[t];ki[t++]=null;var a=ki[t];if(ki[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&&Ii(n,i,a)}}function Ni(e,t,n,r){ki[Ai++]=e,ki[Ai++]=t,ki[Ai++]=n,ki[Ai++]=r,ji|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Pi(e,t,n,r){return Ni(e,t,n,r),Li(e)}function Fi(e,t){return Ni(e,null,null,t),Li(e)}function Ii(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-st(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Li(e){if(50<Jd)throw Jd=0,Yd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ri={};function zi(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 Bi(e,t,n,r){return new zi(e,t,n,r)}function Vi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hi(e,t){var n=e.alternate;return n===null?(n=Bi(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 Ui(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 Wi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Vi(r)&&(s=1);else if(typeof r==`string`)s=ph(e,n,ke.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case de:return e=Bi(31,n,t,a),e.elementType=de,e.lanes=o,e;case ne:return Gi(n.children,a,o,t);case re:s=8,a|=24;break;case ie:return e=Bi(12,n,t,a|2),e.elementType=ie,e.lanes=o,e;case se:return e=Bi(13,n,t,a),e.elementType=se,e.lanes=o,e;case ce:return e=Bi(19,n,t,a),e.elementType=ce,e.lanes=o,e;case fe:case me:return e=a|32,e=Bi(30,n,t,e),e.elementType=me,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case oe:s=10;break a;case ae:s=9;break a;case k:s=11;break a;case le:s=14;break a;case ue:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Bi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Gi(e,t,n,r){return e=Bi(7,e,r,t),e.lanes=n,e}function Ki(e,t,n){return e=Bi(6,e,null,t),e.lanes=n,e}function qi(e){var t=Bi(18,null,null,0);return t.stateNode=e,t}function Ji(e,t,n){return t=Bi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yi=new WeakMap;function Xi(e,t){if(typeof e==`object`&&e){var n=Yi.get(e);return n===void 0?(t={value:e,source:t,stack:Ue(t)},Yi.set(e,t),t):n}return{value:e,source:t,stack:Ue(t)}}var Zi=[],Qi=0,$i=null,ea=0,ta=[],na=0,ra=null,ia=1,aa=``;function oa(e,t){Zi[Qi++]=ea,Zi[Qi++]=$i,$i=e,ea=t}function sa(e,t,n){ta[na++]=ia,ta[na++]=aa,ta[na++]=ra,ra=e;var r=ia;e=aa;var i=32-st(r)-1;r&=~(1<<i),n+=1;var a=32-st(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ia=1<<32-st(t)+i|n<<i|r,aa=a+e}else ia=1<<a|n<<i|r,aa=e}function ca(e){e.return!==null&&(oa(e,1),sa(e,1,0))}function la(e){for(;e===$i;)$i=Zi[--Qi],Zi[Qi]=null,ea=Zi[--Qi],Zi[Qi]=null;for(;e===ra;)ra=ta[--na],ta[na]=null,aa=ta[--na],ta[na]=null,ia=ta[--na],ta[na]=null}function ua(e,t){ta[na++]=ia,ta[na++]=aa,ta[na++]=ra,ia=t.id,aa=t.overflow,ra=e}var da=null,fa=null,pa=!1,ma=null,ha=!1,ga=Error(i(519));function _a(e){throw Ca(Xi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ga}function va(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[jt]=e,t[Mt]=r,n){case`dialog`:cp(`cancel`,t),cp(`close`,t);break;case`iframe`:case`object`:case`embed`:cp(`load`,t);break;case`video`:case`audio`:for(n=0;n<ap.length;n++)cp(ap[n],t);break;case`source`:cp(`error`,t);break;case`img`:case`image`:case`link`:cp(`error`,t),cp(`load`,t);break;case`details`:cp(`toggle`,t);break;case`input`:cp(`invalid`,t),pn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:cp(`invalid`,t);break;case`textarea`:cp(`invalid`,t),_n(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||xp(t.textContent,n)?(r.popover!=null&&(cp(`beforetoggle`,t),cp(`toggle`,t)),r.onScroll!=null&&cp(`scroll`,t),r.onScrollEnd!=null&&cp(`scrollend`,t),r.onClick!=null&&(t.onclick=En),t=!0):t=!1,t||_a(e,!0)}function ya(e){for(da=e.return;da;)switch(da.tag){case 5:case 31:case 13:ha=!1;return;case 27:case 3:ha=!0;return;default:da=da.return}}function ba(e){if(e!==da)return!1;if(!pa)return ya(e),pa=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Fp(e.type,e.memoizedProps)),n=!n),n&&fa&&_a(e),ya(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));fa=M(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));fa=M(e)}else t===27?(t=fa,Wp(e.type)?(e=Mm,Mm=null,fa=e):fa=t):fa=da?jm(e.stateNode.nextSibling):null;return!0}function xa(){fa=da=null,pa=!1}function Sa(){var e=ma;return e!==null&&(jd===null?jd=e:jd.push.apply(jd,e),ma=null),e}function Ca(e){ma===null?ma=[e]:ma.push(e)}var wa=Ee(null),Ta=null,Ea=null;function Da(e,t,n){Oe(wa,t._currentValue),t._currentValue=n}function Oa(e){e._currentValue=wa.current,De(wa)}function ka(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 Aa(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),ka(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),ka(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),ka(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 ja(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;Yr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Me.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Dh]:e.push(Dh))}a=a.return}return e!==null&&Aa(t,e,n,r),t.flags|=262144,e!==null}function Ma(e){for(e=e.firstContext;e!==null;){if(!Yr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Na(e){Ta=e,Ea=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pa(e){return Ia(Ta,e)}function Fa(e,t){return Ta===null&&Na(e),Ia(e,t)}function Ia(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ea===null){if(e===null)throw Error(i(308));Ea=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ea=Ea.next=t;return n}var La=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()})}},Ra=t.unstable_scheduleCallback,za=t.unstable_NormalPriority,Ba={$$typeof:oe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Va(){return{controller:new La,data:new Map,refCount:0}}function Ha(e){e.refCount--,e.refCount===0&&Ra(za,function(){e.controller.abort()})}function Ua(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 Wa=null;function Ga(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ka=null,qa=0,Ja=0,Ya=null;function Xa(e,t){if(Ka===null){var n=Ka=[];qa=0,Ja=ep(),Ya={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return qa++,t.then(Za,Za),t}function Za(){if(--qa===0&&(Wa=null,Ka!==null)){Ya!==null&&(Ya.status=`fulfilled`);var e=Ka;Ka=null,Ja=0,Ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Qa(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 $a=xe.S;xe.S=function(e,t){if(Pd=Ye(),typeof t==`object`&&t&&typeof t.then==`function`&&Xa(e,t),Wa!==null)for(var n=Bf;n!==null;)Ua(n,Wa),n=n.next;if(n=e.types,n!==null){for(var r=Bf;r!==null;)Ua(r,n),r=r.next;if(Ja!==0){r=Wa,r===null&&(r=Wa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}$a!==null&&$a(e,t)};var eo=Ee(null);function to(){var e=eo.current;return e===null?hd.pooledCache:e}function no(e,t){t===null?Oe(eo,eo.current):Oe(eo,t.pool)}function ro(){var e=to();return e===null?null:{parent:Ba._currentValue,pool:e}}var io=Error(i(460)),ao=Error(i(474)),oo=Error(i(542)),so={then:function(){}};function co(e){return e=e.status,e===`fulfilled`||e===`rejected`}function lo(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(En,En),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,mo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(En,En);else{if(e=hd,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,mo(e),e}throw fo=t,io}}function uo(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(fo=e,io):e}}var fo=null;function po(){if(fo===null)throw Error(i(459));var e=fo;return fo=null,e}function mo(e){if(e===io||e===oo)throw Error(i(483))}var ho=null,go=0;function _o(e){var t=go;return go+=1,ho===null&&(ho=[]),lo(ho,e,t)}function vo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function yo(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 bo(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=Hi(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=Ki(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===ne?(e=d(e,t,n.props.children,r,n.key),vo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ue&&uo(i)===t.type)?(t=a(t,n.props),vo(t,n),t.return=e,t):(t=Wi(n.type,n.key,n.props,null,e.mode,r),vo(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=Ji(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=Gi(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=Ki(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ee:return n=Wi(t.type,t.key,t.props,null,e.mode,n),vo(n,t),n.return=e,n;case te:return t=Ji(t,e.mode,n),t.return=e,t;case ue:return t=uo(t),f(e,t,n)}if(be(t)||_e(t))return t=Gi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,_o(t),n);if(t.$$typeof===oe)return f(e,Fa(e,t),n);yo(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 ee:return n.key===i?l(e,t,n,r):null;case te:return n.key===i?u(e,t,n,r):null;case ue:return n=uo(n),p(e,t,n,r)}if(be(n)||_e(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,_o(n),r);if(n.$$typeof===oe)return p(e,t,Fa(e,n),r);yo(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 ee:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case te:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ue:return r=uo(r),m(e,t,n,r,i)}if(be(r)||_e(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,_o(r),i);if(r.$$typeof===oe)return m(e,t,n,Fa(t,r),i);yo(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),pa&&oa(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 pa&&oa(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)}),pa&&oa(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),pa&&oa(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 pa&&oa(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)}),pa&&oa(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ne&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ee:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ne){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),vo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ue&&uo(l)===r.type){n(e,r.sibling),c=a(r,o.props),vo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ne?(c=Gi(o.props.children,e.mode,c,o.key),vo(c,o),c.return=e,e=c):(c=Wi(o.type,o.key,o.props,null,e.mode,c),vo(c,o),c.return=e,e=c)}return s(e);case te: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=Ji(o,e.mode,c),c.return=e,e=c}return s(e);case ue:return o=uo(o),_(e,r,o,c)}if(be(o))return h(e,r,o,c);if(_e(o)){if(l=_e(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,_o(o),c);if(o.$$typeof===oe)return _(e,r,Fa(e,o),c);yo(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=Ki(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{go=0;var i=_(e,t,n,r);return ho=null,i}catch(t){if(t===io||t===oo)throw t;var a=Bi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var xo=bo(!0),So=bo(!1),Co=!1;function wo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function To(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 Eo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Do(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,md&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Li(e),Ii(e,null,n),t}return Ni(e,r,t,n),Li(e)}function Oo(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,wt(e,n)}}function ko(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}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ao=!1;function jo(){if(Ao){var e=Ya;if(e!==null)throw e}}function Mo(e,t,n,r){Ao=!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?(_d&f)===f:(r&f)===f){f!==0&&f===Ja&&(Ao=!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),Td|=o,e.lanes=o,e.memoizedState=d}}function No(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Po(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)No(n[e],t)}var Fo=Ee(null),Io=Ee(0);function Lo(e,t){e=Cd,Oe(Io,e),Oe(Fo,t),Cd=e|t.baseLanes}function Ro(){Oe(Io,Cd),Oe(Fo,Fo.current)}function zo(){Cd=Io.current,De(Fo),De(Io)}var Bo=Ee(null),Vo=null;function Ho(e){var t=e.alternate;Oe(qo,qo.current&1),Oe(Bo,e),Vo===null&&(t===null||Fo.current!==null||t.memoizedState!==null)&&(Vo=e)}function Uo(e){Oe(qo,qo.current),Oe(Bo,e),Vo===null&&(Vo=e)}function Wo(e){e.tag===22?(Oe(qo,qo.current),Oe(Bo,e),Vo===null&&(Vo=e)):Go()}function Go(){Oe(qo,qo.current),Oe(Bo,Bo.current)}function Ko(e){De(Bo),Vo===e&&(Vo=null),De(qo)}var qo=Ee(0);function Jo(e,t){Oe(Bo,Bo.current),Oe(qo,t)}function Yo(e){De(qo),De(Bo),Vo===e&&(Vo=null)}function Xo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Om(n)||km(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 Zo=0,Qo=null,$o=null,es=null,ts=!1,ns=!1,rs=!1,is=0,as=0,os=null,ss=0;function cs(){throw Error(i(321))}function ls(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Yr(e[n],t[n]))return!1;return!0}function us(e,t,n,r,i,a){return Zo=a,Qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xe.H=e===null||e.memoizedState===null?Dc:Oc,rs=!1,a=n(r,i),rs=!1,ns&&(a=fs(t,n,r,i)),ds(e),a}function ds(e){xe.H=Ec;var t=$o!==null&&$o.next!==null;if(Zo=0,es=$o=Qo=null,ts=!1,as=0,os=null,t)throw Error(i(300));e===null||Gc||(e=e.dependencies,e!==null&&Ma(e)&&(Gc=!0))}function fs(e,t,n,r){Qo=e;var a=0;do{if(ns&&(os=null),as=0,ns=!1,25<=a)throw Error(i(301));if(a+=1,es=$o=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}xe.H=kc,o=t(n,r)}while(ns);return o}function ps(){var e=xe.H,t=e.useState()[0];return t=typeof t.then==`function`?bs(t):t,e=e.useState()[0],($o===null?null:$o.memoizedState)!==e&&(Qo.flags|=1024),t}function ms(){var e=is!==0;return is=0,e}function hs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function gs(e){if(ts){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ts=!1}Zo=0,es=$o=Qo=null,ns=!1,as=is=0,os=null}function _s(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return es===null?Qo.memoizedState=es=e:es=es.next=e,es}function vs(){if($o===null){var e=Qo.alternate;e=e===null?null:e.memoizedState}else e=$o.next;var t=es===null?Qo.memoizedState:es.next;if(t!==null)es=t,$o=e;else{if(e===null)throw Qo.alternate===null?Error(i(467)):Error(i(310));$o=e,e={memoizedState:$o.memoizedState,baseState:$o.baseState,baseQueue:$o.baseQueue,queue:$o.queue,next:null},es===null?Qo.memoizedState=es=e:es=es.next=e}return es}function ys(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bs(e){var t=as;return as+=1,os===null&&(os=[]),e=lo(os,e,t),t=Qo,(es===null?t.memoizedState:es.next)===null&&(t=t.alternate,xe.H=t===null||t.memoizedState===null?Dc:Oc),e}function xs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return bs(e);if(e.$$typeof===he)return;if(e.$$typeof===oe)return Pa(e)}throw Error(i(438,String(e)))}function Ss(e){var t=null,n=Qo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Qo.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=ys(),Qo.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]=pe;return t.index++,n}function Cs(e,t){return typeof t==`function`?t(e):t}function ws(e){return Ts(vs(),$o,e)}function Ts(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?(Zo&f)===f:(_d&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===Ja&&(d=!0);else if((Zo&p)===p){u=u.next,p===Ja&&(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,Qo.lanes|=p,Td|=p;f=u.action,rs&&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,Qo.lanes|=f,Td|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Yr(o,e.memoizedState)&&(Gc=!0,d&&(n=Ya,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 Es(e){var t=vs(),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);Yr(o,t.memoizedState)||(Gc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ds(e,t,n){var r=Qo,a=vs(),o=pa;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Yr(($o||a).memoizedState,n);if(s&&(a.memoizedState=n,Gc=!0),a=a.queue,Qs(As.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||es!==null&&!!(es.memoizedState.tag&1),qs(e?9:8,{destroy:void 0},ks.bind(null,r,a,n,t),null),e){if(r.flags|=2048,hd===null)throw Error(i(349));o||Zo&127||Os(r,t,n)}return n}function Os(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Qo.updateQueue,t===null?(t=ys(),Qo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ks(e,t,n,r){t.value=n,t.getSnapshot=r,js(t)&&Ms(e)}function As(e,t,n){return n(function(){js(t)&&Ms(e)})}function js(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Yr(e,n)}catch{return!0}}function Ms(e){var t=Fi(e,2);t!==null&&$d(t,e,2)}function Ns(e){var t=_s();if(typeof e==`function`){var n=e;if(e=n(),rs){ot(!0);try{n()}finally{ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:e},t}function Ps(e,t,n,r){return e.baseState=n,Ts(e,$o,typeof r==`function`?r:Cs)}function Fs(e,t,n,r,a){if(Cc(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)}};xe.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Is(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Is(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=xe.T,o={};o.types=a===null?null:a.types,xe.T=o;try{var s=n(i,r),c=xe.S;c!==null&&c(o,s),Ls(e,t,s)}catch(n){zs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),xe.T=a}}else try{a=n(i,r),Ls(e,t,a)}catch(n){zs(e,t,n)}}function Ls(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Rs(e,t,n)},function(n){return zs(e,t,n)}):Rs(e,t,n)}function Rs(e,t,n){t.status=`fulfilled`,t.value=n,Bs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Is(e,n)))}function zs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Bs(t),t=t.next;while(t!==r)}e.action=null}function Bs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Vs(e,t){return t}function Hs(e,t){if(pa){var n=hd.formState;if(n!==null){a:{var r=Qo;if(pa){if(fa){b:{for(var i=fa,a=ha;i.nodeType!==8;)if(!a||(i=jm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){fa=jm(i.nextSibling),r=i.data===`F!`;break a}}_a(r)}r=!1}r&&(t=n[0])}}return n=_s(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vs,lastRenderedState:t},n.queue=r,n=bc.bind(null,Qo,r),r.dispatch=n,r=Ns(!1),a=Sc.bind(null,Qo,!1,r.queue),r=_s(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Fs.bind(null,Qo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Us(e){return Ws(vs(),$o,e)}function Ws(e,t,n){if(t=Ts(e,t,Vs)[0],e=ws(Cs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=bs(t)}catch(e){throw e===io?oo:e}else r=t;t=vs();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Qo.flags|=2048,qs(9,{destroy:void 0},Gs.bind(null,i,n),null)),[r,a,e]}function Gs(e,t){e.action=t}function Ks(e){var t=vs(),n=$o;if(n!==null)return Ws(t,n,e);vs(),t=t.memoizedState,n=vs();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function qs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Qo.updateQueue,t===null&&(t=ys(),Qo.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 Js(){return vs().memoizedState}function Ys(e,t,n,r){var i=_s();Qo.flags|=e,i.memoizedState=qs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Xs(e,t,n,r){var i=vs();r=r===void 0?null:r;var a=i.memoizedState.inst;$o!==null&&r!==null&&ls(r,$o.memoizedState.deps)?i.memoizedState=qs(t,a,n,r):(Qo.flags|=e,i.memoizedState=qs(1|t,a,n,r))}function Zs(e,t){Ys(8390656,8,e,t)}function Qs(e,t){Xs(2048,8,e,t)}function $s(e){Qo.flags|=4;var t=Qo.updateQueue;if(t===null)t=ys(),Qo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ec(e){var t=vs().memoizedState;return $s({ref:t,nextImpl:e}),function(){if(md&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function tc(e,t){return Xs(4,2,e,t)}function nc(e,t){return Xs(4,4,e,t)}function rc(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 ic(e,t,n){n=n==null?null:n.concat([e]),Xs(4,4,rc.bind(null,t,e),n)}function ac(){}function oc(e,t){var n=vs();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ls(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function sc(e,t){var n=vs();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ls(t,r[1]))return r[0];if(r=e(),rs){ot(!0);try{e()}finally{ot(!1)}}return n.memoizedState=[r,t],r}function cc(e,t,n){return n===void 0||Zo&1073741824&&!(_d&261930)?e.memoizedState=t:(e.memoizedState=n,e=Zd(),Qo.lanes|=e,Td|=e,n)}function lc(e,t,n,r){return Yr(n,t)?n:Fo.current===null?!(Zo&106)||Zo&1073741824&&!(_d&261930)?(Gc=!0,e.memoizedState=n):(e=Zd(),Qo.lanes|=e,Td|=e,t):(e=cc(e,n,r),Yr(e,t)||(Gc=!0),e)}function uc(e,t,n,r,i){var a=Se.p;Se.p=a!==0&&8>a?a:8;var o=xe.T,s={};s.types=o===null?null:o.types,xe.T=s,Sc(e,!1,t,n);try{var c=i(),l=xe.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?xc(e,t,Qa(c,r),Xd(e)):xc(e,t,r,Xd(e))}catch(n){xc(e,t,{then:function(){},status:`rejected`,reason:n},Xd())}finally{Se.p=a,o!==null&&s.types!==null&&(o.types=s.types),xe.T=o}}function dc(){}function fc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=pc(e).queue;uc(e,a,t,Ce,n===null?dc:function(){return mc(e),n(r)})}function pc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ce,baseState:Ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:Ce},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function mc(e){var t=pc(e);t.next===null&&(t=e.alternate.memoizedState),xc(e,t.next.queue,{},Xd())}function hc(){return Pa(Dh)}function gc(){return vs().memoizedState}function _c(){return vs().memoizedState}function vc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Xd();e=Eo(n);var r=Do(t,e,n);r!==null&&($d(r,t,n),Oo(r,t,n)),t={cache:Va()},e.payload=t;return}t=t.return}}function yc(e,t,n){var r=Xd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cc(e)?wc(t,n):(n=Pi(e,t,n,r),n!==null&&($d(n,e,r),Tc(n,t,r)))}function bc(e,t,n){xc(e,t,n,Xd())}function xc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cc(e))wc(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,Yr(s,o))return Ni(e,t,i,0),hd===null&&Mi(),!1}catch{}if(n=Pi(e,t,i,r),n!==null)return $d(n,e,r),Tc(n,t,r),!0}return!1}function Sc(e,t,n,r){if(r={lane:2,revertLane:ep(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Cc(e)){if(t)throw Error(i(479))}else t=Pi(e,n,r,2),t!==null&&$d(t,e,2)}function Cc(e){var t=e.alternate;return e===Qo||t!==null&&t===Qo}function wc(e,t){ns=ts=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Tc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wt(e,n)}}var Ec={readContext:Pa,use:xs,useCallback:cs,useContext:cs,useEffect:cs,useImperativeHandle:cs,useLayoutEffect:cs,useInsertionEffect:cs,useMemo:cs,useReducer:cs,useRef:cs,useState:cs,useDebugValue:cs,useDeferredValue:cs,useTransition:cs,useSyncExternalStore:cs,useId:cs,useHostTransitionStatus:cs,useFormState:cs,useActionState:cs,useOptimistic:cs,useMemoCache:cs,useCacheRefresh:cs,useEffectEvent:cs},Dc={readContext:Pa,use:xs,useCallback:function(e,t){return _s().memoizedState=[e,t===void 0?null:t],e},useContext:Pa,useEffect:Zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ys(4194308,4,rc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ys(4194308,4,e,t)},useInsertionEffect:function(e,t){Ys(4,2,e,t)},useMemo:function(e,t){var n=_s();t=t===void 0?null:t;var r=e();if(rs){ot(!0);try{e()}finally{ot(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=_s();if(n!==void 0){var i=n(t);if(rs){ot(!0);try{n(t)}finally{ot(!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=yc.bind(null,Qo,e),[r.memoizedState,e]},useRef:function(e){var t=_s();return e={current:e},t.memoizedState=e},useState:function(e){e=Ns(e);var t=e.queue,n=bc.bind(null,Qo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ac,useDeferredValue:function(e,t){return cc(_s(),e,t)},useTransition:function(){var e=Ns(!1);return e=uc.bind(null,Qo,e.queue,!0,!1),_s().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Qo,a=_s();if(pa){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),hd===null)throw Error(i(349));_d&127||Os(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Zs(As.bind(null,r,o,e),[e]),r.flags|=2048,qs(9,{destroy:void 0},ks.bind(null,r,o,n,t),null),n},useId:function(){var e=_s(),t=hd.identifierPrefix;if(pa){var n=aa,r=ia;n=(r&~(1<<32-st(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=is++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ss++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:hc,useFormState:Hs,useActionState:Hs,useOptimistic:function(e){var t=_s();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Sc.bind(null,Qo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ss,useCacheRefresh:function(){return _s().memoizedState=vc.bind(null,Qo)},useEffectEvent:function(e){var t=_s(),n={impl:e};return t.memoizedState=n,function(){if(md&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Oc={readContext:Pa,use:xs,useCallback:oc,useContext:Pa,useEffect:Qs,useImperativeHandle:ic,useInsertionEffect:tc,useLayoutEffect:nc,useMemo:sc,useReducer:ws,useRef:Js,useState:function(){return ws(Cs)},useDebugValue:ac,useDeferredValue:function(e,t){return lc(vs(),$o.memoizedState,e,t)},useTransition:function(){var e=ws(Cs)[0],t=vs().memoizedState;return[typeof e==`boolean`?e:bs(e),t]},useSyncExternalStore:Ds,useId:gc,useHostTransitionStatus:hc,useFormState:Us,useActionState:Us,useOptimistic:function(e,t){return Ps(vs(),$o,e,t)},useMemoCache:Ss,useCacheRefresh:_c,useEffectEvent:ec},kc={readContext:Pa,use:xs,useCallback:oc,useContext:Pa,useEffect:Qs,useImperativeHandle:ic,useInsertionEffect:tc,useLayoutEffect:nc,useMemo:sc,useReducer:Es,useRef:Js,useState:function(){return Es(Cs)},useDebugValue:ac,useDeferredValue:function(e,t){var n=vs();return $o===null?cc(n,e,t):lc(n,$o.memoizedState,e,t)},useTransition:function(){var e=Es(Cs)[0],t=vs().memoizedState;return[typeof e==`boolean`?e:bs(e),t]},useSyncExternalStore:Ds,useId:gc,useHostTransitionStatus:hc,useFormState:Ks,useActionState:Ks,useOptimistic:function(e,t){var n=vs();return $o===null?(n.baseState=e,[e,n.queue.dispatch]):Ps(n,$o,e,t)},useMemoCache:Ss,useCacheRefresh:_c,useEffectEvent:ec};function Ac(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 jc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Xd(),i=Eo(r);i.payload=t,n!=null&&(i.callback=n),t=Do(e,i,r),t!==null&&($d(t,e,r),Oo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Xd(),i=Eo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Do(e,i,r),t!==null&&($d(t,e,r),Oo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xd(),r=Eo(n);r.tag=2,t!=null&&(r.callback=t),t=Do(e,r,n),t!==null&&($d(t,e,n),Oo(t,e,n))}};function Mc(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?!Xr(n,r)||!Xr(i,a):!0}function Nc(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&&jc.enqueueReplaceState(t,t.state,null)}function Pc(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 Fc(e){Oi(e)}function Ic(e){console.error(e)}function Lc(e){Oi(e)}function Rc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function zc(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 Bc(e,t,n){return n=Eo(n),n.tag=3,n.payload={element:null},n.callback=function(){Rc(e,t)},n}function Vc(e){return e=Eo(e),e.tag=3,e}function Hc(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(){zc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){zc(t,n,r),typeof i!=`function`&&(Ld===null?Ld=new Set([this]):Ld.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Uc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ja(t,n,a,!0),n=Bo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Vo===null?ff():n.alternate===null&&wd===0&&(wd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===so?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Pf(e,r,a)),!1;case 22:return n.flags|=65536,r===so?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)),Pf(e,r,a)),!1}throw Error(i(435,n.tag))}return Pf(e,r,a),ff(),!1}if(pa)return t=Bo.current,t===null?(r!==ga&&(t=Error(i(423),{cause:r}),Ca(Xi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Xi(r,n),a=Bc(e.stateNode,r,a),ko(e,a),wd!==4&&(wd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ga&&(e=Error(i(422),{cause:r}),Ca(Xi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Xi(o,n),Ad===null?Ad=[o]:Ad.push(o),wd!==4&&(wd=2),t===null)return!0;r=Xi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Bc(n.stateNode,r,e),ko(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`&&(Ld===null||!Ld.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Vc(a),Hc(a,e,n,r),ko(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Wc=Error(i(461)),Gc=!1;function Kc(e,t,n,r){t.child=e===null?So(t,null,n,r):xo(t,e.child,n,r)}function qc(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 Na(t),r=us(e,t,n,o,a,i),s=ms(),e!==null&&!Gc?(hs(e,t,i),xl(e,t,i)):(pa&&s&&ca(t),t.flags|=1,Kc(e,t,r,i),t.child)}function Jc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Vi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Yc(e,t,a,r,i)):(e=Wi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Sl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Xr:n,n(o,r)&&e.ref===t.ref)return xl(e,t,i)}return t.flags|=1,e=Hi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Yc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Xr(a,r)&&e.ref===t.ref){if(Gc=!1,t.pendingProps=r=a,Sl(e,i))e.flags&131072&&(Gc=!0);else return t.lanes=e.lanes,xl(e,t,i)}}return rl(e,t,n,r,i)}function Xc(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 Qc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&no(t,a===null?null:a.cachePool),a===null?Ro():Lo(t,a),Wo(t);else return r=t.lanes=536870912,Qc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&no(t,null),Ro(),Go()):(no(t,a.cachePool),Lo(t,a),Go(),t.memoizedState=null);return Kc(e,t,i,n),t.child}function Zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Qc(e,t,n,r,i){var a=to();return a=a===null?null:{parent:Ba._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&no(t,null),Ro(),Wo(t),e!==null&&ja(e,t,r,!0),t.childLanes=i,null}function $c(e,t){return t=fl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function el(e,t,n){return xo(t,e.child,null,n),e=$c(t,t.pendingProps),e.flags|=2,Ko(t),t.memoizedState=null,e}function tl(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(pa){if(r.mode===`hidden`)return e=$c(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Zc(null,e);if(Uo(t),(e=fa)?(e=Dm(e,ha),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ra===null?null:{id:ia,overflow:aa},retryLane:536870912,hydrationErrors:null},n=qi(e),n.return=t,t.child=n,da=t,fa=null)):e=null,e===null)throw _a(t);return t.lanes=536870912,null}return $c(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Uo(t),a){if(t.flags&256)t.flags&=-257,t=el(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Gc||ja(e,t,n,!1),a=(n&e.childLanes)!==0,Gc||a){if(Fo.current===null){if(r=hd,r!==null&&(s=Tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Fi(e,s),$d(r,e,s),Wc;ff()}t=el(e,t,n)}else e=o.treeContext,fa=jm(s.nextSibling),da=t,pa=!0,ma=null,ha=!1,e!==null&&ua(t,e),t=$c(t,r),t.flags|=134221824;return t}return e=Hi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function nl(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 rl(e,t,n,r,i){return Na(t),n=us(e,t,n,r,void 0,i),r=ms(),e!==null&&!Gc?(hs(e,t,i),xl(e,t,i)):(pa&&r&&ca(t),t.flags|=1,Kc(e,t,n,i),t.child)}function il(e,t,n,r,i,a){return Na(t),t.updateQueue=null,n=fs(t,r,n,i),ds(e),r=ms(),e!==null&&!Gc?(hs(e,t,a),xl(e,t,a)):(pa&&r&&ca(t),t.flags|=1,Kc(e,t,n,a),t.child)}function al(e,t,n,r,i){if(Na(t),t.stateNode===null){var a=Ri,o=n.contextType;typeof o==`object`&&o&&(a=Pa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=jc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},wo(t),o=n.contextType,a.context=typeof o==`object`&&o?Pa(o):Ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ac(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&&jc.enqueueReplaceState(a,a.state,null),Mo(t,r,a,i),jo(),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=Pc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ri,typeof u==`object`&&u&&(o=Pa(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)&&Nc(t,a,r,o),Co=!1;var f=t.memoizedState;a.state=f,Mo(t,r,a,i),jo(),l=t.memoizedState,s||f!==l||Co?(typeof d==`function`&&(Ac(t,n,d,r),l=t.memoizedState),(c=Co||Mc(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,To(e,t),o=t.memoizedProps,u=Pc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ri,typeof l==`object`&&l&&(c=Pa(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)&&Nc(t,a,r,c),Co=!1,f=t.memoizedState,a.state=f,Mo(t,r,a,i),jo();var p=t.memoizedState;o!==d||f!==p||Co||e!==null&&e.dependencies!==null&&Ma(e.dependencies)?(typeof s==`function`&&(Ac(t,n,s,r),p=t.memoizedState),(u=Co||Mc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ma(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,nl(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=xo(t,e.child,null,i),t.child=xo(t,null,n,i)):Kc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=xl(e,t,i),e}function ol(e,t,n,r){return xa(),t.flags|=256,Kc(e,t,n,r),t.child}var sl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cl(e){return{baseLanes:e,cachePool:ro()}}function ll(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Od),e}function ul(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(qo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(pa){if(i?Ho(t):Go(),(e=fa)?(e=Dm(e,ha),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ra===null?null:{id:ia,overflow:aa},retryLane:536870912,hydrationErrors:null},n=qi(e),n.return=t,t.child=n,da=t,fa=null)):e=null,e===null)throw _a(t);return t.lanes=km(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Go(),i=t.mode,a=fl({mode:`hidden`,children:a},i),r=Gi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=cl(n),r.childLanes=ll(e,o,n),t.memoizedState=sl,Zc(null,r)):(Ho(t),dl(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return ml(e,t,a,o,r,c,s,n)}return i?(Go(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Hi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Gi(i,a,n,null),i.flags|=2):i=Hi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=cl(n):(a=i.cachePool,a===null?a=ro():(s=Ba._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=ll(e,o,n),t.memoizedState=sl,Zc(e.child,r)):(Ho(t),n=e.child,e=n.sibling,n=Hi(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 dl(e,t){return t=fl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function fl(e,t){return e=Bi(22,e,null,t),e.lanes=0,e}function pl(e,t,n){return xo(t,e.child,null,n),e=dl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ml(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Ho(t),t.flags&=-257,pl(e,t,c)):t.memoizedState===null?(Go(),o=a.fallback,s=t.mode,a=fl({mode:`visible`,children:a.children},s),o=Gi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,xo(t,e.child,null,c),a=t.child,a.memoizedState=cl(c),a.childLanes=ll(e,r,c),t.memoizedState=sl,Zc(null,a)):(Go(),t.child=e.child,t.flags|=128,null);if(Ho(t),km(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,Ca({value:a,source:null,stack:null})),pl(e,t,c)}if(Gc||ja(e,t,c,!1),r=(c&e.childLanes)!==0,Gc||r){if(Fo.current!==null)return pl(e,t,c);if(r=hd,r!==null&&(a=Tt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Fi(e,a),$d(r,e,a),Wc;return Om(o)||ff(),pl(e,t,c)}return Om(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,fa=jm(o.nextSibling),da=t,pa=!0,ma=null,ha=!1,e!==null&&ua(t,e),t=dl(t,a.children),t.flags|=134221824,t)}function hl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ka(e.return,t,n)}function gl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Xo(n)===null&&(t=e),e=e.sibling}return t}function _l(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 vl(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 yl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=qo.current;if(t.flags&128)return Jo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Jo(t,o),i===`backwards`&&e!==null?(vl(e),Kc(e,t,r,n),vl(e)):Kc(e,t,r,n),r=pa?ea:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hl(e,n,t);else if(e.tag===19)hl(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=gl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,vl(t)),_l(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&&Xo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}_l(t,!0,n,null,a,r);break;case`together`:_l(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=gl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),_l(t,!1,i,n,a,r)}return t.child}function bl(e,t,n){var r=t.pendingProps;return Da(t,t.type,r.value),Kc(e,t,r.children,n),t.child}function xl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Td|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ja(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=Hi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Hi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ma(e)))}function Cl(e,t,n){switch(t.tag){case 3:Ne(t,t.stateNode.containerInfo),Da(t,Ba,e.memoizedState.cache),xa();break;case 27:case 5:Fe(t);break;case 4:Ne(t,t.stateNode.containerInfo);break;case 10:Da(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Uo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Ho(t),t.flags|=128,null;r=ja(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?ul(e,t,n):(Ho(t),e=xl(e,t,n),e===null?null:e.sibling)}Ho(t);break;case 19:if(t.flags&128)return yl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ja(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return yl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Jo(t,qo.current),r)break;return null;case 22:return t.lanes=0,Xc(e,t,n,t.pendingProps);case 24:Da(t,Ba,e.memoizedState.cache)}return xl(e,t,n)}function wl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Gc=!0;else{if(!Sl(e,n)&&!(t.flags&128))return Gc=!1,Cl(e,t,n);Gc=!!(e.flags&131072)}}else Gc=!1,pa&&t.flags&1048576&&sa(t,ea,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=uo(t.elementType),t.type=e,typeof e==`function`)Vi(e)?(r=Pc(e,r),t.tag=1,t=al(null,t,e,r,n)):(t.tag=0,t=rl(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===k){t.tag=11,t=qc(null,t,e,r,n);break a}if(a===le){t.tag=14,t=Jc(null,t,e,r,n);break a}if(a===oe){t.tag=10,t.type=e,t=bl(null,t,n);break a}}throw t=ye(e)||e,Error(i(306,t,``))}}return t;case 0:return rl(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Pc(r,t.pendingProps),al(e,t,r,a,n);case 3:a:{if(Ne(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,To(e,t),Mo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Da(t,Ba,r),r!==o.cache&&Aa(t,[Ba],n,!0),jo(),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=ol(e,t,r,n);break a}if(r!==a){a=Xi(Error(i(424)),t),Ca(a),t=ol(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(fa=jm(e.firstChild),da=t,pa=!0,ma=null,ha=!0,n=So(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(xa(),r===a){t=xl(e,t,n);break a}Kc(e,t,r,n)}t=t.child}return t;case 26:return nl(e,t),e===null?(n=$m(t.type,null,t.pendingProps,null))?t.memoizedState=n:pa||(t.stateNode=Pp(t.type,t.pendingProps,je.current,t)):t.memoizedState=$m(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Fe(t),e===null&&pa&&(r=t.stateNode=Im(t.type,t.pendingProps,je.current),da=t,ha=!0,a=fa,Wp(t.type)?(Mm=a,fa=jm(r.firstChild)):fa=a),Kc(e,t,t.pendingProps.children,n),nl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&pa&&((a=r=fa)&&(r=Tm(r,t.type,t.pendingProps,ha),r===null?a=!1:(t.stateNode=r,da=t,fa=jm(r.firstChild),ha=!1,a=!0)),a||_a(t)),Fe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Fp(a,o)?r=null:s!==null&&Fp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=us(e,t,ps,null,null,n),Dh._currentValue=a),nl(e,t),Kc(e,t,r,n),t.child;case 6:return e===null&&pa&&((e=n=fa)&&(n=Em(n,t.pendingProps,ha),n===null?e=!1:(t.stateNode=n,da=t,fa=null,e=!0)),e||_a(t)),null;case 13:return ul(e,t,n);case 4:return Ne(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xo(t,null,r,n):Kc(e,t,r,n),t.child;case 11:return qc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,nl(e,t),Kc(e,t,r,n),t.child;case 8:return Kc(e,t,t.pendingProps.children,n),t.child;case 12:return Kc(e,t,t.pendingProps.children,n),t.child;case 10:return bl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Na(t),a=Pa(a),r=r(a),t.flags|=1,Kc(e,t,r,n),t.child;case 14:return Jc(e,t,t.type,t.pendingProps,n);case 15:return Yc(e,t,t.type,t.pendingProps,n);case 19:return yl(e,t,n);case 31:return tl(e,t,n);case 22:return Xc(e,t,n,t.pendingProps);case 24:return Na(t),r=Pa(Ba),e===null?(a=to(),a===null&&(a=hd,o=Va(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},wo(t),Da(t,Ba,a)):((e.lanes&n)!==0&&(To(e,t),Mo(t,null,null,n),jo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Da(t,Ba,r),r!==a.cache&&Aa(t,[Ba],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Da(t,Ba,r))),Kc(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:pa&&ca(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:nl(e,t),Kc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Tl(e){e.flags|=4}function El(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?mh(t,r):mh(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(lf())e.flags|=8192;else throw fo=so,ao}}else e.flags&=-16777217}function Dl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!hh(t)){if(lf())e.flags|=8192;else throw fo=so,ao}}function Ol(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:yt(),e.lanes|=t,kd|=t)}function kl(e,t){if(!pa)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 Al(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 jl(e,t,n){var r=t.pendingProps;switch(la(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Al(t),null;case 1:return Al(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Oa(Ba),Pe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ba(t)?Tl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Sa())),Al(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Tl(t),o===null?(Al(t),El(t,a,null,r,n)):(Al(t),Dl(t,o))):o?o===e.memoizedState?(Al(t),t.flags&=-16777217):(Tl(t),Al(t),Dl(t,o)):(e=e.memoizedProps,e!==r&&Tl(t),Al(t),El(t,a,e,r,n)),null;case 27:if(Ie(t),n=je.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Al(t),t.subtreeFlags&=-33554433,null}e=ke.current,ba(t)?va(t,e):(e=Im(a,r,n),t.stateNode=e,Tl(t))}return Al(t),t.subtreeFlags&=-33554433,null;case 5:if(Ie(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Al(t),t.subtreeFlags&=-33554433,null}if(o=ke.current,ba(t))va(t,o);else{var s=jp(je.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[jt]=t,o[Mt]=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(wp(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&&Tl(t)}}return Al(t),t.subtreeFlags&=-33554433,El(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Tl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=je.current,ba(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=da,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[jt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||xp(e.nodeValue,n)),e||_a(t,!0)}else e=jp(e).createTextNode(r),e[jt]=t,t.stateNode=e}return Al(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ba(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[jt]=t}else xa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Al(t),e=!1}else n=Sa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ko(t),t):(Ko(t),null);if(t.flags&128)throw Error(i(558))}return Al(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ba(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[jt]=t}else xa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Al(t),a=!1}else a=Sa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Ko(t),t):(Ko(t),null)}return Ko(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),Ol(t,t.updateQueue),Al(t),null);case 4:return Pe(),e===null&&dp(t.stateNode.containerInfo),t.flags|=67108864,Al(t),null;case 10:return Oa(t.type),Al(t),null;case 19:if(Yo(t),r=t.memoizedState,r===null)return Al(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)kl(r,!1);else{if(wd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Xo(e),o!==null){for(t.flags|=128,kl(r,!1),e=o.updateQueue,t.updateQueue=e,Ol(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ui(n,e),n=n.sibling;return Jo(t,qo.current&1|2),pa&&oa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ye()>Fd&&(t.flags|=128,a=!0,kl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Xo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ol(t,e),kl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!pa)return Al(t),null}else 2*Ye()-r.renderingStartTime>Fd&&n!==536870912&&(t.flags|=128,a=!0,kl(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=Ye(),e.sibling=null,o=qo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||pa?Jo(t,o):(n=o,Oe(Bo,t),Oe(qo,n),Vo===null&&(Vo=t)),pa&&oa(t,r.treeForkCount),e}return Al(t),null;case 22:case 23:return Ko(t),zo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Al(t),t.subtreeFlags&6&&(t.flags|=8192)):Al(t),n=t.updateQueue,n!==null&&Ol(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&&De(eo),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Oa(Ba),Al(t),null;case 25:return null;case 30:return t.flags|=33554432,Al(t),null}throw Error(i(156,t.tag))}function Ml(e,t){switch(la(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oa(Ba),Pe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ie(t),null;case 31:if(t.memoizedState!==null){if(Ko(t),t.alternate===null)throw Error(i(340));xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ko(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Yo(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 Pe(),null;case 10:return Oa(t.type),null;case 22:case 23:return Ko(t),zo(),e!==null&&De(eo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Oa(Ba),null;case 25:return null;default:return null}}function Nl(e,t){switch(la(t),t.tag){case 3:Oa(Ba),Pe();break;case 26:case 27:case 5:Ie(t);break;case 4:Pe();break;case 31:t.memoizedState!==null&&Ko(t);break;case 13:Ko(t);break;case 19:Yo(t);break;case 10:Oa(t.type);break;case 22:case 23:Ko(t),zo(),e!==null&&De(eo);break;case 24:Oa(Ba)}}function Pl(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){Nf(t,t.return,e)}}function Fl(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){Nf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Nf(t,t.return,e)}}function Il(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Po(t,n)}catch(t){Nf(e,e.return,t)}}}function Ll(e,t,n){n.props=Pc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Nf(e,t,n)}}function Rl(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=Ti(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=nm(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new rm(e);m(e.child,!1,bm,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){Nf(e,t,n)}}function zl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Nf(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){Nf(e,t,n)}else n.current=null}}function Bl(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++)Sm(e.stateNode,t[n])}function Vl(e){for(var t=e.return;t!==null&&(Wl(t)&&Sm(e.stateNode,t.stateNode),!Ul(t));)t=t.return}function Hl(e){for(var t=e.return;t!==null&&(Wl(t)&&Cm(e.stateNode,t.stateNode),!Ul(t));)t=t.return}function Ul(e){return e.tag===5||e.tag===3||e.tag===27}function Wl(e){return e&&e.tag===7&&e.stateNode!==null}function Gl(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){Nf(e,e.return,t)}}function Kl(e,t,n){try{var r=e.stateNode;Ep(r,e.type,n,t),r[Mt]=t}catch(t){Nf(e,e.return,t)}}function ql(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wp(e.type)||e.tag===4}function Jl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||ql(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&&Wp(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 Yl(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=En)),Bl(e,r),en=!0;else if(i!==4&&(i===27&&(Bl(e,r),r=null,Wp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Yl(e,t,n,r),e=e.sibling;e!==null;)Yl(e,t,n,r),e=e.sibling}function Xl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Bl(e,r),en=!0;else if(i!==4&&(i===27&&(Bl(e,r),r=null,Wp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Xl(e,t,n,r),e=e.sibling;e!==null;)Xl(e,t,n,r),e=e.sibling}function Zl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);wp(t,r,n),t[jt]=e,t[Mt]=n}catch(t){Nf(e,e.return,t)}}var Ql=!1,$l=null;function eu(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ql=!0)}var tu=null;function nu(){var e=tu;return tu=null,e}var ru=0;function iu(e,t,n,r,i){return ru=0,au(e.child,t,n,r,i)}function au(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Xp(o);r.push(s),s.view&&(a=!0)}else a||Xp(o).view&&(a=!0);Ql=!0,qp(o,ru===0?t:t+`_`+ru,n),ru++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||au(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function ou(e,t){for(;e!==null;)e.tag===5?Jp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||ou(e.child,t),e=e.sibling}function su(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(su(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=Di(t.default,t.share),t!==`none`&&(iu(e,n,t,null,!1)||ou(e.child,!1))}e=e.sibling}}function cu(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=Ti(r,n),a=Di(r.default,n.paired?r.share:r.enter);a===`none`?su(e):iu(e,i,a,null,!1)?(su(e),n.paired||t||Qd(e,r.onEnter)):ou(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)cu(e,t),e=e.sibling;else su(e)}function lu(e){if($l!==null&&$l.size!==0){var t=$l;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=Di(n.default,n.share);if(a!==`none`&&(iu(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Qd(e,n.onShare)):ou(e.child,!1)),t.delete(r),t.size===0)break}}}lu(e)}e=e.sibling}}}function uu(e){if(e.tag===30){var t=e.memoizedProps,n=Ti(t,e.stateNode),r=$l===null?void 0:$l.get(n),i=Di(t.default,r===void 0?t.exit:t.share);i!==`none`&&(iu(e,n,i,null,!1)?r===void 0?Qd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,$l.delete(n),Qd(e,t.onShare)):ou(e.child,!1)),$l!==null&&lu(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)uu(e),e=e.sibling;else $l!==null&&lu(e)}function du(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Ti(t,e.stateNode);t=Di(t.default,t.update),e.flags&=-5,t!==`none`&&iu(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&du(e);e=e.sibling}}function fu(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,ou(e.child,!1))}fu(e)}e=e.sibling}}function pu(e){if(e.tag===30)e.stateNode.paired=null,ou(e.child,!1),fu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)pu(e),e=e.sibling;else fu(e)}function mu(e){for(e=e.child;e!==null;)e.tag===30?ou(e.child,!1):e.subtreeFlags&33554432&&mu(e),e=e.sibling}function hu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&ru<a.length){var l=a[ru],u=Xp(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&&qp(c,ru===0?n:n+`_`+ru,i),s&&e.flags&4||(tu===null&&(tu=[]),tu.push(c,ru===0?r:r+`_`+ru,t.memoizedProps)),ru++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:hu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function gu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=Ti(n,r),a=Di(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Zp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;ru=0,i=hu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Qd(e,n.onUpdate))}else e.subtreeFlags&33554432&&gu(e,t);e=e.sibling}}var _u=!1,vu=!1,yu=!1,bu=!1,xu=typeof WeakSet==`function`?WeakSet:Set,Su=null,Cu=!1,wu=!1,Tu=!1,Eu=!1;function Du(e,t,n){if(e=e.containerInfo,kp=Ih,e=ti(e),ni(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(Ap={focusedElem:e,selectionRange:r},Ih=!1,n=(n&335544064)===n,Su=t,t=n?9270:1024;Su!==null;){if(e=Su,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&uu(r[a]);if(e.alternate===null&&e.flags&2)n&&eu(e),Ou(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&uu(r),Ou(n);continue}if(r!==null&&r.memoizedState!==null){n&&eu(e),Ou(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,Su=r):(n&&du(e),Ou(n))}}$l=null}function Ou(e){for(;Su!==null;){var t=Su,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=Pc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){Nf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)wm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:wm(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=Ti(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=Di(a.default,a.update),a!==`none`&&iu(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,Su=r;break}Su=t.return}}function ku(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Yu(e,n),r&4&&Pl(5,n);break;case 1:if(Yu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Nf(n,n.return,e)}else{var i=Pc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Nf(n,n.return,e)}}}r&64&&Il(n),r&512&&Rl(n,n.return);break;case 3:if(Yu(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{Po(e,t)}catch(e){Nf(n,n.return,e)}}break;case 27:t===null&&r&4&&Zl(n);case 26:case 5:Yu(e,n),t===null&&r&4&&Gl(n),r&512&&Rl(n,n.return);break;case 12:Yu(e,n);break;case 31:Yu(e,n),r&4&&Ru(e,n);break;case 13:Yu(e,n),r&4&&zu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Lf.bind(null,n),Am(e,n))));break;case 22:if(r=n.memoizedState!==null||_u,!r){var a=t!==null&&t.memoizedState!==null||vu;t=_u,i=vu,_u=r,(vu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Zu(e,n,r)):Yu(e,n),_u=t,vu=i}break;case 30:Yu(e,n),r&512&&Rl(n,n.return);break;case 7:r&512&&Rl(n,n.return);default:Yu(e,n)}}function Au(e,t){for(e=e.child;e!==null;)ju(e,t),e=e.sibling}function ju(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){Nf(e,e.return,t)}Mu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,en=!0}catch(t){Nf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Kp(s,!0):Kp(e.stateNode,!1)}catch(t){Nf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&Au(e,t);break;default:Au(e,t)}}function Mu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:ju(n,r);break a;case 22:n.memoizedState===null&&Mu(n,r);break a;default:Mu(n,r)}}e=e.sibling}}function Nu(e){var t=e.alternate;t!==null&&(e.alternate=null,Nu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&zt(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 Pu=null,Fu=!1;function Iu(e,t,n){for(n=n.child;n!==null;)Lu(e,t,n),n=n.sibling}function Lu(e,t,n){if(at&&typeof at.onCommitFiberUnmount==`function`)try{at.onCommitFiberUnmount(it,n)}catch{}switch(n.tag){case 26:vu||zl(n,t),Iu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!vu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:vu||zl(n,t),Hl(n);var r=Pu,i=Fu;Wp(n.type)&&(Pu=n.stateNode,Fu=!1),Iu(e,t,n),Lm(n.stateNode,n.type,n.memoizedProps),Pu=r,Fu=i;break;case 5:vu||zl(n,t),Hl(n);case 6:if(n.tag===6&&Hl(n),r=Pu,i=Fu,Pu=null,Iu(e,t,n),Pu=r,Fu=i,Pu!==null){if(Fu)try{(Pu.nodeType===9?Pu.body:Pu.nodeName===`HTML`?Pu.ownerDocument.body:Pu).removeChild(n.stateNode),en=!0}catch(e){Nf(n,t,e)}else try{Pu.removeChild(n.stateNode),en=!0}catch(e){Nf(n,t,e)}}break;case 18:Pu!==null&&(Fu?(e=Pu,Gp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),cg(e)):Gp(Pu,n.stateNode));break;case 4:r=Pu,i=Fu,Pu=n.stateNode.containerInfo,Fu=!0,Iu(e,t,n),Pu=r,Fu=i;break;case 0:case 11:case 14:case 15:Fl(2,n,t),vu||Fl(4,n,t),Iu(e,t,n);break;case 1:vu||(zl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ll(n,t,r)),Iu(e,t,n);break;case 21:Iu(e,t,n);break;case 22:vu=(r=vu)||n.memoizedState!==null,Iu(e,t,n),vu=r;break;case 30:zl(n,t),Iu(e,t,n);break;case 7:vu||zl(n,t),Iu(e,t,n);break;default:Iu(e,t,n)}}function Ru(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{cg(e)}catch(e){Nf(t,t.return,e)}}}function zu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{cg(e)}catch(e){Nf(t,t.return,e)}}function Bu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xu),t;default:throw Error(i(435,e.tag))}}function Vu(e,t){var n=Bu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Rf.bind(null,e,t);t.then(r,r)}})}function Hu(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(Wp(l.type)){Pu=l.stateNode,Fu=!1;break a}break;case 5:Pu=l.stateNode,Fu=!1;break a;case 3:case 4:Pu=l.stateNode.containerInfo,Fu=!0;break a}l=l.return}if(Pu===null)throw Error(i(160));Lu(s,c,o),Pu=null,Fu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Wu(t,e,n),t=t.sibling}var Uu=null;function Wu(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}Hu(t,e,n),Gu(e),a&4&&(Fl(3,e,e.return),Pl(3,e),Fl(5,e,e.return));break;case 1:Hu(t,e,n),Gu(e),a&512&&(vu||r===null||zl(r,r.return)),a&64&&_u&&(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=Uu,Hu(t,e,n),Gu(e),a&512&&(vu||r===null||zl(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(_u)e.stateNode=Pp(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[Lt]||r[jt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),wp(r,t,n),r[jt]=e,Wt(r),t=r;break a;case`link`:if(o=dh(`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),wp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=dh(`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),wp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[jt]=e,Wt(r),t=r}e.stateNode=t}}else _u||fh(o,e.type,e.stateNode)}else e.stateNode=oh(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Kl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||vu||t.parentNode.removeChild(t)):a.count--,n===null?_u||fh(o,e.type,e.stateNode):oh(o,n,e.memoizedProps))}break;case 27:Hu(t,e,n),Gu(e),a&512&&(vu||r===null||zl(r,r.return)),r!==null&&a&4&&Kl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=yu,yu=!1,Hu(t,e,n),yu=o,Gu(e),a&512&&(vu||r===null||zl(r,r.return)),e.flags&32){t=e.stateNode;try{vn(t,``),en=!0}catch(t){Nf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Kl(e,t,r===null?t:r.memoizedProps)),a&1024&&(bu=!0);break;case 6:if(Hu(t,e,n),Gu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,en=!0}catch(t){Nf(e,e.return,t)}}break;case 3:if(en=!1,uh=null,o=Uu,Uu=Vm(t.containerInfo),Hu(t,e,n),Uu=o,Gu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{cg(t.containerInfo)}catch(t){Nf(e,e.return,t)}bu&&(bu=!1,Ku(e)),en=!1;break;case 4:a=yu,yu=_u,r=tn(),o=Uu,Uu=Vm(e.stateNode.containerInfo),Hu(t,e,n),Gu(e),Uu=o,en&&wu&&(Tu=!0),en=r,yu=a;break;case 12:Hu(t,e,n),Gu(e);break;case 31:Hu(t,e,n),Gu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Vu(e,t)));break;case 13:Hu(t,e,n),Gu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Nd=Ye()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Vu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=_u,l=vu,u=yu;_u=c||o,yu=u||o,vu=l||s,Hu(t,e,n),vu=l,yu=u,_u=c,Gu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||_u||vu||(t=s||vu,n=_u,r=vu,_u=o||_u,vu=t,Xu(e,2),_u=n,vu=r),!o&&yu||Au(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Vu(e,n))));break;case 19:Hu(t,e,n),Gu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Vu(e,t)));break;case 30:a&512&&(vu||r===null||zl(r,r.return)),a=tn(),o=wu,s=(n&335544064)===n,c=e.memoizedProps,wu=s&&Di(c.default,c.update)!==`none`,Hu(t,e,n),Gu(e),s&&r!==null&&en&&(e.flags|=4),wu=o,en=a;break;case 21:break;case 7:a&512&&(vu||r===null||zl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Hu(t,e,n),Gu(e)}}function Gu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(ql(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Wl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Ul(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Xl(e,Jl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(vn(l,``),n.flags&=-33),Xl(e,Jl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Yl(e,Jl(e),u,s);break;default:throw Error(i(161))}}catch(t){Nf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ku(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ku(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ih=!0,t.reset(),Ih=!1),e=e.sibling}}function qu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ju(t,e),t=t.sibling;else gu(t,!1)}function Ju(e,t){var n=e.alternate;if(n===null)cu(e,!1);else switch(e.tag){case 3:if(Eu=Cu=!1,nu(),qu(t,e),!Cu&&!Tu){if(e=tu,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Jp(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`})),Eu=!0}tu=null;break;case 5:qu(t,e);break;case 4:r=Cu,Cu=!1,qu(t,e),Cu&&(Tu=!0),Cu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?qu(t,e):cu(e,!1));break;case 30:r=Cu,i=nu(),Cu=!1,qu(t,e),Cu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=Ti(a,o),o=Ti(n.memoizedProps,o);var s=Di(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,ru=0,t=hu(e,n,t,o,s,a,!0),ru!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Qd(e,e.memoizedProps.onUpdate),tu=i):i!==null&&(i.push.apply(i,tu),tu=i),Cu=e.flags&32?!0:r;break;default:qu(t,e)}}function Yu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ku(e,t.alternate,t),t=t.sibling}function Xu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Fl(4,n,n.return),Xu(n,r);break;case 1:zl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Ll(n,n.return,i),Xu(n,r);break;case 27:r&2&&Lm(n.stateNode,n.type,n.memoizedProps);case 5:zl(n,n.return),n.tag!==5&&n.tag!==27||Hl(n),Xu(n,r);break;case 6:Hl(n);break;case 26:zl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||vu||i.parentNode.removeChild(i),Xu(n,r);break;case 22:n.memoizedState===null&&Xu(n,r);break;case 30:zl(n,n.return),Xu(n,r);break;case 7:zl(n,n.return);default:Xu(n,r)}e=e.sibling}}function Zu(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:Zu(i,a,n),Pl(4,a);break;case 1:if(Zu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Nf(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++)No(l[i],c)}catch(e){Nf(r,r.return,e)}}s&&o&64&&Il(a),Rl(a,a.return);break;case 27:n&2&&Zl(a);case 5:a.tag!==5&&a.tag!==27||Vl(a),Zu(i,a,n),s&&r===null&&o&4&&Gl(a),Rl(a,a.return);break;case 6:Vl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||_u||fh(Vm(c.ownerDocument),a.type,c),Zu(i,a,n),s&&r===null&&o&4&&Gl(a),Rl(a,a.return);break;case 12:Zu(i,a,n);break;case 31:Zu(i,a,n),s&&o&4&&Ru(i,a);break;case 13:Zu(i,a,n),s&&o&4&&zu(i,a);break;case 22:a.memoizedState===null&&Zu(i,a,n),Rl(a,a.return);break;case 30:Zu(i,a,n),Rl(a,a.return);break;case 7:Rl(a,a.return);default:Zu(i,a,n)}t=t.sibling}}function Qu(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&&Ha(n))}function $u(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ha(e))}function ed(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)td(e,t,n,r),t=t.sibling;else i&&mu(t)}function td(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&pu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:ed(e,t,n,r),a&2048&&Pl(9,t);break;case 1:ed(e,t,n,r);break;case 3:ed(e,t,n,r),i&&Eu&&(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&&Ha(a)));break;case 12:if(a&2048){ed(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){Nf(t,t.return,e)}}else ed(e,t,n,r);break;case 31:ed(e,t,n,r);break;case 13:ed(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&&pu(t),o._visibility&2?ed(e,t,n,r):(o._visibility|=2,nd(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&pu(s),o._visibility&2?ed(e,t,n,r):rd(e,t)),a&2048&&Qu(s,t);break;case 24:ed(e,t,n,r),a&2048&&$u(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(ou(a.child,!0),ou(t.child,!0))),ed(e,t,n,r);break;default:ed(e,t,n,r)}}function nd(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:nd(a,o,s,c,i),Pl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,nd(a,o,s,c,i)):u._visibility&2?nd(a,o,s,c,i):rd(a,o),i&&l&2048&&Qu(o.alternate,o);break;case 24:nd(a,o,s,c,i),i&&l&2048&&$u(o.alternate,o);break;default:nd(a,o,s,c,i)}t=t.sibling}}function rd(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:rd(n,r),i&2048&&Qu(r.alternate,r);break;case 24:rd(n,r),i&2048&&$u(r.alternate,r);break;default:rd(n,r)}t=t.sibling}}var id=8192;function ad(e,t,n){if(e.subtreeFlags&id)for(e=e.child;e!==null;)od(e,t,n),e=e.sibling}function od(e,t,n){switch(e.tag){case 26:ad(e,t,n),e.flags&id&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&_h(n,e)):vh(n,Uu,e.memoizedState,e.memoizedProps));break;case 5:ad(e,t,n),e.flags&id&&(e=e.stateNode,(t&335544128)===t&&_h(n,e));break;case 3:case 4:var r=Uu;Uu=Vm(e.stateNode.containerInfo),ad(e,t,n),Uu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=id,id=16777216,ad(e,t,n),id=r):ad(e,t,n));break;case 30:if((e.flags&id)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,$l===null&&($l=new Map),$l.set(r,i)}ad(e,t,n);break;default:ad(e,t,n)}}function sd(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 cd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Su=r,dd(r,e)}sd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ld(e),e=e.sibling}function ld(e){switch(e.tag){case 0:case 11:case 15:cd(e),e.flags&2048&&Fl(9,e,e.return);break;case 3:cd(e);break;case 12:cd(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ud(e)):cd(e);break;default:cd(e)}}function ud(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Su=r,dd(r,e)}sd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fl(8,t,t.return),ud(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ud(t));break;default:ud(t)}e=e.sibling}}function dd(e,t){for(;Su!==null;){var n=Su;switch(n.tag){case 0:case 11:case 15:Fl(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:Ha(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Su=r;else a:for(n=e;Su!==null;){r=Su;var i=r.sibling,a=r.return;if(Nu(r),r===n){Su=null;break a}if(i!==null){i.return=a,Su=i;break a}Su=a}}}var fd={getCacheForType:function(e){var t=Pa(Ba),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Pa(Ba).controller.signal}},pd=typeof WeakMap==`function`?WeakMap:Map,md=0,hd=null,gd=null,_d=0,vd=0,yd=null,bd=!1,xd=!1,Sd=!1,Cd=0,wd=0,Td=0,Ed=0,Dd=0,Od=0,kd=0,Ad=null,jd=null,Md=!1,Nd=0,Pd=0,Fd=1/0,Id=null,Ld=null,Rd=0,zd=null,Bd=null,Vd=0,Hd=0,Ud=null,Wd=null,Gd=null,Kd=null,qd=null,Jd=0,Yd=null;function Xd(){return md&2&&_d!==0?_d&-_d:xe.T===null?Ot():ep()}function Zd(){if(Od===0){if(!(_d&536870912)||pa){var e=ft;ft<<=1,!(ft&3932160)&&(ft=262144),Od=e}else Od=536870912}return e=Bo.current,e!==null&&(e.flags|=32),Od}function Qd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=nm(Ti(e.memoizedProps,n))),Kd===null&&(Kd=[]),Kd.push(t.bind(null,r))}}function $d(e,t,n){(e===hd&&(vd===2||vd===9)||e.cancelPendingCommit!==null)&&(sf(e,0),rf(e,_d,Od,!1)),xt(e,n),md&2&&e===hd||(e===hd&&(!(md&2)&&(Ed|=n),wd===4&&rf(e,_d,Od,!1)),Kf(e))}function ef(e,t,n){if(md&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||gt(e,t),a=r?hf(e,t):pf(e,t,!0),o=r;do{if(a===0){xd&&!r&&rf(e,t,0,!1);break}if(n=e.current.alternate,o&&!nf(n))a=pf(e,t,!1),o=!1;else{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=Ad;var l=c.current.memoizedState.isDehydrated;if(l&&(sf(c,s).flags|=256),s=pf(c,s,!1),s!==2&&s!==6){if(Sd&&!l){c.errorRecoveryDisabledLanes|=o,Ed|=o,a=4;break a}o=jd,jd=a,o!==null&&(jd===null?jd=o:jd.push.apply(jd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){sf(e,0),rf(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:rf(r,t,Od,!bd);break a;case 2:jd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Nd+300-Ye(),10<a)){if(rf(r,t,Od,!bd),ht(r,0,!0)!==0)break a;Vd=t,r.timeoutHandle=Rp(tf.bind(null,r,n,jd,Id,Md,t,Od,Ed,kd,bd,o,`Throttled`,-0,0),a);break a}tf(r,n,jd,Id,Md,t,Od,Ed,kd,bd,o,null,-0,0)}break}}while(1);Kf(e)}function tf(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;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:En},$l=null,od(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=Sh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?Nd-Ye():(a&4194048)===a?Pd-Ye():0,m=bh(d,m),m!==null)?(Vd=a,e.cancelPendingCommit=m(Sf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),rf(e,a,o,!l)):Sf(e,t,a,n,r,i,o,s,c,l,u,d)}function nf(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(!Yr(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 rf(e,t,n,r){t=_t(e,t),t&=~Dd,t&=~Ed,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-st(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ct(e,n,t)}function af(){return md&6?!0:(qf(0,!1),!1)}function of(){if(gd!==null){if(vd===0)var e=gd.return;else e=gd,Ea=Ta=null,gs(e),ho=null,go=0,e=gd;for(;e!==null;)Nl(e.alternate,e),e=e.return;gd=null}}function sf(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,zp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Vd=0,of(),hd=e,gd=n=Hi(e.current,null),_d=t,vd=0,yd=null,bd=!1,xd=gt(e,t),Sd=!1,kd=Od=Dd=Ed=Td=wd=0,jd=Ad=null,Md=!1,Cd=_t(e,t),Mi(),n}function cf(e,t){Qo=null,xe.H=Ec,t===io||t===oo?(t=po(),vd=3):t===ao?(t=po(),vd=4):vd=t===Wc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,yd=t,gd===null&&(wd=1,Rc(e,Xi(t,e.current)))}function lf(){var e=Bo.current;return e===null?!0:(_d&4194048)===_d?Vo===null:(_d&62914560)===_d||_d&536870912?e===Vo:!1}function uf(){var e=xe.H;return xe.H=Ec,e===null?Ec:e}function df(){var e=xe.A;return xe.A=fd,e}function ff(){wd=4,bd||(_d&4194048)!==_d&&Bo.current!==null||(xd=!0),!(Td&134217727)&&!(Ed&134217727)||hd===null||rf(hd,_d,Od,!1)}function pf(e,t,n){var r=md;md|=2;var i=uf(),a=df();(hd!==e||_d!==t)&&(Id=null,sf(e,t)),t=!1;var o=wd;a:do try{if(vd!==0&&gd!==null){var s=gd,c=yd;switch(vd){case 8:of(),o=6;break a;case 3:case 2:case 9:case 6:Bo.current===null&&(t=!0);var l=vd;if(vd=0,yd=null,yf(e,s,c,l),n&&xd){o=0;break a}break;default:l=vd,vd=0,yd=null,yf(e,s,c,l)}}mf(),o=wd;break}catch(t){cf(e,t)}while(1);return t&&e.shellSuspendCounter++,Ea=Ta=null,md=r,xe.H=i,xe.A=a,gd===null&&(hd=null,_d=0,Mi()),o}function mf(){for(;gd!==null;)_f(gd)}function hf(e,t){var n=md;md|=2;var r=uf(),a=df();hd!==e||_d!==t?(Id=null,Fd=Ye()+500,sf(e,t)):xd=gt(e,t);a:do try{if(vd!==0&&gd!==null){t=gd;var o=yd;b:switch(vd){case 1:vd=0,yd=null,yf(e,t,o,1);break;case 2:case 9:if(co(o)){vd=0,yd=null,vf(t);break}t=function(){vd!==2&&vd!==9||hd!==e||(vd=7),Kf(e)},o.then(t,t);break a;case 3:vd=7;break a;case 4:vd=5;break a;case 7:co(o)?(vd=0,yd=null,vf(t)):(vd=0,yd=null,yf(e,t,o,7));break;case 5:var s=null;switch(gd.tag){case 26:s=gd.memoizedState;case 5:case 27:var c=gd;if(s?hh(s):c.stateNode.complete){vd=0,yd=null;var l=c.sibling;if(l!==null)gd=l;else{var u=c.return;u===null?gd=null:(gd=u,bf(u))}break b}}vd=0,yd=null,yf(e,t,o,5);break;case 6:vd=0,yd=null,yf(e,t,o,6);break;case 8:of(),wd=6;break a;default:throw Error(i(462))}}gf();break}catch(t){cf(e,t)}while(1);return Ea=Ta=null,xe.H=r,xe.A=a,md=n,gd===null?(hd=null,_d=0,Mi(),wd):0}function gf(){for(;gd!==null&&!qe();)_f(gd)}function _f(e){var t=wl(e.alternate,e,Cd);e.memoizedProps=e.pendingProps,t===null?bf(e):gd=t}function vf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=il(n,t,t.pendingProps,t.type,void 0,_d);break;case 11:t=il(n,t,t.pendingProps,t.type.render,t.ref,_d);break;case 5:gs(t);var r=t;r===da&&(pa?(ya(r),r.tag===5&&r.stateNode!=null&&(fa=r.stateNode)):(ya(r),pa=!0));default:Nl(n,t),t=gd=Ui(t,Cd),t=wl(n,t,Cd)}e.memoizedProps=e.pendingProps,t===null?bf(e):gd=t}function yf(e,t,n,r){Ea=Ta=null,gs(t),ho=null,go=0;var i=t.return;try{if(Uc(e,i,t,n,_d)){wd=1,Rc(e,Xi(n,e.current)),gd=null;return}}catch(t){if(i!==null)throw gd=i,t;wd=1,Rc(e,Xi(n,e.current)),gd=null;return}t.flags&32768?(pa||r===1?e=!0:xd||_d&536870912?e=!1:(bd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Bo.current,r!==null&&r.tag===13&&(r.flags|=16384))),xf(t,e)):bf(t)}function bf(e){var t=e;do{if(t.flags&32768){xf(t,bd);return}e=t.return;var n=jl(t.alternate,t,Cd);if(n!==null){gd=n;return}if(t=t.sibling,t!==null){gd=t;return}gd=t=e}while(t!==null);wd===0&&(wd=5)}function xf(e,t){do{var n=Ml(e.alternate,e);if(n!==null){n.flags&=32767,gd=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){gd=e;return}gd=e=n}while(e!==null);wd=6,gd=null}function Sf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do Af();while(Rd!==0);if(md&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===hd&&(gd=hd=null,_d=0),Bd=t,zd=e,Vd=n,Ud=a,Wd=r,Cf(e,t,n,s,c,l,f)}}function Cf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Hd=s,s|=ji,St(e,n,s,r,i,a),Kd=null,(n&335544064)===n?(qd=Ga(e),r=10262):(qd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,zf($e,function(){return jf(),null})):(e.callbackNode=null,e.callbackPriority=0),Ql=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=xe.T,xe.T=null,i=Se.p,Se.p=2,a=md,md|=4;try{Du(e,t,n)}finally{md=a,Se.p=i,xe.T=r}}Rd=1,Ql?Gd=em(o,e.containerInfo,qd,Ef,Df,Tf,Of,jf,wf,null,null):(Ef(),Df(),Of())}function wf(e){if(Rd!==0){var t=zd.onRecoverableError;t(e,{componentStack:null})}}function Tf(){Rd===3&&(Rd=0,Ju(Bd,zd),Rd=4)}function Ef(){if(Rd===1){Rd=0;var e=zd,t=Bd,n=Vd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=xe.T,xe.T=null;var i=Se.p;Se.p=2;var a=md;md|=4;try{wu=Tu=!1,Wu(t,e,n),n=Ap;var o=ti(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&ei(s.ownerDocument.documentElement,s)){if(c!==null&&ni(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 _=$r(s,h),v=$r(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}}Ih=!!kp,Ap=kp=null}finally{md=a,Se.p=i,xe.T=r}}e.current=t,Rd=2}}function Df(){if(Rd===2){Rd=0;var e=zd,t=Bd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=xe.T,xe.T=null;var r=Se.p;Se.p=2;var i=md;md|=4;try{ku(e,t.alternate,t)}finally{md=i,Se.p=r,xe.T=n}}Rd=3}}function Of(){if(Rd===4||Rd===3){Rd=0;var e=Gd;Gd=null,Je();var t=zd,n=Bd,r=Vd,i=Wd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Rd=5:(Rd=0,Bd=zd=null,kf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Ld=null),Dt(r),n=n.stateNode,at&&typeof at.onCommitFiberRoot==`function`)try{at.onCommitFiberRoot(it,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=xe.T,a=Se.p,Se.p=2,xe.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{xe.T=n,Se.p=a}}if(i=Kd,o=qd,qd=null,i!==null&&(Kd=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);Vd&3&&Af(),Kf(t),a=t.pendingLanes,r&261930&&a&42?t===Yd?Jd++:(Jd=0,Yd=t):(Jd=0,Yd=null),qf(0,!1)}}function kf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ha(t)))}function Af(){return Gd!==null&&(Gd.skipTransition(),Gd=null),Ef(),Df(),Of(),jf()}function jf(){if(Rd!==5)return!1;var e=zd,t=Hd;Hd=0;var n=Dt(Vd),r=xe.T,a=Se.p;try{Se.p=32>n?32:n,xe.T=null,n=Ud,Ud=null;var o=zd,s=Vd;if(Rd=0,Bd=zd=null,Vd=0,md&6)throw Error(i(331));var c=md;if(md|=4,ld(o.current),td(o,o.current,s,n),md=c,qf(0,!1),at&&typeof at.onPostCommitFiberRoot==`function`)try{at.onPostCommitFiberRoot(it,o)}catch{}return!0}finally{Se.p=a,xe.T=r,kf(e,t)}}function Mf(e,t,n){t=Xi(n,t),t=Bc(e.stateNode,t,2),e=Do(e,t,2),e!==null&&(xt(e,2),Kf(e))}function Nf(e,t,n){if(e.tag===3)Mf(e,e,n);else for(;t!==null;){if(t.tag===3){Mf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Ld===null||!Ld.has(r))){e=Xi(n,e),n=Vc(2),r=Do(t,n,2),r!==null&&(Hc(n,r,t,e),xt(r,2),Kf(r));break}}t=t.return}}function Pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new pd;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)||(Sd=!0,i.add(n),e=Ff.bind(null,e,t,n),t.then(e,e))}function Ff(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,hd===e&&(_d&n)===n&&(wd===4||wd===3&&(_d&62914560)===_d&&300>Ye()-Nd?md&2?Dd|=n:sf(e,0):Dd|=n,kd===_d&&(kd=0)),Kf(e)}function If(e,t){t===0&&(t=yt()),e=Fi(e,t),e!==null&&(xt(e,t),Kf(e))}function Lf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),If(e,n)}function Rf(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),If(e,n)}function zf(e,t){return Ge(e,t)}var Bf=null,Vf=null,Hf=!1,Uf=!1,Wf=!1,Gf=0;function Kf(e){e!==Vf&&e.next===null&&(Vf===null?Bf=Vf=e:Vf=Vf.next=e),Uf=!0,Hf||(Hf=!0,$f())}function qf(e,t){if(!Wf&&Uf){Wf=!0;do for(var n=!1,r=Bf;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-st(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Qf(r,a))}else a=_d,a=ht(r,r===hd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||gt(r,a)||(n=!0,Qf(r,a))}r=r.next}while(n);Wf=!1}}function Jf(){Yf()}function Yf(){Uf=Hf=!1;var e=0;Gf!==0&&Lp()&&(e=Gf);for(var t=Ye(),n=null,r=Bf;r!==null;){var i=r.next,a=Xf(r,t);a===0?(r.next=null,n===null?Bf=i:n.next=i,i===null&&(Vf=n)):(n=r,(e!==0||a&3)&&(Uf=!0)),r=i}Rd!==0&&Rd!==5||qf(e,!1),Gf!==0&&(Gf=0)}function Xf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-st(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=vt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=hd,n=_d,n=ht(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(vd===2||vd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ke(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||gt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ke(r),Dt(n)){case 2:case 8:n=Qe;break;case 32:n=$e;break;case 268435456:n=tt;break;default:n=$e}return r=Zf.bind(null,e),n=Ge(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ke(r),e.callbackPriority=2,e.callbackNode=null,2}function Zf(e,t){if(Rd!==0&&Rd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Af()&&e.callbackNode!==n)return null;var r=_d;return r=ht(e,e===hd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(ef(e,r,t),Xf(e,Ye()),e.callbackNode!=null&&e.callbackNode===n?Zf.bind(null,e):null)}function Qf(e,t){if(Af())return null;ef(e,t,!0)}function $f(){Hp(function(){md&6?Ge(Ze,Jf):Yf()})}function ep(){if(Gf===0){var e=Ja;e===0&&(e=dt,dt<<=1,!(dt&261888)&&(dt=256)),Gf=e}return Gf}function tp(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Tn(e)}function np(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=tp((i[Mt]||null).action),o=r.submitter;o&&(t=(t=o[Mt]||null)?tp(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new qn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Gf!==0){var e=new FormData(i,o);fc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),fc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var rp=0;rp<Si.length;rp++){var ip=Si[rp];Ci(ip.toLowerCase(),`on`+(ip[0].toUpperCase()+ip.slice(1)))}Ci(mi,`onAnimationEnd`),Ci(hi,`onAnimationIteration`),Ci(gi,`onAnimationStart`),Ci(`dblclick`,`onDoubleClick`),Ci(`focusin`,`onFocus`),Ci(`focusout`,`onBlur`),Ci(_i,`onTransitionRun`),Ci(vi,`onTransitionStart`),Ci(yi,`onTransitionCancel`),Ci(bi,`onTransitionEnd`),Yt(`onMouseEnter`,[`mouseout`,`mouseover`]),Yt(`onMouseLeave`,[`mouseout`,`mouseover`]),Yt(`onPointerEnter`,[`pointerout`,`pointerover`]),Yt(`onPointerLeave`,[`pointerout`,`pointerover`]),Jt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Jt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Jt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Jt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Jt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Jt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ap=`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(` `),op=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(ap));function sp(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){Oi(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){Oi(e)}i.currentTarget=null,a=c}}}}function cp(e,t){var n=t[Pt];n===void 0&&(n=t[Pt]=new Set);var r=e+`__bubble`;n.has(r)||(fp(t,e,2,!1),n.add(r))}function lp(e,t,n){var r=0;t&&(r|=4),fp(n,e,r,t)}var up=`_reactListening`+Math.random().toString(36).slice(2);function dp(e){if(!e[up]){e[up]=!0,Kt.forEach(function(t){t!==`selectionchange`&&(op.has(t)||lp(t,!1,e),lp(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[up]||(t[up]=!0,lp(`selectionchange`,!1,t))}}function fp(e,t,n,r){switch(Uh(t)){case 2:var i=Lh;break;case 8:i=Rh;break;default:i=zh}n=i.bind(null,t,n,e),i=void 0,!In||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 pp(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=Bt(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}Nn(function(){var r=a,i=On(n),s=[];a:{var c=xi.get(e);if(c!==void 0){var l=qn,u=e;switch(e){case`keypress`:if(Hn(n)===0)break a;case`keydown`:case`keyup`:l=dr;break;case`focusin`:u=`focus`,l=nr;break;case`focusout`:u=`blur`,l=nr;break;case`beforeblur`:case`afterblur`:l=nr;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=er;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=tr;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=mr;break;case mi:case hi:case gi:l=rr;break;case bi:l=hr;break;case`scroll`:case`scrollend`:l=Yn;break;case`wheel`:l=gr;break;case`copy`:case`cut`:case`paste`:l=ir;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=fr;break;case`submit`:l=pr;break;case`toggle`:case`beforetoggle`:l=_r}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=Pn(m,p),g!=null&&d.push(mp(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!==Dn&&(u=n.relatedTarget||n.fromElement)&&(Bt(u)||u[Nt]))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?Bt(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=er,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=fr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Ht(c),h=l==null?u:Ht(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Bt(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,gp):null,c!==null&&_p(s,u,c,d,!1),l!==null&&f!==null&&_p(s,f,l,d,!0)))}a:{if(c=r?Ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Lr;else if(jr(c)){if(Rr)_=qr;else{_=Gr;var v=Wr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Sn(r.elementType)&&(_=Lr):_=Kr;if(_&&=_(e,r)){Mr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ht(r):window,e){case`focusin`:(jr(v)||v.contentEditable===`true`)&&(ii=v,ai=r,oi=null);break;case`focusout`:oi=ai=ii=null;break;case`mousedown`:si=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:si=!1,ci(s,n,i);break;case`selectionchange`:if(ri)break;case`keydown`:case`keyup`:ci(s,n,i)}var y;if(yr)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 Dr?Tr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(Sr&&n.locale!==`ko`&&(Dr||b!==`onCompositionStart`?b===`onCompositionEnd`&&Dr&&(y=Vn()):(Rn=i,zn=`value`in Rn?Rn.value:Rn.textContent,Dr=!0)),v=hp(r,b),0<v.length&&(b=new ar(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=Er(n),y!==null&&(b.data=y)))),(y=xr?Or(e,n):kr(e,n))&&(b=hp(r,`onBeforeInput`),0<b.length&&(v=new ar(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),np(s,e,r,n,i)}sp(s,t)})}function mp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hp(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=Pn(e,n),i!=null&&r.unshift(mp(e,i,a)),i=Pn(e,t),i!=null&&r.push(mp(e,i,a))),e.tag===3)return r;e=e.return}return[]}function gp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function _p(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=Pn(n,a),l!=null&&o.unshift(mp(n,l,c))):i||(l=Pn(n,a),l!=null&&o.push(mp(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var vp=/\r\n?/g,yp=/\u0000|\uFFFD/g;function bp(e){return(typeof e==`string`?e:``+e).replace(vp,`
|
|
9
|
-
`).replace(yp,``)}function xp(e,t){return t=bp(t),bp(e)===t}function Sp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||vn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&vn(e,``+r);else return;break;case`className`:rn(e,`class`,r);break;case`tabIndex`:rn(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:rn(e,n,r);break;case`style`:xn(e,r,o);return;case`data`:if(t!==`object`){rn(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Tn(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`&&Sp(e,t,`name`,a.name,a,null),Sp(e,t,`formEncType`,a.formEncType,a,null),Sp(e,t,`formMethod`,a.formMethod,a,null),Sp(e,t,`formTarget`,a.formTarget,a,null)):(Sp(e,t,`encType`,a.encType,a,null),Sp(e,t,`method`,a.method,a,null),Sp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Tn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=En);return;case`onScroll`:r!=null&&cp(`scroll`,e);return;case`onScrollEnd`:r!=null&&cp(`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=Tn(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`:cp(`beforetoggle`,e),cp(`toggle`,e),nn(e,`popover`,r);break;case`xlinkActuate`:an(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:an(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:an(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:an(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:an(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:an(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:an(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:an(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:an(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:nn(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=Cn.get(n)||n,nn(e,n,r);else return}en=!0}function Cp(e,t,n,r,a,o){switch(n){case`style`:xn(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`)vn(e,r);else if(typeof r==`number`||typeof r==`bigint`)vn(e,``+r);else return;break;case`onScroll`:r!=null&&cp(`scroll`,e);return;case`onScrollEnd`:r!=null&&cp(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=En);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!qt.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[Mt]||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}en=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):nn(e,n,r)}return}en=!0}function wp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:cp(`error`,e),cp(`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:Sp(e,t,o,s,n,null)}}a&&Sp(e,t,`srcSet`,n.srcSet,n,null),r&&Sp(e,t,`src`,n.src,n,null);return;case`input`:cp(`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:Sp(e,t,r,d,n,null)}}pn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in cp(`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:Sp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&hn(e,!!r,n,!0):hn(e,!!r,t,!1);return;case`textarea`:for(s in cp(`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:Sp(e,t,s,c,n,null)}_n(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:Sp(e,t,l,r,n,null)}return;case`dialog`:cp(`beforetoggle`,e),cp(`toggle`,e),cp(`cancel`,e),cp(`close`,e);break;case`iframe`:case`object`:cp(`load`,e);break;case`video`:case`audio`:for(r=0;r<ap.length;r++)cp(ap[r],e);break;case`image`:cp(`error`,e),cp(`load`,e);break;case`details`:cp(`toggle`,e);break;case`embed`:case`source`:case`link`:cp(`error`,e),cp(`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:Sp(e,t,u,r,n,null)}return;default:if(Sn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Cp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Sp(e,t,c,r,n,null))}var Tp={};function Ep(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)||Sp(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&&(en=!0),o=m;break;case`name`:m!==f&&(en=!0),a=m;break;case`checked`:m!==f&&(en=!0),u=m;break;case`defaultChecked`:m!==f&&(en=!0),d=m;break;case`value`:m!==f&&(en=!0),s=m;break;case`defaultValue`:m!==f&&(en=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Sp(e,t,p,m,r,f)}}fn(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)||Sp(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&&(en=!0),p=o;break;case`defaultValue`:o!==l&&(en=!0),c=o;break;case`multiple`:o!==l&&(en=!0),s=o;default:o!==l&&Sp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?hn(e,!!n,n?[]:``,!1):hn(e,!!n,t,!0)):hn(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:Sp(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&&(en=!0),p=a;break;case`defaultValue`:a!==o&&(en=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Sp(e,t,s,a,r,o)}gn(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:Sp(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&&(en=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Sp(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)&&Sp(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:Sp(e,t,u,p,r,m)}return;default:if(Sn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Cp(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||Cp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Sp(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||Sp(e,t,f,p,r,m)}function Dp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Op(){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&&Dp(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&&Dp(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 kp=null,Ap=null;function jp(e){return e.nodeType===9?e:e.ownerDocument}function Mp(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 Np(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 Pp(e,t,n,r){return n=jp(n).createElement(e),n[jt]=r,n[Mt]=t,wp(n,e,t),Wt(n),n}function Fp(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 Ip=null;function Lp(){var e=window.event;return e&&e.type===`popstate`?e!==Ip&&(Ip=e,!0):(Ip=null,!1)}var Rp=typeof setTimeout==`function`?setTimeout:void 0,zp=typeof clearTimeout==`function`?clearTimeout:void 0,Bp=typeof Promise==`function`?Promise:void 0,Vp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Rp,Hp=typeof queueMicrotask==`function`?queueMicrotask:Bp===void 0?Rp:function(e){return Bp.resolve(null).then(e).catch(Up)};function Up(e){setTimeout(function(){throw e})}function Wp(e){return e===`head`}function Gp(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),cg(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Rm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Rm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Lt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Rm(e.ownerDocument.body)}n=i}while(n);cg(t)}function Kp(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 qp(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 Jp(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 Yp(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 Xp(e){return Yp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Zp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Yp(t,n,e)}function Qp(e){return e.documentElement.clientHeight}function $p(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function em(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`&&(Qp(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+=gh(f),u>yh){s.length=o;break}f=new Promise($p.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 tm(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}tm.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},tm.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},tm.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function nm(e){return{name:e,group:new tm(`group`,e),imagePair:new tm(`image-pair`,e),old:new tm(`old`,e),new:new tm(`new`,e)}}function rm(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}rm.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(cm(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=om(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,im,e,s,r)}this._eventListeners=a}};function im(e,t,n,r){return b(e).addEventListener(t,n,r),!1}rm.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=cm(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=om(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,am,e,n,i),r.splice(t,1),a!==null&&a()}};function am(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function om(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function sm(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function cm(e,t,n,r){if(e.length===0)return-1;r=sm(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&sm(a.optionsOrUseCapture)===r)return i}return-1}rm.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,om(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,om(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},rm.prototype.focus=function(e){m(this._fragmentFiber.child,!0,lm,e,void 0,void 0)};function lm(e,t){return e.tag!==6&&(e=b(e),Pm(e,t))}rm.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,um,t,void 0,void 0);for(var n=t.length-1;0<=n&&!lm(t[n],e);n--);};function um(e,t){return t.push(e),!1}rm.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=jp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,dm,e,void 0,void 0))};function dm(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}rm.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,fm,e,void 0,void 0)};function fm(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}rm.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,pm,e,void 0,void 0);for(var n=t=0;n<mm.length;n++){var r=mm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):mm[t++]=r}mm.length=t}};function pm(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var mm=[],hm=!1;function gm(e,t,n){mm.push({fragmentInstance:e,observer:t,instance:n}),hm||(hm=!0,Fm(function(){hm=!1;var e=mm;mm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}rm.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,_m,e,void 0,void 0),e};function _m(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}rm.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},rm.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,um,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||vm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function vm(e,t,n,r,i){var a=Bt(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 ym(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)}rm.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,um,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),ym(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),ym(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function bm(e,t){return e=b(e),xm(e,t),!1}function xm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function Sm(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,om(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<mm.length;i++){var a=mm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(mm[r++]=a)}mm.length=r,n.observe(e)}),xm(e,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.removeEventListener(i.type,i.attachedListener,om(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?gm(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function wm(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`:wm(n),zt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function Tm(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[Lt])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=jm(e.nextSibling),e===null)break}return null}function Em(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=jm(e.nextSibling),e===null))return null;return e}function Dm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=jm(e.nextSibling),e===null))return null;return e}function Om(e){return e.data===`$?`||e.data===`$~`}function km(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function Am(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 jm(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 Mm=null;function M(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return jm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Nm(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 Pm(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 Fm(e){Vp(function(){Vp(function(t){return e(t)})})}function Im(e,t,n){switch(t=jp(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 Lm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&Sp(e,t,r,null,Tp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===En&&(e.onclick=null),zt(e)}function Rm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);zt(e)}var zm=new Map,Bm=new Set;function Vm(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 Hm=Se.d;Se.d={f:Um,r:Wm,D:Km,C:qm,L:Jm,m:Ym,X:Zm,S:Xm,M:Qm};function Um(){var e=Hm.f(),t=af();return e||t}function Wm(e){var t=Vt(e);t!==null&&t.tag===5&&t.type===`form`?mc(t):Hm.r(e)}var Gm=typeof document>`u`?null:document;function N(e,t,n){var r=Gm;if(r&&typeof t==`string`&&t){var i=dn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Bm.has(i)||(Bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),wp(t,`link`,e),Wt(t),r.head.appendChild(t)))}}function Km(e){Hm.D(e),N(`dns-prefetch`,e,null)}function qm(e,t){Hm.C(e,t),N(`preconnect`,e,t)}function Jm(e,t,n){Hm.L(e,t,n);var r=Gm;if(r&&e&&t){var i=`link[rel="preload"][as="`+dn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+dn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+dn(n.imageSizes)+`"]`)):i+=`[href="`+dn(e)+`"]`;var a=i;switch(t){case`style`:a=eh(e);break;case`script`:a=ih(e)}if(!(zm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),zm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(th(a))||t===`script`&&r.querySelector(ah(a))))){var o=r.createElement(`link`);wp(o,`link`,e),t===`style`&&(o[Rt]=!0,o.onload=o.onerror=function(){Gt(o)}),Wt(o),r.head.appendChild(o)}}}function Ym(e,t){Hm.m(e,t);var n=Gm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+dn(r)+`"][href="`+dn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=ih(e)}if(!zm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),zm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(ah(a)))return}r=n.createElement(`link`),wp(r,`link`,e),Wt(r),n.head.appendChild(r)}}}function Xm(e,t,n){Hm.S(e,t,n);var r=Gm;if(r&&e){var i=Ut(r).hoistableStyles,a=eh(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(th(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=zm.get(a))&&ch(e,n);var c=o=r.createElement(`link`);Wt(c),wp(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,sh(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Zm(e,t){Hm.X(e,t);var n=Gm;if(n&&e){var r=Ut(n).hoistableScripts,i=ih(e),a=r.get(i);a||(a=n.querySelector(ah(i)),a||(e=D({src:e,async:!0},t),(t=zm.get(i))&&lh(e,t),a=n.createElement(`script`),Wt(a),wp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Qm(e,t){Hm.M(e,t);var n=Gm;if(n&&e){var r=Ut(n).hoistableScripts,i=ih(e),a=r.get(i);a||(a=n.querySelector(ah(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=zm.get(i))&&lh(e,t),a=n.createElement(`script`),Wt(a),wp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function $m(e,t,n,r){var a=(a=je.current)?Vm(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=eh(n.href),t=Ut(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=eh(n.href);var o=Ut(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(th(e)))?o._p||(s.instance=o,s.state.loading=5):(o=zm.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},zm.set(e,o)),rh(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=ih(n),t=Ut(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 eh(e){return`href="`+dn(e)+`"`}function th(e){return`link[rel="stylesheet"][`+e+`]`}function nh(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function rh(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Rt]){r.loading=1;return}}else t=e.createElement(`link`),t[Rt]=!0,t.onload=t.onerror=Gt.bind(null,t),wp(t,`link`,n),Wt(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 ih(e){return`[src="`+dn(e)+`"]`}function ah(e){return`script[async]`+e}function oh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+dn(n.href)+`"]`);if(r)return t.instance=r,Wt(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`),Wt(r),wp(r,`style`,a),sh(r,n.precedence,e),t.instance=r;case`stylesheet`:a=eh(n.href);var o=e.querySelector(th(a));if(o)return t.state.loading|=4,t.instance=o,Wt(o),o;r=nh(n),(a=zm.get(a))&&ch(r,a),o=(e.ownerDocument||e).createElement(`link`),Wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),wp(o,`link`,r),t.state.loading|=4,sh(o,n.precedence,e),t.instance=o;case`script`:return o=ih(n.src),(a=e.querySelector(ah(o)))?(t.instance=a,Wt(a),a):(r=n,(a=zm.get(o))&&(r=D({},n),lh(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Wt(a),wp(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,sh(r,n.precedence,e));return t.instance}function sh(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 ch(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function lh(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var uh=null;function dh(e,t,n){if(uh===null){var r=new Map,i=uh=new Map;i.set(n,r)}else i=uh,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[Lt]||a[jt]||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 fh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ph(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 mh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function hh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function gh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function _h(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=gh(t),e.suspenseyImages.push(t)),e=Ch.bind(e),t.decode().then(e,e))}function vh(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=eh(r.href),a=t.querySelector(th(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Sh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Wt(a);return}a=t.ownerDocument||t,r=nh(r),(i=zm.get(i))&&ch(r,i),a=a.createElement(`link`),Wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),wp(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=Sh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var yh=0;function bh(e,t){return e.stylesheets&&e.count===0&&Th(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Th(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&yh===0&&(yh=62500*Op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Th(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>yh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function xh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Th(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Sh(){this.count--,xh(this)}function Ch(){this.imgCount--,xh(this)}var wh=null;function Th(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,wh=new Map,t.forEach(Eh,e),wh=null,Sh.call(e))}function Eh(e,t){if(!(t.state.loading&4)){var n=wh.get(e);if(n)var r=n.get(null);else{n=new Map,wh.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=Sh.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 Dh={$$typeof:oe,Provider:null,Consumer:null,_currentValue:Ce,_currentValue2:Ce,_threadCount:0};function Oh(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=bt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bt(0),this.hiddenUpdates=bt(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 kh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new Oh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Bi(3,null,null,t),e.current=a,a.stateNode=e,t=Va(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},wo(a),e}function Ah(e){return e?(e=Ri,e):Ri}function jh(e,t,n,r,i,a){i=Ah(i),r.context===null?r.context=i:r.pendingContext=i,r=Eo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Do(e,r,t),n!==null&&($d(n,e,t),Oo(n,e,t))}function Mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Nh(e,t){Mh(e,t),(e=e.alternate)&&Mh(e,t)}function Ph(e){if(e.tag===13||e.tag===31){var t=Fi(e,67108864);t!==null&&$d(t,e,67108864),Nh(e,67108864)}}function Fh(e){if(e.tag===13||e.tag===31){var t=Xd();t=Et(t);var n=Fi(e,t);n!==null&&$d(n,e,t),Nh(e,t)}}var Ih=!0;function Lh(e,t,n,r){var i=xe.T;xe.T=null;var a=Se.p;try{Se.p=2,zh(e,t,n,r)}finally{Se.p=a,xe.T=i}}function Rh(e,t,n,r){var i=xe.T;xe.T=null;var a=Se.p;try{Se.p=8,zh(e,t,n,r)}finally{Se.p=a,xe.T=i}}function zh(e,t,n,r){if(Ih){var i=Bh(r);if(i===null)pp(e,t,r,Vh,n),Qh(e,r);else if(eg(i,e,t,n,r))r.stopPropagation();else if(Qh(e,r),t&4&&-1<Zh.indexOf(e)){for(;i!==null;){var a=Vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=mt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-st(o);s.entanglements[1]|=c,o&=~c}Kf(a),!(md&6)&&(Fd=Ye()+500,qf(0,!1))}}break;case 31:case 13:s=Fi(a,2),s!==null&&$d(s,a,2),af(),Nh(a,2)}if(a=Bh(r),a===null&&pp(e,t,r,Vh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else pp(e,t,r,null,n)}}function Bh(e){return e=On(e),Hh(e)}var Vh=null;function Hh(e){if(Vh=null,e=Bt(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 Vh=e,null}function Uh(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(Xe()){case Ze:return 2;case Qe:return 8;case $e:case et:return 32;case tt:return 268435456;default:return 32}default:return 32}}var Wh=!1,Gh=null,Kh=null,qh=null,Jh=new Map,Yh=new Map,Xh=[],Zh=`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 Qh(e,t){switch(e){case`focusin`:case`focusout`:Gh=null;break;case`dragenter`:case`dragleave`:Kh=null;break;case`mouseover`:case`mouseout`:qh=null;break;case`pointerover`:case`pointerout`:Jh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Yh.delete(t.pointerId)}}function $h(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=Vt(t),t!==null&&Ph(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function eg(e,t,n,r,i){switch(t){case`focusin`:return Gh=$h(Gh,e,t,n,r,i),!0;case`dragenter`:return Kh=$h(Kh,e,t,n,r,i),!0;case`mouseover`:return qh=$h(qh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Jh.set(a,$h(Jh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Yh.set(a,$h(Yh.get(a)||null,e,t,n,r,i)),!0}return!1}function tg(e){var t=Bt(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,kt(e.priority,function(){Fh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,kt(e.priority,function(){Fh(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 ng(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Dn=r,n.target.dispatchEvent(r),Dn=null}else return t=Vt(n),t!==null&&Ph(t),e.blockedOn=n,!1;t.shift()}return!0}function rg(e,t,n){ng(e)&&n.delete(t)}function ig(){Wh=!1,Gh!==null&&ng(Gh)&&(Gh=null),Kh!==null&&ng(Kh)&&(Kh=null),qh!==null&&ng(qh)&&(qh=null),Jh.forEach(rg),Yh.forEach(rg)}function ag(e,n){e.blockedOn===n&&(e.blockedOn=null,Wh||(Wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,ig)))}var og=null;function sg(e){og!==e&&(og=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){og===e&&(og=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(Hh(r||n)===null)continue;break}var a=Vt(n);a!==null&&(e.splice(t,3),t-=3,fc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function cg(e){function t(t){return ag(t,e)}Gh!==null&&ag(Gh,e),Kh!==null&&ag(Kh,e),qh!==null&&ag(qh,e),Jh.forEach(t),Yh.forEach(t);for(var n=0;n<Xh.length;n++){var r=Xh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Xh.length&&(n=Xh[0],n.blockedOn===null);)tg(n),n.blockedOn===null&&Xh.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[Mt]||null;if(typeof a==`function`)o||sg(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Mt]||null)s=o.formAction;else if(Hh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),sg(n)}}}function lg(){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 ug(e){this._internalRoot=e}dg.prototype.render=ug.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;jh(n,Xd(),e,t,null,null)},dg.prototype.unmount=ug.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jh(e.current,2,null,e,null,null),af(),t[Nt]=null}};function dg(e){this._internalRoot=e}dg.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xh.length&&t!==0&&t<Xh[n].priority;n++);Xh.splice(n,0,e),n===0&&tg(e)}};var fg=n.version;if(fg!==`19.3.1`)throw Error(i(527,fg,`19.3.1`));Se.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 pg={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:xe,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var mg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mg.isDisabled&&mg.supportsFiber)try{it=mg.inject(pg),at=mg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Fc,s=Ic,c=Lc;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=kh(e,1,!1,null,null,n,r,null,o,s,c,lg),e[Nt]=t.current,dp(e),new ug(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=l(d(),1),y={damping:.7,stiffness:.05,mass:1.25},b=70,x=1e3/60,S=350,C=!1;globalThis.document?.addEventListener(`mousedown`,()=>{C=!0}),globalThis.document?.addEventListener(`mouseup`,()=>{C=!1}),globalThis.document?.addEventListener(`click`,()=>{C=!1});var w=(e={})=>{let[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)(e.initial!==!1),[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null);s.current=e;let c=(0,v.useCallback)(()=>{if(!C)return!1;let e=window.getSelection();if(!e||!e.rangeCount)return!1;let t=e.getRangeAt(0);return t.commonAncestorContainer.contains(g.current)||g.current?.contains(t.commonAncestorContainer)},[]),l=(0,v.useCallback)(e=>{d.isAtBottom=e,i(e)},[]),u=(0,v.useCallback)(e=>{d.escapedFromLock=e,n(e)},[]),d=(0,v.useMemo)(()=>{let n;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(e){if(g.current){let{scrollBehavior:t}=getComputedStyle(g.current);t!==`auto`&&(g.current.style.scrollBehavior=`auto`),g.current.scrollTop=e,d.ignoreScrollToTop=g.current.scrollTop,t!==`auto`&&(g.current.style.scrollBehavior=t)}},get targetScrollTop(){return!g.current||!_.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!_.current)return 0;let{targetScrollTop:t}=this;if(!e.targetScrollTop)return t;if(n?.targetScrollTop===t)return n.calculatedScrollTop;let r=Math.max(Math.min(e.targetScrollTop(t,{scrollElement:g.current,contentElement:_.current}),t),0);return n={targetScrollTop:t,calculatedScrollTop:r},requestAnimationFrame(()=>{n=void 0}),r},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=b}}},[]),f=(0,v.useCallback)((e={})=>{typeof e==`string`&&(e={animation:e}),e.preserveScrollPosition||l(!0);let t=Date.now()+(Number(e.wait)||0),n=D(s.current,e.animation),{ignoreEscapes:r=!1}=e,i,a=d.calculatedTargetScrollTop;e.duration instanceof Promise?e.duration.finally(()=>{i=Date.now()}):i=t+(e.duration??0);let o=async()=>{let e=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;let{scrollTop:l}=d,u=performance.now(),p=(u-(d.lastTick??u))/x;if(d.animation||={behavior:n,promise:e,ignoreEscapes:r},d.animation.behavior===n&&(d.lastTick=u),c()||t>Date.now())return o();if(l<Math.min(a,d.calculatedTargetScrollTop)){if(d.animation?.behavior===n){if(n===`instant`)return d.scrollTop=d.calculatedTargetScrollTop,o();d.velocity=(n.damping*d.velocity+n.stiffness*d.scrollDifference)/n.mass,d.accumulated+=d.velocity*p,d.scrollTop+=d.accumulated,d.scrollTop!==l&&(d.accumulated=0)}return o()}return i>Date.now()?(a=d.calculatedTargetScrollTop,o()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:D(s.current,s.current.resize),ignoreEscapes:r,duration:Math.max(0,i-Date.now())||void 0}):d.isAtBottom)});return e.then(e=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),e))};return e.wait!==!0&&(d.animation=void 0),d.animation?.behavior===n?d.animation.promise:o()},[l,c,d]),p=(0,v.useCallback)(()=>{u(!0),l(!1)},[u,l]),m=(0,v.useCallback)(({target:e})=>{if(e!==g.current)return;let{scrollTop:t,ignoreScrollToTop:n}=d,{lastScrollTop:r=t}=d;d.lastScrollTop=t,d.ignoreScrollToTop=void 0,n&&n>t&&(r=n),o(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||t===n)return;if(c()){u(!0),l(!1);return}let e=t>r,i=t<r;d.animation?.ignoreEscapes?d.scrollTop=r:(i&&(u(!0),l(!1)),e&&u(!1),!d.escapedFromLock&&d.isNearBottom&&l(!0))},1)},[u,l,c,d]),h=(0,v.useCallback)(({target:e,deltaY:t})=>{let n=e;for(;![`scroll`,`auto`].includes(getComputedStyle(n).overflow);){if(!n.parentElement)return;n=n.parentElement}n===g.current&&t<0&&g.current.scrollHeight>g.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),l(!1))},[u,l,d]),g=T(e=>{g.current?.removeEventListener(`scroll`,m),g.current?.removeEventListener(`wheel`,h),e?.addEventListener(`scroll`,m,{passive:!0}),e?.addEventListener(`wheel`,h,{passive:!0})},[]),_=T(e=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!e)return;let t;d.resizeObserver=new ResizeObserver(([e])=>{let{height:n}=e.contentRect,r=n-(t??n);if(d.resizeDifference=r,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),o(d.isNearBottom),r>=0){let e=D(s.current,t?s.current.resize:s.current.initial);f({animation:e,wait:!0,preserveScrollPosition:!0,duration:e===`instant`?void 0:S})}else d.isNearBottom&&(u(!1),l(!0));t=n,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===r&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(e)},[]);return{contentRef:_,scrollRef:g,scrollToBottom:f,stopScroll:p,isAtBottom:r||a,isNearBottom:a,escapedFromLock:t,state:d}};function T(e,t){let n=(0,v.useCallback)(t=>(n.current=t,e(t)),t);return n}var E=new Map;function D(...e){let t={...y},n=!1;for(let r of e)r===`instant`?n=!0:typeof r==`object`&&(n=!1,t.damping=r.damping??t.damping,t.stiffness=r.stiffness??t.stiffness,t.mass=r.mass??t.mass);let r=JSON.stringify(t);return E.has(r)||E.set(r,Object.freeze(t)),n?`instant`:E.get(r)}var O=(0,v.createContext)(null),ee=typeof window<`u`?v.useLayoutEffect:v.useEffect;function te({instance:e,children:t,resize:n,initial:r,mass:i,damping:a,stiffness:o,targetScrollTop:s,contextRef:c,...l}){let u=(0,v.useRef)(null),d=w({mass:i,damping:a,stiffness:o,resize:n,initial:r,targetScrollTop:v.useCallback((e,t)=>(b?.targetScrollTop??s)?.(e,t)??e,[s])}),{scrollRef:f,contentRef:p,scrollToBottom:m,stopScroll:h,isAtBottom:g,escapedFromLock:_,state:y}=e??d,b=(0,v.useMemo)(()=>({scrollToBottom:m,stopScroll:h,scrollRef:f,isAtBottom:g,escapedFromLock:_,contentRef:p,state:y,get targetScrollTop(){return u.current},set targetScrollTop(e){u.current=e}}),[m,g,p,f,h,_,y]);return(0,v.useImperativeHandle)(c,()=>b,[b]),ee(()=>{f.current&&getComputedStyle(f.current).overflow===`visible`&&(f.current.style.overflow=`auto`)},[]),v.createElement(O.Provider,{value:b},v.createElement(`div`,{...l},typeof t==`function`?t(b):t))}(function(e){function t({children:e,scrollClassName:t,...n}){let r=ne();return v.createElement(`div`,{ref:r.scrollRef,style:{height:`100%`,width:`100%`,scrollbarGutter:`stable both-edges`},className:t},v.createElement(`div`,{...n,ref:r.contentRef},typeof e==`function`?e(r):e))}e.Content=t})(te||={});function ne(){let e=(0,v.useContext)(O);if(!e)throw Error(`use-stick-to-bottom component context must be used within a StickToBottom component`);return e}var re=_();function ie(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=ie(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ae(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ie(e))&&(r&&(r+=` `),r+=t);return r}var oe=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,k=ae,se=(e,t)=>n=>{if(t?.variants==null)return k(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=oe(t)||oe(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 k(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)},ce=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},le=(e,t)=>({classGroupId:e,validator:t}),ue=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),de=`-`,fe=[],pe=`arbitrary..`,me=e=>{let t=_e(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ge(e);let n=e.split(de);return he(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ce(i,t):t:i||fe}return n[e]||fe}}},he=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=he(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(de):e.slice(t).join(de),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ge=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?pe+r:void 0})(),_e=e=>{let{theme:t,classGroups:n}=e;return ve(n,t)},ve=(e,t)=>{let n=ue();for(let r in e){let i=e[r];ye(i,n,r,t)}return n},ye=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];be(i,t,n,r)}},be=(e,t,n,r)=>{typeof e==`string`?xe(e,t,n):typeof e==`function`?Se(e,t,n,r):Ce(e,t,n,r)},xe=(e,t,n)=>{let r=e===``?t:we(t,e);r.classGroupId=n},Se=(e,t,n,r)=>{Te(e)?ye(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(le(n,e)))},Ce=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ye(o,we(t,a),n,r)}},we=(e,t)=>{let n=e,r=t.split(de),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ue(),n.nextPart.set(t,i)),n=i}return n},Te=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ee=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},De=`!`,Oe=`:`,ke=[],Ae=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),je=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Oe){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(De)?(c=s.slice(0,-1),l=!0):s.startsWith(De)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Ae(t,l,c,u)};if(t){let e=t+Oe,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Ae(ke,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Me=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ne=e=>({cache:Ee(e.cacheSize),parseClassName:je(e),sortModifiers:Me(e),postfixLookupClassGroupIds:Pe(e),...me(e)}),Pe=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Fe=/\s+/,Ie=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Fe),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+De:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Le=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Re(n))&&(i&&(i+=` `),i+=r);return i},Re=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Re(e[r]))&&(n&&(n+=` `),n+=t);return n},ze=(e,...t)=>{let n,r,i,a,o=o=>(n=Ne(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Ie(e,n);return i(e,a),a};return a=o,(...e)=>a(Le(...e))},Be=[],Ve=e=>{let t=t=>t[e]||Be;return t.isThemeGetter=!0,t.themeKey=e,t},He=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ue=/^\((?:(\w[\w-]*):)?(.+)\)$/i,We=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ge=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ke=/\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$/,qe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Je=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ye=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xe=e=>We.test(e),Ze=e=>!!e&&!Number.isNaN(Number(e)),Qe=e=>!!e&&Number.isInteger(Number(e)),$e=e=>e.endsWith(`%`)&&Ze(e.slice(0,-1)),et=e=>Ge.test(e),tt=()=>!0,nt=e=>Ke.test(e)&&!qe.test(e),rt=()=>!1,it=e=>Je.test(e),at=e=>Ye.test(e),ot=e=>!lt(e)&&!_t(e),st=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),ct=e=>Tt(e,kt,rt),lt=e=>He.test(e),ut=e=>Tt(e,At,nt),dt=e=>Tt(e,jt,Ze),ft=e=>Tt(e,Nt,tt),pt=e=>Tt(e,Mt,rt),mt=e=>Tt(e,Dt,rt),ht=e=>Tt(e,Ot,at),gt=e=>Tt(e,Pt,it),_t=e=>Ue.test(e),vt=e=>Et(e,At),yt=e=>Et(e,Mt),bt=e=>Et(e,Dt),xt=e=>Et(e,kt),St=e=>Et(e,Ot),Ct=e=>Et(e,Pt,!0),wt=e=>Et(e,Nt,!0),Tt=(e,t,n)=>{let r=He.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Et=(e,t,n=!1)=>{let r=Ue.exec(e);return r?r[1]?t(r[1]):n:!1},Dt=e=>e===`position`||e===`percentage`,Ot=e=>e===`image`||e===`url`,kt=e=>e===`length`||e===`size`||e===`bg-size`,At=e=>e===`length`,jt=e=>e===`number`,Mt=e=>e===`family-name`,Nt=e=>e===`number`||e===`weight`,Pt=e=>e===`shadow`,Ft=ze(()=>{let e=Ve(`color`),t=Ve(`font`),n=Ve(`text`),r=Ve(`font-weight`),i=Ve(`tracking`),a=Ve(`leading`),o=Ve(`breakpoint`),s=Ve(`container`),c=Ve(`spacing`),l=Ve(`radius`),u=Ve(`shadow`),d=Ve(`inset-shadow`),f=Ve(`text-shadow`),p=Ve(`drop-shadow`),m=Ve(`blur`),h=Ve(`perspective`),g=Ve(`aspect`),_=Ve(`ease`),v=Ve(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),_t,lt],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[_t,lt,c],T=()=>[Xe,`full`,`auto`,...w()],E=()=>[Qe,`none`,`subgrid`,_t,lt],D=()=>[`auto`,{span:[`full`,Qe,_t,lt]},Qe,_t,lt],O=()=>[Qe,`auto`,_t,lt],ee=()=>[`auto`,`min`,`max`,`fr`,_t,lt],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ne=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],re=()=>[`auto`,...w()],ie=()=>[Xe,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ae=()=>[s,Xe,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],oe=()=>[Xe,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[e,_t,lt],se=()=>[...b(),bt,mt,{position:[_t,lt]}],ce=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],le=()=>[`auto`,`cover`,`contain`,xt,ct,{size:[_t,lt]}],ue=()=>[$e,vt,ut],de=()=>[``,`none`,`full`,l,_t,lt],fe=()=>[``,Ze,vt,ut],pe=()=>[`solid`,`dashed`,`dotted`,`double`],me=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],he=()=>[Ze,$e,bt,mt],ge=()=>[``,`none`,m,_t,lt],_e=()=>[`none`,Ze,_t,lt],ve=()=>[`none`,Ze,_t,lt],ye=()=>[Ze,_t,lt],be=()=>[Xe,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[et],breakpoint:[et],color:[tt],container:[et],"drop-shadow":[et],ease:[`in`,`out`,`in-out`],font:[ot],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[et],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[et],shadow:[et],spacing:[`px`,Ze],text:[et],"text-shadow":[et],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Xe,lt,_t,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,_t,lt]}],"container-named":[st],columns:[{columns:[Ze,`auto`,lt,_t,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Qe,`auto`,_t,lt]}],basis:[{basis:[Xe,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Ze,Xe,`auto`,`initial`,`none`,lt]}],grow:[{grow:[``,Ze,_t,lt]}],shrink:[{shrink:[``,Ze,_t,lt]}],order:[{order:[Qe,`first`,`last`,`none`,_t,lt]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...ne(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ne()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...ne(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ne(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ne(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ne()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mbs:[{mbs:re()}],mbe:[{mbe:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ie()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...oe()]}],"min-block-size":[{"min-block":[`auto`,...oe()]}],"max-block-size":[{"max-block":[`none`,...oe()]}],w:[{w:[s,`screen`,...ie()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ie()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ie()]}],h:[{h:[`screen`,`lh`,...ie()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ie()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...ie()]}],"font-size":[{text:[`base`,n,vt,ut]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,wt,ft]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,$e,lt]}],"font-family":[{font:[yt,pt,t]}],"font-features":[{"font-features":[lt]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,_t,lt]}],"line-clamp":[{"line-clamp":[Ze,`none`,_t,dt]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,_t,lt]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,_t,lt]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...pe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Ze,`from-font`,`auto`,_t,ut]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[Ze,`auto`,_t,lt]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Qe,_t,lt]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,_t,lt]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,_t,lt]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:le()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Qe,_t,lt],radial:[``,_t,lt],conic:[``,Qe,_t,lt]},St,ht]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...pe(),`hidden`,`none`]}],"divide-style":[{divide:[...pe(),`hidden`,`none`]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...pe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Ze,_t,lt]}],"outline-w":[{outline:[``,Ze,vt,ut]}],"outline-color":[{outline:k()}],shadow:[{shadow:[``,`inner`,`none`,u,Ct,gt]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ct,gt]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:fe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[Ze,ut]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":[`none`,f,Ct,gt]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[Ze,_t,lt]}],"mix-blend":[{"mix-blend":[...me(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[_t,lt]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,_t,lt]}],filter:[{filter:[``,`none`,_t,lt]}],blur:[{blur:ge()}],brightness:[{brightness:[Ze,_t,lt]}],contrast:[{contrast:[Ze,_t,lt]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ct,gt]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:[``,Ze,_t,lt]}],"hue-rotate":[{"hue-rotate":[Ze,_t,lt]}],invert:[{invert:[``,Ze,_t,lt]}],saturate:[{saturate:[Ze,_t,lt]}],sepia:[{sepia:[``,Ze,_t,lt]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,_t,lt]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ze,_t,lt]}],"backdrop-contrast":[{"backdrop-contrast":[Ze,_t,lt]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Ze,_t,lt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ze,_t,lt]}],"backdrop-invert":[{"backdrop-invert":[``,Ze,_t,lt]}],"backdrop-opacity":[{"backdrop-opacity":[Ze,_t,lt]}],"backdrop-saturate":[{"backdrop-saturate":[Ze,_t,lt]}],"backdrop-sepia":[{"backdrop-sepia":[``,Ze,_t,lt]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,_t,lt]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Ze,`initial`,_t,lt]}],ease:[{ease:[`linear`,`initial`,_,_t,lt]}],delay:[{delay:[Ze,_t,lt]}],animate:[{animate:[`none`,v,_t,lt]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,_t,lt]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":[`scale-3d`],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[_t,lt,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":[`translate-none`],zoom:[{zoom:[Qe,_t,lt]}],accent:[{accent:k()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,_t,lt]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,_t,lt]}],fill:[{fill:[`none`,...k()]}],"stroke-w":[{stroke:[Ze,vt,ut,dt]}],stroke:[{stroke:[`none`,...k()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function A(...e){return Ft(ae(e))}var It=l(h(),1),Lt=Object.defineProperty,Rt=(e,t)=>Lt(e,`name`,{value:t,configurable:!0});function zt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Rt(zt,`setRef`);function Bt(...e){return t=>{let n=!1,r=e.map(e=>{let r=zt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():zt(e[t],null)}}}}Rt(Bt,`composeRefs`);function Vt(...e){return v.useCallback(Bt(...e),e)}Rt(Vt,`useComposedRefs`);var Ht=Object.defineProperty,Ut=(e,t)=>Ht(e,`name`,{value:t,configurable:!0});function Wt(e){let t=v.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=tn(r),v.Children.forEach(r,e=>{if(Zt(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;$t(n)&&typeof on==`function`;)n=on(n._payload);a=Jt(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=v.cloneElement(a,void 0,s):!o&&v.Children.count(r)===1&&v.isValidElement(r)&&(a=r);let c=a?Xt(a):void 0,l=Vt(n,c);if(!a){if(r||r===0)throw Error(o?an(e):rn(e));return r}let u=Yt(i,a.props??{});return a.type!==v.Fragment&&(u.ref=n?l:c),v.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Ut(Wt,`createSlot`);var Gt=Wt(`Slot`),Kt=Symbol.for(`radix.slottable`);function qt(e){let t=Ut(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Kt,t}Ut(qt,`createSlottable`);var Jt=Ut((e,t)=>`child`in e.props?v.isValidElement(t)?v.cloneElement(t,void 0,e.props.children(t.props.children)):null:v.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function Yt(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=nn(a,i))}return{...e,...n}}Ut(Yt,`mergeProps`);function Xt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ut(Xt,`getElementRef`);function Zt(e){return v.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Kt}Ut(Zt,`isSlottable`);var Qt=Symbol.for(`react.lazy`);function $t(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Qt&&`_payload`in e&&en(e._payload)}Ut($t,`isLazyComponent`);function en(e){return typeof e==`object`&&!!e&&`then`in e}Ut(en,`isPromiseLike`);function tn(e){let t=e;for(;$t(t)&&typeof on==`function`;)t=on(t._payload);return t}Ut(tn,`useUnwrappedLazy`);function nn(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ut(nn,`concatAriaDescribedby`);var rn=Ut(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),an=Ut(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),on=v.use,sn=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})),j=o(((e,t)=>{t.exports=sn()}))(),cn=Object.defineProperty,ln=(e,t)=>cn(e,`name`,{value:t,configurable:!0}),un=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Wt(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,j.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dn(e,t){e&&It.flushSync(()=>e.dispatchEvent(t))}ln(dn,`dispatchDiscreteCustomEvent`);var fn=Object.defineProperty,pn=(e,t)=>fn(e,`name`,{value:t,configurable:!0}),mn=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),hn=v.forwardRef(pn(function(e,t){return(0,j.jsx)(un.span,{...e,ref:t,style:{...mn,...e.style}})},`VisuallyHidden`)),gn=Object.defineProperty,_n=(e,t)=>gn(e,`name`,{value:t,configurable:!0});function vn(e,t){let n=v.createContext(t);n.displayName=e+`Context`;let r=_n(e=>{let{children:t,...r}=e,i=v.useMemo(()=>r,Object.values(r));return(0,j.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=v.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return _n(i,`useContext`),[r,i]}_n(vn,`createContext`);function yn(e,t=[]){let n=[];function r(t,r){let i=v.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=_n(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=v.useMemo(()=>o,Object.values(o));return(0,j.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=v.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return _n(s,`useContext`),[o,s]}_n(r,`createContext`);let i=_n(()=>{let t=n.map(e=>v.createContext(e));return _n(function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,bn(i,...t)]}_n(yn,`createContextScope`);function bn(...e){let t=e[0];if(e.length===1)return t;let n=_n(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return _n(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}_n(bn,`composeContextScopes`);var xn=globalThis?.document?v.useLayoutEffect:()=>{},Sn=Object.defineProperty,Cn=(e,t)=>Sn(e,`name`,{value:t,configurable:!0});function wn(e){let t=e+`CollectionProvider`,[n,r]=yn(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Cn(e=>{let{scope:t,children:n}=e,r=v.useRef(null),a=v.useRef(new Map).current;return(0,j.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Wt(s),l=v.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Vt(t,a(s,n).collectionRef);return(0,j.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Wt(u),p=v.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=v.useRef(null),s=Vt(t,o),c=a(u,n);return v.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,j.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return v.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Cn(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}Cn(wn,`createCollection`);var Tn=new WeakMap,En=class e extends Map{static{Cn(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Tn.set(this,!0)}set(e,t){return Tn.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=kn(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=Dn(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Dn(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Dn(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Dn(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=On(e,t);return n===-1?void 0:e[n]}Cn(Dn,`at`);function On(e,t){let n=e.length,r=kn(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Cn(On,`toSafeIndex`);function kn(e){return e!==e||e===0?0:Math.trunc(e)}Cn(kn,`toSafeInteger`);function An(e){let t=e+`CollectionProvider`,[n,r]=yn(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let c=Cn(({state:e,...t})=>e?(0,j.jsx)(u,{...t,state:e}):(0,j.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=Cn(e=>{let t=_();return(0,j.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=e+`CollectionInit`;let u=Cn(e=>{let{scope:t,children:n,state:r}=e,a=v.useRef(null),[s,c]=v.useState(null),l=Vt(a,c),[u,d]=r,f=v.useRef(new En),p=v.useCallback(()=>{let e=f.current;return Nn(e)||e.sort(Pn),e},[]);return v.useEffect(()=>{if(!s)return;let e=Fn(()=>{d(e=>{let t=e.toSorted(Pn);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,j.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:p,setCollection:d,registryRef:f,children:(0,j.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);u.displayName=e+`CollectionProviderImpl`;let d=e+`CollectionSlot`,f=Wt(d),p=v.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Vt(t,a(d,n).collectionElementRef);return(0,j.jsx)(f,{ref:i,children:r})});p.displayName=d;let m=e+`CollectionItemSlot`,h=Wt(m),g=v.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=v.useRef(null),{setCollection:s,registryRef:c}=a(m,n),l=v.useRef(i);jn(l.current,i)||(l.current=i);let u=l.current,d=Vt(t,v.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),o);xn(()=>{let e=o.current,t=c.current;e&&t.has(e)&&t.set(e,{...u,element:e})},[u,c]);let f=v.useRef(null);return v.useEffect(()=>{let e=o.current,t=f.current;((t?.element??null)!==e||e&&t?.itemData!==u)&&(f.current=e?{element:e,itemData:u}:null,s(n=>{let r=new En(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(Pn)}))}),v.useEffect(()=>()=>{let e=f.current;f.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new En(t);return n.delete(e.element),n})},[s]),(0,j.jsx)(h,{"data-radix-collection-item":``,ref:d,children:r})});g.displayName=m;function _(){return v.useState(new En)}Cn(_,`useInitCollection`);function y(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}Cn(y,`useCollection`);function b(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return Cn(b,`useGetCollection`),[{Provider:c,Slot:p,ItemSlot:g},{createCollectionScope:r,useCollection:y,useGetCollection:b,useInitCollection:_}]}Cn(An,`createCollection`);function jn(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Cn(jn,`shallowEqual`);function Mn(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Cn(Mn,`isElementPreceding`);function Nn(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}Cn(Nn,`isInDocumentOrder`);function Pn(e,t){return!e[1].element||!t[1].element?0:Mn(e[1].element,t[1].element)?-1:1}Cn(Pn,`sortByDocumentPosition`);function Fn(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Cn(Fn,`getChildListObserver`);var In=Object.defineProperty,Ln=(e,t)=>In(e,`name`,{value:t,configurable:!0}),Rn=!!(typeof window<`u`&&window.document&&window.document.createElement);function zn(e,t,{checkForDefaultPrevented:n=!0}={}){return Ln(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Ln(zn,`composeEventHandlers`);function Bn(e){if(!Rn)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Ln(Bn,`getOwnerWindow`);function Vn(e){if(!Rn)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Ln(Vn,`getOwnerDocument`);function Hn(e,t=!1){let{activeElement:n}=Vn(e);if(!n?.nodeName)return null;if(Un(n)&&n.contentDocument)return Hn(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Vn(n).getElementById(e);if(t)return t}}return n}Ln(Hn,`getActiveElement`);function Un(e){return e.tagName===`IFRAME`}Ln(Un,`isFrame`);var Wn=Object.defineProperty,Gn=(e,t)=>Wn(e,`name`,{value:t,configurable:!0}),Kn=v.useEffectEvent,qn=v.useInsertionEffect;function Jn(e){if(typeof Kn==`function`)return Kn(e);let t=v.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof qn==`function`?qn(()=>{t.current=e}):xn(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}Gn(Jn,`useEffectEvent`);var Yn=Object.defineProperty,Xn=(e,t)=>Yn(e,`name`,{value:t,configurable:!0}),Zn=v.useInsertionEffect||xn;function Qn({prop:e,defaultProp:t,onChange:n=Xn(()=>{},`onChange`),caller:r}){let[i,a,o]=$n({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,v.useCallback(t=>{if(s){let n=er(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Xn(Qn,`useControllableState`);function $n({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),i=v.useRef(n),a=v.useRef(t);return Zn(()=>{a.current=t},[t]),v.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Xn($n,`useUncontrolledState`);function er(e){return typeof e==`function`}Xn(er,`isFunction`);var tr=Symbol(`RADIX:SYNC_STATE`);function nr(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Jn(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=v.useReducer((t,n)=>{if(n.type===tr)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=v.useRef(p);v.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=v.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return v.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:tr,state:i})},[i,d.state,c]),[h,f]}Xn(nr,`useControllableStateReducer`);var rr=Object.defineProperty,ir=(e,t)=>rr(e,`name`,{value:t,configurable:!0});function ar(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}ir(ar,`useStateMachine`);var or=ir(e=>{let{present:t,children:n}=e,r=sr(t),i=typeof n==`function`?n({present:r.isPresent}):v.Children.only(n),a=lr(r.ref,dr(i));return typeof n==`function`||r.isPresent?v.cloneElement(i,{ref:a}):null},`Presence`);function sr(e){let[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),a=v.useRef(`none`),o=v.useRef(void 0),[s,c]=ar(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return v.useEffect(()=>{s===`mounted`?(a.current=o.current??ur(r.current),o.current=void 0):a.current=`none`},[s]),xn(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=ur(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),xn(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=ir(a=>{let o=ur(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=ir(e=>{e.target===t&&(a.current=ur(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:v.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=ur(t)}else r.current=null;n(e)},[])}}ir(sr,`usePresence`);function cr(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ir(cr,`setRef`);function lr(...e){let t=v.useRef(e);return t.current=e,v.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=cr(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():cr(n[e],null)}}},[])}ir(lr,`useStableComposedRefs`);function ur(e){return e?.animationName||`none`}ir(ur,`getAnimationName`);function dr(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ir(dr,`getElementRef`);var fr=Object.defineProperty,pr=(e,t)=>fr(e,`name`,{value:t,configurable:!0}),mr=v.useId||(()=>void 0),hr=0;function gr(e){let[t,n]=v.useState(mr());return xn(()=>{e||n(e=>e??String(hr++))},[e]),e||(t?`radix-${t}`:``)}pr(gr,`useId`);var _r=Object.defineProperty,vr=(e,t)=>_r(e,`name`,{value:t,configurable:!0}),yr=`Collapsible`,[br,xr]=yn(yr),[Sr,Cr]=br(yr),wr=v.forwardRef(vr(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Qn({prop:r,defaultProp:i??!1,onChange:o,caller:yr});return(0,j.jsx)(Sr,{scope:n,disabled:a,contentId:gr(),open:c,onOpenToggle:v.useCallback(()=>l(e=>!e),[l]),children:(0,j.jsx)(un.div,{"data-state":Ar(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),Tr=`CollapsibleTrigger`,Er=v.forwardRef(vr(function(e,t){let{__scopeCollapsible:n,...r}=e,i=Cr(Tr,n);return(0,j.jsx)(un.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":Ar(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:zn(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),Dr=`CollapsibleContent`,Or=v.forwardRef(vr(function(e,t){let{forceMount:n,...r}=e,i=Cr(Dr,e.__scopeCollapsible);return(0,j.jsx)(or,{present:n||i.open,children:({present:e})=>(0,j.jsx)(kr,{...r,ref:t,present:e})})},`CollapsibleContent`)),kr=v.forwardRef(vr(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Cr(Dr,n),[s,c]=v.useState(r),l=v.useRef(null),u=Vt(t,l),d=v.useRef(0),f=d.current,p=v.useRef(0),m=p.current,h=o.open||s,g=v.useRef(h),_=v.useRef(void 0);return v.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),xn(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,j.jsx)(un.div,{"data-state":Ar(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})},`CollapsibleContentImpl`));function Ar(e){return e?`open`:`closed`}vr(Ar,`getState`);var jr=Object.defineProperty,Mr=(e,t)=>jr(e,`name`,{value:t,configurable:!0}),Nr={LTR:`ltr`,RTL:`rtl`},Pr=v.createContext(void 0);function Fr(e){let t=v.useContext(Pr);return e||t||Nr.LTR}Mr(Fr,`useDirection`);var Ir=Object.defineProperty,Lr=(e,t)=>Ir(e,`name`,{value:t,configurable:!0}),Rr=v.useInsertionEffect;function zr(e){let t=v.useRef(e);return typeof Rr==`function`?Rr(()=>{t.current=e}):xn(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}Lr(zr,`useCallbackRef`);var Br=Object.defineProperty,Vr=(e,t)=>Br(e,`name`,{value:t,configurable:!0}),Hr=`dismissableLayer.update`,Ur=`dismissableLayer.pointerDownOutside`,Wr=`dismissableLayer.focusOutside`,Gr,Kr=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),qr=v.forwardRef(Vr(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=v.useContext(Kr),[d,f]=v.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=v.useState({}),h=Vt(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=_?g.indexOf(_):-1,b=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=v.useRef(!1),w=Xr(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=Zr(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?b===g.length-1:!1,D=zr(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return v.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),v.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Gr=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Qr(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Gr))}},[d,p,n,u]),v.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Qr())},[d,u]),v.useEffect(()=>{let e=Vr(()=>m({}),`handleUpdate`);return document.addEventListener(Hr,e),()=>document.removeEventListener(Hr,e)},[]),(0,j.jsx)(un.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:zn(e.onFocusCapture,T.onFocusCapture),onBlurCapture:zn(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:zn(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Jr(){let e=v.useContext(Kr),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Vr(Jr,`useDismissableLayerSurface`);var Yr=Vr(()=>!0,`IS_TRUE`);function Xr(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Yr}=t,s=zr(e),c=v.useRef(!1),l=v.useRef(!1),u=v.useRef(new Map),d=v.useRef(()=>{});return v.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Vr(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Vr(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Vr(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Vr(p,`handleInteractionBubble`);let m=Vr(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||$r(Ur,s,p,{discrete:!0})};if(Vr(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Vr(()=>c.current=!0,`onPointerDownCapture`)}}Vr(Xr,`usePointerDownOutside`);function Zr(e,t=globalThis?.document){let n=zr(e),r=v.useRef(!1);return v.useEffect(()=>{let e=Vr(e=>{e.target&&!r.current&&$r(Wr,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Vr(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Vr(()=>r.current=!1,`onBlurCapture`)}}Vr(Zr,`useFocusOutside`);function Qr(){let e=new CustomEvent(Hr);document.dispatchEvent(e)}Vr(Qr,`dispatchUpdate`);function $r(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?dn(i,a):i.dispatchEvent(a)}Vr($r,`handleAndDispatchCustomEvent`);var ei=Object.defineProperty,ti=(e,t)=>ei(e,`name`,{value:t,configurable:!0}),ni=`focusScope.autoFocusOnMount`,ri=`focusScope.autoFocusOnUnmount`,ii={bubbles:!1,cancelable:!0},ai=v.forwardRef(ti(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=v.useState(null),u=zr(a),d=zr(o),f=v.useRef(null),p=Vt(t,l),m=v.useRef(i);v.useEffect(()=>{m.current=i});let h=v.useCallback(e=>e?c?.contains(e)?!0:!!m.current?.some(t=>t.contains(e)):!1,[c]),g=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;h(t)?f.current=t:gi(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(h(t)||gi(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&gi(c)};ti(e,`handleFocusIn`),ti(t,`handleFocusOut`),ti(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused,h]),v.useEffect(()=>{if(c){_i.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(ni,ii);c.addEventListener(ni,u),c.dispatchEvent(t),t.defaultPrevented||(ui(bi(fi(c)),{select:!0}),document.activeElement===e&&gi(c))}return()=>{c.removeEventListener(ni,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(ri,ii);c.addEventListener(ri,d),c.dispatchEvent(r),r.defaultPrevented||gi(e??t.body,{select:!0}),c.removeEventListener(ri,d),_i.remove(g)},0)}}},[c,u,d,g]);let _=v.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=di(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&gi(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&gi(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,j.jsx)(un.div,{tabIndex:-1,...s,ref:p,onKeyDown:_})},`FocusScope`)),oi=v.createContext(null);function si({registry:e,children:t}){return e?(0,j.jsx)(oi.Provider,{value:e,children:t}):t}ti(si,`FocusScopeBranchProvider`);function ci(){let[e,t]=v.useState([]);return{nodes:e,registry:v.useMemo(()=>({add:ti(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:ti(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}ti(ci,`useFocusScopeBranchRegistry`);function li(e){let t=v.useContext(oi);v.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}ti(li,`useFocusScopeBranch`);function ui(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(gi(r,{select:t}),document.activeElement!==n)return}ti(ui,`focusFirst`);function di(e){let t=fi(e);return[pi(t,e),pi(t.reverse(),e)]}ti(di,`getTabbableEdges`);function fi(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ti(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}ti(fi,`getTabbableCandidates`);function pi(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):mi(r,{upTo:t})))return r}ti(pi,`findVisible`);function mi(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}ti(mi,`isHidden`);function hi(e){return e.tagName===`INPUT`&&typeof e.select==`function`}ti(hi,`isSelectableInput`);function gi(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&hi(e)&&t&&e.select()}}ti(gi,`focus`);var _i=vi();function vi(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=yi(e,t),e.unshift(t)},remove(t){e=yi(e,t),e[0]?.resume()}}}ti(vi,`createFocusScopesStack`);function yi(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}ti(yi,`arrayRemove`);function bi(e){return e.filter(e=>e.tagName!==`A`)}ti(bi,`removeLinks`);var xi=Object.defineProperty,Si=v.forwardRef(((e,t)=>xi(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=v.useState(!1);xn(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?It.createPortal((0,j.jsx)(un.div,{...r,ref:t}),o):null},`Portal`)),Ci=Object.defineProperty,wi=(e,t)=>Ci(e,`name`,{value:t,configurable:!0}),Ti=0,Ei=null;function Di(e){return Oi(),e.children}wi(Di,`FocusGuards`);function Oi(){v.useEffect(()=>{Ei||={start:ki(),end:ki()};let{start:e,end:t}=Ei;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Ti++,()=>{Ti===1&&(Ei?.start.remove(),Ei?.end.remove(),Ei=null),Ti=Math.max(0,Ti-1)}},[])}wi(Oi,`useFocusGuards`);function ki(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}wi(ki,`createFocusGuard`);var Ai=function(){return Ai=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ai.apply(this,arguments)};function ji(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Mi(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ni=`right-scroll-bar-position`,Pi=`width-before-scroll-bar`,Fi=`with-scroll-bars-hidden`,Ii=`--removed-body-scroll-bar-size`;function Li(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ri(e,t){var n=(0,v.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var zi=typeof window<`u`?v.useLayoutEffect:v.useEffect,Bi=new WeakMap;function Vi(e,t){var n=Ri(t||null,function(t){return e.forEach(function(e){return Li(e,t)})});return zi(function(){var t=Bi.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Li(e,null)}),i.forEach(function(e){r.has(e)||Li(e,a)})}Bi.set(n,e)},[e]),n}function Hi(e){return e}function Ui(e,t){t===void 0&&(t=Hi);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Wi(e){e===void 0&&(e={});var t=Ui(null);return t.options=Ai({async:!0,ssr:!1},e),t}var Gi=function(e){var t=e.sideCar,n=ji(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return v.createElement(r,Ai({},n))};Gi.isSideCarExport=!0;function Ki(e,t){return e.useMedium(t),Gi}var qi=Wi(),Ji=function(){},Yi=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Ji,onWheelCapture:Ji,onTouchMoveCapture:Ji}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,y=_===void 0?`div`:_,b=e.gapMode,x=ji(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Vi([n,t]),w=Ai(Ai({},x),i);return v.createElement(v.Fragment,null,u&&v.createElement(S,{sideCar:qi,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),o?v.cloneElement(v.Children.only(s),Ai(Ai({},w),{ref:C})):v.createElement(y,Ai({},w,{className:c,ref:C}),s))});Yi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Yi.classNames={fullWidth:Pi,zeroRight:Ni};var Xi=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Zi(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Xi();return t&&e.setAttribute(`nonce`,t),e}function Qi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $i(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ea=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Zi())&&(Qi(t,n),$i(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ta=function(){var e=ea();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},na=function(){var e=ta();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ra={left:0,top:0,right:0,gap:0},ia=function(e){return parseInt(e||``,10)||0},aa=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[ia(n),ia(r),ia(i)]},oa=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ra;var t=aa(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},sa=na(),ca=`data-scroll-locked`,la=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
10
|
-
.${Fi} {
|
|
11
|
-
overflow: hidden ${r};
|
|
12
|
-
padding-right: ${s}px ${r};
|
|
13
|
-
}
|
|
14
|
-
body[${ca}] {
|
|
15
|
-
overflow: hidden ${r};
|
|
16
|
-
overscroll-behavior: contain;
|
|
17
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
18
|
-
padding-left: ${i}px;
|
|
19
|
-
padding-top: ${a}px;
|
|
20
|
-
padding-right: ${o}px;
|
|
21
|
-
margin-left:0;
|
|
22
|
-
margin-top:0;
|
|
23
|
-
margin-right: ${s}px ${r};
|
|
24
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${Ni} {
|
|
28
|
-
right: ${s}px ${r};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${Pi} {
|
|
32
|
-
margin-right: ${s}px ${r};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.${Ni} .${Ni} {
|
|
36
|
-
right: 0 ${r};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.${Pi} .${Pi} {
|
|
40
|
-
margin-right: 0 ${r};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
body[${ca}] {
|
|
44
|
-
${Ii}: ${s}px;
|
|
45
|
-
}
|
|
46
|
-
`},ua=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},da=function(){v.useEffect(function(){return document.body.setAttribute(ca,(ua()+1).toString()),function(){var e=ua()-1;e<=0?document.body.removeAttribute(ca):document.body.setAttribute(ca,e.toString())}},[])},fa=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;da();var a=v.useMemo(function(){return oa(i)},[i]);return v.createElement(sa,{styles:la(a,!t,i,n?``:`!important`)})},pa=!1;if(typeof window<`u`)try{var ma=Object.defineProperty({},"passive",{get:function(){return pa=!0,!0}});window.addEventListener(`test`,ma,ma),window.removeEventListener(`test`,ma,ma)}catch{pa=!1}var ha=pa?{passive:!1}:!1,ga=function(e){return e.tagName===`TEXTAREA`},_a=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ga(e)&&n[t]===`visible`)},va=function(e){return _a(e,`overflowY`)},ya=function(e){return _a(e,`overflowX`)},ba=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Ca(e,r)){var i=wa(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},xa=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Sa=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ca=function(e,t){return e===`v`?va(t):ya(t)},wa=function(e,t){return e===`v`?xa(t):Sa(t)},Ta=function(e,t){return e===`h`&&t===`rtl`?-1:1},Ea=function(e,t,n,r,i){var a=Ta(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=wa(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Ca(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Da=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Oa=function(e){return[e.deltaX,e.deltaY]},ka=function(e){return e&&`current`in e?e.current:e},Aa=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ja=function(e){return`
|
|
47
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
48
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
49
|
-
`},Ma=0,Na=[];function Pa(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(Ma++)[0],a=v.useState(na)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Mi([e.lockRef.current],(e.shards||[]).map(ka),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Da(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ba(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ba(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Ea(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(Na.length&&Na[Na.length-1]===a){var r=`deltaY`in n?Oa(n):Da(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Aa(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(ka).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Fa(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=Da(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,Oa(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,Da(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return Na.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,ha),document.addEventListener(`touchmove`,c,ha),document.addEventListener(`touchstart`,u,ha),function(){Na=Na.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,ha),document.removeEventListener(`touchmove`,c,ha),document.removeEventListener(`touchstart`,u,ha)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:ja(i)}):null,p?v.createElement(fa,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Fa(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ia=Ki(qi,Pa),La=v.forwardRef(function(e,t){return v.createElement(Yi,Ai({},e,{ref:t,sideCar:Ia}))});La.classNames=Yi.classNames;var Ra=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},za=new WeakMap,Ba=new WeakMap,Va={},Ha=0,Ua=function(e){return e&&(e.host||Ua(e.parentNode))},Wa=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ua(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ga=function(e,t,n,r){var i=Wa(t,Array.isArray(e)?e:[e]);Va[n]||(Va[n]=new WeakMap);var a=Va[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(za.get(e)||0)+1,l=(a.get(e)||0)+1;za.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ba.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ha++,function(){o.forEach(function(e){var t=za.get(e)-1,i=a.get(e)-1;za.set(e,t),a.set(e,i),t||(Ba.has(e)||e.removeAttribute(r),Ba.delete(e)),i||e.removeAttribute(n)}),Ha--,Ha||(za=new WeakMap,za=new WeakMap,Ba=new WeakMap,Va={})}},Ka=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ra(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ga(r,i,n,`aria-hidden`)):function(){return null}},qa=Object.defineProperty,Ja=(e,t)=>qa(e,`name`,{value:t,configurable:!0}),Ya=`Dialog`,[Xa,Za]=yn(Ya),[Qa,$a]=Xa(Ya),eo=Ja(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),{nodes:l,registry:u}=ci(),[d,f]=Qn({prop:r,defaultProp:i??!1,onChange:a,caller:Ya}),[p,m]=v.useState(0),[h,g]=v.useState(0);return(0,j.jsx)(Qa,{scope:t,triggerRef:s,contentRef:c,contentId:gr(),titleId:gr(),descriptionId:gr(),titlePresent:p>0,descriptionPresent:h>0,setTitleCount:m,setDescriptionCount:g,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(e=>!e),[f]),modal:o,branchNodes:l,branchRegistry:u,children:n})},`Dialog`),to=`DialogTrigger`,no=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,...r}=e,i=$a(to,n),a=Vt(t,i.triggerRef);return(0,j.jsx)(un.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":So(i.open),...r,ref:a,onClick:zn(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),ro=`DialogPortal`,[io,ao]=Xa(ro,{forceMount:void 0}),oo=Ja(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=$a(ro,t);return(0,j.jsx)(io,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,j.jsx)(or,{present:n||a.open,children:(0,j.jsx)(Si,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),so=`DialogOverlay`,co=v.forwardRef(Ja(function(e,t){let n=ao(so,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$a(so,e.__scopeDialog);return a.modal?(0,j.jsx)(or,{present:r||a.open,children:(0,j.jsx)(uo,{...i,ref:t})}):null},`DialogOverlay`)),lo=Wt(`DialogOverlay.RemoveScroll`),uo=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,...r}=e,i=$a(so,n),a=Vt(t,Jr());return(0,j.jsx)(La,{as:lo,allowPinchZoom:!0,shards:v.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,j.jsx)(un.div,{"data-state":So(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),fo=`DialogContent`,po=v.forwardRef(Ja(function(e,t){let n=ao(fo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$a(fo,e.__scopeDialog);return(0,j.jsx)(or,{present:r||a.open,children:a.modal?(0,j.jsx)(mo,{...i,ref:t}):(0,j.jsx)(ho,{...i,ref:t})})},`DialogContent`)),mo=v.forwardRef(Ja(function(e,t){let n=$a(fo,e.__scopeDialog),r=v.useRef(null),i=Vt(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return Ka(e)},[]),(0,j.jsx)(go,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:zn(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:zn(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:zn(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),ho=v.forwardRef(Ja(function(e,t){let n=$a(fo,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,j.jsx)(go,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),go=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=$a(fo,n);return Oi(),(0,j.jsx)(si,{registry:l.branchRegistry,children:(0,j.jsx)(ai,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,j.jsx)(qr,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?xo(o,l.descriptionId):o,"data-state":So(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),_o=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,...r}=e,i=$a(`DialogTitle`,n),{setTitleCount:a}=i;return xn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,j.jsx)(un.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),vo=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,...r}=e,i=$a(`DialogDescription`,n),{setDescriptionCount:a}=i;return xn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,j.jsx)(un.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),yo=`DialogClose`,bo=v.forwardRef(Ja(function(e,t){let{__scopeDialog:n,...r}=e,i=$a(yo,n);return(0,j.jsx)(un.button,{type:`button`,...r,ref:t,onClick:zn(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function xo(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ja(xo,`concatAriaDescribedby`);function So(e){return e?`open`:`closed`}Ja(So,`getState`);var Co=Object.defineProperty,wo=(e,t)=>Co(e,`name`,{value:t,configurable:!0}),[To,Eo]=yn(`AlertDialog`,[Za]),Do=Za(),Oo=wo(e=>{let{__scopeAlertDialog:t,...n}=e,r=Do(t);return(0,j.jsx)(eo,{...r,...n,modal:!0})},`AlertDialog`);v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Do(n);return(0,j.jsx)(no,{...i,...r,ref:t})},`AlertDialogTrigger`));var ko=wo(e=>{let{__scopeAlertDialog:t,...n}=e,r=Do(t);return(0,j.jsx)(oo,{...r,...n})},`AlertDialogPortal`),Ao=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Do(n);return(0,j.jsx)(co,{...i,...r,ref:t})},`AlertDialogOverlay`)),[jo,Mo]=To(`AlertDialogContent`),No=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=Do(n),o=Vt(t,v.useRef(null)),s=v.useRef(null);return(0,j.jsx)(jo,{scope:n,cancelRef:s,children:(0,j.jsx)(po,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:zn(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),Po=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Do(n);return(0,j.jsx)(_o,{...i,...r,ref:t})},`AlertDialogTitle`)),Fo=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Do(n);return(0,j.jsx)(vo,{...i,...r,ref:t})},`AlertDialogDescription`)),Io=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Do(n);return(0,j.jsx)(bo,{...i,...r,ref:t})},`AlertDialogAction`)),Lo=`AlertDialogCancel`,Ro=v.forwardRef(wo(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Mo(Lo,n),a=Do(n),o=Vt(t,i);return(0,j.jsx)(bo,{...a,...r,ref:o})},`AlertDialogCancel`)),zo=Object.defineProperty,Bo=(e,t)=>zo(e,`name`,{value:t,configurable:!0});function Vo(e){let[t,n]=v.useState(void 0);return xn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}Bo(Vo,`useSize`);var Ho=Object.defineProperty,Uo=(e,t)=>Ho(e,`name`,{value:t,configurable:!0}),Wo=`Checkbox`,[Go,Ko]=yn(Wo),[qo,Jo]=Go(Wo);function Yo(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=Qn({prop:n,defaultProp:i??!1,onChange:c,caller:Wo}),[m,h]=v.useState(null),[g,_]=v.useState(null),[y,b]=v.useState(null),x=!m||!!o||!!m.closest(`form`),S={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,userClick:y,onUserClick:b,required:l,defaultChecked:!is(i)&&i,isFormControl:x,bubbleInput:g,setBubbleInput:_};return(0,j.jsx)(qo,{scope:t,...S,children:rs(d)?d(S):r})}Uo(Yo,`CheckboxProvider`);var Xo=`CheckboxTrigger`,Zo=v.forwardRef(Uo(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,onUserClick:f,isFormControl:p,bubbleInput:m}=Jo(Xo,e),h=Vt(i,u),g=v.useRef(c);return v.useEffect(()=>{let e=a?.form;if(e){let t=Uo(()=>d(g.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,j.jsx)(un.button,{type:`button`,role:`checkbox`,"aria-checked":is(c)?`mixed`:c,"aria-required":l,"data-state":as(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:zn(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:zn(n,e=>{let t=e.isPropagationStopped();f({requestedChecked:is(c)?!0:!c,hasConsumerStoppedPropagation:t}),d(e=>is(e)?!0:!e),m&&p&&(t||e.stopPropagation())})})},`CheckboxTrigger`)),Qo=v.forwardRef(Uo(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,j.jsx)(Yo,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Zo,{...d,ref:t,__scopeCheckbox:n}),e&&(0,j.jsx)(ns,{__scopeCheckbox:n})]})})},`Checkbox`)),$o=`CheckboxIndicator`,es=v.forwardRef(Uo(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=Jo($o,n);return(0,j.jsx)(or,{present:r||is(a.checked)||a.checked===!0,children:(0,j.jsx)(un.span,{"data-state":as(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),ts=`CheckboxBubbleInput`,ns=v.forwardRef(Uo(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=Jo(ts,e),h=Vt(r,m),g=Vo(i),_=v.useRef(!1),y=v.useRef(o),b=v.useRef(a),x=v.useRef(null);v.useEffect(()=>{let e=p;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=y.current!==o;y.current=o;let i=a!==null&&a!==b.current;if(b.current=a,i)x.current=r?null:a,r&&(e.indeterminate=is(o),n.call(e,!is(o)&&o)),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=x.current;x.current=null;let r=t?.requestedChecked===o;_.current=!0,e.indeterminate=is(o),n.call(e,!is(o)&&o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),_.current=!1}},[p,o,a]);let S=v.useRef(!is(o)&&o);return(0,j.jsx)(un.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??S.current,required:c,disabled:l,name:u,value:d,form:f,...n,tabIndex:-1,ref:h,onClick:zn(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function rs(e){return typeof e==`function`}Uo(rs,`isFunction`);function is(e){return e===`indeterminate`}Uo(is,`isIndeterminate`);function as(e){return is(e)?`indeterminate`:e?`checked`:`unchecked`}Uo(as,`getState`);var os=[`top`,`right`,`bottom`,`left`],ss=Math.min,cs=Math.max,ls=Math.round,us=Math.floor,ds=e=>({x:e,y:e}),fs={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ps(e,t,n){return cs(e,ss(t,n))}function ms(e,t){return typeof e==`function`?e(t):e}function hs(e){return e.split(`-`)[0]}function gs(e){return e.split(`-`)[1]}function _s(e){return e===`x`?`y`:`x`}function vs(e){return e===`y`?`height`:`width`}function ys(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function bs(e){return _s(ys(e))}function xs(e,t,n){n===void 0&&(n=!1);let r=gs(e),i=bs(e),a=vs(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=As(o)),[o,As(o)]}function Ss(e){let t=As(e);return[Cs(e),t,Cs(t)]}function Cs(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ws=[`left`,`right`],Ts=[`right`,`left`],Es=[`top`,`bottom`],Ds=[`bottom`,`top`];function Os(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ts:ws:t?ws:Ts;case`left`:case`right`:return t?Es:Ds;default:return[]}}function ks(e,t,n,r){let i=gs(e),a=Os(hs(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Cs)))),a}function As(e){let t=hs(e);return fs[t]+e.slice(t.length)}function js(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ms(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:js(e)}function Ns(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 Ps(e,t,n){let{reference:r,floating:i}=e,a=ys(t),o=bs(t),s=vs(o),c=hs(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=gs(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Fs(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}=ms(t,e),p=Ms(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ns(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=Ns(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 Is=50,Ls=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Fs},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ps(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<Is&&(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}=Ps(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Rs=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}=ms(e,t)||{};if(l==null)return{};let d=Ms(u),f={x:n,y:r},p=bs(i),m=vs(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=ss(d[_],T),D=ss(d[v],T),O=C-h[m]-D,ee=C/2-h[m]/2+w,te=ps(E,ee,O),ne=!c.arrow&&gs(i)!=null&&ee!==te&&a.reference[m]/2-(ee<E?E:D)-h[m]/2<0,re=ne?ee<E?ee-E:ee-O:0;return{[p]:f[p]+re,data:{[p]:te,centerOffset:ee-te-re,...ne&&{alignmentOffset:re}},reset:ne}}}),zs=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}=ms(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=hs(r),_=ys(o),v=hs(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[As(o)]:Ss(o)),x=p!==`none`;!d&&x&&b.push(...ks(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=xs(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`||_===ys(t)||T.every(e=>ys(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=ys(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{}}}};function Bs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vs(e){return os.some(t=>e[t]>=0)}var Hs=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=ms(e,t);switch(i){case`referenceHidden`:{let e=Bs(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Vs(e)}}}case`escaped`:{let e=Bs(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Vs(e)}}}default:return{}}}}},Us=new Set([`left`,`top`]);async function Ws(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=hs(n),s=gs(n),c=ys(n)===`y`,l=Us.has(o)?-1:1,u=a&&c?-1:1,d=ms(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 Gs=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 Ws(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}}}}},Ks=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}=ms(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ys(i),p=_s(f),m=u[p],h=u[f],g=(e,t)=>ps(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}}}}}},qs=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}=ms(e,t),u={x:n,y:r},d=ys(i),f=_s(d),p=u[f],m=u[d],h=ms(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=Us.has(hs(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}}}},Js=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}=ms(e,t),c=await i.detectOverflow(t,s),l=hs(n),u=gs(n),d=ys(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=ss(p-c[m],g),y=ss(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*cs(c.left,c.right):S=p-2*cs(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 Ys(){return typeof window<`u`}function Xs(e){return $s(e)?(e.nodeName||``).toLowerCase():`#document`}function Zs(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qs(e){return(($s(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function $s(e){return Ys()?e instanceof Node||e instanceof Zs(e).Node:!1}function ec(e){return Ys()?e instanceof Element||e instanceof Zs(e).Element:!1}function tc(e){return Ys()?e instanceof HTMLElement||e instanceof Zs(e).HTMLElement:!1}function nc(e){return!Ys()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Zs(e).ShadowRoot}function rc(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=mc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ic(e){return/^(table|td|th)$/.test(Xs(e))}function ac(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var oc=/transform|translate|scale|rotate|perspective|filter/,sc=/paint|layout|strict|content/,cc=e=>!!e&&e!==`none`,lc;function uc(e){let t=ec(e)?mc(e):e;return cc(t.transform)||cc(t.translate)||cc(t.scale)||cc(t.rotate)||cc(t.perspective)||!fc()&&(cc(t.backdropFilter)||cc(t.filter))||oc.test(t.willChange||``)||sc.test(t.contain||``)}function dc(e){let t=gc(e);for(;tc(t)&&!pc(t);){if(uc(t))return t;if(ac(t))return null;t=gc(t)}return null}function fc(){return lc??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),lc}function pc(e){return/^(html|body|#document)$/.test(Xs(e))}function mc(e){return Zs(e).getComputedStyle(e)}function hc(e){return ec(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gc(e){if(Xs(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||nc(e)&&e.host||Qs(e);return nc(t)?t.host:t}function _c(e){let t=gc(e);return pc(t)?(e.ownerDocument||e).body:tc(t)&&rc(t)?t:_c(t)}function vc(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=_c(e),i=r===e.ownerDocument?.body,a=Zs(r);if(i){let e=yc(a);return t.concat(a,a.visualViewport||[],rc(r)?r:[],e&&n?vc(e):[])}return t.concat(r,vc(r,[],n))}function yc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bc(e){let t=mc(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=tc(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ls(n)!==a||ls(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function xc(e){return ec(e)?e:e.contextElement}function Sc(e){let t=xc(e);if(!tc(t))return ds(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=bc(t),o=(a?ls(n.width):n.width)/r,s=(a?ls(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Cc=ds(0);function wc(e){let t=Zs(e);return!fc()||!t.visualViewport?Cc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Tc(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Zs(e)}function Ec(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=xc(e),o=ds(1);t&&(r?ec(r)&&(o=Sc(r)):o=Sc(e));let s=Tc(a,n,r)?wc(a):ds(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=Zs(a),t=ec(r)?Zs(r):r,n=e,i=yc(n);for(;i&&t!==n;){let e=Sc(i),t=i.getBoundingClientRect(),r=mc(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=Zs(i),i=yc(n)}}return Ns({width:u,height:d,x:c,y:l})}function Dc(e,t){let n=hc(e).scrollLeft;return t?t.left+n:Ec(Qs(e)).left+n}function Oc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Dc(e,n),y:n.top+t.scrollTop}}function kc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Qs(r),s=t?ac(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ds(1),u=ds(0),d=tc(r);if((d||!a)&&((Xs(r)!==`body`||rc(o))&&(c=hc(r)),d)){let e=Ec(r);l=Sc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Oc(o,c):ds(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 Ac(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function jc(e){let t=hc(e),n=e.ownerDocument.body,r=cs(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=cs(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Dc(e),o=-t.scrollTop;return mc(n).direction===`rtl`&&(a+=cs(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Mc=25;function Nc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Zs(e),a=Qs(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!fc()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Dc(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<=Mc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Pc(e,t){let n=Ec(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Sc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Fc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Nc(e,n,t);else if(t===`document`)r=jc(Qs(e));else if(ec(t))r=Pc(t,n);else{let n=wc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ns(r)}function Ic(e,t){let n=t.get(e);if(n)return n;let r=vc(e,[],!1).filter(e=>ec(e)&&Xs(e)!==`body`),i=null,a=mc(e).position===`fixed`,o=a?gc(e):e;for(;ec(o)&&!pc(o);){let e=mc(o),t=uc(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=gc(o)}return t.set(e,r),r}function Lc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ac(t)?[]:Ic(t,this._c):[].concat(n),r],o=Fc(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=Fc(t,a[e],i);s=cs(n.top,s),c=ss(n.right,c),l=ss(n.bottom,l),u=cs(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Rc(e){let{width:t,height:n}=bc(e);return{width:t,height:n}}function zc(e,t,n){let r=tc(t),i=Qs(t),a=n===`fixed`,o=Ec(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ds(0);if((r||!a)&&((Xs(t)!==`body`||rc(i))&&(s=hc(t)),r)){let e=Ec(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Dc(i));let l=i&&!r&&!a?Oc(i,s):ds(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 Bc(e){return mc(e).position===`static`}function Vc(e,t){if(!tc(e)||mc(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Qs(e)===n&&(n=n.ownerDocument.body),n}function Hc(e,t){let n=Zs(e);if(ac(e))return n;if(!tc(e)){let t=gc(e);for(;t&&!pc(t);){if(ec(t)&&!Bc(t))return t;t=gc(t)}return n}let r=Vc(e,t);for(;r&&ic(r)&&Bc(r);)r=Vc(r,t);return r&&pc(r)&&Bc(r)&&!uc(r)?n:r||dc(e)||n}var Uc=async function(e){let t=this.getOffsetParent||Hc,n=this.getDimensions,r=await n(e.floating);return{reference:zc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wc(e){return mc(e).direction===`rtl`}var Gc={convertOffsetParentRelativeRectToViewportRelativeRect:kc,getDocumentElement:Qs,getClippingRect:Lc,getOffsetParent:Hc,getElementRects:Uc,getClientRects:Ac,getDimensions:Rc,getScale:Sc,isElement:ec,isRTL:Wc};function Kc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qc(e,t,n){let r=null,i,a=Qs(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=us(d),h=us(a.clientWidth-(u+f)),g=us(a.clientHeight-(d+p)),_=us(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:cs(0,ss(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Kc(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=Zs(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Jc(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=xc(e),u=i||a?[...l?vc(l):[],...t?vc(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?qc(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?Ec(e):null;c&&g();function g(){let t=Ec(e);h&&!Kc(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 Yc=Gs,Xc=Ks,Zc=zs,Qc=Js,$c=Hs,el=Rs,tl=qs,nl=(e,t,n)=>{let r=new Map,i=n??{},a={...Gc,...i.platform,_c:r};return Ls(e,t,{...i,platform:a})},rl=typeof document<`u`?v.useLayoutEffect:function(){};function il(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(!il(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)&&!il(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function al(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ol(e,t){let n=al(e);return Math.round(t*n)/n}function sl(e){let t=v.useRef(e);return rl(()=>{t.current=e}),t}function cl(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]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);il(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=sl(c),O=sl(i),ee=sl(l),te=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),nl(C.current,w.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};ne.current&&!il(T.current,t)&&(T.current=t,It.flushSync(()=>{d(t)}))})},[f,t,n,O,ee]);rl(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ne=v.useRef(!1);rl(()=>(ne.current=!0,()=>{ne.current=!1}),[]),rl(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,te);te()}},[x,S,te,D,E]);let re=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),ie=v.useMemo(()=>({reference:x,floating:S}),[x,S]),ae=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!ie.floating)return e;let t=ol(ie.floating,u.x),r=ol(ie.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...al(ie.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ie.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:te,refs:re,elements:ie,floatingStyles:ae}),[u,te,re,ie,ae])}var ll=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:el({element:r.current,padding:i}).fn(n):r?el({element:r,padding:i}).fn(n):{}}}},ul=(e,t)=>{let n=Yc(e);return{name:n.name,fn:n.fn,options:[e,t]}},dl=(e,t)=>{let n=Xc(e);return{name:n.name,fn:n.fn,options:[e,t]}},fl=(e,t)=>({fn:tl(e).fn,options:[e,t]}),pl=(e,t)=>{let n=Zc(e);return{name:n.name,fn:n.fn,options:[e,t]}},ml=(e,t)=>{let n=Qc(e);return{name:n.name,fn:n.fn,options:[e,t]}},hl=(e,t)=>{let n=$c(e);return{name:n.name,fn:n.fn,options:[e,t]}},gl=(e,t)=>{let n=ll(e);return{name:n.name,fn:n.fn,options:[e,t]}},_l=Object.defineProperty,vl=v.forwardRef(((e,t)=>_l(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,j.jsx)(un.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,j.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),yl=Object.defineProperty,bl=(e,t)=>yl(e,`name`,{value:t,configurable:!0}),xl={Partial:`partial`,Always:`always`},Sl={Optimized:`optimized`,Always:`always`},Cl=`Popper`,[wl,Tl]=yn(Cl),[El,Dl]=wl(Cl),Ol=bl(e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[a,o]=v.useState(void 0);return(0,j.jsx)(El,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),kl=`PopperAnchor`,Al=v.forwardRef(bl(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Dl(kl,n),o=v.useRef(null),s=a.onAnchorChange,c=Vt(t,v.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=v.useRef(null);v.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Bl(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,j.jsx)(un.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),jl=`PopperContent`,[Ml,Nl]=wl(jl),Pl=v.forwardRef(bl(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=xl.Partial,hideWhenDetached:f=!1,updatePositionStrategy:p=Sl.Optimized,onPlaced:m,...h}=e,g=Dl(jl,n),[_,y]=v.useState(null),b=Vt(t,y),[x,S]=v.useState(null),C=Vo(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],ee=O.length>0,te={padding:D,boundary:O.filter(Rl),altBoundary:ee},{refs:ne,floatingStyles:re,placement:ie,isPositioned:ae,middlewareData:oe}=cl({strategy:`fixed`,placement:E,whileElementsMounted:bl((...e)=>Jc(...e,{animationFrame:p===Sl.Always}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[ul({mainAxis:i+T,alignmentAxis:o}),c&&dl({mainAxis:!0,crossAxis:!1,...d===xl.Partial?{limiter:fl()}:{},...te}),c&&pl({...te}),ml({...te,apply:bl(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&gl({element:x,padding:s}),zl({arrowWidth:w,arrowHeight:T}),f&&hl(ee?{strategy:`referenceHidden`,...te}:{strategy:`referenceHidden`,padding:te.padding,altBoundary:te.altBoundary})]}),k=g.setPlacementState;xn(()=>(k(ie),()=>{k(void 0)}),[ie,k]);let[se,ce]=Bl(ie),le=zr(m);xn(()=>{ae&&le?.()},[ae,le]);let ue=oe.arrow?.x,de=oe.arrow?.y,fe=oe.arrow?.centerOffset!==0,[pe,me]=v.useState();return xn(()=>{_&&me(window.getComputedStyle(_).zIndex)},[_]),(0,j.jsx)(`div`,{ref:ne.setFloating,"data-radix-popper-content-wrapper":``,style:{...re,transform:ae?re.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:pe,"--radix-popper-transform-origin":[oe.transformOrigin?.x,oe.transformOrigin?.y].join(` `),...oe.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,j.jsx)(Ml,{scope:n,placedSide:se,placedAlign:ce,onArrowChange:S,arrowX:ue,arrowY:de,shouldHideArrow:fe,children:(0,j.jsx)(un.div,{"data-side":se,"data-align":ce,...h,ref:b,style:{...h.style,animation:ae?h.style?.animation:`none`}})})})},`PopperContent`)),Fl=`PopperArrow`,Il={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Ll=v.forwardRef(bl(function(e,t){let{__scopePopper:n,...r}=e,i=Nl(Fl,n),a=Il[i.placedSide];return(0,j.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,j.jsx)(vl,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function Rl(e){return e!==null}bl(Rl,`isNotNull`);var zl=bl(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Bl(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Bl(e){let[t,n=`center`]=e.split(`-`);return[t,n]}bl(Bl,`getSideAndAlignFromPlacement`);var Vl=Object.defineProperty,Hl=(e,t)=>Vl(e,`name`,{value:t,configurable:!0}),Ul=!1;function Wl(){let[e,t]=v.useState(Ul);return v.useEffect(()=>{Ul||(Ul=!0,t(!0))},[]),e}Hl(Wl,`useIsHydrated`);var Gl=v.useSyncExternalStore;function Kl(){return()=>{}}Hl(Kl,`subscribe`);function ql(){return Gl(Kl,()=>!0,()=>!1)}Hl(ql,`useIsHydratedModern`);var Jl=typeof Gl==`function`?ql:Wl,Yl=Object.defineProperty,Xl=(e,t)=>Yl(e,`name`,{value:t,configurable:!0}),Zl=`rovingFocusGroup.onEntryFocus`,Ql={bubbles:!1,cancelable:!0},$l=`RovingFocusGroup`,[eu,tu,nu]=wn($l),[ru,iu]=yn($l,[nu]),au={Vertical:`vertical`,Horizontal:`horizontal`},ou={LTR:`ltr`,RTL:`rtl`},[su,cu]=ru($l),lu=v.forwardRef(Xl(function(e,t){return(0,j.jsx)(eu.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,j.jsx)(eu.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,j.jsx)(uu,{...e,ref:t})})})},`RovingFocusGroup`)),uu=v.forwardRef(Xl(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=v.useRef(null),p=Vt(t,f),m=Fr(a),[h,g]=Qn({prop:o,defaultProp:s??null,onChange:c,caller:$l}),[_,y]=v.useState(!1),b=zr(l),x=tu(n),S=v.useRef(!1),[C,w]=v.useState(0);return v.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Zl,b),()=>e.removeEventListener(Zl,b)},[b]),(0,j.jsx)(su,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:v.useCallback(e=>g(e),[g]),onItemShiftTab:v.useCallback(()=>y(!0),[]),onFocusableItemAdd:v.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:v.useCallback(()=>w(e=>e-1),[]),children:(0,j.jsx)(un.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:zn(e.onMouseDown,()=>{S.current=!0}),onFocus:zn(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Zl,Ql);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);gu([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:zn(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),du=`RovingFocusGroupItem`,fu=v.forwardRef(Xl(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=gr(),l=a||c,u=cu(du,n),d=u.currentTabStopId===l,f=tu(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Jl();return xn(()=>{if(g&&r)return p(),()=>m()},[g,r,p,m]),v.useEffect(()=>{if(!g&&r)return p(),()=>m()},[g,r,p,m]),(0,j.jsx)(eu.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,j.jsx)(un.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:zn(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:zn(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:zn(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=hu(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?_u(n,r+1):n.slice(r+1)}setTimeout(()=>gu(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),pu={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function mu(e,t){return t===ou.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Xl(mu,`getDirectionAwareKey`);function hu(e,t,n){let r=mu(e.key,n);if(!(t===au.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===au.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return pu[r]}Xl(hu,`getFocusIntent`);function gu(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Xl(gu,`focusFirst`);function _u(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Xl(_u,`wrapArray`);var vu=Object.defineProperty,yu=(e,t)=>vu(e,`name`,{value:t,configurable:!0}),bu=[`Enter`,` `],xu=[`ArrowDown`,`PageUp`,`Home`],Su=[`ArrowUp`,`PageDown`,`End`],Cu=[...xu,...Su];[...bu],[...bu];var wu=`Menu`,[Tu,Eu,Du]=wn(wu),[Ou,ku]=yn(wu,[Du,Tl,iu]),Au=Tl(),ju=iu(),[Mu,Nu]=Ou(wu),[Pu,Fu]=Ou(wu),Iu=yu(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Au(t),[c,l]=v.useState(null),u=v.useRef(!1),d=zr(a),f=Fr(i);return v.useEffect(()=>{let e=yu(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=yu(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),v.useEffect(()=>{if(!n)return;let e=yu(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,j.jsx)(Ol,{...s,children:(0,j.jsx)(Mu,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,j.jsx)(Pu,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Lu=v.forwardRef(yu(function(e,t){let{__scopeMenu:n,...r}=e,i=Au(n);return(0,j.jsx)(Al,{...i,...r,ref:t})},`MenuAnchor`)),Ru=`MenuPortal`,[zu,Bu]=Ou(Ru,{forceMount:void 0}),Vu=yu(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Nu(Ru,t);return(0,j.jsx)(zu,{scope:t,forceMount:n,children:(0,j.jsx)(or,{present:n||a.open,children:(0,j.jsx)(Si,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Hu=`MenuContent`,[Uu,Wu]=Ou(Hu),Gu=v.forwardRef(yu(function(e,t){let n=Bu(Hu,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Nu(Hu,e.__scopeMenu),o=Fu(Hu,e.__scopeMenu);return(0,j.jsx)(Tu.Provider,{scope:e.__scopeMenu,children:(0,j.jsx)(or,{present:r||a.open,children:(0,j.jsx)(Tu.Slot,{scope:e.__scopeMenu,children:o.modal?(0,j.jsx)(Ku,{...i,ref:t}):(0,j.jsx)(qu,{...i,ref:t})})})})},`MenuContent`)),Ku=v.forwardRef(yu(function(e,t){let n=Nu(Hu,e.__scopeMenu),r=v.useRef(null),i=Vt(t,r);return v.useEffect(()=>{let e=r.current;if(e)return Ka(e)},[]),(0,j.jsx)(Yu,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:zn(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),qu=v.forwardRef(yu(function(e,t){let n=Nu(Hu,e.__scopeMenu);return(0,j.jsx)(Yu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Ju=Wt(`MenuContent.ScrollLock`),Yu=v.forwardRef(yu(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Nu(Hu,n),_=Fu(Hu,n),y=Au(n),b=ju(n),x=Eu(n),[S,C]=v.useState(null),w=v.useRef(null),[T,E]=v.useState(null);li(T);let{nodes:D,registry:O}=ci(),ee=!!(i||m),te=Vt(t,w,g.onContentChange,E),ne=v.useRef(0),re=v.useRef(``),ie=v.useRef(0),ae=v.useRef(null),oe=v.useRef(`right`),k=v.useRef(0),se=v.useMemo(()=>m?[w,...D.map(e=>({current:e}))]:[],[w,D,m]),ce=m?La:v.Fragment,le=m?{as:Ju,allowPinchZoom:!0,shards:se}:void 0,ue=yu(e=>{let t=re.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=yd(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){re.current=e,window.clearTimeout(ne.current),e!==``&&(ne.current=window.setTimeout(()=>s(``),1e3))}yu(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);v.useEffect(()=>()=>window.clearTimeout(ne.current),[]),Oi();let de=v.useCallback(e=>oe.current===ae.current?.side&&xd(e,ae.current?.area),[]);return(0,j.jsx)(Uu,{scope:n,searchRef:re,onItemEnter:v.useCallback(e=>{de(e)&&e.preventDefault()},[de]),onItemLeave:v.useCallback(e=>{de(e)||(w.current?.focus(),C(null))},[de]),onTriggerLeave:v.useCallback(e=>{de(e)&&e.preventDefault()},[de]),pointerGraceTimerRef:ie,onPointerGraceIntentChange:v.useCallback(e=>{ae.current=e},[]),children:(0,j.jsx)(si,{registry:ee?O:null,children:(0,j.jsx)(ce,{...le,children:(0,j.jsx)(ai,{asChild:!0,trapped:i,branches:D,onMountAutoFocus:zn(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,j.jsx)(qr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,j.jsx)(lu,{asChild:!0,...b,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:zn(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,j.jsx)(Pl,{role:`menu`,"aria-orientation":`vertical`,"data-state":md(g.open),"data-radix-menu-content":``,dir:_.dir,...y,...h,ref:te,style:{outline:`none`,...h.style},onKeyDown:zn(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ue(e.key));let i=w.current;if(e.target!==i||!Cu.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);Su.includes(e.key)&&a.reverse(),_d(a)}),onBlur:zn(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(ne.current),re.current=``)}),onPointerMove:zn(e.onPointerMove,Sd(e=>{let t=e.target,n=k.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>k.current?`right`:`left`;oe.current=t,k.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),Xu=v.forwardRef(yu(function(e,t){let{__scopeMenu:n,...r}=e;return(0,j.jsx)(un.div,{role:`group`,...r,ref:t})},`MenuGroup`)),Zu=v.forwardRef(yu(function(e,t){let{__scopeMenu:n,...r}=e;return(0,j.jsx)(un.div,{...r,ref:t})},`MenuLabel`)),Qu=`MenuItem`,$u=`menu.itemSelect`,ed=v.forwardRef(yu(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=v.useRef(null),o=Fu(Qu,e.__scopeMenu),s=Wu(Qu,e.__scopeMenu),c=Vt(t,a),l=v.useRef(!1),u=yu(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent($u,{bubbles:!0,cancelable:!0});e.addEventListener($u,e=>r?.(e),{once:!0}),dn(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,j.jsx)(td,{...i,ref:c,disabled:n,onClick:zn(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:zn(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:zn(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&bu.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),td=v.forwardRef(yu(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Wu(Qu,n),s=ju(n),c=v.useRef(null),l=Vt(t,c),[u,d]=v.useState(!1),[f,p]=v.useState(``);return v.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,j.jsx)(Tu.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,j.jsx)(fu,{asChild:!0,...s,focusable:!r,children:(0,j.jsx)(un.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:zn(e.onPointerMove,Sd(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:zn(e.onPointerLeave,Sd(e=>o.onItemLeave(e))),onFocus:zn(e.onFocus,()=>d(!0)),onBlur:zn(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[nd,rd]=Ou(`MenuRadioGroup`,{value:void 0,onValueChange:yu(()=>{},`onValueChange`)}),id=v.forwardRef(yu(function(e,t){let{value:n,onValueChange:r,...i}=e,a=zr(r);return(0,j.jsx)(nd,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,j.jsx)(Xu,{...i,ref:t})})},`MenuRadioGroup`)),ad=`MenuRadioItem`,od=v.forwardRef(yu(function(e,t){let{value:n,...r}=e,i=rd(ad,e.__scopeMenu),a=n===i.value;return(0,j.jsx)(cd,{scope:e.__scopeMenu,checked:a,children:(0,j.jsx)(ed,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":gd(a),onSelect:zn(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),sd=`MenuItemIndicator`,[cd,ld]=Ou(sd,{checked:!1}),ud=v.forwardRef(yu(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=ld(sd,n);return(0,j.jsx)(or,{present:r||hd(a.checked)||a.checked===!0,children:(0,j.jsx)(un.span,{...i,ref:t,"data-state":gd(a.checked)})})},`MenuItemIndicator`)),dd=v.forwardRef(yu(function(e,t){let{__scopeMenu:n,...r}=e;return(0,j.jsx)(un.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[fd,pd]=Ou(`MenuSub`);function md(e){return e?`open`:`closed`}yu(md,`getOpenState`);function hd(e){return e===`indeterminate`}yu(hd,`isIndeterminate`);function gd(e){return hd(e)?`indeterminate`:e?`checked`:`unchecked`}yu(gd,`getCheckedState`);function _d(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}yu(_d,`focusFirst`);function vd(e,t){return e.map((n,r)=>e[(t+r)%e.length])}yu(vd,`wrapArray`);function yd(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=vd(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}yu(yd,`getNextMatch`);function bd(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}yu(bd,`isPointInPolygon`);function xd(e,t){return t?bd({x:e.clientX,y:e.clientY},t):!1}yu(xd,`isPointerInGraceArea`);function Sd(e){return t=>t.pointerType===`mouse`?e(t):void 0}yu(Sd,`whenMouse`);var Cd=Object.defineProperty,wd=(e,t)=>Cd(e,`name`,{value:t,configurable:!0}),Td=`DropdownMenu`,[Ed,Dd]=yn(Td,[ku]),Od=ku(),[kd,Ad]=Ed(Td),jd=wd(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Od(t),l=v.useRef(null),[u,d]=Qn({prop:i,defaultProp:a??!1,onChange:o,caller:Td});return(0,j.jsx)(kd,{scope:t,triggerId:gr(),triggerRef:l,contentId:gr(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,j.jsx)(Iu,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),Md=`DropdownMenuTrigger`,Nd=v.forwardRef(wd(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Ad(Md,n),o=Od(n),s=Vt(t,a.triggerRef);return(0,j.jsx)(Lu,{asChild:!0,...o,children:(0,j.jsx)(un.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:zn(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:zn(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Pd=wd(e=>{let{__scopeDropdownMenu:t,...n}=e,r=Od(t);return(0,j.jsx)(Vu,{...r,...n})},`DropdownMenuPortal`),Fd=`DropdownMenuContent`,Id=v.forwardRef(wd(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Ad(Fd,n),a=Od(n),o=v.useRef(!1);return(0,j.jsx)(Gu,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:zn(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:zn(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Ld=v.forwardRef(wd(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Od(n);return(0,j.jsx)(Zu,{...i,...r,ref:t})},`DropdownMenuLabel`)),Rd=v.forwardRef(wd(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Od(n);return(0,j.jsx)(ed,{...i,...r,ref:t})},`DropdownMenuItem`)),zd=v.forwardRef(wd(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Od(n);return(0,j.jsx)(id,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),Bd=v.forwardRef(wd(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Od(n);return(0,j.jsx)(od,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),Vd=v.forwardRef(wd(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Od(n);return(0,j.jsx)(ud,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),Hd=v.forwardRef(wd(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Od(n);return(0,j.jsx)(dd,{...i,...r,ref:t})},`DropdownMenuSeparator`)),Ud=Object.defineProperty,Wd=v.forwardRef(((e,t)=>Ud(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,j.jsx)(un.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),Gd=Object.defineProperty,Kd=(e,t)=>Gd(e,`name`,{value:t,configurable:!0});function qd(e,[t,n]){return Math.min(n,Math.max(t,e))}Kd(qd,`clamp`);var Jd=Object.defineProperty,Yd=(e,t)=>Jd(e,`name`,{value:t,configurable:!0}),Xd=`Popover`,[Zd,Qd]=yn(Xd,[Tl]),$d=Tl(),[ef,tf]=Zd(Xd),nf=Yd(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=$d(t),c=v.useRef(null),[l,u]=v.useState(!1),[d,f]=v.useState(0),[p,m]=v.useState(0),[h,g]=Qn({prop:r,defaultProp:i??!1,onChange:a,caller:Xd});return(0,j.jsx)(Ol,{...s,children:(0,j.jsx)(ef,{scope:t,contentId:gr(),titleId:gr(),descriptionId:gr(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,triggerRef:c,open:h,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:l,onCustomAnchorAdd:v.useCallback(()=>u(!0),[]),onCustomAnchorRemove:v.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),rf=`PopoverTrigger`,af=v.forwardRef(Yd(function(e,t){let{__scopePopover:n,...r}=e,i=tf(rf,n),a=$d(n),o=Vt(t,i.triggerRef),s=(0,j.jsx)(un.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":gf(i.open),...r,ref:o,onClick:zn(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,j.jsx)(Al,{asChild:!0,...a,children:s})},`PopoverTrigger`)),of=`PopoverPortal`,[sf,cf]=Zd(of,{forceMount:void 0}),lf=Yd(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=tf(of,t);return(0,j.jsx)(sf,{scope:t,forceMount:n,children:(0,j.jsx)(or,{present:n||a.open,children:(0,j.jsx)(Si,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),uf=`PopoverContent`,df=v.forwardRef(Yd(function(e,t){let n=cf(uf,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=tf(uf,e.__scopePopover);return(0,j.jsx)(or,{present:r||a.open,children:a.modal?(0,j.jsx)(pf,{...i,ref:t}):(0,j.jsx)(mf,{...i,ref:t})})},`PopoverContent`)),ff=Wt(`PopoverContent.RemoveScroll`),pf=v.forwardRef(Yd(function(e,t){let n=tf(uf,e.__scopePopover),r=v.useRef(null),i=Vt(t,r),a=v.useRef(!1),{nodes:o,registry:s}=ci();return v.useEffect(()=>{let e=r.current;if(e)return Ka(e)},[]),(0,j.jsx)(La,{as:ff,allowPinchZoom:!0,shards:v.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,j.jsx)(hf,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zn(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:zn(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:zn(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),mf=v.forwardRef(Yd(function(e,t){let n=tf(uf,e.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return(0,j.jsx)(hf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),hf=v.forwardRef(Yd(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,"aria-describedby":d,branchNodes:f,branchRegistry:p,...m}=e,h=tf(uf,n),g=$d(n),[_,y]=v.useState(null),b=Vt(t,y);return li(_),Oi(),(0,j.jsx)(si,{registry:p,children:(0,j.jsx)(ai,{asChild:!0,loop:!0,trapped:r,branches:f,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,j.jsx)(qr,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,j.jsx)(Pl,{"data-state":gf(h.open),role:`dialog`,id:h.contentId,"aria-labelledby":h.titlePresent?h.titleId:void 0,"aria-describedby":h.descriptionPresent?_f(d,h.descriptionId):d,...g,...m,ref:b,style:{...m.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})})},`PopoverContentImpl`));function gf(e){return e?`open`:`closed`}Yd(gf,`getState`);function _f(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Yd(_f,`concatAriaDescribedby`);var vf=Object.defineProperty,yf=(e,t)=>vf(e,`name`,{value:t,configurable:!0}),bf=`Progress`,xf=100,[Sf,Cf]=yn(bf),[wf,Tf]=Sf(bf),Ef=v.forwardRef(yf(function(e,t){let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=kf,...o}=e;(i||i===0)&&!Mf(i)&&console.error(Pf(`${i}`,`Progress`));let s=Mf(i)?i:xf;r!==null&&!Nf(r,s)&&console.error(Ff(`${r}`,`Progress`));let c=Nf(r,s)?r:null,l=jf(c)?a(c,s):void 0;return(0,j.jsx)(wf,{scope:n,value:c,max:s,children:(0,j.jsx)(un.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":jf(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":Af(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})},`Progress`)),Df=`ProgressIndicator`,Of=v.forwardRef(yf(function(e,t){let{__scopeProgress:n,...r}=e,i=Tf(Df,n);return(0,j.jsx)(un.div,{"data-state":Af(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})},`ProgressIndicator`));function kf(e,t){return`${Math.round(e/t*100)}%`}yf(kf,`defaultGetValueLabel`);function Af(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}yf(Af,`getProgressState`);function jf(e){return typeof e==`number`}yf(jf,`isNumber`);function Mf(e){return jf(e)&&!isNaN(e)&&e>0}yf(Mf,`isValidMaxNumber`);function Nf(e,t){return jf(e)&&!isNaN(e)&&e<=t&&e>=0}yf(Nf,`isValidValueNumber`);function Pf(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${xf}\`.`}yf(Pf,`getInvalidMaxError`);function Ff(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
50
|
-
- a positive number
|
|
51
|
-
- less than the value passed to \`max\` (or ${xf} if no \`max\` prop is set)
|
|
52
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
53
|
-
|
|
54
|
-
Defaulting to \`null\`.`}yf(Ff,`getInvalidValueError`);var If=Object.defineProperty,Lf=(e,t)=>If(e,`name`,{value:t,configurable:!0}),Rf={ItemAligned:`item-aligned`,Popper:`popper`},zf={LTR:`ltr`,RTL:`rtl`},Bf=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Vf=[` `,`Enter`],Hf=`Select`,[Uf,Wf,Gf]=wn(Hf),[Kf,qf]=yn(Hf,[Gf,Tl]),Jf=Tl(),[Yf,Xf]=Kf(Hf),[Zf,Qf]=Kf(Hf);function $f(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=Jf(t),[_,y]=v.useState(null),[b,x]=v.useState(null),[S,C]=v.useState(!1),w=Fr(l),[T,E]=Qn({prop:r,defaultProp:i??!1,onChange:a,caller:Hf}),[D,O]=Qn({prop:o,defaultProp:s,onChange:c,caller:Hf}),ee=v.useRef(null),te=v.useRef(!1),[ne,re]=v.useState(null),ie=Lf(e=>{re({value:e,hasConsumerStoppedPropagation:te.current}),O(e)},`handleUserSelect`),ae=v.useRef(D);v.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=Lf(()=>O(ae.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let oe=!_||!!m||!!_.closest(`form`),[k,se]=v.useState(new Set),ce=gr(),le=Array.from(k).map(e=>e.props.value).join(`;`),ue=v.useCallback(e=>{se(t=>new Set(t).add(e))},[]),de=v.useCallback(e=>{se(t=>{let n=new Set(t);return n.delete(e),n})},[]),fe={required:p,trigger:_,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:ce,value:D,onValueChange:O,hasConsumerStoppedPropagationRef:te,userSelection:ne,onUserSelect:ie,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:ee,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:k,nativeSelectKey:le,isFormControl:oe};return(0,j.jsx)(Ol,{...g,children:(0,j.jsx)(Yf,{scope:t,...fe,children:(0,j.jsx)(Uf.Provider,{scope:t,children:(0,j.jsx)(Zf,{scope:t,onNativeOptionAdd:ue,onNativeOptionRemove:de,children:Bp(h)?h(fe):n})})})})}Lf($f,`SelectProvider`);var ep=Lf(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,j.jsx)($f,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,j.jsxs)(j.Fragment,{children:[n,e?(0,j.jsx)(zp,{__scopeSelect:t}):null]})})},`Select`),tp=`SelectTrigger`,np=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Jf(n),o=Xf(tp,n),s=o.disabled||r,c=Vt(t,o.onTriggerChange),l=Wf(n),u=v.useRef(`touch`),[d,f,p]=Hp(e=>{let t=l().filter(e=>!e.disabled),n=Up(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),m=Lf(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,j.jsx)(Al,{asChild:!0,...a,children:(0,j.jsx)(un.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Vp(o.value)?``:void 0,...i,ref:c,onClick:zn(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:zn(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:zn(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f(e.key)),!(t&&e.key===` `)&&Bf.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),rp=`SelectValue`,ip=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Xf(rp,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Vt(t,c.onValueNodeChange);xn(()=>{l(u)},[l,u]);let f=Vp(c.value);return(0,j.jsx)(un.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,j.jsx)(v.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),ap=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,j.jsx)(un.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[op,sp]=Kf(`SelectPortal`,{forceMount:void 0}),cp=Lf(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,j.jsx)(op,{scope:e.__scopeSelect,forceMount:n,children:(0,j.jsx)(Si,{asChild:!0,...r})})},`SelectPortal`),lp=`SelectContent`,up=v.forwardRef(Lf(function(e,t){let n=sp(lp,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Xf(lp,e.__scopeSelect),[o,s]=v.useState();return xn(()=>{s(new DocumentFragment)},[]),(0,j.jsx)(or,{present:r||a.open,children:({present:e})=>e?(0,j.jsx)(gp,{...i,ref:t}):(0,j.jsx)(dp,{...i,fragment:o})})},`SelectContent`)),dp=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?It.createPortal((0,j.jsx)(pp,{scope:n,children:(0,j.jsx)(Uf.Slot,{scope:n,children:(0,j.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),fp=10,[pp,mp]=Kf(lp),hp=Wt(`SelectContent.RemoveScroll`),gp=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n}=e,{position:r=Rf.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,y=Xf(lp,n),[b,x]=v.useState(null),[S,C]=v.useState(null),w=Vt(t,x),[T,E]=v.useState(null),[D,O]=v.useState(null),ee=Wf(n),[te,ne]=v.useState(!1),re=v.useRef(!1),ie=v.useRef(!1),ae=v.useRef(!1);v.useEffect(()=>{if(b)return Ka(b)},[b]),Oi();let oe=v.useCallback(e=>{let[t,...n]=ee().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[ee,S]),k=v.useCallback(()=>oe([T,b]),[oe,T,b]);v.useEffect(()=>{te&&k()},[te,k]);let{onOpenChange:se,triggerPointerDownPosRef:ce}=y;v.useEffect(()=>{if(b){let e={x:0,y:0},t=Lf(t=>{e={x:Math.abs(Math.round(t.pageX)-(ce.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ce.current?.y??0))}},`handlePointerMove`),n=Lf(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||se(!1),document.removeEventListener(`pointermove`,t),ce.current=null},`handlePointerUp`);return ce.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,se,ce]),v.useEffect(()=>{let e=Lf(()=>se(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[se]);let[le,ue]=Hp(e=>{let t=ee().filter(e=>!e.disabled),n=Up(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),de=v.useCallback((e,t,n)=>{let r=!ie.current;r&&(ie.current=!0);let i=!re.current&&!n;y.value!==void 0&&y.value===t||i?(E(e),i&&(re.current=!0)):r&&E(e)},[y.value]),fe=v.useCallback(()=>b?.focus(),[b]),pe=v.useCallback((e,t,n)=>{if(!e)return;let r=!ae.current;r&&(ae.current=!0);let i=!re.current&&!n;(y.value!==void 0&&y.value===t||i||r)&&O(e)},[y.value]),me=r===Rf.Popper?vp:_p,he=me===vp?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,j.jsx)(pp,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:de,selectedItem:T,onItemLeave:fe,itemTextRefCallback:pe,focusSelectedItem:k,selectedItemText:D,position:r,isPositioned:te,searchRef:le,children:(0,j.jsx)(La,{as:hp,allowPinchZoom:!0,children:(0,j.jsx)(ai,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:zn(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,j.jsx)(qr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,j.jsx)(me,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),..._,...he,onPlaced:()=>ne(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:zn(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ue(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=ee().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>oe(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),_p=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Xf(lp,n),o=mp(lp,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=Vt(t,u),f=Wf(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:y}=o,b=v.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==zf.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-fp,d=qd(a,[fp,Math.max(fp,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-fp,d=qd(a,[fp,Math.max(fp,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-fp*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-fp,D=c-E,O=g.offsetHeight/2,ee=g.offsetTop+O,te=m+v+ee,ne=x-te;if(te<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=te+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+ne;s.style.height=t+`px`,h.scrollTop=te-E+h.offsetTop}s.style.margin=`${fp}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);xn(()=>b(),[b]);let[x,S]=v.useState();xn(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]);let C=v.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]);return(0,j.jsx)(yp,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:(0,j.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,j.jsx)(un.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),vp=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=fp,...a}=e,o=Jf(n);return(0,j.jsx)(Pl,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[yp,bp]=Kf(lp,{}),xp=`SelectViewport`,Sp=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=mp(xp,n),o=bp(xp,n),s=Vt(t,a.onViewportChange),c=v.useRef(0);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,j.jsx)(Uf.Slot,{scope:n,children:(0,j.jsx)(un.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:zn(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-fp*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Cp,wp]=Kf(`SelectGroup`),Tp=`SelectItem`,[Ep,Dp]=Kf(Tp),Op=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Xf(Tp,n),c=mp(Tp,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=Vt(t,zr(e=>c.itemRefCallback?.(e,r,i))),h=gr(),g=v.useRef(`touch`);function _(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return Lf(_,`handleSelect`),(0,j.jsx)(Ep,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,j.jsx)(Uf.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,j.jsx)(un.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:zn(o.onFocus,()=>p(!0)),onBlur:zn(o.onBlur,()=>p(!1)),onClick:zn(o.onClick,e=>{i||g.current!==`mouse`&&_(e)}),onPointerUp:zn(o.onPointerUp,e=>{i||g.current===`mouse`&&_(e)}),onPointerDown:zn(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:zn(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:zn(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:zn(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Vf.includes(e.key)&&_(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),kp=`SelectItemText`,Ap=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Xf(kp,n),s=mp(kp,n),c=Dp(kp,n),l=Qf(kp,n),[u,d]=v.useState(null),f=zr(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Vt(t,d,c.onItemTextChange,f),m=u?.textContent,h=v.useMemo(()=>(0,j.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return xn(()=>(g(h),()=>_(h)),[g,_,h]),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(un.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Vp(o.value)?It.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),jp=`SelectItemIndicator`,Mp=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,...r}=e;return Dp(jp,n).isSelected?(0,j.jsx)(un.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Np=`SelectScrollUpButton`,Pp=v.forwardRef(Lf(function(e,t){let n=mp(Np,e.__scopeSelect),r=bp(Np,e.__scopeSelect),[i,a]=v.useState(!1),o=Vt(t,r.onScrollButtonChange);return xn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};Lf(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,j.jsx)(Lp,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Fp=`SelectScrollDownButton`,Ip=v.forwardRef(Lf(function(e,t){let n=mp(Fp,e.__scopeSelect),r=bp(Fp,e.__scopeSelect),[i,a]=v.useState(!1),o=Vt(t,r.onScrollButtonChange);return xn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};Lf(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,j.jsx)(Lp,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Lp=v.forwardRef(Lf(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=mp(`SelectScrollButton`,n),o=v.useRef(null),s=Wf(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),xn(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,j.jsx)(un.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:zn(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:zn(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:zn(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),Rp=`SelectBubbleInput`,zp=v.forwardRef(Lf(function({__scopeSelect:e,...t},n){let r=Xf(Rp,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u,userSelection:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=v.useRef(null),h=Vt(n,m),g=i??``,_=v.useRef(g),y=v.useRef(d),b=v.useRef(!1),x=Array.from(f).some(e=>(e.props.value??``)===``);return v.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=d!==null&&d!==y.current;y.current=d;let i=_.current!==g;_.current=g;let a=r&&i;if(r&&!i&&d.value!==g&&!d.hasConsumerStoppedPropagation&&n){b.current=!0;try{n.call(e,d.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{b.current=!1,n.call(e,g)}return}let o=a&&!d.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,g),e.dispatchEvent(t)}},[g,d]),(0,j.jsxs)(un.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>{b.current||a(e.target.value)},...t,style:{...mn,...t.style},ref:h,defaultValue:g,children:[Vp(i)&&!x?(0,j.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function Bp(e){return typeof e==`function`}Lf(Bp,`isFunction`);function Vp(e){return e===``||e===void 0}Lf(Vp,`shouldShowPlaceholder`);function Hp(e){let t=zr(e),n=v.useRef(``),r=v.useRef(0),i=v.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}Lf(a,`updateSearch`),a(i)},[t]),a=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}Lf(Hp,`useTypeaheadSearch`);function Up(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Wp(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Lf(Up,`findNextItem`);function Wp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Lf(Wp,`wrapArray`);var Gp=Object.defineProperty,Kp=(e,t)=>Gp(e,`name`,{value:t,configurable:!0}),qp={Horizontal:`horizontal`,Vertical:`vertical`},Jp=qp.Horizontal,Yp=Object.values(qp),Xp=v.forwardRef(Kp(function(e,t){let{decorative:n,orientation:r=Jp,...i}=e,a=Zp(r)?r:Jp,o=a===qp.Vertical?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,j.jsx)(un.div,{"data-orientation":a,...s,...i,ref:t})},`Separator`));function Zp(e){return Yp.includes(e)}Kp(Zp,`isValidOrientation`);var Qp=Object.defineProperty,$p=(e,t)=>Qp(e,`name`,{value:t,configurable:!0}),[em,tm]=yn(`Tooltip`,[Tl]),nm=Tl(),rm=`TooltipProvider`,im=700,am=`tooltip.open`,[om,sm]=em(rm),cm=$p(e=>{let{__scopeTooltip:t,delayDuration:n=im,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=v.useRef(!0),s=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,j.jsx)(om,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:v.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:v.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:v.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),lm=`Tooltip`,[um,dm]=em(lm),fm=$p(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=sm(lm,e.__scopeTooltip),l=nm(t),[u,d]=v.useState(null),[f,p]=v.useState(void 0),m=gr(),h=v.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,y=v.useRef(!1),[b,x]=Qn({prop:r,defaultProp:i??!1,onChange:$p(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(am))):c.onClose(),a?.(e)},`onChange`),caller:lm}),S=v.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),C=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,x(!0)},[x]),w=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),T=v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,x(!0),h.current=0},_)},[_,x]);v.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let E=f??m;return(0,j.jsx)(Ol,{...l,children:(0,j.jsx)(um,{scope:t,contentId:E,setContentId:p,open:b,stateAttribute:S,trigger:u,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayedRef.current?T():C()},[c.isOpenDelayedRef,T,C]),onTriggerLeave:v.useCallback(()=>{g?w():(window.clearTimeout(h.current),h.current=0)},[w,g]),onOpen:C,onClose:w,disableHoverableContent:g,children:n})})},`Tooltip`),pm=`TooltipTrigger`,mm=v.forwardRef($p(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=dm(pm,n),o=sm(pm,n),s=nm(n),c=Vt(t,v.useRef(null),a.onTriggerChange),l=v.useRef(!1),u=v.useRef(!1),d=v.useCallback(()=>l.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,j.jsx)(Al,{asChild:!0,...s,children:(0,j.jsx)(un.button,{"aria-describedby":a.open?jm(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:zn(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:zn(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:zn(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:zn(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:zn(e.onBlur,a.onClose),onClick:zn(e.onClick,a.onClose)})})},`TooltipTrigger`)),hm=`TooltipPortal`,[gm,_m]=em(hm,{forceMount:void 0}),vm=$p(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=dm(hm,t);return(0,j.jsx)(gm,{scope:t,forceMount:n,children:(0,j.jsx)(or,{present:n||a.open,children:(0,j.jsx)(Si,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),ym=`TooltipContent`,bm=v.forwardRef($p(function(e,t){let n=_m(ym,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=dm(ym,e.__scopeTooltip);return(0,j.jsx)(or,{present:r||o.open,children:o.disableHoverableContent?(0,j.jsx)(Cm,{side:i,...a,ref:t}):(0,j.jsx)(xm,{side:i,...a,ref:t})})},`TooltipContent`)),xm=v.forwardRef($p(function(e,t){let n=dm(ym,e.__scopeTooltip),r=sm(ym,e.__scopeTooltip),i=v.useRef(null),a=Vt(t,i),[o,s]=v.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{s(null),d(!1)},[d]),p=v.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Em(r,Tm(r,n.getBoundingClientRect())),a=Dm(t.getBoundingClientRect()),o=km([...i,...a]);s(o),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(c&&u){let e=$p(e=>p(e,u),`handleTriggerLeave`),t=$p(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),v.useEffect(()=>{if(o){let e=$p(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Om(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,j.jsx)(Cm,{...e,ref:a})},`TooltipContentHoverable`)),Sm=qt(`TooltipContent`),Cm=v.forwardRef($p(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=dm(ym,n),u=nm(n),{onClose:d}=l,[f,p]=v.useState(null),m=Vt(t,p);li(f),v.useEffect(()=>(document.addEventListener(am,d),()=>document.removeEventListener(am,d)),[d]),v.useEffect(()=>{if(l.trigger){let e=$p(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:h}=l;return xn(()=>(h(a),()=>{h(void 0)}),[a,h]),(0,j.jsx)(qr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,j.jsxs)(Pl,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:m,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,j.jsx)(Sm,{children:r}),i?(0,j.jsx)(hn,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),wm=v.forwardRef($p(function(e,t){let{__scopeTooltip:n,...r}=e,i=nm(n);return(0,j.jsx)(Ll,{...i,...r,ref:t})},`TooltipArrow`));function Tm(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}$p(Tm,`getExitSideFromRect`);function Em(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}$p(Em,`getPaddedExitPoints`);function Dm(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}$p(Dm,`getPointsFromRect`);function Om(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}$p(Om,`isPointInPolygon`);function km(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Am(t)}$p(km,`getHull`);function Am(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}$p(Am,`getHullPresorted`);function jm(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}$p(jm,`concatAriaDescribedby`);var Mm=se(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 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/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function M({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Gt:`button`;return(0,j.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:A(Mm({variant:t,size:n,className:e})),...i})}var Nm=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Pm(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Nm(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Fm=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Im=e=>{let t=Fm(e);return t.charAt(0).toUpperCase()+t.slice(1)},Lm=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Rm={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 zm(e){return e!=null}function Bm(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Rm.width,a=e.size??e.height??Rm.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?Lm(...c):Lm(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Rm[`stroke-width`])*Number(e.size??e.width??Rm.width)/Number(t.size??t.width??Rm.width):t.strokeWidth??Rm[`stroke-width`];return[`svg`,{...Object.entries(Rm).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&zm(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&zm(t.width)&&{[r(`width`)]:t.width},...`height`in t&&zm(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 Vm(e,t={}){return Bm(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Hm=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Um=(0,v.createContext)({}),Wm=()=>(0,v.useContext)(Um),Gm=(0,v.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:y=``}=Wm()??{},b=!!c||Hm(d),[x,S,C=[]]=Vm(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Lm(y,s),hasA11yProp:b,attributes:d});return(0,v.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function N(e,t=[],n=[]){let r=typeof e==`string`?Pm(e,t,n):e,i=(0,v.forwardRef)(({className:e,...t},n)=>(0,v.createElement)(Gm,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Im(r.name)),i}var Km={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};Km.node;var qm=N(Km),Jm={name:`atom`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`path`,{d:`M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z`,key:`1l2ple`}],[`path`,{d:`M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z`,key:`1wam0m`}]]};Jm.node;var Ym=N(Jm),Xm={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`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`}]]};Xm.node;var Zm=N(Xm),Qm={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};Qm.node;var $m=N(Qm),eh={name:`briefcase`,size:24,node:[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]};eh.node;var th=N(eh),nh={name:`calculator`,size:24,node:[[`rect`,{width:`16`,height:`20`,x:`4`,y:`2`,rx:`2`,key:`1nb95v`}],[`line`,{x1:`8`,x2:`16`,y1:`6`,y2:`6`,key:`x4nwl0`}],[`line`,{x1:`16`,x2:`16`,y1:`14`,y2:`18`,key:`wjye3r`}],[`path`,{d:`M16 10h.01`,key:`1m94wz`}],[`path`,{d:`M12 10h.01`,key:`1nrarc`}],[`path`,{d:`M8 10h.01`,key:`19clt8`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}]]};nh.node;var rh=N(nh),ih={name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]};ih.node;var ah=N(ih),oh={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};oh.node;var sh=N(oh),ch={name:`chart-line`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]],aliases:[`line-chart`]};ch.node;var lh=N(ch),uh={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};uh.node;var dh=N(uh),fh={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};fh.node;var ph=N(fh),mh={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};mh.node;var hh=N(mh),gh={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};gh.node;var _h=N(gh),vh={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};vh.node;var yh=N(vh),bh={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};bh.node;var xh=N(bh),Sh={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`}]]};Sh.node;var Ch=N(Sh),wh={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};wh.node;var Th=N(wh),Eh={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Eh.node;var Dh=N(Eh),Oh={name:`code`,size:24,node:[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]};Oh.node;var kh=N(Oh),Ah={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Ah.node;var jh=N(Ah),Mh={name:`corner-up-left`,size:24,node:[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]};Mh.node;var Nh=N(Mh),Ph={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};Ph.node;var Fh=N(Ph),Ih={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};Ih.node;var Lh=N(Ih),Rh={name:`dna`,size:24,node:[[`path`,{d:`m10 16 1.5 1.5`,key:`11lckj`}],[`path`,{d:`m14 8-1.5-1.5`,key:`1ohn8i`}],[`path`,{d:`M15 2c-1.798 1.998-2.518 3.995-2.807 5.993`,key:`80uv8i`}],[`path`,{d:`m16.5 10.5 1 1`,key:`696xn5`}],[`path`,{d:`m17 6-2.891-2.891`,key:`xu6p2f`}],[`path`,{d:`M2 15c6.667-6 13.333 0 20-6`,key:`1pyr53`}],[`path`,{d:`m20 9 .891.891`,key:`3xwk7g`}],[`path`,{d:`M3.109 14.109 4 15`,key:`q76aoh`}],[`path`,{d:`m6.5 12.5 1 1`,key:`cs35ky`}],[`path`,{d:`m7 18 2.891 2.891`,key:`1sisit`}],[`path`,{d:`M9 22c1.798-1.998 2.518-3.995 2.807-5.993`,key:`q3hbxp`}]]};Rh.node;var zh=N(Rh),Bh={name:`dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]};Bh.node;var Vh=N(Bh),Hh={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};Hh.node;var Uh=N(Hh),Wh={name:`dumbbell`,size:24,node:[[`path`,{d:`M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z`,key:`9m4mmf`}],[`path`,{d:`m2.5 21.5 1.4-1.4`,key:`17g3f0`}],[`path`,{d:`m20.1 3.9 1.4-1.4`,key:`1qn309`}],[`path`,{d:`M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z`,key:`1t2c92`}],[`path`,{d:`m9.6 14.4 4.8-4.8`,key:`6umqxw`}]]};Wh.node;var Gh=N(Wh),Kh={name:`eighth-notes`,size:24,node:[[`path`,{d:`M21 16V3a1 1 0 0 0-1.28-.96l-10 2.917a1 1 0 0 0-.72.96V19`,key:`uy6ho8`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}],[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}]],aliases:[`music`]};Kh.node;var qh=N(Kh),Jh={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Jh.node;var Yh=N(Jh),Xh={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Xh.node;var Zh=N(Xh),Qh={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Qh.node;var $h=N(Qh),eg={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`}]]};eg.node;var tg=N(eg),ng={name:`file-archive`,size:24,node:[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]};ng.node;var rg=N(ng),ig={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};ig.node;var ag=N(ig),og={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};og.node;var sg=N(og),cg={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};cg.node;var lg=N(cg),ug={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};ug.node;var dg=N(ug),fg={name:`graduation-cap`,size:24,node:[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]};fg.node;var pg=N(fg),mg={name:`heart-pulse`,size:24,node:[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}],[`path`,{d:`M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27`,key:`auskq0`}]]};mg.node;var hg=N(mg),gg={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};gg.node;var _g=N(gg),vg={name:`landmark`,size:24,node:[[`path`,{d:`M10 18v-7`,key:`wt116b`}],[`path`,{d:`M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z`,key:`yxxwt6`}],[`path`,{d:`M14 18v-7`,key:`vav6t3`}],[`path`,{d:`M18 18v-7`,key:`aexdmj`}],[`path`,{d:`M3 22h18`,key:`8prr45`}],[`path`,{d:`M6 18v-7`,key:`1ivflk`}]]};vg.node;var yg=N(vg),bg={name:`languages`,size:24,node:[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]};bg.node;var xg=N(bg),Sg={name:`leaf`,size:24,node:[[`path`,{d:`M11 20a10 10 0 0010-10 25.9 25.9 0 00-1.04-7.281 1 1 0 00-1.755-.325C15.833 5.5 13 5.5 9.8 6.1A7 7 0 0011 20`,key:`1wjnjv`}],[`path`,{d:`M2 21a5 5 0 012.911-4.544C7.613 15.212 8.351 15.24 11 13`,key:`c1ejpn`}]]};Sg.node;var Cg=N(Sg),wg={name:`library`,size:24,node:[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]};wg.node;var Tg=N(wg),Eg={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Eg.node;var Dg=N(Eg),Og={name:`maximize`,size:24,node:[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]};Og.node;var kg=N(Og),Ag={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`}]]};Ag.node;var jg=N(Ag),Mg={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};Mg.node;var Ng=N(Mg),Pg={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};Pg.node;var Fg=N(Pg),Ig={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};Ig.node;var Lg=N(Ig),Rg={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`}]]};Rg.node;var zg=N(Rg),Bg={name:`network`,size:24,node:[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]};Bg.node;var Vg=N(Bg),Hg={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};Hg.node;var eee=N(Hg),Ug={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`]};Ug.node;var tee=N(Ug),Wg={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};Wg.node;var nee=N(Wg),Gg={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};Gg.node;var ree=N(Gg),Kg={name:`pen-tool`,size:24,node:[[`path`,{d:`m18 13-.654-4.736a4 4 0 00-2.756-3.266l-9.163-2.9a2 2 0 00-2.017.493l-.82.819a2 2 0 00-.492 2.017l2.9 9.163a4 4 0 003.266 2.756L13 18`,key:`93nyr4`}],[`path`,{d:`M18.648 12.352a1.205 1.205 0 011.704 0l1.296 1.296a1.205 1.205 0 010 1.704l-6.296 6.296a1.205 1.205 0 01-1.704 0l-1.296-1.296a1.205 1.205 0 010-1.704z`,key:`lnux7s`}],[`path`,{d:`m3 3 6.586 6.586`,key:`1igwcn`}],[`circle`,{cx:`11`,cy:`11`,r:`2`,key:`xmgehs`}]]};Kg.node;var iee=N(Kg),qg={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`}]]};qg.node;var Jg=N(qg),Yg={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};Yg.node;var Xg=N(Yg),Zg={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Zg.node;var Qg=N(Zg),$g={name:`rotate-ccw`,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`}]]};$g.node;var e_=N($g),t_={name:`scale`,size:24,node:[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]};t_.node;var n_=N(t_),r_={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};r_.node;var i_=N(r_),a_={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};a_.node;var o_=N(a_),s_={name:`shield`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]};s_.node;var c_=N(s_),l_={name:`sigma`,size:24,node:[[`path`,{d:`M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2`,key:`wuwx1p`}]]};l_.node;var u_=N(l_),d_={name:`square-plus`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]],aliases:[`plus-square`]};d_.node;var f_=N(d_),p_={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};p_.node;var m_=N(p_),h_={name:`stethoscope`,size:24,node:[[`path`,{d:`M11 2v2`,key:`1539x4`}],[`path`,{d:`M5 2v2`,key:`1yf1q8`}],[`path`,{d:`M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1`,key:`rb5t3r`}],[`path`,{d:`M8 15a6 6 0 0 0 12 0v-3`,key:`x18d4x`}],[`circle`,{cx:`20`,cy:`10`,r:`2`,key:`ts1r5v`}]]};h_.node;var g_=N(h_),__={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`}]]};__.node;var v_=N(__),y_={name:`telescope`,size:24,node:[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]};y_.node;var b_=N(y_),x_={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};x_.node;var S_=N(x_),C_={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};C_.node;var w_=N(C_),T_={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};T_.node;var E_=N(T_),D_={name:`waypoints`,size:24,node:[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]};D_.node;var O_=N(D_),k_={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};k_.node;var A_=N(k_),j_={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};j_.node;var M_=N(j_),N_=({className:e,...t})=>(0,j.jsx)(te,{className:A(`relative flex-1 overflow-y-hidden`,e),initial:`smooth`,resize:`smooth`,role:`log`,...t}),P_=({className:e,...t})=>(0,j.jsx)(te.Content,{className:A(`flex flex-col gap-8 p-4`,e),...t}),F_=({className:e,...t})=>{let{isAtBottom:n,scrollToBottom:r}=ne(),i=(0,v.useCallback)(()=>{r()},[r]);return!n&&(0,j.jsx)(M,{className:A(`absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full`,e),onClick:i,size:`icon`,type:`button`,variant:`outline`,...t,children:(0,j.jsx)(qm,{className:`size-4`})})},I_=`vercel.ai.error`,L_=Symbol.for(I_),R_=class e extends Error{constructor({name:e,message:t,cause:n}){super(t),this[L_]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,I_)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}},z_=`AI_APICallError`,B_=`vercel.ai.error.${z_}`,aee=Symbol.for(B_),oee=class extends R_{constructor({message:e,url:t,requestBodyValues:n,statusCode:r,responseHeaders:i,responseBody:a,cause:o,isRetryable:s=r!=null&&(r===408||r===409||r===429||r>=500),data:c}){super({name:z_,message:e,cause:o}),this[aee]=!0,this.url=t,this.requestBodyValues=n,this.statusCode=r,this.responseHeaders=i,this.responseBody=a,this.isRetryable=s,this.data=c}static isInstance(e){return R_.hasMarker(e,B_)}},V_=`AI_EmptyResponseBodyError`,H_=`vercel.ai.error.${V_}`,see=Symbol.for(H_),U_=class extends R_{constructor({message:e=`Empty response body`}={}){super({name:V_,message:e}),this[see]=!0}static isInstance(e){return R_.hasMarker(e,H_)}};function W_(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.toString():JSON.stringify(e)}var G_=`AI_InvalidArgumentError`,K_=`vercel.ai.error.${G_}`,q_=Symbol.for(K_),J_=class extends R_{constructor({message:e,cause:t,argument:n}){super({name:G_,message:e,cause:t}),this[q_]=!0,this.argument=n}static isInstance(e){return R_.hasMarker(e,K_)}},Y_=`AI_JSONParseError`,X_=`vercel.ai.error.${Y_}`,Z_=Symbol.for(X_),Q_=class extends R_{constructor({text:e,cause:t}){super({name:Y_,message:`JSON parsing failed: Text: ${e}.\nError message: ${W_(t)}`,cause:t}),this[Z_]=!0,this.text=e}static isInstance(e){return R_.hasMarker(e,X_)}},$_=`AI_TypeValidationError`,ev=`vercel.ai.error.${$_}`,tv=Symbol.for(ev),nv=class e extends R_{constructor({value:e,cause:t,context:n}){let r=`Type validation failed`;if(n?.field&&(r+=` for ${n.field}`),n?.entityName||n?.entityId){r+=` (`;let e=[];n.entityName&&e.push(n.entityName),n.entityId&&e.push(`id: "${n.entityId}"`),r+=e.join(`, `),r+=`)`}super({name:$_,message:`${r}: Value: ${JSON.stringify(e)}.\nError message: ${W_(t)}`,cause:t}),this[tv]=!0,this.value=e,this.context=n}static isInstance(e){return R_.hasMarker(e,ev)}static wrap({value:t,cause:n,context:r}){return e.isInstance(n)&&n.value===t&&n.context?.field===r?.field&&n.context?.entityName===r?.entityName&&n.context?.entityId===r?.entityId?n:new e({value:t,cause:n,context:r})}},rv=`AI_UnsupportedFunctionalityError`,iv=`vercel.ai.error.${rv}`,av=Symbol.for(iv),ov=class extends R_{constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:rv,message:t}),this[av]=!0,this.functionality=e}static isInstance(e){return R_.hasMarker(e,iv)}};function sv(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function cv(e,t=`|`){return e.map(e=>Iv(e)).join(t)}function lv(e,t){return typeof t==`bigint`?t.toString():t}var uv=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function dv(e){return new uv(e)}function fv(e){return e==null}function pv(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function mv(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var hv=Symbol(`evaluating`);function gv(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==hv)return r===void 0&&(r=hv,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function _v(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function vv(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function yv(e){return vv(e._zod.def)??e._zod.def.shape}function bv(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return _v(this,t,e),e},enumerable:!0,configurable:!0})}function xv(e,t,n){t in e?_v(e,t,n):e[t]=n}function Sv(e,t,n,r){let i=yv(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?bv(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):xv(e,a,r?r(n.value,a):n.value))}}function Cv(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?bv(e,n,()=>t[n]):xv(e,n,r.value))}}function wv(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Tv(e){return JSON.stringify(e)}function Ev(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Dv=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ov(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var kv=dv(()=>{if(Ey.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Av(e){if(Ov(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Ov(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function jv(e){return Av(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Mv=new Set([`string`,`number`,`symbol`]);function Nv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Pv(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Fv(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Iv(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Lv(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Rv={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},zv={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Bv(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return Sv(i,e,Vv(e,t)),Pv(e,wv(n,{shape:i,checks:[]}))}function Vv(e,t){let n=yv(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Hv(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Vv(e,t)),a={};return Sv(a,e,Reflect.ownKeys(yv(e)).filter(e=>!i.has(e))),Pv(e,wv(n,{shape:a,checks:[]}))}function Uv(e,t){if(!Av(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=yv(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Pv(e,wv(e._zod.def,{shape:Wv(e,t)}))}function Wv(e,t){let n={};return Sv(n,e,Reflect.ownKeys(yv(e))),Cv(n,t),n}function Gv(e,t){if(!Av(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Pv(e,wv(e._zod.def,{shape:Wv(e,t)}))}function Kv(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return Sv(n,e,Reflect.ownKeys(yv(e))),Sv(n,t,Reflect.ownKeys(yv(t))),Pv(e,wv(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function qv(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Vv(t,n)):void 0,o={};return Sv(o,t,Reflect.ownKeys(yv(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),Pv(t,wv(t._zod.def,{shape:o,checks:[]}))}function Jv(e,t,n){let r=n?new Set(Vv(t,n)):void 0,i={};return Sv(i,t,Reflect.ownKeys(yv(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),Pv(t,wv(t._zod.def,{shape:i}))}function Yv(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Xv(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Zv(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Qv(e){return typeof e==`string`?e:e?.message}function $v(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function ey(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function ty(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Qv(e.inst?._zod.def?.error?.(e))??Qv(a?.(e))??Qv(t?.error?.(e))??Qv(n.customError?.(e))??Qv(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var ny=/[\uD800-\uDBFF]/;function ry(e){let t=e.length;if(!ny.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function iy(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ay(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function oy(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function sy(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):dy(e,n,r.value)}}function cy(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function ly(e,t,n){return cy(e,t,n,!1)}function uy(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return cy(this,n,r(this))},set(e){cy(this,n,e)}})}return t}function dy(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:cy(this,t,n.bind(this))},set(e){cy(this,t,e)}})}function fy(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var py,my=!1,hy={configurable:!0,get(){my=!0}};function gy(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&py!==e._zod?py=void 0:(py=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,hy);let e=my;my=!1;try{let r=n(this);return my?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),my||=e,r}catch(n){throw delete this[t],my||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function _y(e,t,n,r){let i=fy(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var vy=`~constantCatch`;function yy(e){let t=()=>e;return t[vy]=!0,t}var by,xy={value:void 0,enumerable:!1},Sy=`captureStackTrace`in Error?Error:null;function Cy(e){let t=Sy;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Sy=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function P(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){xy.value=new a(r);try{Object.defineProperty(n,"_zod",xy)}finally{xy.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),sy(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Cy(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var wy=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ty=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(by=globalThis).__zod_globalConfig??(by.__zod_globalConfig={});var Ey=globalThis.__zod_globalConfig;function Dy(e){return e&&Object.assign(Ey,e),Ey}function cee(){let e=this._zod;return e.message??=JSON.stringify(e.def,lv,2),e.message}function lee(e){this._zod.message=e}var uee={get:cee,set:lee,enumerable:!0,configurable:!0},Oy={value:void 0,enumerable:!1},ky=new WeakSet([Object.prototype,Error.prototype]),dee=P(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Oy.value=t,Object.defineProperty(e,"issues",Oy),Oy.value=void 0,Object.defineProperty(e,"message",uee);let n=Object.getPrototypeOf(e);ky.has(n)||(ky.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function fee(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function pee(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?fee(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function mee(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Ay(e,t){return{callee:t?.callee??e,Err:t?.Err}}var jy=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new wy;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ty(e,o,Dy())));throw Dv(n,a?.callee??t),n}return s.value};return t},My=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ty(e,o,Dy())));throw Dv(n,a?.callee??t),n}return s.value};return t},Ny=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new wy;return a.issues.length?Py(e,a.issues,i):{success:!0,data:a.value}};function Py(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>ty(e,n,Dy()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Fy=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Py(e,a.issues,i):{success:!0,data:a.value}},hee=Symbol.for(`zod.compile.invalid`),gee=Symbol.for(`zod.compile.fallback`),_ee=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==hee)return!0;if(r.definite===!0&&n===void 0)return!1}return vee(e,t,n)});function vee(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[gee]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new wy;return a.issues.length===0}var yee=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},bee=e=>{let t=jy(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Ay(n,a))};return n},xee=e=>{let t=jy(e),n=(e,r,i,a)=>t(e,r,i,Ay(n,a));return n},See=e=>{let t=My(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Ay(n,a))};return n},Cee=e=>{let t=My(e),n=async(e,r,i,a)=>await t(e,r,i,Ay(n,a));return n},wee=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ny(e)(t,n,i)},Tee=e=>(t,n,r)=>Ny(e)(t,n,r),Eee=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Fy(e)(t,n,i)},Dee=e=>async(t,n,r)=>Fy(e)(t,n,r),Oee=/^[cC][0-9a-z]{6,}$/,kee=/^[0-9a-z]+$/,Aee=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,jee=/^[0-9a-vA-V]{20}$/,Mee=/^[A-Za-z0-9]{27}$/,Nee=/^[a-zA-Z0-9_-]{21}$/;function Pee(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Fee=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Iee=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Iy=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Lee=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ree=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function zee(){return new RegExp(Ree,`u`)}var Bee=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Vee=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{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?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function By(e){return RegExp(`^${e}$`)}var Vy=By(zy);function Hy(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Uy(e){return RegExp(`^${Hy(e)}$`)}function Wy(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Hy({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Hy({precision:e.precision})}`:n;return RegExp(`^${zy}T(?:${r})$`)}var Gy=/^[\s\S]{0,}$/,Ky=/^-?\d+$/,qy=/^-?\d+(?:\.\d+)?$/,Jy=/^(?:true|false)$/i,Yy=/^null$/i,Xy=/^[^A-Z]*$/,Zy=/^[^a-z]*$/,Qy=P(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),$y=e=>{let t=e.value;return!fv(t)&&t.length!==void 0},eb={number:`number`,bigint:`bigint`,object:`date`},tb=P(`$ZodCheckLessThan`,(e,t)=>{Qy.init(e,t);let n=eb[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:eb[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nb=P(`$ZodCheckGreaterThan`,(e,t)=>{Qy.init(e,t);let n=eb[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:eb[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rb=P(`$ZodCheckMultipleOf`,(e,t)=>{Qy.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):mv(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ib=P(`$ZodCheckNumberFormat`,(e,t)=>{Qy.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Rv[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ab=P(`$ZodCheckMaxLength`,(e,t)=>{var n;Qy.init(e,t),(n=e._zod.def).when??(n.when=$y),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?ry(r):i)<=t.maximum)return;let a=iy(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ob=P(`$ZodCheckMinLength`,(e,t)=>{var n;Qy.init(e,t),(n=e._zod.def).when??(n.when=$y),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?ry(r):i)>=t.minimum)return;let a=iy(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),sb=P(`$ZodCheckLengthEquals`,(e,t)=>{var n;Qy.init(e,t),(n=e._zod.def).when??(n.when=$y),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?ry(r):i;if(a===t.length)return;let o=iy(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),cb=P(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Qy.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),lb=P(`$ZodCheckRegex`,(e,t)=>{cb.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ub=P(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Xy,cb.init(e,t)}),db=P(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Zy,cb.init(e,t)}),fb=P(`$ZodCheckIncludes`,(e,t)=>{Qy.init(e,t);let n=Nv(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),pb=P(`$ZodCheckStartsWith`,(e,t)=>{Qy.init(e,t);let n=RegExp(`^${Nv(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),mb=P(`$ZodCheckEndsWith`,(e,t)=>{Qy.init(e,t);let n=RegExp(`.*${Nv(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function hb(e,t,n){e.issues.length&&t.issues.push(...Zv(n,e.issues))}var gb=P(`$ZodCheckProperties`,(e,t)=>{Qy.init(e,t),ly(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=r=>{if(r.value==null){r.issues.push({expected:`object`,code:`invalid_type`,input:r.value,inst:e});return}n??=Reflect.ownKeys(t.shape).map(e=>[e,t.shape[e]]);let i=r.value,a;for(let[e,t]of n){let n=t._zod.run({value:i[e],issues:[]},{});n instanceof Promise?(a??=[],a.push(n.then(t=>hb(t,r,e)))):hb(n,r,e)}if(a)return Promise.all(a).then(()=>void 0)}}),_b=P(`$ZodCheckOverwrite`,(e,t)=>{Qy.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),vb=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
55
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
56
|
-
`)}\n};`)(...Object.values(this.closed))}},yb={major:4,minor:6,patch:7},bb=P(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=yb;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Yv(t),a;for(let o of n){if(o._zod.def.when){if(Xv(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new wy;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(ey(t.issues,n,e),i||=Yv(t,n))});else{if(t.issues.length===n)continue;ey(t.issues,n,e),i||=Yv(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Yv(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new wy;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new wy;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return ly(this,`~standard`,Cb(this))},set"~standard"(e){cy(this,`~standard`,e)}}),xb=(e,t)=>e.issues.length?{issues:e.issues.map(e=>ty(e,t,Dy()))}:{value:e.value};async function Sb(e,t){let n={async:!0};return xb(await e._zod.run({value:t,issues:[]},n),n)}function Cb(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return xb(r,n)}catch{}return Sb(e,t)},vendor:`zod`,version:1}}var wb=P(`$ZodString`,(e,t)=>{bb.init(e,t),e._zod.pattern=t.pattern??Gy,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Tb=P(`$ZodStringFormat`,(e,t)=>{cb.init(e,t),wb.init(e,t)}),Eb=P(`$ZodGUID`,(e,t)=>{t.pattern??=Iee,Tb.init(e,t)}),Db=P(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Iy(e)}else t.pattern??=Iy();Tb.init(e,t)}),Ob=P(`$ZodEmail`,(e,t)=>{t.pattern??=Lee,Tb.init(e,t)});function kb(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Ab(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?kb(e)||2:jb(e,t)}function jb(e,t){if(!t.normalize&&t.protocol?.source===Ly.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Mb=/[\t\n\r]/g;function Nb(e){return e.replace(Mb,``)}function Pb(e,t){return t.lastIndex=0,t.test(e.hostname)}function Fb(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Ib=P(`$ZodURL`,(e,t)=>{Tb.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Ab(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Nb(r);return}t.hostname&&!Pb(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Fb(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Nb(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Lb=P(`$ZodEmoji`,(e,t)=>{t.pattern??=zee(),Tb.init(e,t)}),Rb=P(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Nee:Pee(t.length),Tb.init(e,t)}),zb=P(`$ZodCUID`,(e,t)=>{t.pattern??=Oee,Tb.init(e,t)}),Bb=P(`$ZodCUID2`,(e,t)=>{t.pattern??=kee,Tb.init(e,t)}),Vb=P(`$ZodULID`,(e,t)=>{t.pattern??=Aee,Tb.init(e,t)}),Hb=P(`$ZodXID`,(e,t)=>{t.pattern??=jee,Tb.init(e,t)}),Ub=P(`$ZodKSUID`,(e,t)=>{t.pattern??=Mee,Tb.init(e,t)}),Wb=P(`$ZodISODateTime`,(e,t)=>{t.pattern??=Wy(t),Tb.init(e,t)}),Gb=P(`$ZodISODate`,(e,t)=>{t.pattern??=Vy,Tb.init(e,t)}),Kb=P(`$ZodISOTime`,(e,t)=>{t.pattern??=Uy(t),Tb.init(e,t)}),qb=P(`$ZodISODuration`,(e,t)=>{t.pattern??=Fee,Tb.init(e,t)}),Jb=P(`$ZodIPv4`,(e,t)=>{t.pattern??=Bee,Tb.init(e,t)}),Yb=/^[0-9a-fA-F:.]+$/;function Xb(e){return Yb.test(e)?kb(`http://[${e}]`):!1}var Zb=P(`$ZodIPv6`,(e,t)=>{t.pattern??=Vee,Tb.init(e,t),e._zod.check=n=>{Xb(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Qb=P(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Hee,Tb.init(e,t)});function $b(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Xb(n)}var ex=P(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Uee,Tb.init(e,t),e._zod.check=n=>{$b(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function tx(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var nx=/^[0-9a-zA-Z+/]*={0,2}$/,rx=P(`$ZodBase64`,(e,t)=>{t.pattern??=nx,Tb.init(e,t),e._zod.check=n=>{tx(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),ix=/^[A-Za-z0-9_-]*$/;function ax(e){if(!ix.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return tx(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var ox=P(`$ZodBase64URL`,(e,t)=>{t.pattern??=ix,Tb.init(e,t),e._zod.check=n=>{ax(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),sx=P(`$ZodE164`,(e,t)=>{t.pattern??=Ry,Tb.init(e,t)});function cx(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var lx=P(`$ZodJWT`,(e,t)=>{Tb.init(e,t),e._zod.check=n=>{cx(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ux=P(`$ZodNumber`,(e,t)=>{bb.init(e,t),e._zod.pattern=qy,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),dx=P(`$ZodNumberFormat`,(e,t)=>{ib.init(e,t),ux.init(e,t)}),fx=P(`$ZodBoolean`,(e,t)=>{bb.init(e,t),e._zod.pattern=Jy,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),px=P(`$ZodNull`,(e,t)=>{bb.init(e,t),e._zod.pattern=Yy,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),mx=P(`$ZodUnknown`,(e,t)=>{bb.init(e,t),e._zod.parse=e=>e}),hx=P(`$ZodNever`,(e,t)=>{bb.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function gx(e,t){let n=$v(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of $v(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,ey(n.issues,t,e),n}}return i(n,a)}}var _x=e=>Array.isArray(e)?e.length:-1;function vx(e,t,n){e.issues.length&&t.issues.push(...Zv(n,e.issues)),t.value[n]=e.value}var yx=P(`$ZodArray`,(e,t)=>{bb.init(e,t);let n=Ey.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>vx(t,r,e)));else if(vx(c,r,e),s&&c.issues.length!==0&&Yv(c))break}return o.length?Promise.all(o).then(()=>r):r},gx(e,_x)});function bx(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Zv(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var xx=[];function Sx(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:xx,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Lv(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Cx(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Yv(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>bx(e,n,i,t,d,f))):bx(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var wx=P(`$ZodObject`,(e,t)=>{bb.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=dv(()=>Sx(t));gy(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||_v(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Ov,o=t.catchall,s,c=Ey.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Yv(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>bx(n,t,e,r,a,o))):bx(s,t,e,r,a,o)}return o?Cx(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Tx=P(`$ZodObjectJIT`,(e,t)=>{wx.init(e,t);let n=e._zod.parse,r=dv(()=>Sx(t)),i=Ey.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new vb([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
57
|
-
let ${e}_ab = false;
|
|
58
|
-
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
59
|
-
const iss = ${e}.issues[i];
|
|
60
|
-
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
61
|
-
payload.issues.push(iss);
|
|
62
|
-
if (iss.continue !== true) ${e}_ab = true;
|
|
63
|
-
}
|
|
64
|
-
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
65
|
-
payload.value = newResult;
|
|
66
|
-
return payload;
|
|
67
|
-
}`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Tv(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
|
|
68
|
-
const ${n}_present = ${i};
|
|
69
|
-
if (!${n}.issues.length || ${n}_present) {
|
|
70
|
-
if (${n}.issues.length) {${c(n,r)}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (${e}) {
|
|
74
|
-
newResult[${r}] = ${n}.value;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
`)}else f?(o.write(`
|
|
79
|
-
if (${n}.issues.length) {${c(n,r)}
|
|
80
|
-
}
|
|
81
|
-
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
82
|
-
if (${n}.value !== undefined || ${i}) {
|
|
83
|
-
newResult[${r}] = ${n}.value;
|
|
84
|
-
}
|
|
85
|
-
`)):o.write(`
|
|
86
|
-
const ${n}_present = ${i};
|
|
87
|
-
if (${n}.issues.length) {${c(n,r)}
|
|
88
|
-
}
|
|
89
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
90
|
-
payload.issues.push({
|
|
91
|
-
code: "invalid_type",
|
|
92
|
-
expected: "nonoptional",
|
|
93
|
-
input: undefined,
|
|
94
|
-
path: [${r}]
|
|
95
|
-
});
|
|
96
|
-
if (ctx && ctx.abortEarly) {
|
|
97
|
-
payload.value = newResult;
|
|
98
|
-
return payload;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (${n}_present) {
|
|
103
|
-
newResult[${r}] = ${n}.value;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Ov,c=!Ey.jitless,l=c&&kv.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Cx([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Ex(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Yv(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ty(e,r,Dy())))}),t)}var Dx=P(`$ZodUnion`,(e,t)=>{bb.init(e,t),gy(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),gy(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),gy(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),gy(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>pv(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Ex(t,r,e,i)):Ex(o,r,e,i)}});function Ox(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var kx=P(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Dx.init(e,t);let n=e._zod.parse;gy(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||_v(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=vv(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=dv(()=>Ox(t));e._zod.parse=(i,a)=>{let o=i.value;if(!Ov(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Ax=P(`$ZodIntersection`,(e,t)=>{bb.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Mx(e,t,n)):Mx(e,i,a)}});function jx(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Av(e)&&Av(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=jx(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=jx(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Mx(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=jx(t.value,n.value);if(!c.valid){if(Yv(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Nx=P(`$ZodRecord`,(e,t)=>{bb.init(e,t);let n=Ey.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Av(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>ty(e,i,Dy())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Zv(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Zv(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&qy.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>ty(e,i,Dy())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Zv(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Zv(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Px=P(`$ZodEnum`,(e,t)=>{bb.init(e,t);let n=sv(t.entries),r=new Set(n);e._zod.values=r,gy(e,`pattern`,e=>{let t=sv(e.def.entries).filter(e=>Mv.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Nv(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Fx=P(`$ZodLiteral`,(e,t)=>{bb.init(e,t);let n=new Set(t.values);e._zod.values=n,gy(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Nv(e):e?Nv(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Ix=P(`$ZodTransform`,(e,t)=>{bb.init(e,t),e._zod.optin=`optional`,Ey.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ty(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new wy;return n.value=i,n}});function Lx(e,t){return e.value=t.issues.length?void 0:t.value,e}var Rx=P(`$ZodOptional`,(e,t)=>{bb.init(e,t),gy(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,gy(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),gy(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${pv(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Lx(e,t)):Lx(e,r)}return t.innerType._zod.run(e,n)}}),zx=P(`$ZodExactOptional`,(e,t)=>{Rx.init(e,t),gy(e,`values`,e=>e.def.innerType._zod.values),gy(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Bx=P(`$ZodNullable`,(e,t)=>{bb.init(e,t),gy(e,`optin`,e=>e.def.innerType._zod.optin),gy(e,`optout`,e=>e.def.innerType._zod.optout),gy(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${pv(t.source)}|null)$`):void 0}),gy(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Vx=P(`$ZodDefault`,(e,t)=>{bb.init(e,t),e._zod.optin=`defaulted`,gy(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Hx(e,t)):Hx(r,t)}});function Hx(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ux=P(`$ZodPrefault`,(e,t)=>{bb.init(e,t),e._zod.optin=`defaulted`,gy(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Wx=P(`$ZodNonOptional`,(e,t)=>{bb.init(e,t),gy(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Gx(t,e)):Gx(i,e)}});function Gx(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Kx(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>ty(e,r,Dy()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var qx=P(`$ZodCatch`,(e,t)=>{bb.init(e,t),gy(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),gy(e,`optout`,e=>e.def.innerType._zod.optout),gy(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Kx(e,r,t,n)):Kx(e,r,t,n)}}),Jx=P(`$ZodPipe`,(e,t)=>{bb.init(e,t),gy(e,`values`,e=>e.def.in._zod.values),gy(e,`optin`,e=>e.def.in._zod.optin),gy(e,`optout`,e=>e.def.out._zod.optout),gy(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Yx(e,t.in,n)):Yx(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Yx(e,t.out,n)):Yx(r,t.out,n)}});function Yx(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Xx=P(`$ZodReadonly`,(e,t)=>{bb.init(e,t),gy(e,`propValues`,e=>e.def.innerType._zod.propValues),gy(e,`values`,e=>e.def.innerType._zod.values),gy(e,`optin`,e=>e.def.innerType?._zod?.optin),gy(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Zx):Zx(r)}});function Zx(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Qx=P(`$ZodLazy`,(e,t)=>{bb.init(e,t),gv(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),gy(e,`pattern`,e=>e.innerType?._zod?.pattern),gy(e,`propValues`,e=>e.innerType?._zod?.propValues),gy(e,`optin`,e=>e.innerType?._zod?.optin??void 0),gy(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),$x=P(`$ZodCustom`,(e,t)=>{Qy.init(e,t),bb.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>eS(t,n,r,e));eS(i,n,r,e)}});function eS(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(oy(e))}}var tS=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},nS=`~memo`,rS=[];function iS(e){return typeof e==`object`&&!!e}function aS(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var oS=new WeakMap,sS=0,cS=1,lS=2;function uS(e,t,n){let r=oS.get(e);if(r!==void 0)return r?lS:sS;if(t.has(e))return lS;t.add(e);let i=sS,a=e=>{if(i!==lS&&e?._zod){let r=uS(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=sS;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?cS:o.value?._zod?uS(o.value,t,n):sS;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=vv(c);s(e?o(e,!0):cS),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?uS(r,t,!1):cS);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),dS(e,i)}function dS(e,t){return t!==cS&&oS.set(e,t===lS),t}function fS(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var pS,mS=[],hS={alloc(e,t,n){let r=pS;if(!r)return n;pS=void 0;let i={value:n,issues:null};return r.set(t.value,i),mS.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&_S(n,e.value))throw new tS;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=uS(e,new Set,!1);if(i===sS)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===lS||r?n=!0:r=!0}let l=s.value;if(!iS(l))return t(s,c);let u=c[nS];u||(u={buckets:new WeakMap,backEdges:void 0},c[nS]=u);let d;i===c?d=a:(d=fS(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...aS(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;pS=d;let p=mS.length,m=t(s,c);pS=void 0;let h=mS.length>p?mS.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?aS(e.issues):rS),e)):(h&&(h.issues=m.issues.length?aS(m.issues):rS),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function gS(){return hS}function _S(e,t){let n=e[nS]?.backEdges;return n!==void 0&&iS(t)&&n.has(t)}var vS=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(ay(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Iv(e.values[0])}`:`Invalid option: expected one of ${cv(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${cv(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function yS(){return{localeError:vS()}}var bS,xS=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function SS(){return new xS}(bS=globalThis).__zod_globalRegistry??(bS.__zod_globalRegistry=SS());var CS=globalThis.__zod_globalRegistry;function wS(e){return e.checks&&=[...e.checks],e}function TS(e,t){return new e(wS({type:`string`,...Fv(t)}))}function ES(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Fv(t)})}function DS(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Fv(t)})}function OS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Fv(t)})}function kS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Fv(t)})}function AS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Fv(t)})}function jS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Fv(t)})}function MS(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Fv(t)})}function NS(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Fv(t)})}function PS(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Fv(t)})}function FS(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Fv(t)})}function IS(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Fv(t)})}function LS(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Fv(t)})}function RS(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Fv(t)})}function zS(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Fv(t)})}function BS(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Fv(t)})}function VS(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Fv(t)})}function HS(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Fv(t)})}function US(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Fv(t)})}function WS(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Fv(t)})}function GS(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Fv(t)})}function KS(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Fv(t)})}function qS(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Fv(t)})}function JS(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Fv(t)})}function YS(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Fv(t)})}function XS(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Fv(t)})}function ZS(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Fv(t)})}function QS(e,t){return new e(wS({type:`number`,checks:[],...Fv(t)}))}function $S(e,t){return new e(wS({type:`number`,coerce:!0,checks:[],...Fv(t)}))}function eC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Fv(t)})}function tC(e,t){return new e({type:`boolean`,...Fv(t)})}function nC(e,t){return new e({type:`null`,...Fv(t)})}function rC(e){return new e({type:`unknown`})}function iC(e,t){return new e({type:`never`,...Fv(t)})}function aC(e,t){return new tb({check:`less_than`,...Fv(t),value:e,inclusive:!1})}function oC(e,t){return new tb({check:`less_than`,...Fv(t),value:e,inclusive:!0})}function sC(e,t){return new nb({check:`greater_than`,...Fv(t),value:e,inclusive:!1})}function cC(e,t){return new nb({check:`greater_than`,...Fv(t),value:e,inclusive:!0})}function lC(e,t){return new rb({check:`multiple_of`,...Fv(t),value:e})}function uC(e,t){return new ab({check:`max_length`,...Fv(t),maximum:e})}function dC(e,t){return new ob({check:`min_length`,...Fv(t),minimum:e})}function fC(e,t){return new sb({check:`length_equals`,...Fv(t),length:e})}function pC(e,t){return new lb({check:`string_format`,format:`regex`,...Fv(t),pattern:e})}function mC(e){return new ub({check:`string_format`,format:`lowercase`,...Fv(e)})}function hC(e){return new db({check:`string_format`,format:`uppercase`,...Fv(e)})}function gC(e,t){return new fb({check:`string_format`,format:`includes`,...Fv(t),includes:e})}function _C(e,t){return new pb({check:`string_format`,format:`starts_with`,...Fv(t),prefix:e})}function vC(e,t){return new mb({check:`string_format`,format:`ends_with`,...Fv(t),suffix:e})}function yC(e,t){return new gb({check:`properties`,shape:e,...Fv(t)})}function bC(e){return new _b({check:`overwrite`,tx:e})}function xC(e){return bC(t=>t.normalize(e))}function SC(){return bC(e=>e.trim())}function CC(){return bC(e=>e.toLowerCase())}function wC(){return bC(e=>e.toUpperCase())}function TC(){return bC(e=>Ev(e))}function EC(e,t,n){return new e({type:`array`,element:t,...Fv(n)})}function DC(e,t,n){let r=Fv(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function OC(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Fv(n)})}function kC(e,t){let n=AC(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(oy(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(oy(r))}},e(t.value,t)),t);return n}function AC(e,t){let n=new Qy({check:`custom`,...Fv(t)});return n._zod.check=e,n}function jC(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&_v(e,t,n[t]);return e}function MC(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??CS,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function NC(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function PC(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,PC(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&jC(o.schema,c),t.io===`input`&&WC(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function FC(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function IC(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${FC(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+FC(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
107
|
-
|
|
108
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function LC(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;LC(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var RC=new Set([`type`,`properties`,`required`,`additionalProperties`]),zC=[`oneOf`,`anyOf`];function BC(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function VC(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!RC.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??BC(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}_v(n,r,e.length===1?e[0]:VC(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=BC(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function HC(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of RC)if(t in e)return;let n=t.filter(e=>zC.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=VC(t);else{let e=n[0],i=zC.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>VC([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,jC(e,r))}function UC(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):jC(i,s),jC(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())LC(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])HC(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}jC(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,_v(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:KC(t,`input`,e.processors),output:KC(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function WC(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return WC(r.element,n);if(r.type===`set`)return WC(r.valueType,n);if(r.type===`lazy`)return WC(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return WC(r.innerType,n);if(r.type===`intersection`)return WC(r.left,n)||WC(r.right,n);if(r.type===`record`||r.type===`map`)return WC(r.keyType,n)||WC(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:WC(r.in,n)||WC(r.out,n);if(r.type===`object`){for(let e in r.shape)if(WC(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(WC(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(WC(e,n))return!0;return!!(r.rest&&WC(r.rest,n))}return!1}var GC=(e,t={})=>n=>{let r=MC({...n,processors:t});return PC(e,r),IC(r,e),UC(r,e)},KC=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=MC({...i??{},target:a,io:t,processors:n});return PC(e,o),IC(o,e),UC(o,e)},qC=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},JC=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},YC=(e,t)=>{qC(e,`minimum`,t),JC(e,`maximum`,t)},XC=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},ZC=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},QC=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},$C=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},ew=(e,t)=>qC(e,`minimum`,t.minimum),tw=(e,t)=>JC(e,`maximum`,t.maximum),nw=e=>(t,n)=>{$C(t,n.format);let[r,i]=e[n.format];qC(t,`minimum`,r),JC(t,`maximum`,i)},rw={greater_than:(e,t)=>qC(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>JC(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>XC(e,t.value),number_format:nw(Rv),bigint_format:nw(zv),min_length:ew,max_length:tw,length_equals:(e,t)=>YC(e,t.length),min_size:ew,max_size:tw,size_equals:(e,t)=>YC(e,t.size),string_format:(e,t)=>{$C(e,t.format),t.pattern&&ZC(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>QC(e,t.mime)};function iw(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)rw[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&qC(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&qC(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&JC(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&JC(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&XC(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&QC(t,i.mime);for(let e of i.patterns??[])ZC(t,e);return t}var aw={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ow=new Map([[nx,Wee],[ix,Gee]]),sw=e=>ow.get(e)??e,cw=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=iw(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=aw[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(sw);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},lw=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=iw(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):NC(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},uw=(e,t,n,r)=>{n.type=`boolean`},dw=(e,t,n,r)=>{NC(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},fw=(e,t,n,r)=>{NC(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},pw=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},mw=(e,t,n,r)=>{NC(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},hw=(e,t,n,r)=>{NC(e,t,n,r,`Void cannot be represented in JSON Schema`)},gw=(e,t,n,r)=>{n.not={}},_w=(e,t,n,r)=>{},vw=(e,t,n,r)=>{},yw=(e,t,n,r)=>{NC(e,t,n,r,`Date cannot be represented in JSON Schema`)},bw=(e,t,n,r)=>{let i=e._zod.def,a=sv(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},xw=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(NC(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(NC(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Sw=(e,t,n,r)=>{NC(e,t,n,r,`NaN cannot be represented in JSON Schema`)},Cw=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},ww=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=iw(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},Tw=(e,t,n,r)=>{n.type=`boolean`},Ew=(e,t,n,r)=>{NC(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Dw=(e,t,n,r)=>{NC(e,t,n,r,`Function types cannot be represented in JSON Schema`)},Ow=(e,t,n,r)=>{NC(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},kw=(e,t,n,r)=>{NC(e,t,n,r,`Map cannot be represented in JSON Schema`)},Aw=(e,t,n,r)=>{NC(e,t,n,r,`Set cannot be represented in JSON Schema`)},jw=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=iw(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=PC(a.element,t,{...r,path:[...r.path,`items`]})};function Mw(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Mw(t.out):t.type===`catch`?Mw(t.innerType):e._zod.optin}var Nw=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&NC(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)_v(i.properties,e,PC(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Mw(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=PC(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Pw=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>PC(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Fw=(e,t,n,r)=>{let i=e._zod.def,a=PC(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=PC(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Iw=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>PC(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?PC(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?Mw(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=iw(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function Lw(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=Lw(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>Lw(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?qy:Ky).source)),p}var Rw=new WeakMap;function zw(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of Rw.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=Lw(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var Bw=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=iw(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=PC(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)_v(i.patternProperties,sw(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=PC(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Rw.get(t);n||(n=[],Rw.set(t,n),t.deferred.push(()=>zw(t))),n.push(e)}i.additionalProperties=PC(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Mw(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},Vw=(e,t,n,r)=>{let i=e._zod.def,a=PC(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Hw=(e,t,n,r)=>{let i=e._zod.def;PC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Uw=Symbol();function Ww(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(NC(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Uw):JSON.parse(o)}var Gw=(e,t,n,r)=>{let i=e._zod.def;PC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Ww(i.defaultValue,e,t,n,r);o!==Uw&&(n.default=o)},Kw=(e,t,n,r)=>{let i=e._zod.def;PC(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Ww(i.defaultValue,e,t,n,r);o!==Uw&&(n._prefault=o)},qw=(e,t,n,r)=>{let i=e._zod.def;PC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{NC(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Jw=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;PC(o,t,r);let s=t.seen.get(e);s.ref=o},Yw=(e,t,n,r)=>{let i=e._zod.def;PC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Xw=(e,t,n,r)=>{let i=e._zod.def;PC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Zw=(e,t,n,r)=>{let i=e._zod.def;PC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Qw=(e,t,n,r)=>{let i=e._zod.innerType;PC(i,t,r);let a=t.seen.get(e);a.ref=i},$w={string:cw,number:lw,boolean:uw,bigint:dw,symbol:fw,null:pw,undefined:mw,void:hw,never:gw,any:_w,unknown:vw,date:yw,enum:bw,literal:xw,nan:Sw,template_literal:Cw,file:ww,success:Tw,custom:Ew,function:Dw,transform:Ow,map:kw,set:Aw,array:jw,object:Nw,union:Pw,intersection:Fw,tuple:Iw,record:Bw,nullable:Vw,nonoptional:Hw,default:Gw,prefault:Kw,catch:qw,pipe:Jw,readonly:Yw,promise:Xw,optional:Zw,lazy:Qw};function eT(e,t){if(`_idmap`in e){let n=e,r=MC({...t,processors:$w}),i={};for(let e of n._idmap.entries()){let[t,n]=e;PC(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;IC(r,n),_v(a,t,UC(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=MC({...t,processors:$w});return PC(e,n),IC(n,e),UC(n,e)}var tT=new WeakSet([Object.prototype,Error.prototype]);function nT(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var rT=P(`ZodError`,(e,t)=>{dee.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);tT.has(n)||(tT.add(n),nT(n,`format`,e=>t=>mee(e,t)),nT(n,`flatten`,e=>t=>pee(e,t)),nT(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,lv,2)}),nT(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,lv,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),iT=jy(rT),aT=My(rT),oT=Ny(rT),sT=Fy(rT),cT=bee(rT),lT=xee(rT),uT=See(rT),dT=Cee(rT),fT=wee(rT),pT=Tee(rT),mT=Eee(rT),hT=Dee(rT);function gT(){Ey.localeError||Dy(yS())}function _T(){Ey.memoizer||Dy({memoizer:gS()})}var vT=P(`ZodType`,(e,t)=>(gT(),bb.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(wv(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Pv(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Rte(e,t))},superRefine(e,t){return this.check(XT(e,t))},overwrite(e){return this.check(bC(e))},optional(){return WT(this)},exactOptional(){return Cte(this)},nullable(){return KT(this)},nullish(){return WT(KT(this))},nonoptional(e){return kte(this,e)},array(){return I(this)},or(e){return LT([this,e])},and(e){return vte(this,e)},transform(e){return JT(this,Ste(e))},default(e){return Ete(this,e)},prefault(e){return Ote(this,e)},catch(e){return jte(this,e)},pipe(e){return JT(this,e)},readonly(){return Pte(this)},describe(e){let t=this.clone();return CS.add(t,{description:e}),t},meta(...e){if(e.length===0)return CS.get(this);let t=this.clone();return CS.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return ly(this,`~standard`,{...Cb(this),jsonSchema:{input:KC(this,`input`),output:KC(this,`output`)}})},set"~standard"(e){cy(this,`~standard`,e)},parse:function e(t,n){return iT(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await aT(this,t,n,{callee:e})},safeParse(e,t){return oT(this,e,t)},async safeParseAsync(e,t){return sT(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){cy(this,`spa`,e)},validate(e,t){return _ee(this,e,t)},validateAsync(e,t){return yee(this,e,t)},encode:function e(t,n){return cT(this,t,n,{callee:e})},decode:function e(t,n){return lT(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await uT(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await dT(this,t,n,{callee:e})},safeEncode(e,t){return fT(this,e,t)},safeDecode(e,t){return pT(this,e,t)},async safeEncodeAsync(e,t){return mT(this,e,t)},async safeDecodeAsync(e,t){return hT(this,e,t)},toJSONSchema(e){return GC(this,{})(e)},get description(){return CS.get(this)?.description},get _def(){return this._zod.def}}),yT=P(`_ZodString`,(e,t)=>{wb.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cw(e,t,n,r)},uy({format:e=>iw(e).format??null,minLength:e=>iw(e).minimum??null,maxLength:e=>iw(e).maximum??null},{regex(...e){return this.check(pC(...e))},includes(...e){return this.check(gC(...e))},startsWith(...e){return this.check(_C(...e))},endsWith(...e){return this.check(vC(...e))},min(...e){return this.check(dC(...e))},max(...e){return this.check(uC(...e))},length(...e){return this.check(fC(...e))},nonempty(...e){return this.check(dC(1,...e))},lowercase(e){return this.check(mC(e))},uppercase(e){return this.check(hC(e))},trim(){return this.check(SC())},normalize(...e){return this.check(xC(...e))},toLowerCase(){return this.check(CC())},toUpperCase(){return this.check(wC())},slugify(){return this.check(TC())}})),bT=P(`ZodString`,(e,t)=>{wb.init(e,t),yT.init(e,t)},{email(e){return this.check(ES(ET,e))},url(e){return this.check(MS(Kee,e))},jwt(e){return this.check(qS(ste,e))},emoji(e){return this.check(NS(qee,e))},guid(e){return this.check(DS(DT,e))},uuid(e){return this.check(OS(OT,e))},uuidv4(e){return this.check(kS(OT,e))},uuidv6(e){return this.check(AS(OT,e))},uuidv7(e){return this.check(jS(OT,e))},nanoid(e){return this.check(PS(Jee,e))},cuid(e){return this.check(FS(Yee,e))},cuid2(e){return this.check(IS(Xee,e))},ulid(e){return this.check(LS(Zee,e))},base64(e){return this.check(WS(ite,e))},base64url(e){return this.check(GS(ate,e))},xid(e){return this.check(RS(Qee,e))},ksuid(e){return this.check(zS($ee,e))},ipv4(e){return this.check(BS(ete,e))},ipv6(e){return this.check(VS(tte,e))},cidrv4(e){return this.check(HS(nte,e))},cidrv6(e){return this.check(US(rte,e))},e164(e){return this.check(KS(ote,e))},datetime(e){return this.check(JS(ST,e))},date(e){return this.check(YS(CT,e))},time(e){return this.check(XS(wT,e))},duration(e){return this.check(ZS(TT,e))}});function F(e){return TS(bT,e)}var xT=P(`ZodStringFormat`,(e,t)=>{Tb.init(e,t),yT.init(e,t)}),ST=P(`ZodISODateTime`,(e,t)=>{Wb.init(e,t),xT.init(e,t)}),CT=P(`ZodISODate`,(e,t)=>{Gb.init(e,t),xT.init(e,t)}),wT=P(`ZodISOTime`,(e,t)=>{Kb.init(e,t),xT.init(e,t)}),TT=P(`ZodISODuration`,(e,t)=>{qb.init(e,t),xT.init(e,t)}),ET=P(`ZodEmail`,(e,t)=>{Ob.init(e,t),xT.init(e,t)}),DT=P(`ZodGUID`,(e,t)=>{Eb.init(e,t),xT.init(e,t)}),OT=P(`ZodUUID`,(e,t)=>{Db.init(e,t),xT.init(e,t)}),Kee=P(`ZodURL`,(e,t)=>{Ib.init(e,t),xT.init(e,t)}),qee=P(`ZodEmoji`,(e,t)=>{Lb.init(e,t),xT.init(e,t)}),Jee=P(`ZodNanoID`,(e,t)=>{Rb.init(e,t),xT.init(e,t)}),Yee=P(`ZodCUID`,(e,t)=>{zb.init(e,t),xT.init(e,t)}),Xee=P(`ZodCUID2`,(e,t)=>{Bb.init(e,t),xT.init(e,t)}),Zee=P(`ZodULID`,(e,t)=>{Vb.init(e,t),xT.init(e,t)}),Qee=P(`ZodXID`,(e,t)=>{Hb.init(e,t),xT.init(e,t)}),$ee=P(`ZodKSUID`,(e,t)=>{Ub.init(e,t),xT.init(e,t)}),ete=P(`ZodIPv4`,(e,t)=>{Jb.init(e,t),xT.init(e,t)}),tte=P(`ZodIPv6`,(e,t)=>{Zb.init(e,t),xT.init(e,t)}),nte=P(`ZodCIDRv4`,(e,t)=>{Qb.init(e,t),xT.init(e,t)}),rte=P(`ZodCIDRv6`,(e,t)=>{ex.init(e,t),xT.init(e,t)}),ite=P(`ZodBase64`,(e,t)=>{rx.init(e,t),xT.init(e,t)}),ate=P(`ZodBase64URL`,(e,t)=>{ox.init(e,t),xT.init(e,t)}),ote=P(`ZodE164`,(e,t)=>{sx.init(e,t),xT.init(e,t)}),ste=P(`ZodJWT`,(e,t)=>{lx.init(e,t),xT.init(e,t)}),kT=P(`ZodNumber`,(e,t)=>{ux.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lw(e,t,n,r),e.isFinite=!0},uy({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=iw(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=iw(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=iw(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>iw(e).format??null},{gt(e,t){return this.check(sC(e,t))},gte(e,t){return this.check(cC(e,t))},min(e,t){return this.check(cC(e,t))},lt(e,t){return this.check(aC(e,t))},lte(e,t){return this.check(oC(e,t))},max(e,t){return this.check(oC(e,t))},int(e){return this.check(jT(e))},safe(e){return this.check(jT(e))},positive(e){return this.check(sC(0,e))},nonnegative(e){return this.check(cC(0,e))},negative(e){return this.check(aC(0,e))},nonpositive(e){return this.check(oC(0,e))},multipleOf(e,t){return this.check(lC(e,t))},step(e,t){return this.check(lC(e,t))},finite(){return this}}));function AT(e){return QS(kT,e)}var cte=P(`ZodNumberFormat`,(e,t)=>{dx.init(e,t),kT.init(e,t)});function jT(e){return eC(cte,e)}var lte=P(`ZodBoolean`,(e,t)=>{fx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uw(e,t,n,r)});function MT(e){return tC(lte,e)}var ute=P(`ZodNull`,(e,t)=>{px.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pw(e,t,n,r)});function dte(e){return nC(ute,e)}var fte=P(`ZodUnknown`,(e,t)=>{mx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function NT(){return rC(fte)}var pte=P(`ZodNever`,(e,t)=>{hx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gw(e,t,n,r)});function PT(e){return iC(pte,e)}var mte=P(`ZodArray`,(e,t)=>{_T(),yx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jw(e,t,n,r),e.element=t.element},{min(e,t){return this.check(dC(e,t))},nonempty(e){return this.check(dC(1,e))},max(e,t){return this.check(uC(e,t))},length(e,t){return this.check(fC(e,t))},unwrap(){return this.element}});function I(e,t){return EC(mte,e,t)}var FT=P(`ZodObject`,(e,t)=>{_T(),Tx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nw(e,t,n,r),_y(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return VT(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(wv(this._zod.def,{catchall:e}))},passthrough(){return this.clone(wv(this._zod.def,{catchall:NT()}))},loose(){return this.clone(wv(this._zod.def,{catchall:NT()}))},strict(){return this.clone(wv(this._zod.def,{catchall:PT()}))},strip(){return this.clone(wv(this._zod.def,{catchall:void 0}))},extend(e){return Uv(this,e)},safeExtend(e){return Gv(this,e)},merge(e){return Kv(this,e)},pick(e){return Bv(this,e)},omit(e){return Hv(this,e)},partial(...e){return qv(UT,this,e[0])},exactPartial(...e){return qv(GT,this,e[0],`exactPartial`)},required(...e){return Jv(qT,this,e[0])}});function L(e,t){return new FT({type:`object`,shape:e??{},...Fv(t)})}function hte(e,t){return new FT({type:`object`,shape:e,catchall:NT(),...Fv(t)})}var IT=P(`ZodUnion`,(e,t)=>{Dx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pw(e,t,n,r),e.options=t.options});function LT(e,t){return new IT({type:`union`,options:e,...Fv(t)})}var gte=P(`ZodDiscriminatedUnion`,(e,t)=>{IT.init(e,t),kx.init(e,t)});function RT(e,t,n){return new gte({type:`union`,options:t,discriminator:e,...Fv(n)})}var _te=P(`ZodIntersection`,(e,t)=>{Ax.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fw(e,t,n,r)});function vte(e,t){return new _te({type:`intersection`,left:e,right:t})}var zT=P(`ZodRecord`,(e,t)=>{_T(),Nx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bw(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function yte(e,t,n){return!t||!t._zod?new zT({type:`record`,keyType:F(),valueType:e,...Fv(t)}):new zT({type:`record`,keyType:e,valueType:t,...Fv(n)})}var BT=P(`ZodEnum`,(e,t)=>{Px.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bw(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new BT({...t,checks:[],...Fv(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new BT({...t,checks:[],...Fv(r),entries:i})}});function VT(e,t){return new BT({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Fv(t)})}var bte=P(`ZodLiteral`,(e,t)=>{Fx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xw(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function HT(e,t){return new bte({type:`literal`,values:Array.isArray(e)?e:[e],...Fv(t)})}var xte=P(`ZodTransform`,(e,t)=>{_T(),Ix.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ow(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ty(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(oy(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(oy(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ste(e){return new xte({type:`transform`,transform:e})}var UT=P(`ZodOptional`,(e,t)=>{Rx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function WT(e){return new UT({type:`optional`,innerType:e})}var GT=P(`ZodExactOptional`,(e,t)=>{zx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cte(e){return new GT({type:`optional`,innerType:e})}var wte=P(`ZodNullable`,(e,t)=>{Bx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function KT(e){return new wte({type:`nullable`,innerType:e})}var Tte=P(`ZodDefault`,(e,t)=>{Vx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ete(e,t){return new Tte({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():jv(t)}})}var Dte=P(`ZodPrefault`,(e,t)=>{Ux.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ote(e,t){return new Dte({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():jv(t)}})}var qT=P(`ZodNonOptional`,(e,t)=>{Wx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kte(e,t){return new qT({type:`nonoptional`,innerType:e,...Fv(t)})}var Ate=P(`ZodCatch`,(e,t)=>{qx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jte(e,t){return new Ate({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:yy(t)})}var Mte=P(`ZodPipe`,(e,t)=>{Jx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jw(e,t,n,r),e.in=t.in,e.out=t.out});function JT(e,t){return new Mte({type:`pipe`,in:e,out:t})}var Nte=P(`ZodReadonly`,(e,t)=>{Xx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Pte(e){return new Nte({type:`readonly`,innerType:e})}var Fte=P(`ZodLazy`,(e,t)=>{Qx.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qw(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Ite(e){return new Fte({type:`lazy`,getter:e})}var YT=P(`ZodCustom`,(e,t)=>{$x.init(e,t),vT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ew(e,t,n,r)});function Lte(e,t){return DC(YT,e??(()=>!0),t)}function Rte(e,t={}){return OC(YT,e,t)}function XT(e,t){return kC(e,t)}var ZT=P(`ZodInstanceOf`,(e,t)=>{YT.init(e,t)},{properties(e,t){return this.check(yC(e,t))}});function QT(e,t={}){let n=new ZT({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...Fv(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function $T(e){return $S(kT,e)}var eE=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},tE=10,nE=13,rE=32;function iE(e){}function aE(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:t=iE,onError:n=iE,onRetry:r=iE,onComment:i,maxBufferSize:a}=e,o=[],s=0,c=!0,l,u=``,d=0,f,p=!1;function m(e){if(p)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(c&&(c=!1,e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),o.length===0){let t=g(e);t!==``&&(o.push(t),s=t.length),h();return}if(e.indexOf(`
|
|
109
|
-
`)===-1&&e.indexOf(`\r`)===-1){o.push(e),s+=e.length,h();return}o.push(e);let t=o.join(``);o.length=0,s=0;let n=g(t);n!==``&&(o.push(n),s=n.length),h()}function h(){a!==void 0&&(s+u.length<=a||(p=!0,o.length=0,s=0,l=void 0,u=``,d=0,f=void 0,n(new eE(`Buffered data exceeded max buffer size of ${a} characters`,{type:`max-buffer-size-exceeded`}))))}function g(e){let n=0;if(e.indexOf(`\r`)===-1){let r=e.indexOf(`
|
|
110
|
-
`,n);for(;r!==-1;){if(n===r){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0,n=r+1,r=e.indexOf(`
|
|
111
|
-
`,n);continue}let i=e.charCodeAt(n);if(oE(e,n,i)){let i=e.charCodeAt(n+5)===rE?n+6:n+5,a=e.slice(i,r);if(d===0&&e.charCodeAt(r+1)===tE){t({id:l,event:f,data:a}),l=void 0,u=``,f=void 0,n=r+2,r=e.indexOf(`
|
|
112
|
-
`,n);continue}u=d===0?a:`${u}
|
|
113
|
-
${a}`,d++}else sE(e,n,i)?f=e.slice(e.charCodeAt(n+6)===rE?n+7:n+6,r)||void 0:_(e,n,r);n=r+1,r=e.indexOf(`
|
|
114
|
-
`,n)}return e.slice(n)}for(;n<e.length;){let t=e.indexOf(`\r`,n),r=e.indexOf(`
|
|
115
|
-
`,n),i=-1;if(t!==-1&&r!==-1?i=t<r?t:r:t===-1?r!==-1&&(i=r):i=t===e.length-1?-1:t,i===-1)break;_(e,n,i),n=i+1,e.charCodeAt(n-1)===nE&&e.charCodeAt(n)===tE&&n++}return e.slice(n)}function _(e,t,n){if(t===n){y();return}let r=e.charCodeAt(t);if(oE(e,t,r)){let r=e.charCodeAt(t+5)===rE?t+6:t+5,i=e.slice(r,n);u=d===0?i:`${u}
|
|
116
|
-
${i}`,d++;return}if(sE(e,t,r)){f=e.slice(e.charCodeAt(t+6)===rE?t+7:t+6,n)||void 0;return}if(r===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let r=e.slice(e.charCodeAt(t+3)===rE?t+4:t+3,n);r.includes(`\0`)||(l=r);return}if(r===58){if(i){let r=e.slice(t,n);i(r.slice(e.charCodeAt(t+1)===rE?2:1))}return}let a=e.slice(t,n),o=a.indexOf(`:`);if(o===-1){v(a,``,a);return}let s=a.slice(0,o),c=a.charCodeAt(o+1)===rE?2:1;v(s,a.slice(o+c),a)}function v(e,t,i){switch(e){case`event`:f=t||void 0;break;case`data`:u=d===0?t:`${u}
|
|
117
|
-
${t}`,d++;break;case`id`:t.includes(`\0`)||(l=t);break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new eE(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new eE(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}))}}function y(){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0}function b(e={}){if(e.consume&&o.length>0){let e=o.join(``);_(e,0,e.length)}c=!0,l=void 0,u=``,d=0,f=void 0,o.length=0,s=0,p=!1}return{feed:m,reset:b}}function oE(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function sE(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}var cE=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n,maxBufferSize:r}={}){let i;super({start(a){i=aE({onEvent:e=>{a.enqueue(e)},onError(t){typeof e==`function`&&e(t),(e===`terminate`||t.type===`max-buffer-size-exceeded`)&&a.error(t)},onRetry:t,onComment:n,maxBufferSize:r})},transform(e){i.feed(e)}})}};new TextDecoder;var{btoa:zte,atob:Bte}=globalThis;function lE(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((e,n)=>{t[n.toLowerCase()]=e});else{Array.isArray(e)||(e=Object.entries(e));for(let[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}var uE=({prefix:e,size:t=16,alphabet:n=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,separator:r=`-`}={})=>{let i=()=>{let e=n.length,r=Array(t);for(let i=0;i<t;i++)r[i]=n[Math.random()*e|0];return r.join(``)};if(e==null)return i;if(n.includes(r))throw new J_({argument:`separator`,message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${i()}`},dE=uE();function fE(e){return globalThis.Buffer?.isBuffer(e)??!1}var pE=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,mE=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function hE(e){let t=JSON.parse(e);return typeof t!=`object`||!t||pE.test(e)===!1&&mE.test(e)===!1?t:gE(t)}function gE(e){let t=[e];for(;t.length;){let e=t;t=[];for(let n of e){if(Object.prototype.hasOwnProperty.call(n,`__proto__`)||Object.prototype.hasOwnProperty.call(n,`constructor`)&&n.constructor!==null&&typeof n.constructor==`object`&&Object.prototype.hasOwnProperty.call(n.constructor,`prototype`))throw SyntaxError(`Object contains forbidden prototype property`);for(let e in n){let r=n[e];r&&typeof r==`object`&&t.push(r)}}}return e}function _E(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return hE(e)}try{return hE(e)}finally{Error.stackTraceLimit=t}}function vE(e){if(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)){let{additionalProperties:t}=e;e.additionalProperties=t!=null&&typeof t!=`boolean`&&yE(t);let{properties:n}=e;if(n!=null)for(let e of Object.keys(n))n[e]=yE(n[e])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(yE):yE(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(yE)),e.allOf!=null&&(e.allOf=e.allOf.map(yE)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(yE));let{definitions:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=yE(t[e]);return e}function yE(e){return typeof e==`boolean`?e:vE(e)}var bE=Symbol(`Let zodToJsonSchema decide on which parser to use`),xE={name:void 0,$refStrategy:`root`,basePath:[`#`],effectStrategy:`input`,pipeStrategy:`all`,dateStrategy:`format:date-time`,mapStrategy:`entries`,removeAdditionalStrategy:`passthrough`,allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:`definitions`,strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:`escape`,applyRegexFlags:!1,emailStrategy:`format:email`,base64Strategy:`contentEncoding:base64`,nameStrategy:`ref`},SE=e=>typeof e==`string`?{...xE,name:e}:{...xE,...e};function CE(){return{}}function wE(e,t){let n={type:`array`};return e.type?._def&&e.type?._def?.typeName!==`ZodAny`&&(n.items=oD(e.type._def,{...t,currentPath:[...t.currentPath,`items`]})),e.minLength&&(n.minItems=e.minLength.value),e.maxLength&&(n.maxItems=e.maxLength.value),e.exactLength&&(n.minItems=e.exactLength.value,n.maxItems=e.exactLength.value),n}function TE(e){let t={type:`integer`,format:`int64`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value}return t}function EE(){return{type:`boolean`}}function DE(e,t){return oD(e.type._def,t)}var OE=(e,t)=>oD(e.innerType._def,t);function kE(e,t,n){let r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(n=>kE(e,t,n))};switch(r){case`string`:case`format:date-time`:return{type:`string`,format:`date-time`};case`format:date`:return{type:`string`,format:`date`};case`integer`:return AE(e)}}var AE=e=>{let t={type:`integer`,format:`unix-time`};for(let n of e.checks)switch(n.kind){case`min`:t.minimum=n.value;break;case`max`:t.maximum=n.value}return t};function jE(e,t){return{...oD(e.innerType._def,t),default:e.defaultValue()}}function ME(e,t){return t.effectStrategy===`input`?oD(e.schema._def,t):CE()}function NE(e){return{type:`string`,enum:Array.from(e.values)}}var PE=e=>`type`in e&&e.type===`string`?!1:`allOf`in e;function FE(e,t){let n=[oD(e.left._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),oD(e.right._def,{...t,currentPath:[...t.currentPath,`allOf`,`1`]})].filter(e=>!!e),r=[];return n.forEach(e=>{if(PE(e))r.push(...e.allOf);else{let t=e;if(`additionalProperties`in e&&e.additionalProperties===!1){let{additionalProperties:n,...r}=e;t=r}r.push(t)}}),r.length?{allOf:r}:void 0}function IE(e){let t=typeof e.value;return t!==`bigint`&&t!==`number`&&t!==`boolean`&&t!==`string`?{type:Array.isArray(e.value)?`array`:`object`}:{type:t===`bigint`?`integer`:t,const:e.value}}var LE=void 0,RE={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(LE===void 0&&(LE=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)),LE),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,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([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function zE(e,t){let n={type:`string`};if(e.checks)for(let r of e.checks)switch(r.kind){case`min`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value;break;case`max`:n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`email`:switch(t.emailStrategy){case`format:email`:UE(n,`email`,r.message,t);break;case`format:idn-email`:UE(n,`idn-email`,r.message,t);break;case`pattern:zod`:WE(n,RE.email,r.message,t)}break;case`url`:UE(n,`uri`,r.message,t);break;case`uuid`:UE(n,`uuid`,r.message,t);break;case`regex`:WE(n,r.regex,r.message,t);break;case`cuid`:WE(n,RE.cuid,r.message,t);break;case`cuid2`:WE(n,RE.cuid2,r.message,t);break;case`startsWith`:WE(n,RegExp(`^${BE(r.value,t)}`),r.message,t);break;case`endsWith`:WE(n,RegExp(`${BE(r.value,t)}$`),r.message,t);break;case`datetime`:UE(n,`date-time`,r.message,t);break;case`date`:UE(n,`date`,r.message,t);break;case`time`:UE(n,`time`,r.message,t);break;case`duration`:UE(n,`duration`,r.message,t);break;case`length`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`includes`:WE(n,RegExp(BE(r.value,t)),r.message,t);break;case`ip`:r.version!==`v6`&&UE(n,`ipv4`,r.message,t),r.version!==`v4`&&UE(n,`ipv6`,r.message,t);break;case`base64url`:WE(n,RE.base64url,r.message,t);break;case`jwt`:WE(n,RE.jwt,r.message,t);break;case`cidr`:r.version!==`v6`&&WE(n,RE.ipv4Cidr,r.message,t),r.version!==`v4`&&WE(n,RE.ipv6Cidr,r.message,t);break;case`emoji`:WE(n,RE.emoji(),r.message,t);break;case`ulid`:WE(n,RE.ulid,r.message,t);break;case`base64`:switch(t.base64Strategy){case`format:binary`:UE(n,`binary`,r.message,t);break;case`contentEncoding:base64`:n.contentEncoding=`base64`;break;case`pattern:zod`:WE(n,RE.base64,r.message,t)}break;case`nanoid`:WE(n,RE.nanoid,r.message,t)}return n}function BE(e,t){return t.patternStrategy===`escape`?HE(e):e}var VE=new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`);function HE(e){let t=``;for(let n=0;n<e.length;n++)VE.has(e[n])||(t+=`\\`),t+=e[n];return t}function UE(e,t,n,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||=[],e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function WE(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||=[],e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:GE(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=GE(t,r)}function GE(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes(`i`),m:e.flags.includes(`m`),s:e.flags.includes(`s`)},r=n.i?e.source.toLowerCase():e.source,i=``,a=!1,o=!1,s=!1;for(let e=0;e<r.length;e++)if(a)i+=r[e],a=!1;else{if(n.i){if(o){if(r[e].match(/[a-z]/)){s?(i+=r[e],i+=`${r[e-2]}-${r[e]}`.toUpperCase(),s=!1):r[e+1]===`-`&&r[e+2]?.match(/[a-z]/)?(i+=r[e],s=!0):i+=`${r[e]}${r[e].toUpperCase()}`;continue}}else if(r[e].match(/[a-z]/)){i+=`[${r[e]}${r[e].toUpperCase()}]`;continue}}if(n.m){if(r[e]===`^`){i+=`(^|(?<=[\r
|
|
118
|
-
]))`;continue}if(r[e]===`$`){i+=`($|(?=[\r
|
|
119
|
-
]))`;continue}}n.s&&r[e]===`.`?i+=o?`${r[e]}\r\n`:`[${r[e]}\r\n]`:(i+=r[e],r[e]===`\\`?a=!0:o&&r[e]===`]`?o=!1:!o&&r[e]===`[`&&(o=!0))}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join(`/`)} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function KE(e,t){let n={type:`object`,additionalProperties:oD(e.valueType._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]})??t.allowedAdditionalProperties};if(e.keyType?._def.typeName===`ZodString`&&e.keyType._def.checks?.length){let{type:r,...i}=zE(e.keyType._def,t);return{...n,propertyNames:i}}if(e.keyType?._def.typeName===`ZodEnum`)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===`ZodBranded`&&e.keyType._def.type._def.typeName===`ZodString`&&e.keyType._def.type._def.checks?.length){let{type:r,...i}=DE(e.keyType._def,t);return{...n,propertyNames:i}}return n}function qE(e,t){return t.mapStrategy===`record`?KE(e,t):{type:`array`,maxItems:125,items:{type:`array`,items:[oD(e.keyType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`0`]})||CE(),oD(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`1`]})||CE()],minItems:2,maxItems:2}}}function JE(e){let t=e.values,n=Object.keys(e.values).filter(e=>typeof t[t[e]]!=`number`).map(e=>t[e]),r=Array.from(new Set(n.map(e=>typeof e)));return{type:r.length===1?r[0]===`string`?`string`:`number`:[`string`,`number`],enum:n}}function YE(){return{not:CE()}}function XE(){return{type:`null`}}var ZE={ZodString:`string`,ZodNumber:`number`,ZodBigInt:`integer`,ZodBoolean:`boolean`,ZodNull:`null`};function QE(e,t){let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in ZE&&(!e._def.checks||!e._def.checks.length))){let e=n.reduce((e,t)=>{let n=ZE[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}if(n.every(e=>e._def.typeName===`ZodLiteral`&&!e.description)){let e=n.reduce((e,t)=>{let n=typeof t._def.value;switch(n){case`string`:case`number`:case`boolean`:return[...e,n];case`bigint`:return[...e,`integer`];case`object`:if(t._def.value===null)return[...e,`null`];default:return e}},[]);if(e.length===n.length){let t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>e._def.typeName===`ZodEnum`))return{type:`string`,enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return $E(e,t)}var $E=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>oD(e._def,{...t,currentPath:[...t.currentPath,`anyOf`,`${n}`]})).filter(e=>!!e&&(!t.strictUnions||typeof e==`object`&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function eD(e,t){if([`ZodString`,`ZodNumber`,`ZodBigInt`,`ZodBoolean`,`ZodNull`].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[ZE[e.innerType._def.typeName],`null`]};let n=oD(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`0`]});return n&&{anyOf:[n,{type:`null`}]}}function tD(e){let t={type:`number`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`int`:t.type=`integer`;break;case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value}return t}function nD(e,t){let n={type:`object`,properties:{}},r=[],i=e.shape();for(let e in i){let a=i[e];if(a===void 0||a._def===void 0)continue;let o=Vte(a),s=oD(a._def,{...t,currentPath:[...t.currentPath,`properties`,e],propertyPath:[...t.currentPath,`properties`,e]});s!==void 0&&(n.properties[e]=s,o||r.push(e))}r.length&&(n.required=r);let a=rD(e,t);return a!==void 0&&(n.additionalProperties=a),n}function rD(e,t){if(e.catchall._def.typeName!==`ZodNever`)return oD(e.catchall._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]});switch(e.unknownKeys){case`passthrough`:return t.allowedAdditionalProperties;case`strict`:return t.rejectedAdditionalProperties;case`strip`:return t.removeAdditionalStrategy===`strict`?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function Vte(e){try{return e.isOptional()}catch{return!0}}var Hte=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return oD(e.innerType._def,t);let n=oD(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`1`]});return n?{anyOf:[{not:CE()},n]}:CE()},Ute=(e,t)=>{if(t.pipeStrategy===`input`)return oD(e.in._def,t);if(t.pipeStrategy===`output`)return oD(e.out._def,t);let n=oD(e.in._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]});return{allOf:[n,oD(e.out._def,{...t,currentPath:[...t.currentPath,`allOf`,n?`1`:`0`]})].filter(e=>e!==void 0)}};function Wte(e,t){return oD(e.type._def,t)}function Gte(e,t){let n={type:`array`,uniqueItems:!0,items:oD(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function Kte(e,t){return e.rest?{type:`array`,minItems:e.items.length,items:e.items.map((e,n)=>oD(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[]),additionalItems:oD(e.rest._def,{...t,currentPath:[...t.currentPath,`additionalItems`]})}:{type:`array`,minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>oD(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[])}}function qte(){return{not:CE()}}function Jte(){return CE()}var Yte=(e,t)=>oD(e.innerType._def,t),iD=(e,t,n)=>{switch(t){case`ZodString`:return zE(e,n);case`ZodNumber`:return tD(e);case`ZodObject`:return nD(e,n);case`ZodBigInt`:return TE(e);case`ZodBoolean`:return EE();case`ZodDate`:return kE(e,n);case`ZodUndefined`:return qte();case`ZodNull`:return XE();case`ZodArray`:return wE(e,n);case`ZodUnion`:case`ZodDiscriminatedUnion`:return QE(e,n);case`ZodIntersection`:return FE(e,n);case`ZodTuple`:return Kte(e,n);case`ZodRecord`:return KE(e,n);case`ZodLiteral`:return IE(e);case`ZodEnum`:return NE(e);case`ZodNativeEnum`:return JE(e);case`ZodNullable`:return eD(e,n);case`ZodOptional`:return Hte(e,n);case`ZodMap`:return qE(e,n);case`ZodSet`:return Gte(e,n);case`ZodLazy`:return()=>e.getter()._def;case`ZodPromise`:return Wte(e,n);case`ZodNaN`:case`ZodNever`:return YE();case`ZodEffects`:return ME(e,n);case`ZodAny`:return CE();case`ZodUnknown`:return Jte();case`ZodDefault`:return jE(e,n);case`ZodBranded`:return DE(e,n);case`ZodReadonly`:return Yte(e,n);case`ZodCatch`:return OE(e,n);case`ZodPipeline`:return Ute(e,n);case`ZodFunction`:case`ZodVoid`:case`ZodSymbol`:return;default:return(e=>void 0)(t)}},aD=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join(`/`)};function oD(e,t,n=!1){let r=t.seen.get(e);if(t.override){let i=t.override?.(e,t,r,n);if(i!==bE)return i}if(r&&!n){let e=sD(r,t);if(e!==void 0)return e}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let a=iD(e,e.typeName,t),o=typeof a==`function`?oD(a(),t):a;if(o&&cD(e,t,o),t.postProcess){let n=t.postProcess(o,e,t);return i.jsonSchema=o,n}return i.jsonSchema=o,o}var sD=(e,t)=>{switch(t.$refStrategy){case`root`:return{$ref:e.path.join(`/`)};case`relative`:return{$ref:aD(t.currentPath,e.path)};case`none`:case`seen`:return e.path.length<t.currentPath.length&&e.path.every((e,n)=>t.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join(`/`)}! Defaulting to any`),CE()):t.$refStrategy===`seen`?CE():void 0}},cD=(e,t,n)=>(e.description&&(n.description=e.description),n),lD=e=>{let t=SE(e),n=t.name===void 0?t.basePath:[...t.basePath,t.definitionPath,t.name];return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}},uD=(e,t)=>{let n=lD(t),r=typeof t==`object`&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:oD(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??CE()}),{}):void 0,i=typeof t==`string`?t:t?.nameStrategy===`title`?void 0:t?.name,a=oD(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1)??CE(),o=typeof t==`object`&&t.name!==void 0&&t.nameStrategy===`title`?t.name:void 0;o!==void 0&&(a.title=o);let s=i===void 0?r?{...a,[n.definitionPath]:r}:a:{$ref:[...n.$refStrategy===`relative`?[]:n.basePath,n.definitionPath,i].join(`/`),[n.definitionPath]:{...r,[i]:a}};return s.$schema=`http://json-schema.org/draft-07/schema#`,s},dD=Symbol.for(`vercel.ai.schema`);function fD(e){let t;return()=>(t??=e(),t)}function pD(e,{validate:t}={}){return{[dD]:!0,_type:void 0,get jsonSchema(){return typeof e==`function`&&(e=e()),e},validate:t}}function mD(e){return typeof e==`object`&&!!e&&dD in e&&e[dD]===!0&&`jsonSchema`in e&&`validate`in e}function hD(e){return e==null?pD({type:`object`,properties:{},additionalProperties:!1}):mD(e)?e:`~standard`in e?e[`~standard`].vendor===`zod`?xD(e):gD(e):e()}function gD(e){return pD(()=>{if(!_D(e))throw Error(`Standard schema vendor '${e[`~standard`].vendor}' does not support JSON Schema conversion.`);return vE(e[`~standard`].jsonSchema.input({target:`draft-07`}))},{validate:async t=>{let n=await e[`~standard`].validate(t);return`value`in n?{success:!0,value:n.value}:{success:!1,error:new nv({value:t,cause:n.issues})}}})}function _D(e){return e[`~standard`].jsonSchema!=null}function vD(e,t){let n=t?.useReferences??!1;return pD(()=>uD(e,{$refStrategy:n?`root`:`none`}),{validate:async t=>{let n=await e.safeParseAsync(t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function yD(e,t){let n=t?.useReferences??!1;return pD(()=>vE(eT(e,{target:`draft-7`,io:`input`,reused:n?`ref`:`inline`})),{validate:async t=>{let n=await sT(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function bD(e){return`_zod`in e}function xD(e,t){return bD(e)?yD(e,t):vD(e,t)}async function SD({value:e,schema:t,context:n}){let r=await CD({value:e,schema:t,context:n});if(!r.success)throw nv.wrap({value:e,cause:r.error,context:n});return r.value}async function CD({value:e,schema:t,context:n}){let r=hD(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};let t=await r.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:nv.wrap({value:e,cause:t.error,context:n}),rawValue:e}}catch(t){return{success:!1,error:nv.wrap({value:e,cause:t,context:n}),rawValue:e}}}async function wD({text:e,schema:t}){try{let n=_E(e);return t==null?{success:!0,value:n,rawValue:n}:await CD({value:n,schema:t})}catch(t){return{success:!1,error:Q_.isInstance(t)?t:new Q_({text:e,cause:t}),rawValue:void 0}}}function TD({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new cE).pipeThrough(new TransformStream({async transform({data:e},n){e!==`[DONE]`&&n.enqueue(await wD({text:e,schema:t}))}}))}async function ED(e){return typeof e==`function`&&(e=e()),e}new TextDecoder;var DD=`AI_InvalidArgumentError`,OD=`vercel.ai.error.${DD}`,kD=Symbol.for(OD),AD=class extends R_{constructor({parameter:e,value:t,message:n}){super({name:DD,message:`Invalid argument for parameter ${e}: ${n}`}),this[kD]=!0,this.parameter=e,this.value=t}static isInstance(e){return R_.hasMarker(e,OD)}},jD=`AI_UIMessageStreamError`,MD=`vercel.ai.error.${jD}`,ND=Symbol.for(MD),PD=class extends R_{constructor({chunkType:e,chunkId:t,message:n}){super({name:jD,message:n}),this[ND]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return R_.hasMarker(e,MD)}};function FD(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let n={...e};for(let r in t)if(r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&Object.prototype.hasOwnProperty.call(t,r)){let i=t[r];if(i===void 0)continue;let a=r in e?e[r]:void 0,o=typeof i==`object`&&!!i&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),s=typeof a==`object`&&!!a&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);n[r]=o&&s?FD(a,i):i}return n}function ID(e){let t=[`ROOT`],n=-1,r=null,i=0;function a(e){return e>=`0`&&e<=`9`||e>=`A`&&e<=`F`||e>=`a`&&e<=`f`}function o(e,i,a){switch(e){case`"`:n=i,t.pop(),t.push(a),t.push(`INSIDE_STRING`);break;case`f`:case`t`:case`n`:n=i,r=i,t.pop(),t.push(a),t.push(`INSIDE_LITERAL`);break;case`-`:t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=i,t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`{`:n=i,t.pop(),t.push(a),t.push(`INSIDE_OBJECT_START`);break;case`[`:n=i,t.pop(),t.push(a),t.push(`INSIDE_ARRAY_START`)}}function s(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_COMMA`);break;case`}`:n=r,t.pop()}}function c(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=r,t.pop()}}for(let l=0;l<e.length;l++){let u=e[l];switch(t[t.length-1]){case`ROOT`:o(u,l,`FINISH`);break;case`INSIDE_OBJECT_START`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break;case`}`:n=l,t.pop()}break;case`INSIDE_OBJECT_AFTER_COMMA`:u===`"`&&(t.pop(),t.push(`INSIDE_OBJECT_KEY`));break;case`INSIDE_OBJECT_KEY`:u===`"`&&(t.pop(),t.push(`INSIDE_OBJECT_AFTER_KEY`));break;case`INSIDE_OBJECT_AFTER_KEY`:u===`:`&&(t.pop(),t.push(`INSIDE_OBJECT_BEFORE_VALUE`));break;case`INSIDE_OBJECT_BEFORE_VALUE`:o(u,l,`INSIDE_OBJECT_AFTER_VALUE`);break;case`INSIDE_OBJECT_AFTER_VALUE`:s(u,l);break;case`INSIDE_STRING`:switch(u){case`"`:t.pop(),n=l;break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`);break;default:n=l}break;case`INSIDE_ARRAY_START`:switch(u){case`]`:n=l,t.pop();break;default:n=l,o(u,l,`INSIDE_ARRAY_AFTER_VALUE`)}break;case`INSIDE_ARRAY_AFTER_VALUE`:switch(u){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=l,t.pop();break;default:n=l}break;case`INSIDE_ARRAY_AFTER_COMMA`:o(u,l,`INSIDE_ARRAY_AFTER_VALUE`);break;case`INSIDE_STRING_ESCAPE`:t.pop(),u===`u`?(i=0,t.push(`INSIDE_STRING_UNICODE_ESCAPE`)):n=l;break;case`INSIDE_STRING_UNICODE_ESCAPE`:a(u)&&(i++,i===4&&(t.pop(),n=l));break;case`INSIDE_NUMBER`:switch(u){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=l;break;case`e`:case`E`:case`-`:case`.`:break;case`,`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&s(u,l);break;case`}`:t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&s(u,l);break;case`]`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l);break;default:t.pop()}break;case`INSIDE_LITERAL`:{let i=e.substring(r,l+1);!`false`.startsWith(i)&&!`true`.startsWith(i)&&!`null`.startsWith(i)?(t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`?s(u,l):t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&c(u,l)):n=l;break}}}let l=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case`INSIDE_STRING`:l+=`"`;break;case`INSIDE_OBJECT_KEY`:case`INSIDE_OBJECT_AFTER_KEY`:case`INSIDE_OBJECT_AFTER_COMMA`:case`INSIDE_OBJECT_START`:case`INSIDE_OBJECT_BEFORE_VALUE`:case`INSIDE_OBJECT_AFTER_VALUE`:l+=`}`;break;case`INSIDE_ARRAY_START`:case`INSIDE_ARRAY_AFTER_COMMA`:case`INSIDE_ARRAY_AFTER_VALUE`:l+=`]`;break;case`INSIDE_LITERAL`:{let t=e.substring(r,e.length);`true`.startsWith(t)?l+=`true`.slice(t.length):`false`.startsWith(t)?l+=`false`.slice(t.length):`null`.startsWith(t)&&(l+=`null`.slice(t.length))}}return l}async function LD(e){if(e===void 0)return{value:void 0,state:`undefined-input`};let t=await wD({text:e});return t.success?{value:t.value,state:`successful-parse`}:(t=await wD({text:ID(e)}),t.success?{value:t.value,state:`repaired-parse`}:{value:void 0,state:`failed-parse`})}uE({prefix:`steer`,size:24}),new TextEncoder,new TextEncoder,uE({prefix:`aitxt`,size:24}),uE({prefix:`call`,size:24}),TransformStream;var R={array:I,boolean:MT,custom:Lte,discriminatedUnion:RT,enum:VT,instanceof:QT,lazy:Ite,literal:HT,looseObject:hte,never:PT,null:dte,number:AT,object:L,record:yte,string:F,union:LT,unknown:NT},RD=R.lazy(()=>R.union([R.null(),R.string(),R.number(),R.boolean(),R.record(R.string(),RD.optional()),R.array(RD)])),zD=R.record(R.string(),R.record(R.string(),RD.optional())),BD=R.object({source:R.discriminatedUnion(`sourceType`,[R.object({type:R.literal(`source`),sourceType:R.literal(`url`),id:R.string(),url:R.string(),title:R.string().optional(),providerMetadata:zD.optional()}),R.object({type:R.literal(`source`),sourceType:R.literal(`document`),id:R.string(),mediaType:R.string(),title:R.string(),filename:R.string().optional(),providerMetadata:zD.optional()})]),startIndex:R.number().int().nonnegative().optional(),endIndex:R.number().int().nonnegative().optional(),citedText:R.string().optional()}),VD=R.record(R.string(),RD.optional()),HD=fD(()=>xD(R.union([R.looseObject({type:R.literal(`text-start`),id:R.string(),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`text-delta`),id:R.string(),delta:R.string(),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`text-end`),id:R.string(),citations:R.array(BD).optional(),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`error`),errorText:R.string()}),R.looseObject({type:R.literal(`tool-input-start`),toolCallId:R.string(),toolName:R.string(),inputEncoding:R.enum([`json`,`text`]).optional(),providerExecuted:R.boolean().optional(),providerMetadata:zD.optional(),toolMetadata:VD.optional(),dynamic:R.boolean().optional(),title:R.string().optional()}),R.looseObject({type:R.literal(`tool-input-delta`),toolCallId:R.string(),inputTextDelta:R.string()}),R.looseObject({type:R.literal(`tool-input-available`),toolCallId:R.string(),toolName:R.string(),input:R.unknown(),providerExecuted:R.boolean().optional(),providerMetadata:zD.optional(),toolMetadata:VD.optional(),dynamic:R.boolean().optional(),title:R.string().optional()}),R.looseObject({type:R.literal(`tool-input-error`),toolCallId:R.string(),toolName:R.string(),input:R.unknown(),providerExecuted:R.boolean().optional(),providerMetadata:zD.optional(),toolMetadata:VD.optional(),dynamic:R.boolean().optional(),errorText:R.string(),title:R.string().optional()}),R.looseObject({type:R.literal(`tool-approval-request`),approvalId:R.string(),toolCallId:R.string(),approvalDescriptor:R.unknown().optional(),inputSchemaInput:R.unknown().optional(),reason:R.string().optional(),isAutomatic:R.boolean().optional(),signature:R.string().optional()}),R.looseObject({type:R.literal(`tool-approval-response`),approvalId:R.string(),approved:R.boolean(),reason:R.string().optional(),providerExecuted:R.boolean().optional(),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`tool-output-available`),toolCallId:R.string(),output:R.unknown(),providerExecuted:R.boolean().optional(),providerMetadata:zD.optional(),toolMetadata:VD.optional(),dynamic:R.boolean().optional(),preliminary:R.boolean().optional()}),R.looseObject({type:R.literal(`tool-output-error`),toolCallId:R.string(),errorText:R.string(),providerExecuted:R.boolean().optional(),providerMetadata:zD.optional(),toolMetadata:VD.optional(),dynamic:R.boolean().optional()}),R.looseObject({type:R.literal(`tool-output-denied`),toolCallId:R.string()}),R.looseObject({type:R.literal(`reasoning-start`),id:R.string(),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`reasoning-delta`),id:R.string(),delta:R.string(),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`reasoning-end`),id:R.string(),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`custom`),kind:R.string().transform(e=>e),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`source-url`),sourceId:R.string(),url:R.string(),title:R.string().optional(),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`source-document`),sourceId:R.string(),mediaType:R.string(),title:R.string(),filename:R.string().optional(),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`file`),url:R.string(),mediaType:R.string(),providerMetadata:zD.optional()}),R.looseObject({type:R.literal(`reasoning-file`),url:R.string(),mediaType:R.string(),providerMetadata:zD.optional()}),R.looseObject({type:R.custom(e=>typeof e==`string`&&e.startsWith(`data-`),{message:`Type must start with "data-"`}),id:R.string().optional(),data:R.unknown(),transient:R.boolean().optional()}),R.looseObject({type:R.literal(`start-step`)}),R.looseObject({type:R.literal(`finish-step`)}),R.looseObject({type:R.literal(`reset-step`)}),R.looseObject({type:R.literal(`start`),messageId:R.string().optional(),messageMetadata:R.unknown().optional()}),R.looseObject({type:R.literal(`finish`),finishReason:R.enum([`stop`,`length`,`content-filter`,`tool-calls`,`error`,`interrupted`,`other`]).optional(),messageMetadata:R.unknown().optional()}),R.looseObject({type:R.literal(`abort`),reason:R.string().optional()}),R.looseObject({type:R.literal(`message-metadata`),messageMetadata:R.unknown()})])));function UD(e){return e.type.startsWith(`data-`)}function WD(){return Object.create(null)}function GD(e){return e.type.startsWith(`tool-`)}function KD(e){return e.type===`dynamic-tool`}function qD(e){return GD(e)||KD(e)}function JD(e){return e.type.split(`-`).slice(1).join(`-`)}function YD({lastMessage:e,messageId:t}){let n=e?.role===`assistant`?e:{id:t,metadata:void 0,role:`assistant`,parts:[]},r=WD(),i=n.parts.findLastIndex(e=>e.type===`step-start`),a=0;for(let e of n.parts.slice(i+1)){if(!qD(e))continue;let t=a;GD(e)&&a++,e.state===`input-streaming`&&(r[e.toolCallId]={text:e.rawInput??``,inputEncoding:e.inputEncoding,index:t,toolName:e.type===`dynamic-tool`?e.toolName:JD(e),dynamic:e.type===`dynamic-tool`,title:e.title,toolMetadata:e.toolMetadata})}return{message:n,activeTextParts:WD(),activeReasoningParts:WD(),partialToolCalls:r}}function XD({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:i,onToolCall:a,onData:o,resetStateOnMessageIdChange:s=!1,resetStateOnFirstMessageStart:c=!1}){let l=!0;return e.pipeThrough(new TransformStream({async transform(e,u){await r(async({state:r,write:d})=>{function f(){let e=r.message.parts,t=e.length-1;for(;t>=0&&e[t].type!==`step-start`;)t--;return e.slice(t+1)}function p(){return f().filter(qD)}function m(e){let t=p().find(t=>t.toolCallId===e);if(t==null){let n=r.message.parts;for(let r=n.length-1;r>=0;r--){let i=n[r];if(qD(i)&&i.toolCallId===e){t=i;break}}}if(t==null)throw new PD({chunkType:`tool-invocation`,chunkId:e,message:`No tool invocation found for tool call ID "${e}".`});return t}function h(e){let t=r.message.parts.filter(qD).find(t=>t.approval?.id===e);if(t==null)throw new PD({chunkType:`tool-approval-response`,chunkId:e,message:`No tool invocation found for approval ID "${e}".`});return t}function g(e,t){let n=t??f().find(t=>GD(t)&&t.toolCallId===e.toolCallId),i=e,a=n;if(n!=null){n.state=e.state,a.type=`tool-${e.toolName}`,a.input=i.input,a.output=i.output,a.errorText=i.errorText,a.rawInput=i.rawInput,i.inputEncoding==null?delete a.inputEncoding:a.inputEncoding=i.inputEncoding,a.preliminary=i.preliminary,e.title!==void 0&&(a.title=e.title),e.toolMetadata!==void 0&&(a.toolMetadata=e.toolMetadata),a.providerExecuted=i.providerExecuted??n.providerExecuted;let t=i.providerMetadata;if(t!=null){if(e.state===`output-available`||e.state===`output-error`){let e=n;e.resultProviderMetadata=t}else n.callProviderMetadata=t}}else r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,title:e.title,...e.toolMetadata===void 0?{}:{toolMetadata:e.toolMetadata},input:i.input,...i.inputEncoding==null?{}:{inputEncoding:i.inputEncoding},output:i.output,rawInput:i.rawInput,errorText:i.errorText,providerExecuted:i.providerExecuted,preliminary:i.preliminary,...i.providerMetadata!=null&&(e.state===`output-available`||e.state===`output-error`)?{resultProviderMetadata:i.providerMetadata}:{},...i.providerMetadata!=null&&e.state!==`output-available`&&e.state!==`output-error`?{callProviderMetadata:i.providerMetadata}:{}})}function _(e,t){let n=t??f().find(t=>t.type===`dynamic-tool`&&t.toolCallId===e.toolCallId),i=e,a=n;if(n!=null){n.state=e.state,a.toolName=e.toolName,a.input=i.input,a.output=i.output,a.errorText=i.errorText,a.rawInput=i.rawInput,i.inputEncoding==null?delete a.inputEncoding:a.inputEncoding=i.inputEncoding,a.preliminary=i.preliminary,e.title!==void 0&&(a.title=e.title),e.toolMetadata!==void 0&&(a.toolMetadata=e.toolMetadata),a.providerExecuted=i.providerExecuted??n.providerExecuted;let t=i.providerMetadata;if(t!=null){if(e.state===`output-available`||e.state===`output-error`){let e=n;e.resultProviderMetadata=t}else n.callProviderMetadata=t}}else r.message.parts.push({type:`dynamic-tool`,toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:i.input,...i.inputEncoding==null?{}:{inputEncoding:i.inputEncoding},output:i.output,errorText:i.errorText,preliminary:i.preliminary,providerExecuted:i.providerExecuted,title:e.title,...e.toolMetadata===void 0?{}:{toolMetadata:e.toolMetadata},...i.providerMetadata!=null&&(e.state===`output-available`||e.state===`output-error`)?{resultProviderMetadata:i.providerMetadata}:{},...i.providerMetadata!=null&&e.state!==`output-available`&&e.state!==`output-error`?{callProviderMetadata:i.providerMetadata}:{}})}async function v(e){if(e!=null){let n=r.message.metadata==null?e:FD(r.message.metadata,e);t!=null&&await SD({value:n,schema:t,context:{field:`message.metadata`,entityId:r.message.id}}),r.message.metadata=n}}switch(e.type){case`text-start`:{let t={type:`text`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeTextParts[e.id]=t,r.message.parts.push(t),d();break}case`text-delta`:{let t=r.activeTextParts[e.id];if(t==null)throw new PD({chunkType:`text-delta`,chunkId:e.id,message:`Received text-delta for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,d();break}case`text-end`:{let t=r.activeTextParts[e.id];if(t==null)throw new PD({chunkType:`text-end`,chunkId:e.id,message:`Received text-end for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});t.state=`done`,e.citations!=null&&(t.citations=e.citations),t.providerMetadata=e.providerMetadata??t.providerMetadata,delete r.activeTextParts[e.id],d();break}case`custom`:{let t={type:`custom`,kind:e.kind,providerMetadata:e.providerMetadata};r.message.parts.push(t),d();break}case`reasoning-start`:{let t={type:`reasoning`,id:e.id,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),d();break}case`reasoning-delta`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new PD({chunkType:`reasoning-delta`,chunkId:e.id,message:`Received reasoning-delta for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,d();break}case`reasoning-end`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new PD({chunkType:`reasoning-end`,chunkId:e.id,message:`Received reasoning-end for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});t.providerMetadata=e.providerMetadata??t.providerMetadata,t.state=`done`,delete r.activeReasoningParts[e.id],d();break}case`file`:case`reasoning-file`:r.message.parts.push({type:e.type,mediaType:e.mediaType,url:e.url,...e.providerMetadata==null?{}:{providerMetadata:e.providerMetadata}}),d();break;case`source-url`:r.message.parts.push({type:`source-url`,sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),d();break;case`source-document`:r.message.parts.push({type:`source-document`,sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),d();break;case`tool-input-start`:{let t=f().filter(GD);r.partialToolCalls[e.toolCallId]={text:``,inputEncoding:e.inputEncoding,toolName:e.toolName,index:t.length,dynamic:e.dynamic,title:e.title,toolMetadata:e.toolMetadata},e.dynamic?_({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,inputEncoding:e.inputEncoding,input:void 0,providerExecuted:e.providerExecuted,title:e.title,toolMetadata:e.toolMetadata,providerMetadata:e.providerMetadata}):g({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,inputEncoding:e.inputEncoding,input:void 0,providerExecuted:e.providerExecuted,title:e.title,toolMetadata:e.toolMetadata,providerMetadata:e.providerMetadata}),d();break}case`tool-input-delta`:{let t=r.partialToolCalls[e.toolCallId];if(t==null)throw new PD({chunkType:`tool-input-delta`,chunkId:e.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${e.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});t.text+=e.inputTextDelta;let n=t.inputEncoding===`text`?t.text:(await LD(t.text)).value;t.dynamic?_({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,inputEncoding:t.inputEncoding,input:n,rawInput:t.text,title:t.title,toolMetadata:t.toolMetadata}):g({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,inputEncoding:t.inputEncoding,input:n,rawInput:t.text,title:t.title,toolMetadata:t.toolMetadata}),d();break}case`tool-input-available`:e.dynamic?_({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title,toolMetadata:e.toolMetadata}):g({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title,toolMetadata:e.toolMetadata}),d(),a&&!e.providerExecuted&&await a({toolCall:e});break;case`tool-input-error`:{let t=f().filter(qD).find(t=>t.toolCallId===e.toolCallId);(t==null?e.dynamic:t.type===`dynamic-tool`)?_({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,toolMetadata:e.toolMetadata}):g({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,toolMetadata:e.toolMetadata}),d();break}case`tool-approval-request`:{let t=m(e.toolCallId);t.state=`approval-requested`,t.approval={id:e.approvalId,...e.approvalDescriptor==null?{}:{descriptor:e.approvalDescriptor},...Object.prototype.hasOwnProperty.call(e,`inputSchemaInput`)?{inputSchemaInput:e.inputSchemaInput}:{},...e.reason==null?{}:{requestReason:e.reason},...e.isAutomatic===!0?{isAutomatic:!0}:{},...e.signature==null?{}:{signature:e.signature}},d();break}case`tool-approval-response`:{let t=h(e.approvalId),n=t.approval==null?{id:e.approvalId}:t.approval;t.state=`approval-responded`,t.approval={...n,id:e.approvalId,approved:e.approved,...e.reason==null?{}:{reason:e.reason}},e.providerExecuted!=null&&(t.providerExecuted=e.providerExecuted),e.providerMetadata!=null&&(t.callProviderMetadata=e.providerMetadata),d();break}case`tool-output-denied`:{let t=m(e.toolCallId);t.state=`output-denied`,d();break}case`tool-output-available`:{let t=m(e.toolCallId);t.type===`dynamic-tool`?_({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-available`,input:t.input,output:e.output,preliminary:e.preliminary,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:e.toolMetadata??t.toolMetadata},t):g({toolCallId:e.toolCallId,toolName:JD(t),state:`output-available`,input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:e.toolMetadata??t.toolMetadata},t),d();break}case`tool-output-error`:{let t=m(e.toolCallId);t.type===`dynamic-tool`?_({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-error`,input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:e.toolMetadata??t.toolMetadata},t):g({toolCallId:e.toolCallId,toolName:JD(t),state:`output-error`,input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:e.toolMetadata??t.toolMetadata},t),d();break}case`start-step`:r.message.parts.push({type:`step-start`});break;case`finish-step`:break;case`reset-step`:{let e=f();r.activeTextParts=WD(),r.activeReasoningParts=WD(),r.partialToolCalls=WD(),e.length>0&&(r.message.parts.splice(r.message.parts.length-e.length,e.length),d());break}case`start`:{let t=c&&l||s&&e.messageId!=null&&e.messageId!==r.message.id;l=!1,t&&Object.assign(r,YD({lastMessage:void 0,messageId:e.messageId??r.message.id}),{finishReason:void 0}),e.messageId!=null&&(r.message.id=e.messageId),await v(e.messageMetadata),(t||e.messageId!=null||e.messageMetadata!=null)&&d({updateStatus:!1});break}case`finish`:e.finishReason!=null&&(r.finishReason=e.finishReason),await v(e.messageMetadata),e.messageMetadata!=null&&d();break;case`message-metadata`:await v(e.messageMetadata),e.messageMetadata!=null&&d();break;case`error`:i?.(Error(e.errorText));break;default:if(UD(e)){if(n?.[e.type]!=null){let t=r.message.parts.findIndex(t=>`id`in t&&`data`in t&&t.id===e.id&&t.type===e.type),i=t>=0?t:r.message.parts.length;await SD({value:e.data,schema:n[e.type],context:{field:`message.parts[${i}].data`,entityName:e.type,entityId:e.id}})}let t=e;if(t.transient){o?.(t);break}let i=t.id==null?void 0:r.message.parts.find(e=>t.type===e.type&&t.id===e.id);i==null?r.message.parts.push(t):i.data=t.data,o?.(t),d()}}u.enqueue(e)})}}))}async function ZD({stream:e,onError:t,abortSignal:n}){let r=e.getReader(),i=()=>{r.cancel().catch(()=>{})};n?.aborted?i():n?.addEventListener(`abort`,i,{once:!0});try{for(;;){let{done:e}=await r.read();if(e)break}}catch(e){t?.(e)}finally{n?.removeEventListener(`abort`,i),r.releaseLock()}}function QD(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}uE({prefix:`aitxt`,size:24}),uE({prefix:`call`,size:24}),uE({prefix:`aitxt`,size:24}),uE({prefix:`call`,size:24}),R.record(R.string(),RD.optional()),R.record(R.string(),R.string()),uE({prefix:`call`,size:24}),uE({prefix:`call`,size:24}),new TextEncoder,uE({prefix:`call`,size:24}),uE({prefix:`aiobj`,size:24});var{atob:Xte}=globalThis,$D=class{constructor(){this.queue=[],this.isProcessing=!1,this.idleWaiters=[]}async processQueue(){if(!this.isProcessing){this.isProcessing=!0;try{for(;this.queue.length>0;)await this.queue[0](),this.queue.shift()}finally{this.isProcessing=!1;for(let e of this.idleWaiters.splice(0))e()}}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(e){n(e)}}),this.processQueue()})}async waitForIdle(){(this.isProcessing||this.queue.length!==0)&&await new Promise(e=>{this.idleWaiters.push(e)})}};uE({prefix:`aiobj`,size:24}),uE({prefix:`call`,size:24});var eO=R.union([R.string(),R.instanceof(Uint8Array),R.instanceof(ArrayBuffer),R.custom(fE,{message:`Must be a Buffer`})]),tO=R.record(R.string(),R.string()),nO=R.object({type:R.literal(`text`),text:R.string(),providerOptions:zD.optional()}),rO=R.object({type:R.literal(`image`),image:R.union([eO,R.instanceof(URL),tO]),mediaType:R.string().optional(),providerOptions:zD.optional()}),iO=R.discriminatedUnion(`type`,[R.object({type:R.literal(`data`),data:eO}),R.object({type:R.literal(`url`),url:R.instanceof(URL)}),R.object({type:R.literal(`reference`),reference:tO}),R.object({type:R.literal(`text`),text:R.string()})]),aO=R.discriminatedUnion(`type`,[R.object({type:R.literal(`data`),data:eO}),R.object({type:R.literal(`url`),url:R.instanceof(URL)})]),oO=R.object({type:R.literal(`file`),data:R.union([iO,eO,R.instanceof(URL),tO]),filename:R.string().optional(),mediaType:R.string(),providerOptions:zD.optional()}),sO=R.object({type:R.literal(`reasoning`),text:R.string(),providerOptions:zD.optional()}),cO=R.object({type:R.literal(`custom`),kind:R.string().transform(e=>e),providerOptions:zD.optional()}),lO=R.object({type:R.literal(`reasoning-file`),data:R.union([aO,eO,R.instanceof(URL)]),mediaType:R.string(),providerOptions:zD.optional()}),uO=R.object({type:R.literal(`tool-call`),toolCallId:R.string(),toolName:R.string(),input:R.unknown(),providerOptions:zD.optional(),providerExecuted:R.boolean().optional()}),dO=R.discriminatedUnion(`type`,[R.object({type:R.literal(`text`),value:R.string(),providerOptions:zD.optional()}),R.object({type:R.literal(`json`),value:RD,providerOptions:zD.optional()}),R.object({type:R.literal(`execution-denied`),reason:R.string().optional(),providerOptions:zD.optional()}),R.object({type:R.literal(`error-text`),value:R.string(),providerOptions:zD.optional()}),R.object({type:R.literal(`error-json`),value:RD,providerOptions:zD.optional()}),R.object({type:R.literal(`content`),value:R.array(R.union([R.object({type:R.literal(`text`),text:R.string(),providerOptions:zD.optional()}),R.object({type:R.literal(`file`),data:iO,mediaType:R.string(),filename:R.string().optional(),providerOptions:zD.optional()}),R.object({type:R.literal(`file-data`),data:R.string(),mediaType:R.string(),filename:R.string().optional(),providerOptions:zD.optional()}),R.object({type:R.literal(`file-url`),url:R.string(),mediaType:R.string().optional(),providerOptions:zD.optional()}),R.object({type:R.literal(`file-id`),fileId:R.union([R.string(),R.record(R.string(),R.string())]),providerOptions:zD.optional()}),R.object({type:R.literal(`file-reference`),providerReference:R.record(R.string(),R.string()),providerOptions:zD.optional()}),R.object({type:R.literal(`image-data`),data:R.string(),mediaType:R.string(),providerOptions:zD.optional()}),R.object({type:R.literal(`image-url`),url:R.string(),providerOptions:zD.optional()}),R.object({type:R.literal(`image-file-id`),fileId:R.union([R.string(),R.record(R.string(),R.string())]),providerOptions:zD.optional()}),R.object({type:R.literal(`image-file-reference`),providerReference:R.record(R.string(),R.string()),providerOptions:zD.optional()}),R.object({type:R.literal(`custom`),providerOptions:zD.optional()})]))})]),fO=R.object({type:R.literal(`tool-result`),toolCallId:R.string(),toolName:R.string(),output:dO,providerOptions:zD.optional()}),pO=R.object({type:R.literal(`tool-approval-request`),approvalId:R.string(),toolCallId:R.string(),reason:R.string().optional(),isAutomatic:R.boolean().optional(),signature:R.string().optional(),inputSchemaInput:R.unknown().optional()}),mO=R.object({type:R.literal(`tool-approval-response`),approvalId:R.string(),approved:R.boolean(),reason:R.string().optional()}),hO=R.object({role:R.literal(`system`),content:R.string(),providerOptions:zD.optional()}),gO=R.object({role:R.literal(`user`),content:R.union([R.string(),R.array(R.union([nO,rO,oO]))]),providerOptions:zD.optional()}),_O=R.object({role:R.literal(`assistant`),content:R.union([R.string(),R.array(R.union([nO,cO,oO,sO,lO,uO,fO,pO]))]),providerOptions:zD.optional()}),vO=R.object({role:R.literal(`tool`),content:R.array(R.union([fO,mO])),providerOptions:zD.optional()});R.union([hO,gO,_O,vO]),R.object({token:R.string().refine(e=>e.trim().length>0),url:R.string().refine(e=>{try{let t=new URL(e);return(t.protocol===`ws:`||t.protocol===`wss:`)&&t.hostname!==``}catch{return!1}}),expiresAt:R.number().positive().max(2**53-1).optional(),tools:R.array(R.object({type:R.literal(`function`),name:R.string().min(1),description:R.string().optional(),parameters:R.record(R.string(),R.unknown())})).optional()}),uE({prefix:`call`,size:24}),uE({prefix:`call`,size:24}),uE({prefix:`call`,size:24});async function yO({response:e,url:t,fallbackMessage:n}){let r=await e.text();return new oee({message:r||n,url:t,requestBodyValues:void 0,statusCode:e.status,responseBody:r})}async function bO(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new ov({functionality:`FileList`,message:`FileList is not supported in the current environment`});return Promise.all(Array.from(e).map(async e=>{let{name:t,type:n}=e;return{type:`file`,mediaType:n,filename:t,url:await new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result)},r.onerror=e=>n(e),r.readAsDataURL(e)})}}))}function xO(e,t){let n=e.search(/[?#]/),r=n===-1?e:e.slice(0,n),i=n===-1?``:e.slice(n);return`${r.endsWith(`/`)&&t.startsWith(`/`)?r.slice(0,-1):r}${t}${i}`}var SO=class{constructor({api:e=`/api/chat`,credentials:t,headers:n,body:r,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:o}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=o}async sendMessages({abortSignal:e,...t}){let n=await ED(this.body),r=await ED(this.headers),i=await ED(this.credentials),a={...lE(r),...lE(t.headers)},o=await this.prepareSendMessagesRequest?.({api:this.api,id:t.chatId,messages:t.messages,body:{...n,...t.body},headers:a,credentials:i,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId}),s=o?.api??this.api,c=o?.headers===void 0?a:lE(o.headers),l=o?.body===void 0?{...n,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId}:o.body,u=o?.credentials??i,d=await(this.fetch??globalThis.fetch)(s,{method:`POST`,headers:{"content-type":`application/json`,...c},body:JSON.stringify(l),credentials:u,signal:e});if(!d.ok)throw await yO({response:d,url:s,fallbackMessage:`Failed to fetch the chat response.`});if(!d.body)throw new U_({message:`The response body is empty.`});return this.processResponseStream(d.body)}async reconnectToStream(e){let t=await ED(this.body),n=await ED(this.headers),r=await ED(this.credentials),i={...lE(n),...lE(e.headers)},a=await this.prepareReconnectToStreamRequest?.({api:this.api,id:e.chatId,body:{...t,...e.body},headers:i,credentials:r,requestMetadata:e.metadata}),o=a?.api;if(o==null){if(e.chatId===`.`||e.chatId===`..`)throw new AD({parameter:`chatId`,value:e.chatId,message:`Chat IDs must not be "." or ".." when using the default reconnect URL.`});o=xO(this.api,`/${encodeURIComponent(e.chatId)}/stream`)}let s=a?.headers===void 0?i:lE(a.headers),c=a?.credentials??r,l=await(this.fetch??globalThis.fetch)(o,{method:`GET`,headers:s,credentials:c,signal:e.abortSignal});if(l.status===204)return null;if(!l.ok)throw await yO({response:l,url:o,fallbackMessage:`Failed to fetch the chat response.`});if(!l.body)throw new U_({message:`The response body is empty.`});return this.processResponseStream(l.body)}},CO=class extends SO{constructor({resumeStreamIsReplay:e=!0,...t}={}){super(t),this.resumeStreamIsReplay=e}processResponseStream(e){return TD({stream:e,schema:HD}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},wO=class{get id(){return this._id??=this.generateId()}constructor({generateId:e=dE,id:t,transport:n=new CO,messageMetadataSchema:r,dataPartSchemas:i,state:a,onError:o,onToolCall:s,onFinish:c,onData:l,sendAutomaticallyWhen:u}){this.pendingMessagePreparations=new Set,this.interruptedMessageIds=new Set,this.activeResponse=void 0,this.activeResumeRequest=void 0,this.resumableStreamState=void 0,this.jobExecutor=new $D,this.activeStopCount=0,this.stopGeneration=0,this.sendMessage=async(e,t)=>{if(e==null){let e=this.pendingApprovalMessageId;if(e==null){e=this.lastMessage?.id;for(let t=this.state.messages.length-1;t>=0;t--){let n=this.state.messages[t];if(n.role===`assistant`&&n.parts.some(e=>qD(e)&&e.state===`approval-responded`)){e=n.id;break}}}let n=e!=null&&e===this.pendingApprovalMessageId?this.state.messages.findIndex(t=>t.id===e):-1;await this.makeRequestForToolApproval({messageId:e,messageIndex:n,...t});return}let n;if(`text`in e||`files`in e){let t=new AbortController;this.pendingMessagePreparations.add(t);let r;try{r=Array.isArray(e.files)?e.files:await bO(e.files)}finally{this.pendingMessagePreparations.delete(t)}if(t.signal.aborted)return;n={parts:[...r,...`text`in e&&e.text!=null?[{type:`text`,text:e.text}]:[]]}}else n=e;if(e.messageId!=null){let t=this.state.messages.findIndex(t=>t.id===e.messageId);if(t===-1)throw new AD({parameter:`message.messageId`,value:e.messageId,message:`message with id ${e.messageId} not found`});if(this.state.messages[t].role!==`user`)throw new AD({parameter:`message.messageId`,value:e.messageId,message:`message with id ${e.messageId} is not a user message`});this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{id:e.messageId,...n,role:n.role??`user`,metadata:e.metadata})}else this.state.pushMessage({...n,id:n.id??this.generateId(),role:n.role??`user`,metadata:e.metadata});await this.makeRequest({trigger:`submit-message`,messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{let n=e==null?this.state.messages.length-1:this.state.messages.findIndex(t=>t.id===e);if(n===-1)throw new AD({parameter:`messageId`,value:e,message:`message ${e} not found`});this.state.messages=this.state.messages.slice(0,this.messages[n].role===`assistant`?n:n+1),await this.makeRequest({trigger:`regenerate-message`,messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:`resume-stream`,...e})},this[`~resumeStreamIfDisconnected`]=async({shouldResume:e=()=>!0}={})=>{let t=this.activeResponse;this.resumableStreamState==null&&t!=null&&(await t.completionPromise,this.resumableStreamState!==t.state)||this.resumableStreamState!=null&&e()&&await this.resumeStream()},this.clearError=()=>{this.status===`error`&&(this.state.error=void 0,this.setStatus({status:`ready`}))},this.addToolApprovalResponse=async({id:e,approved:t,reason:n,options:r})=>this.jobExecutor.run(async()=>{let i=this.state.messages,a=r=>qD(r)&&r.state===`approval-requested`&&r.approval.id===e?{...r,state:`approval-responded`,approval:{...r.approval,id:e,approved:t,reason:n}}:r,o=i.findIndex(t=>t.parts.some(t=>qD(t)&&t.state===`approval-requested`&&t.approval.id===e));if(o!==-1){let e=i[o];this.state.replaceMessage(o,{...e,parts:e.parts.map(a)}),this.pendingApprovalMessageId=e.id}if(this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(a)),o!==-1&&this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen){let e=await this.shouldSendAutomatically(i[o].id);e&&this.runAutomaticRequest(()=>{let e=o===-1?this.lastMessage?.id:i[o].id;return this.makeRequestForToolApproval({messageId:e,messageIndex:o,...r})},e)}}),this.addToolOutput=async({state:e,toolCallId:t,output:n,errorText:r,options:i})=>this.jobExecutor.run(async()=>{let a=this.state.messages,o=i=>{if(!qD(i)||i.toolCallId!==t)return i;let{approval:a,...o}=i,s=a?.approved===!0?{approval:{...a,approved:a.approved}}:{};return e===`output-error`?{...o,...s,state:e,input:i.input,output:void 0,errorText:r}:{...o,...s,state:`output-available`,input:i.input,output:n,errorText:void 0}},s=a.findIndex(e=>e.parts.some(e=>qD(e)&&e.toolCallId===t));if(s!==-1){let e=a[s];this.state.replaceMessage(s,{...e,parts:e.parts.map(o)})}if(this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(o)),s!==-1&&this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen){let e=await this.shouldSendAutomatically(a[s].id);e&&this.runAutomaticRequest(()=>this.makeRequest({trigger:`submit-message`,messageId:a[s].id,...i}),e)}}),this.addToolResult=this.addToolOutput,this.stop=async()=>{this.activeStopCount++,this.stopGeneration++;try{let e=this.activeResumeRequest,t=this.activeResponse;for(let e of this.pendingMessagePreparations)e.abort();e?.abortController.abort(),t?.abortController.abort(),await Promise.all([e?.completionPromise,t?.completionPromise]),await this.jobExecutor.waitForIdle()}finally{this.activeStopCount--}},this.dispose=async()=>{await this.stop(),this.transport.close?.()},this._id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=i,this.state=a,this.onError=o,this.onToolCall=s,this.onFinish=c,this.onData=l,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status===e?this.error!==t&&(this.state.error=t):(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(e=this.lastMessage?.id){let t=e=>e!=null&&this.interruptedMessageIds.has(e);return!this.sendAutomaticallyWhen||t(e)||t(this.lastMessage?.id)?!1:await this.sendAutomaticallyWhen({messages:this.state.messages})&&!t(e)&&!t(this.lastMessage?.id)}async runAutomaticRequest(e,t){let n=this.stopGeneration,r=this.activeStopCount>0;(t??await this.shouldSendAutomatically())&&(r||n!==this.stopGeneration||this.activeStopCount>0||await e())}async makeRequestForToolApproval({messageId:e,messageIndex:t,...n}){let r=e!=null&&e===this.pendingApprovalMessageId;r&&(this.pendingApprovalMessageId=void 0),await this.makeRequest({trigger:`submit-message`,messageId:e,...n}),r&&this.status===`error`&&this.pendingApprovalMessageId==null&&(this.pendingApprovalMessageId=this.state.messages[t]?.id??e)}async makeRequest(e){let t=QD();try{await this.makeRequestImpl({...e,completionPromise:t.promise})}finally{t.resolve()}}async makeRequestImpl({trigger:e,metadata:t,headers:n,body:r,messageId:i,completionPromise:a}){e!==`resume-stream`&&(this.resumableStreamState=void 0);let o=new AbortController,s=e===`resume-stream`?{abortController:o,completionPromise:a}:void 0;s&&(this.activeResumeRequest?.abortController.abort(),this.activeResumeRequest=s);let c=()=>s==null||this.activeResumeRequest===s,l=()=>{this.activeResumeRequest===s&&(this.activeResumeRequest=void 0)},u;if(e===`resume-stream`)try{let e=await this.transport.reconnectToStream({chatId:this.id,abortSignal:o.signal,metadata:t,headers:n,body:r});if(o.signal.aborted||!c()){await e?.cancel().catch(()=>{}),c()&&(this.setStatus({status:`ready`}),this.resumableStreamState=void 0),l();return}if(e==null){this.setStatus({status:`ready`}),this.resumableStreamState=void 0,l();return}u=e}catch(e){if(o.signal.aborted||e.name===`AbortError`){c()&&(this.setStatus({status:`ready`}),this.resumableStreamState=void 0),l();return}if(!c())return;this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e}),l();return}this.setStatus({status:`submitted`,error:void 0});let d=this.lastMessage,f=e===`submit-message`&&i!=null?this.state.messages.findIndex(e=>e.id===i):this.state.messages.length-1,p=f===-1?d:this.state.messages[f],m=p?.id,h=e===`resume-stream`&&p?.role===`assistant`&&p.parts.some(e=>qD(e)&&(e.state===`input-streaming`||e.state===`input-available`&&e.providerExecuted||e.state===`approval-responded`))?this.state.snapshot(p):void 0,g=f!==-1&&f<this.state.messages.length-1&&p?.role===`assistant`,_=!1,v=!1,y=!1,b;try{let s={state:e===`resume-stream`&&this.resumableStreamState!=null?this.resumableStreamState:YD({lastMessage:e===`resume-stream`?h:e===`regenerate-message`?void 0:this.state.snapshot(p),messageId:this.generateId()}),abortController:o,completionPromise:a};b=s,s.abortController.signal.addEventListener(`abort`,()=>{_=!0}),this.activeResponse=s;let l;if(l=e===`resume-stream`?u:await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:s.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:i}),await ZD({stream:XD({stream:l,resetStateOnMessageIdChange:e===`resume-stream`,resetStateOnFirstMessageStart:e===`resume-stream`&&this.transport.resumeStreamIsReplay,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:e=>this.jobExecutor.run(()=>s.abortController.signal.aborted?Promise.resolve():e({state:s.state,write:({updateStatus:e=!0}={})=>{if(s.abortController.signal.aborted)return;e&&this.setStatus({status:`streaming`});let t=this.state.messages.findLastIndex(e=>e.id===s.state.message.id);if(t!==-1)this.state.replaceMessage(t,s.state.message);else if(g){let e=this.state.messages.findLastIndex(e=>e.id===m);e===-1?this.state.pushMessage(s.state.message):this.state.replaceMessage(e,s.state.message)}else this.state.pushMessage(s.state.message)}})),onError:e=>{throw e}}),abortSignal:s.abortController.signal,onError:e=>{throw e}}),_)return c()&&(this.setStatus({status:`ready`}),this.resumableStreamState===s.state&&(this.resumableStreamState=void 0)),null;c()&&(this.setStatus({status:`ready`}),this.resumableStreamState===s.state&&(this.resumableStreamState=void 0))}catch(e){if(_||e.name===`AbortError`)return _=!0,c()&&(this.setStatus({status:`ready`}),this.resumableStreamState===b?.state&&(this.resumableStreamState=void 0)),null;if(!c())return null;if(y=!0,e instanceof TypeError){let t=e.message.toLowerCase();v=t.includes(`fetch`)||t.includes(`network`)||t===`load failed`}v?this.resumableStreamState=b?.state:this.resumableStreamState===b?.state&&(this.resumableStreamState=void 0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e})}finally{try{if(b){let{message:e,finishReason:t}=b.state;t===`interrupted`?this.interruptedMessageIds.add(e.id):!_&&!y&&this.interruptedMessageIds.delete(e.id),this.onFinish?.({message:b.state.message,messages:this.state.messages,isAbort:_,isDisconnect:v,isError:y,finishReason:b.state.finishReason})}}finally{this.activeResponse===b&&(this.activeResponse=void 0),l()}}!_&&!y&&b?.state.finishReason!==`interrupted`&&await this.runAutomaticRequest(()=>this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,metadata:t,headers:n,body:r}))}},TO=l(o(((e,t)=>{function n(e,t){if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let n,r=0;return function(...i){clearTimeout(n);let a=Date.now(),o=t-(a-r);o<=0?(r=a,e.apply(this,i)):n=setTimeout(()=>{r=Date.now(),e.apply(this,i)},o)}}t.exports=n}))(),1);function EO(e,t){return t==null?e:(0,TO.default)(e,t)}function DO(e){return Array.isArray(e)?[...e]:typeof e==`object`&&e&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null)?{...e}:e}var OO=class{#e;#t;#n;#r;#i;#a;constructor(e=[]){this.#t=`ready`,this.#n=void 0,this.#r=new Set,this.#i=new Set,this.#a=new Set,this.pushMessage=e=>{this.#e=this.#e.concat(e),this.#o()},this.popMessage=()=>{this.#e=this.#e.slice(0,-1),this.#o()},this.replaceMessage=(e,t)=>{this.#e=[...this.#e.slice(0,e),this.snapshot(t),...this.#e.slice(e+1)],this.#o()},this.snapshot=e=>{if(typeof e!=`object`||!e||!(`parts`in e)||!Array.isArray(e.parts))return e;let t=e,n={...t,parts:t.parts.map(e=>({...e}))};return`metadata`in t&&(n.metadata=DO(t.metadata)),n},this[`~registerMessagesCallback`]=(e,t)=>{let n=t?EO(e,t):e;return this.#r.add(n),()=>{this.#r.delete(n)}},this[`~registerStatusCallback`]=e=>(this.#i.add(e),()=>{this.#i.delete(e)}),this[`~registerErrorCallback`]=e=>(this.#a.add(e),()=>{this.#a.delete(e)}),this.#o=()=>{this.#r.forEach(e=>e())},this.#s=()=>{this.#i.forEach(e=>e())},this.#c=()=>{this.#a.forEach(e=>e())},this.#e=e}get status(){return this.#t}set status(e){this.#t=e,this.#s()}get error(){return this.#n}set error(e){this.#n=e,this.#c()}get messages(){return this.#e}set messages(e){this.#e=[...e],this.#o()}#o;#s;#c},kO=class extends wO{#e;constructor({messages:e,...t}){let n=new OO(e);super({...t,state:n}),this[`~registerMessagesCallback`]=(e,t)=>this.#e[`~registerMessagesCallback`](e,t),this[`~registerStatusCallback`]=e=>this.#e[`~registerStatusCallback`](e),this[`~registerErrorCallback`]=e=>this.#e[`~registerErrorCallback`](e),this.#e=n}},AO=new WeakMap;function jO({chat:e,state:t}){if(document.visibilityState!==`visible`||t.pendingVisibilityResume!=null)return;let n=()=>AO.get(e)===t&&t.registrations.size>0,r=()=>{t.pendingVisibilityResume=void 0};t.pendingVisibilityResume=e[`~resumeStreamIfDisconnected`]({shouldResume:()=>n()&&document.visibilityState===`visible`}).then(r,r)}function MO({chat:e,registration:t}){let n=AO.get(e);if(n==null){let t={registrations:new Set};if(AO.set(e,t),n=t,typeof document<`u`){let n=()=>jO({chat:e,state:t});document.addEventListener(`visibilitychange`,n),t.cleanupVisibilityListener=()=>{document.removeEventListener(`visibilitychange`,n)}}}let{registrations:r}=n,i=r.size===0;return r.add(t),i&&e.status!==`submitted`&&e.status!==`streaming`&&e.resumeStream(),()=>{r.delete(t),r.size===0&&(n.cleanupVisibilityListener?.(),AO.delete(e))}}function NO(e){return{chat:e,messages:e.messages,status:e.status,error:e.error}}function PO(e,t){return e.chat===t.chat&&e.messages===t.messages&&e.status===t.status&&e.error===t.error}function FO({throttle:e,experimental_throttle:t,resume:n=!1,...r}={}){let i=e??t,a=(0,v.useRef)({}),o=(0,v.useRef)({});`chat`in r||(o.current={onToolCall:r.onToolCall,onData:r.onData,onFinish:r.onFinish,onError:r.onError,sendAutomaticallyWhen:r.sendAutomaticallyWhen,transport:r.transport});let s,c=()=>o.current.transport??(s??=new CO),l={...r,transport:{get resumeStreamIsReplay(){return c().resumeStreamIsReplay},sendMessages:e=>c().sendMessages(e),reconnectToStream:e=>c().reconnectToStream(e)},onToolCall:e=>o.current.onToolCall?.(e),onData:e=>o.current.onData?.(e),onFinish:e=>o.current.onFinish?.(e),onError:e=>o.current.onError?.(e),sendAutomaticallyWhen:e=>o.current.sendAutomaticallyWhen?.(e)??!1},u=`chat`in r?r.chat:r.id,{chat:d,isExternallyManaged:f}=(0,v.useMemo)(()=>({chat:`chat`in r?r.chat:new kO(l),isExternallyManaged:`chat`in r}),[u]);(0,v.useEffect)(()=>{if(!f)return()=>{d.stop()}},[d,f]);let[p,m]=(0,v.useState)(()=>NO(d));p.chat!==d&&m(NO(d)),(0,v.useEffect)(()=>{let e=!0,t=()=>{if(!e)return;let t=NO(d);m(e=>e.chat!==d||PO(e,t)?e:t)},n=[d[`~registerMessagesCallback`](t,i),d[`~registerStatusCallback`](t),d[`~registerErrorCallback`](t)],r=NO(d);return m(e=>PO(e,r)?e:r),()=>{e=!1,n.forEach(e=>e())}},[d,i]);let{messages:h,status:g,error:_}=p,y=(0,v.useCallback)(e=>{typeof e==`function`&&(e=e(d.messages)),d.messages=e},[d]);return(0,v.useEffect)(()=>{if(n)return MO({chat:d,registration:a.current})},[n,d]),{get id(){return d.id},messages:h,setMessages:y,sendMessage:d.sendMessage,regenerate:d.regenerate,clearError:d.clearError,stop:d.stop,error:_,resumeStream:d.resumeStream,status:g,addToolResult:d.addToolOutput,addToolOutput:d.addToolOutput,addToolApprovalResponse:d.addToolApprovalResponse}}var IO=e=>e!==void 0&&/\s/.test(e),LO=e=>e!==void 0&&e>=`0`&&e<=`9`;function RO(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e[r];if(i===`\\`&&e[r+1]===`$`)n+=`$`,r+=2;else if(i!==`$`)n+=i,r+=1;else if(e[r+1]===`$`)for(;e[r]===`$`;)n+=`$`,r+=1;else{let i=zO(e,r);i===void 0?(n+=`$`,r+=1):(n&&t.push({text:n}),n=``,t.push({formula:e.slice(r+1,i)}),r=i+1)}}return n&&t.push({text:n}),t}function zO(e,t){let n=t+1;for(;n<e.length&&e[n]!==`$`;)n+=e[n]===`\\`&&(e[n+1]===`$`||e[n+1]===`\\`)?2:1;if(!(n>=e.length||n===t+1||e[n+1]===`$`)&&!(IO(e[t+1])||IO(e[n-1])||LO(e[n+1])))return/`|\n\s*\n/.test(e.slice(t,n))?void 0:n}var BO=String.raw`Wrap LaTeX commands in single-dollar math delimiters, with no spaces inside: $\displaystyle\sum_{i=1}^{n} i$. Put \displaystyle inside the dollars. For literal backslashes followed by two or more letters (such as C:\Users), use forward slashes, Unicode symbols such as ∖, or describe them in words; backticks do not escape artifact math. Correct the affected field and retry this tool call.`;function VO(e,t,n){typeof e==`string`&&RO(e).some(e=>`text`in e&&/\\[a-zA-Z]{2,}/.test(e.text))&&n.addIssue({code:`custom`,path:t,message:BO})}function HO(e,t,n){return e.superRefine((e,r)=>{let i=(e,t,n)=>{if(t.length===0)return VO(e,n,r);let[a,...o]=t;a===`*`&&Array.isArray(e)?e.forEach((e,t)=>i(e,o,[...n,t])):e&&typeof e==`object`&&a!==void 0&&i(e[a],o,[...n,a])};for(let n of t)i(e,n.split(`.`),[]);n?.(e,r)})}var UO=64,WO=200,GO=4e3;function KO(e){return e.replace(/\r\n?/g,`
|
|
120
|
-
`).replace(/\n$/,``).split(`
|
|
121
|
-
`)}var qO=F().trim().min(1).max(40),JO=LT([AT(),F().max(24)]),YO=AT().int().nonnegative(),XO=L({name:qO.describe(`Pointer label shown under the cell, e.g. "left", "right", "mid", "i".`),index:YO.describe(`0-based index into the sequence as it is at this step.`)}).strict(),ZO=L({start:YO.describe(`0-based start index, inclusive, within the sequence as it is at this step.`),end:YO.describe(`0-based end index, inclusive. Must be >= start and within the sequence.`),label:qO.optional().describe(`Optional label, e.g. "window".`),tone:VT([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished/sorted, muted = ruled out. Defaults to active.`)}).strict(),QO=L({name:qO,value:LT([AT(),F().max(80),MT()])}).strict(),$O=L({language:F().trim().min(1).max(30).describe(`The language the code is written in, e.g. "Python", "TypeScript", "Java" or "pseudocode". Shown as a label.`),source:F().min(1).max(GO).describe(`The code, as plain text with newlines and its real indentation: at most 40 lines of at most 120 characters. Line 1 is the first line. No Markdown fences.`)}).strict().superRefine((e,t)=>{let n=KO(e.source);n.every(e=>e.trim()===``)&&t.addIssue({code:`custom`,path:[`source`],message:`source has no code`}),n.length>40&&t.addIssue({code:`custom`,path:[`source`],message:`source has ${n.length} lines; at most 40 are allowed`});let r=n.findIndex(e=>e.length>120);r>=0&&t.addIssue({code:`custom`,path:[`source`],message:`line ${r+1} is longer than 120 characters`})}),ek=L({explanation:F().trim().min(1).max(500).describe(`What happens in this step, in one or two sentences.`),values:I(JO).min(1).max(UO).optional().describe(`The whole sequence after this step. Omit unless the values changed (e.g. a swap); omitted means unchanged.`),pointers:I(XO).max(8).optional().describe(`All pointers to show at this step. Not carried over from earlier steps: repeat any that still apply.`),ranges:I(ZO).max(8).optional().describe(`All highlighted ranges at this step. Not carried over from earlier steps.`),variables:I(QO).max(12).optional().describe(`All running state at this step, e.g. current sum, best so far. Not carried over from earlier steps.`),lines:I(AT().int().positive()).max(40).optional().describe(`Only with code: the 1-based line numbers in code.source this step is running, highlighted beside the values. Not carried over from earlier steps; omit or leave empty to highlight none.`)}).strict(),tk=L({title:F().trim().min(1).max(120),values:I(JO).min(1).max(UO).describe(`The input sequence before the first step.`),code:$O.optional().describe("Optional source code shown beside the values, with each step's `lines` highlighted. Include it only when the code itself is the point."),steps:I(ek).min(1).max(WO)}).strict().superRefine((e,t)=>{let n=e.values.length,r=e.code?KO(e.code.source).length:0;e.steps.forEach((i,a)=>{i.lines&&!e.code?t.addIssue({code:`custom`,path:[`steps`,a,`lines`],message:`lines need code: add code, or remove lines`}):i.lines?.forEach((e,n)=>{e>r&&t.addIssue({code:`custom`,path:[`steps`,a,`lines`,n],message:`line ${e} is outside the code (${r} lines)`})}),i.values&&(n=i.values.length),i.pointers?.forEach((e,r)=>{e.index>=n&&t.addIssue({code:`custom`,path:[`steps`,a,`pointers`,r,`index`],message:`index ${e.index} is outside the sequence (length ${n})`})}),i.ranges?.forEach((e,r)=>{(e.end>=n||e.start>e.end)&&t.addIssue({code:`custom`,path:[`steps`,a,`ranges`,r],message:`range ${e.start}..${e.end} is invalid for a sequence of length ${n}`})})})}),nk=VT([`javascript`,`python`]),rk=1e4,ik=5e4,ak=1e4,ok=2e4,sk=2e3,ck={timeMs:2e3,memoryBytes:67108864,stackBytes:393216,outputChars:ok},lk=/^[A-Za-z_$][A-Za-z0-9_$]*$/,uk=/^[A-Za-z_][A-Za-z0-9_]*$/,dk=new Set(`False None True and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield`.split(` `)),fk=MT().optional().describe(`Hidden from the learner's view until they submit: use for edge cases. At least one case must be visible.`),pk=L({kind:HT(`stdio`),stdin:F().max(ak).describe('The text the program reads: in JavaScript the global `stdin` string or `readLine()`, in Python input() or sys.stdin. Use "" for none.'),hidden:fk}).strict(),mk=L({kind:HT(`call`),args:F().max(ak).describe(`The arguments to call functionName with, as a JSON array, e.g. "[[3, 1, 2], 2]" or "[]".`),hidden:fk}).strict(),hk=RT(`kind`,[pk,mk]),gk=LT([L({stdout:F().max(ok)}).strict(),L({returned:F().max(ok)}).strict()]),_k={concept:F().trim().min(1).max(80).describe(`Short label for the concept being practised, e.g. "array reduce". Used to track progress.`),title:F().trim().min(1).max(120),instructions:F().trim().min(1).max(4e3).describe(`What the learner's code must do, as markdown. Say exactly what to print or return, and for stdio how the input is laid out.`),language:nk,starterCode:F().max(rk).describe(`The code the editor starts with, e.g. the function's signature with an empty body. May be empty.`),functionName:F().regex(lk).max(80).optional().describe(`The function call cases call, declared at the top level of the learner's code. Required when there are call cases.`)};function vk(e,t){e.language===`python`&&e.functionName!==void 0&&(!uk.test(e.functionName)||dk.has(e.functionName))&&t.addIssue({code:`custom`,path:[`functionName`],message:`functionName must be a Python identifier`}),e.cases.every(e=>e.hidden)&&t.addIssue({code:`custom`,path:[`cases`],message:`at least one case must be visible`}),e.cases.some(e=>e.kind===`call`)&&!e.functionName&&t.addIssue({code:`custom`,path:[`functionName`],message:`functionName is required for call cases`}),e.cases.forEach((e,n)=>{if(e.kind!==`call`)return;let r;try{r=JSON.parse(e.args)}catch{return t.addIssue({code:`custom`,path:[`cases`,n,`args`],message:`args must be a JSON array`})}Array.isArray(r)||t.addIssue({code:`custom`,path:[`cases`,n,`args`],message:`args must be a JSON array`})})}var Zte=L({..._k,cases:I(hk).min(1).max(20).describe(`1-20 test cases. Keep each fast: every case has a 2 s limit.`),referenceSolution:F().min(1).max(rk).describe(`A complete correct solution. Mivra runs it on every case to get the expected results; it is never shown to the learner. It must be deterministic (no random numbers or clock time).`)}).strict().superRefine(vk),Qte=RT(`kind`,[pk.extend({expected:gk}),mk.extend({expected:gk})]),$te=L({..._k,cases:I(Qte).min(1).max(20),referenceSolution:F().max(rk)}).strict(),ene=RT(`kind`,[L({kind:HT(`stdio`),stdin:F(),hidden:MT(),expected:gk.optional()}).strict(),L({kind:HT(`call`),args:F(),hidden:MT(),expected:gk.optional()}).strict()]),tne=L({concept:F(),title:F(),instructions:F(),language:nk,starterCode:F(),functionName:F().optional(),cases:I(ene)}).strict(),nne=L({stdout:F().max(ok),stderr:F().max(ok).optional(),returned:F().max(ok).optional(),error:F().max(sk).optional()}).strict(),rne=L({code:F().max(ik),results:I(nne).min(1).max(20)}).strict(),ine=L({correct:MT(),passed:AT().int().nonnegative(),total:AT().int().positive(),cases:I(L({passed:MT()}).strict())}).strict();function yk(e){return e.replace(/\r\n?/g,`
|
|
122
|
-
`).split(`
|
|
123
|
-
`).map(e=>e.replace(/[ \t]+$/,``)).join(`
|
|
124
|
-
`).replace(/\n+$/,``)}function bk(e){return Array.isArray(e)?e.map(bk):e&&typeof e==`object`?Object.fromEntries(Object.keys(e).sort().map(t=>[t,bk(e[t])])):e}function ane(e,t){if(e===`undefined`||t===`undefined`)return e===t;try{return JSON.stringify(bk(JSON.parse(e)))===JSON.stringify(bk(JSON.parse(t)))}catch{return!1}}function xk(e,t){return t.error===void 0?`stdout`in e?yk(t.stdout)===yk(e.stdout):t.returned!==void 0&&ane(t.returned,e.returned):!1}var one=L({explanation:F().trim().min(1).max(500).describe(`What happens at this step and why, in one or two sentences.`),label:F().trim().min(1).max(80).optional().describe(`Optional short name for the step, e.g. "Initial render", "Click handler", "Render 2".`),lines:I(AT().int().positive()).max(40).optional().describe(`The 1-based line numbers in code.source this step is at. Not carried over: omit or leave empty to highlight none.`),variables:I(QO).max(12).describe(`All the state visible at this step, each name once, e.g. "n", "render.count", "handler.count", "queued update". Not carried over: list everything that still applies, or [] for none. Values are plain text, numbers or booleans; write undefined, null or a short object as a string.`),output:F().max(4e3).describe(`Everything visible as output at this step, as plain text, e.g. printed lines or what the page shows ("Count: 0"). Not carried over: repeat earlier output that is still visible, or "" for none.`)}).strict(),Sk=L({title:F().trim().min(1).max(120),code:$O.describe(`The source shown on every step. It stays the same across steps.`),steps:I(one).min(1).max(200)}).strict().superRefine((e,t)=>{let n=KO(e.code.source).length;e.steps.forEach((e,r)=>{e.lines?.forEach((e,i)=>{e>n&&t.addIssue({code:`custom`,path:[`steps`,r,`lines`,i],message:`line ${e} is outside the code (${n} lines)`})});let i=new Set;e.variables.forEach((e,n)=>{i.has(e.name)&&t.addIssue({code:`custom`,path:[`steps`,r,`variables`,n,`name`],message:`variable "${e.name}" appears twice in this step`}),i.add(e.name)})})}),Ck=1e3,wk=4e3,Tk=F().trim().min(1).max(24),Ek=F().trim().min(1).max(32),sne=VT([`active`,`done`,`muted`]),Dk=I(L({name:Ek.describe(`Literal property name, unique within its list. Not a formula.`),value:LT([AT(),MT(),F().max(64)]).describe(`A number, a boolean or literal text of at most 64 characters ("" is allowed). Never Markdown or a formula; write a list or object as short text.`)}).strict()).max(6),cne=RT(`type`,[L({type:HT(`text`),text:F().trim().min(1).max(280).describe(`A short note. Only $...$ is a formula; no Markdown.`)}).strict(),L({type:HT(`code`),language:Ek.describe(`The language, e.g. "Python" or "bytecode". Shown as a label; any language is accepted.`),code:F().overwrite(e=>e.replace(/\r\n?/g,`
|
|
125
|
-
`)).min(1).max(972).describe(`Plain text with newlines and its real indentation: at most 12 lines of at most 80 characters. No Markdown fences. Never run.`)}).strict(),L({type:HT(`math`),source:F().trim().min(1).max(300).describe(`One display formula as LaTeX, without dollar delimiters.`)}).strict()]),lne=L({id:Tk.describe(`Unique id, used by each step's placements.`),label:Ek.describe(`The container's name. Only $...$ is a formula.`),ordered:MT().describe(`True when position matters, as in a queue or stack: the first entity is then the front or top. Say which it is in the step's explanation.`)}).strict(),une=L({id:Tk.describe(`Unique id, used by connections and steps.`),label:Ek.describe(`Short name on the card. Only $...$ is a formula.`),properties:Dk.describe("The entity's declared properties, in display order; [] for none. A step shows these unless its `state` replaces them."),body:I(cne).max(2).optional().describe(`Up to 2 blocks of text, code or maths inside the card, the same on every step. Their text, code and source may total ${Ck} characters per entity and ${wk} over all entities.`)}).strict(),dne=L({id:Tk.describe(`Unique id, listed by each step that shows this connection.`),from:Tk.describe(`Id of the entity that holds the reference.`),to:Tk.describe("Id of the entity it refers to. Must differ from `from`."),label:Ek.optional().describe(`Optional name of the reference, e.g. "next". Only $...$ is a formula.`)}).strict(),fne=L({label:F().trim().min(1).max(80).optional().describe("Optional literal text for the step, shown in monospace, e.g. the statement `b = a`."),explanation:F().trim().min(1).max(500).describe(`What this step shows and what changed, in one or two sentences.`),placements:I(L({groupId:Tk,entityIds:I(Tk).max(16).describe(`The entities in this group at this step, top to bottom; [] for an empty group.`)}).strict()).max(4).describe(`Exactly one entry for every group, at every step. Not carried over from earlier steps.`),hidden:I(Tk).max(16).describe(`Every entity not shown at this step, e.g. before it is created. Each entity is in exactly one placement or here.`),connections:I(Tk).max(24).describe(`Ids of the connections shown at this step; [] for none. Not carried over, and both ends must be placed in a group.`),state:I(L({entityId:Tk,properties:Dk.describe(`The entity's whole property list at this step; [] shows none.`)}).strict()).max(16).optional().describe(`Entities whose properties differ from their declaration at this step, at most one entry each. Not carried over: an entity without an entry shows its declared properties again.`),emphasis:I(L({entityId:Tk,tone:sne.describe(`active = current focus, done = finished, muted = ruled out or idle.`)}).strict()).max(16).optional().describe(`Entities to emphasise at this step, at most one entry each. Not carried over.`),callouts:I(L({entityId:Tk,text:F().trim().min(1).max(140).describe(`A short note shown inside the card. Only $...$ is a formula.`)}).strict()).max(2).optional().describe(`Notes on entities at this step, at most one per entity. Not carried over.`)}).strict();function Ok(e,t,n){let r=new Set;e.forEach((e,i)=>{r.has(e.name)&&n.addIssue({code:`custom`,path:[...t,i,`name`],message:`property "${e.name}" appears twice in this list: keep one, or rename the other`}),r.add(e.name)})}var pne=e=>(e.type===`text`?e.text:e.type===`code`?e.code:e.source).length;function mne(e,t,n,r){let i=t+1,a=(e,n)=>r.addIssue({code:`custom`,path:[`steps`,t,...e],message:n}),o=new Set(n.groups.map(e=>e.id)),s=new Set(n.entities.map(e=>e.id)),c=new Set,l=new Map,u=new Set,d=(e,t,n)=>{if(!s.has(e))return a(n,`no entity has id "${e}": use a declared entity id`);let r=l.get(e);if(r!==void 0)return a(n,`entity "${e}" is already ${r} in step ${i}: list each entity exactly once per step`);l.set(e,t)};e.placements.forEach((e,t)=>{o.has(e.groupId)?c.has(e.groupId)&&a([`placements`,t,`groupId`],`group "${e.groupId}" has two placements in step ${i}: merge them into one`):a([`placements`,t,`groupId`],`no group has id "${e.groupId}": use a declared group id`),c.add(e.groupId),e.entityIds.forEach((n,r)=>{d(n,`in group "${e.groupId}"`,[`placements`,t,`entityIds`,r]),o.has(e.groupId)&&s.has(n)&&u.add(n)})});for(let e of n.groups)c.has(e.id)||a([`placements`],`step ${i} has no placement for group "${e.id}": add { groupId: "${e.id}", entityIds: [] } if it is empty`);e.hidden.forEach((e,t)=>{d(e,`hidden`,[`hidden`,t]),u.delete(e)});for(let e of n.entities)l.has(e.id)||a([],`entity "${e.id}" is not accounted for in step ${i}: list it in one placement's entityIds, or in hidden`);let f=new Set;e.connections.forEach((e,t)=>{let r=[`connections`,t],o=n.connections.get(e);if(!o)return a(r,`no connection has id "${e}": use a declared connection id`);f.has(e)&&a(r,`connection "${e}" is listed twice in step ${i}: list it once`),f.add(e);for(let t of[o.from,o.to])s.has(t)&&!u.has(t)&&a(r,`connection "${e}" needs entity "${t}", which is not placed in a group in step ${i}: place it, or leave the connection out of this step`)});let p=t=>{let n=new Set;e[t]?.forEach(({entityId:e},r)=>{let o=[t,r,`entityId`];if(!s.has(e))return a(o,`no entity has id "${e}": use a declared entity id`);n.has(e)&&a(o,`entity "${e}" has two ${t} entries in step ${i}: merge them into one`),n.add(e),u.has(e)||a(o,`entity "${e}" is not placed in a group in step ${i}: place it, or remove this ${t} entry`)})};p(`state`),p(`emphasis`),p(`callouts`),e.state?.forEach((e,n)=>Ok(e.properties,[`steps`,t,`state`,n,`properties`],r))}var kk=L({title:F().trim().min(1).max(120),groups:I(lne).min(1).max(4).describe(`The containers, in reading order. Groups don't nest.`),entities:I(une).min(1).max(16).describe(`Everything that is ever shown, declared once. Steps place or hide each one.`),connections:I(dne).max(24).describe(`Every directed reference that is ever shown; [] for none. Two entities may have several, each with its own id.`),steps:I(fne).min(1).max(20).describe(`Complete snapshots in order. One step makes a static diagram.`)}).strict().superRefine((e,t)=>{let n=new Map,r=(e,r,i)=>{let a=n.get(e);a?t.addIssue({code:`custom`,path:i,message:`id "${e}" is already used by a ${a}: give every group, entity and connection its own id`}):n.set(e,r)};e.groups.forEach((e,t)=>r(e.id,`group`,[`groups`,t,`id`])),e.entities.forEach((e,t)=>r(e.id,`entity`,[`entities`,t,`id`])),e.connections.forEach((e,t)=>r(e.id,`connection`,[`connections`,t,`id`]));let i=0;e.entities.forEach((e,n)=>{Ok(e.properties,[`entities`,n,`properties`],t);let r=0;e.body?.forEach((e,i)=>{if(r+=pne(e),e.type!==`code`)return;let a=[`entities`,n,`body`,i,`code`],o=KO(e.code);o.every(e=>e.trim()===``)&&t.addIssue({code:`custom`,path:a,message:`code has no code: write some, or remove the block`}),o.length>12&&t.addIssue({code:`custom`,path:a,message:`code has ${o.length} lines; at most 12 are allowed: shorten it`});let s=o.findIndex(e=>e.length>80);s>=0&&t.addIssue({code:`custom`,path:a,message:`line ${s+1} is longer than 80 characters: break or shorten it`})}),i+=r,r>1e3&&t.addIssue({code:`custom`,path:[`entities`,n,`body`],message:`entity "${e.id}" has ${r} characters of body content; at most ${Ck} are allowed: shorten its blocks`})}),i>4e3&&t.addIssue({code:`custom`,path:[`entities`],message:`the bodies total ${i} characters; at most ${wk} are allowed: shorten or remove some`});let a=new Set(e.entities.map(e=>e.id));e.connections.forEach((e,n)=>{for(let r of[`from`,`to`])a.has(e[r])||t.addIssue({code:`custom`,path:[`connections`,n,r],message:`no entity has id "${e[r]}": connections join declared entities`});e.from===e.to&&t.addIssue({code:`custom`,path:[`connections`,n,`to`],message:`connection "${e.id}" joins "${e.from}" to itself: its ends must be two different entities`})});let o={groups:e.groups,entities:e.entities,connections:new Map(e.connections.map(e=>[e.id,e]))};e.steps.forEach((e,n)=>mne(e,n,o,t))});function Ak(e,t){let n=Math.min(Math.max(Math.trunc(t)||0,0),e.steps.length-1),r=e.steps[n],i=new Map(e.entities.map(e=>[e.id,e])),a=new Map(r.placements.map(e=>[e.groupId,e.entityIds])),o=new Set([...a.values()].flat().filter(e=>i.has(e))),s=new Set(r.connections),c=e.connections.filter(e=>s.has(e.id)&&o.has(e.from)&&o.has(e.to)),l=new Map(r.state?.map(e=>[e.entityId,e.properties])),u=new Map(r.emphasis?.map(e=>[e.entityId,e.tone])),d=new Map(r.callouts?.map(e=>[e.entityId,e.text])),f=e=>({id:e.id,label:e.label,properties:l.get(e.id)??e.properties,body:e.body??[],tone:u.get(e.id),callout:d.get(e.id),references:c.filter(t=>t.from===e.id).map(e=>({connectionId:e.id,to:e.to,toLabel:i.get(e.to).label,label:e.label}))});return{index:n,label:r.label,explanation:r.explanation,groups:e.groups.map(e=>({...e,entities:(a.get(e.id)??[]).flatMap(e=>{let t=i.get(e);return t?[f(t)]:[]})})),connections:c}}var jk=e=>e===``?`""`:String(e).replaceAll(`$`,`\\$`);function Mk(e,t){let n=Ak(e,t),r=(e,t)=>`${t.get(e.from)} → ${t.get(e.to)}${e.label===void 0?``:` (${e.label})`}`,i=new Map(e.entities.map(e=>[e.id,e.label]));if(n.index===0)return[...n.groups.map(e=>({type:`initial`,text:e.entities.length?`${e.label} holds ${e.entities.map(e=>e.label).join(`, `)}.`:`${e.label} is empty.`})),...n.connections.map(e=>({type:`initial`,text:`${r(e,i)} is connected.`}))];let a=Ak(e,n.index-1),o=e=>new Map(e.groups.flatMap(e=>e.entities.map(t=>[t.id,{group:e,entity:t}]))),s=o(a),c=o(n),l=[];for(let{id:t,label:n}of e.entities){let e=s.get(t),r=c.get(t);!e&&r?l.push({type:`appeared`,entityId:t,groupId:r.group.id,text:`${n} appears in ${r.group.label}.`}):e&&!r?l.push({type:`hidden`,entityId:t,groupId:e.group.id,text:`${n} leaves ${e.group.label}.`}):e&&r&&e.group.id!==r.group.id&&l.push({type:`moved`,entityId:t,fromGroupId:e.group.id,toGroupId:r.group.id,text:`${n} moves from ${e.group.label} to ${r.group.label}.`})}for(let e of n.groups){let t=t=>t.map(e=>e.id).filter(t=>s.get(t)?.group.id===e.id&&c.get(t)?.group.id===e.id),n=t(e.entities),r=t(a.groups.find(t=>t.id===e.id).entities);n.some((e,t)=>e!==r[t])&&l.push({type:`reordered`,groupId:e.id,text:`${e.label} is reordered: ${e.entities.map(e=>e.label).join(`, `)}.`})}for(let{id:t,label:n}of e.entities){let e=s.get(t)?.entity,r=c.get(t)?.entity;if(!e||!r)continue;let i=new Map(e.properties.map(e=>[e.name,e.value])),a=new Set(r.properties.map(e=>e.name));for(let{name:e,value:a}of r.properties)i.has(e)?i.get(e)!==a&&l.push({type:`property_changed`,entityId:t,name:e,text:`${n}: ${jk(e)} changes from ${jk(i.get(e))} to ${jk(a)}.`}):l.push({type:`property_added`,entityId:t,name:e,text:`${n} gains ${jk(e)} = ${jk(a)}.`});for(let{name:r}of e.properties)a.has(r)||l.push({type:`property_removed`,entityId:t,name:r,text:`${n} loses ${jk(r)}.`})}let u=new Set(a.connections.map(e=>e.id)),d=new Set(n.connections.map(e=>e.id));for(let t of e.connections)d.has(t.id)&&!u.has(t.id)?l.push({type:`connection_added`,connectionId:t.id,text:`${r(t,i)} is connected.`}):u.has(t.id)&&!d.has(t.id)&&l.push({type:`connection_removed`,connectionId:t.id,text:`${r(t,i)} is disconnected.`});return l}var Nk={version:1,toolName:`show_composition`,description:"Show the learner where things are: entities as cards inside named groups, the references between them, and how that changes step by step. Use it for location, sharing and changing contents, such as two variables referring to one object (aliasing), values moving through pipeline stages, or tasks moving between a queue and a stack. Declare every group, entity and connection once, then give each step as a complete snapshot: one placement for every group (entityIds may be []), every other entity in `hidden`, and the ids of the connections shown. Nothing carries over between steps, so repeat whatever still applies; `state` replaces an entity's whole property list for that step only, and without it the entity shows its declared properties again. In an ordered group the first entity is the front or top: say in the explanation which end is which. Keep it small (roughly 3-8 entities and 3-8 steps) and make each explanation say what changed and why. Never give coordinates or styles: the layout is automatic. Code in a body is inert text. Use show_graph instead for topology, state machines, flowcharts, trees and graph algorithms, show_algorithm_trace for an algorithm over a sequence, show_code_walkthrough to explain source lines, show_table for tabular comparison, and show_set_diagram or show_worked_steps for sets and proofs.",spec:kk,input:HO(kk,[`title`,`groups.*.label`,`entities.*.label`,`entities.*.body.*.text`,`connections.*.label`,`steps.*.explanation`,`steps.*.callouts.*.text`])},Pk=L({id:F(),createdAt:F().datetime(),kind:HT(`composition`),version:HT(1),spec:kk}).strict(),Fk=F().trim().min(1).max(300),Ik=VT([`lessons`,`project`]);L({goal:Fk,kind:Ik.optional()}).strict();var Lk=F().trim().min(1).max(80),Rk=L({concept:Lk.describe(`The single concept this question probes, e.g. "chain rule". Reuse the exact name from the learner's record when it is there.`),question:F().trim().min(1).max(1e3),options:I(L({text:F().trim().min(1).max(300)}).strict()).min(2).max(5).describe(`2-5 options with distinct text. For true/false or yes/no use two options, e.g. "True" and "False". Never add a "Not sure" option: the UI always offers one.`),correctOptionIndex:AT().int().nonnegative().describe(`0-based index of the single correct option.`),explanation:F().trim().min(1).max(600).describe(`One or two sentences shown after answering: why the correct option is correct.`)}).strict().superRefine((e,t)=>{e.correctOptionIndex>=e.options.length&&t.addIssue({code:`custom`,path:[`correctOptionIndex`],message:`correctOptionIndex must point at one of the options`});let n=new Map;e.options.forEach((e,r)=>{let i=e.text.normalize(`NFC`),a=n.get(i);a===void 0?n.set(i,r):t.addIssue({code:`custom`,path:[`options`,r,`text`],message:`duplicates option ${a}`}),/^\s*(not sure|i don'?t know|unsure|skip)\W*$/i.test(e.text)&&t.addIssue({code:`custom`,path:[`options`,r,`text`],message:`Leave out Not sure / Skip: the UI always offers them`})})}),zk=L({concept:F(),question:F(),options:I(L({text:F()}).strict())}).strict(),Bk=LT([L({optionIndex:AT().int().nonnegative()}).strict(),L({unsure:HT(!0)}).strict(),L({skipped:HT(!0)}).strict()]),Vk=L({result:VT([`correct`,`incorrect`,`unsure`,`skipped`]),correctOptionIndex:AT().int().nonnegative(),explanation:F()}).strict(),Hk=2e3,Uk=L({question:F().trim().min(1).max(300).describe(`The question, e.g. "Anything else you'd like us to know about what you already understand or what you want to explore?"`)}).strict(),Wk=LT([L({text:F().trim().max(Hk)}).strict(),L({skipped:HT(!0)}).strict()]),Gk=L({result:VT([`answered`,`skipped`])}).strict(),Kk=VT([`memory`,`test`,`guess`]),qk=L({title:F().trim().min(1).max(120),summary:F().trim().min(1).max(400).describe(`What the lesson on this topic will cover, in one or two sentences.`),reason:F().trim().min(1).max(300).describe(`Why this topic is here for this learner, e.g. "You missed the question on local minima".`),requestedByLearner:MT().describe(`True if the learner explicitly asked for this topic. Such topics are never removed automatically.`),concepts:I(Lk).min(1).max(8).describe(`Concept names this topic teaches; reuse names from the learner's record and the placement questions.`)}).strict(),Jk=VT(`sigma.calculator.code.terminal.cpu.database.network.shield.flask-conical.atom.dna.leaf.telescope.globe.landmark.book-open.pen-tool.languages.music.palette.camera.brain.users.chart-line.briefcase.scale.stethoscope.heart-pulse.wrench.dumbbell`.split(`.`)),Yk=L({title:F().trim().min(1).max(60).optional().catch(void 0).describe(`A short name for the course, 2-5 words, shown in the sidebar, e.g. "Discrete Math: Induction". Name what the syllabus covers, not the request.`),icon:Jk.optional().catch(void 0).describe(`The subject icon that best fits the course: sigma = maths, calculator = arithmetic or accounting, code/terminal = programming, cpu = hardware, flask-conical = chemistry, atom = physics, dna = biology, leaf = ecology, telescope = astronomy, globe = geography, landmark = history, book-open = literature, pen-tool = writing, languages = languages, palette = art, brain = psychology, users = sociology, chart-line = economics or statistics, briefcase = business, scale = law, stethoscope/heart-pulse = medicine, wrench = engineering, dumbbell = sport.`),topics:I(qk).min(1).max(20).describe(`The ordered topics, first to learn first. Each topic gets one lesson.`),known:I(L({concept:Lk,source:Kk.describe(`memory = from their record or memories; test = from this placement interview; guess = your inference`),note:F().trim().min(1).max(200)}).strict()).max(20).describe(`What the learner already knows or doesn't, each labelled with where that comes from. Shown to the learner.`)}).strict().superRefine((e,t)=>{let n=new Set;e.topics.forEach((e,r)=>{let i=e.title.trim().toLowerCase();n.has(i)&&t.addIssue({code:`custom`,path:[`topics`,r,`title`],message:`Topic titles must be distinct`}),n.add(i)})}),Xk=qk.extend({id:F()}).strict(),Zk=L({version:AT().int().positive(),source:VT([`interview`,`tutor`,`adaptive`,`undo`]),reason:F().nullable(),changedTopicIds:I(F()),canUndo:MT(),topics:I(Xk),known:Yk.shape.known,createdAt:F().datetime()}).strict(),Qk=VT([`interviewing`,`active`,`complete`]),$k=L({id:F(),sessionId:F(),goal:F(),kind:Ik,status:Qk,syllabus:Zk.nullable(),interviewMessageId:F().nullable(),createdAt:F().datetime()}).strict(),eA=60,tA=200,nA=200,rA=F().trim().min(1).max(24),iA=F().trim().min(1).max(24),aA=VT([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished/visited, muted = ruled out. Defaults to active.`),oA=L({id:rA.describe(`Unique id, used by edges and steps. Shown on the node if it has no label.`),label:iA.optional().describe(`Short text on the node. Only $...$ is a formula, e.g. $v_1$.`)}).strict(),sA=L({from:rA.describe(`Id of a node. In a tree, the parent.`),to:rA.describe("Id of a node, the same as `from` for a self-loop. In a tree, the child; children appear left to right in edge order unless they have a `side`."),side:VT([`left`,`right`]).optional().describe("Only when kind is tree: which child this is of `from`, its parent. Set it on every edge of a binary search tree or binary tree traversal, because a lone left child and a lone right child are different trees. A node has at most one child per side, and either all of its children have a side or none do."),weight:AT().optional().describe(`Numeric weight shown on the edge. Give a weight or a label, not both.`),label:iA.optional().describe(`Text shown on the edge. Only $...$ is a formula.`)}).strict(),cA=L({id:rA.describe(`Id of a node.`),tone:aA}).strict(),lA=L({from:rA,to:rA,nth:AT().int().nonnegative().optional().describe("Only for parallel edges, and then required: which of the edges joining these nodes, 0-based in the order of `edges`."),tone:aA}).strict().describe(`An edge of the graph. In an undirected graph, from and to may be in either order.`),uA=L({explanation:F().trim().min(1).max(500).describe(`What happens in this step, in one or two sentences.`),nodeStates:I(cA).max(eA).optional().describe(`The state of every node that has one at this step, at most one each. Not carried over from earlier steps: repeat any that still apply.`),edgeStates:I(lA).max(tA).optional().describe(`The state of every edge that has one at this step, at most one each. Not carried over from earlier steps: repeat any that still apply.`),variables:I(QO).max(12).optional().describe(`All running state at this step, e.g. the queue or current distances. Not carried over from earlier steps.`)}).strict(),dA=(e,t,n)=>JSON.stringify(n||e<=t?[e,t]:[t,e]);function fA(e){let t=new Map;return e.edges.forEach((n,r)=>{let i=dA(n.from,n.to,e.directed),a=t.get(i);a?a.push(r):t.set(i,[r])}),n=>{let r=`${n.from} ${e.directed?`->`:`--`} ${n.to}`,i=t.get(dA(n.from,n.to,e.directed));if(!i)return{error:`there is no edge ${r}`};if(n.nth===void 0&&i.length>1)return{error:`${i.length} edges match ${r}: set nth to pick one`};let a=i[n.nth??0];return a===void 0?{error:`nth ${n.nth} is out of range: ${i.length} edges match ${r}`}:{index:a}}}function pA(e){if(e.edges.length!==e.nodes.length-1)return;let t=e.nodes.map(e=>e.id),n=new Map(t.map(e=>[e,[]]));for(let{from:t,to:r}of e.edges)n.get(t).push(r),!e.directed&&t!==r&&n.get(r).push(t);let r=e.directed?t.filter(t=>!e.edges.some(e=>e.to===t)):t.slice(0,1),i=r[0];if(r.length!==1||i===void 0)return;let a=new Map,o=[i];for(;o.length;){let e=o.pop(),t=n.get(e).filter(e=>!a.has(e));a.set(e,t),o.push(...t)}return a.size===t.length?{root:i,children:a}:void 0}function mA(e,t){let n=e.edges.flatMap((e,t)=>e.side?[{edge:e,side:e.side,path:[`edges`,t,`side`]}]:[]),r=n[0];if(!r)return;if(e.kind!==`tree`){for(let{path:e}of n)t.addIssue({code:`custom`,path:e,message:`side only applies when kind is "tree": remove it, or set kind`});return}let i=pA(e);if(!i){t.addIssue({code:`custom`,path:r.path,message:`side needs a real tree: connected with no cycles, and when directed, edges going parent to child from one root`});return}let a=new Map;for(let{edge:e,side:r,path:o}of n)i.children.get(e.from).includes(e.to)?a.set(e.to,r):t.addIssue({code:`custom`,path:o,message:`side needs from to be the parent, but ${e.to} is the parent of ${e.from} here: swap them`});for(let[e,n]of i.children){let r=n.flatMap(e=>a.get(e)??[]);r.length>0&&r.length<n.length&&t.addIssue({code:`custom`,path:[`edges`],message:`node ${e} mixes children with and without a side: give all of them one, or none`});for(let n of[`left`,`right`])r.filter(e=>e===n).length>1&&t.addIssue({code:`custom`,path:[`edges`],message:`node ${e} has two ${n} children`})}}var hA=L({title:F().trim().min(1).max(120),directed:MT().describe("True draws arrowheads from `from` to `to`."),kind:VT([`tree`,`graph`]).optional().describe("Layout hint. tree draws a rooted tree top-down, and needs a real tree: connected with no cycles, and when directed, edges going parent to child from one root. When undirected, the first node is the root. Anything else falls back to the general layout, unless an edge has a `side`, which is then an error. Defaults to graph."),nodes:I(oA).min(1).max(eA),edges:I(sA).max(tA).describe(`Self-loops and parallel edges are allowed.`),steps:I(uA).min(1).max(nA).optional().describe(`Omit to show the graph without stepping through it.`)}).strict().superRefine((e,t)=>{let n=new Set;e.nodes.forEach((e,r)=>{n.has(e.id)&&t.addIssue({code:`custom`,path:[`nodes`,r,`id`],message:`duplicate node id ${e.id}`}),n.add(e.id)}),e.edges.forEach((e,r)=>{for(let i of[`from`,`to`])n.has(e[i])||t.addIssue({code:`custom`,path:[`edges`,r,i],message:`no node has id ${e[i]}`});e.weight!==void 0&&e.label!==void 0&&t.addIssue({code:`custom`,path:[`edges`,r],message:`give a weight or a label, not both`})}),e.edges.every(e=>n.has(e.from)&&n.has(e.to))&&mA(e,t);let r=fA(e);e.steps?.forEach((e,i)=>{let a=new Set;e.nodeStates?.forEach((e,r)=>{let o=[`steps`,i,`nodeStates`,r];n.has(e.id)||t.addIssue({code:`custom`,path:o,message:`no node has id ${e.id}`}),a.has(e.id)&&t.addIssue({code:`custom`,path:o,message:`node ${e.id} has two states in one step`}),a.add(e.id)});let o=new Set;e.edgeStates?.forEach((e,n)=>{let a=[`steps`,i,`edgeStates`,n],s=r(e);if(`error`in s)return t.addIssue({code:`custom`,path:a,message:s.error});o.has(s.index)&&t.addIssue({code:`custom`,path:a,message:`edge ${s.index} has two states in one step`}),o.add(s.index)})})}),gA=L({text:F().trim().min(1).max(300),feedback:F().trim().min(1).max(500).optional().describe(`Shown if the learner picks this option: why it is right or what misconception it reflects.`)}).strict(),_A=L({concept:F().trim().min(1).max(80).describe(`Short label for the concept being checked, e.g. "sliding window invariant". Used to track progress.`),question:F().trim().min(1).max(1e3),options:I(gA).min(2).max(6).describe(`2-6 options with distinct text.`),correctOptionIndex:AT().int().nonnegative().describe(`0-based index of the single correct option; must be less than the number of options.`),explanation:F().trim().min(1).max(1e3).describe(`Shown after answering: why the correct option is correct.`)}).strict().superRefine((e,t)=>{e.correctOptionIndex>=e.options.length&&t.addIssue({code:`custom`,path:[`correctOptionIndex`],message:`correctOptionIndex must point at one of the options`});let n=new Map;e.options.forEach((e,r)=>{let i=e.text.normalize(`NFC`),a=n.get(i);a===void 0?n.set(i,r):t.addIssue({code:`custom`,path:[`options`,r,`text`],message:`duplicates option ${a}`})})}),vA=L({concept:F(),question:F(),options:I(L({text:F()}).strict())}).strict(),yA=L({optionIndex:AT().int().nonnegative()}).strict(),bA=L({correct:MT(),correctOptionIndex:AT().int().nonnegative(),explanation:F(),feedback:F().optional()}).strict(),xA=VT([`tests`,`review`]),SA=VT([`stdout`,`run_output`]),CA=2e4,wA=2e3,TA=6e4,EA=24e4,DA=F().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/),OA=L({name:F().trim().min(1).max(80).describe(`A short name the learner sees, e.g. "empty input" or "nested parentheses".`),input:F().max(ak).describe(`The case's input. The learner's program gets it on stdin and as a file whose path replaces {input} in their command. Use "" for none.`),compare:SA.optional().describe(`stdout (the default) compares what the learner's program prints. run_output is for programs whose output is itself a program, such as a compiler's generated assembly: Mivra runs that output with the learner's own run-output command and compares what it prints, so the reference prints what running it should print.`)}).strict(),kA={concept:F().trim().min(1).max(80).describe(`Short label for what this milestone practises, e.g. "tokenizing". Used to track progress.`),title:F().trim().min(1).max(120),spec:F().trim().min(1).max(6e3).describe(`What the learner's program must do at this milestone, as markdown: the behaviour to add, building on the earlier milestones.`),outputFormat:F().trim().min(1).max(2e3).describe(`Exactly what the program prints for an input, as markdown with an example, so any language can match it. Trailing spaces and trailing blank lines are ignored.`),checkType:xA.describe(`tests: Mivra runs the learner's program on the cases and compares what it prints, and a code review must approve too. review: no cases or reference; the code review alone decides, for what output can't show (structure, a language feature, concurrency, performance).`),reviewFocus:F().trim().min(1).max(2e3).optional().describe(`What the code review must see in the learner's code for this milestone's concept, e.g. "the scanner walks the characters itself rather than splitting with a regex". Required for a review milestone; optional for tests.`)};function AA(e,t){e.checkType===`tests`?(e.cases&&e.cases.length!==0||t.addIssue({code:`custom`,path:[`cases`],message:`A tests milestone needs at least one case.`}),e.referenceSolution||t.addIssue({code:`custom`,path:[`referenceSolution`],message:`A tests milestone needs a referenceSolution.`})):(e.cases&&e.cases.length>0&&t.addIssue({code:`custom`,path:[`cases`],message:`A review milestone has no cases: the code review decides. Leave cases out.`}),e.referenceSolution&&t.addIssue({code:`custom`,path:[`referenceSolution`],message:`A review milestone has no reference. Leave referenceSolution out.`}),e.reviewFocus||t.addIssue({code:`custom`,path:[`reviewFocus`],message:`A review milestone needs reviewFocus: what the review must see in the code.`}))}var jA=L({...kA,cases:I(OA).max(20).optional().describe(`tests only: 1-20 cases, simplest first, covering the milestone's edge cases. Each reference run has a 2 s limit. Leave out for review.`),referenceSolution:F().min(1).max(CA).optional().describe(`tests only: a Python program (standard library only) that reads a case's input from stdin and prints exactly what the learner's program should print, or for a run_output case what running its output should print. Mivra runs it in Pyodide on every case to get the expected outputs and never shows it. It must be deterministic. Leave out for review.`)}).strict().superRefine(AA),MA=OA.extend({expected:F().max(ok),withdrawn:MT().optional()}).strict(),NA=2e3,PA=VT([`kept`,`withdrawn`,`corrected`,`upheld`,`overturned`]),FA=L({id:F(),target:VT([`case`,`review`]),caseIndex:AT().int().nonnegative().optional(),caseName:F().optional(),reason:F().max(NA),outcome:PA,explanation:F().max(2e3),before:L({input:F(),expected:F()}).strict().optional(),createdAt:F().datetime()}).strict(),IA=L({...kA,cases:I(MA).max(20),referenceSolution:F().max(CA).optional(),disputes:I(FA).max(20).optional()}).strict(),LA=L({concept:F(),title:F(),spec:F(),outputFormat:F(),checkType:xA,reviewFocus:F().optional(),cases:I(L({name:F(),input:F(),compare:SA,expected:F(),withdrawn:MT().optional()}).strict()),disputes:I(FA)}).strict();L({courseId:F(),lessonId:F(),artifactId:F(),position:AT().int().positive(),title:F(),checkType:xA,revision:F().regex(/^[0-9a-f]{8,64}$/),since:DA.nullable(),cases:I(L({name:F(),input:F().max(ak),compare:SA}).strict()).max(20)}).strict();var RA=VT([`timeout`,`output_limit`,`start_failed`,`no_run_output_command`]),zA=L({stdout:F().max(ok),truncated:MT().optional(),stderr:F().max(wA).optional(),exitCode:AT().int().nullable(),error:RA.optional()}).strict(),BA=L({path:F().min(1).max(500),content:F().max(TA)}).strict(),VA=VT([`binary`,`too_large`,`size_cap`,`lockfile`]),HA={commit:DA.optional(),source:VT([`git`,`none`]).optional(),files:I(BA).max(200).optional(),skipped:I(L({path:F().max(500),reason:VA}).strict()).max(1e3).optional(),deleted:I(F().max(500)).max(1e3).optional()};L({results:I(zA).max(20),revision:F().max(64).optional(),...HA}).strict().superRefine((e,t)=>{(e.files??[]).reduce((e,t)=>e+t.content.length,0)>24e4&&t.addIssue({code:`custom`,path:[`files`],message:`At most ${EA} characters of files can be sent.`})});var UA=L({correct:MT(),passed:AT().int().nonnegative(),total:AT().int().nonnegative(),cases:I(L({passed:MT(),case:AT().int().nonnegative().optional()}).strict())}).strict(),WA=L({passed:MT(),note:F().trim().min(1).max(1e3).describe(`One to three sentences for the learner, pointing at the file and the code you mean.`)}).strict(),GA=L({noHardCodedOutputs:WA.describe(`passed is false if the program special-cases test inputs or prints canned answers instead of computing them, e.g. matching an input string and printing its expected output.`),concept:WA.describe(`passed is true if the code really does what this milestone teaches (its concept and reviewFocus), not just something that produces the same output.`),quality:WA.describe(`passed is false only for serious problems for a learner at this stage: code that can't be followed, copy-pasted blocks instead of a loop or function, or obvious bugs the tests miss. Style preferences never fail it.`),summary:F().trim().min(1).max(1500).describe(`What you'd tell the learner: what's good, and what to change if anything.`),suggestions:I(F().trim().min(1).max(500)).max(8).describe(`Optional next steps, most useful first. Never write the solution.`)}).strict().extend({approved:MT(),judgedBy:HT(`model`),model:F()}).strict(),KA=RT(`status`,[L({status:HT(`done`),review:GA}).strict(),L({status:HT(`skipped`),reason:VT([`tests_failed`,`no_files`])}).strict(),L({status:HT(`failed`),error:F()}).strict()]);L({grade:UA,expected:I(F()),review:KA,passed:MT()}).strict(),RT(`target`,[L({target:HT(`case`),caseIndex:AT().int().nonnegative().max(19),reason:F().trim().min(1).max(NA)}).strict(),L({target:HT(`review`),reason:F().trim().min(1).max(NA)}).strict()]),L({outcome:VT([`keep`,`withdraw`,`correct`]).describe(`keep: the case is right. withdraw: it's wrong or unfair and can't simply be fixed. correct: fix its input or the reference.`),explanation:F().trim().min(1).max(2e3).describe(`For the learner: why, in two or three sentences.`),input:F().max(ak).optional().describe(`correct only: the case's corrected input, if the input was wrong.`),referenceSolution:F().min(1).max(CA).optional().describe(`correct only: the whole corrected Python reference, if its output was wrong. Mivra reruns it on every case.`)}).strict();var qA=L({results:I(zA),files:I(F()),skipped:I(L({path:F(),reason:VA}).strict()).optional(),source:VT([`git`,`none`]).optional()}).strict(),JA=3,YA=8,XA=30,ZA=40,QA=F().trim().min(1).max(24),$A=/^[^\n\r\v\f\u0085\u2028\u2029]*$/,ej=e=>F().trim().min(1).max(e).regex($A,`must not contain line breaks`),tj=LT([AT(),ej(24)]);function nj(e){return JSON.stringify([...e].sort())}var rj=I(QA).max(JA),ij=L({id:QA.describe(`Short id used to refer to this set, e.g. "a". Unique within the diagram.`),label:ej(32).describe(`Shown next to the circle, e.g. "$A$" or "Multiples of 3", on one line. Only $...$ is a formula.`)}).strict(),aj=L({in:rj.describe('Ids of the sets this region is inside. It is outside all the others: with sets a, b, c, ["a","b"] means in a and b, not c. [] means outside every set and needs `universe`. No id twice.'),elements:I(tj).max(XA).describe(`What the region contains, each short and on one line. No element may appear twice, in this list or across regions, and 1 and "1" count as the same element. Empty if you only know the count, or the region is empty.`),count:AT().int().nonnegative().max(1e6).optional().describe(`How many elements the region has, when that's more than you list, e.g. for inclusion-exclusion. At least the number of elements listed.`)}).strict(),oj=L({in:rj.describe("The region to highlight, named like a region's `in`, with no id twice. Any region of the diagram can be highlighted, listed or not."),tone:VT([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished, muted = ruled out. Defaults to active.`)}).strict(),sj=L({explanation:F().trim().min(1).max(500).describe(`What this step shows, in one or two sentences.`),highlights:I(oj).max(YA).optional().describe(`All regions highlighted at this step, each at most once. They apply to this step only, not carried over: repeat any that still apply.`),variables:I(QO).max(12).optional().describe(`All running state at this step, e.g. |A ∪ B| so far. Not carried over from earlier steps.`)}).strict(),cj=L({title:F().trim().min(1).max(120),sets:I(ij).min(1).max(JA).describe(`The circles, 1 to 3.`),universe:ej(24).optional().describe(`Label of the rectangle around the sets, e.g. "$U$", on one line. Needed to show or highlight the region outside every set, such as a complement.`),regions:I(aj).max(YA).describe(`What each region contains, each region at most once.`),steps:I(sj).min(1).max(ZA).optional().describe(`Optional walk through the diagram. Omit for a static diagram.`)}).strict().superRefine((e,t)=>{let n=e.sets.map(e=>e.id);e.sets.forEach((e,r)=>{n.indexOf(e.id)!==r&&t.addIssue({code:`custom`,path:[`sets`,r,`id`],message:`duplicate set id "${e.id}"`})});let r=(r,i)=>{let a=new Set;r.forEach((r,o)=>{let s=[...i,o,`in`];r.in.forEach((e,i)=>{n.includes(e)||t.addIssue({code:`custom`,path:[...s,i],message:`unknown set "${e}"`}),r.in.indexOf(e)!==i&&t.addIssue({code:`custom`,path:[...s,i],message:`set "${e}" is named twice`})}),r.in.length===0&&e.universe===void 0&&t.addIssue({code:`custom`,path:s,message:"the region outside every set needs `universe`"});let c=nj(r.in);a.has(c)&&t.addIssue({code:`custom`,path:s,message:`region ${c} appears more than once`}),a.add(c)})};r(e.regions,[`regions`]),e.steps?.forEach((e,t)=>r(e.highlights??[],[`steps`,t,`highlights`]));let i=new Set;e.regions.forEach((e,n)=>{e.elements.forEach((e,r)=>{i.has(String(e))&&t.addIssue({code:`custom`,path:[`regions`,n,`elements`,r],message:`element "${e}" appears more than once; regions don't overlap`}),i.add(String(e))}),e.count!==void 0&&e.count<e.elements.length&&t.addIssue({code:`custom`,path:[`regions`,n,`count`],message:`count ${e.count} is less than the ${e.elements.length} elements listed`})})}),lj=16,uj=64,dj=100,fj=F().trim().min(1).max(80),pj=LT([AT(),MT(),F().max(120)]),mj=AT().int().nonnegative(),hj=L({row:mj.optional().describe(`0-based data row, below the number of rows. With no column, highlights the whole row. A highlight must give a row, a column or both.`),column:mj.optional().describe(`0-based data column, below the number of columns. With no row, highlights the whole column. With both, highlights one cell.`),tone:VT([`active`,`done`,`muted`]).optional().describe(`active = current focus, done = finished, muted = ruled out. Defaults to active. Where highlights overlap, the later one wins.`)}).strict(),gj=L({row:mj.describe(`0-based data row, below the number of rows.`),column:mj.describe(`0-based data column, below the number of columns.`),value:pj.describe(`The cell's value from this step on.`)}).strict(),_j=L({explanation:F().trim().min(1).max(500).describe(`What happens in this step, in one or two sentences.`),highlight:I(hj).max(32).optional().describe(`All cells, rows and columns to highlight at this step. Not carried over from earlier steps.`),cells:I(gj).max(64).optional().describe(`Cells this step fills in or changes. They keep the new value on later steps. To reveal working, start a cell as "" and set it here.`)}).strict(),vj=L({title:F().trim().min(1).max(120),columns:I(fj).min(1).max(lj).describe(`Column headers, one per data column. Don't include a header for rowHeaders.`),rows:I(I(pj).min(1).max(lj)).min(1).max(uj).describe(`Data rows, each with exactly one cell per column. A boolean shows as T or F; "" is a blank cell.`),rowHeaders:I(fj).max(uj).optional().describe(`Optional label for each row, e.g. a relation matrix's elements. Exactly one per row.`),steps:I(_j).min(1).max(dj).optional().describe(`Omit for a static table. With steps, the learner steps through them.`)}).strict().superRefine((e,t)=>{let n=e.rows.length,r=e.columns.length;e.rows.forEach((e,n)=>{e.length!==r&&t.addIssue({code:`custom`,path:[`rows`,n],message:`row has ${e.length} cells but there are ${r} columns`})}),e.rowHeaders&&e.rowHeaders.length!==n&&t.addIssue({code:`custom`,path:[`rowHeaders`],message:`${e.rowHeaders.length} row headers for ${n} rows`});let i=(e,r)=>{e>=n&&t.addIssue({code:`custom`,path:r,message:`row ${e} is outside the table (${n} rows)`})},a=(e,n)=>{e>=r&&t.addIssue({code:`custom`,path:n,message:`column ${e} is outside the table (${r} columns)`})};e.steps?.forEach((e,n)=>{e.highlight?.forEach((e,r)=>{let o=[`steps`,n,`highlight`,r];e.row===void 0&&e.column===void 0&&t.addIssue({code:`custom`,path:o,message:`a highlight needs a row, a column or both`}),e.row!==void 0&&i(e.row,[...o,`row`]),e.column!==void 0&&a(e.column,[...o,`column`])}),e.cells?.forEach((e,t)=>{i(e.row,[`steps`,n,`cells`,t,`row`]),a(e.column,[`steps`,n,`cells`,t,`column`])})})}),yj=50,bj=L({label:F().trim().min(1).max(40).optional().describe(`Optional heading for this part of the working, e.g. "Base case", "Inductive step".`),statement:F().trim().min(1).max(1e3).describe(`What this step establishes, mostly as a formula in $...$. For large sums and fractions, put \\displaystyle INSIDE the dollars, e.g. $\\displaystyle\\sum_{i=1}^{n} i$; $$ is not available.`),justification:F().trim().min(1).max(500).describe(`Why it follows, e.g. "by the inductive hypothesis".`)}).strict(),xj=L({title:F().trim().min(1).max(120),goal:F().trim().min(1).max(500).optional().describe(`Optional statement of what is being shown, e.g. the claim to prove.`),steps:I(bj).min(1).max(yj)}).strict(),Sj=`solution.py`;String.raw`
|
|
126
|
-
import builtins as _mivra_builtins, io as _mivra_io, json as _mivra_json, sys as _mivra_sys, traceback as _mivra_traceback
|
|
127
|
-
|
|
128
|
-
for _mivra_name in list(_mivra_sys.modules):
|
|
129
|
-
if _mivra_name == "js" or _mivra_name.startswith("js.") or _mivra_name == "pyodide_js" or _mivra_name.startswith("pyodide_js."):
|
|
130
|
-
del _mivra_sys.modules[_mivra_name]
|
|
131
|
-
|
|
132
|
-
_mivra_recursion_limit = _mivra_sys.getrecursionlimit()
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
class _MivraOutputLimit(BaseException):
|
|
136
|
-
pass
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
class _MivraSink:
|
|
140
|
-
def __init__(self, limit):
|
|
141
|
-
self.limit = limit
|
|
142
|
-
self.parts = ([], [])
|
|
143
|
-
self.used = 0
|
|
144
|
-
self.exceeded = False
|
|
145
|
-
|
|
146
|
-
def write(self, stream, text):
|
|
147
|
-
if self.exceeded:
|
|
148
|
-
raise _MivraOutputLimit()
|
|
149
|
-
room = self.limit - self.used
|
|
150
|
-
if len(text) > room:
|
|
151
|
-
self.exceeded = True
|
|
152
|
-
text = text[: max(0, room)]
|
|
153
|
-
self.parts[stream].append(text)
|
|
154
|
-
self.used += len(text)
|
|
155
|
-
if self.exceeded:
|
|
156
|
-
raise _MivraOutputLimit()
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
class _MivraStream(_mivra_io.TextIOBase):
|
|
160
|
-
def __init__(self, sink, stream):
|
|
161
|
-
self._sink = sink
|
|
162
|
-
self._stream = stream
|
|
163
|
-
|
|
164
|
-
def writable(self):
|
|
165
|
-
return True
|
|
166
|
-
|
|
167
|
-
def write(self, text):
|
|
168
|
-
if not isinstance(text, str):
|
|
169
|
-
raise TypeError("write() argument must be str, not " + type(text).__name__)
|
|
170
|
-
self._sink.write(self._stream, text)
|
|
171
|
-
return len(text)
|
|
172
|
-
|
|
173
|
-
def flush(self):
|
|
174
|
-
pass
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
def _mivra_describe(error):
|
|
178
|
-
name = type(error).__name__
|
|
179
|
-
text = str(error)
|
|
180
|
-
message = name + ": " + text if text else name
|
|
181
|
-
line = None
|
|
182
|
-
if isinstance(error, SyntaxError) and error.filename == "${Sj}":
|
|
183
|
-
line = error.lineno
|
|
184
|
-
for frame, lineno in _mivra_traceback.walk_tb(error.__traceback__):
|
|
185
|
-
if frame.f_code.co_filename == "${Sj}":
|
|
186
|
-
line = lineno
|
|
187
|
-
return message + (" (line " + str(line) + ")" if line else "")
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
def _mivra_run(code, function_name, kind, stdin, args_json, output_limit):
|
|
191
|
-
sink = _MivraSink(output_limit)
|
|
192
|
-
result = {}
|
|
193
|
-
_mivra_sys.setrecursionlimit(_mivra_recursion_limit)
|
|
194
|
-
_mivra_sys.stdin = _mivra_io.StringIO(stdin)
|
|
195
|
-
_mivra_sys.stdout = _MivraStream(sink, 0)
|
|
196
|
-
_mivra_sys.stderr = _MivraStream(sink, 1)
|
|
197
|
-
try:
|
|
198
|
-
namespace = {"__name__": "__main__", "__builtins__": _mivra_builtins}
|
|
199
|
-
exec(compile(code, "${Sj}", "exec"), namespace)
|
|
200
|
-
if kind == "call":
|
|
201
|
-
function = namespace.get(function_name)
|
|
202
|
-
if not callable(function):
|
|
203
|
-
raise TypeError(function_name + " is not defined as a function")
|
|
204
|
-
value = function(*_mivra_json.loads(args_json))
|
|
205
|
-
try:
|
|
206
|
-
returned = _mivra_json.dumps(value, allow_nan=False)
|
|
207
|
-
except (TypeError, ValueError) as error:
|
|
208
|
-
result["status"] = "error"
|
|
209
|
-
result["message"] = "The return value can't be recorded as JSON: " + type(error).__name__ + ": " + str(error)
|
|
210
|
-
else:
|
|
211
|
-
if len(returned) > output_limit:
|
|
212
|
-
result["status"] = "error"
|
|
213
|
-
result["message"] = "The return value is too large (over {:,} characters).".format(output_limit)
|
|
214
|
-
else:
|
|
215
|
-
result["returned"] = returned
|
|
216
|
-
except SystemExit as error:
|
|
217
|
-
if kind == "call":
|
|
218
|
-
result["status"] = "error"
|
|
219
|
-
result["message"] = "The code called exit() instead of returning."
|
|
220
|
-
elif error.code not in (None, 0):
|
|
221
|
-
result["status"] = "error"
|
|
222
|
-
result["message"] = "The program exited with status " + str(error.code) + "."
|
|
223
|
-
except _MivraOutputLimit:
|
|
224
|
-
result["status"] = "output"
|
|
225
|
-
except KeyboardInterrupt:
|
|
226
|
-
result["status"] = "time"
|
|
227
|
-
except RecursionError:
|
|
228
|
-
result["status"] = "stack"
|
|
229
|
-
except MemoryError:
|
|
230
|
-
result["status"] = "memory"
|
|
231
|
-
except BaseException as error:
|
|
232
|
-
result["status"] = "error"
|
|
233
|
-
result["message"] = _mivra_describe(error)
|
|
234
|
-
finally:
|
|
235
|
-
_mivra_sys.stdin = _mivra_sys.__stdin__
|
|
236
|
-
_mivra_sys.stdout = _mivra_sys.__stdout__
|
|
237
|
-
_mivra_sys.stderr = _mivra_sys.__stderr__
|
|
238
|
-
result["stdout"] = "".join(sink.parts[0])
|
|
239
|
-
result["stderr"] = "".join(sink.parts[1])
|
|
240
|
-
result["exceeded"] = sink.exceeded
|
|
241
|
-
return _mivra_json.dumps(result)
|
|
242
|
-
`;var Cj=VT([`prose`,`algorithm_trace`,`code_exercise`,`code_walkthrough`,`composition`,`graph`,`multiple_choice`,`project_milestone`,`set_diagram`,`table`,`worked_steps`]),wj=L({title:F().trim().min(1).max(120),sections:I(L({title:F().trim().min(1).max(120),kind:Cj.describe(`prose = write_lesson_text; multiple_choice = ask_multiple_choice (a check); code_exercise = ask_code_exercise (a JavaScript or Python exercise the learner solves and submits); project_milestone = set_project_milestone (project courses only: the milestone the learner builds in their repository); the others = the matching show_* tool.`),purpose:F().trim().min(1).max(300).describe(`What this section does for the learner, in one sentence.`)}).strict()).min(2).max(10)}).strict();wj.extend({sections:wj.shape.sections.describe(`2-10 sections in reading order. Include at least one multiple_choice check, usually after the idea it checks.`)}).strict().superRefine((e,t)=>{e.sections.some(e=>e.kind===`multiple_choice`)||t.addIssue({code:`custom`,path:[`sections`],message:`Include at least one multiple_choice check`}),e.sections.forEach((e,n)=>{e.kind===`project_milestone`&&t.addIssue({code:`custom`,path:[`sections`,n,`kind`],message:`project_milestone is only for project courses`})})}),wj.extend({sections:wj.shape.sections.describe(`2-10 sections in reading order: what the milestone needs, then exactly one project_milestone section, last.`)}).strict().superRefine((e,t)=>{(e.sections.filter(e=>e.kind===`project_milestone`).length!==1||e.sections.at(-1)?.kind!==`project_milestone`)&&t.addIssue({code:`custom`,path:[`sections`],message:`Include exactly one project_milestone section, as the last section`})}),L({markdown:F().trim().min(1).max(6e3).describe(`The section's prose, as markdown with $...$ and $$...$$ maths. Don't repeat the section title as a heading.`),revisits:I(F().min(1)).max(5).optional().describe(`sectionIds from <previous_lesson> this section revisits. The page links back to them, so don't write links yourself.`)}).strict();var Tj=VT([`generating`,`ready`,`failed`,`finished`]),Ej=L({title:F(),sections:I(L({title:F(),kind:Cj}).strict())}).strict(),Dj=L({id:F(),courseId:F(),topicId:F(),topicTitle:F(),position:AT().int().nonnegative(),status:Tj,version:AT().int().positive().nullable(),outline:Ej.nullable(),sections:I(RT(`kind`,[L({id:F(),title:F(),kind:HT(`prose`),markdown:F(),revisits:I(L({lessonId:F(),sectionId:F(),title:F(),lessonTitle:F()}).strict())}).strict(),L({id:F(),title:F(),kind:HT(`artifact`),artifact:NT()}).strict()])),checks:L({total:AT().int().nonnegative(),answered:AT().int().nonnegative()}).strict(),syllabusVersion:AT().int().positive().nullable(),changedSectionIds:I(F()),changeReason:F().nullable(),canFinish:MT(),error:F().nullable(),errorAction:VT([`lesson-model`]).nullable(),createdAt:F().datetime(),finishedAt:F().datetime().nullable()}).strict(),Oj=L({topics:I(L({topicId:F(),title:F(),lesson:L({id:F(),status:Tj}).strict().nullable()}).strict()),currentLessonId:F().nullable(),nextTopicId:F().nullable()}).strict(),kj=F().trim().min(1).max(120),Aj=F().trim().min(1).max(6e3),jj=F().trim().min(1).max(300);L({reason:jj.describe(`What the learner asked for, in a few words, e.g. "Simpler intro with an example".`),operations:I(RT(`op`,[L({op:HT(`rewrite`),sectionId:F().min(1),markdown:Aj,title:kj.optional()}).strict().describe(`Replace a prose section's text (and optionally its title).`),L({op:HT(`insert`),afterSectionId:F().min(1).nullable(),title:kj,markdown:Aj}).strict().describe(`Add a prose section after the given section, or first if null.`),L({op:HT(`insert_artifact`),afterSectionId:F().min(1).nullable(),title:kj,artifactId:F().min(1)}).strict().describe(`Add a card you created earlier in this reply (its artifactId) as a section.`),L({op:HT(`remove`),sectionId:F().min(1)}).strict(),L({op:HT(`move`),sectionId:F().min(1),afterSectionId:F().min(1).nullable()}).strict()])).min(1).max(10)}).strict(),L({reason:jj.describe(`What the learner asked for, e.g. "Add a topic on vectors before gradients".`),operations:I(RT(`op`,[L({op:HT(`insert`),afterTopicId:F().min(1).nullable().describe(`Insert after this topic; null to insert before the first future topic.`),title:kj,summary:F().trim().min(1).max(400),reason:jj,concepts:I(F().trim().min(1).max(80)).min(1).max(8)}).strict(),L({op:HT(`edit`),topicId:F().min(1),title:kj.optional(),summary:F().trim().min(1).max(400).optional()}).strict(),L({op:HT(`remove`),topicId:F().min(1)}).strict(),L({op:HT(`move`),topicId:F().min(1),afterTopicId:F().min(1).nullable()}).strict()])).min(1).max(10)}).strict(),L({messageId:F().min(1).max(128),afterSectionId:F().min(1).max(128).nullable(),title:kj}).strict();var Mj=L({title:kj,summary:F().trim().min(1).max(400),concepts:I(F().trim().min(1).max(80)).min(1).max(8)}).strict();L({reason:jj.describe(`Shown to the learner, with the evidence, e.g. "Added a chain rule refresher: you missed 3 of 4 checks on derivatives".`),operation:RT(`op`,[Mj.extend({op:HT(`insert`),afterTopicId:F().min(1).nullable().describe(`null = straight after this lesson's topic`)}).strict(),L({op:HT(`split`),topicId:F().min(1),into:I(Mj).min(2).max(3)}).strict(),L({op:HT(`move`),topicId:F().min(1),afterTopicId:F().min(1).nullable()}).strict()])}).strict();var Nj=VT([`goal`,`preference`,`misconception`,`known`]),Pj=VT([`goal`,`preference`,`misconception`]),Fj=F().trim().min(1).max(300);L({kind:Pj.describe(`goal = what they want to learn or do; preference = how they like to learn; misconception = something they believe that is wrong.`),text:Fj.describe(`One short sentence about the learner. Never include the answer to a check they haven't answered.`),concept:F().trim().min(1).max(80).optional().describe(`Required for a misconception: the concept it is about. Use the exact name from the check or from their record, so it can be linked to their answers.`),replaces:F().min(1).optional().describe(`The id of a known memory this one corrects or updates.`)}).strict().superRefine((e,t)=>{e.kind===`misconception`&&!e.concept&&t.addIssue({code:`custom`,path:[`concept`],message:`A misconception needs a concept`})});var Ij=VT([`wrong_answer`,`chat`,`import`]),Lj=L({id:F(),kind:Nj,held:MT(),text:F().nullable(),concept:F().nullable(),basis:Ij.nullable(),source:L({noteId:F(),importId:F(),importName:F(),path:F(),title:F()}).strict().nullable(),createdAt:F().datetime(),editedAt:F().datetime().nullable()}).strict();L({text:Fj}).strict(),L({basis:HT(`import`)}).strict();var Rj=26214400,zj=L({id:F(),sessionId:F(),messageId:F().nullable(),filename:F(),kind:VT([`pdf`,`pptx`]),byteSize:AT().int(),pageCount:AT().int(),pagesWithText:AT().int(),status:HT(`ready`),createdAt:F().datetime()}),Bj=F().regex(/^n\d{1,3}$/),Vj=F().trim().min(1).max(80),Hj=VT([`prerequisite`,`related`]);L({concepts:I(L({name:Vj.describe(`A name from <existing_concepts> or <vault_tags> when one fits. Otherwise a new name, written as it appears in the notes.`),notes:I(Bj).min(1).max(20).describe(`The refs of the notes that cover it.`)}).strict()).max(30),edges:I(L({from:Vj,to:Vj,kind:Hj.describe(`prerequisite = from must be understood before to; related = they're closely linked.`),note:Bj.describe(`The ref of the note that shows this link.`)}).strict()).max(40).describe(`Edges between concepts named in this call or in <existing_concepts>.`),memories:I(L({kind:VT([`known`,`goal`,`misconception`]).describe(`known = the notes cover this concept; goal = a goal the notes state; misconception = a wrong belief the notes state.`),text:Fj.describe(`One short sentence about the learner.`),concept:Vj.optional().describe(`Required for known and misconception: a concept named in this call or in <existing_concepts>.`),note:Bj.describe(`The ref of the note it comes from.`)}).strict()).max(30)}).strict();var Uj=L({status:VT([`idle`,`queued`,`running`,`cancelled`,`failed`]),pendingNotes:AT().int(),groups:AT().int(),groupsDone:AT().int(),error:F().nullable(),concepts:AT().int(),memories:AT().int()}).strict();L({concepts:I(L({id:F(),name:F(),notes:I(F())}).strict()),edges:I(L({from:F(),to:F(),kind:Hj,notes:I(F())}).strict())}).strict();var Wj=1e4,Gj=1e6,Kj=67108864,qj=I(L({path:F().min(1).max(512),text:F().max(Gj)}).strict()).max(Wj);L({name:F().trim().min(1).max(120),files:qj}).strict(),L({files:qj}).strict();var Jj=L({id:F(),name:F(),source:HT(`obsidian`),noteCount:AT().int(),createdAt:F().datetime(),updatedAt:F().datetime(),distillation:Uj}).strict(),Yj=VT([`not_markdown`,`hidden`,`bad_path`,`duplicate`,`too_long`,`symlink`,`generated`]),Xj=L({import:Jj,added:AT().int(),updated:AT().int(),removed:AT().int(),unchanged:AT().int(),skippedCount:AT().int(),skipped:I(L({path:F(),reason:Yj}).strict()),truncated:MT()}).strict(),Zj=L({id:F(),importId:F(),path:F(),title:F(),aliases:I(F()),tags:I(F()),body:F(),updatedAt:F().datetime()}).strict();L({notes:I(L({id:F(),path:F(),title:F(),tags:I(F())}).strict()),links:I(L({from:F(),to:F().nullable(),target:F(),kind:VT([`link`,`embed`])}).strict())}).strict(),L({mode:VT([`auto`,`local`]).default(`auto`),focus:F().max(64).optional(),depth:$T().int().min(1).max(3).default(2),tag:F().max(200).optional(),folder:F().max(512).optional()}).strict();var Qj=VT([`note`,`ghost`,`tag`,`concept`]),$j=VT([`link`,`tag`,`concept`,`prerequisite`,`related`]),eM=L({mode:VT([`whole`,`local`]),focus:F().nullable(),depth:AT().int(),totalNotes:AT().int(),matchingNotes:AT().int(),truncated:MT(),nodes:I(L({id:F(),kind:Qj,label:F(),path:F().optional(),notes:AT().int().optional(),hops:AT().int().optional()}).strict()),edges:I(L({from:F(),to:F(),kind:$j}).strict()),tags:I(L({name:F(),notes:AT().int()}).strict()),folders:I(L({path:F(),notes:AT().int()}).strict())}).strict(),tM=L({id:F(),title:F(),path:F()}).strict(),nM={algorithm_trace:{version:1,toolName:`show_algorithm_trace`,description:"Show the learner an interactive step-by-step trace of an algorithm running over a sequence (e.g. sliding window, two pointers, binary search, a simple sort). The learner steps through it with play/pause/step controls. Use it when watching state change step by step will make the idea click. Keep traces short (roughly 5-20 steps) and make each step's explanation say what changed and why. A code pane is optional: add `code` and each step's `lines` only when the code itself is the point, such as how an implementation's lines move the state, and leave it out when the idea matters more than any code. Write that code in the programming language the learner has shown proficiency in according to <learner_memories>; if they show none, use Python or pseudocode. Keep the code short, and highlight the lines each step is running. For code that doesn't move over a sequence, such as a plain function or a React render, use show_code_walkthrough instead of inventing an array.",spec:tk,input:HO(tk,[`title`,`steps.*.explanation`])},code_exercise:{version:1,toolName:`ask_code_exercise`,description:"Give the learner a short JavaScript or Python coding exercise to solve in an editor in the UI, after teaching an idea they can now practise by writing code. Use the language they are learning. They run the visible cases as often as they like, then submit once; their result is reported back to you on the next turn, so don't reveal or hint at a solution in your reply. Keep it to one small function or program (a few to about 30 lines), with 3-8 fast cases. Two kinds of case: a call case calls `functionName` (defined at the top level) with JSON arguments and compares its return value as JSON (key order ignored; in Python, None is null and tuples are lists), and a stdio case runs the whole program with the case's stdin and compares what it prints (trailing whitespace and trailing blank lines ignored). Prefer call cases; use stdio for programs that read input and print. JavaScript runs as plain JavaScript with no DOM, network, modules, timers or Node APIs: only console, the global `stdin` string and `readLine()` (the next input line, or null). Python runs in Pyodide with the standard library only: no network, files, threads, subprocesses or packages to install; read input with input() or sys.stdin and print with print(). Write a correct, deterministic referenceSolution in the same language: Mivra runs it on every case to get the expected results, rejecting the exercise if it fails, and never shows it. Hide a case or two that check edge cases. The starter code should give the function's signature (or the program's outline) and no solution.",spec:$te,input:HO(Zte,[`title`])},code_walkthrough:{version:1,toolName:`show_code_walkthrough`,description:`Show the learner a step-by-step walkthrough of a short piece of code that isn't about a sequence: a plain function's parameters, locals and return value, or a React component's renders, handlers and state updates. Each step highlights the source lines it is at and gives a complete snapshot of the visible state (\`variables\`) and the visible output (\`output\`, plain text such as printed lines or what the page shows, e.g. "Count: 0"); nothing carries over between steps, so repeat whatever still applies and use [] or "" for none. The source stays the same on every step. Use show_algorithm_trace instead for an algorithm moving over an array or other sequence, and show_graph for a component hierarchy. Keep the code short (a few to about 20 lines) and the walkthrough short (roughly 3-12 steps). Write the code in the language the concept belongs to (JSX for React); for a language-neutral idea, use the language the learner knows from <learner_memories>, else Python or pseudocode. The snapshots are your illustration, not a real run, so get them right. For React, keep the state a render or handler sees apart from updates it queues: inside a handler, state still has the value from the render it belongs to (name it, e.g. "handler.count" = 0, with "queued update" = "count + 1"), and the new value and its output appear only at the next render's step.`,spec:Sk,input:HO(Sk,[`title`,`steps.*.explanation`])},composition:Nk,graph:{version:1,toolName:`show_graph`,description:`Show the learner a graph or tree, drawn for you, optionally with steps they can walk through. Use it for graphs, trees, BFS, DFS, shortest paths, spanning trees and tree traversals, whenever seeing the structure or watching an algorithm move over it will help. Never give coordinates: the layout is automatic. For a binary search tree or binary tree traversal, set kind to tree and give every edge a side, so a lone left child and a lone right child are drawn differently. The automatic layout may draw crossing edges that mean nothing, even when the graph is planar, so don't use this to show whether a graph is planar. Keep it small enough to read (roughly 4-15 nodes, 5-20 steps) and make each step's explanation say what changed and why. For a component hierarchy (such as React components), set kind to tree and directed to true, with one node per component instance (distinct ids for two instances of the same component, labelled with the short component name) and one edge from each parent to each child it renders, labelled with the props it passes (e.g. "count" or "onClick"). Use steps to highlight where state is owned and the nodes and edges its value flows through, with variables for simple state such as count = 1. The nodes and edges stay the same on every step: don't add callback edges back up the tree, and don't suggest that a component's output changes just because it re-renders. To show where things are and how they move between containers, such as names sharing one object, values passing through pipeline stages or tasks moving between a queue and a stack, use show_composition instead.`,spec:hA,input:HO(hA,[`title`,`nodes.*.label`,`edges.*.label`,`steps.*.explanation`],(e,t)=>{e.nodes.forEach((e,n)=>{e.label===void 0&&VO(e.id,[`nodes`,n,`id`],t)})})},interview_context:{version:1,toolName:`ask_interview_context`,description:`Course placement interview only: ask the learner once, as the last question of the interview and in the same reply as the placement questions, whether there is anything else they want you to know about what they already understand or want to explore. They answer in their own words in the UI, or leave it blank; the answer is reported back to you with the placement results. Not graded.`,spec:Uk,input:HO(Uk,[`question`])},multiple_choice:{version:1,toolName:`ask_multiple_choice`,description:`Ask the learner one multiple-choice question to check understanding of a concept you just taught. Exactly one option is correct. Write plausible wrong options that reflect real misconceptions, and give per-option feedback where useful. The learner answers in the UI; the result is reported back to you on the next turn, so do not reveal the answer in your reply. For a code prediction, put the short snippet in a fenced code block in your reply text before this call and ask what it returns, prints or displays; the question and options render maths and plain text only, so never put code fences in them.`,spec:_A,input:HO(_A,[`question`,`options.*.text`,`options.*.feedback`,`explanation`])},placement_question:{version:1,toolName:`ask_placement_question`,description:`Course placement interview only: ask the learner one quick question to find out what they already know about one concept, before the syllabus is written. Use multiple choice, true/false or yes/no. The UI always adds "Not sure" and "Skip", so never include those as options. The learner answers in the UI and the result is reported back to you, so don't reveal the answer.`,spec:Rk,input:HO(Rk,[`question`,`options.*.text`,`explanation`])},project_milestone:{version:1,toolName:`set_project_milestone`,description:"Project course lessons only: set this lesson's milestone, the step of the project the learner builds next in their own repository, in whatever language they chose. They check it with `mivra check`, which runs their program on each case's input (on stdin, and as a file whose path replaces {input} in their command) and compares what it prints with what your Python referenceSolution prints for that input. Say exactly what to build in spec and exactly what to print in outputFormat, so a program in any language can match it; trailing spaces and trailing blank lines are ignored, everything else counts, and the program must exit with code 0. Write 3-12 small, fast cases, simplest first, that cover the milestone's edge cases. Mivra runs the reference on every case when you call this; if it fails or times out, nothing is saved and you get the reason, so fix it and call again. Use compare run_output only when the program's output is itself a program, such as generated assembly; the reference then prints what running that output should print. Every check also sends the learner's changed files to a code review, which must approve too: it fails hard-coded outputs, code that doesn't use the milestone's concept (say what it must show in reviewFocus) and seriously poor code. Use checkType review, with no cases or reference, for what output can't show (structure, a language feature, concurrency, performance); reviewFocus then says exactly what the code must show. Never show the reference or write the learner's solution.",spec:IA,input:HO(jA,[`title`])},set_diagram:{version:1,toolName:`show_set_diagram`,description:"Show the learner a Venn diagram of 1 to 3 sets, with what each region contains. Use it for set operations (union, intersection, complement, difference) and inclusion-exclusion, not for more than 3 sets. Keep elements short, because they are drawn in their region. Add steps to walk through it: each step highlights exact regions (any of them, including outside every set, which needs `universe`) and says what changed and why.",spec:cj,input:HO(cj,[`title`,`universe`,`sets.*.label`,`regions.*.elements.*`,`steps.*.explanation`,`steps.*.variables.*.name`,`steps.*.variables.*.value`])},table:{version:1,toolName:`show_table`,description:`Show the learner a table: a truth table, a relation matrix or other tabular working. Use it whenever the content is really rows and columns. Add steps when filling it in or highlighting it one part at a time will help, such as working out a truth table column by column; leave them out for a table to read at a glance. Keep steps short and make each explanation say what changed and why.`,spec:vj,input:HO(vj,[`title`,`columns.*`,`rowHeaders.*`,`rows.*.*`,`steps.*.explanation`,`steps.*.cells.*.value`])},worked_steps:{version:1,toolName:`show_worked_steps`,description:`Show the learner a proof, an induction or combinatorics working as a sequence of steps they reveal one at a time, each a statement with its justification. Use it when the reasoning is the point and each line follows from the ones before. Use show_algorithm_trace instead for an algorithm's state changing over a sequence.`,spec:xj,input:HO(xj,[`title`,`goal`,`steps.*.label`,`steps.*.statement`,`steps.*.justification`])}};VT(Object.keys(nM));var rM={id:F(),createdAt:F().datetime()},iM=L({answer:yA,grade:bA,createdAt:F().datetime()}).strict(),aM=L({answer:rne,grade:ine,createdAt:F().datetime()}).strict(),oM=L({answer:Wk,grade:Gk,createdAt:F().datetime()}).strict(),sM=L({answer:qA,grade:UA,createdAt:F().datetime()}).strict(),cM=L({review:GA,createdAt:F().datetime()}).strict(),lM=L({answer:Bk,grade:Vk,createdAt:F().datetime()}).strict(),uM=RT(`kind`,[L({...rM,kind:HT(`algorithm_trace`),version:HT(1),spec:tk}).strict(),L({...rM,kind:HT(`code_exercise`),version:HT(1),spec:tne,latestAttempt:aM.optional()}).strict(),L({...rM,kind:HT(`code_walkthrough`),version:HT(1),spec:Sk}).strict(),Pk,L({...rM,kind:HT(`graph`),version:HT(1),spec:hA}).strict(),L({...rM,kind:HT(`interview_context`),version:HT(1),spec:Uk,latestAttempt:oM.optional()}).strict(),L({...rM,kind:HT(`multiple_choice`),version:HT(1),spec:vA,latestAttempt:iM.optional()}).strict(),L({...rM,kind:HT(`placement_question`),version:HT(1),spec:zk,latestAttempt:lM.optional()}).strict(),L({...rM,kind:HT(`project_milestone`),version:HT(1),spec:LA,latestAttempt:sM.optional(),latestReview:cM.optional(),passed:MT().optional()}).strict(),L({...rM,kind:HT(`set_diagram`),version:HT(1),spec:cj}).strict(),L({...rM,kind:HT(`table`),version:HT(1),spec:vj}).strict(),L({...rM,kind:HT(`worked_steps`),version:HT(1),spec:xj}).strict()]),dM=`https://chatgpt.com/settings/usage`,fM=(e,t)=>(e=e.replace(/\/+$/,``),e+=`/`,t=t.replace(/^\/+/,``),e+t),pM=(e,t)=>{for(let[n,r]of Object.entries(t)){let t=RegExp(`/:`+n+`(?:{[^/]+})?\\??(?=/|$)`);e=e.replace(t,()=>r?`/${r}`:``)}return e},mM=e=>{let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(r!==void 0){if(Array.isArray(r))for(let e of r)e!==void 0&&t.append(n,e);else t.set(n,r)}return t},hM=(e,t)=>{switch(t){case`ws`:return e.replace(/^http/,`ws`);case`http`:return e.replace(/^ws/,`http`)}},gM=e=>/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(e)?e.replace(/\/index(?=\?|$)/,`/`):e.replace(/\/index(?=\?|$)/,``);function _M(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function vM(e,t){if(!_M(e)&&!_M(t))return t;let n={...e};for(let e in t){let r=t[e];n[e]=_M(n[e])&&_M(r)?vM(n[e],r):r}return n}var yM=/^[\w!#$%&'*.^`|~+-]+$/,bM=(e,t,n={})=>{if(!yM.test(e))throw Error(`Invalid cookie name`);let r=`${e}=${t}`;if(e.startsWith(`__Secure-`)&&!n.secure)throw Error(`__Secure- Cookie must have Secure attributes`);if(e.startsWith(`__Host-`)){if(!n.secure)throw Error(`__Host- Cookie must have Secure attributes`);if(n.path!==`/`)throw Error(`__Host- Cookie must have Path attributes with "/"`);if(n.domain)throw Error(`__Host- Cookie must not have Domain attributes`)}for(let e of[`domain`,`path`,`sameSite`,`priority`])if(n[e]&&/[;\r\n]/.test(n[e]))throw Error(`${e} must not contain ";", "\\r", or "\\n"`);if(n&&typeof n.maxAge==`number`&&n.maxAge>=0){if(n.maxAge>3456e4)throw Error(`Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.`);r+=`; Max-Age=${n.maxAge|0}`}if(n.domain&&n.prefix!==`host`&&(r+=`; Domain=${n.domain}`),n.path&&(r+=`; Path=${n.path}`),n.expires){if(n.expires.getTime()-Date.now()>3456e7)throw Error(`Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite&&(r+=`; SameSite=${n.sameSite.charAt(0).toUpperCase()+n.sameSite.slice(1)}`),n.priority&&(r+=`; Priority=${n.priority.charAt(0).toUpperCase()+n.priority.slice(1)}`),n.partitioned){if(!n.secure)throw Error(`Partitioned Cookie must have Secure attributes`);r+=`; Partitioned`}return r},xM=(e,t,n)=>(t=encodeURIComponent(t),bM(e,t,n)),SM=(e,t)=>new Proxy(()=>{},{get(n,r){if(typeof r==`string`&&r!==`then`)return SM(e,[...t,r])},apply(n,r,i){return e({path:t,args:i})}}),CM=(e,t)=>{let n=t.toString();return n?`${e}?${n}`:e},wM=class{url;method;buildSearchParams;queryParams=void 0;pathParams={};rBody;cType=void 0;constructor(e,t,n){this.url=e,this.method=t,this.buildSearchParams=n.buildSearchParams}fetch=async(e,t)=>{if(e){if(e.query&&(this.queryParams=this.buildSearchParams(e.query)),e.form){let t=new FormData;for(let[n,r]of Object.entries(e.form))if(r!==void 0){if(Array.isArray(r))for(let e of r)e!==void 0&&t.append(n,e);else t.append(n,r)}this.rBody=t}e.json!==void 0&&(this.rBody=JSON.stringify(e.json),this.cType=`application/json`),e.param&&(this.pathParams=e.param)}let n=this.method.toUpperCase(),r={...e?.header,...typeof t?.headers==`function`?await t.headers():t?.headers};if(e?.cookie){let t=[];for(let[n,r]of Object.entries(e.cookie))r!==void 0&&t.push(xM(n,r));t.length>0&&(r.Cookie=t.join(`; `))}this.cType&&(r[`Content-Type`]=this.cType);let i=new Headers;for(let[e,t]of Object.entries(r))t!==void 0&&i.set(e,t);let a=this.url;a=gM(a),a=pM(a,this.pathParams),this.queryParams&&(a=CM(a,this.queryParams)),n=this.method.toUpperCase();let o=n!==`GET`&&n!==`HEAD`;return(t?.fetch||fetch)(a,{body:o?this.rBody:void 0,method:n,headers:i,...t?.init})}},TM=(e,t)=>SM(function n(r){let i=t?.buildSearchParams??mM,a=[...r.path],o=a.slice(-3).reverse();if(o[0]===`toString`)return o[1]===`name`?o[2]||``:n.toString();if(o[0]===`valueOf`)return o[1]===`name`?o[2]||``:n;let s=``;if(/^\$/.test(o[0])){let e=a.pop();e&&(s=e.replace(/^\$/,``))}let c=fM(e,a.join(`/`));if(s===`url`||s===`path`){let t=gM(c);return r.args[0]&&(r.args[0].param&&(t=pM(t,r.args[0].param)),r.args[0].query&&(t=CM(t,i(r.args[0].query)))),s===`url`?new URL(t):t.slice(e.replace(/\/+$/,``).length).replace(/^\/?/,`/`)}if(s===`ws`){let e=gM(c),n=hM(r.args[0]?.param?pM(e,r.args[0].param):e,`ws`),a=new URL(n),o=r.args[0]?.query;return o&&i(o).forEach((e,t)=>{a.searchParams.append(t,e)}),((...e)=>t?.webSocket!==void 0&&typeof t.webSocket==`function`?t.webSocket(...e):new WebSocket(...e))(a.toString())}let l=new wM(c,s,{buildSearchParams:i});if(s){t??={};let e={...r.args[1]},n=t.headers,i=e.headers;n&&i&&(e.headers=async()=>({...typeof n==`function`?await n():n,...typeof i==`function`?await i():i}));let a=vM(t,e);return l.fetch(r.args[0],a)}return l},[]),EM=document.querySelector(`meta[name="mivra-token"]`)?.content??``,DM={Authorization:`Bearer ${EM}`},OM=TM(window.location.origin,{headers:DM}).api;async function kM(e){try{let t=await e.json();if(t.error)return t.error}catch{}return`${e.status} ${e.statusText}`}var AM=(e,t)=>PM(e,{optionIndex:t}),jM=(e,t)=>PM(e,t),MM=(e,t)=>PM(e,t),NM=(e,t)=>PM(e,t);async function PM(e,t){try{let n=await OM.artifacts[`:id`].attempts.$post({param:{id:e},json:{answer:t}});if(!n.ok)return{ok:!1,error:await kM(n)};let r=uM.safeParse(await n.json());return r.success?{ok:!0,view:r.data}:{ok:!1,error:`The server sent a reply this page can't display.`}}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}}async function FM(e,t){try{let n=await OM.artifacts[`:id`].disputes.$post({param:{id:e},json:t});if(!n.ok)return{ok:!1,error:await kM(n)};let r=uM.safeParse((await n.json()).view);return r.success?{ok:!0,view:r.data}:{ok:!1,error:`The server sent a reply this page can't display.`}}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}}async function IM(e){try{let t=await OM.sessions[`:id`].messages.$get({param:{id:e}});return t.ok?{ok:!0,messages:await t.json()}:{ok:!1,error:await kM(t)}}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}}async function LM(e,t){try{let n=await e();return n.ok?{ok:!0,value:await t(n)}:{ok:!1,error:await kM(n)}}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}}var RM=()=>LM(()=>OM.sessions.$post({json:{}}),async e=>await e.json()),zM=()=>LM(()=>OM.memories.$get(),async e=>Lj.array().parse(await e.json())),BM=(e,t)=>LM(()=>OM.memories[`:id`].$patch({param:{id:e},json:{text:t}}),async e=>Lj.parse(await e.json())),VM=e=>LM(()=>OM.memories[`:id`].$delete({param:{id:e}}),()=>void 0),HM=()=>LM(()=>OM.memories.$delete({query:{basis:`import`}}),async e=>(await e.json()).deleted),UM=e=>LM(()=>OM.sessions[`:id`].documents.$get({param:{id:e}}),async e=>zj.array().parse(await e.json())),WM=(e,t)=>{let n=new FormData;return n.append(`file`,t),LM(()=>fetch(`/api/sessions/${e}/documents`,{method:`POST`,headers:DM,body:n}),async e=>zj.parse(await e.json()))},GM=e=>LM(()=>OM.documents[`:id`].$delete({param:{id:e}}),()=>void 0),KM=()=>LM(()=>OM.imports.$get(),async e=>Jj.array().parse(await e.json())),qM=e=>LM(()=>OM.imports[`:id`].$delete({param:{id:e}}),()=>void 0),JM=e=>LM(()=>OM.imports[`:id`].distillation.$post({param:{id:e}}),async e=>Uj.parse(await e.json())),YM=e=>LM(()=>OM.imports[`:id`].distillation.$delete({param:{id:e}}),async e=>Uj.parse(await e.json())),XM=(e,{mode:t,focus:n,depth:r,tag:i,folder:a})=>LM(()=>OM.imports[`:id`].graph.view.$get({param:{id:e},query:{mode:t,depth:String(r),...n?{focus:n}:{},...i?{tag:i}:{},...a?{folder:a}:{}}}),async e=>eM.parse(await e.json())),ZM=(e,t)=>LM(()=>OM.imports[`:id`].notes.$get({param:{id:e},query:{q:t}}),async e=>tM.array().parse(await e.json())),QM=e=>LM(()=>OM.notes[`:id`].$get({param:{id:e}}),async e=>Zj.parse(await e.json())),$M=`These notes come to more than ${Kj/1048576} MB, more than one import can take.`,eN=(e,t)=>{let n=JSON.stringify(`importId`in e?{files:t}:{name:e.name,files:t});return new Blob([n]).size>67108864?Promise.resolve({ok:!1,error:$M}):LM(()=>`importId`in e?fetch(`/api/imports/${encodeURIComponent(e.importId)}/files`,{method:`PUT`,headers:{...DM,"content-type":`application/json`},body:n}):fetch(`/api/imports`,{method:`POST`,headers:{...DM,"content-type":`application/json`},body:n}),async e=>Xj.parse(await e.json()))},tN=(e,t)=>{if(t.size>67108864)return Promise.resolve({ok:!1,error:`This zip is over the ${Kj/1048576} MB limit.`});let n=new FormData;return`name`in e&&n.append(`name`,e.name),n.append(`file`,t),LM(()=>`importId`in e?fetch(`/api/imports/${encodeURIComponent(e.importId)}/zip`,{method:`PUT`,headers:DM,body:n}):fetch(`/api/imports/zip`,{method:`POST`,headers:DM,body:n}),async e=>Xj.parse(await e.json()))},nN=(e,t=`lessons`)=>LM(()=>OM.courses.$post({json:{goal:e,kind:t}}),async e=>{let t=await e.json();return{course:$k.parse(t.course),session:t.session}}),rN=e=>LM(()=>OM.sessions[`:id`].course.$get({param:{id:e}}),async e=>$k.parse(await e.json())),iN=e=>LM(()=>OM.courses[`:id`].lessons.$get({param:{id:e}}),async e=>Oj.parse(await e.json())),aN=async e=>{let t=await e.json();return{lesson:Dj.parse(t.lesson),revision:t.revision}},oN=(e,t)=>LM(()=>OM.courses[`:id`].lessons.$post({param:{id:e},json:{topicId:t}}),aN),sN=(e,t,n)=>LM(()=>OM.lessons[`:id`].$get({param:{id:e},query:t?{after:t}:{}},{init:{signal:n}}),aN),cN=e=>LM(()=>OM.lessons[`:id`].finish.$post({param:{id:e}}),aN),lN=e=>LM(()=>OM.lessons[`:id`].retry.$post({param:{id:e}}),aN),uN=(e,t)=>LM(()=>OM.lessons[`:id`].sections.$post({param:{id:e},json:t}),aN),dN=(e,t)=>LM(()=>OM.courses[`:id`].syllabus.undo.$post({param:{id:e},json:{version:t}}),async e=>$k.parse(await e.json())),fN=()=>LM(()=>OM.models.$get(),async e=>await e.json()),pN=e=>LM(()=>OM.settings.model.$put({json:e}),async e=>await e.json()),mN=e=>LM(()=>OM.settings[`pinned-models`].$put({json:{models:e}}),async e=>(await e.json()).pinned),hN=()=>LM(()=>OM.settings.tasks.$get(),async e=>(await e.json()).tasks),gN=(e,t)=>LM(()=>OM.settings.tasks[`:task`].$put({param:{task:e},json:t}),async e=>await e.json()),_N=e=>LM(()=>OM.settings.tasks[`:task`].$delete({param:{task:e}}),async e=>await e.json()),vN=e=>LM(()=>OM.usage.$get({query:{...e?{from:e.toISOString()}:{},tz:String(new Date().getTimezoneOffset())}}),async e=>await e.json()),yN=()=>LM(()=>OM.usage.$delete(),async e=>await e.json()),bN=(e,t)=>LM(()=>OM.usage.prices.$put({json:{model:e,price:t}}),async e=>await e.json()),xN=`mivra:open-usage`,SN=`mivra:open-settings`,CN=`mivra:providers-changed`,wN=async e=>(window.dispatchEvent(new Event(CN)),await e.json()),TN=()=>LM(()=>OM.settings.providers.$get(),async e=>await e.json()),EN=(e,t)=>LM(()=>OM.settings.providers[`:id`].$put({param:{id:e},json:{key:t}}),wN),DN=e=>LM(()=>OM.settings.providers[`:id`].$delete({param:{id:e}}),wN),ON=(e=!1)=>LM(()=>OM.settings.chatgpt[`sign-in`].$post({json:{newAccount:e}}),async e=>await e.json()),kN=e=>LM(()=>OM.settings.chatgpt[`sign-in`].complete.$post({json:{address:e}}),wN),AN=()=>LM(()=>OM.settings.chatgpt[`sign-in`].$delete(),wN),jN=()=>LM(()=>OM.settings.chatgpt.$delete(),wN),MN=()=>LM(()=>OM.settings.chatgpt.welcomed.$post(),async e=>await e.json()),NN=()=>LM(()=>OM.settings.chatgpt.check.$post(),async e=>await e.json()),PN=e=>LM(()=>OM.settings.providers[`:id`].check.$post({param:{id:e}}),async e=>await e.json()),FN=(e,t)=>LM(()=>OM.sessions[`:id`].$patch({param:{id:e},json:{title:t}}),async e=>await e.json()),IN=e=>LM(()=>OM.sessions[`:id`].$delete({param:{id:e}}),()=>void 0),LN=e=>LM(()=>OM.settings.providers.custom.$post({json:e}),wN),RN=(e,t)=>LM(()=>OM.settings.providers.custom[`:id`].$put({param:{id:e},json:t}),wN),zN=e=>LM(()=>OM.settings.providers.custom[`:id`].$delete({param:{id:e}}),wN),BN=e=>LM(()=>OM.settings.providers.custom[`:id`].refresh.$post({param:{id:e}}),wN),VN=(e,t,n)=>LM(()=>OM.settings.providers.custom[`:id`].test.$post({param:{id:e},json:{model:t}},{init:{signal:n}}),async e=>(window.dispatchEvent(new Event(CN)),await e.json()));async function HN(){let e;try{e=await fetch(`${window.location.origin}/api/export/obsidian`,{headers:DM})}catch{return{ok:!1,error:`Can't reach the Mivra server.`}}if(!e.ok)return{ok:!1,error:await kM(e)};let t=/filename="([^"]+)"/.exec(e.headers.get(`content-disposition`)??``)?.[1]??`Mivra.zip`,n;try{n=await e.blob()}catch{return{ok:!1,error:`The download didn't finish. Try again.`}}let r=URL.createObjectURL(n),i=document.createElement(`a`);return i.href=r,i.download=t,document.body.append(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),6e4),{ok:!0,filename:t}}function UN(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var WN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,KN={};function qN(e,t){return((t||KN).jsx?GN:WN).test(e)}var JN=/[ \t\n\f\r]/g;function YN(e){return typeof e==`object`?e.type===`text`&&XN(e.value):XN(e)}function XN(e){return e.replace(JN,``)===``}var ZN=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ZN.prototype.normal={},ZN.prototype.property={},ZN.prototype.space=void 0;function QN(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ZN(n,r,t)}function $N(e){return e.toLowerCase()}var eP=class{constructor(e,t){this.attribute=t,this.property=e}};eP.prototype.attribute=``,eP.prototype.booleanish=!1,eP.prototype.boolean=!1,eP.prototype.commaOrSpaceSeparated=!1,eP.prototype.commaSeparated=!1,eP.prototype.defined=!1,eP.prototype.mustUseProperty=!1,eP.prototype.number=!1,eP.prototype.overloadedBoolean=!1,eP.prototype.property=``,eP.prototype.spaceSeparated=!1,eP.prototype.space=void 0;var tP=s({boolean:()=>rP,booleanish:()=>iP,commaOrSpaceSeparated:()=>cP,commaSeparated:()=>sP,number:()=>z,overloadedBoolean:()=>aP,spaceSeparated:()=>oP}),nP=0,rP=lP(),iP=lP(),aP=lP(),z=lP(),oP=lP(),sP=lP(),cP=lP();function lP(){return 2**++nP}var uP=Object.keys(tP),dP=class extends eP{constructor(e,t,n,r){let i=-1;if(super(e,t),fP(this,`space`,r),typeof n==`number`)for(;++i<uP.length;){let e=uP[i];fP(this,uP[i],(n&tP[e])===tP[e])}}};dP.prototype.defined=!0;function fP(e,t,n){n&&(e[t]=n)}function pP(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new dP(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[$N(r)]=r,n[$N(a.attribute)]=r}return new ZN(t,n,e.space)}var mP=pP({properties:{ariaActiveDescendant:null,ariaAtomic:iP,ariaAutoComplete:null,ariaBusy:iP,ariaChecked:iP,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:oP,ariaCurrent:null,ariaDescribedBy:oP,ariaDetails:null,ariaDisabled:iP,ariaDropEffect:oP,ariaErrorMessage:null,ariaExpanded:iP,ariaFlowTo:oP,ariaGrabbed:iP,ariaHasPopup:null,ariaHidden:iP,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:oP,ariaLevel:z,ariaLive:null,ariaModal:iP,ariaMultiLine:iP,ariaMultiSelectable:iP,ariaOrientation:null,ariaOwns:oP,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:iP,ariaReadOnly:iP,ariaRelevant:null,ariaRequired:iP,ariaRoleDescription:oP,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:iP,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function hP(e,t){return t in e?e[t]:t}function gP(e,t){return hP(e,t.toLowerCase())}var _P=pP({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:sP,acceptCharset:oP,accessKey:oP,action:null,allow:null,allowFullScreen:rP,allowPaymentRequest:rP,allowUserMedia:rP,alpha:rP,alt:null,as:null,async:rP,autoCapitalize:null,autoComplete:oP,autoFocus:rP,autoPlay:rP,blocking:oP,capture:null,charSet:null,checked:rP,cite:null,className:oP,closedBy:null,colorSpace:null,cols:z,colSpan:z,command:null,commandFor:null,content:null,contentEditable:iP,controls:rP,controlsList:oP,coords:z|sP,crossOrigin:null,data:null,dateTime:null,decoding:null,default:rP,defer:rP,dir:null,dirName:null,disabled:rP,download:aP,draggable:iP,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:rP,formTarget:null,headers:oP,height:z,hidden:aP,high:z,href:null,hrefLang:null,htmlFor:oP,httpEquiv:oP,id:null,imageSizes:null,imageSrcSet:null,inert:rP,inputMode:null,integrity:null,is:null,isMap:rP,itemId:null,itemProp:oP,itemRef:oP,itemScope:rP,itemType:oP,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:rP,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:rP,muted:rP,name:null,nonce:null,noModule:rP,noValidate:rP,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:rP,optimum:z,pattern:null,ping:oP,placeholder:null,playsInline:rP,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:rP,referrerPolicy:null,rel:oP,required:rP,reversed:rP,rows:z,rowSpan:z,sandbox:oP,scope:null,scoped:rP,seamless:rP,selected:rP,shadowRootClonable:rP,shadowRootCustomElementRegistry:rP,shadowRootDelegatesFocus:rP,shadowRootMode:null,shadowRootSerializable:rP,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:iP,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:rP,useMap:null,value:iP,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:oP,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:rP,declare:rP,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:rP,noHref:rP,noShade:rP,noWrap:rP,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:iP,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:rP,disablePictureInPicture:rP,disableRemotePlayback:rP,exportParts:sP,part:oP,prefix:null,property:null,results:z,security:null,unselectable:null},space:`html`,transform:gP}),vP=pP({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:cP,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:oP,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:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:rP,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,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:sP,g2:sP,glyphName:sP,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:cP,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,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:z,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:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:oP,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:cP,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:cP,rev:cP,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:cP,requiredFeatures:cP,requiredFonts:cP,requiredFormats:cP,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:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:cP,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:cP,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:cP,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:hP}),yP=pP({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()}}),bP=pP({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:gP}),xP=pP({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),SP={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`},CP=/[A-Z]/g,wP=/-[a-z]/g,TP=/^data[-\w.:]+$/i;function EP(e,t){let n=$N(t),r=t,i=eP;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&TP.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(wP,OP);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!wP.test(e)){let n=e.replace(CP,DP);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=dP}return new i(r,t)}function DP(e){return`-`+e.toLowerCase()}function OP(e){return e.charAt(1).toUpperCase()}var kP=QN([mP,_P,yP,bP,xP],`html`),AP=QN([mP,vP,yP,bP,xP],`svg`);function jP(e){return e.join(` `).trim()}var MP=/\/\*(?:[^*]|\*(?!\/))*\*\//g,NP=/\n/g,PP=/^\s*/,FP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,IP=/^:\s*/,LP=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,RP=/^[;\s]*/,zP=`
|
|
243
|
-
`,BP=`/`,VP=`*`,HP=``,UP=`comment`,WP=`declaration`;function GP(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(NP);t&&(n+=t.length);var i=e.lastIndexOf(zP);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(PP)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(BP==e.charAt(0)&&VP==e.charAt(1)){for(var n=2;HP!=e.charAt(n)&&(VP!=e.charAt(n)||BP!=e.charAt(n+1));)++n;if(n+=2,HP===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:UP,comment:o})}}function f(){var e=a(),t=c(FP);if(t){if(d(),!c(IP))return s(`property missing ':'`);var n=c(LP),r=e({type:WP,property:t[0].replace(MP,HP).trim(),value:n?n[0].replace(MP,HP).trim():HP});return c(RP),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function KP(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=GP(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var qP=YP(`end`),JP=YP(`start`);function YP(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 XP(e){let t=JP(e),n=qP(e);if(t&&n)return{start:t,end:n}}function ZP(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?$P(e.position):`start`in e||`end`in e?$P(e):`line`in e||`column`in e?QP(e):``}function QP(e){return eF(e&&e.line)+`:`+eF(e&&e.column)}function $P(e){return QP(e&&e.start)+`-`+QP(e&&e.end)}function eF(e){return e&&typeof e==`number`?e:1}var tF=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=ZP(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}};tF.prototype.file=``,tF.prototype.name=``,tF.prototype.reason=``,tF.prototype.message=``,tF.prototype.stack=``,tF.prototype.column=void 0,tF.prototype.line=void 0,tF.prototype.ancestors=void 0,tF.prototype.cause=void 0,tF.prototype.fatal=void 0,tF.prototype.place=void 0,tF.prototype.ruleId=void 0,tF.prototype.source=void 0;var nF={}.hasOwnProperty,rF=new Map,iF=/[A-Z]/g,aF=/-([a-z])/g,oF=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),sF=new Set([`td`,`th`]),cF=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function lF(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=bF(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=yF(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`?AP:kP,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=uF(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function uF(e,t,n){if(t.type===`element`)return dF(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return fF(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return mF(e,t,n);if(t.type===`mdxjsEsm`)return pF(e,t);if(t.type===`root`)return hF(e,t,n);if(t.type===`text`)return gF(e,t)}function dF(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=AP,e.schema=i),e.ancestors.push(t);let a=EF(e,t.tagName,!1),o=xF(e,t),s=CF(e,t);return oF.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!YN(e)})),_F(e,o,a,t),vF(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function fF(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)}DF(e,t.position)}function pF(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);DF(e,t.position)}function mF(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=AP,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:EF(e,t.name,!0),o=SF(e,t),s=CF(e,t);return _F(e,o,a,t),vF(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function hF(e,t,n){let r={};return vF(r,CF(e,t)),e.create(t,e.Fragment,r,n)}function gF(e,t){return t.value}function _F(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function vF(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function yF(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 bF(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=JP(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 xF(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&nF.call(t.properties,i)){let a=wF(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&sF.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 SF(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 DF(e,t.position)}else{let{name:i}=r,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 DF(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function CF(e,t){let n=[],r=-1,i=e.passKeys?new Map:rF;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=uF(e,a,o);s!==void 0&&n.push(s)}return n}function wF(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=EP(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?UN(n):jP(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:OF(n):TF(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?SP[r.property]||r.property:r.attribute,n]}function TF(e,t){let n={};try{KP(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(aF,jF))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new tF("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=cF+`#cannot-parse-style-attribute`,r}return n}function EF(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=qN(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=qN(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return nF.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);DF(e)}function DF(e,t){let n=new tF("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=cF+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function OF(e){let t={},n;for(n in e)nF.call(e,n)&&(t[kF(n)]=e[n]);return t}function kF(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(iF,AF);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function AF(e){return`-`+e.toLowerCase()}function jF(e,t){return t.toUpperCase()}var MF={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`]},B=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},NF=/([A-Z])/g,PF=e=>e.replace(NF,`-$1`).toLowerCase(),FF={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},IF=/[&><"']/g,LF=e=>String(e).replace(IF,e=>FF[e]),RF=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?RF(e.body[0]):e:e.type===`font`?RF(e.body):e,zF=new Set([`mathord`,`textord`,`atom`]),BF=e=>zF.has(RF(e).type),VF=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},HF={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function UF(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function WF(e){return e.default===void 0?UF(Array.isArray(e.type)?e.type[0]:e.type):e.default}function GF(e,t,n,r){var i=n[t];e[t]=i===void 0?WF(r):r.processor?r.processor(i):i}var KF=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(HF)){var n=HF[t];n&&GF(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),r&&r!==`ignore`){if(r===!0||r===`error`)throw new B(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=VF(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},qF=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return nI[rI[this.id]]}sub(){return nI[iI[this.id]]}fracNum(){return nI[aI[this.id]]}fracDen(){return nI[oI[this.id]]}cramp(){return nI[sI[this.id]]}text(){return nI[cI[this.id]]}isTight(){return this.size>=2}},JF=0,YF=1,XF=2,ZF=3,QF=4,$F=5,eI=6,tI=7,nI=[new qF(JF,0,!1),new qF(YF,0,!0),new qF(XF,1,!1),new qF(ZF,1,!0),new qF(QF,2,!1),new qF($F,2,!0),new qF(eI,3,!1),new qF(tI,3,!0)],rI=[QF,$F,QF,$F,eI,tI,eI,tI],iI=[$F,$F,$F,$F,tI,tI,tI,tI],aI=[XF,ZF,QF,$F,eI,tI,eI,tI],oI=[ZF,ZF,$F,$F,tI,tI,tI,tI],sI=[YF,YF,ZF,ZF,$F,$F,tI,tI],cI=[JF,YF,XF,ZF,XF,ZF,XF,ZF],lI={DISPLAY:nI[JF],TEXT:nI[XF],SCRIPT:nI[QF],SCRIPTSCRIPT:nI[eI]},uI=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function dI(e){for(var t=0;t<uI.length;t++)for(var n=uI[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var fI=[];uI.forEach(e=>e.blocks.forEach(e=>fI.push(...e)));function pI(e){for(var t=0;t<fI.length;t+=2)if(e>=fI[t]&&e<=fI[t+1])return!0;return!1}var mI=e=>e+` `+e,hI=80,gI=function(e,t){return`M95,`+(622+e+t)+`
|
|
244
|
-
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
245
|
-
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
246
|
-
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
247
|
-
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
248
|
-
c69,-144,104.5,-217.7,106.5,-221
|
|
249
|
-
l`+e/2.075+` -`+e+`
|
|
250
|
-
c5.3,-9.3,12,-14,20,-14
|
|
251
|
-
H400000v`+(40+e)+`H845.2724
|
|
252
|
-
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
253
|
-
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
254
|
-
M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},_I=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
|
|
255
|
-
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
256
|
-
c340,-704.7,510.7,-1060.3,512,-1067
|
|
257
|
-
l`+e/2.084+` -`+e+`
|
|
258
|
-
c4.7,-7.3,11,-11,19,-11
|
|
259
|
-
H40000v`+(40+e)+`H1012.3
|
|
260
|
-
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
261
|
-
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
262
|
-
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
263
|
-
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
264
|
-
M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},vI=function(e,t){return`M983 `+(10+e+t)+`
|
|
265
|
-
l`+e/3.13+` -`+e+`
|
|
266
|
-
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
|
|
267
|
-
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
268
|
-
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
269
|
-
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
270
|
-
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
271
|
-
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
272
|
-
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
273
|
-
M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},yI=function(e,t){return`M424,`+(2398+e+t)+`
|
|
274
|
-
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
275
|
-
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
276
|
-
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
277
|
-
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
278
|
-
l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
|
|
279
|
-
v`+(40+e)+`H1014.6
|
|
280
|
-
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
281
|
-
c-2,6,-10,9,-24,9
|
|
282
|
-
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
|
|
283
|
-
h400000v`+(40+e)+`h-400000z`},bI=function(e,t){return`M473,`+(2713+e+t)+`
|
|
284
|
-
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
|
|
285
|
-
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
|
|
286
|
-
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
287
|
-
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
288
|
-
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
289
|
-
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
290
|
-
606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},xI=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},SI=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
|
|
291
|
-
H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
292
|
-
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
293
|
-
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
294
|
-
219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},CI=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=gI(t,hI);break;case`sqrtSize1`:r=_I(t,hI);break;case`sqrtSize2`:r=vI(t,hI);break;case`sqrtSize3`:r=yI(t,hI);break;case`sqrtSize4`:r=bI(t,hI);break;case`sqrtTall`:r=SI(t,hI,n)}return r},wI=function(e,t){switch(e){case`⎜`:return mI(`M291 0 H417 V`+t+` H291z`);case`∣`:return mI(`M145 0 H188 V`+t+` H145z`);case`∥`:return mI(`M145 0 H188 V`+t+` H145z`)+mI(`M367 0 H410 V`+t+` H367z`);case`⎟`:return mI(`M457 0 H583 V`+t+` H457z`);case`⎢`:return mI(`M319 0 H403 V`+t+` H319z`);case`⎥`:return mI(`M263 0 H347 V`+t+` H263z`);case`⎪`:return mI(`M384 0 H504 V`+t+` H384z`);case`⏐`:return mI(`M312 0 H355 V`+t+` H312z`);case`‖`:return mI(`M257 0 H300 V`+t+` H257z`)+mI(`M478 0 H521 V`+t+` H478z`);default:return``}},TI={doubleleftarrow:`M262 157
|
|
295
|
-
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
296
|
-
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
297
|
-
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
298
|
-
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
299
|
-
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
300
|
-
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
301
|
-
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
302
|
-
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
303
|
-
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
304
|
-
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
305
|
-
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
306
|
-
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
307
|
-
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
308
|
-
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
309
|
-
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
310
|
-
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
311
|
-
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
312
|
-
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
313
|
-
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
314
|
-
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
315
|
-
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
316
|
-
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
317
|
-
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
318
|
-
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
319
|
-
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
320
|
-
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
321
|
-
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
322
|
-
435 0h399565z`,leftgroupunder:`M400000 262
|
|
323
|
-
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
324
|
-
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
325
|
-
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
326
|
-
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
327
|
-
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
328
|
-
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
329
|
-
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
330
|
-
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
331
|
-
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
332
|
-
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
333
|
-
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
334
|
-
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
335
|
-
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
336
|
-
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
337
|
-
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
338
|
-
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
339
|
-
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
340
|
-
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:mI(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:mI(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:mI(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:mI(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
341
|
-
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
342
|
-
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
343
|
-
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:mI(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
|
|
344
|
-
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
345
|
-
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
346
|
-
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
347
|
-
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
348
|
-
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
349
|
-
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
350
|
-
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
351
|
-
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
352
|
-
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
353
|
-
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
354
|
-
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
355
|
-
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
356
|
-
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
357
|
-
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
358
|
-
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
359
|
-
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
360
|
-
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
361
|
-
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
362
|
-
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
363
|
-
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
364
|
-
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
365
|
-
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
366
|
-
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
367
|
-
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
368
|
-
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
369
|
-
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
370
|
-
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
371
|
-
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
372
|
-
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
373
|
-
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
374
|
-
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
375
|
-
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
376
|
-
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
377
|
-
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
378
|
-
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
379
|
-
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
380
|
-
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
381
|
-
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
382
|
-
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
383
|
-
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
384
|
-
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
385
|
-
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
386
|
-
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
387
|
-
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
388
|
-
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
389
|
-
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
390
|
-
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
391
|
-
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
392
|
-
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:mI(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:mI(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:mI(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
393
|
-
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
394
|
-
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
395
|
-
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
396
|
-
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
397
|
-
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
398
|
-
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
399
|
-
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
400
|
-
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
401
|
-
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
402
|
-
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
403
|
-
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
404
|
-
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
405
|
-
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
406
|
-
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
407
|
-
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
408
|
-
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
409
|
-
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
410
|
-
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
411
|
-
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
412
|
-
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
413
|
-
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
414
|
-
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
415
|
-
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
416
|
-
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
417
|
-
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
418
|
-
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
419
|
-
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
420
|
-
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
421
|
-
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
422
|
-
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
423
|
-
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
424
|
-
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
425
|
-
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
426
|
-
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
427
|
-
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
428
|
-
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
429
|
-
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
430
|
-
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
431
|
-
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
432
|
-
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
433
|
-
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
434
|
-
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
435
|
-
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
436
|
-
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
437
|
-
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
438
|
-
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
439
|
-
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
440
|
-
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
441
|
-
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
442
|
-
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
443
|
-
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
444
|
-
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
445
|
-
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
446
|
-
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
447
|
-
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
448
|
-
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
449
|
-
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
450
|
-
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
451
|
-
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
452
|
-
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
453
|
-
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
454
|
-
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
455
|
-
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
456
|
-
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
457
|
-
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
458
|
-
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
459
|
-
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
460
|
-
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
461
|
-
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
462
|
-
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
463
|
-
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
464
|
-
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
465
|
-
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},EI=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
|
|
466
|
-
H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
|
|
467
|
-
M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
468
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
469
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
470
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
471
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
|
|
472
|
-
M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
473
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
474
|
-
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
|
|
475
|
-
MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
|
|
476
|
-
MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
|
|
477
|
-
M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
|
|
478
|
-
M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
479
|
-
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
480
|
-
-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
481
|
-
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
482
|
-
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
483
|
-
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
484
|
-
l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
485
|
-
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
486
|
-
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
487
|
-
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
|
|
488
|
-
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
489
|
-
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
490
|
-
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
491
|
-
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
492
|
-
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
493
|
-
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function DI(e){return`toText`in e}var OI=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(DI(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},kI={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},hne={ex:!0,em:!0,mu:!0},AI=function(e){return typeof e!=`string`&&(e=e.unit),e in kI||e in hne||e===`ex`},jI=function(e,t){var n;if(e.unit in kI)n=kI[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new B(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},V=function(e){return+e.toFixed(4)+`em`},MI=function(e){return e.filter(e=>e).join(` `)},NI=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=PF(n)+`:`+r+`;`)}return t},PI=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},FI=function(e){var t=document.createElement(e);t.className=MI(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},gne=/[\s"'>/=\x00-\x1f]/,II=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+LF(MI(this.classes))+`"`);var n=NI(this.style);n&&(t+=` style="`+LF(n)+`"`);for(var r of Object.keys(this.attributes)){if(gne.test(r))throw new B(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+LF(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},LI=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,PI.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return FI.call(this,`span`)}toMarkup(){return II.call(this,`span`)}},RI=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,PI.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return FI.call(this,`a`)}toMarkup(){return II.call(this,`a`)}},_ne=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+LF(this.src)+`"`+(` alt="`+LF(this.alt)+`"`),t=NI(this.style);return t&&(e+=` style="`+LF(t)+`"`),e+=`'/>`,e}},vne={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},zI=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=dI(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=vne[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=V(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=MI(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=LF(MI(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+V(this.italic)+`;`),n+=NI(this.style),n&&(e=!0,t+=` style="`+LF(n)+`"`);var r=LF(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},BI=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+LF(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},VI=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,TI[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+LF(this.alternate)+`"/>`:`<path d="`+LF(TI[this.pathName])+`"/>`}},HI=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+LF(this.attributes[t])+`"`;return e+=`/>`,e}};function yne(e){if(e instanceof zI)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function bne(e){if(e instanceof LI)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var xne=e=>e instanceof LI||e instanceof RI||e instanceof OI,UI={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},WI={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},GI={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function Sne(e,t){UI[e]=t}function KI(e,t,n){if(!UI[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=UI[t][r];if(!i&&e[0]in GI&&(r=GI[e[0]].charCodeAt(0),i=UI[t][r]),!i&&n===`text`&&pI(r)&&(i=UI[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var qI={};function Cne(e){var t=e>=5?0:e>=3?1:2;if(!qI[t]){var n=qI[t]={cssEmPerMu:WI.quad[t]/18};for(var r in WI)WI.hasOwnProperty(r)&&(n[r]=WI[r][t])}return qI[t]}var JI={math:{},text:{}};function H(e,t,n,r,i,a){JI[e][i]={font:t,group:n,replace:r},a&&r&&(JI[e][r]=JI[e][i])}var U=`math`,W=`text`,G=`main`,K=`ams`,YI=`accent-token`,XI=`bin`,ZI=`close`,QI=`inner`,$I=`mathord`,eL=`op-token`,tL=`open`,nL=`punct`,q=`rel`,rL=`spacing`,J=`textord`;H(U,G,q,`≡`,`\\equiv`,!0),H(U,G,q,`≺`,`\\prec`,!0),H(U,G,q,`≻`,`\\succ`,!0),H(U,G,q,`∼`,`\\sim`,!0),H(U,G,q,`⊥`,`\\perp`),H(U,G,q,`⪯`,`\\preceq`,!0),H(U,G,q,`⪰`,`\\succeq`,!0),H(U,G,q,`≃`,`\\simeq`,!0),H(U,G,q,`∣`,`\\mid`,!0),H(U,G,q,`≪`,`\\ll`,!0),H(U,G,q,`≫`,`\\gg`,!0),H(U,G,q,`≍`,`\\asymp`,!0),H(U,G,q,`∥`,`\\parallel`),H(U,G,q,`⋈`,`\\bowtie`,!0),H(U,G,q,`⌣`,`\\smile`,!0),H(U,G,q,`⊑`,`\\sqsubseteq`,!0),H(U,G,q,`⊒`,`\\sqsupseteq`,!0),H(U,G,q,`≐`,`\\doteq`,!0),H(U,G,q,`⌢`,`\\frown`,!0),H(U,G,q,`∋`,`\\ni`,!0),H(U,G,q,`∝`,`\\propto`,!0),H(U,G,q,`⊢`,`\\vdash`,!0),H(U,G,q,`⊣`,`\\dashv`,!0),H(U,G,q,`∋`,`\\owns`),H(U,G,nL,`.`,`\\ldotp`),H(U,G,nL,`⋅`,`\\cdotp`),H(U,G,nL,`⋅`,`·`),H(W,G,J,`⋅`,`·`),H(U,G,J,`#`,`\\#`),H(W,G,J,`#`,`\\#`),H(U,G,J,`&`,`\\&`),H(W,G,J,`&`,`\\&`),H(U,G,J,`ℵ`,`\\aleph`,!0),H(U,G,J,`∀`,`\\forall`,!0),H(U,G,J,`ℏ`,`\\hbar`,!0),H(U,G,J,`∃`,`\\exists`,!0),H(U,G,J,`∇`,`\\nabla`,!0),H(U,G,J,`♭`,`\\flat`,!0),H(U,G,J,`ℓ`,`\\ell`,!0),H(U,G,J,`♮`,`\\natural`,!0),H(U,G,J,`♣`,`\\clubsuit`,!0),H(U,G,J,`℘`,`\\wp`,!0),H(U,G,J,`♯`,`\\sharp`,!0),H(U,G,J,`♢`,`\\diamondsuit`,!0),H(U,G,J,`ℜ`,`\\Re`,!0),H(U,G,J,`♡`,`\\heartsuit`,!0),H(U,G,J,`ℑ`,`\\Im`,!0),H(U,G,J,`♠`,`\\spadesuit`,!0),H(U,G,J,`§`,`\\S`,!0),H(W,G,J,`§`,`\\S`),H(U,G,J,`¶`,`\\P`,!0),H(W,G,J,`¶`,`\\P`),H(U,G,J,`†`,`\\dag`),H(W,G,J,`†`,`\\dag`),H(W,G,J,`†`,`\\textdagger`),H(U,G,J,`‡`,`\\ddag`),H(W,G,J,`‡`,`\\ddag`),H(W,G,J,`‡`,`\\textdaggerdbl`),H(U,G,ZI,`⎱`,`\\rmoustache`,!0),H(U,G,tL,`⎰`,`\\lmoustache`,!0),H(U,G,ZI,`⟯`,`\\rgroup`,!0),H(U,G,tL,`⟮`,`\\lgroup`,!0),H(U,G,XI,`∓`,`\\mp`,!0),H(U,G,XI,`⊖`,`\\ominus`,!0),H(U,G,XI,`⊎`,`\\uplus`,!0),H(U,G,XI,`⊓`,`\\sqcap`,!0),H(U,G,XI,`∗`,`\\ast`),H(U,G,XI,`⊔`,`\\sqcup`,!0),H(U,G,XI,`◯`,`\\bigcirc`,!0),H(U,G,XI,`∙`,`\\bullet`,!0),H(U,G,XI,`‡`,`\\ddagger`),H(U,G,XI,`≀`,`\\wr`,!0),H(U,G,XI,`⨿`,`\\amalg`),H(U,G,XI,`&`,`\\And`),H(U,G,q,`⟵`,`\\longleftarrow`,!0),H(U,G,q,`⇐`,`\\Leftarrow`,!0),H(U,G,q,`⟸`,`\\Longleftarrow`,!0),H(U,G,q,`⟶`,`\\longrightarrow`,!0),H(U,G,q,`⇒`,`\\Rightarrow`,!0),H(U,G,q,`⟹`,`\\Longrightarrow`,!0),H(U,G,q,`↔`,`\\leftrightarrow`,!0),H(U,G,q,`⟷`,`\\longleftrightarrow`,!0),H(U,G,q,`⇔`,`\\Leftrightarrow`,!0),H(U,G,q,`⟺`,`\\Longleftrightarrow`,!0),H(U,G,q,`↦`,`\\mapsto`,!0),H(U,G,q,`⟼`,`\\longmapsto`,!0),H(U,G,q,`↗`,`\\nearrow`,!0),H(U,G,q,`↩`,`\\hookleftarrow`,!0),H(U,G,q,`↪`,`\\hookrightarrow`,!0),H(U,G,q,`↘`,`\\searrow`,!0),H(U,G,q,`↼`,`\\leftharpoonup`,!0),H(U,G,q,`⇀`,`\\rightharpoonup`,!0),H(U,G,q,`↙`,`\\swarrow`,!0),H(U,G,q,`↽`,`\\leftharpoondown`,!0),H(U,G,q,`⇁`,`\\rightharpoondown`,!0),H(U,G,q,`↖`,`\\nwarrow`,!0),H(U,G,q,`⇌`,`\\rightleftharpoons`,!0),H(U,K,q,`≮`,`\\nless`,!0),H(U,K,q,``,`\\@nleqslant`),H(U,K,q,``,`\\@nleqq`),H(U,K,q,`⪇`,`\\lneq`,!0),H(U,K,q,`≨`,`\\lneqq`,!0),H(U,K,q,``,`\\@lvertneqq`),H(U,K,q,`⋦`,`\\lnsim`,!0),H(U,K,q,`⪉`,`\\lnapprox`,!0),H(U,K,q,`⊀`,`\\nprec`,!0),H(U,K,q,`⋠`,`\\npreceq`,!0),H(U,K,q,`⋨`,`\\precnsim`,!0),H(U,K,q,`⪹`,`\\precnapprox`,!0),H(U,K,q,`≁`,`\\nsim`,!0),H(U,K,q,``,`\\@nshortmid`),H(U,K,q,`∤`,`\\nmid`,!0),H(U,K,q,`⊬`,`\\nvdash`,!0),H(U,K,q,`⊭`,`\\nvDash`,!0),H(U,K,q,`⋪`,`\\ntriangleleft`),H(U,K,q,`⋬`,`\\ntrianglelefteq`,!0),H(U,K,q,`⊊`,`\\subsetneq`,!0),H(U,K,q,``,`\\@varsubsetneq`),H(U,K,q,`⫋`,`\\subsetneqq`,!0),H(U,K,q,``,`\\@varsubsetneqq`),H(U,K,q,`≯`,`\\ngtr`,!0),H(U,K,q,``,`\\@ngeqslant`),H(U,K,q,``,`\\@ngeqq`),H(U,K,q,`⪈`,`\\gneq`,!0),H(U,K,q,`≩`,`\\gneqq`,!0),H(U,K,q,``,`\\@gvertneqq`),H(U,K,q,`⋧`,`\\gnsim`,!0),H(U,K,q,`⪊`,`\\gnapprox`,!0),H(U,K,q,`⊁`,`\\nsucc`,!0),H(U,K,q,`⋡`,`\\nsucceq`,!0),H(U,K,q,`⋩`,`\\succnsim`,!0),H(U,K,q,`⪺`,`\\succnapprox`,!0),H(U,K,q,`≆`,`\\ncong`,!0),H(U,K,q,``,`\\@nshortparallel`),H(U,K,q,`∦`,`\\nparallel`,!0),H(U,K,q,`⊯`,`\\nVDash`,!0),H(U,K,q,`⋫`,`\\ntriangleright`),H(U,K,q,`⋭`,`\\ntrianglerighteq`,!0),H(U,K,q,``,`\\@nsupseteqq`),H(U,K,q,`⊋`,`\\supsetneq`,!0),H(U,K,q,``,`\\@varsupsetneq`),H(U,K,q,`⫌`,`\\supsetneqq`,!0),H(U,K,q,``,`\\@varsupsetneqq`),H(U,K,q,`⊮`,`\\nVdash`,!0),H(U,K,q,`⪵`,`\\precneqq`,!0),H(U,K,q,`⪶`,`\\succneqq`,!0),H(U,K,q,``,`\\@nsubseteqq`),H(U,K,XI,`⊴`,`\\unlhd`),H(U,K,XI,`⊵`,`\\unrhd`),H(U,K,q,`↚`,`\\nleftarrow`,!0),H(U,K,q,`↛`,`\\nrightarrow`,!0),H(U,K,q,`⇍`,`\\nLeftarrow`,!0),H(U,K,q,`⇏`,`\\nRightarrow`,!0),H(U,K,q,`↮`,`\\nleftrightarrow`,!0),H(U,K,q,`⇎`,`\\nLeftrightarrow`,!0),H(U,K,q,`△`,`\\vartriangle`),H(U,K,J,`ℏ`,`\\hslash`),H(U,K,J,`▽`,`\\triangledown`),H(U,K,J,`◊`,`\\lozenge`),H(U,K,J,`Ⓢ`,`\\circledS`),H(U,K,J,`®`,`\\circledR`),H(W,K,J,`®`,`\\circledR`),H(U,K,J,`∡`,`\\measuredangle`,!0),H(U,K,J,`∄`,`\\nexists`),H(U,K,J,`℧`,`\\mho`),H(U,K,J,`Ⅎ`,`\\Finv`,!0),H(U,K,J,`⅁`,`\\Game`,!0),H(U,K,J,`‵`,`\\backprime`),H(U,K,J,`▲`,`\\blacktriangle`),H(U,K,J,`▼`,`\\blacktriangledown`),H(U,K,J,`■`,`\\blacksquare`),H(U,K,J,`⧫`,`\\blacklozenge`),H(U,K,J,`★`,`\\bigstar`),H(U,K,J,`∢`,`\\sphericalangle`,!0),H(U,K,J,`∁`,`\\complement`,!0),H(U,K,J,`ð`,`\\eth`,!0),H(W,G,J,`ð`,`ð`),H(U,K,J,`╱`,`\\diagup`),H(U,K,J,`╲`,`\\diagdown`),H(U,K,J,`□`,`\\square`),H(U,K,J,`□`,`\\Box`),H(U,K,J,`◊`,`\\Diamond`),H(U,K,J,`¥`,`\\yen`,!0),H(W,K,J,`¥`,`\\yen`,!0),H(U,K,J,`✓`,`\\checkmark`,!0),H(W,K,J,`✓`,`\\checkmark`),H(U,K,J,`ℶ`,`\\beth`,!0),H(U,K,J,`ℸ`,`\\daleth`,!0),H(U,K,J,`ℷ`,`\\gimel`,!0),H(U,K,J,`ϝ`,`\\digamma`,!0),H(U,K,J,`ϰ`,`\\varkappa`),H(U,K,tL,`┌`,`\\@ulcorner`,!0),H(U,K,ZI,`┐`,`\\@urcorner`,!0),H(U,K,tL,`└`,`\\@llcorner`,!0),H(U,K,ZI,`┘`,`\\@lrcorner`,!0),H(U,K,q,`≦`,`\\leqq`,!0),H(U,K,q,`⩽`,`\\leqslant`,!0),H(U,K,q,`⪕`,`\\eqslantless`,!0),H(U,K,q,`≲`,`\\lesssim`,!0),H(U,K,q,`⪅`,`\\lessapprox`,!0),H(U,K,q,`≊`,`\\approxeq`,!0),H(U,K,XI,`⋖`,`\\lessdot`),H(U,K,q,`⋘`,`\\lll`,!0),H(U,K,q,`≶`,`\\lessgtr`,!0),H(U,K,q,`⋚`,`\\lesseqgtr`,!0),H(U,K,q,`⪋`,`\\lesseqqgtr`,!0),H(U,K,q,`≑`,`\\doteqdot`),H(U,K,q,`≓`,`\\risingdotseq`,!0),H(U,K,q,`≒`,`\\fallingdotseq`,!0),H(U,K,q,`∽`,`\\backsim`,!0),H(U,K,q,`⋍`,`\\backsimeq`,!0),H(U,K,q,`⫅`,`\\subseteqq`,!0),H(U,K,q,`⋐`,`\\Subset`,!0),H(U,K,q,`⊏`,`\\sqsubset`,!0),H(U,K,q,`≼`,`\\preccurlyeq`,!0),H(U,K,q,`⋞`,`\\curlyeqprec`,!0),H(U,K,q,`≾`,`\\precsim`,!0),H(U,K,q,`⪷`,`\\precapprox`,!0),H(U,K,q,`⊲`,`\\vartriangleleft`),H(U,K,q,`⊴`,`\\trianglelefteq`),H(U,K,q,`⊨`,`\\vDash`,!0),H(U,K,q,`⊪`,`\\Vvdash`,!0),H(U,K,q,`⌣`,`\\smallsmile`),H(U,K,q,`⌢`,`\\smallfrown`),H(U,K,q,`≏`,`\\bumpeq`,!0),H(U,K,q,`≎`,`\\Bumpeq`,!0),H(U,K,q,`≧`,`\\geqq`,!0),H(U,K,q,`⩾`,`\\geqslant`,!0),H(U,K,q,`⪖`,`\\eqslantgtr`,!0),H(U,K,q,`≳`,`\\gtrsim`,!0),H(U,K,q,`⪆`,`\\gtrapprox`,!0),H(U,K,XI,`⋗`,`\\gtrdot`),H(U,K,q,`⋙`,`\\ggg`,!0),H(U,K,q,`≷`,`\\gtrless`,!0),H(U,K,q,`⋛`,`\\gtreqless`,!0),H(U,K,q,`⪌`,`\\gtreqqless`,!0),H(U,K,q,`≖`,`\\eqcirc`,!0),H(U,K,q,`≗`,`\\circeq`,!0),H(U,K,q,`≜`,`\\triangleq`,!0),H(U,K,q,`∼`,`\\thicksim`),H(U,K,q,`≈`,`\\thickapprox`),H(U,K,q,`⫆`,`\\supseteqq`,!0),H(U,K,q,`⋑`,`\\Supset`,!0),H(U,K,q,`⊐`,`\\sqsupset`,!0),H(U,K,q,`≽`,`\\succcurlyeq`,!0),H(U,K,q,`⋟`,`\\curlyeqsucc`,!0),H(U,K,q,`≿`,`\\succsim`,!0),H(U,K,q,`⪸`,`\\succapprox`,!0),H(U,K,q,`⊳`,`\\vartriangleright`),H(U,K,q,`⊵`,`\\trianglerighteq`),H(U,K,q,`⊩`,`\\Vdash`,!0),H(U,K,q,`∣`,`\\shortmid`),H(U,K,q,`∥`,`\\shortparallel`),H(U,K,q,`≬`,`\\between`,!0),H(U,K,q,`⋔`,`\\pitchfork`,!0),H(U,K,q,`∝`,`\\varpropto`),H(U,K,q,`◀`,`\\blacktriangleleft`),H(U,K,q,`∴`,`\\therefore`,!0),H(U,K,q,`∍`,`\\backepsilon`),H(U,K,q,`▶`,`\\blacktriangleright`),H(U,K,q,`∵`,`\\because`,!0),H(U,K,q,`⋘`,`\\llless`),H(U,K,q,`⋙`,`\\gggtr`),H(U,K,XI,`⊲`,`\\lhd`),H(U,K,XI,`⊳`,`\\rhd`),H(U,K,q,`≂`,`\\eqsim`,!0),H(U,G,q,`⋈`,`\\Join`),H(U,K,q,`≑`,`\\Doteq`,!0),H(U,K,XI,`∔`,`\\dotplus`,!0),H(U,K,XI,`∖`,`\\smallsetminus`),H(U,K,XI,`⋒`,`\\Cap`,!0),H(U,K,XI,`⋓`,`\\Cup`,!0),H(U,K,XI,`⩞`,`\\doublebarwedge`,!0),H(U,K,XI,`⊟`,`\\boxminus`,!0),H(U,K,XI,`⊞`,`\\boxplus`,!0),H(U,K,XI,`⋇`,`\\divideontimes`,!0),H(U,K,XI,`⋉`,`\\ltimes`,!0),H(U,K,XI,`⋊`,`\\rtimes`,!0),H(U,K,XI,`⋋`,`\\leftthreetimes`,!0),H(U,K,XI,`⋌`,`\\rightthreetimes`,!0),H(U,K,XI,`⋏`,`\\curlywedge`,!0),H(U,K,XI,`⋎`,`\\curlyvee`,!0),H(U,K,XI,`⊝`,`\\circleddash`,!0),H(U,K,XI,`⊛`,`\\circledast`,!0),H(U,K,XI,`⋅`,`\\centerdot`),H(U,K,XI,`⊺`,`\\intercal`,!0),H(U,K,XI,`⋒`,`\\doublecap`),H(U,K,XI,`⋓`,`\\doublecup`),H(U,K,XI,`⊠`,`\\boxtimes`,!0),H(U,K,q,`⇢`,`\\dashrightarrow`,!0),H(U,K,q,`⇠`,`\\dashleftarrow`,!0),H(U,K,q,`⇇`,`\\leftleftarrows`,!0),H(U,K,q,`⇆`,`\\leftrightarrows`,!0),H(U,K,q,`⇚`,`\\Lleftarrow`,!0),H(U,K,q,`↞`,`\\twoheadleftarrow`,!0),H(U,K,q,`↢`,`\\leftarrowtail`,!0),H(U,K,q,`↫`,`\\looparrowleft`,!0),H(U,K,q,`⇋`,`\\leftrightharpoons`,!0),H(U,K,q,`↶`,`\\curvearrowleft`,!0),H(U,K,q,`↺`,`\\circlearrowleft`,!0),H(U,K,q,`↰`,`\\Lsh`,!0),H(U,K,q,`⇈`,`\\upuparrows`,!0),H(U,K,q,`↿`,`\\upharpoonleft`,!0),H(U,K,q,`⇃`,`\\downharpoonleft`,!0),H(U,G,q,`⊶`,`\\origof`,!0),H(U,G,q,`⊷`,`\\imageof`,!0),H(U,K,q,`⊸`,`\\multimap`,!0),H(U,K,q,`↭`,`\\leftrightsquigarrow`,!0),H(U,K,q,`⇉`,`\\rightrightarrows`,!0),H(U,K,q,`⇄`,`\\rightleftarrows`,!0),H(U,K,q,`↠`,`\\twoheadrightarrow`,!0),H(U,K,q,`↣`,`\\rightarrowtail`,!0),H(U,K,q,`↬`,`\\looparrowright`,!0),H(U,K,q,`↷`,`\\curvearrowright`,!0),H(U,K,q,`↻`,`\\circlearrowright`,!0),H(U,K,q,`↱`,`\\Rsh`,!0),H(U,K,q,`⇊`,`\\downdownarrows`,!0),H(U,K,q,`↾`,`\\upharpoonright`,!0),H(U,K,q,`⇂`,`\\downharpoonright`,!0),H(U,K,q,`⇝`,`\\rightsquigarrow`,!0),H(U,K,q,`⇝`,`\\leadsto`),H(U,K,q,`⇛`,`\\Rrightarrow`,!0),H(U,K,q,`↾`,`\\restriction`),H(U,G,J,`‘`,"`"),H(U,G,J,`$`,`\\$`),H(W,G,J,`$`,`\\$`),H(W,G,J,`$`,`\\textdollar`),H(U,G,J,`%`,`\\%`),H(W,G,J,`%`,`\\%`),H(U,G,J,`_`,`\\_`),H(W,G,J,`_`,`\\_`),H(W,G,J,`_`,`\\textunderscore`),H(U,G,J,`∠`,`\\angle`,!0),H(U,G,J,`∞`,`\\infty`,!0),H(U,G,J,`′`,`\\prime`),H(U,G,J,`△`,`\\triangle`),H(U,G,J,`Γ`,`\\Gamma`,!0),H(U,G,J,`Δ`,`\\Delta`,!0),H(U,G,J,`Θ`,`\\Theta`,!0),H(U,G,J,`Λ`,`\\Lambda`,!0),H(U,G,J,`Ξ`,`\\Xi`,!0),H(U,G,J,`Π`,`\\Pi`,!0),H(U,G,J,`Σ`,`\\Sigma`,!0),H(U,G,J,`Υ`,`\\Upsilon`,!0),H(U,G,J,`Φ`,`\\Phi`,!0),H(U,G,J,`Ψ`,`\\Psi`,!0),H(U,G,J,`Ω`,`\\Omega`,!0),H(U,G,J,`A`,`Α`),H(U,G,J,`B`,`Β`),H(U,G,J,`E`,`Ε`),H(U,G,J,`Z`,`Ζ`),H(U,G,J,`H`,`Η`),H(U,G,J,`I`,`Ι`),H(U,G,J,`K`,`Κ`),H(U,G,J,`M`,`Μ`),H(U,G,J,`N`,`Ν`),H(U,G,J,`O`,`Ο`),H(U,G,J,`P`,`Ρ`),H(U,G,J,`T`,`Τ`),H(U,G,J,`X`,`Χ`),H(U,G,J,`¬`,`\\neg`,!0),H(U,G,J,`¬`,`\\lnot`),H(U,G,J,`⊤`,`\\top`),H(U,G,J,`⊥`,`\\bot`),H(U,G,J,`∅`,`\\emptyset`),H(U,K,J,`∅`,`\\varnothing`),H(U,G,$I,`α`,`\\alpha`,!0),H(U,G,$I,`β`,`\\beta`,!0),H(U,G,$I,`γ`,`\\gamma`,!0),H(U,G,$I,`δ`,`\\delta`,!0),H(U,G,$I,`ϵ`,`\\epsilon`,!0),H(U,G,$I,`ζ`,`\\zeta`,!0),H(U,G,$I,`η`,`\\eta`,!0),H(U,G,$I,`θ`,`\\theta`,!0),H(U,G,$I,`ι`,`\\iota`,!0),H(U,G,$I,`κ`,`\\kappa`,!0),H(U,G,$I,`λ`,`\\lambda`,!0),H(U,G,$I,`μ`,`\\mu`,!0),H(U,G,$I,`ν`,`\\nu`,!0),H(U,G,$I,`ξ`,`\\xi`,!0),H(U,G,$I,`ο`,`\\omicron`,!0),H(U,G,$I,`π`,`\\pi`,!0),H(U,G,$I,`ρ`,`\\rho`,!0),H(U,G,$I,`σ`,`\\sigma`,!0),H(U,G,$I,`τ`,`\\tau`,!0),H(U,G,$I,`υ`,`\\upsilon`,!0),H(U,G,$I,`ϕ`,`\\phi`,!0),H(U,G,$I,`χ`,`\\chi`,!0),H(U,G,$I,`ψ`,`\\psi`,!0),H(U,G,$I,`ω`,`\\omega`,!0),H(U,G,$I,`ε`,`\\varepsilon`,!0),H(U,G,$I,`ϑ`,`\\vartheta`,!0),H(U,G,$I,`ϖ`,`\\varpi`,!0),H(U,G,$I,`ϱ`,`\\varrho`,!0),H(U,G,$I,`ς`,`\\varsigma`,!0),H(U,G,$I,`φ`,`\\varphi`,!0),H(U,G,XI,`∗`,`*`,!0),H(U,G,XI,`+`,`+`),H(U,G,XI,`−`,`-`,!0),H(U,G,XI,`⋅`,`\\cdot`,!0),H(U,G,XI,`∘`,`\\circ`,!0),H(U,G,XI,`÷`,`\\div`,!0),H(U,G,XI,`±`,`\\pm`,!0),H(U,G,XI,`×`,`\\times`,!0),H(U,G,XI,`∩`,`\\cap`,!0),H(U,G,XI,`∪`,`\\cup`,!0),H(U,G,XI,`∖`,`\\setminus`,!0),H(U,G,XI,`∧`,`\\land`),H(U,G,XI,`∨`,`\\lor`),H(U,G,XI,`∧`,`\\wedge`,!0),H(U,G,XI,`∨`,`\\vee`,!0),H(U,G,J,`√`,`\\surd`),H(U,G,tL,`⟨`,`\\langle`,!0),H(U,G,tL,`∣`,`\\lvert`),H(U,G,tL,`∥`,`\\lVert`),H(U,G,ZI,`?`,`?`),H(U,G,ZI,`!`,`!`),H(U,G,ZI,`⟩`,`\\rangle`,!0),H(U,G,ZI,`∣`,`\\rvert`),H(U,G,ZI,`∥`,`\\rVert`),H(U,G,q,`=`,`=`),H(U,G,q,`:`,`:`),H(U,G,q,`≈`,`\\approx`,!0),H(U,G,q,`≅`,`\\cong`,!0),H(U,G,q,`≥`,`\\ge`),H(U,G,q,`≥`,`\\geq`,!0),H(U,G,q,`←`,`\\gets`),H(U,G,q,`>`,`\\gt`,!0),H(U,G,q,`∈`,`\\in`,!0),H(U,G,q,``,`\\@not`),H(U,G,q,`⊂`,`\\subset`,!0),H(U,G,q,`⊃`,`\\supset`,!0),H(U,G,q,`⊆`,`\\subseteq`,!0),H(U,G,q,`⊇`,`\\supseteq`,!0),H(U,K,q,`⊈`,`\\nsubseteq`,!0),H(U,K,q,`⊉`,`\\nsupseteq`,!0),H(U,G,q,`⊨`,`\\models`),H(U,G,q,`←`,`\\leftarrow`,!0),H(U,G,q,`≤`,`\\le`),H(U,G,q,`≤`,`\\leq`,!0),H(U,G,q,`<`,`\\lt`,!0),H(U,G,q,`→`,`\\rightarrow`,!0),H(U,G,q,`→`,`\\to`),H(U,K,q,`≱`,`\\ngeq`,!0),H(U,K,q,`≰`,`\\nleq`,!0),H(U,G,rL,`\xA0`,`\\ `),H(U,G,rL,`\xA0`,`\\space`),H(U,G,rL,`\xA0`,`\\nobreakspace`),H(W,G,rL,`\xA0`,`\\ `),H(W,G,rL,`\xA0`,` `),H(W,G,rL,`\xA0`,`\\space`),H(W,G,rL,`\xA0`,`\\nobreakspace`),H(U,G,rL,``,`\\nobreak`),H(U,G,rL,``,`\\allowbreak`),H(U,G,nL,`,`,`,`),H(U,G,nL,`;`,`;`),H(U,K,XI,`⊼`,`\\barwedge`,!0),H(U,K,XI,`⊻`,`\\veebar`,!0),H(U,G,XI,`⊙`,`\\odot`,!0),H(U,G,XI,`⊕`,`\\oplus`,!0),H(U,G,XI,`⊗`,`\\otimes`,!0),H(U,G,J,`∂`,`\\partial`,!0),H(U,G,XI,`⊘`,`\\oslash`,!0),H(U,K,XI,`⊚`,`\\circledcirc`,!0),H(U,K,XI,`⊡`,`\\boxdot`,!0),H(U,G,XI,`△`,`\\bigtriangleup`),H(U,G,XI,`▽`,`\\bigtriangledown`),H(U,G,XI,`†`,`\\dagger`),H(U,G,XI,`⋄`,`\\diamond`),H(U,G,XI,`⋆`,`\\star`),H(U,G,XI,`◃`,`\\triangleleft`),H(U,G,XI,`▹`,`\\triangleright`),H(U,G,tL,`{`,`\\{`),H(W,G,J,`{`,`\\{`),H(W,G,J,`{`,`\\textbraceleft`),H(U,G,ZI,`}`,`\\}`),H(W,G,J,`}`,`\\}`),H(W,G,J,`}`,`\\textbraceright`),H(U,G,tL,`{`,`\\lbrace`),H(U,G,ZI,`}`,`\\rbrace`),H(U,G,tL,`[`,`\\lbrack`,!0),H(W,G,J,`[`,`\\lbrack`,!0),H(U,G,ZI,`]`,`\\rbrack`,!0),H(W,G,J,`]`,`\\rbrack`,!0),H(U,G,tL,`(`,`\\lparen`,!0),H(U,G,ZI,`)`,`\\rparen`,!0),H(W,G,J,`<`,`\\textless`,!0),H(W,G,J,`>`,`\\textgreater`,!0),H(U,G,tL,`⌊`,`\\lfloor`,!0),H(U,G,ZI,`⌋`,`\\rfloor`,!0),H(U,G,tL,`⌈`,`\\lceil`,!0),H(U,G,ZI,`⌉`,`\\rceil`,!0),H(U,G,J,`\\`,`\\backslash`),H(U,G,J,`∣`,`|`),H(U,G,J,`∣`,`\\vert`),H(W,G,J,`|`,`\\textbar`,!0),H(U,G,J,`∥`,`\\|`),H(U,G,J,`∥`,`\\Vert`),H(W,G,J,`∥`,`\\textbardbl`),H(W,G,J,`~`,`\\textasciitilde`),H(W,G,J,`\\`,`\\textbackslash`),H(W,G,J,`^`,`\\textasciicircum`),H(U,G,q,`↑`,`\\uparrow`,!0),H(U,G,q,`⇑`,`\\Uparrow`,!0),H(U,G,q,`↓`,`\\downarrow`,!0),H(U,G,q,`⇓`,`\\Downarrow`,!0),H(U,G,q,`↕`,`\\updownarrow`,!0),H(U,G,q,`⇕`,`\\Updownarrow`,!0),H(U,G,eL,`∐`,`\\coprod`),H(U,G,eL,`⋁`,`\\bigvee`),H(U,G,eL,`⋀`,`\\bigwedge`),H(U,G,eL,`⨄`,`\\biguplus`),H(U,G,eL,`⋂`,`\\bigcap`),H(U,G,eL,`⋃`,`\\bigcup`),H(U,G,eL,`∫`,`\\int`),H(U,G,eL,`∫`,`\\intop`),H(U,G,eL,`∬`,`\\iint`),H(U,G,eL,`∭`,`\\iiint`),H(U,G,eL,`∏`,`\\prod`),H(U,G,eL,`∑`,`\\sum`),H(U,G,eL,`⨂`,`\\bigotimes`),H(U,G,eL,`⨁`,`\\bigoplus`),H(U,G,eL,`⨀`,`\\bigodot`),H(U,G,eL,`∮`,`\\oint`),H(U,G,eL,`∯`,`\\oiint`),H(U,G,eL,`∰`,`\\oiiint`),H(U,G,eL,`⨆`,`\\bigsqcup`),H(U,G,eL,`∫`,`\\smallint`),H(W,G,QI,`…`,`\\textellipsis`),H(U,G,QI,`…`,`\\mathellipsis`),H(W,G,QI,`…`,`\\ldots`,!0),H(U,G,QI,`…`,`\\ldots`,!0),H(U,G,QI,`⋯`,`\\@cdots`,!0),H(U,G,QI,`⋱`,`\\ddots`,!0),H(U,G,J,`⋮`,`\\varvdots`),H(W,G,J,`⋮`,`\\varvdots`),H(U,G,YI,`ˊ`,`\\acute`),H(U,G,YI,`ˋ`,`\\grave`),H(U,G,YI,`¨`,`\\ddot`),H(U,G,YI,`~`,`\\tilde`),H(U,G,YI,`ˉ`,`\\bar`),H(U,G,YI,`˘`,`\\breve`),H(U,G,YI,`ˇ`,`\\check`),H(U,G,YI,`^`,`\\hat`),H(U,G,YI,`⃗`,`\\vec`),H(U,G,YI,`˙`,`\\dot`),H(U,G,YI,`˚`,`\\mathring`),H(U,G,$I,``,`\\@imath`),H(U,G,$I,``,`\\@jmath`),H(U,G,J,`ı`,`ı`),H(U,G,J,`ȷ`,`ȷ`),H(W,G,J,`ı`,`\\i`,!0),H(W,G,J,`ȷ`,`\\j`,!0),H(W,G,J,`ß`,`\\ss`,!0),H(W,G,J,`æ`,`\\ae`,!0),H(W,G,J,`œ`,`\\oe`,!0),H(W,G,J,`ø`,`\\o`,!0),H(W,G,J,`Æ`,`\\AE`,!0),H(W,G,J,`Œ`,`\\OE`,!0),H(W,G,J,`Ø`,`\\O`,!0),H(W,G,YI,`ˊ`,`\\'`),H(W,G,YI,`ˋ`,"\\`"),H(W,G,YI,`ˆ`,`\\^`),H(W,G,YI,`˜`,`\\~`),H(W,G,YI,`ˉ`,`\\=`),H(W,G,YI,`˘`,`\\u`),H(W,G,YI,`˙`,`\\.`),H(W,G,YI,`¸`,`\\c`),H(W,G,YI,`˚`,`\\r`),H(W,G,YI,`ˇ`,`\\v`),H(W,G,YI,`¨`,`\\"`),H(W,G,YI,`˝`,`\\H`),H(W,G,YI,`◯`,`\\textcircled`);var iL={"--":!0,"---":!0,"``":!0,"''":!0};H(W,G,J,`–`,`--`,!0),H(W,G,J,`–`,`\\textendash`),H(W,G,J,`—`,`---`,!0),H(W,G,J,`—`,`\\textemdash`),H(W,G,J,`‘`,"`",!0),H(W,G,J,`‘`,`\\textquoteleft`),H(W,G,J,`’`,`'`,!0),H(W,G,J,`’`,`\\textquoteright`),H(W,G,J,`“`,"``",!0),H(W,G,J,`“`,`\\textquotedblleft`),H(W,G,J,`”`,`''`,!0),H(W,G,J,`”`,`\\textquotedblright`),H(U,G,J,`°`,`\\degree`,!0),H(W,G,J,`°`,`\\degree`),H(W,G,J,`°`,`\\textdegree`,!0),H(U,G,J,`£`,`\\pounds`),H(U,G,J,`£`,`\\mathsterling`,!0),H(W,G,J,`£`,`\\pounds`),H(W,G,J,`£`,`\\textsterling`,!0),H(U,K,J,`✠`,`\\maltese`),H(W,K,J,`✠`,`\\maltese`);for(var aL=`0123456789/@."`,oL=0;oL<aL.length;oL++){var sL=aL.charAt(oL);H(U,G,J,sL,sL)}for(var cL=`0123456789!@*()-=+";:?/.,`,lL=0;lL<cL.length;lL++){var uL=cL.charAt(lL);H(W,G,J,uL,uL)}for(var dL=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,fL=0;fL<dL.length;fL++){var pL=dL.charAt(fL);H(U,G,$I,pL,pL),H(W,G,J,pL,pL)}H(U,K,J,`C`,`ℂ`),H(W,K,J,`C`,`ℂ`),H(U,K,J,`H`,`ℍ`),H(W,K,J,`H`,`ℍ`),H(U,K,J,`N`,`ℕ`),H(W,K,J,`N`,`ℕ`),H(U,K,J,`P`,`ℙ`),H(W,K,J,`P`,`ℙ`),H(U,K,J,`Q`,`ℚ`),H(W,K,J,`Q`,`ℚ`),H(U,K,J,`R`,`ℝ`),H(W,K,J,`R`,`ℝ`),H(U,K,J,`Z`,`ℤ`),H(W,K,J,`Z`,`ℤ`),H(U,G,$I,`h`,`ℎ`),H(W,G,$I,`h`,`ℎ`);for(var mL,hL=0;hL<dL.length;hL++){var gL=dL.charAt(hL);mL=String.fromCharCode(55349,56320+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL),mL=String.fromCharCode(55349,56372+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL),mL=String.fromCharCode(55349,56424+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL),mL=String.fromCharCode(55349,56580+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL),mL=String.fromCharCode(55349,56684+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL),mL=String.fromCharCode(55349,56736+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL),mL=String.fromCharCode(55349,56788+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL),mL=String.fromCharCode(55349,56840+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL),mL=String.fromCharCode(55349,56944+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL),hL<26&&(mL=String.fromCharCode(55349,56632+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL),mL=String.fromCharCode(55349,56476+hL),H(U,G,$I,gL,mL),H(W,G,J,gL,mL))}mL=String.fromCharCode(55349,56668),H(U,G,$I,`k`,mL),H(W,G,J,`k`,mL);for(var _L=0;_L<10;_L++){var vL=_L.toString();mL=String.fromCharCode(55349,57294+_L),H(U,G,$I,vL,mL),H(W,G,J,vL,mL),mL=String.fromCharCode(55349,57314+_L),H(U,G,$I,vL,mL),H(W,G,J,vL,mL),mL=String.fromCharCode(55349,57324+_L),H(U,G,$I,vL,mL),H(W,G,J,vL,mL),mL=String.fromCharCode(55349,57334+_L),H(U,G,$I,vL,mL),H(W,G,J,vL,mL)}for(var yL=`ÐÞþ`,bL=0;bL<yL.length;bL++){var xL=yL.charAt(bL);H(U,G,$I,xL,xL),H(W,G,J,xL,xL)}var SL={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},CL={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},wL={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},wne={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},TL={mathClass:``,textClass:``,font:``},EL={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},DL={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},OL={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},kL={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},AL={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},jL={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},ML={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},NL=[SL,SL,CL,CL,wL,wL,wne,TL,TL,TL,EL,EL,DL,DL,OL,OL,kL,kL,AL,AL,jL,jL,TL,TL,ML,ML],Tne=[SL,TL,kL,AL,ML],PL=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return NL[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return Tne[Math.floor((r-120782)/10)];if(r===120485||r===120486)return NL[0];if(120486<r&&r<120782)return TL;throw new B(`Unsupported character: `+e)},FL=function(e,t,n){if(JI[n][e]){var r=JI[n][e].replace;r&&(e=r)}return{value:e,metrics:KI(e,t,n)}},IL=function(e,t,n,r,i){var a=FL(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new zI(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new zI(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},LL=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&FL(e,`Main-Bold`,t).metrics?IL(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||JI[t][e].font===`main`?IL(e,`Main-Regular`,t,n,r):IL(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},RL=function(e,t,n){return n!==`textord`&&FL(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},zL=function(e,t,n){var r=e.mode,i=e.text,a=[`mord`],{font:o,fontFamily:s,fontWeight:c,fontShape:l}=t,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=PL(i);f=m.font,p=m[r+`Class`]}if(f)return IL(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=RL(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=QL[o].fontName,g=[o]):(h=ZL(s,c,l),g=[s,c,l]);if(FL(i,h,r).metrics)return IL(i,h,r,t,a.concat(g));if(iL.hasOwnProperty(i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(IL(i[y],h,r,t,a.concat(g)));return KL(v)}}if(n===`mathord`)return IL(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=JI[r][i]&&JI[r][i].font;if(b===`ams`)return IL(i,ZL(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return IL(i,ZL(`textrm`,c,l),r,t,a.concat(c,l));var x=ZL(b,c,l);return IL(i,x,r,t,a.concat(x,c,l))}throw Error(`unexpected type: `+n+` in makeOrd`)},BL=(e,t)=>{if(MI(e.classes)!==MI(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},VL=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof zI&&r instanceof zI&&BL(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},HL=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Y=function(e,t,n,r){var i=new LI(e,t,n,r);return HL(i),i},UL=(e,t,n,r)=>new LI(e,t,n,r),WL=function(e,t,n){var r=Y([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=V(r.height),r.maxFontSize=1,r},GL=function(e,t,n,r){var i=new RI(e,t,n,r);return HL(i),i},KL=function(e){var t=new OI(e);return HL(t),t},qL=function(e,t){return e instanceof OI?Y([],[e],t):e},JL=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},YL=function(e,t){for(var{children:n,depth:r}=JL(e),i=0,a=0;a<n.length;a++){var o=n[a];if(o.type===`elem`){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var c=Y([`pstrut`],[]);c.style.height=V(i);for(var l=[],u=r,d=r,f=r,p=0;p<n.length;p++){var m=n[p];if(m.type===`kern`)f+=m.size;else{var h=m.elem,g=m.wrapperClasses||[],_=m.wrapperStyle||{},v=Y(g,[c,h],void 0,_);v.style.top=V(-i-f-h.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),l.push(v),f+=h.height+h.depth}u=Math.min(u,f),d=Math.max(d,f)}var y=Y([`vlist`],l);y.style.height=V(d);var b;if(u<0){var x=Y([`vlist`],[Y([],[])]);x.style.height=V(-u),b=[Y([`vlist-r`],[y,Y([`vlist-s`],[new zI(``)])]),Y([`vlist-r`],[x])]}else b=[Y([`vlist-r`],[y])];var S=Y([`vlist-t`],b);return b.length===2&&S.classes.push(`vlist-t2`),S.height=d,S.depth=-u,S},XL=(e,t)=>{var n=Y([`mspace`],[],t),r=jI(e,t);return n.style.marginRight=V(r),n},ZL=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},QL={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},$L={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},eR=function(e,t){var[n,r,i]=$L[e],a=UL([`overlay`],[new BI([new VI(n)],{width:V(r),height:V(i),style:`width:`+V(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=V(i),a.style.width=V(r),a},tR={number:3,unit:`mu`},nR={number:4,unit:`mu`},rR={number:5,unit:`mu`},iR={mord:{mop:tR,mbin:nR,mrel:rR,minner:tR},mop:{mord:tR,mop:tR,mrel:rR,minner:tR},mbin:{mord:nR,mop:nR,mopen:nR,minner:nR},mrel:{mord:rR,mop:rR,mopen:rR,minner:rR},mopen:{},mclose:{mop:tR,mbin:nR,mrel:rR,minner:tR},mpunct:{mord:tR,mop:tR,mrel:rR,mopen:tR,mclose:tR,mpunct:tR,minner:tR},minner:{mord:tR,mop:tR,mbin:nR,mrel:rR,mopen:tR,mpunct:tR,minner:tR}},aR={mord:{mop:tR},mop:{mord:tR,mop:tR},mbin:{},mrel:{},mopen:{},mclose:{mop:tR},mpunct:{},minner:{mop:tR}},oR={},sR={},cR={};function lR(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c<n.length;++c)oR[n[c]]=s;t&&(a&&(sR[t]=a),o&&(cR[t]=o))}function uR(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;lR({type:t,names:[],props:{numArgs:0},handler(){throw Error(`Should never be called.`)},htmlBuilder:n,mathmlBuilder:r})}var dR=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},fR=function(e){return e.type===`ordgroup`?e.body:[e]},pR=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),mR=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),hR={display:lI.DISPLAY,text:lI.TEXT,script:lI.SCRIPT,scriptscript:lI.SCRIPTSCRIPT},gR={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},_R=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=CR(e[a],t);if(o instanceof OI){var s=o.children;i.push(...s)}else i.push(o)}if(VL(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(hR[l.style]))}var u=Y([r[0]||`leftmost`],[],t),d=Y([r[1]||`rightmost`],[],t),f=n===`root`;return vR(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&mR.has(r)?t.classes[0]=`mord`:r===`mbin`&&pR.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),vR(i,(e,t)=>{var n=xR(t),r=xR(e),i=n&&r?e.hasClass(`mtight`)?aR[n]?.[r]:iR[n]?.[r]:null;if(i)return XL(i,c)},{node:u},d,f),i},vR=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=yR(o);if(s)vR(s.children,t,n,null,i);else{var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`newline`)&&(n.node=Y([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}}r&&e.pop()},yR=function(e){return e instanceof OI||e instanceof RI||e instanceof LI&&e.hasClass(`enclosing`)?e:null},bR=function(e,t){var n=yR(e);if(n){var r=n.children;if(r.length){if(t===`right`)return bR(r[r.length-1],`right`);if(t===`left`)return bR(r[0],`left`)}}return e},xR=function(e,t){return e?(t&&(e=bR(e,t)),gR[e.classes[0]]||null):null},SR=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return Y(t.concat(n))},CR=function(e,t,n){if(!e)return Y();if(sR[e.type]){var r=sR[e.type](e,t);if(n&&t.size!==n.size){r=Y(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new B(`Got group of unknown type: '`+e.type+`'`)};function wR(e,t){var n=Y([`base`],e,t),r=Y([`strut`]);return r.style.height=V(n.height+n.depth),n.depth&&(r.style.verticalAlign=V(-n.depth)),n.children.unshift(r),n}function TR(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=_R(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(wR(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(wR(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(wR(o,t));var l;n?(l=wR(_R(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=Y([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=V(u.height+u.depth),u.depth&&(d.style.verticalAlign=V(-u.depth))}return u}function ER(e){return new OI(e)}var X=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=MI(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof DR&&this.children[n+1]instanceof DR){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof DR;)r+=this.children[++n].toText();e.appendChild(new DR(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=` `+t+`="`,e+=LF(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+LF(MI(this.classes))+`"`),e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},DR=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return LF(this.toText())}toText(){return this.text}},OR=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?` `:e>=-.05556&&e<=-.05555?` `:e>=-.1667&&e<=-.1666?` `:e>=-.2223&&e<=-.2222?` `:e>=-.2778&&e<=-.2777?` `:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,V(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+V(this.width)+`"/>`}toText(){return this.character?this.character:` `}},kR=new Set([`\\imath`,`\\jmath`]),AR=new Set([`mrow`,`mtable`]),jR=function(e,t,n){return JI[t][e]&&JI[t][e].replace&&e.charCodeAt(0)!==55349&&!(iL.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=JI[t][e].replace),new DR(e)},MR=function(e){return e.length===1?e[0]:new X(`mrow`,e)},NR={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},PR=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=NR[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(kR.has(a))return null;if(JI[r][a]){var o=JI[r][a].replace;o&&(a=o)}var s=QL[n].fontName;return KI(a,s,r)?QL[n].variant:null};function FR(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof DR&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof DR&&n.text===`,`}return!1}var IR=function(e,t,n){if(e.length===1){var r=RR(e[0],t);return n&&r instanceof X&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=RR(e[o],t);if(s instanceof X&&a instanceof X){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)||s.type===`mn`&&a.type===`mn`||FR(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&FR(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||FR(a))){var c=s.children[0];c instanceof X&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof DR&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof DR&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},LR=function(e,t,n){return MR(IR(e,t,n))},RR=function(e,t){if(!e)return new X(`mrow`);if(cR[e.type])return cR[e.type](e,t);throw new B(`Got group of unknown type: '`+e.type+`'`)};function zR(e,t,n,r,i){var a=IR(e,n),o=a.length===1&&a[0]instanceof X&&AR.has(a[0].type)?a[0]:new X(`mrow`,a),s=new X(`annotation`,[new DR(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new X(`math`,[new X(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),Y([i?`katex`:`katex-mathml`],[c])}var BR=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],VR=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],HR=function(e,t){return t.size<2?e:BR[e-1][t.size-1]},UR=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=VR[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:HR(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:VR[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=HR(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=Cne(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};UR.BASESIZE=6;var WR=function(e){return new UR({style:e.displayMode?lI.DISPLAY:lI.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},GR=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=Y(n,[e])}return e},KR=function(e,t,n){var r=WR(n),i;return n.output===`mathml`?zR(e,t,r,n.displayMode,!0):(i=n.output===`html`?Y([`katex`],[TR(e,r)]):Y([`katex`],[zR(e,t,r,n.displayMode,!1),TR(e,r)]),GR(i,n))},qR=function(e,t,n){return GR(Y([`katex`],[TR(e,WR(n))]),n)},JR={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},YR=function(e){var t=new X(`mo`,[new DR(JR[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},XR={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},ZR=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),QR=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(ZR.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:UL([],[new BI([new VI(o)],{width:`100%`,height:V(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=XR[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var[d,f,p]=u,m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
|
|
494
|
-
`+h+` children.`);for(var v=0;v<h;v++){var y=new BI([new VI(d[v])],{width:`400em`,height:V(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=UL([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=V(m),l.push(b)}return{span:Y([`stretchy`],l,t),minWidth:f,height:m}}var{span:r,minWidth:i,height:a}=n();return r.height=a,r.style.height=V(a),i>0&&(r.style.minWidth=V(i)),r},$R=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=Y([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new HI({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new HI({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=UL([],[new BI(c,{width:`100%`,height:V(o)})],i)}return a.height=o,a.style.height=V(o),a},ez={bin:1,close:1,inner:1,open:1,punct:1,rel:1},tz={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function nz(e){return e in ez}function rz(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function iz(e){var t=az(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function az(e){return e&&(e.type===`atom`||tz.hasOwnProperty(e.type))?e:null}var oz=e=>{if(e instanceof zI)return e;if(xne(e)&&e.children.length===1)return oz(e.children[0])},sz=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=rz(e.base,`accent`),n=r.base,e.base=n,i=bne(CR(e,t)),e.base=r):(r=rz(e,`accent`),n=r.base);var a=CR(n,t.havingCrampedStyle()),o=r.isShifty&&BF(n),s=0;o&&(s=oz(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=QR(r,t),u=YL({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+V(2*s)+`)`,marginLeft:V(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=eR(`vec`,t),f=$L.vec[1]):(d=zL({type:`textord`,mode:r.mode,text:r.label},t,`textord`),d=yne(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=Y([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=V(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=YL({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=Y([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},cz=(e,t)=>{var n=e.isStretchy?YR(e.label):new X(`mo`,[jR(e.label,e.mode)]),r=new X(`mover`,[RR(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},lz=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));lR({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=dR(t[0]),r=!lz.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:sz,mathmlBuilder:cz}),lR({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:sz,mathmlBuilder:cz}),lR({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=CR(e.base,t),r=QR(e,t),i=e.label===`\\utilde`?.12:0;return Y([`mord`,`accentunder`],[YL({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=YR(e.label),r=new X(`munder`,[RR(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var uz=e=>{var t=new X(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};lR({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=qL(CR(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=qL(CR(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=QR(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=YL({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=YL({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return Y([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=YR(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=uz(RR(e.body,t));r=e.below?new X(`munderover`,[n,uz(RR(e.below,t)),i]):new X(`mover`,[n,i])}else e.below?r=new X(`munder`,[n,uz(RR(e.below,t))]):(r=uz(),r=new X(`mover`,[n,r]));return r}});function dz(e,t){var n=_R(e.body,t,!0);return Y([e.mclass],n,t)}function fz(e,t){var n,r=IR(e.body,t);return e.mclass===`minner`?n=new X(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new X(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new X(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}lR({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:fR(i),isCharacterBox:BF(i)}},htmlBuilder:dz,mathmlBuilder:fz});var pz=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};lR({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:pz(t[0]),body:fR(t[1]),isCharacterBox:BF(t[1])}}}),lR({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:pz(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:fR(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:BF(c)}},htmlBuilder:dz,mathmlBuilder:fz}),lR({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:pz(t[0]),body:fR(t[0])}},htmlBuilder(e,t){var n=_R(e.body,t,!0),r=Y([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new X(`mstyle`,IR(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var mz={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},hz=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),gz=e=>e.type===`textord`&&e.text===`@`,_z=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function vz(e,t,n){var r=mz[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function yz(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new B(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=hz(),c=0;c<o.length;c++)if(!gz(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=iz(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l)){if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(_z(o[p],l)){f=!1,c=p;break}if(gz(o[p]))throw new B(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new B(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new B(`Expected one of "<>AV=|." after @`,o[c])}var m={type:`styling`,body:[vz(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=hz()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}lR({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=qL(CR(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=V(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new X(`mrow`,[RR(e.label,t)]);return n=new X(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new X(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),lR({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=qL(CR(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new X(`mrow`,[RR(e.fragment,t)])}}),lR({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=rz(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=rz(r[a],`textord`);i+=o.text}var s=parseInt(i),c;if(isNaN(s))throw new B(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new B(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}});var bz=(e,t)=>KL(_R(e.body,t.withColor(e.color),!1)),xz=(e,t)=>{var n=new X(`mstyle`,IR(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n};lR({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=rz(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:fR(i)}},htmlBuilder:bz,mathmlBuilder:xz}),lR({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=rz(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:bz,mathmlBuilder:xz}),lR({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&rz(i,`size`).value}},htmlBuilder(e,t){var n=Y([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=V(jI(e.size,t)))),n},mathmlBuilder(e,t){var n=new X(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,V(jI(e.size,t)))),n}});var Sz={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},Cz=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new B(`Expected a control sequence`,e);return t},wz=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},Tz=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};lR({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Sz[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=Sz[r.text]),rz(t.parseFunction(),`internal`);throw new B(`Invalid token after macro prefix`,r)}}),lR({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new B(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new B(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new B(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new B(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===Sz[n]),{type:`internal`,mode:t.mode}}}),lR({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Cz(t.gullet.popToken());return t.gullet.consumeSpaces(),Tz(t,r,wz(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),lR({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Cz(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Tz(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var Ez=function(e,t,n){var r=KI(JI.math[e]&&JI.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},Dz=function(e,t,n,r){var i=n.havingBaseStyle(t),a=Y(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},Oz=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=V(i),e.height-=i,e.depth+=i},kz=function(e,t,n,r,i,a){var o=Dz(IL(e,`Main-Regular`,i,r),t,r,a);return n&&Oz(o,r,t),o},Az=function(e,t,n,r){return IL(e,`Size`+t+`-Regular`,n,r)},jz=function(e,t,n,r,i,a){var o=Az(e,t,i,r),s=Dz(Y([`delimsizing`,`size`+t],[o],r),lI.TEXT,r,a);return n&&Oz(s,r,lI.TEXT),s},Mz=function(e,t,n){return{type:`elem`,elem:Y([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[Y([],[IL(e,t,n)])])}},Nz=function(e,t,n){var r=UI[`Size4-Regular`][e.charCodeAt(0)]?UI[`Size4-Regular`][e.charCodeAt(0)][4]:UI[`Size1-Regular`][e.charCodeAt(0)][4],i=UL([],[new BI([new VI(`inner`,wI(e,Math.round(1e3*t)))],{width:V(r),height:V(t),style:`width:`+V(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=V(t),i.style.width=V(r),{type:`elem`,elem:i}},Pz=.008,Fz={type:`kern`,size:-1*Pz},Iz=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),Lz=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),Rz=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):Iz.has(e)?(c=`∣`,u=`vert`,d=333):Lz.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=Ez(o,f,i),m=p.height+p.depth,h=Ez(c,f,i),g=h.height+h.depth,_=Ez(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=Ez(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,E=[];if(u.length>0){var D=C-m-v,O=Math.round(C*1e3),ee=EI(u,Math.round(D*1e3)),te=new VI(u,ee),ne=V(d/1e3),re=V(O/1e3),ie=UL([],[new BI([te],{width:ne,height:re,viewBox:`0 0 `+d+` `+O})],r);ie.height=O/1e3,ie.style.width=ne,ie.style.height=re,E.push({type:`elem`,elem:ie})}else{if(E.push(Mz(l,f,i)),E.push(Fz),s===null){var ae=C-m-v+2*Pz;E.push(Nz(c,ae,r))}else{var oe=(C-m-v-y)/2+2*Pz;E.push(Nz(c,oe,r)),E.push(Fz),E.push(Mz(s,f,i)),E.push(Fz),E.push(Nz(c,oe,r))}E.push(Fz),E.push(Mz(o,f,i))}var k=r.havingBaseStyle(lI.TEXT);return Dz(Y([`delimsizing`,`mult`],[YL({positionType:`bottom`,positionData:T,children:E})],k),lI.TEXT,r,a)},zz=80,Bz=.08,Vz=function(e,t,n,r,i){return UL([`hide-tail`],[new BI([new VI(e,CI(e,r,n))],{width:`400em`,height:V(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},Hz=function(e,t){var n=t.havingBaseSizing(),r=Qz(`\\surd`,e*n.sizeMultiplier,Xz,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+zz,e<1?i=1:e<1.4&&(i=.7),s=(1+a+Bz)/i,c=(1+a)/i,o=Vz(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+zz)*Kz[r.size],c=(Kz[r.size]+a)/i,s=(Kz[r.size]+a+Bz)/i,o=Vz(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+Bz,c=e+a,l=Math.floor(1e3*e+a)+zz,o=Vz(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=V(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},Uz=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),Wz=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),Gz=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),Kz=[0,1.2,1.8,2.4,3],qz=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),Uz.has(e)||Gz.has(e))return jz(e,t,!1,n,r,i);if(Wz.has(e))return Rz(e,Kz[t],!1,n,r,i);throw new B(`Illegal delimiter: '`+e+`'`)},Jz=[{type:`small`,style:lI.SCRIPTSCRIPT},{type:`small`,style:lI.SCRIPT},{type:`small`,style:lI.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Yz=[{type:`small`,style:lI.SCRIPTSCRIPT},{type:`small`,style:lI.SCRIPT},{type:`small`,style:lI.TEXT},{type:`stack`}],Xz=[{type:`small`,style:lI.SCRIPTSCRIPT},{type:`small`,style:lI.SCRIPT},{type:`small`,style:lI.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Zz=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},Qz=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=Ez(e,Zz(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},$z=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=Gz.has(e)?Jz:Uz.has(e)?Xz:Yz,s=Qz(e,t,o,r);return s.type===`small`?kz(e,s.style,n,r,i,a):s.type===`large`?jz(e,s.size,n,r,i,a):Rz(e,t,n,r,i,a)},eB=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return $z(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},tB={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},nB=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function rB(e){return`isMiddle`in e}function iB(e,t){var n=az(e);if(n&&nB.has(n.text))return n;throw n?new B(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new B(`Invalid delimiter type '`+e.type+`'`,e)}lR({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=iB(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:tB[e.funcName].size,mclass:tB[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?Y([e.mclass]):qz(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(jR(e.delim,e.mode));var n=new X(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=V(Kz[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function aB(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}lR({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new B(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:iB(t[0],e).text,color:n}}}),lR({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=iB(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=rz(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{aB(e);for(var n=_R(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];rB(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?SR(t,[`mopen`]):eB(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(rB(u)){var d=u.isMiddle;n[l]=eB(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=SR(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=eB(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),Y([`minner`],n,t)},mathmlBuilder:(e,t)=>{aB(e);var n=IR(e.body,t);if(e.left!==`.`){var r=new X(`mo`,[jR(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new X(`mo`,[jR(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return MR(n)}}),lR({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=iB(t[0],e);if(!e.parser.leftrightDepth)throw new B(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=SR(t,[]):(n=qz(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new X(`mo`,[e.delim===`\\vert`||e.delim===`|`?jR(`|`,`text`):jR(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}});var oB=(e,t)=>{var n=qL(CR(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=BF(e.body);if(r===`sout`)a=Y([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=jI({number:.6,unit:`pt`},t),l=jI({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=V(d/2+c);var f=Math.floor(1e3*d*i);a=UL([`hide-tail`],[new BI([new VI(`phase`,xI(f))],{width:`400em`,height:V(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=V(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=$R(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=V(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=V(h),a.style.borderRightWidth=V(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=YL({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=YL({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?Y([`mord`,`cancel-lap`],[g],t):Y([`mord`],[g],t)},sB=(e,t)=>{var n,r=new X(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[RR(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+V(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};lR({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=rz(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:oB,mathmlBuilder:sB}),lR({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=rz(t[0],`color-token`).color,o=rz(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:oB,mathmlBuilder:sB}),lR({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),lR({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:oB,mathmlBuilder:sB}),lR({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:oB,mathmlBuilder:sB}),lR({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var cB={};function lB(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)cB[n[c]]=s;a&&(sR[t]=a),o&&(cR[t]=o)}var uB={};function Z(e,t){uB[e]=t}var dB=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},fB=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,dB.range(this,t))}};function pB(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var mB=e=>{if(!e.parser.settings.displayMode)throw new B(`{`+e.envName+`} can be used only in display mode.`)},hB=new Set([`gather`,`gather*`]);function gB(e){if(!e.includes(`ed`))return!e.includes(`*`)}function _B(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new B(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new fB(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(pB(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new B(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var w=void 0;e.gullet.future().text!==` `&&(w=e.parseSizeGroup(!0)),g.push(w?w.value:null),b(),_.push(pB(e)),m=[],h.push(m),y()}else throw new B(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function vB(e){return e.slice(0,1)===`d`?`display`:`text`}var yB=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(lI.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?jI({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var C=CR(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S.cells[r]=C}var w=e.rowGaps[n],T=0;w&&(T=jI(w,t),T>0&&(T+=g,x<T&&(x=T),T=0)),e.addJot&&n<e.body.length-1&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+T,s[n]=S,v(a[n+1])}var E=_/2+t.fontMetrics().axisHeight,D=e.cols||[],O=[],ee,te,ne=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var re=s[n],ie=re.pos-E,ae=e.tags[n],oe=void 0;oe=ae===!0?Y([`eqn-num`],[],t):ae===!1?Y([],[],t):Y([],_R(ae,t,!0),t),oe.depth=re.depth,oe.height=re.height,ne.push({type:`elem`,elem:oe,shift:ie})}for(r=0,te=0;r<o||te<D.length;++r,++te){for(var k=D[te],se=!0;(ce=k)?.type===`separator`;){var ce;if(se||(ee=Y([`arraycolsep`],[]),ee.style.width=V(t.fontMetrics().doubleRuleSep),O.push(ee)),k.separator===`|`||k.separator===`:`){var le=k.separator===`|`?`solid`:`dashed`,ue=Y([`vertical-separator`],[],t);ue.style.height=V(_),ue.style.borderRightWidth=V(l),ue.style.borderRightStyle=le,ue.style.margin=`0 `+V(-l/2);var de=_-E;de&&(ue.style.verticalAlign=V(-de)),O.push(ue)}else throw new B(`Invalid separator type: `+k.separator);te++,k=D[te],se=!1}if(!(r>=o)){var fe=void 0;(r>0||e.hskipBeforeAndAfter)&&(fe=k?.pregap??d,fe!==0&&(ee=Y([`arraycolsep`],[]),ee.style.width=V(fe),O.push(ee)));var pe=[];for(n=0;n<i;++n){var me=s[n],he=me.cells[r];if(he){var ge=me.pos-E;he.depth=me.depth,he.height=me.height,pe.push({type:`elem`,elem:he,shift:ge})}}var _e=YL({positionType:`individualShift`,children:pe}),ve=Y([`col-align-`+(k?.align||`c`)],[_e]);O.push(ve),(r<o-1||e.hskipBeforeAndAfter)&&(fe=k?.postgap??d,fe!==0&&(ee=Y([`arraycolsep`],[]),ee.style.width=V(fe),O.push(ee)))}}var ye=Y([`mtable`],O);if(c.length>0){for(var be=WL(`hline`,t,l),xe=WL(`hdashline`,t,l),Se=[{type:`elem`,elem:ye,shift:0}];c.length>0;){var Ce=c.pop(),we=Ce.pos-E;Ce.isDashed?Se.push({type:`elem`,elem:xe,shift:we}):Se.push({type:`elem`,elem:be,shift:we})}ye=YL({positionType:`individualShift`,children:Se})}if(ne.length===0)return Y([`mord`],[ye],t);var Te=Y([`tag`],[YL({positionType:`individualShift`,children:ne})],t);return KL([ye,Te])},bB={c:`center `,l:`left `,r:`right `},xB=function(e,t){for(var n=[],r=new X(`mtd`,[],[`mtr-glue`]),i=new X(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new X(`mtd`,[RR(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new X(`mtr`,s))}var l=new X(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,V(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=bB[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,w=e.hLinesBeforeRow;d+=w[0].length>0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T<w.length-1;T++)C+=w[T].length===0?`none `:w[T][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new X(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new X(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},SB=function(e,t){e.envName.includes(`ed`)||mB(e);var n=[],r=e.envName.includes(`at`)?`alignat`:`align`,i=e.envName===`split`,a=_B(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:gB(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o=0,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var l=``,u=0;u<t[0].body.length;u++){var d=rz(t[0].body[u],`textord`);l+=d.text}o=Number(l),s=o*2}var f=!s;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)rz(rz(e[t],`styling`).body[0],`ordgroup`).body.unshift(c);if(f)s<e.length&&(s=e.length);else{var n=e.length/2;if(o<n)throw new B(`Too many math in a row: `+(`expected `+o+`, but got `+n),e[0])}});for(var p=0;p<s;++p){var m=`r`,h=0;p%2==1?m=`l`:p>0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a};lB({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(az(t[0])?[t[0]]:rz(t[0],`ordgroup`).body).map(function(e){var t=iz(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new B(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return _B(e.parser,r,vB(e.envName))},htmlBuilder:yB,mathmlBuilder:xB}),lB({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new B(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=_B(e.parser,r,vB(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:yB,mathmlBuilder:xB}),lB({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=_B(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:yB,mathmlBuilder:xB}),lB({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(az(t[0])?[t[0]]:rz(t[0],`ordgroup`).body).map(function(e){var t=iz(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new B(`Unknown column alignment: `+t,e)});if(n.length>1)throw new B(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=_B(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new B(`{subarray} can contain only one column`);return i},htmlBuilder:yB,mathmlBuilder:xB}),lB({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=_B(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},vB(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:yB,mathmlBuilder:xB}),lB({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:SB,htmlBuilder:yB,mathmlBuilder:xB}),lB({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){hB.has(e.envName)&&mB(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:gB(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return _B(e.parser,t,`display`)},htmlBuilder:yB,mathmlBuilder:xB}),lB({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:SB,htmlBuilder:yB,mathmlBuilder:xB}),lB({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){mB(e);var t={autoTag:gB(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return _B(e.parser,t,`display`)},htmlBuilder:yB,mathmlBuilder:xB}),lB({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return mB(e),yz(e.parser)},htmlBuilder:yB,mathmlBuilder:xB}),Z(`\\nonumber`,`\\gdef\\@eqnsw{0}`),Z(`\\notag`,`\\nonumber`),lR({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new B(e.funcName+` valid only within array environment`)}});var CB=cB;lR({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new B(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=rz(i.body[o],`textord`).text;if(r===`\\begin`){if(!CB.hasOwnProperty(a))throw new B(`No such environment: `+a,i);var s=CB[a],{args:c,optArgs:l}=n.parseArguments(`\\begin{`+a+`}`,s),u={mode:n.mode,envName:a,parser:n},d=s.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=rz(n.parseFunction(),`environment`);if(p.name!==a)throw new B(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var wB=(e,t)=>{var n=e.font,r=t.withFont(n);return CR(e.body,r)},TB=(e,t)=>{var n=e.font,r=t.withFont(n);return RR(e.body,r)},EB={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};lR({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=dR(t[0]),a=r;return a in EB&&(a=EB[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:wB,mathmlBuilder:TB}),lR({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:pz(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:BF(r)}}}),lR({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:wB,mathmlBuilder:TB});var DB=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=CR(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=CR(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=jI(e.barSize,t),u=WL(`frac-line`,t,d)):u=WL(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===lI.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=YL({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=YL({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===lI.DISPLAY.size?t.fontMetrics().delim1:n.size===lI.SCRIPTSCRIPT.size?t.havingStyle(lI.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?SR(t,[`mopen`]):$z(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?Y([]):e.rightDelim==null?SR(t,[`mclose`]):$z(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return Y([`mord`].concat(a.sizingClasses(t)),[x,Y([`mfrac`],[g]),S],t)},OB=(e,t)=>{var n=new X(`mfrac`,[RR(e.numer,t),RR(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=jI(e.barSize,t);n.setAttribute(`linethickness`,V(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new X(`mo`,[new DR(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new X(`mo`,[new DR(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return MR(i)}return n},kB=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;lR({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),kB({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:DB,mathmlBuilder:OB}),lR({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var AB=[`display`,`text`,`script`,`scriptscript`],jB=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};lR({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=dR(t[0]),o=a.type===`atom`&&a.family===`open`?jB(a.text):null,s=dR(t[1]),c=s.type===`atom`&&s.family===`close`?jB(s.text):null,l=rz(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=rz(p.body[0],`textord`);f=AB[Number(m.text)]}}else p=rz(p,`textord`),f=AB[Number(p.text)];return kB({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),lR({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:rz(t[0],`size`).value,token:i}}}),lR({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=rz(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var MB=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?CR(e.sup,t.havingStyle(n.sup()),t):CR(e.sub,t.havingStyle(n.sub()),t),i=rz(e.base,`horizBrace`)):i=rz(e,`horizBrace`);var a=CR(i.base,t.havingBaseStyle(lI.DISPLAY)),o=QR(i,t),s=i.isOver?YL({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):YL({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=Y([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?YL({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):YL({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return Y([`minner`,i.isOver?`mover`:`munder`],[s],t)};lR({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:MB,mathmlBuilder:(e,t)=>{var n=YR(e.label);return new X(e.isOver?`mover`:`munder`,[RR(e.base,t),n])}}),lR({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=rz(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:fR(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=_R(e.body,t,!1);return GL(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=LR(e.body,t);return n instanceof X||(n=new X(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),lR({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=rz(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:fR(s)}}}),lR({type:`hbox`,names:[`\\hbox`],props:{numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:`hbox`,mode:n.mode,body:fR(t[0])}},htmlBuilder(e,t){return KL(_R(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new X(`mrow`,IR(e.body,t.withFont(``)))}}),lR({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],props:{numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,a=rz(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u<l.length;u++){var d=l[u],f=d.indexOf(`=`);if(f<0)throw new B(`\\htmlData key/value '`+d+`' missing equals sign`);var p=d.slice(0,f),m=d.slice(f+1);c[`data-`+p.trim()]=m}s={command:`\\htmlData`,attributes:c};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:c,body:fR(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=_R(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=Y(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>LR(e.body,t)}),lR({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:fR(t[0]),mathml:fR(t[1])}},htmlBuilder:(e,t)=>KL(_R(e.html,t,!1)),mathmlBuilder:(e,t)=>LR(e.mathml,t)});var NB=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new B(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!AI(n))throw new B(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};lR({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=rz(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=NB(d);break;case`height`:a=NB(d);break;case`totalheight`:o=NB(d);break;default:throw new B(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=rz(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=jI(e.height,t),r=0;e.totalheight.number>0&&(r=jI(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=jI(e.width,t));var a={height:V(n+r)};i>0&&(a.width=V(i)),r>0&&(a.verticalAlign=V(-r));var o=new _ne(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new X(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=jI(e.height,t),i=0;if(e.totalheight.number>0&&(i=jI(e.totalheight,t)-r,n.setAttribute(`valign`,V(-i))),n.setAttribute(`height`,V(r+i)),e.width.number>0){var a=jI(e.width,t);n.setAttribute(`width`,V(a))}return n.setAttribute(`src`,e.src),n}}),lR({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=rz(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return XL(e.dimension,t)},mathmlBuilder(e,t){return new OR(jI(e.dimension,t))}}),lR({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=Y([],[CR(e.body,t)]),n=Y([`inner`],[n],t)):n=Y([`inner`],[CR(e.body,t)]);var r=Y([`fix`],[]),i=Y([e.alignment],[n,r],t),a=Y([`strut`]);return a.style.height=V(i.height+i.depth),i.depth&&(a.style.verticalAlign=V(-i.depth)),i.children.unshift(a),i=Y([`thinbox`],[i],t),Y([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new X(`mpadded`,[RR(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),lR({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),lR({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new B(`Mismatched `+e.funcName)}});var PB=(e,t)=>{switch(t.style.size){case lI.DISPLAY.size:return e.display;case lI.TEXT.size:return e.text;case lI.SCRIPT.size:return e.script;case lI.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};lR({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:fR(t[0]),text:fR(t[1]),script:fR(t[2]),scriptscript:fR(t[3])}},htmlBuilder:(e,t)=>KL(_R(PB(e,t),t,!1)),mathmlBuilder:(e,t)=>LR(PB(e,t),t)});var FB=(e,t,n,r,i,a,o)=>{e=Y([],[e]);var s=n&&BF(n),c,l;if(t){var u=CR(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=CR(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=YL({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:V(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:V(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=YL({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:V(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=YL({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:V(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=Y([`mspace`],[],r);m.style.marginRight=V(a),p.unshift(m)}return Y([`mop`,`op-limits`],p,r)},IB=new Set([`\\smallint`]),LB=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=rz(e.base,`op`),i=!0):a=rz(e,`op`);var o=t.style,s=!1;o.size===lI.DISPLAY.size&&a.symbol&&!IB.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=IL(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=eR(d+`Size`+(s?`2`:`1`),t);c=YL({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=_R(a.body,t,!0);p.length===1&&p[0]instanceof zI?(c=p[0],c.classes[0]=`mop`):c=Y([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(LL(a.name[h],a.mode,t));c=Y([`mop`],m,t)}var g=0,_=0;return(c instanceof zI||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?FB(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=V(g)),c)},RB=(e,t)=>{var n;if(e.symbol)n=new X(`mo`,[jR(e.name,e.mode)]),IB.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new X(`mo`,IR(e.body,t));else{n=new X(`mi`,[new DR(e.name.slice(1))]);var r=new X(`mo`,[jR(``,`text`)]);n=e.parentIsSupSub?new X(`mrow`,[n,r]):ER([n,r])}return n},zB={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};lR({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=zB[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:LB,mathmlBuilder:RB}),lR({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:fR(r)}},htmlBuilder:LB,mathmlBuilder:RB});var BB={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};lR({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:LB,mathmlBuilder:RB}),lR({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:LB,mathmlBuilder:RB}),lR({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=BB[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:LB,mathmlBuilder:RB});var VB=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=rz(e.base,`operatorname`),i=!0):a=rz(e,`operatorname`);var o;if(a.body.length>0){for(var s=_R(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof zI&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=Y([`mop`],s,t)}else o=Y([`mop`],[],t);return i?FB(o,n,r,t,t.style,0,0):o};lR({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:fR(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:VB,mathmlBuilder:(e,t)=>{for(var n=IR(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof OR)){if(a instanceof X)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof DR?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}r&&(n=[new DR(n.map(e=>e.toText()).join(``))]);var s=new X(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new X(`mo`,[jR(``,`text`)]);return e.parentIsSupSub?new X(`mrow`,[s,c]):ER([s,c])}}),Z(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),uR({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?KL(_R(e.body,t,!1)):Y([`mord`],_R(e.body,t,!0),t)},mathmlBuilder(e,t){return LR(e.body,t,!0)}}),lR({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=CR(e.body,t.havingCrampedStyle()),r=WL(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return Y([`mord`,`overline`],[YL({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new X(`mo`,[new DR(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new X(`mover`,[RR(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),lR({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:fR(r)}},htmlBuilder:(e,t)=>KL(_R(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new X(`mphantom`,IR(e.body,t))}),Z(`\\hphantom`,`\\smash{\\phantom{#1}}`),lR({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>Y([`mord`,`rlap`],[Y([`inner`],[CR(e.body,t.withPhantom())]),Y([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new X(`mpadded`,[new X(`mphantom`,IR(fR(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),lR({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=rz(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=CR(e.body,t);return YL({positionType:`shift`,positionData:-jI(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new X(`mpadded`,[RR(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),lR({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),lR({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=rz(t[0],`size`),o=rz(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&rz(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=Y([`mord`,`rule`],[],t),r=jI(e.width,t),i=jI(e.height,t),a=e.shift?jI(e.shift,t):0;return n.style.borderRightWidth=V(r),n.style.borderTopWidth=V(i),n.style.bottom=V(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=jI(e.width,t),r=jI(e.height,t),i=e.shift?jI(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new X(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,V(n)),o.setAttribute(`height`,V(r));var s=new X(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,V(i)):(s.setAttribute(`height`,V(i)),s.setAttribute(`depth`,V(-i))),s.setAttribute(`voffset`,V(i)),s}});function HB(e,t,n){for(var r=_R(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return KL(r)}var UB=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];lR({type:`sizing`,names:UB,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:UB.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return HB(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new X(`mstyle`,IR(e.body,n));return r.setAttribute(`mathsize`,V(n.sizeMultiplier)),r}}),lR({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&rz(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=iz(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=Y([],[CR(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return Y([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return Y([`mord`],[YL({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new X(`mpadded`,[RR(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),lR({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=CR(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=qL(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<lI.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:c}=Hz(n.height+n.depth+a+r,t),l=o.height-s;l>n.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=V(c);var d=YL({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(lI.SCRIPTSCRIPT),p=CR(e.index,f,t);return Y([`mord`,`sqrt`],[Y([`root`],[YL({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}return Y([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new X(`mroot`,[RR(n,t),RR(r,t)]):new X(`msqrt`,[RR(n,t)])}});var WB={display:lI.DISPLAY,text:lI.TEXT,script:lI.SCRIPT,scriptscript:lI.SCRIPTSCRIPT};function GB(e){return e in WB}lR({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!GB(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=WB[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),HB(e.body,r,t)},mathmlBuilder(e,t){var n=WB[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new X(`mstyle`,IR(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var KB=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===lI.DISPLAY.size||n.alwaysHandleSupSub)?LB:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===lI.DISPLAY.size||n.limits)?VB:null:n.type===`accent`?BF(n.base)?sz:null:n.type===`horizBrace`&&!e.sub===n.isOver?MB:null:null};uR({type:`supsub`,htmlBuilder(e,t){var n=KB(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=CR(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&BF(r);if(i){var p=t.havingStyle(t.style.sup());s=CR(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=CR(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===lI.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=V(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof zI||y)&&(v=V(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=YL({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=YL({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=YL({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return Y([xR(o,`right`)||`mord`],[o,Y([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[RR(e.base,t)];e.sub&&a.push(RR(e.sub,t)),e.sup&&a.push(RR(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===lI.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===lI.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===lI.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===lI.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===lI.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===lI.DISPLAY)?`munder`:`msub`}return new X(o,a)}}),uR({type:`atom`,htmlBuilder(e,t){return LL(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new X(`mo`,[jR(e.text,e.mode)]);if(e.family===`bin`){var r=PR(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var qB={mi:`italic`,mn:`normal`,mtext:`normal`};uR({type:`mathord`,htmlBuilder(e,t){return zL(e,t,`mathord`)},mathmlBuilder(e,t){var n=new X(`mi`,[jR(e.text,e.mode,t)]),r=PR(e,t)||`italic`;return r!==qB[n.type]&&n.setAttribute(`mathvariant`,r),n}}),uR({type:`textord`,htmlBuilder(e,t){return zL(e,t,`textord`)},mathmlBuilder(e,t){var n=jR(e.text,e.mode,t),r=PR(e,t)||`normal`,i=e.mode===`text`?new X(`mtext`,[n]):/[0-9]/.test(e.text)?new X(`mn`,[n]):e.text===`\\prime`?new X(`mo`,[n]):new X(`mi`,[n]);return r!==qB[i.type]&&i.setAttribute(`mathvariant`,r),i}});var JB={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},YB={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};uR({type:`spacing`,htmlBuilder(e,t){if(YB.hasOwnProperty(e.text)){var n=YB[e.text].className||``;if(e.mode===`text`){var r=zL(e,t,`textord`);return r.classes.push(n),r}return Y([`mspace`,n],[LL(e.text,e.mode,t)],t)}if(JB.hasOwnProperty(e.text))return Y([`mspace`,JB[e.text]],[],t);throw new B(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(YB.hasOwnProperty(e.text))n=new X(`mtext`,[new DR(`\xA0`)]);else if(JB.hasOwnProperty(e.text))return new X(`mspace`);else throw new B(`Unknown type of space "`+e.text+`"`);return n}});var XB=()=>{var e=new X(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};uR({type:`tag`,mathmlBuilder(e,t){var n=new X(`mtable`,[new X(`mtr`,[XB(),new X(`mtd`,[LR(e.body,t)]),XB(),new X(`mtd`,[LR(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var ZB={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},QB={"\\textbf":`textbf`,"\\textmd":`textmd`},$B={"\\textit":`textit`,"\\textup":`textup`},eV=(e,t)=>{var n=e.font;return n?ZB[n]?t.withTextFontFamily(ZB[n]):QB[n]?t.withTextFontWeight(QB[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape($B[n]):t};lR({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:fR(i),font:r}},htmlBuilder(e,t){var n=eV(e,t);return Y([`mord`,`text`],_R(e.body,n,!0),n)},mathmlBuilder(e,t){var n=eV(e,t);return LR(e.body,n)}}),lR({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=CR(e.body,t),r=WL(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return Y([`mord`,`underline`],[YL({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new X(`mo`,[new DR(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new X(`munder`,[RR(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),lR({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=CR(e.body,t),r=t.fontMetrics().axisHeight;return YL({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new X(`mrow`,[new X(`mpadded`,[RR(e.body,t)],[`vcenter`])])}}),lR({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new B(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=tV(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(IL(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return Y([`mord`,`text`].concat(i.sizingClasses(t)),VL(r),i)},mathmlBuilder(e,t){var n=new X(`mtext`,[new DR(tV(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var tV=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),nV=oR,rV=`[ \r
|
|
495
|
-
]`,iV=`\\\\[a-zA-Z@]+`,aV=`\\\\[^\ud800-\udfff]`,oV=`(`+iV+`)`+rV+`*`,sV=`\\\\(
|
|
496
|
-
|[ \r ]+
|
|
497
|
-
?)[ \r ]*`,cV=`[̀-ͯ]`,lV=RegExp(cV+`+$`),uV=`(`+rV+`+)|`+(sV+`|`)+`([!-\\[\\]-‧-豈-]`+(cV+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(cV+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+oV)+(`|`+aV+`)`),dV=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(uV,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new fB(`EOF`,new dB(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new B(`Unexpected character: '`+e[t]+`'`,new fB(e[t],new dB(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
|
|
498
|
-
`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new fB(r,new dB(this,t,this.tokenRegex.lastIndex))}},fV=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new B(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},pV=uB;Z(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Z(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Z(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Z(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Z(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Z(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),Z(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var mV={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Z(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new B("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=mV[t.text],r==null||r>=n)throw new B(`Invalid base-`+n+` digit `+t.text);for(var i;(i=mV[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var hV=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new B(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new B(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new B(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new B(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};Z(`\\newcommand`,e=>hV(e,!1,!0,!1)),Z(`\\renewcommand`,e=>hV(e,!0,!1,!1)),Z(`\\providecommand`,e=>hV(e,!0,!0,!0)),Z(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),Z(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),Z(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),nV[n],JI.math[n],JI.text[n]),``}),Z(`\\bgroup`,`{`),Z(`\\egroup`,`}`),Z(`~`,`\\nobreakspace`),Z(`\\lq`,"`"),Z(`\\rq`,`'`),Z(`\\aa`,`\\r a`),Z(`\\AA`,`\\r A`),Z(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),Z(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),Z(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Z(`ℬ`,`\\mathscr{B}`),Z(`ℰ`,`\\mathscr{E}`),Z(`ℱ`,`\\mathscr{F}`),Z(`ℋ`,`\\mathscr{H}`),Z(`ℐ`,`\\mathscr{I}`),Z(`ℒ`,`\\mathscr{L}`),Z(`ℳ`,`\\mathscr{M}`),Z(`ℛ`,`\\mathscr{R}`),Z(`ℭ`,`\\mathfrak{C}`),Z(`ℌ`,`\\mathfrak{H}`),Z(`ℨ`,`\\mathfrak{Z}`),Z(`\\Bbbk`,`\\Bbb{k}`),Z(`\\llap`,`\\mathllap{\\textrm{#1}}`),Z(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),Z(`\\clap`,`\\mathclap{\\textrm{#1}}`),Z(`\\mathstrut`,`\\vphantom{(}`),Z(`\\underbar`,`\\underline{\\text{#1}}`),Z(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),Z(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Z(`\\ne`,`\\neq`),Z(`≠`,`\\neq`),Z(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Z(`∉`,`\\notin`),Z(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Z(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Z(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Z(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Z(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Z(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Z(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Z(`⟂`,`\\perp`),Z(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),Z(`∌`,`\\notni`),Z(`⌜`,`\\ulcorner`),Z(`⌝`,`\\urcorner`),Z(`⌞`,`\\llcorner`),Z(`⌟`,`\\lrcorner`),Z(`©`,`\\copyright`),Z(`®`,`\\textregistered`),Z(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),Z(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),Z(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),Z(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),Z(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),Z(`⋮`,`\\vdots`),Z(`\\varGamma`,`\\mathit{\\Gamma}`),Z(`\\varDelta`,`\\mathit{\\Delta}`),Z(`\\varTheta`,`\\mathit{\\Theta}`),Z(`\\varLambda`,`\\mathit{\\Lambda}`),Z(`\\varXi`,`\\mathit{\\Xi}`),Z(`\\varPi`,`\\mathit{\\Pi}`),Z(`\\varSigma`,`\\mathit{\\Sigma}`),Z(`\\varUpsilon`,`\\mathit{\\Upsilon}`),Z(`\\varPhi`,`\\mathit{\\Phi}`),Z(`\\varPsi`,`\\mathit{\\Psi}`),Z(`\\varOmega`,`\\mathit{\\Omega}`),Z(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),Z(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),Z(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),Z(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),Z(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),Z(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),Z(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),Z(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var gV={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},_V=new Set([`bin`,`rel`]);Z(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in gV?t=gV[n]:(n.slice(0,4)===`\\not`||n in JI.math&&_V.has(JI.math[n].group))&&(t=`\\dotsb`),t});var vV={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Z(`\\dotso`,function(e){return e.future().text in vV?`\\ldots\\,`:`\\ldots`}),Z(`\\dotsc`,function(e){var t=e.future().text;return t in vV&&t!==`,`?`\\ldots\\,`:`\\ldots`}),Z(`\\cdots`,function(e){return e.future().text in vV?`\\@cdots\\,`:`\\@cdots`}),Z(`\\dotsb`,`\\cdots`),Z(`\\dotsm`,`\\cdots`),Z(`\\dotsi`,`\\!\\cdots`),Z(`\\dotsx`,`\\ldots\\,`),Z(`\\DOTSI`,`\\relax`),Z(`\\DOTSB`,`\\relax`),Z(`\\DOTSX`,`\\relax`),Z(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),Z(`\\,`,`\\tmspace+{3mu}{.1667em}`),Z(`\\thinspace`,`\\,`),Z(`\\>`,`\\mskip{4mu}`),Z(`\\:`,`\\tmspace+{4mu}{.2222em}`),Z(`\\medspace`,`\\:`),Z(`\\;`,`\\tmspace+{5mu}{.2777em}`),Z(`\\thickspace`,`\\;`),Z(`\\!`,`\\tmspace-{3mu}{.1667em}`),Z(`\\negthinspace`,`\\!`),Z(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),Z(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),Z(`\\enspace`,`\\kern.5em `),Z(`\\enskip`,`\\hskip.5em\\relax`),Z(`\\quad`,`\\hskip1em\\relax`),Z(`\\qquad`,`\\hskip2em\\relax`),Z(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),Z(`\\tag@paren`,`\\tag@literal{({#1})}`),Z(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new B(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),Z(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),Z(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),Z(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),Z(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),Z(`\\newline`,`\\\\\\relax`),Z(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var yV=V(UI[`Main-Regular`][84][1]-.7*UI[`Main-Regular`][65][1]);Z(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+yV+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),Z(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+yV+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),Z(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),Z(`\\@hspace`,`\\hskip #1\\relax`),Z(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),Z(`\\ordinarycolon`,`:`),Z(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),Z(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),Z(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),Z(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),Z(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),Z(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),Z(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),Z(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),Z(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),Z(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),Z(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),Z(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),Z(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),Z(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),Z(`∷`,`\\dblcolon`),Z(`∹`,`\\eqcolon`),Z(`≔`,`\\coloneqq`),Z(`≕`,`\\eqqcolon`),Z(`⩴`,`\\Coloneqq`),Z(`\\ratio`,`\\vcentcolon`),Z(`\\coloncolon`,`\\dblcolon`),Z(`\\colonequals`,`\\coloneqq`),Z(`\\coloncolonequals`,`\\Coloneqq`),Z(`\\equalscolon`,`\\eqqcolon`),Z(`\\equalscoloncolon`,`\\Eqqcolon`),Z(`\\colonminus`,`\\coloneq`),Z(`\\coloncolonminus`,`\\Coloneq`),Z(`\\minuscolon`,`\\eqcolon`),Z(`\\minuscoloncolon`,`\\Eqcolon`),Z(`\\coloncolonapprox`,`\\Colonapprox`),Z(`\\coloncolonsim`,`\\Colonsim`),Z(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),Z(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),Z(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),Z(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),Z(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Z(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),Z(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),Z(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),Z(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),Z(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),Z(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),Z(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),Z(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),Z(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),Z(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),Z(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),Z(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),Z(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),Z(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),Z(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),Z(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),Z(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),Z(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),Z(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),Z(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),Z(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),Z(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),Z(`\\imath`,`\\html@mathml{\\@imath}{ı}`),Z(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),Z(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Z(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Z(`⟦`,`\\llbracket`),Z(`⟧`,`\\rrbracket`),Z(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Z(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Z(`⦃`,`\\lBrace`),Z(`⦄`,`\\rBrace`),Z(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Z(`⦵`,`\\minuso`),Z(`\\darr`,`\\downarrow`),Z(`\\dArr`,`\\Downarrow`),Z(`\\Darr`,`\\Downarrow`),Z(`\\lang`,`\\langle`),Z(`\\rang`,`\\rangle`),Z(`\\uarr`,`\\uparrow`),Z(`\\uArr`,`\\Uparrow`),Z(`\\Uarr`,`\\Uparrow`),Z(`\\N`,`\\mathbb{N}`),Z(`\\R`,`\\mathbb{R}`),Z(`\\Z`,`\\mathbb{Z}`),Z(`\\alef`,`\\aleph`),Z(`\\alefsym`,`\\aleph`),Z(`\\Alpha`,`\\mathrm{A}`),Z(`\\Beta`,`\\mathrm{B}`),Z(`\\bull`,`\\bullet`),Z(`\\Chi`,`\\mathrm{X}`),Z(`\\clubs`,`\\clubsuit`),Z(`\\cnums`,`\\mathbb{C}`),Z(`\\Complex`,`\\mathbb{C}`),Z(`\\Dagger`,`\\ddagger`),Z(`\\diamonds`,`\\diamondsuit`),Z(`\\empty`,`\\emptyset`),Z(`\\Epsilon`,`\\mathrm{E}`),Z(`\\Eta`,`\\mathrm{H}`),Z(`\\exist`,`\\exists`),Z(`\\harr`,`\\leftrightarrow`),Z(`\\hArr`,`\\Leftrightarrow`),Z(`\\Harr`,`\\Leftrightarrow`),Z(`\\hearts`,`\\heartsuit`),Z(`\\image`,`\\Im`),Z(`\\infin`,`\\infty`),Z(`\\Iota`,`\\mathrm{I}`),Z(`\\isin`,`\\in`),Z(`\\Kappa`,`\\mathrm{K}`),Z(`\\larr`,`\\leftarrow`),Z(`\\lArr`,`\\Leftarrow`),Z(`\\Larr`,`\\Leftarrow`),Z(`\\lrarr`,`\\leftrightarrow`),Z(`\\lrArr`,`\\Leftrightarrow`),Z(`\\Lrarr`,`\\Leftrightarrow`),Z(`\\Mu`,`\\mathrm{M}`),Z(`\\natnums`,`\\mathbb{N}`),Z(`\\Nu`,`\\mathrm{N}`),Z(`\\Omicron`,`\\mathrm{O}`),Z(`\\plusmn`,`\\pm`),Z(`\\rarr`,`\\rightarrow`),Z(`\\rArr`,`\\Rightarrow`),Z(`\\Rarr`,`\\Rightarrow`),Z(`\\real`,`\\Re`),Z(`\\reals`,`\\mathbb{R}`),Z(`\\Reals`,`\\mathbb{R}`),Z(`\\Rho`,`\\mathrm{P}`),Z(`\\sdot`,`\\cdot`),Z(`\\sect`,`\\S`),Z(`\\spades`,`\\spadesuit`),Z(`\\sub`,`\\subset`),Z(`\\sube`,`\\subseteq`),Z(`\\supe`,`\\supseteq`),Z(`\\Tau`,`\\mathrm{T}`),Z(`\\thetasym`,`\\vartheta`),Z(`\\weierp`,`\\wp`),Z(`\\Zeta`,`\\mathrm{Z}`),Z(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),Z(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),Z(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),Z(`\\bra`,`\\mathinner{\\langle{#1}|}`),Z(`\\ket`,`\\mathinner{|{#1}\\rangle}`),Z(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),Z(`\\Bra`,`\\left\\langle#1\\right|`),Z(`\\Ket`,`\\left|#1\\right\\rangle`);var bV=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};Z(`\\bra@ket`,bV(!1)),Z(`\\bra@set`,bV(!0)),Z(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),Z(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),Z(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),Z(`\\angln`,`{\\angl n}`),Z(`\\blue`,`\\textcolor{##6495ed}{#1}`),Z(`\\orange`,`\\textcolor{##ffa500}{#1}`),Z(`\\pink`,`\\textcolor{##ff00af}{#1}`),Z(`\\red`,`\\textcolor{##df0030}{#1}`),Z(`\\green`,`\\textcolor{##28ae7b}{#1}`),Z(`\\gray`,`\\textcolor{gray}{#1}`),Z(`\\purple`,`\\textcolor{##9d38bd}{#1}`),Z(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),Z(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),Z(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),Z(`\\blueD`,`\\textcolor{##11accd}{#1}`),Z(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),Z(`\\tealA`,`\\textcolor{##94fff5}{#1}`),Z(`\\tealB`,`\\textcolor{##26edd5}{#1}`),Z(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),Z(`\\tealD`,`\\textcolor{##01a995}{#1}`),Z(`\\tealE`,`\\textcolor{##208170}{#1}`),Z(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),Z(`\\greenB`,`\\textcolor{##8af281}{#1}`),Z(`\\greenC`,`\\textcolor{##74cf70}{#1}`),Z(`\\greenD`,`\\textcolor{##1fab54}{#1}`),Z(`\\greenE`,`\\textcolor{##0d923f}{#1}`),Z(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),Z(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),Z(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),Z(`\\goldD`,`\\textcolor{##e07d10}{#1}`),Z(`\\goldE`,`\\textcolor{##a75a05}{#1}`),Z(`\\redA`,`\\textcolor{##fca9a9}{#1}`),Z(`\\redB`,`\\textcolor{##ff8482}{#1}`),Z(`\\redC`,`\\textcolor{##f9685d}{#1}`),Z(`\\redD`,`\\textcolor{##e84d39}{#1}`),Z(`\\redE`,`\\textcolor{##bc2612}{#1}`),Z(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),Z(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),Z(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),Z(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),Z(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),Z(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),Z(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),Z(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),Z(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),Z(`\\purpleE`,`\\textcolor{##543b78}{#1}`),Z(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),Z(`\\mintB`,`\\textcolor{##edf2df}{#1}`),Z(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),Z(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),Z(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),Z(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),Z(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),Z(`\\grayE`,`\\textcolor{##babec2}{#1}`),Z(`\\grayF`,`\\textcolor{##888d93}{#1}`),Z(`\\grayG`,`\\textcolor{##626569}{#1}`),Z(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),Z(`\\grayI`,`\\textcolor{##21242c}{#1}`),Z(`\\kaBlue`,`\\textcolor{##314453}{#1}`),Z(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var xV={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},SV=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new fV(pV,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new dV(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new fB(`EOF`,n.loc)),this.pushTokens(r),new fB(``,dB.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new B(`Extra }`,i)}else if(i.text===`EOF`)throw new B(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new B(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new B(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new B(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new B(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new B(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new B(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new fB(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new dV(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||nV.hasOwnProperty(e)||JI.math.hasOwnProperty(e)||JI.text.hasOwnProperty(e)||xV.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?nV.hasOwnProperty(e)&&!nV[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},CV=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,wV=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,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:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},DV=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new SV(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new B(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new fB(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&nV[i.text]&&nV[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new B(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new B(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new B(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new B(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new B(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new B(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(wV[i.text]){var s=CV.test(i.text),c=[];for(c.push(new fB(wV[i.text])),this.consume();;){var l=this.fetch().text;if(!wV[l]||CV.test(l)!==s)break;c.unshift(new fB(wV[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n||r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=nV[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new B(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new B(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new B(`Can't use function '`+r+`' in math mode`,n);var{args:a,optArgs:o}=this.parseArguments(r,i);return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=nV[e];if(o&&o.handler)return o.handler(a,t,n);throw new B(`No function handler for `+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],i=[],a=0;a<n;a++){var o=t.argTypes&&t.argTypes[a],s=a<t.numOptionalArgs;(`primitive`in t&&t.primitive&&o==null||t.type===`sqrt`&&a===1&&i[0]==null)&&(o=`primitive`);var c=this.parseGroupOfType(`argument to '`+e+`'`,o,s);if(s)i.push(c);else if(c!=null)r.push(c);else throw new B(`Null argument, please report this as a bug`)}return{args:r,optArgs:i}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(`raw`,n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new B(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new B(`Expected group as `+e,this.fetch());return a;case`original`:case null:case void 0:return this.parseArgumentGroup(n);default:throw new B(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r=``,i;(i=this.fetch()).text!==`EOF`;)r+=i.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new B(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(`color`,e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new B(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(`size`,e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new B(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!AI(i))throw new B(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(`url`,e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:dB.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!xV.hasOwnProperty(r)){if(this.settings.throwOnError)throw new B(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:dB.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:dB.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:dB.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new B(`\\verb assertion failed --
|
|
499
|
-
please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}EV.hasOwnProperty(t[0])&&!JI[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=EV[t[0]]+t.slice(1));var i=lV.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(JI[this.mode][t]){this.settings.strict&&this.mode===`math`&&yL.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=JI[this.mode][t].group,s=dB.range(e);a=nz(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(pI(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:dB.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!TV[l])throw new B(`Unknown accent ' `+l+`'`,e);var u=TV[l][this.mode]||TV[l].text;if(!u)throw new B(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:dB.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};DV.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var OV=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new DV(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new B(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new fB(`\\df@tag`)])}]}return r},kV=function(e,t,n){t.textContent=``;var r=NV(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),kV=function(){throw new B(`KaTeX doesn't work in quirks mode.`)});var AV=function(e,t){return NV(e,t).toMarkup()},jV=function(e,t){return OV(e,new KF(t))},MV=function(e,t,n){if(n.throwOnError||!(e instanceof B))throw e;var r=Y([`katex-error`],[new zI(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},NV=function(e,t){var n=new KF(t);try{return KR(OV(e,n),e,n)}catch(t){return MV(t,e,n)}},PV={version:`0.16.47`,render:kV,renderToString:AV,ParseError:B,SETTINGS_SCHEMA:HF,__parse:jV,__renderToDomTree:NV,__renderToHTMLTree:function(e,t){var n=new KF(t);try{return qR(OV(e,n),e,n)}catch(t){return MV(t,e,n)}},__setFontMetrics:Sne,__defineSymbol:H,__defineFunction:lR,__defineMacro:Z,__domTree:{Span:LI,Anchor:RI,SymbolNode:zI,SvgNode:BI,PathNode:VI,LineNode:HI}};function FV(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}var IV=JV(/[A-Za-z]/),LV=JV(/[\dA-Za-z]/),RV=JV(/[#-'*+\--9=?A-Z^-~]/);function zV(e){return e!==null&&(e<32||e===127)}var BV=JV(/\d/),VV=JV(/[\dA-Fa-f]/),HV=JV(/[!-/:-@[-`{-~]/);function UV(e){return e!==null&&e<-2}function WV(e){return e!==null&&(e<0||e===32)}function GV(e){return e===-2||e===-1||e===32}var KV=JV(/\p{P}|\p{S}/u),qV=JV(/\s/);function JV(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function YV(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var XV=(function(e){if(e==null)return tH;if(typeof e==`function`)return eH(e);if(typeof e==`object`)return Array.isArray(e)?ZV(e):QV(e);if(typeof e==`string`)return $V(e);throw Error(`Expected function, string, or object as test`)});function ZV(e){let t=[],n=-1;for(;++n<e.length;)t[n]=XV(e[n]);return eH(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function QV(e){let t=e;return eH(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function $V(e){return eH(t);function t(t){return t&&t.type===e}}function eH(e){return t;function t(t,n,r){return!!(nH(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function tH(){return!0}function nH(e){return typeof e==`object`&&!!e&&`type`in e}function rH(e){return e}var iH=[],aH=`skip`;function oH(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=XV(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+rH(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=iH;if(s&&r&&(o=sH(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=sH(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function sH(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?iH:[e]}function cH(e,t,n){let r=XV((n||{}).ignore||[]),i=lH(t),a=-1;for(;++a<i.length;)oH(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return aH}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function lH(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([uH(e[0]),dH(e[1])])}return t}function uH(e){return typeof e==`string`?new RegExp(YV(e),`g`):e}function dH(e){return typeof e==`function`?e:function(){return e}}var fH=`phrasing`,pH=[`autolink`,`link`,`image`,`label`];function mH(){return{transforms:[SH],enter:{literalAutolink:gH,literalAutolinkEmail:_H,literalAutolinkHttp:_H,literalAutolinkWww:_H},exit:{literalAutolink:xH,literalAutolinkEmail:bH,literalAutolinkHttp:vH,literalAutolinkWww:yH}}}function hH(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:fH,notInConstruct:pH},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:fH,notInConstruct:pH},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:fH,notInConstruct:pH}]}}function gH(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function _H(e){this.config.enter.autolinkProtocol.call(this,e)}function vH(e){this.config.exit.autolinkProtocol.call(this,e)}function yH(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 bH(e){this.config.exit.autolinkEmail.call(this,e)}function xH(e){this.exit(e)}function SH(e){cH(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,CH],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,wH]],{ignore:[`link`,`linkReference`]})}function CH(e,t,n,r,i){let a=``;if(!DH(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!TH(n)))return!1;let o=EH(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 wH(e,t,n,r){return!DH(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function TH(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 EH(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=FV(e,`(`),a=FV(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 DH(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||qV(n)||KV(n))&&(!t||n!==47)}function OH(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}RH.peek=LH;function kH(){this.buffer()}function AH(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function jH(){this.buffer()}function MH(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function NH(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=OH(this.sliceSerialize(e)).toLowerCase(),n.label=t}function PH(e){this.exit(e)}function FH(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=OH(this.sliceSerialize(e)).toLowerCase(),n.label=t}function IH(e){this.exit(e)}function LH(){return`[`}function RH(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 zH(){return{enter:{gfmFootnoteCallString:kH,gfmFootnoteCall:AH,gfmFootnoteDefinitionLabelString:jH,gfmFootnoteDefinition:MH},exit:{gfmFootnoteCallString:NH,gfmFootnoteCall:PH,gfmFootnoteDefinitionLabelString:FH,gfmFootnoteDefinition:IH}}}function BH(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:RH},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?`
|
|
500
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?HH:VH))),s(),o}}function VH(e,t,n){return t===0?e:HH(e,t,n)}function HH(e,t,n){return(n?``:` `)+e}var UH=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];JH.attention=YH,JH.peek=XH;function WH(){return{canContainEols:[`delete`],enter:{strikethrough:KH},exit:{strikethrough:qH}}}function GH(){return{handlers:{delete:JH},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:UH}]}}function KH(e){this.enter({type:`delete`,children:[],position:void 0},e)}function qH(e){this.exit(e)}function JH(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function YH(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function XH(){return`~`}function ZH(e){return e.length}function QH(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ZH,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=$H(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]=eU(r[d]);else{let e=eU(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(`
|
|
501
|
-
`)}function $H(e){return e==null?``:String(e)}function eU(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}var tU=XV([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function nU(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()),rU);return i(),o}function rU(e,t,n){return`>`+(n?``:` `)+e}function iU(e,t){return aU(e,t.inConstruct,!0)&&!aU(e,t.notInConstruct,!1)}function aU(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 oU(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
|
|
502
|
-
`&&!e.before&&!e.after&&iU(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
503
|
-
`}function sU(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 cU(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function lU(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function uU(e,t,n,r){let i=lU(n),a=e.value||``;if(cU(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,dU);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(sU(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
504
|
-
`,encode:["`"],...o.current()})),t()}return u+=o.move(`
|
|
505
|
-
`),a&&(u+=o.move(a+`
|
|
506
|
-
`)),u+=o.move(s),c(),u}function dU(e,t,n){return(n?``:` `)+e}function fU(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function pU(e,t,n,r){let i=fU(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?` `:`
|
|
507
|
-
`,...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 mU(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function hU(e){if(e===null||WV(e)||qV(e))return 1;if(KV(e))return 2}function gU(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function _U(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function vU(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function yU(e,t,n){let r=hU(e),i=hU(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}}var bU=`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(`.`),xU=[`pre`,`script`,`style`,`textarea`];function SU(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:IV(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!IV(a))return;for(;a===45||LV(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&xU.includes(o)?1:bU.includes(o)?6:7}var CU=new Map([[`*`,!1],[`_`,!0]]);function wU(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function TU(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=CU.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=hU(u.charCodeAt(u.length-1)),f=hU((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(OU(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:wU(e,t,a),index:o}}}function EU(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?gU(n.value):_U(n.value),i=vU(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function DU(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=MU(e,c,r,i),u=TU(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function OU(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function kU(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!HV(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function AU(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?gU(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
|
|
508
|
-
`)&&l.type===`html`&&SU(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(NU(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=jU(l,f.attention,t,c);a.push(e),s=_U(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=_U(n)}}return r.pop(),a}function jU(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=kU(e.type,a,o),c=s[0],l=n.enter(i);r.move(c);let u=AU(e,n,{...r.current(),before:c,after:c});return r.move(NU(u,c,c)),r.move(c),l(),{children:u,sequences:s}}function MU(e,t,n,r){let i=[],a,o=_U(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===gU(n)&&EU([e],!0),a=void 0,i.push(e),e.value&&(o=_U(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=gU(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=MU(n.children,t,c,c),m=p.length>0?p[0].value:``,h=yU(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&EU(p,!0);let g=p.length>0?_U(p[p.length-1].value):``,_=yU(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&EU(p,!1),h.outside&&d!==`
|
|
509
|
-
`&&d!==`\r`&&EU(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function NU(e,t,n){let r=new Map,i=MU(e,r,t,n),a=i,o=TU(a,t,n);for(;o;){let s=DU(e,r,o,t,n);if(!s){a=i;break}r=s.chosen,a=s.tokens,o=s.mistake}let s=``;for(let e of a)s+=e.value;return s}PU.attention=FU,PU.peek=IU;function PU(e,t,n,r){let i=n.enter(`phrasing`),a=NU([jU(e,FU,n,n.createTracker(r))],r.before,r.after);return i(),a}function FU(e,t){return{construct:`emphasis`,markers:mU(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function IU(e,t,n){return n.options.emphasis||`*`}function LU(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?oH(e,i,zU(a),o):oH(e,i,RU(a),o)}function RU(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?zU(e.enter):e.enter,exit:typeof e.exit==`function`?zU(e.exit):e.exit}}function zU(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var BU={};function VU(e,t){let n=t||BU;return HU(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function HU(e,t,n){if(WU(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 UU(e.children,t,n)}return Array.isArray(e)?UU(e,t,n):``}function UU(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=HU(e[i],t,n);return r.join(``)}function WU(e){return!!(e&&typeof e==`object`)}function GU(e,t){let n=!1;return LU(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)&&VU(e)&&(t.options.setext||n))}function KU(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(GU(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
510
|
-
`,after:`
|
|
511
|
-
`});return r(),t(),o+`
|
|
512
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
513
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
514
|
-
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=vU(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}qU.peek=JU;function qU(e){return e.value||``}function JU(){return`<`}YU.peek=XU;function YU(e,t,n,r){let i=fU(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 XU(){return`!`}ZU.peek=QU;function ZU(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=u.filter(function(e){return e!==`phrasing`}),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 QU(){return`!`}$U.peek=eW;function $U(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;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 eW(){return"`"}function tW(e,t){let n=VU(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))}nW.peek=rW;function nW(e,t,n,r){let i=fU(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(tW(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
|
|
515
|
-
`||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(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:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function rW(e,t,n){return tW(e,n)?`<`:`[`}iW.peek=aW;function iW(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=u.filter(function(e){return e!==`phrasing`}),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 aW(){return`[`}function oW(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 sW(e){let t=oW(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 cW(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function lW(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 uW(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?cW(n):oW(n),s=e.ordered?o===`.`?`)`:`.`:sW(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),lW(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 dW(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 fW(e,t,n,r){let i=dW(n),a=n.bulletCurrent||oW(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 pW(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function mW(e,t,n,r){if(!e.children.some(function(e){return tU(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function hW(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}gW.attention=_W,gW.peek=vW;function gW(e,t,n,r){let i=n.enter(`phrasing`),a=NU([jU(e,_W,n,n.createTracker(r))],r.before,r.after);return i(),a}function _W(e,t){return{construct:`strong`,markers:hW(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function vW(e,t,n){return n.options.strong||`*`}function yW(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function bW(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 xW(e,t,n){let r=(lW(n)+(n.options.ruleSpaces?` `:``)).repeat(bW(n));return n.options.ruleSpaces?r.slice(0,-1):r}var SW={blockquote:nU,break:oU,code:uU,definition:pU,emphasis:PU,hardBreak:oU,heading:KU,html:qU,image:YU,imageReference:ZU,inlineCode:$U,link:nW,linkReference:iW,list:uW,listItem:fW,paragraph:pW,root:mW,strong:gW,text:yW,thematicBreak:xW},CW=document.createElement(`i`);function wW(e){let t=`&`+e+`;`;CW.innerHTML=t;let n=CW.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function TW(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)}var EW=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function DW(e){return e.replace(EW,OW)}function OW(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return TW(n.slice(t?2:1),t?16:10)}return wW(n)||e}function kW(){return{enter:{table:AW,tableData:PW,tableHeader:PW,tableRow:MW},exit:{codeText:FW,table:jW,tableData:NW,tableHeader:NW,tableRow:NW}}}function AW(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 jW(e){this.exit(e),this.data.inTable=void 0}function MW(e){this.enter({type:`tableRow`,children:[]},e)}function NW(e){this.exit(e)}function PW(e){this.enter({type:`tableCell`,children:[]},e)}function FW(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,IW));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function IW(e,t){return t===`|`?t:e}function LW(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
516
|
-
`,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(`
|
|
517
|
-
`))}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 QH(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=SW.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function RW(){return{exit:{taskListCheckValueChecked:BW,taskListCheckValueUnchecked:BW,paragraph:VW}}}function zW(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:HW}}}function BW(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function VW(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 HW(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=SW.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 UW(){return[mH(),zH(),WH(),kW(),RW()]}function WW(e){return{extensions:[hH(),BH(e),GH(),LW(e),zW()]}}function GW(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 KW(e,t){return e.length>0?(GW(e,e.length,0,t),e):t}var qW={}.hasOwnProperty;function JW(e){let t={},n=-1;for(;++n<e.length;)YW(t,e[n]);return t}function YW(e,t){let n;for(n in t){let r=(qW.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){qW.call(r,a)||(r[a]=[]);let e=i[a];XW(r[a],Array.isArray(e)?e:e?[e]:[])}}}function XW(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);GW(e,0,0,r)}var ZW={tokenize:dG,partial:!0},QW={tokenize:fG,partial:!0},$W={tokenize:pG,partial:!0},eG={tokenize:mG,partial:!0},tG={tokenize:hG,partial:!0},nG={name:`wwwAutolink`,tokenize:lG,previous:gG},rG={name:`protocolAutolink`,tokenize:uG,previous:_G},iG={name:`emailAutolink`,tokenize:cG,previous:vG},aG={};function oG(){return{text:aG}}for(var sG=48;sG<123;)aG[sG]=iG,sG++,sG===58?sG=65:sG===91&&(sG=97);aG[43]=iG,aG[45]=iG,aG[46]=iG,aG[95]=iG,aG[72]=[iG,rG],aG[104]=[iG,rG],aG[87]=[iG,nG],aG[119]=[iG,nG];function cG(e,t,n){let r=this,i,a;return o;function o(t){return!yG(t)||!vG.call(r,r.previous)||bG(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return yG(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(tG,u,l)(t):t===45||t===95||LV(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&&IV(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function lG(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!gG.call(r,r.previous)||bG(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ZW,e.attempt(QW,e.attempt($W,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function uG(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&_G.call(r,r.previous)&&!bG(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(IV(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||zV(t)||WV(t)||qV(t)||KV(t)?n(t):e.attempt(QW,e.attempt($W,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function dG(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 fG(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(eG,c,s)(t):t===null||WV(t)||qV(t)||t!==45&&KV(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 pG(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(eG,t,a)(o):o===null||WV(o)||qV(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function mG(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||WV(o)||qV(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||WV(e)||qV(e)?t(e):r(e)}function a(e){return IV(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):IV(t)?(e.consume(t),o):n(t)}}function hG(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return LV(e)?n(e):t(e)}}function gG(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||WV(e)}function _G(e){return!IV(e)}function vG(e){return!(e===47||yG(e))}function yG(e){return e===43||e===45||e===46||e===95||LV(e)}function bG(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}function xG(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&LV(e.charCodeAt(n+1))&&LV(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 SG(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 CG={name:`attention`,resolveAll:wG,tokenize:TG};function wG(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};EG(o,-a),EG(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=KW(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=KW(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=KW(r,SG(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=KW(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=KW(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),GW(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function TG(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=hU(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=hU(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function EG(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var DG={name:`autolink`,tokenize:OG};function OG(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 IV(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||LV(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||LV(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||zV(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):RV(t)?(e.consume(t),l):n(t)}function u(e){return LV(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||LV(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function kG(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return GV(r)?(e.enter(n),s(r)):t(r)}function s(r){return GV(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function AG(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&GV(t)?(e.enter(r),c(t)):l(t)}function c(t){return GV(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var jG={partial:!0,tokenize:MG};function MG(e,t,n){return r;function r(t){return GV(t)?kG(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||UV(e)?t(e):n(e)}}var NG={continuation:{tokenize:FG},exit:IG,name:`blockQuote`,tokenize:PG};function PG(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 GV(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function FG(e,t,n){let r=this;return i;function i(t){return GV(t)?kG(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(NG,t,n)(r)}}function IG(e){e.exit(`blockQuote`)}var LG={name:`characterEscape`,tokenize:RG};function RG(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 HV(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var zG={name:`characterReference`,tokenize:BG};function BG(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=LV,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=VV,u):(e.enter(`characterReferenceValue`),a=7,o=BV,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===LV&&!wW(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 VG={partial:!0,tokenize:HG};function HG(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 UG={concrete:!0,name:`codeFenced`,tokenize:WG};function WG(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`),GV(t)?kG(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||UV(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(VG,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||UV(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):GV(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),kG(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||UV(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||UV(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&&GV(t)?kG(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||UV(t)?e.check(VG,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||UV(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`),GV(t)?kG(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`),GV(t)?kG(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||UV(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var GG={name:`codeIndented`,tokenize:qG},KG={partial:!0,tokenize:JG};function qG(e,t,n){return r;function r(t){return e.enter(`codeIndented`),AG(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):UV(t)?e.attempt(KG,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||UV(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function JG(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):UV(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):AG(e,t,a,`linePrefix`,4,4)(o)}function a(e){return UV(e)?i(e):n(e)}}var YG={name:`codeText`,previous:ZG,resolve:XG,tokenize:QG};function XG(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 ZG(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function QG(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)):UV(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||UV(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 $G=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&&eK(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),eK(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),eK(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);eK(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);eK(this.left,t.reverse())}}}};function eK(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 tK(e){let t={},n=-1,r,i,a,o,s,c,l,u=new $G(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,nK(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 GW(e,0,1/0,u.slice(0)),!l}function nK(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 rK={resolve:aK,tokenize:oK},iK={partial:!0,tokenize:sK};function aK(e){return tK(e),e}function oK(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):UV(t)?e.check(iK,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 sK(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),kG(e,a,`linePrefix`)}function a(i){if(i===null||UV(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 cK(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||zV(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||UV(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||WV(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||zV(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 lK(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):UV(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||UV(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!GV(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function uK(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):UV(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),kG(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||UV(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 dK(e,t){let n;return r;function r(i){return UV(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):GV(i)?kG(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var fK={name:`definition`,tokenize:mK},pK={partial:!0,tokenize:hK};function mK(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return lK.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=OH(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 WV(t)?dK(e,l)(t):l(t)}function l(t){return cK(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(pK,d,d)(t)}function d(t){return GV(t)?kG(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||UV(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function hK(e,t,n){return r;function r(t){return WV(t)?dK(e,i)(t):n(t)}function i(t){return uK(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return GV(t)?kG(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||UV(e)?t(e):n(e)}}var gK={name:`hardBreakEscape`,tokenize:_K};function _K(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return UV(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var vK={name:`headingAtx`,resolve:yK,tokenize:bK};function yK(e,t){let n=e.length-2,r=3;if(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){let 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`};GW(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function bK(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||WV(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||UV(n)?(e.exit(`atxHeading`),t(n)):GV(n)?kG(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||WV(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var xK={concrete:!0,name:`htmlFlow`,resolveTo:CK,tokenize:wK},SK={partial:!0,tokenize:TK};function CK(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 wK(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:k):IV(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):IV(a)?(e.consume(a),i=4,r.interrupt?t:k):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:k):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 IV(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||WV(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&xU.includes(l)?(i=1,r.interrupt?t(s):O(s)):bU.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||LV(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 GV(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||IV(t)?(e.consume(t),b):GV(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||LV(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):GV(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):GV(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||UV(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||WV(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||GV(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||UV(t)?O(t):GV(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),re):t===60&&i===1?(e.consume(t),ie):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),k):t===93&&i===5?(e.consume(t),oe):UV(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(SK,ce,ee)(t)):t===null||UV(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(VG,te,ce)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return t===null||UV(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function re(t){return t===45?(e.consume(t),k):O(t)}function ie(t){return t===47?(e.consume(t),o=``,ae):O(t)}function ae(t){if(t===62){let n=o.toLowerCase();return xU.includes(n)?(e.consume(t),se):O(t)}return IV(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):O(t)}function oe(t){return t===93?(e.consume(t),k):O(t)}function k(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),k):O(t)}function se(t){return t===null||UV(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function TK(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(jG,t,n)}}var EK={name:`htmlText`,tokenize:DK};function DK(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):IV(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):IV(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):UV(t)?(o=d,ie(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?re(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):UV(t)?(o=h,ie(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?re(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?re(t):UV(t)?(o=v,ie(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):UV(t)?(o=y,ie(t)):(e.consume(t),y)}function b(e){return e===62?re(e):y(e)}function x(t){return IV(t)?(e.consume(t),S):n(t)}function S(t){return t===45||LV(t)?(e.consume(t),S):C(t)}function C(t){return UV(t)?(o=C,ie(t)):GV(t)?(e.consume(t),C):re(t)}function w(t){return t===45||LV(t)?(e.consume(t),w):t===47||t===62||WV(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),re):t===58||t===95||IV(t)?(e.consume(t),E):UV(t)?(o=T,ie(t)):GV(t)?(e.consume(t),T):re(t)}function E(t){return t===45||t===46||t===58||t===95||LV(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):UV(t)?(o=D,ie(t)):GV(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,ee):UV(t)?(o=O,ie(t)):GV(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,ne):t===null?n(t):UV(t)?(o=ee,ie(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||WV(t)?T(t):(e.consume(t),te)}function ne(e){return e===47||e===62||WV(e)?T(e):n(e)}function re(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ie(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return GV(t)?kG(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}var OK={name:`labelEnd`,resolveAll:MK,resolveTo:NK,tokenize:PK},kK={tokenize:FK},AK={tokenize:IK},jK={tokenize:LK};function MK(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&&GW(e,0,e.length,n),e}function NK(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=KW(o,e.slice(i+1,i+r+3)),o=KW(o,[[`enter`,l,t]]),o=KW(o,SG(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=KW(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=KW(o,e.slice(a+1)),o=KW(o,[[`exit`,s,t]]),GW(e,i,e.length,o),e}function PK(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(OH(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(kK,u,o?u:d)(t):t===91?e.attempt(AK,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(jK,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function FK(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 WV(t)?dK(e,a)(t):a(t)}function a(t){return t===41?u(t):cK(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return WV(t)?dK(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?uK(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return WV(t)?dK(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 IK(e,t,n){let r=this;return i;function i(t){return lK.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(OH(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function LK(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 RK={name:`labelStartImage`,resolveAll:OK.resolveAll,tokenize:zK};function zK(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var BK={name:`labelStartLink`,resolveAll:OK.resolveAll,tokenize:VK};function VK(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var HK={name:`lineEnding`,tokenize:UK};function UK(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),kG(e,t,`linePrefix`)}}var WK={name:`thematicBreak`,tokenize:GK};function GK(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||UV(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),GV(t)?kG(e,s,`whitespace`)(t):s(t))}}var KK={continuation:{tokenize:XK},exit:QK,name:`list`,tokenize:YK},qK={partial:!0,tokenize:$K},JK={partial:!0,tokenize:ZK};function YK(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:BV(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(WK,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 BV(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(jG,r.interrupt?n:u,e.attempt(qK,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return GV(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 XK(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(jG,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kG(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!GV(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(JK,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,kG(e,e.attempt(KK,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ZK(e,t,n){let r=this;return kG(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 QK(e){e.exit(this.containerState.type)}function $K(e,t,n){let r=this;return kG(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!GV(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var eq=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){tq(this,e,t,n,!1)}addBefore(e,t,n){tq(this,e,t,n,!0)}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 tq(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var nq={name:`setextUnderline`,resolveTo:rq,tokenize:iq};function rq(e,t){let n=new eq,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function iq(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`),GV(t)?kG(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||UV(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var aq={tokenize:pq,partial:!0};function oq(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:uq,continuation:{tokenize:dq},exit:fq}},text:{91:{name:`gfmFootnoteCall`,tokenize:lq},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:sq,resolveTo:cq}}}}function sq(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=OH(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 cq(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 lq(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||WV(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(OH(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return WV(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 uq(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||WV(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=OH(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return WV(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),kG(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function dq(e,t,n){return e.check(jG,t,e.attempt(aq,t,n))}function fq(e){e.exit(`gfmFootnoteDefinition`)}function pq(e,t,n){let r=this;return kG(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 mq(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&&GW(o,o.length,0,SG(s,e.slice(r+1,n),t)),GW(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),GW(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=hU(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=hU(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var hq=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){gq(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 gq(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 _q(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 vq(){return{flow:{null:{name:`table`,tokenize:yq,resolveAll:bq}}}}function yq(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||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):UV(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):GV(t)?kG(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||WV(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,GV(t)?kG(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 GV(t)?kG(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||UV(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 GV(t)?kG(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||UV(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||UV(n)?(e.exit(`tableRow`),t(n)):GV(n)?kG(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||WV(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 bq(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 hq;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Sq(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=xq(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=xq(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=xq(f,t,o,i,n,d)):(o[0]=o[1],d=xq(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Sq(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=_q(t.events,n))}return e}function xq(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Cq(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Cq(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=Cq(t.events,n[2]),a=Cq(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({},Cq(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Sq(e,t,n,r,i){let a=[],o=Cq(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 Cq(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var wq={name:`tasklistCheck`,tokenize:Eq};function Tq(){return{text:{91:wq}}}function Eq(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 WV(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 UV(r)?t(r):GV(r)?e.check({tokenize:Dq},t,n)(r):n(r)}}function Dq(e,t,n){return kG(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Oq(e){return JW([oG(),oq(),mq(e),vq(),Tq()])}var kq={};function Aq(e){let t=this,n=e||kq,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Oq(n)),a.push(UW()),o.push(WW(n))}function jq(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function Mq(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
|
|
518
|
-
`,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(sU(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
|
|
519
|
-
`,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
|
|
520
|
-
`),i&&(c+=a.move(i+`
|
|
521
|
-
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var Nq={tokenize:Fq,concrete:!0,name:`mathFlow`},Pq={tokenize:Iq,partial:!0};function Fq(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){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),kG(e,l,`whitespace`)(t))}function l(t){return t===null||UV(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||UV(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(Pq,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?kG(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):UV(t)?e.attempt(Pq,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||UV(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return kG(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),kG(e,c,`whitespace`)(t))}function c(r){return r===null||UV(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function Iq(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Lq(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:Rq,previous:zq,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):UV(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||UV(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function Rq(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===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,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=`mathTextData`,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 zq(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function Bq(e){return{flow:{36:Nq},text:{36:Lq(e)}}}var Vq={};function Hq(e){let t=this,n=e||Vq,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Bq(n)),a.push(jq()),o.push(Mq(n))}var Uq={tokenize:Wq};function Wq(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),kG(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);else return UV(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Gq={tokenize:qq},Kq={tokenize:Jq};function qq(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++;let c=new eq;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),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(Kq,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(Kq,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);else 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);else return UV(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++;let l=new eq;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}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 Jq(e,t,n){return kG(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var Yq={tokenize:Xq};function Xq(e){let t=this,n=e.attempt(jG,r,e.attempt(this.parser.constructs.flowInitial,i,kG(e,e.attempt(this.parser.constructs.flow,i,e.attempt(rK,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Zq={resolveAll:tJ()},Qq=eJ(`string`),$q=eJ(`text`);function eJ(e){return{resolveAll:tJ(e===`text`?nJ: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);else 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 tJ(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 nJ(e,t){let n=new eq,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var rJ=s({attentionMarkers:()=>dJ,contentInitial:()=>aJ,disable:()=>fJ,document:()=>iJ,flow:()=>sJ,flowInitial:()=>oJ,insideSpan:()=>uJ,string:()=>cJ,text:()=>lJ}),iJ={42:KK,43:KK,45:KK,48:KK,49:KK,50:KK,51:KK,52:KK,53:KK,54:KK,55:KK,56:KK,57:KK,62:NG},aJ={91:fK},oJ={[-2]:GG,[-1]:GG,32:GG},sJ={35:vK,42:WK,45:[nq,WK],60:xK,61:nq,95:WK,96:UG,126:UG},cJ={38:zG,92:LG},lJ={[-5]:HK,[-4]:HK,[-3]:HK,33:RK,38:zG,42:CG,60:[DG,EK],91:BK,92:[gK,LG],93:OK,95:CG,96:YG},uJ={null:[CG,Zq]},dJ={null:[42,95]},fJ={null:[]};function pJ(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=KW(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=SG(a,l.events,l),l.events):[]}function f(e,t){return hJ(p(e),t)}function p(e){return mJ(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(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){UV(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&&GW(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 mJ(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 hJ(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=`
|
|
522
|
-
`;break;case-3:o=`\r
|
|
523
|
-
`;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 gJ(e){let t={constructs:JW([rJ,...(e||{}).extensions||[]]),content:n(Uq),defined:[],document:n(Gq),flow:n(Yq),lazy:{},string:n(Qq),text:n($q)};return t;function n(e){return n;function n(n){return pJ(t,e,n)}}}function _J(e){for(;!tK(e););return e}var vJ=/[\0\t\n\r]/g;function yJ(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){vJ.lastIndex=c;let n=vJ.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var bJ={}.hasOwnProperty;function xJ(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),SJ(n)(_J(gJ(n).document().write(yJ()(e,t,!0))))}function SJ(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(Ee),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(Se),blockQuote:o(_e),characterEscape:E,characterReference:E,codeFenced:o(ve),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ve,s),codeText:o(ye,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(be),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(xe),hardBreakEscape:o(Ce),hardBreakTrailing:o(Ce),htmlFlow:o(we,s),htmlFlowData:E,htmlText:o(we,s),htmlTextData:E,image:o(Te),label:s,link:o(Ee),listItem:o(Oe),listItemValue:p,listOrdered:o(De,f),listUnordered:o(De),paragraph:o(ke),reference:ue,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Se),strong:o(Ae),thematicBreak:o(Me)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ge,autolinkProtocol:he,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:pe,characterReference:me,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(re),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(ee),hardBreakTrailing:l(ee),htmlFlow:l(te),htmlFlowData:D,htmlText:l(ne),htmlTextData:D,image:l(ae),label:k,labelText:oe,lineEnding:O,link:l(ie),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:de,resourceDestinationString:se,resourceTitleString:ce,resource:le,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};wJ(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),bJ.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||EJ).call(o,void 0,e[0])}for(r.position={start:CJ(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:CJ(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];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 n=r;for(s=void 0;n--;){let t=e[n];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=n}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),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(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:CJ(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+ZP({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||EJ).call(this,e,r[0])),n.position.end=CJ(e.end)}function d(){return VU(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(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 m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){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 v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=OH(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=je(),n.position={start:CJ(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=CJ(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=CJ(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function ee(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){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 ae(){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 oe(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=DW(t),n.identifier=OH(t).toLowerCase()}function k(){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 se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function le(){this.data.inReference=void 0}function ue(){this.data.referenceType=`collapsed`}function de(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=OH(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function fe(e){this.data.characterReferenceType=e.type}function pe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=TW(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=wW(t);let i=this.stack[this.stack.length-1];i.value+=r}function me(e){let t=this.stack.pop();t.position.end=CJ(e.end)}function he(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ge(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function _e(){return{type:`blockquote`,children:[],position:void 0}}function ve(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ye(){return{type:`inlineCode`,value:``,position:void 0}}function be(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function xe(){return{type:`emphasis`,children:[],position:void 0}}function Se(){return{type:`heading`,depth:0,children:[],position:void 0}}function Ce(){return{type:`break`,position:void 0}}function we(){return{type:`html`,value:``,position:void 0}}function Te(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function Ee(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function De(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function Oe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function ke(){return{type:`paragraph`,children:[],position:void 0}}function Ae(){return{type:`strong`,children:[],position:void 0}}function je(){return{type:`text`,value:``,position:void 0}}function Me(){return{type:`thematicBreak`,position:void 0}}}function CJ(e){return{line:e.line,column:e.column,offset:e.offset}}function wJ(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?wJ(e,r):TJ(e,r)}}function TJ(e,t){let n;for(n in t)if(bJ.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`afterExit`:case`beforeEnter`:{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 EJ(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ZP({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ZP({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ZP({start:t.start,end:t.end})+`) is still open`)}function DJ(e){let t=this;t.parser=n;function n(n){return xJ(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function OJ(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 kJ(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
524
|
-
`}]}function AJ(e,t){let n=t.value?t.value+`
|
|
525
|
-
`:``,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 jJ(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MJ(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NJ(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=xG(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 PJ(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 FJ(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function IJ(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 LJ(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return IJ(e,t);let i={src:xG(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 RJ(e,t){let n={src:xG(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 zJ(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 BJ(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return IJ(e,t);let i={href:xG(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 VJ(e,t){let n={href:xG(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 HJ(e,t,n){let r=e.all(t),i=n?UJ(n):WJ(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:`
|
|
526
|
-
`}),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:`
|
|
527
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function UJ(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=WJ(n[r])}return t}function WJ(e){return e.spread??e.children.length>1}function GJ(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 KJ(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qJ(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function JJ(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YJ(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=JP(t.children[1]),o=qP(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 XJ(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 ZJ(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var QJ=9,$J=32;function eY(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(tY(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(tY(t.slice(i),i>0,!1)),a.join(``)}function tY(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===QJ||t===$J;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===QJ||t===$J;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function nY(e,t){let n={type:`text`,value:eY(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function rY(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var iY={blockquote:OJ,break:kJ,code:AJ,delete:jJ,emphasis:MJ,footnoteReference:NJ,heading:PJ,html:FJ,imageReference:LJ,image:RJ,inlineCode:zJ,linkReference:BJ,link:VJ,listItem:HJ,list:GJ,paragraph:KJ,root:qJ,strong:JJ,table:YJ,tableCell:ZJ,tableRow:XJ,text:nY,thematicBreak:rY,toml:aY,yaml:aY,definition:aY,footnoteDefinition:aY};function aY(){}var{defineProperty:oY}=Object,sY=typeof self==`object`?self:globalThis,cY=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new sY[e](t)},lY=(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__`?oY(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 sY[e]==`function`?cY(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(cY(a,o),i)};return r},uY=e=>lY(new Map,e)(0),dY=``,{toString:fY}={},{keys:pY,is:mY}=Object,hY=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=fY.call(e).slice(8,-1);switch(n){case`Array`:return[1,dY];case`Object`:return[2,dY];case`Date`:return[3,dY];case`RegExp`:return[4,dY];case`Map`:return[5,dY];case`Set`:return[6,dY];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},gY=([e,t])=>e===0&&(t===`function`||t===`symbol`),_Y=(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]=hY(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&mY(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 pY(o))(e||!gY(hY(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?dY: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||!(gY(hY(n))||gY(hY(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!gY(hY(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},vY=(e,{json:t,lossy:n}={})=>{let r=[];return _Y(!(t||n),!!t,new Map,r)(e),r},yY=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?uY(vY(e,t)):structuredClone(e):(e,t)=>uY(vY(e,t));function bY(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 xY(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function SY(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||bY,r=e.options.footnoteBackLabel||xY,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=xG(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:{...yY(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
528
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
529
|
-
`}]}}var CY={}.hasOwnProperty,wY={};function TY(e,t){let n=t||wY,r=new Map,i=new Map,a={all:s,applyData:DY,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...iY,...n.handlers},one:o,options:n,patch:EY,wrap:kY};return LU(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(CY.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=yY(n);return r.children=a.all(e),r}return yY(e)}return(a.options.unknownHandler||OY)(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=AY(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=AY(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function EY(e,t){e.position&&(t.position=XP(e))}function DY(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,yY(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function OY(e,t){let n=t.data||{},r=`value`in t&&!(CY.call(n,`hProperties`)||CY.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 kY(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
530
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
531
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
532
|
-
`}),n}function AY(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function jY(e,t){let n=TY(e,t),r=n.one(e,void 0),i=SY(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
533
|
-
`},i)),a}function MY(e,t){return e&&`run`in e?async function(n,r){let i=jY(n,{file:r,...t});await e.run(i,r)}:function(n,r){return jY(n,{file:r,...e||t})}}function NY(e){if(e)throw e}var PY=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 FY(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 IY(){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);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?LY(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 LY(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 RY={basename:zY,dirname:BY,extname:VY,join:HY,sep:`/`};function zY(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);GY(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 BY(e){if(GY(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 VY(e){GY(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}}else 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 HY(...e){let t=-1,n;for(;++t<e.length;)GY(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:UY(n)}function UY(e){GY(e);let t=e.codePointAt(0)===47,n=WY(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function WY(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 GY(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var KY={cwd:qY};function qY(){return`/`}function JY(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function YY(e){if(typeof e==`string`)e=new URL(e);else if(!JY(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 XY(e)}function XY(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 ZY=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],QY=class{constructor(e){let t;t=e?JY(e)?{path:e}:typeof e==`string`||nX(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:KY.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<ZY.length;){let e=ZY[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)ZY.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?RY.basename(this.path):void 0}set basename(e){eX(e,`basename`),$Y(e,`basename`),this.path=RY.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?RY.dirname(this.path):void 0}set dirname(e){tX(this.basename,`dirname`),this.path=RY.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?RY.extname(this.path):void 0}set extname(e){if($Y(e,`extname`),tX(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=RY.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){JY(e)&&(e=YY(e)),eX(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?RY.basename(this.path,this.extname):void 0}set stem(e){eX(e,`stem`),$Y(e,`stem`),this.path=RY.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 tF(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 $Y(e,t){if(e&&e.includes(RY.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+RY.sep+"`")}function eX(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function tX(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function nX(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var rX=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),iX=l(PY(),1),aX={}.hasOwnProperty,oX=new class e extends rX{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=IY()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,iX.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(lX(`data`,this.frozen),this.namespace[e]=t,this):aX.call(this.namespace,e)&&this.namespace[e]||void 0:e?(lX(`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=fX(e),n=this.parser||this.Parser;return sX(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),sX(`process`,this.parser||this.Parser),cX(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=fX(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);mX(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(),sX(`processSync`,this.parser||this.Parser),cX(`processSync`,this.compiler||this.Compiler),this.process(e,r),dX(`processSync`,`process`,t),n;function r(e,r){t=!0,NY(e),n=r}}run(e,t,n){uX(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=fX(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),dX(`runSync`,`run`,n),r;function i(e,t){NY(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=fX(t),r=this.compiler||this.Compiler;return cX(`stringify`,r),uX(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(lX(`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,iX.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];FY(o)&&FY(r)&&(r=(0,iX.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function sX(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function cX(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function lX(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 uX(e){if(!FY(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function dX(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function fX(e){return pX(e)?e:new QY(e)}function pX(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function mX(e){return typeof e==`string`||hX(e)}function hX(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var gX=1024,_X=0,vX=class{constructor(e,t){this.from=e,this.to=t}},yX=class{constructor(e={}){this.id=_X++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=SX.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};yX.closedBy=new yX({deserialize:e=>e.split(` `)}),yX.openedBy=new yX({deserialize:e=>e.split(` `)}),yX.group=new yX({deserialize:e=>e.split(` `)}),yX.isolate=new yX({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),yX.contextHash=new yX({perNode:!0}),yX.lookAhead=new yX({perNode:!0}),yX.mounted=new yX({perNode:!0});var bX=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[yX.mounted.id]}},xX=Object.create(null),SX=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):xX,r=+!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(yX.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(yX.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};SX.none=new SX(``,Object.create(null),0,8);var CX=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new SX(e.name,r,e.id,e.flags):e)}return new e(n)}},wX=new WeakMap,TX=new WeakMap,EX;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(EX||={});var DX=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=bX.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new VX(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new VX(wX.get(this)||this.topNode);return r.moveTo(e,t),wX.set(this,r._tree),r}get topNode(){return new NX(this,0,0,null)}resolve(e,t=0){let n=jX(wX.get(this)||this.topNode,e,t,!1);return wX.set(this,n),n}resolveInner(e,t=0){let n=jX(TX.get(this)||this.topNode,e,t,!0);return TX.set(this,n),n}resolveStack(e,t=0){return BX(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&EX.IncludeAnonymous)>0;for(let e=this.cursor(a|EX.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:KX(SX.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(SX.none,t,n,r)))}static build(e){return UX(e)}};DX.empty=new DX(SX.none,[],[],0);var OX=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},kX=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return SX.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(AX(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function AX(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function jX(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof NX&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:EX.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof NX&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var MX=class{cursor(e=0){return new VX(this,e)}getChild(e,t=null,n=null){let r=PX(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return PX(this,e,t,n)}resolve(e,t=0){return jX(this,e,t,!1)}resolveInner(e,t=0){return jX(this,e,t,!0)}matchContext(e){return FX(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},NX=class e extends MX{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(a&EX.EnterBracketed&&l instanceof DX&&(d=bX.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length||AX(i,r,u,u+l.length)){if(l instanceof kX){if(a&EX.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new LX(new IX(o,l,t,u),null,e)}else if(a&EX.IncludeAnonymous||!l.type.isAnonymous||HX(l)){let s;if(!(a&EX.IgnoreMounts)&&(s=bX.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&EX.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&EX.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&EX.IgnoreOverlays)&&(i=bX.get(this._tree))&&i.overlay){let a=t-this.from,o=r&EX.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function PX(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function FX(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var IX=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},LX=class e extends MX{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&EX.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new DX(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function RX(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof NX&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new zX(i,n)}var zX=class{constructor(e,t){this.heads=e,this.node=t}get next(){return RX(this.heads)}};function BX(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof NX?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=bX.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new NX(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(jX(o,t,n,!1))}}return i?RX(i):r}var VX=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~EX.EnterBracketed,e instanceof NX)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof NX?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&EX.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&EX.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&EX.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&EX.IncludeAnonymous||e instanceof kX||!e.type.isAnonymous||HX(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new LX(this.buffer,t,this.stack[e]);return this.bufferNode=new LX(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return FX(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return FX(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function HX(e){return e.children.some(e=>e instanceof kX||!e.type.isAnonymous||HX(e))}function UX(e){let{buffer:t,nodeSet:n,maxBufferLength:r=gX,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new OX(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,T=l,E=c;if(w<0){if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}if(w==-3){c=x;return}if(w==-4){l=x;return}throw RangeError(`Unrecognized record size: ${w}`)}let D=s[x],O,ee,te=S-e;if(C-S<=r&&(ee=h(o.pos-t,y))){let t=new Uint16Array(ee.size-ee.skip),r=o.pos-ee.size,i=t.length;for(;o.pos>r;)i=g(ee.start,t,i);O=new kX(t,C-ee.start,n),te=ee.start-e}else{let e=o.pos-w;o.next();let t=[],s=[],c=x>=a?x:-1,h=0,g=C,_=T;for(;o.pos>e;)c>=0&&o.id==c&&o.size>=0?(o.end<=g-r&&(p(t,s,S,h,o.end,g,c,_,E),h=t.length,g=o.end,_=l),o.next()):b>2500?d(S,e,t,s):(c>=0&&o.size==-1&&i[o.id].type==n.types[c]&&(h<t.length&&p(t,s,S,h,o.end,g,c,_,E),h=t.length+1,g=o.start,_=l),u(S,e,t,s,c,b+1));if(c>=0&&h>0&&h<t.length&&p(t,s,S,h,S,g,c,_,E),t.reverse(),s.reverse(),c>-1&&h>0){let e=f(D,E);O=KX(D,t,s,0,t.length,0,C-S,e,e)}else O=m(D,t,s,C-S,T-C,E)}_.push(O),v.push(te)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new kX(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof DX){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(yX.lookAhead))&&(a=r[o]+s.length+c-i)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[yX.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[yX.lookAhead,i];o=o?[e].concat(o):[e]}return new DX(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0){if(n.size==-3||n.size==-4)d+=4;else break scan}else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new DX(s[e.topID],_.reverse(),v.reverse(),y)}var WX=new WeakMap;function GX(e,t){if(!e.isAnonymous||t instanceof kX||t.type!=e)return 1;let n=WX.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof DX)){n=1;break}n+=GX(e,r)}WX.set(t,n)}return n}function KX(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=GX(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=GX(e,t[s]);for(s++;s<i;s++){let n=GX(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(KX(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var qX=class{startParse(e,t,n){return typeof e==`string`&&(e=new JX(e)),n=n?n.length?n.map(e=>new vX(e.from,e.to)):[new vX(0,0)]:[new vX(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},JX=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};new yX({perNode:!0});var YX=0,XX=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=YX++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new QX(e);return e=>e.modified.indexOf(t)>-1?e:QX.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},ZX=0,QX=class e{constructor(e){this.name=e,this.instances=[],this.id=ZX++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&$X(n,e.modified));if(r)return r;let i=[],a=new XX(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=eZ(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function $X(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function eZ(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function tZ(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new rZ(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return nZ.add(t)}var nZ=new yX({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth<=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new rZ(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),rZ=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};rZ.empty=new rZ([],2,null);function iZ(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function aZ(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function oZ(e,t,n,r=0,i=e.length){let a=new cZ(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}function sZ(e,t,n,r,i,a=0,o=e.length){let s=a;function c(t,n){if(!(t<=s)){for(let a=e.slice(s,t),o=0;;){let e=a.indexOf(`
|
|
534
|
-
`,o),t=e<0?a.length:e;if(t>o&&r(a.slice(o,t),n),e<0)break;i(),o=e+1}s=t}}oZ(t,n,(e,t,n)=>{c(e,``),c(t,n)},a,o),c(o,``)}var cZ=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=lZ(e)||rZ.empty,u=aZ(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(yX.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function lZ(e){let t=e.type.prop(nZ);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var Q=XX.define,uZ=Q(),dZ=Q(),fZ=Q(dZ),pZ=Q(dZ),mZ=Q(),hZ=Q(mZ),gZ=Q(mZ),_Z=Q(),vZ=Q(_Z),yZ=Q(),bZ=Q(),xZ=Q(),SZ=Q(xZ),CZ=Q(),$={comment:uZ,lineComment:Q(uZ),blockComment:Q(uZ),docComment:Q(uZ),name:dZ,variableName:Q(dZ),typeName:fZ,tagName:Q(fZ),propertyName:pZ,attributeName:Q(pZ),className:Q(dZ),labelName:Q(dZ),namespace:Q(dZ),macroName:Q(dZ),literal:mZ,string:hZ,docString:Q(hZ),character:Q(hZ),attributeValue:Q(hZ),number:gZ,integer:Q(gZ),float:Q(gZ),bool:Q(mZ),regexp:Q(mZ),escape:Q(mZ),color:Q(mZ),url:Q(mZ),keyword:yZ,self:Q(yZ),null:Q(yZ),atom:Q(yZ),unit:Q(yZ),modifier:Q(yZ),operatorKeyword:Q(yZ),controlKeyword:Q(yZ),definitionKeyword:Q(yZ),moduleKeyword:Q(yZ),operator:bZ,derefOperator:Q(bZ),arithmeticOperator:Q(bZ),logicOperator:Q(bZ),bitwiseOperator:Q(bZ),compareOperator:Q(bZ),updateOperator:Q(bZ),definitionOperator:Q(bZ),typeOperator:Q(bZ),controlOperator:Q(bZ),punctuation:xZ,separator:Q(xZ),bracket:SZ,angleBracket:Q(SZ),squareBracket:Q(SZ),paren:Q(SZ),brace:Q(SZ),content:_Z,heading:vZ,heading1:Q(vZ),heading2:Q(vZ),heading3:Q(vZ),heading4:Q(vZ),heading5:Q(vZ),heading6:Q(vZ),contentSeparator:Q(_Z),list:Q(_Z),quote:Q(_Z),emphasis:Q(_Z),strong:Q(_Z),link:Q(_Z),monospace:Q(_Z),strikethrough:Q(_Z),inserted:Q(),deleted:Q(),changed:Q(),invalid:Q(),meta:CZ,documentMeta:Q(CZ),annotation:Q(CZ),processingInstruction:Q(CZ),definition:XX.defineModifier(`definition`),constant:XX.defineModifier(`constant`),function:XX.defineModifier(`function`),standard:XX.defineModifier(`standard`),local:XX.defineModifier(`local`),special:XX.defineModifier(`special`)};for(let e in $){let t=$[e];t instanceof XX&&(t.name=e)}var wZ=iZ([{tag:$.link,class:`tok-link`},{tag:$.heading,class:`tok-heading`},{tag:$.emphasis,class:`tok-emphasis`},{tag:$.strong,class:`tok-strong`},{tag:$.keyword,class:`tok-keyword`},{tag:$.atom,class:`tok-atom`},{tag:$.bool,class:`tok-bool`},{tag:$.url,class:`tok-url`},{tag:$.labelName,class:`tok-labelName`},{tag:$.inserted,class:`tok-inserted`},{tag:$.deleted,class:`tok-deleted`},{tag:$.literal,class:`tok-literal`},{tag:$.string,class:`tok-string`},{tag:$.number,class:`tok-number`},{tag:[$.regexp,$.escape,$.special($.string)],class:`tok-string2`},{tag:$.variableName,class:`tok-variableName`},{tag:$.local($.variableName),class:`tok-variableName tok-local`},{tag:$.definition($.variableName),class:`tok-variableName tok-definition`},{tag:$.special($.variableName),class:`tok-variableName2`},{tag:$.definition($.propertyName),class:`tok-propertyName tok-definition`},{tag:$.typeName,class:`tok-typeName`},{tag:$.namespace,class:`tok-namespace`},{tag:$.className,class:`tok-className`},{tag:$.macroName,class:`tok-macroName`},{tag:$.propertyName,class:`tok-propertyName`},{tag:$.operator,class:`tok-operator`},{tag:$.comment,class:`tok-comment`},{tag:$.meta,class:`tok-meta`},{tag:$.invalid,class:`tok-invalid`},{tag:$.punctuation,class:`tok-punctuation`}]),TZ=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new EZ(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.reducePos=this.pos=n+e.length;this.pushState(t,n),this.buffer.push(r,n,i,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new DZ(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216)){if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.storeNode(this.curContext.hash,this.reducePos,this.reducePos,-3,!0)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new EZ(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},EZ=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},DZ=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},OZ=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function kZ(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var AZ=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},jZ=new AZ,MZ=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=jZ,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=jZ,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},NZ=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;IZ(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};NZ.prototype.contextual=NZ.prototype.fallback=NZ.prototype.extend=!1;var PZ=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?kZ(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(IZ(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};PZ.prototype.contextual=NZ.prototype.fallback=NZ.prototype.extend=!1;var FZ=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function IZ(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||RZ(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function LZ(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function RZ(e,t,n,r){let i=LZ(n,r,t);return i<0||LZ(n,r,e)<i}var zZ=typeof process<`u`&&/\bparse\b/.test({}.LOG),BZ=null;function VZ(e,t,n){let r=e.cursor(EX.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var HZ=class{constructor(e,t){this.fragments=e,this.minRepeat=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?VZ(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?VZ(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;if(e<this.safeFrom)return null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof DX){let n=a>this.lastRepeatPos&&i.type.id>=this.minRepeat;if(a==e||n){let t=a+i.length,r;if(a>=this.safeFrom&&t<=this.safeTo&&(!(r=i.prop(yX.lookAhead))||t+r<this.fragment.to)&&(n&&(this.lastRepeat=i,this.lastRepeatPos=a),a==e))return i}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},UZ=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new AZ)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if((!n||c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new AZ,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new AZ,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535){if(o[s+1]==1)s=XZ(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(XZ(o,s+2),t,n,r));break}}o[s]==t&&(r=this.putAction(XZ(o,s+1),t,n,r))}return r}},WZ=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new MZ(t,r),this.tokens=new UZ(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[TZ.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new HZ(n,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&ZZ(r);if(e)return zZ&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw zZ&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return zZ&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}tryReuse(e,t,n,r){if(!n)return null;let i=e.curContext&&e.curContext.tracker.strict,a=i?e.curContext.hash:0;for(;n;){let o=this.parser.nodeSet.types[n.type.id]==n.type?this.parser.getGoto(e.state,n.type.id):-1;if(o>-1&&n.length&&(!i||(n.prop(yX.contextHash)||0)==a))return e.useNode(n,o,t),n;if(n.children.length==0||n.positions[0]>0)break;let s=n.children[0];if(s instanceof DX&&(!r||s.type.id>=this.parser.minRepeatTerm))n=s;else break}return null}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=zZ?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.reducePos<r&&e.buffer.length&&e.buffer[e.buffer.length-2]<=e.reducePos&&this.fragments.lastRepeatPos==e.reducePos&&this.tryReuse(e,e.reducePos,this.fragments.lastRepeat,!0)||this.tryReuse(e,r,this.fragments.nodeAt(r),!1);if(t)return zZ&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(t.type.id)})`),!0}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),zZ&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),zZ&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return GZ(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=zZ?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),zZ&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(zZ&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)zZ&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))zZ&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),zZ&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),GZ(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),DX.build({buffer:OZ.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(BZ||=new WeakMap).get(e);return t||BZ.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function GZ(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var KZ=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},qZ=e=>e,JZ=class{constructor(e){this.start=e.start,this.shift=e.shift||qZ,this.reduce=e.reduce||qZ,this.reuse=e.reuse||qZ,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},YZ=class e extends qX{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=yX[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new CX(t.map((t,i)=>SX.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=gX;let a=kZ(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(QZ),this.states=kZ(e.states,Uint32Array),this.data=kZ(e.stateData),this.goto=kZ(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new NZ(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new WZ(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535){if(n[i+1]==1)a=n[i=XZ(n,i+2)];else if(n[i+1]==2)return XZ(n,i+2);else break}if(a==t||a==0)return XZ(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=XZ(this.data,n+2);else break}r=t(XZ(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=XZ(this.data,n+2);else break}if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=QZ(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new KZ(e,n,r)}static deserialize(t){return new e(t)}};function XZ(e,t){return e[t]|e[t+1]<<16}function ZZ(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function QZ(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var $Z=317,eQ=318,tQ=1,nQ=2,rQ=3,iQ=4,aQ=319,oQ=321,sQ=322,cQ=5,lQ=6,uQ=0,dQ=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],fQ=125,pQ=59,mQ=47,hQ=42,gQ=43,_Q=45,vQ=60,yQ=44,bQ=63,xQ=46,SQ=91,CQ=new JZ({start:!1,shift(e,t){return t==cQ||t==lQ||t==oQ?e:t==sQ},strict:!1}),wQ=new FZ((e,t)=>{let{next:n}=e;(n==fQ||n==-1||t.context)&&e.acceptToken(aQ)},{contextual:!0,fallback:!0}),TQ=new FZ((e,t)=>{let{next:n}=e,r;dQ.indexOf(n)>-1||(n!=mQ||(r=e.peek(1))!=mQ&&r!=hQ)&&n!=fQ&&n!=pQ&&n!=-1&&!t.context&&e.acceptToken($Z)},{contextual:!0}),EQ=new FZ((e,t)=>{e.next==SQ&&!t.context&&e.acceptToken(eQ)},{contextual:!0}),DQ=new FZ((e,t)=>{let{next:n}=e;if(n==gQ||n==_Q){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift(tQ);e.acceptToken(n?tQ:nQ)}}else n==bQ&&e.peek(1)==xQ&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(rQ))},{contextual:!0});function OQ(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var kQ=new FZ((e,t)=>{if(e.next!=vQ||!t.dialectEnabled(uQ)||(e.advance(),e.next==mQ))return;let n=0;for(;dQ.indexOf(e.next)>-1;)e.advance(),n++;if(OQ(e.next,!0)){for(e.advance(),n++;OQ(e.next,!1);)e.advance(),n++;for(;dQ.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==yQ)return;for(let t=0;;t++){if(t==7){if(!OQ(e.next,!0))return;break}if(e.next!=`extends`.charCodeAt(t))break;e.advance(),n++}}e.acceptToken(iQ,-n)}),AQ=tZ({"get set async static":$.modifier,"for while do if else switch try catch finally return throw break continue default case defer":$.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":$.operatorKeyword,"let var const using function class extends":$.definitionKeyword,"import export from":$.moduleKeyword,"with debugger new":$.keyword,TemplateString:$.special($.string),super:$.atom,BooleanLiteral:$.bool,this:$.self,null:$.null,Star:$.modifier,VariableName:$.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":$.function($.variableName),VariableDefinition:$.definition($.variableName),Label:$.labelName,PropertyName:$.propertyName,PrivatePropertyName:$.special($.propertyName),"CallExpression/MemberExpression/PropertyName":$.function($.propertyName),"FunctionDeclaration/VariableDefinition":$.function($.definition($.variableName)),"ClassDeclaration/VariableDefinition":$.definition($.className),"NewExpression/VariableName":$.className,PropertyDefinition:$.definition($.propertyName),PrivatePropertyDefinition:$.definition($.special($.propertyName)),UpdateOp:$.updateOperator,"LineComment Hashbang":$.lineComment,BlockComment:$.blockComment,Number:$.number,String:$.string,Escape:$.escape,ArithOp:$.arithmeticOperator,LogicOp:$.logicOperator,BitOp:$.bitwiseOperator,CompareOp:$.compareOperator,RegExp:$.regexp,Equals:$.definitionOperator,Arrow:$.function($.punctuation),": Spread":$.punctuation,"( )":$.paren,"[ ]":$.squareBracket,"{ }":$.brace,"InterpolationStart InterpolationEnd":$.special($.brace),".":$.derefOperator,", ;":$.separator,"@":$.meta,TypeName:$.typeName,TypeDefinition:$.definition($.typeName),"type enum interface implements namespace module declare":$.definitionKeyword,"abstract global Privacy readonly override":$.modifier,"is keyof unique infer asserts":$.operatorKeyword,JSXAttributeValue:$.attributeValue,JSXText:$.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":$.angleBracket,"JSXIdentifier JSXNameSpacedName":$.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":$.attributeName,"JSXBuiltin/JSXIdentifier":$.standard($.tagName)}),jQ={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:237,private:237,protected:237,readonly:239,instanceof:258,satisfies:261,import:294,keyof:351,unique:355,infer:361,asserts:397,is:399,abstract:419,implements:421,type:423,let:426,var:428,using:431,interface:437,enum:441,namespace:447,module:449,declare:453,global:457,defer:473,for:478,of:487,while:490,with:494,do:498,if:502,else:504,switch:508,case:514,try:520,catch:524,finally:528,return:532,throw:536,break:540,continue:544,debugger:548},MQ={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:403},NQ={__proto__:null,"<":193},PQ=YZ.deserialize({version:14,states:"$GSQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Im'#ImO1XQ`O'#GtO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JsO6[Q!0MxO'#JtO6uQ`O'#F^O6zQ,UO'#FuOOQ!0Lf'#Fg'#FgO7VO7dO'#FgO9XQMhO'#F}O9`Q`O'#F|OOQ!0Lf'#Jt'#JtOOQ!0Lb'#Js'#JsO9eQ`O'#GxOOQ['#K`'#K`O9pQ`O'#IZO9uQ!0LrO'#I[OOQ['#Ja'#JaOOQ['#I`'#I`Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GtO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EzO;hQMhO'#FfO;xQ`O'#GtOOQO'#Ka'#KaO;}Q`O'#KaO<]Q`O'#G|O<]Q`O'#G}O<]Q`O'#HPO9kQ`O'#HSO=SQ`O'#HVO>kQ`O'#CeO>{Q`O'#HdO?TQ`O'#HjO?TQ`O'#HlO`QlO'#HnO?TQ`O'#HpO?TQ`O'#HsO?YQ`O'#HyO?_Q!0LsO'#IPO%[QlO'#IRO?jQ!0LsO'#ITO?uQ!0LsO'#IVO9uQ!0LrO'#IXO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ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LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty VariableDefinition Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem`,maxTerm:381,context:CQ,nodeProps:[[`isolate`,-8,5,6,14,37,39,51,53,55,``],[`group`,-26,9,17,19,68,208,212,216,217,219,222,225,235,238,244,246,248,250,253,259,265,267,269,271,273,275,276,`Statement`,-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,121,122,137,140,142,143,144,145,146,148,149,168,170,172,`Expression`,-23,31,33,37,41,43,45,174,176,178,179,181,182,183,185,186,187,189,190,191,202,204,206,207,`Type`,-3,88,103,109,`ClassItem`],[`openedBy`,23,`<`,38,`InterpolationStart`,56,`[`,60,`{`,73,`(`,161,`JSXStartCloseTag`],[`closedBy`,-2,24,169,`>`,40,`InterpolationEnd`,50,`]`,61,`}`,74,`)`,166,`JSXEndTag`]],propSources:[AQ],skippedNodes:[0,5,6,279],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?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#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[TQ,EQ,DQ,kQ,2,3,4,5,6,7,8,9,10,11,12,13,14,wQ,new PZ("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(d~~",141,341),new PZ(`j~RQYZXz{^~^O(R~~aP!P!Qd~iO(S~~`,25,324)],topRules:{Script:[0,7],SingleExpression:[1,277],SingleClassItem:[2,278]},dialects:{jsx:0,ts:15179},dynamicPrecedences:{80:1,82:1,94:1,170:1,200:1},specialized:[{term:328,get:e=>jQ[e]||-1},{term:344,get:e=>MQ[e]||-1},{term:95,get:e=>NQ[e]||-1}],tokenPrec:15205}),FQ=1,IQ=194,LQ=195,RQ=196,zQ=197,BQ=198,VQ=199,HQ=200,UQ=2,WQ=3,GQ=201,KQ=24,qQ=25,JQ=49,YQ=50,XQ=55,ZQ=56,QQ=57,$Q=59,e$=60,t$=61,n$=62,r$=63,i$=65,a$=238,o$=71,s$=241,c$=242,l$=243,u$=244,d$=245,f$=246,p$=247,m$=248,h$=72,g$=249,_$=250,v$=251,y$=252,b$=253,x$=254,S$=255,C$=256,w$=73,T$=77,E$=263,D$=112,O$=130,k$=151,A$=152,j$=155,M$=10,N$=13,P$=32,F$=9,I$=35,L$=40,R$=46,z$=123,B$=125,V$=39,H$=34,U$=92,W$=111,G$=120,K$=78,q$=117,J$=85,Y$=new Set([qQ,JQ,YQ,E$,i$,O$,ZQ,QQ,a$,n$,r$,h$,w$,T$,e$,t$,k$,A$,j$,D$]);function X$(e){return e==M$||e==N$}function Z$(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}var Q$=new FZ((e,t)=>{let n;if(e.next<0)e.acceptToken(VQ);else if(t.context.flags&e1)X$(e.next)&&e.acceptToken(BQ,1);else if(((n=e.peek(-1))<0||X$(n))&&t.canShift(zQ)){let t=0;for(;e.next==P$||e.next==F$;)e.advance(),t++;(e.next==M$||e.next==N$||e.next==I$)&&e.acceptToken(zQ,-t)}else X$(e.next)&&e.acceptToken(RQ,1)},{contextual:!0}),$$=new FZ((e,t)=>{let n=t.context;if(n.flags)return;let r=e.peek(-1);if(r==M$||r==N$){let t=0,r=0;for(;;){if(e.next==P$)t++;else if(e.next==F$)t+=8-t%8;else break;e.advance(),r++}t!=n.indent&&e.next!=M$&&e.next!=N$&&e.next!=I$&&(t<n.indent?e.acceptToken(LQ,-r):e.acceptToken(IQ))}}),e1=1,t1=2,n1=4,r1=8,i1=16,a1=32;function o1(e,t,n){this.parent=e,this.indent=t,this.flags=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n+(n<<6)}var s1=new o1(null,0,0);function c1(e){let t=0;for(let n=0;n<e.length;n++)t+=e.charCodeAt(n)==F$?8-t%8:1;return t}var l1=new Map([[s$,0],[c$,n1],[l$,r1],[u$,12],[d$,i1],[f$,20],[p$,24],[m$,28],[g$,a1],[_$,36],[v$,40],[y$,44],[b$,48],[x$,52],[S$,56],[C$,60]].map(([e,t])=>[e,t|t1])),u1=new JZ({start:s1,reduce(e,t,n,r){return e.flags&e1&&Y$.has(t)||(t==o$||t==h$)&&e.flags&t1?e.parent:e},shift(e,t,n,r){return t==IQ?new o1(e,c1(r.read(r.pos,n.pos)),0):t==LQ?e.parent:t==KQ||t==XQ||t==$Q||t==WQ?new o1(e,0,e1):l1.has(t)?new o1(e,0,l1.get(t)|e.flags&e1):e},hash(e){return e.hash}}),d1=new FZ(e=>{for(let t=0;t<5;t++){if(e.next!=`print`.charCodeAt(t))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let t=0;;t++){let n=e.peek(t);if(n!=P$&&n!=F$){n!=L$&&n!=R$&&n!=M$&&n!=N$&&n!=I$&&e.acceptToken(FQ);return}}}),f1=new FZ((e,t)=>{let{flags:n}=t.context,r=n&n1?H$:V$,i=(n&r1)>0,a=!(n&i1),o=(n&a1)>0,s=e.pos;for(;!(e.next<0);)if(o&&e.next==z$){if(e.peek(1)==z$)e.advance(2);else{if(e.pos==s){e.acceptToken(WQ,1);return}break}}else if(a&&e.next==U$){if(e.pos==s){e.advance();let t=e.next;t>=0&&(e.advance(),p1(e,t)),e.acceptToken(UQ);return}break}else if(e.next==U$&&!a&&e.peek(1)>-1)e.advance(2);else if(e.next==r&&(!i||e.peek(1)==r&&e.peek(2)==r)){if(e.pos==s){e.acceptToken(GQ,i?3:1);return}break}else if(e.next==M$){if(i)e.advance();else if(e.pos==s){e.acceptToken(GQ);return}break}else e.advance();e.pos>s&&e.acceptToken(HQ)});function p1(e,t){if(t==W$)for(let t=0;t<2&&e.next>=48&&e.next<=55;t++)e.advance();else if(t==G$)for(let t=0;t<2&&Z$(e.next);t++)e.advance();else if(t==q$)for(let t=0;t<4&&Z$(e.next);t++)e.advance();else if(t==J$)for(let t=0;t<8&&Z$(e.next);t++)e.advance();else if(t==K$&&e.next==z$){for(e.advance();e.next>=0&&e.next!=B$&&e.next!=V$&&e.next!=H$&&e.next!=M$;)e.advance();e.next==B$&&e.advance()}}var m1=tZ({'async "*" "**" FormatConversion FormatSpec':$.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":$.controlKeyword,"in not and or is del":$.operatorKeyword,"from def class global nonlocal lambda":$.definitionKeyword,import:$.moduleKeyword,"with as print":$.keyword,Boolean:$.bool,None:$.null,VariableName:$.variableName,"CallExpression/VariableName":$.function($.variableName),"FunctionDefinition/VariableName":$.function($.definition($.variableName)),"ClassDefinition/VariableName":$.definition($.className),PropertyName:$.propertyName,"CallExpression/MemberExpression/PropertyName":$.function($.propertyName),Comment:$.lineComment,Number:$.number,String:$.string,FormatString:$.special($.string),Escape:$.escape,UpdateOp:$.updateOperator,"ArithOp!":$.arithmeticOperator,BitOp:$.bitwiseOperator,CompareOp:$.compareOperator,AssignOp:$.definitionOperator,Ellipsis:$.punctuation,At:$.meta,"( )":$.paren,"[ ]":$.squareBracket,"{ }":$.brace,".":$.derefOperator,", ;":$.separator}),h1={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},g1=YZ.deserialize({version:14,states:"##jQ`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#C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!Z!lQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v0gR%T!kT#]^#_Q%x#[R,{+YQ(m%xS+_(n(oQ,}+`Q-x,{S.n-y-zR/^.oT+Z(k+]Q$`}Q&g$QQ)o'PR+{)pQ$XzQ)W&qR+i)XQ$XzQ&o$WQ)W&qR+i)XQ#khW$Vz$W&q)XQ$[{Q&r$ZZ)R&l)S+f+g-RR$^|R)c&wXlOn)t,PQ$f!RR'Q$gQ$m!UR'R$hR*X'_Q*V'_V-g,`-h.TQ.d-lQ/P.^R/Q._U.]-l.^._Q/U.aQ/b.tQ/g.zU/i.|/j/yQ/n/RQ/|/oQ0O/tU0Q/u0S0[Q0]0UQ0a0ZR0b0^R/T.`R/d.t",nodeNames:`⚠ print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard`,maxTerm:277,context:u1,nodeProps:[[`isolate`,-5,4,71,72,73,77,``],[`group`,-15,6,85,87,88,90,92,94,96,98,99,100,102,105,108,110,`Statement Statement`,-22,8,18,21,25,40,49,50,56,57,60,61,62,63,64,67,70,71,72,79,80,81,82,`Expression`,-10,114,116,119,121,122,126,128,133,135,138,`Statement`,-9,143,144,147,148,150,151,152,153,154,`Pattern`],[`openedBy`,23,`(`,54,`[`,58,`{`],[`closedBy`,24,`)`,55,`]`,59,`}`]],propSources:[m1],skippedNodes:[0,4],repeatNodeCount:34,tokenData:"!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu%Tuv,dvw-hwx.Uxy/tyz0[z{0r{|2S|}2p}!O3W!O!P4_!P!Q:Z!Q!R;k!R![>_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r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tokenPrec:7668}),_1=new Map;function v1(e){let t=_1.get(e);return t||(t=e===`python`?g1:PQ.configure({dialect:e}),_1.set(e,t)),t}var y1={javascript:``,js:``,mjs:``,cjs:``,node:``,"node.js":``,nodejs:``,jsx:`jsx`,react:`jsx`,typescript:`ts`,ts:`ts`,tsx:`jsx ts`,python:`python`,python3:`python`,py:`python`};function b1(e){if(!e)return;let t=e.trim().toLowerCase();return Object.hasOwn(y1,t)?y1[t]:void 0}function x1(e,t){let n=e.startParse(t),r=performance.now()+300;for(;;){let e=n.advance();if(e)return e;if(performance.now()>r)return}}function S1(e,t){let n=b1(t);if(n===void 0)return;let r=[[]];try{let t=x1(v1(n),e);if(!t)return;sZ(e,t,wZ,(e,t)=>r[r.length-1].push(t?{text:e,className:t}:{text:e}),()=>r.push([]))}catch{return}if(r.map(e=>e.map(e=>e.text).join(``)).join(`
|
|
535
|
-
`)===e)return r}var C1=36,w1=92,T1=96,E1=32,D1=e=>e!==null&&e<-2,O1=e=>e===null||e<0||e===E1,k1=e=>e!==null&&e>=48&&e<=57;function Ene(e,t,n){let r=0,i=0,a,o=null,s=t=>t===C1?(e.consume(t),r+=1,s):r>2||r===1&&O1(t)?n(t):(e.exit(`mathTextSequence`),c(t)),c=t=>{if(t===null||t===T1)return n(t);if(t===C1)return a=e.enter(`mathTextSequence`),i=0,d(t);if(t===E1||D1(t)){let n=t===E1?`space`:`lineEnding`;return e.enter(n),e.consume(t),e.exit(n),o=t,c}return e.enter(`mathTextData`),l(t)},l=t=>t===null||t===T1||t===E1||t===C1||D1(t)?(e.exit(`mathTextData`),c(t)):(e.consume(t),o=t,t===w1?u:l),u=t=>t!==C1&&t!==w1?l(t):(e.consume(t),o=t,l),d=s=>s===C1?(e.consume(s),i+=1,d):i===r?k1(s)||r===1&&O1(o)?n(s):(e.exit(`mathTextSequence`),e.exit(`mathText`),t(s)):r===1?n(s):(a.type=`mathTextData`,l(s));return t=>(e.enter(`mathText`),e.enter(`mathTextSequence`),s(t))}function A1(){for(let e of this.data().micromarkExtensions??[]){let t=e.text?.[C1];t&&(e.text[C1]={...t,tokenize:Ene})}}var j1=/^(?:[ \t>]|[-*+][ \t]|\d{1,9}[.)][ \t])*\[(?:[^[\]\\]|\\[\s\S]){1,999}\]:/m,M1=/^ {0,3}<[a-z/!?]/im,N1=/^ {0,3}(?:[-*+]|\d{1,9}[.)])(?:[ \t]|$)/,P1=/^ {0,3}(`{3,}(?=[^`]*$)|~{3,})/,F1=/^ {0,3}(\$\$+)[^$]*$/,I1=/^ {0,3}(`+|~+|\$+)[ \t]*$/;function*L1(e){let t=0;for(let n of e.matchAll(/\r\n?|\n/g)){let r=n.index+n[0].length;yield{text:e.slice(t,n.index),start:t,next:r},t=r}t<e.length&&(yield{text:e.slice(t),start:t,next:e.length})}function R1(e){if(j1.test(e)||M1.test(e))return[e];let t=[],n=0,r,i=!1,a=!1,o=!1,s=!1;for(let{text:c,start:l}of L1(e)){if(r&&i&&c.trim()!==``&&!/^\s/.test(c))break;if(r)r(c)&&(r=void 0);else if(c.trim()===``)a=!0;else{let u=N1.test(c);a&&!/^\s/.test(c)&&!(u&&o)&&!(s&&B1.test(c))&&(t.push(e.slice(n,l)),n=l,o=!1),o||=u,s=/^\s/.test(c),a=!1,r=Z1(c),i=o&&/^\s/.test(c)}}return t.push(e.slice(n)),t}function z1(e){let t=0;for(;e[t]===`$`;)t++;if(t<2||e.indexOf(`$`,t)!==-1)return;let n=t,r=e.length;for(;n<r&&(e[n]===` `||e[n]===` `);)n++;for(;r>n&&(e[r-1]===` `||e[r-1]===` `);)r--;return{fence:e.slice(0,t),rest:e.slice(n,r)}}var B1=/^ {0,3}(?:>|(?:[-*+]|\d{1,9}[.)])(?:[ \t]|$))/,V1=/^ {0,3}(?:#{1,6}(?:[ \t]|$)|(?:(?:\*[ \t]*){3,}|(?:-[ \t]*){3,}|(?:_[ \t]*){3,})$)/;function H1(e){let t=U1(e),n=new Map,r=0;for(let[i,a]of[...L1(e)].entries())n.set(r,a.start),r+=t[i].length;n.set(r,e.length);let i=R1(t.join(``));r=0;let a=[];for(let t of i){let o=n.get(r),s=n.get(r+=t.length);if(o===void 0||s===void 0)return i.map(e=>({text:e,source:e}));a.push({text:t,source:e.slice(o,s)})}return a}function U1(e){let t=[...L1(e)].map(t=>({text:t.text,ending:e.slice(t.start+t.text.length,t.next)})),n=t.map(e=>e.text+e.ending);if(!e.includes(`$$`)||M1.test(e)||e.startsWith(``))return n;let r,i,a=K1;for(let[e,{text:o,ending:s}]of t.entries()){let t=s||`
|
|
536
|
-
`;if(r)r(o)&&(r=void 0);else if(i){let r=I1.exec(o)?.[1];if(r?.[0]===`$`&&r.length>=i)i=void 0;else{let r=X1(o,i);if(r&&Y1(J1(a,o.slice(0,r.start)))){let a=o.slice(0,r.start),c=G1(o.slice(r.end).trim());n[e]=(a.trim()?a+t:``)+o.slice(r.start,r.end)+(c?t+c:``)+s,i=void 0}else a=J1(a,o)}}else if(/^[ \t]/.test(o)){if(P1.test(o.trimStart())||F1.test(o.trimStart()))break}else if(P1.test(o))r=Z1(o);else{let r=z1(o);if(r){let{fence:o,rest:c}=r;i=o.length,a=c?J1(K1,c):K1,c&&(n[e]=o+t+c+s)}}}return n}var W1=new RegExp([B1.source,V1.source,"^(?:`{3}|~{3}|\\$\\$)",`^\\[(?:[^\\]\\\\]|\\\\.)*(?:\\]:|$)`,`^<(?![a-z][a-z\\d+.-]{1,31}:[^\\s<>]*>|[^\\s<>@]+@[^\\s<>]+>)[a-z/!?]`].join(`|`));function G1(e){return W1.test(e)?/^\d/.test(e)?e.replace(/^(\d+)/,`$1\\`):`\\${e}`:e}var K1={depth:0,uncertain:!1},q1=new Set([`verb`,`def`,`gdef`,`edef`,`xdef`,`let`,`futurelet`,`newcommand`,`renewcommand`,`providecommand`,`catcode`,`csname`,`expandafter`,`noexpand`,`includegraphics`]);function J1(e,t){if(e.uncertain)return e;let n=e.depth;for(let e=0;e<t.length;e++){let r=t[e];if(r===`\\`){let r=e+1;for(;r<t.length&&/[a-zA-Z@]/.test(t[r]);)r++;let i=t.slice(e+1,r);if(q1.has(i)||i.includes(`@`)||i.startsWith(`if`))return{depth:n,uncertain:!0};e=r>e+1?r-1:e+1}else if(r===`%`)return{depth:n,uncertain:!0};else r===`{`?n++:r===`}`&&(n=Math.max(0,n-1))}return{depth:n,uncertain:!1}}var Y1=e=>!e.uncertain&&e.depth===0;function X1(e,t){for(let n=0;n<e.length;n++){if(e[n]===`\\`){n++;continue}if(e[n]!==`$`)continue;let r=n;for(;e[r]===`$`;)r++;if(r-n>=t)return{start:n,end:r};n=r-1}}function Z1(e){let t=P1.exec(e)?.[1]??F1.exec(e)?.[1];if(t)return e=>{let n=I1.exec(e)?.[1];return n!==void 0&&n[0]===t[0]&&n.length>=t.length}}var Q1=5e4,$1=32,e0=200,t0=/\[{33}/,n0=/\*{1001}|_{1001}|~{1001}/,r0=/^[ \t]*(?:(?:>|[-*+](?=[ \t])|\d{1,9}[.)](?=[ \t]))[ \t]*)+/,i0=/>|[-*+]|\d{1,9}[.)]/g;function a0(e){let t=[],n=0,r=0,i,a=(a,o)=>{let s=e.slice(n,a);t.push(e[n]===`$`?{kind:`math`,text:s}:{kind:`code`,text:s,code:e.slice(r,o)}),n=a,i=void 0};for(let o of L1(e))if(i)i(o.text)&&a(o.next,o.start);else{let a=/^\s/.test(o.text)?void 0:Z1(o.text);a&&(o.start>n&&t.push({kind:`prose`,text:e.slice(n,o.start)}),n=o.start,r=o.next,i=a)}return i?a(e.length,e.length):n<e.length&&t.push({kind:`prose`,text:e.slice(n)}),t}function o0(e){return e.length>Q1?!0:j1.test(e)||M1.test(e)?s0(e):a0(e).some(e=>e.kind===`prose`&&s0(e.text))}function s0(e){for(let{text:t}of L1(e)){if(t0.test(t)||n0.test(t)||/^[ \t]*/.exec(t)[0].length>e0)return!0;let e=r0.exec(t)?.[0];if(e&&(e.match(i0)?.length??0)>$1)return!0}return!1}var c0=[`http:`,`https:`,`mailto:`];function l0(e){try{let t=new URL(e);return c0.includes(t.protocol)?t.href:``}catch{return``}}function u0(){return(e,t)=>{let n=String(t.value),r=e=>{for(let t of e.children??[]){let e=t.position?.start.offset;t.type===`inlineMath`&&e!==void 0&&n.startsWith(`$$`,e)&&(t.data={...t.data,hProperties:{...t.data?.hProperties,className:[`language-math`,`math-display`]}}),r(t)}};r(e)}}var d0=[Aq,Hq,A1,u0],f0=oX().use(DJ).use(d0).use(MY,{allowDangerousHtml:!0}),p0=1e3,m0=new Map;function h0(e,t){let n=`${t?`D`:`I`}${e}`,r=m0.get(n);if(r!==void 0)return m0.delete(n),m0.set(n,r),r;let i;try{i=PV.renderToString(e,{displayMode:t,trust:!1,strict:`ignore`,throwOnError:!1,errorColor:`var(--destructive)`})}catch{return}return m0.set(n,i),m0.size>p0&&m0.delete(m0.keys().next().value),i}var g0=e=>{let t=e.properties.className;return Array.isArray(t)?t.map(String):[]},_0=e=>e?.type===`element`&&e.tagName===`code`&&g0(e).includes(`language-math`),v0=e=>e.children.map(e=>e.type===`text`?e.value:``).join(``);function y0(e){let t=g0(e).find(e=>e.startsWith(`language-`))?.slice(9),n=S1(v0(e),t);n&&(e.children=n.flatMap((e,t)=>[...t>0?[{type:`text`,value:`
|
|
537
|
-
`}]:[],...e.map(e=>e.className?{type:`element`,tagName:`span`,properties:{className:e.className.split(` `)},children:[{type:`text`,value:e.text}]}:{type:`text`,value:e.text})]))}function b0(e){let t=f0.runSync(f0.parse(e),e),n=[],r=(e,t)=>{let r=h0(e,t);return r===void 0?{type:`element`,tagName:`span`,properties:{className:[`katex-error`]},children:[{type:`text`,value:e}]}:(n.push(r),{type:`element`,tagName:`span`,properties:{className:[`math-text-formula`],dataFormula:n.length-1},children:[]})};return LU(t,(e,t,n)=>{if(delete e.position,n&&t!==void 0){if(e.type===`raw`)n.children[t]={type:`text`,value:e.value};else if(e.type===`element`){if(e.tagName===`pre`&&e.children.length===1&&_0(e.children[0]))return n.children[t]=r(v0(e.children[0]).replace(/\n$/,``),!0),`skip`;if(e.tagName===`pre`&&e.children.length===1&&e.children[0].type===`element`&&e.children[0].tagName===`code`)return y0(e.children[0]),`skip`;if(_0(e))return n.children[t]=r(v0(e),g0(e).includes(`math-display`)),`skip`;for(let[t,n]of Object.entries(MF))Object.hasOwn(e.properties,t)&&(n===null||n.includes(e.tagName))&&(e.properties[t]=l0(String(e.properties[t]??``)))}}}),{tree:t,formulas:n}}var x0=8e3,S0=250,C0=2e3,w0=/\\(?:[gex]?def|let|futurelet|(?:re|provide)?newcommand|(?:re)?newenvironment)(?![a-zA-Z])/,T0=300,E0=class{entries=new Map;get(e){let t=this.entries.get(e);return t!==void 0&&(this.entries.delete(e),this.entries.set(e,t)),t}set(e,t){this.entries.delete(e),this.entries.set(e,t),this.entries.size>T0&&this.entries.delete(this.entries.keys().next().value)}};function D0(e){try{return b0(e)}catch{return`plain`}}function O0(){let e=new E0,t=t=>{let n=e.get(t);return n===void 0&&e.set(t,n=D0(t)),n};return{peek:t,render:async e=>t(e),dispose(){}}}function k0(e,t={}){let{timeoutMs:n=x0,cancelGraceMs:r=S0,syncLimit:i=C0}=t,a=new E0,o=[],s,c,l=1,u=()=>{if(s)return s;let t=e();return t.onmessage=e=>{s===t&&c?.job.id===e.data.id&&f(e.data.block??`plain`)},t.onerror=()=>{s===t&&(c?m(`plain`):p())},s=t},d=(e,t)=>{e.signal.removeEventListener(`abort`,e.onAbort),e.resolve(e.signal.aborted?void 0:t)},f=e=>{let t=c;c=void 0,clearTimeout(t.deadline),clearTimeout(t.grace),e!==void 0&&a.set(t.job.text,e),d(t.job,e),h()},p=()=>{s?.terminate(),s=void 0},m=e=>{p(),f(e)},h=()=>{for(;!c&&o.length>0;){let e=o.shift(),t=a.get(e.text);if(t!==void 0)d(e,t);else{c={job:e,deadline:setTimeout(()=>m(`plain`),n)};try{u().postMessage({id:e.id,text:e.text})}catch{m(`plain`)}}}};return{peek(e){let t=a.get(e);if(t!==void 0||e.length>i||w0.test(e))return t;let n=D0(e);return a.set(e,n),n},dispose(){for(let e of o.splice(0))d(e,void 0);c?m(void 0):p()},render(e,t){return t.aborted?Promise.resolve(void 0):new Promise(n=>{let i={id:l++,text:e,signal:t,resolve:n,onAbort:()=>{let e=o.indexOf(i);e>=0?(o.splice(e,1),d(i,void 0)):c?.job===i&&c.grace===void 0&&(c.grace=setTimeout(()=>m(void 0),r))}};t.addEventListener(`abort`,i.onAbort),o.push(i),h()})}}}var A0=(0,v.memo)(function({source:e,display:t}){let n=h0(e,t);return n===void 0?(0,j.jsx)(`span`,{className:`katex-error`,children:e}):(0,j.jsx)(`span`,{className:`math-text-formula`,dangerouslySetInnerHTML:{__html:n}})});function j0({source:e}){return(0,j.jsx)(A0,{source:e,display:!0})}function M0({block:e}){return(0,v.useMemo)(()=>lF(e.tree,{Fragment:v.Fragment,jsx:j.jsx,jsxs:j.jsxs,components:{a:({href:e,children:t})=>e?(0,j.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:t}):(0,j.jsx)(`span`,{children:t}),span:t=>{let n=t[`data-formula`];return n===void 0?(0,j.jsx)(`span`,{className:t.className,children:t.children}):(0,j.jsx)(`span`,{className:`math-text-formula`,dangerouslySetInnerHTML:{__html:e.formulas[Number(n)]??``}})},img:({alt:e})=>e?(0,j.jsx)(`span`,{children:e}):null,table:e=>(0,j.jsx)(`div`,{className:`math-text-scroll`,children:(0,j.jsx)(`table`,{children:e.children})}),h1:`h4`,h2:`h4`,h3:`h5`,h4:`h6`,h5:`h6`},passKeys:!0,ignoreInvalidStyle:!0}),[e])}function N0({text:e}){return a0(e).map((e,t)=>e.kind===`code`?(0,j.jsx)(`pre`,{children:(0,j.jsx)(`code`,{children:e.code})},t):(0,j.jsx)(`p`,{className:`math-text-literal`,children:e.text},t))}var P0=class extends v.Component{state={};componentDidCatch(){this.setState({failedText:this.props.text})}render(){return this.state.failedText===this.props.text?(0,j.jsx)(N0,{text:this.props.text}):this.props.children}},F0;function I0(){return F0??=typeof Worker>`u`?O0():k0(()=>new Worker(new URL(`/assets/render.worker-D6KYAHiU.js`,``+import.meta.url),{type:`module`,name:`mivra-render`})),F0}var L0=(0,v.createContext)(void 0);function R0(e){let t=(0,v.useContext)(L0)??I0(),n=e===void 0?void 0:t.peek(e),[r,i]=(0,v.useState)(),a=(0,v.useRef)(void 0);(0,v.useEffect)(()=>{if(e===void 0||n!==void 0)return;let r=new AbortController;return t.render(e,r.signal).then(t=>{t!==void 0&&i({text:e,result:t})}),()=>r.abort()},[t,e,n]);let o=n??(r&&r.text===e?r.result:void 0);return(0,v.useEffect)(()=>{o!==void 0&&(a.current=o)}),e===void 0?void 0:o??a.current}var z0=(0,v.memo)(function({text:e,source:t}){let n=(0,v.useMemo)(()=>o0(e),[e]),r=R0(n?void 0:e);return n||r===void 0||r===`plain`?(0,j.jsx)(N0,{text:t}):(0,j.jsx)(P0,{text:t,children:(0,j.jsx)(M0,{block:r})})}),B0=2e4;function V0(e,t){let n=0,r=0;for(;r<e.length&&(r===0||n<t);)n+=e[r++].text.length;return r}function H0({text:e,className:t}){let n=(0,v.useDeferredValue)(e),r=(0,v.useMemo)(()=>H1(n),[n]),[i,a]=(0,v.useState)(B0),o=V0(r,i);return(0,v.useEffect)(()=>{if(o>=r.length)return;let e=r.slice(0,o).reduce((e,t)=>e+t.text.length,0),t=setTimeout(()=>a(t=>Math.max(t,e)+B0),0);return()=>clearTimeout(t)},[o,r]),(0,j.jsx)(`div`,{className:t,children:r.slice(0,o).map((e,t)=>(0,j.jsx)(z0,{text:e.text,source:e.source},t))})}function U0({text:e,className:t}){let n=(0,v.useMemo)(()=>RO(e),[e]);return(0,j.jsx)(`span`,{className:`${t} math-text-literal`,children:n.map((e,t)=>`formula`in e?(0,j.jsx)(A0,{source:e.formula,display:!1},t):e.text)})}function W0({text:e,mode:t=`block`,className:n}){let r=n?`math-text ${n}`:`math-text`;return t===`math`?(0,j.jsx)(U0,{text:e,className:r}):(0,j.jsx)(H0,{text:e,className:r})}function G0({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`card`,className:A(`flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm`,e),...t})}function K0({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`card-content`,className:A(`px-6`,e),...t})}var q0=1500,J0={active:`bg-secondary ring-2 ring-inset ring-foreground`,done:`bg-success/15 ring-1 ring-inset ring-success`,muted:`bg-muted text-muted-foreground`},Y0={current:`bg-foreground text-background`,other:`bg-sunken text-muted-foreground ring-1 ring-inset ring-border-strong`};function X0(e){let t=e-1,[n,r]=(0,v.useState)(0),[i,a]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!i)return;if(n>=t){a(!1);return}let e=setTimeout(()=>r(e=>Math.min(e+1,t)),q0);return()=>clearTimeout(e)},[i,n,t]);let o=e=>{a(!1),r(Math.max(0,Math.min(e,t)))};return{index:n,last:t,playing:i,go:o,togglePlay:()=>{if(i)return a(!1);n>=t&&r(0),a(!0)},onKeyDown:e=>{if(e.key===`ArrowLeft`)o(n-1);else if(e.key===`ArrowRight`)o(n+1);else return;e.preventDefault()}}}function Z0({children:e,label:t=`Formula, scrolls sideways`,className:n}){let r=(0,v.useRef)(null),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(!1),c=()=>{r.current&&a(r.current.scrollWidth>r.current.clientWidth)};return(0,v.useLayoutEffect)(c),(0,v.useEffect)(()=>{let e=new ResizeObserver(c);return e.observe(r.current),document.fonts.ready.then(c),()=>e.disconnect()},[]),(0,j.jsx)(`span`,{ref:r,className:A(`step-scroll block min-w-0 overflow-x-auto overflow-y-hidden`,n),"data-testid":`step-scroll`,...i?{role:`group`,"aria-label":t}:{},tabIndex:i?0:o?-1:void 0,onFocus:()=>s(!0),onBlur:e=>s(document.activeElement===e.currentTarget),onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.stopPropagation()},children:e})}function Q0({children:e}){return(0,j.jsx)(Z0,{children:(0,j.jsx)(`span`,{"aria-hidden":`true`,children:e})})}function $0({stepper:e,play:t=!1,placement:n=`footer`,children:r}){let{index:i,last:a,playing:o,go:s,togglePlay:c}=e;if(a<=0)return null;let l=`bg-card dark:bg-card border-border-strong dark:border-border-strong hover:bg-sunken dark:hover:bg-sunken hover:text-foreground aria-disabled:cursor-not-allowed aria-disabled:opacity-45`;return(0,j.jsxs)(`div`,{"data-slot":n===`footer`?`artifact-footer`:`artifact-controls`,className:A(`bg-sunken/55 flex flex-wrap items-center gap-x-4 gap-y-2.5 px-3.5 py-2.5`,n===`footer`?`rounded-b-xl border-t`:`border-b`),children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,className:l,onClick:()=>s(i-1),"aria-disabled":i===0,children:[(0,j.jsx)(hh,{}),`Prev`]}),t&&(0,j.jsxs)(M,{type:`button`,size:`sm`,className:`min-w-20`,onClick:c,children:[o?(0,j.jsx)(ree,{className:`fill-current`}):(0,j.jsx)(Xg,{className:`fill-current`}),o?`Pause`:`Play`]}),(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,className:l,onClick:()=>s(i+1),"aria-disabled":i===a,children:[`Next`,(0,j.jsx)(_h,{})]}),r]}),(0,j.jsxs)(`div`,{className:`ml-auto flex min-w-0 max-w-full items-center gap-3`,children:[(0,j.jsx)(`span`,{className:`flex min-w-0 gap-[3px]`,"aria-hidden":`true`,"data-testid":`step-pips`,children:a<24&&Array.from({length:a+1},(e,t)=>(0,j.jsx)(`i`,{className:A(`h-[3px] w-3 min-w-[2px] shrink rounded-full`,t<i?`bg-muted-foreground`:t===i?`bg-foreground`:`bg-border-strong`)},t))}),(0,j.jsxs)(`span`,{className:`text-muted-foreground font-mono text-xs whitespace-nowrap`,"aria-hidden":`true`,"data-testid":`step-counter`,children:[`Step `,i+1,` of `,a+1]})]})]})}function e2({className:e,...t}){return(0,j.jsx)(G0,{"data-artifact-card":``,className:A(`border-border-strong shadow-paper gap-0 py-0 whitespace-normal`,e),...t})}function t2({kind:e,kindId:t,aside:n,children:r}){return(0,j.jsxs)(`div`,{"data-slot":`artifact-header`,className:`flex min-w-0 flex-wrap items-baseline gap-x-3.5 gap-y-1 border-b px-4 py-3 sm:px-5`,children:[(0,j.jsx)(`span`,{id:t,className:`text-accent-foreground shrink-0 font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:e}),r,n&&(0,j.jsx)(`span`,{className:`text-muted-foreground ml-auto font-mono text-[0.6875rem] leading-snug tracking-[0.09em] uppercase`,children:n})]})}function n2({id:e,text:t}){return(0,j.jsx)(`h3`,{className:`font-heading min-w-0 flex-[1_1_12rem] text-[1.0625rem] leading-snug font-medium`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(`span`,{id:e,children:(0,j.jsx)(W0,{text:t,mode:`math`})})})})}function r2({className:e,...t}){return(0,j.jsx)(K0,{className:A(`flex flex-col gap-3 px-4 py-4 sm:px-5 sm:py-5`,e),...t})}function i2({index:e}){return(0,j.jsx)(`span`,{"aria-hidden":`true`,className:`border-border-strong text-muted-foreground grid size-6 shrink-0 place-items-center rounded-[6px] border font-mono text-[0.72rem] font-medium`,"data-testid":`option-key`,children:e<26?String.fromCharCode(65+e):``})}function a2({code:e,lines:t}){let n=(0,v.useMemo)(()=>KO(e.source),[e.source]),r=(0,v.useMemo)(()=>S1(n.join(`
|
|
538
|
-
`),e.language),[n,e.language]),i=new Set(t),a=(0,v.useRef)(null),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(!1),u=()=>{a.current&&s(a.current.scrollWidth>a.current.clientWidth)};return(0,v.useLayoutEffect)(u),(0,v.useEffect)(()=>{let e=new ResizeObserver(u);return e.observe(a.current),document.fonts.ready.then(u),()=>e.disconnect()},[]),(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col rounded-md border`,"data-testid":`code-pane`,children:[(0,j.jsx)(`div`,{className:`text-muted-foreground border-b px-3 py-1 font-mono text-xs`,"aria-hidden":`true`,children:e.language}),(0,j.jsx)(`div`,{ref:a,role:`region`,"aria-label":`Code, ${e.language}${o?`, scrolls sideways`:``}`,className:`min-w-0 overflow-x-auto py-2`,"data-testid":`code-scroll`,tabIndex:o?0:c?-1:void 0,onFocus:()=>l(!0),onBlur:e=>l(document.activeElement===e.currentTarget),onKeyDown:e=>{o&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.stopPropagation()},children:(0,j.jsx)(`pre`,{className:`w-max min-w-full font-mono text-xs leading-relaxed [tab-size:4]`,children:(0,j.jsx)(`code`,{children:n.map((e,t)=>{let n=i.has(t+1);return(0,j.jsxs)(`span`,{className:A(`flex border-l-2 pr-3`,n?`bg-muted border-foreground text-foreground`:`border-transparent`),"data-testid":`code-line`,"data-active":n||void 0,"aria-current":n?`true`:void 0,children:[(0,j.jsx)(`span`,{className:`text-muted-foreground w-9 shrink-0 pr-3 text-right select-none`,children:t+1}),(0,j.jsx)(`span`,{className:`whitespace-pre`,children:e?(0,j.jsx)(o2,{text:e,tokens:r?.[t]}):` `}),n&&(0,j.jsx)(`span`,{className:`sr-only`,children:` (current line)`})]},t)})})})})]})}function o2({text:e,tokens:t}){return t?t.map((e,t)=>e.className?(0,j.jsx)(`span`,{className:e.className,children:e.text},t):e.text):e}var s2={active:``,done:`, done`,muted:`, ruled out`};function c2(e,t){let n=e.values;for(let r of e.steps.slice(0,t+1))r.values&&(n=r.values);let r=e.steps[t];return{values:n,explanation:r?.explanation??``,pointers:r?.pointers??[],ranges:r?.ranges??[],variables:r?.variables??[],lines:r?.lines??[]}}function l2(e,t){return e.length===t.length?t.flatMap((t,n)=>t===e[n]?[]:[` Index ${n} is now ${String(t)}.`]).join(``):` The sequence is now ${t.map(String).join(`, `)}.`}function u2({view:e}){let{spec:t}=e,n=X0(t.steps.length),r=(0,v.useId)(),i=(0,v.useId)(),a=c2(t,n.index),o=(0,v.useRef)({index:n.index,from:a.values});o.current.index!==n.index&&(o.current={index:n.index,from:c2(t,o.current.index).values});let s=a.values.length,c=a.ranges.filter(e=>e.start<=e.end&&e.end<s),l=a.pointers.filter(e=>e.index<s),u=t.code?KO(t.code.source):[],d=a.lines.filter(e=>e>=1&&e<=u.length),f=e=>{let t=c.find(t=>t.start<=e&&e<=t.end);return t?t.tone??`active`:void 0},p=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`p`,{className:`sr-only`,"data-testid":`trace-description`,children:[`Values: `,a.values.map((e,t)=>`index ${t}: ${String(e)}`).join(`, `)]}),(0,j.jsx)(Z0,{label:`Values, scrolls sideways`,className:`pb-1`,children:(0,j.jsxs)(`span`,{"aria-hidden":`true`,className:`inline-grid w-max gap-1 wrap-normal`,style:{gridTemplateColumns:`repeat(${s}, minmax(2.5rem, max-content))`},children:[c.map((e,t)=>(0,j.jsx)(`span`,{className:A(`min-h-5 rounded-sm px-1 text-center text-xs font-medium`,J0[e.tone??`active`]),style:{gridColumn:`${e.start+1} / ${e.end+2}`,gridRow:t+1},"data-testid":`trace-range`,children:e.label??` `},`range-${t}`)),a.values.map((e,t)=>{let n=f(t);return(0,j.jsxs)(`span`,{className:A(`bg-card border-border-strong relative grid h-11 place-items-center rounded-md border px-2 font-mono text-[0.95rem]`,n&&J0[n]),style:{gridColumn:t+1,gridRow:c.length+1},"data-testid":`trace-cell`,children:[String(e),(0,j.jsx)(`span`,{className:`text-muted-foreground absolute right-1 bottom-0 text-[0.6rem]`,children:t})]},`cell-${t}`)}),Array.from({length:s},(e,t)=>{let n=l.filter(e=>e.index===t).map(e=>e.name);return n.length?(0,j.jsxs)(`span`,{className:`text-foreground text-center font-mono text-xs font-medium`,style:{gridColumn:t+1,gridRow:c.length+2},"data-testid":`trace-pointer`,children:[`↑ `,n.join(`, `)]},`pointers-${t}`):null})]})}),a.variables.length>0&&(0,j.jsx)(`dl`,{className:`flex flex-wrap gap-2`,"aria-hidden":`true`,children:a.variables.map((e,t)=>(0,j.jsxs)(`div`,{className:`border-border-strong bg-card flex max-w-full min-w-0 gap-1.5 rounded-md border px-2 py-0.5 font-mono text-xs wrap-anywhere`,children:[(0,j.jsx)(`dt`,{className:`min-w-0`,children:e.name}),(0,j.jsxs)(`dd`,{className:`min-w-0`,children:[`= `,String(e.value)]})]},t))}),(0,j.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`trace-status`,children:[(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Step `,n.index+1,` of `,n.last+1,`.`,` `]}),(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:a.explanation,mode:`math`})}),(0,j.jsxs)(`span`,{className:`sr-only`,children:[l2(o.current.from,a.values),l.map(e=>` ${e.name} points to index ${e.index}, value ${String(a.values[e.index])}.`),c.map(e=>` ${e.label?`${e.label} covers`:`Highlighted:`} indices ${e.start} through ${e.end}${s2[e.tone??`active`]}.`),a.variables.map(e=>` ${e.name} = ${String(e.value)}.`),d.map(e=>` Code line ${e}: ${u[e-1].trim()||`blank`}.`)]})]})]});return(0,j.jsxs)(e2,{role:`region`,"aria-labelledby":`${r} ${i}`,tabIndex:0,onKeyDown:n.onKeyDown,children:[(0,j.jsx)(t2,{kind:`Algorithm trace`,kindId:i,children:(0,j.jsx)(n2,{id:r,text:t.title})}),(0,j.jsx)(r2,{children:t.code?(0,j.jsx)(`div`,{className:`@container`,children:(0,j.jsxs)(`div`,{className:`grid gap-3 @xl:grid-cols-2`,children:[(0,j.jsx)(a2,{code:t.code,lines:d}),(0,j.jsx)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:p})]})}):p}),(0,j.jsx)($0,{stepper:n,play:!0})]})}var d2=se(`relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{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 f2({className:e,variant:t,...n}){return(0,j.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:A(d2({variant:t}),e),...n})}function p2({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`alert-title`,className:A(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function m2({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`alert-description`,className:A(`col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}function h2({className:e,...t}){return(0,j.jsx)(`textarea`,{"data-slot":`textarea`,className:A(`flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40`,e),...t})}var g2=ck.timeMs+3e3,_2=12e4,v2=1e3,y2=`The runner was still busy with code from an earlier run, so it was restarted. Run again.`,b2=e=>e.kind===`stdio`?{kind:`stdio`,stdin:e.stdin}:{kind:`call`,args:e.args},x2=class extends Error{constructor(){super(`Stopped`)}},S2=e=>()=>e===`python`?new Worker(new URL(`/assets/exercise-workers/python-exercise.worker-CtSr-syJ.js`,``+import.meta.url),{type:`module`,name:`mivra-python-exercise`}):new Worker(new URL(`/assets/exercise-workers/exercise.worker-DzC1lTCg.js`,``+import.meta.url),{type:`module`,name:`mivra-exercise`});function C2({spawn:e=S2(`javascript`),hardLimitMs:t=g2,startupLimitMs:n}={}){let r,i=0,a,o=()=>{r&&=(clearInterval(r.heartbeat),r.worker.terminate(),void 0)},s=()=>{if(r)return r;let t={worker:e(),loaded:!1};return t.worker.addEventListener(`message`,(({data:e})=>{`pong`in e&&(t.pinged=void 0)})),r=t,t},c=e=>{n!==void 0&&e.loaded&&e===r&&(e.pinged=void 0,e.heartbeat=setInterval(()=>{e.pinged===void 0?(e.pinged=Date.now(),e.worker.postMessage({id:++i,kind:`ping`})):Date.now()-e.pinged>=t&&o()},v2))};return{run(e,r,l,{onStart:u}={}){let d=s();clearInterval(d.heartbeat);let{worker:f}=d,p=++i;return new Promise((i,s)=>{let m,h=()=>{clearTimeout(m),f.removeEventListener(`message`,y),f.removeEventListener(`error`,b),a=void 0},g=e=>{h(),c(d),i(e)},_=e=>{h(),o(),i({stdout:``,error:e})},v=()=>_(`Time limit exceeded (${ck.timeMs/1e3} s): the code ran too long, or never stopped.`),y=({data:e})=>{if(!(e.id!==p||`pong`in e)){if(`started`in e)d.loaded=!0,clearTimeout(m),m=setTimeout(v,t),u?.();else{if(e.restart)return h(),o(),i(e.ok?e.run:{stdout:``,error:e.error});e.ok?g(e.run):g({stdout:``,error:`The code couldn't run: ${e.error}`})}}},b=e=>{e.preventDefault(),_(`The code stopped the runner, probably by using too much memory.`)};n===void 0?(m=setTimeout(v,t),u?.()):m=d.loaded?setTimeout(()=>_(y2),t):setTimeout(()=>_(`Python took too long to start. Check your connection to Mivra and try again.`),n),a=()=>{h(),o(),s(new x2)},f.addEventListener(`message`,y),f.addEventListener(`error`,b),f.postMessage({id:p,kind:`case`,code:e,functionName:r,testCase:l})})},warm(){r||s().worker.postMessage({id:++i,kind:`warm`})},stop(){a?a():o()},dispose(){a?.(),o()}}}var w2=e=>C2(e===`python`?{spawn:S2(`python`),startupLimitMs:_2}:{spawn:S2(`javascript`)}),T2={javascript:`JavaScript`,python:`Python`},E2=e=>`mivra.exercise.${e}`;function D2(e){try{return localStorage.getItem(E2(e))??void 0}catch{return}}function O2(e,t){try{t===void 0?localStorage.removeItem(E2(e)):localStorage.setItem(E2(e),t)}catch{}}function k2(e,t){try{let n=JSON.parse(t);if(Array.isArray(n))return`${e??`f`}(${n.map(e=>JSON.stringify(e)).join(`, `)})`}catch{}return`${e??`f`}(…${t})`}function A2({label:e,text:t,tone:n}){return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,j.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem] tracking-[0.06em] uppercase`,children:e}),(0,j.jsx)(`pre`,{className:A(`bg-sunken max-h-48 min-w-0 overflow-auto rounded-md px-3 py-2 font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,n===`error`&&`text-destructive`),children:t===``?(0,j.jsx)(`span`,{className:`text-muted-foreground italic`,children:`(nothing)`}):t})]})}function j2({index:e,testCase:t,run:n,passed:r,functionName:i,stderrLabel:a}){let o=`Case ${e+1}${t.hidden?` (hidden)`:``}`,s=r===void 0?`Not run`:r?`Passed`:`Failed`;return(0,j.jsxs)(`li`,{className:A(`flex min-w-0 flex-col gap-2 rounded-lg border px-3 py-2.5`,r===!0&&`border-success bg-success/5`,r===!1&&`border-destructive bg-destructive/5`),"data-testid":`exercise-case`,"data-result":r===void 0?`pending`:r?`passed`:`failed`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,j.jsx)(`span`,{className:`font-medium`,children:o}),(0,j.jsxs)(`span`,{className:A(`ml-auto text-sm font-semibold`,r===!0?`text-success`:r===!1?`text-destructive`:`text-muted-foreground`),children:[r===!0?`✓ `:r===!1?`✗ `:``,s]})]}),!t.hidden&&(0,j.jsxs)(`div`,{className:`grid min-w-0 gap-2 @lg:grid-cols-2`,children:[t.kind===`call`?(0,j.jsx)(A2,{label:`Call`,text:k2(i,t.args)}):(0,j.jsx)(A2,{label:`Input`,text:t.stdin}),t.expected&&(`stdout`in t.expected?(0,j.jsx)(A2,{label:`Expected output`,text:t.expected.stdout}):(0,j.jsx)(A2,{label:`Expected return value`,text:t.expected.returned})),n&&n.error!==void 0&&(0,j.jsx)(A2,{label:`Error`,text:n.error,tone:`error`}),n&&n.error===void 0&&t.kind===`call`&&(0,j.jsx)(A2,{label:`Returned`,text:n.returned??``}),n&&(t.kind===`stdio`||n.stdout!==``)&&(0,j.jsx)(A2,{label:t.kind===`stdio`?`Your output`:`Printed`,text:n.stdout}),n?.stderr&&(0,j.jsx)(A2,{label:a,text:n.stderr})]}),t.hidden&&n?.error!==void 0&&r===!1&&(0,j.jsx)(`p`,{className:`text-destructive text-sm wrap-anywhere`,children:n.error})]})}function M2({view:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let{spec:i,latestAttempt:a}=e,o=a!==void 0,s=(0,v.useId)(),c=(0,v.useId)(),l=(0,v.useId)(),[u,d]=(0,v.useState)(()=>a?.answer.code??D2(e.id)??i.starterCode),[f,p]=(0,v.useState)(()=>a?.answer.results??[]),[m,h]=(0,v.useState)(),[g,_]=(0,v.useState)(),[y,b]=(0,v.useState)(),x=(0,v.useRef)(void 0),S=(0,v.useRef)(!1),C=i.language===`python`,w=C?` `:` `,T=()=>x.current??=w2(i.language);(0,v.useEffect)(()=>()=>x.current?.dispose(),[]),(0,v.useEffect)(()=>{a&&(d(a.answer.code),p(a.answer.results))},[a]);let E=a?.grade,D=(0,v.useMemo)(()=>i.cases.map((e,t)=>{if(E)return E.cases[t]?.passed;let n=f[t];return n&&e.expected?xk(e.expected,n):void 0}),[i.cases,f,E]),O=t=>{d(t),O2(e.id,t===i.starterCode?void 0:t)},ee=async(e,t)=>{let n=T(),r=e===`submit`?[]:[...f];for(let e of t)r[e]=void 0;p(r),b(void 0),_(void 0);try{for(let[a,o]of t.entries())h({mode:e,done:a,total:t.length,starting:!0}),r[o]=await n.run(u,i.functionName,b2(i.cases[o]),{onStart:()=>h({mode:e,done:a,total:t.length})}),p([...r]);return r}catch(t){if(!(t instanceof x2))throw t;_(e===`submit`?`Stopped. Nothing was submitted.`:`Stopped.`);return}finally{h(void 0)}},te=i.cases.flatMap((e,t)=>e.hidden?[]:[t]),ne=async()=>{let e=await ee(`run`,te);if(!e)return;let t=te.filter(t=>e[t]&&i.cases[t].expected&&xk(i.cases[t].expected,e[t])).length;_(`${t} of ${te.length} visible ${te.length===1?`case`:`cases`} passed.`)},re=async()=>{if(u.length>5e4){b(`The code is too long to submit (over ${ik.toLocaleString(`en-US`)} characters).`);return}let t=await ee(`submit`,i.cases.map((e,t)=>t));if(!t)return;h({mode:`submit`,done:i.cases.length,total:i.cases.length});let a={code:u,results:t},o=await NM(e.id,a);if(o.ok)return h(void 0),O2(e.id,void 0),n(o.view);b(o.error);try{await r()}catch{}finally{h(void 0)}},ie=e=>{if(e.key===`Escape`){S.current=!0;return}let t=S.current;if(S.current=!1,e.key!==`Tab`||e.shiftKey||t||e.ctrlKey||e.altKey||e.metaKey)return;e.preventDefault();let n=e.currentTarget,{selectionStart:r,selectionEnd:i}=n,a=`${u.slice(0,r)}${w}${u.slice(i)}`;O(a),requestAnimationFrame(()=>n.setSelectionRange(r+w.length,r+w.length))},ae=m!==void 0,oe=o||t||ae,k=m?m.done>=m.total?`Submitting…`:m.starting&&C?`Starting Python… (the first run takes a few seconds)`:`Running case ${m.done+1} of ${m.total}…`:void 0;return(0,j.jsxs)(e2,{role:`region`,"aria-labelledby":s,children:[(0,j.jsx)(t2,{kind:`Exercise`,aside:`${T2[i.language]} · runs in your browser`,children:(0,j.jsx)(n2,{id:s,text:i.title})}),(0,j.jsxs)(r2,{className:`@container gap-4`,children:[(0,j.jsx)(`div`,{className:`text-[0.95rem]`,"data-testid":`exercise-instructions`,children:(0,j.jsx)(W0,{text:i.instructions,mode:`block`})}),(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,j.jsx)(`label`,{htmlFor:c,className:`text-sm font-medium`,children:o?`Your submitted code`:`Your code`}),(0,j.jsx)(h2,{id:c,"aria-describedby":l,value:u,onChange:e=>O(e.target.value),onKeyDown:ie,onFocus:()=>{C&&!o&&T().warm()},readOnly:o||ae,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,wrap:`off`,className:A(`bg-card dark:bg-card min-h-40 resize-y overflow-x-auto font-mono text-xs leading-relaxed md:text-xs`,C?`[tab-size:4]`:`[tab-size:2]`),"data-testid":`exercise-editor`}),(0,j.jsxs)(`p`,{id:l,className:`text-muted-foreground text-xs`,children:[i.functionName?`Define ${i.functionName} at the top level. `:C?`Read input with input() or sys.stdin, and print with print(). `:`Read input with readLine() or stdin, and print with console.log. `,!o&&`Tab indents; press Escape then Tab to leave the editor.`]})]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[!o&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(M,{type:`button`,variant:`outline`,onClick:()=>void ne(),disabled:ae,children:`Run`}),(0,j.jsx)(M,{type:`button`,onClick:()=>void re(),disabled:oe,children:`Submit`})]}),ae&&m.done<m.total&&(0,j.jsx)(M,{type:`button`,variant:`destructive`,onClick:()=>x.current?.stop(),children:`Stop`}),!o&&!ae&&u!==i.starterCode&&(0,j.jsx)(M,{type:`button`,variant:`ghost`,onClick:()=>O(i.starterCode),children:`Reset code`})]}),(0,j.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2`,"data-testid":`exercise-status`,children:[k&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:k}),!k&&g&&(0,j.jsx)(`p`,{className:`text-sm`,children:g}),!o&&t&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Submit once the reply finishes. You can run your code now.`}),y&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:y}),E&&(0,j.jsxs)(f2,{className:`bg-sunken border-0 px-4 py-3`,children:[(0,j.jsx)(p2,{className:A(`font-heading text-[1.15rem] font-medium`,E.correct?`text-success`:`text-destructive`),children:E.correct?`All cases passed!`:`Not quite.`}),(0,j.jsxs)(m2,{className:`text-foreground`,children:[E.passed,` of `,E.total,` `,E.total===1?`case`:`cases`,` passed`,i.cases.some(e=>e.hidden)?`, hidden ones included`:``,`.`]})]})]}),(0,j.jsx)(`ol`,{className:`flex flex-col gap-2`,"aria-label":`Test cases`,children:i.cases.map((e,t)=>(0,j.jsx)(j2,{index:t,testCase:e,run:f[t],passed:D[t],functionName:i.functionName,stderrLabel:C?`stderr`:`console.error / warn`},t))})]})]})}var N2=200;function P2({output:e}){let t=(0,v.useRef)(null),[n,r]=(0,v.useState)({x:!1,y:!1}),[i,a]=(0,v.useState)(!1),o=()=>{let e=t.current;if(!e)return;let n={x:e.scrollWidth>e.clientWidth,y:e.scrollHeight>e.clientHeight};r(e=>e.x===n.x&&e.y===n.y?e:n)};(0,v.useLayoutEffect)(o),(0,v.useEffect)(()=>{let e=new ResizeObserver(o);return e.observe(t.current),document.fonts.ready.then(o),()=>e.disconnect()},[]);let s=n.x||n.y;return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col rounded-md border`,"data-testid":`walkthrough-output`,children:[(0,j.jsx)(`div`,{className:`text-muted-foreground border-b px-3 py-1 font-mono text-xs`,children:`Output`}),(0,j.jsx)(`div`,{ref:t,role:`region`,"aria-label":`Output${s?`, scrolls`:``}`,className:`max-h-72 min-w-0 overflow-auto px-3 py-2`,"data-testid":`output-scroll`,tabIndex:s?0:i?-1:void 0,onFocus:()=>a(!0),onBlur:e=>a(document.activeElement===e.currentTarget),onKeyDown:e=>{n.x&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.stopPropagation()},children:e===``?(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs italic`,children:`No output yet`}):(0,j.jsx)(`pre`,{className:`w-max min-w-full font-mono text-xs leading-relaxed whitespace-pre [tab-size:4]`,"data-testid":`output-text`,children:e})})]})}function F2({view:e}){let{spec:t}=e,n=X0(t.steps.length),r=(0,v.useId)(),i=(0,v.useId)(),a=t.steps[n.index],o=KO(t.code.source),s=(a.lines??[]).filter(e=>e>=1&&e<=o.length),c=a.output===``?0:KO(a.output).length;return(0,j.jsxs)(e2,{role:`region`,"aria-labelledby":`${r} ${i}`,tabIndex:0,onKeyDown:n.onKeyDown,children:[(0,j.jsx)(t2,{kind:`Illustrated walkthrough`,kindId:i,children:(0,j.jsx)(n2,{id:r,text:t.title})}),(0,j.jsxs)(r2,{children:[(0,j.jsx)(`div`,{className:`@container`,children:(0,j.jsxs)(`div`,{className:`grid gap-3 @xl:grid-cols-2`,children:[(0,j.jsx)(a2,{code:t.code,lines:s}),(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,j.jsxs)(`section`,{className:`flex min-w-0 flex-col rounded-md border`,"aria-label":`Variables`,"data-testid":`walkthrough-variables`,children:[(0,j.jsx)(`div`,{className:`text-muted-foreground border-b px-3 py-1 font-mono text-xs`,"aria-hidden":`true`,children:`Variables`}),(0,j.jsx)(`div`,{className:`px-3 py-2`,children:a.variables.length===0?(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs italic`,children:`No variables at this step`}):(0,j.jsx)(`dl`,{className:`flex flex-col gap-1 font-mono text-xs`,children:a.variables.map(e=>(0,j.jsxs)(`div`,{className:`flex min-w-0 gap-1.5 wrap-anywhere`,"data-testid":`walkthrough-variable`,children:[(0,j.jsx)(`dt`,{className:`min-w-0`,children:e.name}),(0,j.jsxs)(`dd`,{className:`min-w-0`,children:[`= `,String(e.value)]})]},e.name))})})]}),(0,j.jsx)(P2,{output:a.output})]})]})}),(0,j.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`walkthrough-status`,className:`flex flex-col gap-1`,children:[(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Step `,n.index+1,` of `,n.last+1,`.`,` `]}),a.label&&(0,j.jsxs)(`span`,{className:`text-muted-foreground font-mono text-xs`,"data-testid":`walkthrough-label`,children:[a.label,(0,j.jsx)(`span`,{className:`sr-only`,children:`.`})]}),(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:a.explanation,mode:`math`})}),(0,j.jsxs)(`span`,{className:`sr-only`,children:[s.map(e=>` Code line ${e}: ${o[e-1].trim()||`blank`}.`),a.variables.length===0?` No variables.`:a.variables.map(e=>` ${e.name} = ${String(e.value)}.`),a.output===``?` No output yet.`:a.output.length<=N2?` Output: ${a.output}`:` Output: ${c} ${c===1?`line`:`lines`}, in the output pane.`]})]})]}),(0,j.jsx)($0,{stepper:n,play:!0})]})}var I2=3,L2=5,R2=8,z2=6,B2=3.5,V2=14,H2=e=>e.x+e.width,U2=e=>e.y+e.height,W2=e=>Math.round(e*10)/10;function G2(e,t,n){let[r,i]=e.x<=t.x?[e.x,t.x]:[t.x,e.x],[a,o]=e.y<=t.y?[e.y,t.y]:[t.y,e.y];return i>n.x-I2&&r<H2(n)+I2&&o>n.y-I2&&a<U2(n)+I2}var K2=class{used=new Map;next(e,t,n){let r=`${t}\u0000${e}`,i=this.used.get(r)??0;this.used.set(r,i+1);let a=n.y+Math.min(V2,n.height/2)+i*L2;return a<=U2(n)-I2||i===0?a:void 0}};function q2(e,t,n,r,i){if(e<452)return{narrow:!0,connectors:[]};let a=new K2,o=new Map,s=e=>{let t=o.get(e)??0;return o.set(e,t+1),t},c=[];for(let o of i){let i=n.get(o.from),l=n.get(o.to);if(!i||!l||o.from===o.to||!(i.width>0&&i.height>0&&l.width>0&&l.height>0))continue;let u;if(H2(i)+12<=l.x||H2(l)+12<=i.x){let e=H2(i)<=l.x,[t,n]=e?[H2(i),l.x]:[H2(l),i.x],r=s(`g\u0000${Math.round(t)}\u0000${Math.round(n)}`),c=(r%2==0?r/2:-(r+1)/2)*L2,d=(t+n)/2+c,f=a.next(o.from,e?`right`:`left`,i),p=a.next(o.to,e?`left`:`right`,l),m=d-t>=7&&n-d>=7;if(f!==void 0&&p!==void 0&&m){let t=e?H2(i):i.x,n=e?l.x:H2(l);u=[{x:t,y:f},{x:d,y:f},{x:d,y:p},{x:n,y:p}]}}else if(U2(i)<=l.y||U2(l)<=i.y){let t=Math.max(H2(i),H2(l)),n=t+R2+s(`m\u0000${Math.round(t)}`)*L2,r=a.next(o.from,`right`,i),c=a.next(o.to,`right`,l);r!==void 0&&c!==void 0&&n<=e-1&&(u=[{x:H2(i),y:r},{x:n,y:r},{x:n,y:c},{x:H2(l),y:c}])}if(!u)continue;let d=[...[...n].filter(([e])=>e!==o.from&&e!==o.to).map(([,e])=>e),...r],f=u.slice(1).map((e,t)=>[u[t],e]);f.every(([e,t],n)=>!d.some(n=>G2(e,t,n))&&!(n===0?[l]:n===f.length-1?[i]:[i,l]).some(n=>G2(e,t,n)))&&!u.some(n=>n.x<0||n.y<0||n.x>e||n.y>t)&&c.push(J2(o.id,u))}return{narrow:!1,connectors:c}}function J2(e,t){let n=t.at(-1),r=t.at(-2),i=Math.hypot(n.x-r.x,n.y-r.y)||1,[a,o]=[(n.x-r.x)/i,(n.y-r.y)/i],s={x:n.x-a*z2,y:n.y-o*z2},c=[n,{x:s.x-o*B2,y:s.y+a*B2},{x:s.x+o*B2,y:s.y-a*B2}];return{id:e,path:[...t.slice(0,-1),s].map((e,t)=>`${t?`L`:`M`}${W2(e.x)} ${W2(e.y)}`).join(` `),arrow:c.map(e=>`${W2(e.x)},${W2(e.y)}`).join(` `),points:t}}var Y2=`cubic-bezier(0.2, 0, 0, 1)`,X2=`[data-testid="composition-entity"]`,Z2=`[data-composition-obstacle]`,Q2=`[tabindex], a[href], button, input, select, textarea`,$2=(e,t)=>[...e.querySelectorAll(X2)].find(e=>e.dataset.entity===t),e4=()=>typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function t4(e,t){let n=e.getBoundingClientRect();return{x:n.left-t.left,y:n.top-t.top,width:n.width,height:n.height}}function n4(e,t){let n=0,r=0,i=e;for(;i&&i!==t;)n+=i.offsetLeft,r+=i.offsetTop,i=i.offsetParent;return i===t?{x:n,y:r,width:e.offsetWidth,height:e.offsetHeight}:t4(e,t.getBoundingClientRect())}var r4=(e,t)=>e.narrow===t.narrow&&e.connectors.length===t.connectors.length&&e.connectors.every((e,n)=>e.id===t.connectors[n].id&&e.path===t.connectors[n].path);function i4(e,t,n,r,i){let a=(0,v.useRef)(t),o=(0,v.useRef)(null),s=(0,v.useRef)([]),c=(0,v.useRef)(0),l=(0,v.useRef)(0),u=(0,v.useRef)(null),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)({narrow:!1,connectors:[]}),h=(0,v.useRef)(i);h.current=i;let g=()=>{for(let e of s.current)e.cancel();s.current=[],c.current++},_=(t,i)=>{let c=Math.max(0,Math.min(t,n)),l=e.current;o.current=null;let d=document.activeElement,p=l&&d instanceof HTMLElement&&l.contains(d)?d.closest(X2):null;if(u.current=p?{entity:p.dataset.entity,at:[...p.querySelectorAll(Q2)].indexOf(d)}:null,c===a.current&&i===`seek`&&s.current.length&&(g(),f(!1)),l&&i===`step`&&Math.abs(c-a.current)===1&&!e4()){let e=l.getBoundingClientRect();o.current={to:c,from:new Map([...l.querySelectorAll(X2)].map(t=>[t.dataset.entity,t4(t,e)]))}}r(c)};(0,v.useLayoutEffect)(()=>{if(a.current===t)return;a.current=t;let n=o.current?.to===t?o.current.from:void 0;o.current=null,g();let r=e.current,i=[];if(n&&r){let e=r.getBoundingClientRect();for(let t of r.querySelectorAll(X2)){let r=n.get(t.dataset.entity);if(!r||typeof t.animate!=`function`)continue;let a=t4(t,e),[o,s]=[r.x-a.x,r.y-a.y];Math.abs(o)<.5&&Math.abs(s)<.5||i.push(t.animate([{transform:`translate(${o}px, ${s}px)`},{transform:`none`}],{duration:320,easing:Y2}))}}if(s.current=i,f(i.length>0),!i.length)return;let l=c.current;Promise.all(i.map(e=>e.finished)).then(()=>{c.current===l&&(s.current=[],f(!1))},()=>{})},[t]),(0,v.useEffect)(()=>{let t=u.current;if(u.current=null,!t)return;let n=setTimeout(()=>{let n=e.current,r=document.activeElement;if(!n||r&&r!==document.body&&r.isConnected)return;let i=$2(n,t.entity)?.querySelectorAll(Q2)[t.at];i?.focus({preventScroll:!0}),i&&document.activeElement===i||n.closest(`[data-testid="composition"]`)?.focus({preventScroll:!0})});return()=>clearTimeout(n)},[t]);let y=()=>{let t=e.current;if(!t)return;let n=new Map([...t.querySelectorAll(X2)].map(e=>[e.dataset.entity,n4(e,t)])),r=[...t.querySelectorAll(Z2)].map(e=>n4(e,t)),i=q2(t.clientWidth,t.clientHeight,n,r,h.current);m(e=>r4(e,i)?e:i)};return(0,v.useLayoutEffect)(y),(0,v.useEffect)(()=>{let t=e.current;if(!t)return;l.current=t.clientWidth;let n=!0,r=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{t.clientWidth!==l.current&&(l.current=t.clientWidth,s.current.length&&(g(),f(!1))),y()});r?.observe(t);for(let e of t.querySelectorAll(X2))r?.observe(e);return document.fonts?.ready.then(()=>{n&&y()}),()=>{n=!1,r?.disconnect()}},[t]),(0,v.useEffect)(()=>g,[]),{layout:p,moving:d,navigate:_}}var a4={active:`, current`,done:`, done`,muted:`, muted`},o4=e=>e===``?`""`:String(e);function s4({view:e}){let{spec:t}=e,n=X0(t.steps.length),{index:r,last:i,go:a}=n,o=(0,v.useId)(),s=(0,v.useId)(),c=Ak(t,r),l=Mk(t,r),u=(0,v.useRef)(null),{layout:d,moving:f,navigate:p}=i4(u,r,i,a,c.connections),m=new Set(d.connectors.map(e=>e.id)),h=(0,v.useRef)({index:r,moved:!1});h.current.index!==r&&(h.current={index:r,moved:!0});let g=e=>{if(e.key===`Home`)p(0,`seek`);else if(e.key===`End`)p(i,`seek`);else if(e.key===`ArrowLeft`)p(r-1,`step`);else if(e.key===`ArrowRight`)p(r+1,`step`);else return;e.preventDefault()},_=(0,j.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:l.map((e,t)=>(0,j.jsx)(`li`,{"data-testid":`composition-change`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:e.text,mode:`math`})})},t))});return(0,j.jsxs)(e2,{role:`region`,"aria-labelledby":`${o} ${s}`,tabIndex:0,onKeyDown:g,"data-testid":`composition`,children:[(0,j.jsx)(t2,{kind:`Composition`,kindId:s,children:(0,j.jsx)(n2,{id:o,text:t.title})}),(0,j.jsxs)($0,{stepper:{...n,go:e=>p(e,`step`)},placement:`header`,children:[(0,j.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,className:`aria-disabled:cursor-not-allowed aria-disabled:opacity-45`,onClick:()=>p(0,`seek`),"aria-disabled":r===0,children:[(0,j.jsx)(e_,{}),`Restart`]}),(0,j.jsx)(`select`,{"aria-label":`Go to step`,className:`border-border-strong bg-card focus-visible:ring-ring/50 h-8 max-w-[11rem] min-w-0 truncate rounded-md border px-2 font-mono text-xs outline-none focus-visible:ring-[3px]`,value:r,onChange:e=>p(Number(e.target.value),`seek`),onKeyDown:e=>e.stopPropagation(),"data-testid":`composition-seek`,children:t.steps.map((e,t)=>(0,j.jsx)(`option`,{value:t,children:`Step ${t+1}${e.label?`: ${e.label}`:``}`},t))})]}),(0,j.jsxs)(r2,{children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,"data-testid":`composition-step`,children:[c.label&&(0,j.jsx)(`p`,{className:`bg-sunken w-fit max-w-full rounded-md px-2 py-0.5 font-mono text-sm`,"data-testid":`composition-step-label`,children:(0,j.jsx)(Z0,{label:`Step label, scrolls sideways`,children:(0,j.jsx)(`span`,{className:`whitespace-pre`,children:c.label})})}),(0,j.jsx)(`p`,{className:`leading-normal`,"data-testid":`composition-explanation`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:c.explanation,mode:`math`})})}),(0,j.jsxs)(`div`,{className:`text-muted-foreground text-sm`,"data-testid":`composition-changes`,children:[(0,j.jsx)(`p`,{className:`font-mono text-[0.6875rem] font-medium tracking-[0.06em] uppercase`,children:r===0?`At the start`:`What changed`}),l.length?_:(0,j.jsx)(`p`,{children:`Nothing visible changed.`})]})]}),(0,j.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`composition-status`,children:h.current.moved&&(0,j.jsxs)(j.Fragment,{children:[`Step `,r+1,` of `,i+1,`. `,c.label&&(0,j.jsxs)(j.Fragment,{children:[c.label,`. `]}),(0,j.jsx)(W0,{text:c.explanation,mode:`math`}),` `,l.map((e,t)=>(0,j.jsxs)(`span`,{children:[(0,j.jsx)(W0,{text:e.text,mode:`math`}),` `]},t))]})}),(0,j.jsxs)(`div`,{ref:u,className:`relative isolate grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,13.75rem),1fr))] items-start gap-3`,"data-testid":`composition-groups`,"data-moving":f||void 0,"data-narrow":d.narrow||void 0,children:[c.groups.map(e=>(0,j.jsx)(c4,{group:e,drawn:m},e.id)),(0,j.jsx)(`svg`,{className:A(`pointer-events-none absolute inset-0 z-0 size-full overflow-visible transition-opacity duration-150 motion-reduce:transition-none`,f&&`opacity-0`),"aria-hidden":`true`,fill:`none`,"data-testid":`composition-connectors`,children:d.connectors.map(e=>(0,j.jsxs)(`g`,{"data-testid":`composition-connector`,"data-connection":e.id,children:[(0,j.jsx)(`path`,{d:e.path,className:`stroke-muted-foreground`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,j.jsx)(`polygon`,{points:e.arrow,className:`fill-muted-foreground`})]},e.id))})]})]})]})}function c4({group:e,drawn:t}){let n=(0,v.useId)(),r=e.ordered?`ol`:`ul`;return(0,j.jsxs)(`section`,{className:`bg-sunken/55 flex min-w-0 flex-col gap-2 rounded-lg border p-2.5`,"aria-labelledby":n,"data-testid":`composition-group`,"data-group":e.id,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-baseline justify-between gap-x-2`,"data-composition-obstacle":!0,children:[(0,j.jsx)(`h4`,{id:n,className:`min-w-0 text-sm font-semibold`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:e.label,mode:`math`})})}),e.ordered&&(0,j.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem]`,children:`first at top`})]}),e.entities.length?(0,j.jsx)(r,{className:`flex min-w-0 flex-col gap-2`,children:e.entities.map(e=>(0,j.jsx)(l4,{entity:e,drawn:t},e.id))}):(0,j.jsx)(`p`,{className:`text-muted-foreground rounded-md border border-dashed px-2 py-2 text-center text-xs`,"data-testid":`composition-empty`,"data-composition-obstacle":!0,children:`Empty`})]})}function l4({entity:e,drawn:t}){return(0,j.jsxs)(`li`,{className:A(`bg-card border-border-strong relative z-[1] flex min-w-0 flex-col gap-1.5 rounded-md border px-2.5 py-2`,e.tone&&J0[e.tone]),"data-testid":`composition-entity`,"data-entity":e.id,"data-tone":e.tone,children:[(0,j.jsxs)(`p`,{className:`min-w-0 font-medium`,children:[(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:e.label,mode:`math`})}),e.tone&&(0,j.jsx)(`span`,{className:`sr-only`,children:a4[e.tone]})]}),e.properties.length>0&&(0,j.jsx)(`dl`,{className:`grid min-w-0 grid-cols-[minmax(0,auto)_minmax(0,1fr)] gap-x-2 font-mono text-xs`,"data-testid":`composition-properties`,children:e.properties.map(e=>(0,j.jsxs)(`div`,{className:`contents`,"data-testid":`composition-property`,children:[(0,j.jsx)(`dt`,{className:`text-muted-foreground wrap-anywhere`,children:e.name}),(0,j.jsx)(`dd`,{className:`wrap-anywhere whitespace-pre-wrap`,children:o4(e.value)})]},e.name))}),e.body.map((e,t)=>(0,j.jsx)(u4,{block:e},t)),e.callout&&(0,j.jsx)(`p`,{className:`bg-sunken border-foreground/40 rounded-sm border-l-2 px-2 py-1 text-sm`,"data-testid":`composition-callout`,children:(0,j.jsxs)(Z0,{children:[(0,j.jsx)(`span`,{className:`sr-only`,children:`Note: `}),(0,j.jsx)(W0,{text:e.callout,mode:`math`})]})}),e.references.length>0&&(0,j.jsx)(`ul`,{className:`flex min-w-0 flex-wrap gap-1.5`,"aria-label":`References`,children:e.references.map(e=>(0,j.jsxs)(`li`,{className:`border-border-strong bg-card flex max-w-full min-w-0 items-baseline gap-1 rounded-full border px-2 py-0.5 text-xs`,"data-testid":`composition-reference`,"data-connection":e.connectionId,"data-to":e.to,"data-drawn":t.has(e.connectionId)||void 0,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,children:`→`}),(0,j.jsx)(`span`,{className:`sr-only`,children:`refers to `}),(0,j.jsx)(`span`,{className:`min-w-0 wrap-anywhere`,children:(0,j.jsx)(W0,{text:e.toLabel,mode:`math`})}),e.label&&(0,j.jsxs)(`span`,{className:`text-muted-foreground min-w-0 wrap-anywhere`,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,children:`· `}),(0,j.jsx)(`span`,{className:`sr-only`,children:`, as `}),(0,j.jsx)(W0,{text:e.label,mode:`math`})]})]},e.connectionId))})]})}function u4({block:e}){return e.type===`code`?(0,j.jsx)(a2,{code:{language:e.language,source:e.code},lines:[]}):e.type===`math`?(0,j.jsx)(`div`,{className:`min-w-0 text-sm`,"data-testid":`composition-math`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(j0,{source:e.source})})}):(0,j.jsx)(`p`,{className:`min-w-0 text-sm leading-snug`,"data-testid":`composition-text`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:e.text,mode:`math`})})})}function d4(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return f4(this.cover(t,n),t,n,e)}function f4(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,c=e._y0,l=e._x1,u=e._y1,d,f,p,m,h,g,_,v;if(!a)return e._root=o,e;for(;a.length;)if((h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f,i=a,!(a=a[_=g<<1|h]))return i[_]=o,e;if(p=+e._x.call(null,a.data),m=+e._y.call(null,a.data),t===p&&n===m)return o.next=a,i?i[_]=o:e._root=o,e;do i=i?i[_]=[,,,,]:e._root=[,,,,],(h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f;while((_=g<<1|h)==(v=(m>=f)<<1|p>=d));return i[v]=a,i[_]=o,e}function p4(e){var t,n,r=e.length,i,a,o=Array(r),s=Array(r),c=1/0,l=1/0,u=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,s[n]=a,i<c&&(c=i),i>u&&(u=i),a<l&&(l=a),a>d&&(d=a));if(c>u||l>d)return this;for(this.cover(c,l).cover(u,d),n=0;n<r;++n)f4(this,o[n],s[n],e[n]);return this}function m4(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,c,l;n>e||e>=i||r>t||t>=a;)switch(l=(t<r)<<1|e<n,c=[,,,,],c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function h4(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function g4(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function _4(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function v4(e,t,n){var r,i=this._x0,a=this._y0,o,s,c,l,u=this._x1,d=this._y1,f=[],p=this._root,m,h;for(p&&f.push(new _4(p,i,a,u,d)),n==null?n=1/0:(i=e-n,a=t-n,u=e+n,d=t+n,n*=n);m=f.pop();)if(!(!(p=m.node)||(o=m.x0)>u||(s=m.y0)>d||(c=m.x1)<i||(l=m.y1)<a)){if(p.length){var g=(o+c)/2,_=(s+l)/2;f.push(new _4(p[3],g,_,c,l),new _4(p[2],o,_,g,l),new _4(p[1],g,s,c,_),new _4(p[0],o,s,g,_)),(h=(t>=_)<<1|e>=g)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-h],f[f.length-1-h]=m)}else{var v=e-+this._x.call(null,p.data),y=t-+this._y.call(null,p.data),b=v*v+y*y;if(b<n){var x=Math.sqrt(n=b);i=e-x,a=t-x,u=e+x,d=t+x,r=p.data}}}return r}function y4(e){if(isNaN(u=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,d,f,p,m,h,g,_;if(!n)return this;if(n.length)for(;;){if((m=u>=(f=(o+c)/2))?o=f:c=f,(h=d>=(p=(s+l)/2))?s=p:l=p,t=n,!(n=n[g=h<<1|m]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,_=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[_]=n:this._root=n),this):(this._root=a,this)}function b4(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function x4(){return this._root}function S4(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function C4(e){var t=[],n,r=this._root,i,a,o,s,c;for(r&&t.push(new _4(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,s=n.x1,c=n.y1)&&r.length){var l=(a+s)/2,u=(o+c)/2;(i=r[3])&&t.push(new _4(i,l,u,s,c)),(i=r[2])&&t.push(new _4(i,a,u,l,c)),(i=r[1])&&t.push(new _4(i,l,o,s,u)),(i=r[0])&&t.push(new _4(i,a,o,l,u))}return this}function w4(e){var t=[],n=[],r;for(this._root&&t.push(new _4(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,c=r.x1,l=r.y1,u=(o+c)/2,d=(s+l)/2;(a=i[0])&&t.push(new _4(a,o,s,u,d)),(a=i[1])&&t.push(new _4(a,u,s,c,d)),(a=i[2])&&t.push(new _4(a,o,d,u,l)),(a=i[3])&&t.push(new _4(a,u,d,c,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function T4(e){return e[0]}function E4(e){return arguments.length?(this._x=e,this):this._x}function D4(e){return e[1]}function O4(e){return arguments.length?(this._y=e,this):this._y}function k4(e,t,n){var r=new A4(t??T4,n??D4,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function A4(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function j4(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var M4=k4.prototype=A4.prototype;M4.copy=function(){var e=new A4(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=j4(t),e;for(n=[{source:t,target:e._root=[,,,,]}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=[,,,,]}):t.target[i]=j4(r));return e},M4.add=d4,M4.addAll=p4,M4.cover=m4,M4.data=h4,M4.extent=g4,M4.find=v4,M4.remove=y4,M4.removeAll=b4,M4.root=x4,M4.size=S4,M4.visit=C4,M4.visitAfter=w4,M4.x=E4,M4.y=O4;function N4(e){return function(){return e}}function P4(e){return(e()-.5)*1e-6}function F4(e){return e.x+e.vx}function I4(e){return e.y+e.vy}function L4(e){var t,n,r,i=1,a=1;typeof e!=`function`&&(e=N4(e==null?1:+e));function o(){for(var e,o=t.length,c,l,u,d,f,p,m=0;m<a;++m)for(c=k4(t,F4,I4).visitAfter(s),e=0;e<o;++e)l=t[e],f=n[l.index],p=f*f,u=l.x+l.vx,d=l.y+l.vy,c.visit(h);function h(e,t,n,a,o){var s=e.data,c=e.r,m=f+c;if(s){if(s.index>l.index){var h=u-s.x-s.vx,g=d-s.y-s.vy,_=h*h+g*g;_<m*m&&(h===0&&(h=P4(r),_+=h*h),g===0&&(g=P4(r),_+=g*g),_=(m-(_=Math.sqrt(_)))/_*i,l.vx+=(h*=_)*(m=(c*=c)/(p+c)),l.vy+=(g*=_)*m,s.vx-=h*(m=1-m),s.vy-=g*m)}}else return t>u+m||a<u-m||n>d+m||o<d-m}}function s(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function c(){if(t){var r,i=t.length,a;for(n=Array(i),r=0;r<i;++r)a=t[r],n[a.index]=+e(a,r,t)}}return o.initialize=function(e,n){t=e,r=n,c()},o.iterations=function(e){return arguments.length?(a=+e,o):a},o.strength=function(e){return arguments.length?(i=+e,o):i},o.radius=function(t){return arguments.length?(e=typeof t==`function`?t:N4(+t),c(),o):e},o}function R4(e){return e.index}function z4(e,t){var n=e.get(t);if(!n)throw Error(`node not found: `+t);return n}function B4(e){var t=R4,n=d,r,i=N4(30),a,o,s,c,l,u=1;e??=[];function d(e){return 1/Math.min(s[e.source.index],s[e.target.index])}function f(t){for(var n=0,i=e.length;n<u;++n)for(var o=0,s,d,f,p,m,h,g;o<i;++o)s=e[o],d=s.source,f=s.target,p=f.x+f.vx-d.x-d.vx||P4(l),m=f.y+f.vy-d.y-d.vy||P4(l),h=Math.sqrt(p*p+m*m),h=(h-a[o])/h*t*r[o],p*=h,m*=h,f.vx-=p*(g=c[o]),f.vy-=m*g,d.vx+=p*(g=1-g),d.vy+=m*g}function p(){if(o){var n,i=o.length,l=e.length,u=new Map(o.map((e,n)=>[t(e,n,o),e])),d;for(n=0,s=Array(i);n<l;++n)d=e[n],d.index=n,typeof d.source!=`object`&&(d.source=z4(u,d.source)),typeof d.target!=`object`&&(d.target=z4(u,d.target)),s[d.source.index]=(s[d.source.index]||0)+1,s[d.target.index]=(s[d.target.index]||0)+1;for(n=0,c=Array(l);n<l;++n)d=e[n],c[n]=s[d.source.index]/(s[d.source.index]+s[d.target.index]);r=Array(l),m(),a=Array(l),h()}}function m(){if(o)for(var t=0,i=e.length;t<i;++t)r[t]=+n(e[t],t,e)}function h(){if(o)for(var t=0,n=e.length;t<n;++t)a[t]=+i(e[t],t,e)}return f.initialize=function(e,t){o=e,l=t,p()},f.links=function(t){return arguments.length?(e=t,p(),f):e},f.id=function(e){return arguments.length?(t=e,f):t},f.iterations=function(e){return arguments.length?(u=+e,f):u},f.strength=function(e){return arguments.length?(n=typeof e==`function`?e:N4(+e),m(),f):n},f.distance=function(e){return arguments.length?(i=typeof e==`function`?e:N4(+e),h(),f):i},f}var V4={value:()=>{}};function H4(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new U4(n)}function U4(e){this._=e}function W4(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}U4.prototype=H4.prototype={constructor:U4,on:function(e,t){var n=this._,r=W4(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=G4(n[i],e.name)))return i}else{if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=K4(n[i],e.name,t);else if(t==null)for(i in n)n[i]=K4(n[i],e.name,null);return this}},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new U4(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function G4(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function K4(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=V4,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var q4=0,J4=0,Y4=0,X4=1e3,Z4,Q4,$4=0,e3=0,t3=0,n3=typeof performance==`object`&&performance.now?performance:Date,r3=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function i3(){return e3||=(r3(a3),n3.now()+t3)}function a3(){e3=0}function o3(){this._call=this._time=this._next=null}o3.prototype=s3.prototype={constructor:o3,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?i3():+n)+(t==null?0:+t),!this._next&&Q4!==this&&(Q4?Q4._next=this:Z4=this,Q4=this),this._call=e,this._time=n,f3()},stop:function(){this._call&&(this._call=null,this._time=1/0,f3())}};function s3(e,t,n){var r=new o3;return r.restart(e,t,n),r}function c3(){i3(),++q4;for(var e=Z4,t;e;)(t=e3-e._time)>=0&&e._call.call(void 0,t),e=e._next;--q4}function l3(){e3=($4=n3.now())+t3,q4=J4=0;try{c3()}finally{q4=0,d3(),e3=0}}function u3(){var e=n3.now(),t=e-$4;t>X4&&(t3-=t,$4=e)}function d3(){for(var e,t=Z4,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Z4=n);Q4=e,f3(r)}function f3(e){q4||(J4&&=clearTimeout(J4),e-e3>24?(e<1/0&&(J4=setTimeout(l3,e-n3.now()-t3)),Y4&&=clearInterval(Y4)):(Y4||=($4=n3.now(),setInterval(u3,X4)),q4=1,r3(l3)))}var p3=1664525,m3=1013904223,h3=4294967296;function g3(){let e=1;return()=>(e=(p3*e+m3)%h3)/h3}function _3(e){return e.x}function v3(e){return e.y}var y3=10,b3=Math.PI*(3-Math.sqrt(5));function x3(e){var t,n=1,r=.001,i=1-r**(1/300),a=0,o=.6,s=new Map,c=s3(d),l=H4(`tick`,`end`),u=g3();e??=[];function d(){f(),l.call(`tick`,t),n<r&&(c.stop(),l.call(`end`,t))}function f(r){var c,l=e.length,u;r===void 0&&(r=1);for(var d=0;d<r;++d)for(n+=(a-n)*i,s.forEach(function(e){e(n)}),c=0;c<l;++c)u=e[c],u.fx==null?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),u.fy==null?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return t}function p(){for(var t=0,n=e.length,r;t<n;++t){if(r=e[t],r.index=t,r.fx!=null&&(r.x=r.fx),r.fy!=null&&(r.y=r.fy),isNaN(r.x)||isNaN(r.y)){var i=y3*Math.sqrt(.5+t),a=t*b3;r.x=i*Math.cos(a),r.y=i*Math.sin(a)}(isNaN(r.vx)||isNaN(r.vy))&&(r.vx=r.vy=0)}}function m(t){return t.initialize&&t.initialize(e,u),t}return p(),t={tick:f,restart:function(){return c.restart(d),t},stop:function(){return c.stop(),t},nodes:function(n){return arguments.length?(e=n,p(),s.forEach(m),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(i=+e,t):+i},alphaTarget:function(e){return arguments.length?(a=+e,t):a},velocityDecay:function(e){return arguments.length?(o=1-e,t):1-o},randomSource:function(e){return arguments.length?(u=e,s.forEach(m),t):u},force:function(e,n){return arguments.length>1?(n==null?s.delete(e):s.set(e,m(n)),t):s.get(e)},find:function(t,n,r){var i=0,a=e.length,o,s,c,l,u;for(r==null?r=1/0:r*=r,i=0;i<a;++i)l=e[i],o=t-l.x,s=n-l.y,c=o*o+s*s,c<r&&(u=l,r=c);return u},on:function(e,n){return arguments.length>1?(l.on(e,n),t):l.on(e)}}}function S3(){var e,t,n,r,i=N4(-30),a,o=1,s=1/0,c=.81;function l(n){var i,a=e.length,o=k4(e,_3,v3).visitAfter(d);for(r=n,i=0;i<a;++i)t=e[i],o.visit(f)}function u(){if(e){var t,n=e.length,r;for(a=Array(n),t=0;t<n;++t)r=e[t],a[r.index]=+i(r,t,e)}}function d(e){var t=0,n,r,i=0,o,s,c;if(e.length){for(o=s=c=0;c<4;++c)(n=e[c])&&(r=Math.abs(n.value))&&(t+=n.value,i+=r,o+=r*n.x,s+=r*n.y);e.x=o/i,e.y=s/i}else{n=e,n.x=n.data.x,n.y=n.data.y;do t+=a[n.data.index];while(n=n.next)}e.value=t}function f(e,i,l,u){if(!e.value)return!0;var d=e.x-t.x,f=e.y-t.y,p=u-i,m=d*d+f*f;if(p*p/c<m)return m<s&&(d===0&&(d=P4(n),m+=d*d),f===0&&(f=P4(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)),t.vx+=d*e.value*r/m,t.vy+=f*e.value*r/m),!0;if(!(e.length||m>=s)){(e.data!==t||e.next)&&(d===0&&(d=P4(n),m+=d*d),f===0&&(f=P4(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)));do e.data!==t&&(p=a[e.data.index]*r/m,t.vx+=d*p,t.vy+=f*p);while(e=e.next)}}return l.initialize=function(t,r){e=t,n=r,u()},l.strength=function(e){return arguments.length?(i=typeof e==`function`?e:N4(+e),u(),l):i},l.distanceMin=function(e){return arguments.length?(o=e*e,l):Math.sqrt(o)},l.distanceMax=function(e){return arguments.length?(s=e*e,l):Math.sqrt(s)},l.theta=function(e){return arguments.length?(c=e*e,l):Math.sqrt(c)},l}function C3(e){var t=N4(.1),n,r,i;typeof e!=`function`&&(e=N4(e==null?0:+e));function a(e){for(var t=0,a=n.length,o;t<a;++t)o=n[t],o.vx+=(i[t]-o.x)*r[t]*e}function o(){if(n){var a,o=n.length;for(r=Array(o),i=Array(o),a=0;a<o;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return a.initialize=function(e){n=e,o()},a.strength=function(e){return arguments.length?(t=typeof e==`function`?e:N4(+e),o(),a):t},a.x=function(t){return arguments.length?(e=typeof t==`function`?t:N4(+t),o(),a):e},a}function w3(e){var t=N4(.1),n,r,i;typeof e!=`function`&&(e=N4(e==null?0:+e));function a(e){for(var t=0,a=n.length,o;t<a;++t)o=n[t],o.vy+=(i[t]-o.y)*r[t]*e}function o(){if(n){var a,o=n.length;for(r=Array(o),i=Array(o),a=0;a<o;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return a.initialize=function(e){n=e,o()},a.strength=function(e){return arguments.length?(t=typeof e==`function`?e:N4(+e),o(),a):t},a.y=function(t){return arguments.length?(e=typeof t==`function`?t:N4(+t),o(),a):e},a}function T3(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function E3(){return this.eachAfter(T3)}function D3(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function O3(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function k3(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function A3(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function j3(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function M3(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function N3(e){for(var t=this,n=P3(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function P3(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function F3(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function I3(){return Array.from(this)}function L3(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function R3(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*z3(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function B3(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=U3)):t===void 0&&(t=H3);for(var n=new K3(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new K3(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(G3)}function V3(){return B3(this).eachBefore(W3)}function H3(e){return e.children}function U3(e){return Array.isArray(e)?e[1]:null}function W3(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function G3(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function K3(e){this.data=e,this.depth=this.height=0,this.parent=null}K3.prototype=B3.prototype={constructor:K3,count:E3,each:D3,eachAfter:k3,eachBefore:O3,find:A3,sum:j3,sort:M3,path:N3,ancestors:F3,descendants:I3,leaves:L3,links:R3,copy:V3,[Symbol.iterator]:z3};function q3(e,t){return e.parent===t.parent?1:2}function J3(e){var t=e.children;return t?t[0]:e.t}function Y3(e){var t=e.children;return t?t[t.length-1]:e.t}function X3(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Z3(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function Q3(e,t,n){return e.a.parent===t.parent?e.a:n}function $3(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}$3.prototype=Object.create(K3.prototype);function e6(e){for(var t=new $3(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new $3(a[o],o)),i.parent=n;return(t.parent=new $3(null,0)).children=[t],t}function t6(){var e=q3,t=1,n=1,r=null;function i(i){var s=e6(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){Z3(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=Y3(o),i=J3(i),o&&i;)s=J3(s),a=Y3(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(X3(Q3(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!Y3(a)&&(a.t=o,a.m+=u-l),i&&!J3(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}var n6=7.8,r6=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\u3000-\u303F\uFF01-\uFF60]/gu,i6=30,a6=18,o6=72,s6=18,c6=30,l6=1500,u6=15,d6=28,f6=34,p6=30,m6=16,h6=.6,g6=9,_6=4.5,v6=8,y6=18,b6=4,x6=[.5,.4,.6,.3,.7,.22,.78],S6=6,C6=150;function w6(e){let t=e=>e.length*n6+(e.match(r6)?.length??0)*5.2,n=0,r=0;for(let i of e.matchAll(/\$([^$]+)\$/g)){n+=t(e.slice(r,i.index));let a=i[1].replace(/\\(?:text|mathrm|mathbf|mathbb|mathit)\b/g,``).replace(/\\[a-zA-Z]+|\\[^a-zA-Z]/g,`x`).replace(/[_^{}\s]/g,``);n+=Math.min(a.length,12)*13*1.1+4,r=i.index+i[0].length}return n+t(e.slice(r))}var T6=e=>e.weight===void 0?e.label:String(e.weight),E6=e=>(e?w6(e):0)+8;function D6(e,t){let n=Math.max(...[...e.values()].map(e=>e.width)),r=B3(t.root,e=>t.children.get(e));t6().nodeSize([n+s6,o6]).separation(()=>1)(r),r.each(t=>Object.assign(e.get(t.data),{x:t.x,y:t.y}))}function O6(e,t,n){let r=new Map(e.edges.map(e=>[e.to,e.side])),i=Math.max(...[...t.values()].map(e=>e.width)),a=Math.max(0,...e.edges.map(e=>E6(T6(e)))),o=Math.max((i+s6)/2,a+b6),s=new Map,c=(e,i,a)=>{let l=n.children.get(e),u=t.get(e),d;if(l.some(e=>r.get(e))){let t=l.find(e=>r.get(e)===`left`),n=l.find(e=>r.get(e)===`right`),o=t===void 0?a:c(t,i+1,a);s.set(e,o),d=n===void 0?o+1:c(n,i+1,o+1)}else{d=l.reduce((e,t,n)=>c(t,i+1,e+ +(n>0)),a);let t=l[0],n=l.at(-1);s.set(e,t===void 0||n===void 0?a:(s.get(t)+s.get(n))/2),d=Math.max(d,a+1)}return Object.assign(u,{x:s.get(e)*o,y:i*o6}),d};c(n.root,0,0)}var k6=e=>t=>{let n=l6*Math.min(1,u6/e.length);for(let r=0;r<e.length;r++){let i=e[r];for(let a=r+1;a<e.length;a++){let r=e[a],o=r.x-i.x,s=r.y-i.y,c=o*o+s*s||1,l=i.radius+r.radius+d6,u=n*t/c+(c<l*l?(l/Math.sqrt(c)-1)*.25:0);i.vx-=o*u,i.vy-=s*u,r.vx+=o*u,r.vy+=s*u}}};function A6(e,t){let n=e.nodes.map(({id:e})=>({id:e,radius:t.get(e).width/2})),r=new Map;for(let{from:t,to:n}of e.edges)t!==n&&r.set(JSON.stringify([t,n].sort()),{source:t,target:n});let i=new Map(n.map(e=>[e.id,e])),a=[...r.values()].map(({source:e,target:t})=>[i.get(e),i.get(t)]),o=()=>{for(let[e,t]of a){let r=t.x-e.x,i=t.y-e.y,a=r*r+i*i||1;for(let o of n){if(o===e||o===t)continue;let n=Math.max(0,Math.min(1,((o.x-e.x)*r+(o.y-e.y)*i)/a)),s=o.x-e.x-n*r,c=o.y-e.y-n*i,l=Math.hypot(s,c),u=Math.max(0,o.radius+12-l)*.5;if(u===0)continue;let d=l>.001?s/l:-i/(Math.hypot(r,i)||1),f=l>.001?c/l:r/(Math.hypot(r,i)||1);o.vx+=d*u,o.vy+=f*u,e.vx-=d*u*(1-n),e.vy-=f*u*(1-n),t.vx-=d*u*n,t.vy-=f*u*n}}},s=B4([...r.values()]).id(e=>e.id).distance(e=>c6+e.source.radius+e.target.radius);x3(n).stop().alphaDecay(1-.001**(1/C6)).force(`link`,s).force(`repel`,k6(n)).force(`edgeClearance`,o).force(`x`,C3().strength(.05)).force(`y`,w3().strength(.05)).tick(C6);for(let e of n)Object.assign(t.get(e.id),{x:e.x,y:e.y})}function j6(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=Math.max(0,Math.min(1,((e.x-t.x)*r+(e.y-t.y)*i)/(r*r+i*i||1)));return Math.hypot(e.x-t.x-a*r,e.y-t.y-a*i)}function M6(e,t,n){let r=new Map,i=(e,t)=>JSON.stringify([e,t].sort());for(let t of e.edges)r.set(i(t.from,t.to),(r.get(i(t.from,t.to))??0)+1);let a=()=>{let n=1;for(let a of e.edges){let o=t.get(a.from),s=t.get(a.to),c=r.get(i(a.from,a.to));for(let[r,i]of t){if(r===a.from||r===a.to)continue;let t=a.from===a.to?Math.hypot(i.x-o.x,i.y-o.y):j6(i,o,s),l=(a.from===a.to?o.width/2+p6+(c-1)*m6:(c-1)*f6/2)+(e.directed?_6:0);n=Math.max(n,(i.width/2+6.1+l)/Math.max(t,1e-4))}}return n},o=a();if(!n&&o>3){let n=Math.max(80,...[...t.values()].map(e=>e.width))*t.size/Math.PI;e.nodes.forEach(({id:e},r)=>{let i=2*Math.PI*r/t.size-Math.PI/2;Object.assign(t.get(e),{x:Math.cos(i)*n,y:Math.sin(i)*n})}),o=a()}if(o>1)for(let e of t.values())e.x*=o,e.y*=o;if(!n&&o>1){let e=[...t.values()],n=1/0,r=0;for(let t=0;t<36;t++){let i=t*Math.PI/36,a=e.map(e=>e.x*Math.cos(i)-e.y*Math.sin(i)),o=Math.max(...a.map((t,n)=>t+e[n].width/2))-Math.min(...a.map((t,n)=>t-e[n].width/2));o<n-.01&&(n=o,r=i)}for(let t of e){let{x:e,y:n}=t;t.x=e*Math.cos(r)-n*Math.sin(r),t.y=e*Math.sin(r)+n*Math.cos(r)}}}function N6(e,t){let n=e.height/2,r=Math.max(Math.abs(t.x-e.x)-(e.width/2-n),0),i=t.y-e.y;return r*r+i*i<=n*n}function P6(e,t,n){for(let r=0;r<14;r++){let r=(e+t)/2;n(r)?e=r:t=r}return e}var F6=(e,t,n)=>e+(t-e)*n,I6=(e,t,n)=>({x:F6(e.x,t.x,n),y:F6(e.y,t.y,n)}),L6=(e,t,n)=>r=>I6(I6(e,t,r),I6(t,n,r),r),R6=(e,t,n,r)=>i=>I6(L6(e,t,n)(i),L6(t,n,r)(i),i);function z6(e,t,n,r,i){let a=N6(t,e(.5))?.5:P6(0,.5,n=>N6(t,e(n))),o=N6(n,e(.5))?.5:P6(1,.5,t=>N6(n,e(t))),s=e(o),c=i?P6(o,a,t=>Math.hypot(e(t).x-s.x,e(t).y-s.y)<g6):o,l=Array.from({length:r+1},(t,n)=>e(F6(a,c,n/r)));if(!i)return{points:l};let u=e(c),d=Math.hypot(s.x-u.x,s.y-u.y)||1,f={x:(u.y-s.y)/d*_6,y:(s.x-u.x)/d*_6};return{points:l,arrow:[s,{x:u.x+f.x,y:u.y+f.y},{x:u.x-f.x,y:u.y-f.y}]}}function B6(e,t,n){return P6(0,e.width+e.height,r=>N6(e,{x:e.x+t*r,y:e.y+n*r}))}var V6=(e,t)=>Math.abs(e.x-t.x)<(e.width+t.width)/2&&Math.abs(e.y-t.y)<(e.height+t.height)/2,H6=e=>Math.round(e*100)/100,U6=(e,t)=>e.map(e=>`${H6(e.x+t.x)},${H6(e.y+t.y)}`);function W6(e){let t=new Map(e.nodes.map(e=>[e.id,{x:0,y:0,width:Math.max(i6,w6(e.label??e.id)+a6),height:i6}])),n=e.kind===`tree`?pA(e):void 0;n?e.edges.some(e=>e.side)?O6(e,t,n):D6(t,n):A6(e,t),M6(e,t,!!n);let r=[...t.values()],i={x:r.reduce((e,t)=>e+t.x,0)/r.length,y:r.reduce((e,t)=>e+t.y,0)/r.length},a=new Map(e.nodes.map((e,t)=>[e.id,t])),o=(e,t)=>a.get(e)<=a.get(t)?`${a.get(e)}:${a.get(t)}`:`${a.get(t)}:${a.get(e)}`,s=new Map;for(let{from:t,to:n}of e.edges)s.set(o(t,n),(s.get(o(t,n))??0)+1);let c=new Map,l=e.edges.map(n=>{let r=o(n.from,n.to),l=c.get(r)??0;c.set(r,l+1);let u=t.get(n.from),d=t.get(n.to);if(n.from===n.to){let t=Math.hypot(u.x-i.x,u.y-i.y)>1?Math.atan2(u.y-i.y,u.x-i.x):-Math.PI/2,n=(B6(u,Math.cos(t),Math.sin(t))+p6+l*m6)/(.75*Math.cos(h6)),r=e=>({x:u.x+Math.cos(e)*n,y:u.y+Math.sin(e)*n}),a=R6(u,r(t-h6),r(t+h6),u);return{...z6(a,u,u,24,e.directed),curve:a}}let f=s.get(r),[p,m]=a.get(n.from)<=a.get(n.to)?[u,d]:[d,u],h=Math.hypot(m.x-p.x,m.y-p.y)||1,g=(l-(f-1)/2)*f6*2,_=I6(u,d,.5),v=L6(u,{x:_.x+(p.y-m.y)/h*g,y:_.y+(m.x-p.x)/h*g},d);return{...z6(v,u,d,f>1?16:1,e.directed),curve:v}}),u=[...r],d=l.map((t,n)=>{let r=T6(e.edges[n]),i={width:E6(r),height:y6},a=x6.map(e=>({...t.curve(e),...i}));if(!r)return a[0];let o=a.map(e=>u.filter(t=>V6(t,e)).length),s=a[o.indexOf(Math.min(...o))],c=Array.from({length:S6},(e,t)=>t+1).flatMap(e=>{let[t,n]=[e*(i.height+b6),e*(i.width+b6)];return[{...a[0],y:a[0].y-t},{...a[0],y:a[0].y+t},{...a[0],x:a[0].x-n},{...a[0],x:a[0].x+n}]}),l=Math.min(...o)===0||e.edges[n].weight!==void 0?s:c.find(e=>!u.some(t=>V6(t,e)))??s;return u.push(l),l}),f=[...r,...d.filter((t,n)=>T6(e.edges[n]))];for(let e of l)f.push(...e.points.map(e=>({...e,width:0,height:0})));let p=Math.min(...f.map(e=>e.x-e.width/2))-v6,m=Math.min(...f.map(e=>e.y-e.height/2))-v6,h=Math.max(...f.map(e=>e.x+e.width/2))+v6,g=Math.max(...f.map(e=>e.y+e.height/2))+v6,_={x:-p,y:-m};return{mode:n?`tree`:`general`,width:Math.ceil(h-p),height:Math.ceil(g-m),nodes:e.nodes.map(({id:e})=>{let n=t.get(e);return{id:e,x:H6(n.x+_.x),y:H6(n.y+_.y),width:n.width,height:n.height}}),edges:l.map((e,t)=>({path:`M${U6(e.points,_).join(`L`)}`,...e.arrow?{arrow:U6(e.arrow,_).join(` `)}:{},label:{x:H6(d[t].x+_.x),y:H6(d[t].y+_.y),width:d[t].width,height:d[t].height}}))}}var G6=11/13,K6={x:2,y:4},q6=.5,J6=e=>`${e/13}em`,Y6={active:`border-foreground border-[3px] bg-muted font-semibold`,done:`border-success border-2 bg-[color-mix(in_oklab,var(--success)_15%,var(--card))]`,muted:`border-muted-foreground/50 bg-muted text-muted-foreground border-dashed`},X6={active:{stroke:`stroke-foreground`,fill:`fill-foreground`,width:3.5},done:{stroke:`stroke-success`,fill:`fill-success`,width:2.5},muted:{stroke:`stroke-muted-foreground/50`,fill:`fill-muted-foreground/50`,width:1.25,dash:`4 4`}},Z6={active:`font-semibold`,done:`text-success`,muted:`text-muted-foreground`},Q6={active:`active`,done:`done`,muted:`ruled out`};function $6(e,t){let n=e.steps?.[t],r=fA(e),i=new Map;for(let e of n?.nodeStates??[])i.set(e.id,e.tone??`active`);let a=new Map;for(let e of n?.edgeStates??[]){let t=r(e);`index`in t&&a.set(t.index,e.tone??`active`)}return{explanation:n?.explanation??``,nodes:i,edges:a,variables:n?.variables??[]}}function e8({labelKey:e,width:t,height:n,truncated:r,children:i}){return(0,j.jsxs)(`span`,{className:`relative block overflow-hidden`,style:{width:J6(t),height:J6(n)},"data-label-clip":e,"data-truncated":r?`true`:void 0,children:[(0,j.jsx)(`span`,{className:A(`grid size-full items-center`,r?`justify-items-start mask-r-from-[calc(100%-1.4em)] mask-r-to-[calc(100%-0.8em)]`:`justify-items-center`),children:(0,j.jsx)(`span`,{className:`w-max whitespace-nowrap`,"data-label-content":!0,children:i})}),r&&(0,j.jsx)(`span`,{className:`absolute inset-y-0 right-0 grid place-items-center`,"data-testid":`graph-label-cut`,children:`…`})]})}function t8({view:e}){let{spec:t}=e,n=t.steps??[],r=X0(n.length),i=JSON.stringify([t.directed,t.kind,t.nodes,t.edges]),a=(0,v.useMemo)(()=>W6(t),[i]),o=(0,v.useRef)(null);(0,v.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=a.mode===`tree`?a.nodes.reduce((e,t)=>t.y<e.y?t:e):void 0;e.scrollLeft=t?t.x*e.scrollWidth/a.width-e.clientWidth/2:(e.scrollWidth-e.clientWidth)/2,e.scrollTop=t?0:(e.scrollHeight-e.clientHeight)/2},[a]);let[s,c]=(0,v.useState)(!1);(0,v.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=()=>c(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[a]);let l=(0,v.useRef)(null),[u,d]=(0,v.useState)(new Set);(0,v.useLayoutEffect)(()=>{let e=()=>{let e=[...l.current?.querySelectorAll(`[data-label-clip]`)??[]].filter(e=>{let t=e.getBoundingClientRect(),n=e.querySelector(`[data-label-content]`),r=[...n.querySelectorAll(`.katex-html .strut`)].map(e=>e.getBoundingClientRect().height),i=r.length>0?Math.max(...r):n.getBoundingClientRect().height;return n.getBoundingClientRect().width>t.width+q6||i>t.height+q6}).map(e=>e.dataset.labelClip);d(t=>t.size===e.length&&e.every(e=>t.has(e))?t:new Set(e))};e();let t=!0;document.fonts.ready.then(()=>{t&&e()}),document.fonts.addEventListener?.(`loadingdone`,e);let n=typeof ResizeObserver>`u`?void 0:new ResizeObserver(e);return l.current&&n?.observe(l.current),()=>{t=!1,document.fonts.removeEventListener?.(`loadingdone`,e),n?.disconnect()}},[i]);let f=new Map(t.nodes.flatMap((e,t)=>u.has(`n-${e.id}`)?[[e.id,`[${t+1}]`]]:[])),p=e=>{o.current?.contains(e.target)||r.onKeyDown(e)},m=$6(t,r.index),h=n.length>0,g=(e,t)=>`${e/t*100}%`,_=(0,v.useId)(),y=(0,v.useId)();return(0,j.jsxs)(e2,{role:`region`,"aria-labelledby":`${_} ${y}`,tabIndex:h?0:void 0,onKeyDown:h?p:void 0,children:[(0,j.jsx)(t2,{kind:t.directed?`Directed graph`:`Graph`,kindId:y,children:(0,j.jsx)(n2,{id:_,text:t.title})}),(0,j.jsxs)(r2,{children:[(0,j.jsx)(o8,{spec:t}),(0,j.jsx)(`div`,{ref:o,className:`focus-visible:ring-ring/50 max-h-[36rem] overflow-auto rounded-sm outline-none focus-visible:ring-[3px]`,"data-testid":`graph-scroll`,...s?{tabIndex:0,role:`group`,"aria-label":`Scrollable graph drawing`}:{},children:(0,j.jsxs)(`div`,{ref:l,className:`@container relative mx-auto w-full`,style:{maxWidth:a.width,minWidth:a.width*G6,aspectRatio:`${a.width} / ${a.height}`},"aria-hidden":`true`,"data-testid":`graph-canvas`,"data-layout":a.mode,children:[(0,j.jsx)(`svg`,{viewBox:`0 0 ${a.width} ${a.height}`,className:`absolute inset-0 size-full`,fill:`none`,children:a.edges.map((e,t)=>{let n=m.edges.get(t),r=n?X6[n]:{stroke:`stroke-muted-foreground`,fill:`fill-muted-foreground`,width:1.5,dash:void 0};return(0,j.jsxs)(`g`,{"data-testid":`graph-edge`,"data-tone":n,children:[(0,j.jsx)(`path`,{d:e.path,className:r.stroke,strokeWidth:r.width,strokeDasharray:r.dash,strokeLinecap:`round`}),e.arrow&&(0,j.jsx)(`polygon`,{points:e.arrow,className:r.fill,"data-testid":`graph-arrow`})]},t)})}),(0,j.jsxs)(`div`,{className:`absolute inset-0 font-mono leading-none`,style:{fontSize:`calc(13 * 100cqw / ${a.width})`},children:[t.edges.map((e,t)=>{let n=T6(e),r=a.edges[t].label,i=m.edges.get(t);return n===void 0?null:(0,j.jsx)(`span`,{className:A(`bg-card absolute -translate-x-1/2 -translate-y-1/2 rounded-sm [&_.katex]:text-[1.1em]!`,i&&Z6[i]),style:{left:g(r.x,a.width),top:g(r.y,a.height)},"data-testid":`graph-edge-label`,children:(0,j.jsx)(e8,{labelKey:`e-${t}`,width:r.width,height:r.height,truncated:u.has(`e-${t}`),children:e.weight===void 0?(0,j.jsx)(W0,{text:n,mode:`math`}):n})},t)}),a.nodes.map((e,n)=>{let r=m.nodes.get(e.id);return(0,j.jsxs)(`div`,{className:A(`absolute grid -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full border`,r?Y6[r]:`border-muted-foreground bg-card`),style:{left:g(e.x,a.width),top:g(e.y,a.height),width:g(e.width,a.width),height:g(e.height,a.height)},"data-testid":`graph-node`,"data-node":e.id,"data-tone":r,children:[(0,j.jsx)(e8,{labelKey:`n-${e.id}`,width:e.width-K6.x,height:e.height-K6.y,truncated:u.has(`n-${e.id}`),children:(0,j.jsx)(`span`,{className:f.has(e.id)?`invisible`:void 0,children:(0,j.jsx)(W0,{text:t.nodes[n].label??e.id,mode:`math`})})}),f.has(e.id)&&(0,j.jsx)(`span`,{className:`bg-card absolute rounded-sm px-1`,"data-node-key":f.get(e.id),children:f.get(e.id)}),r===`done`&&(0,j.jsx)(`span`,{className:`bg-success text-card absolute -top-[0.35em] -right-[0.35em] grid size-[1.05em] place-items-center rounded-full`,children:(0,j.jsx)(dh,{className:`size-[0.8em]`,strokeWidth:3.5})})]},e.id)})]})]})}),(0,j.jsx)(n8,{spec:t,truncated:u,nodeKeys:f}),m.variables.length>0&&(0,j.jsx)(`dl`,{className:`flex flex-wrap gap-2`,"aria-hidden":h?!0:void 0,children:m.variables.map((e,t)=>(0,j.jsxs)(`div`,{className:`border-border-strong bg-card flex max-w-full min-w-0 gap-1.5 rounded-md border px-2 py-0.5 font-mono text-xs wrap-anywhere`,children:[(0,j.jsx)(`dt`,{className:`min-w-0`,children:e.name}),(0,j.jsxs)(`dd`,{className:`min-w-0`,children:[`= `,String(e.value)]})]},t))}),h&&(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(a8,{spec:t,state:m,step:r.index+1,of:n.length})})]}),h&&(0,j.jsx)($0,{stepper:r,play:!0})]})}function n8({spec:e,truncated:t,nodeKeys:n}){if(t.size===0)return null;let r=e.directed?`→`:`–`;return(0,j.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,"data-testid":`graph-overflow`,children:[(0,j.jsx)(`p`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:`… Cut short in the drawing:`}),e.nodes.map(r=>t.has(`n-${r.id}`)?(0,j.jsxs)(Q0,{children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[`Node `,n.get(r.id),`:`]}),` `,(0,j.jsx)(r8,{spec:e,id:r.id})]},r.id):null),e.edges.map((i,a)=>t.has(`e-${a}`)?(0,j.jsxs)(Q0,{children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[`Edge `,n.get(i.from)??(0,j.jsx)(r8,{spec:e,id:i.from}),` `,r,` `,n.get(i.to)??(0,j.jsx)(r8,{spec:e,id:i.to}),`:`]}),` `,i.weight===void 0?(0,j.jsx)(W0,{text:i.label,mode:`math`}):i.weight]},a):null)]})}function r8({spec:e,id:t}){return(0,j.jsx)(W0,{text:e.nodes.find(e=>e.id===t)?.label??t,mode:`math`})}function i8({spec:e,index:t}){let n=e.edges[t];return(0,j.jsxs)(j.Fragment,{children:[n.from===n.to?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(r8,{spec:e,id:n.from}),` to itself`]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(r8,{spec:e,id:n.from}),` `,e.directed?`to`:`and`,` `,(0,j.jsx)(r8,{spec:e,id:n.to})]}),n.side&&`, ${n.side} child`,n.weight!==void 0&&`, weight ${n.weight}`,n.label!==void 0&&(0,j.jsxs)(j.Fragment,{children:[`, labelled `,(0,j.jsx)(W0,{text:n.label,mode:`math`})]})]})}function a8({spec:e,state:t,step:n,of:r}){return(0,j.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`graph-status`,children:[(0,j.jsxs)(`p`,{className:`sr-only`,children:[`Step `,n,` of `,r,`.`]}),(0,j.jsx)(`div`,{"data-testid":`graph-explanation`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:t.explanation,mode:`math`})})}),(0,j.jsxs)(`ul`,{className:`sr-only`,children:[[...t.nodes].map(([t,n])=>(0,j.jsxs)(`li`,{children:[`Node `,(0,j.jsx)(r8,{spec:e,id:t}),` is `,Q6[n],`.`]},`n-${t}`)),[...t.edges].map(([t,n])=>(0,j.jsxs)(`li`,{children:[`Edge `,(0,j.jsx)(i8,{spec:e,index:t}),` is `,Q6[n],`.`]},`e-${t}`)),t.variables.map((e,t)=>(0,j.jsxs)(`li`,{children:[e.name,` = `,String(e.value),`.`]},`v-${t}`))]})]})}function o8({spec:e}){let t=e.nodes.length,n=e.edges.length;return(0,j.jsxs)(`ul`,{className:`sr-only`,"data-testid":`graph-description`,children:[(0,j.jsxs)(`li`,{children:[e.directed?`Directed`:`Undirected`,` graph with `,t,` `,t===1?`node`:`nodes`,` and `,n,` `,n===1?`edge`:`edges`,`.`]}),(0,j.jsxs)(`li`,{children:[`Nodes:`,` `,e.nodes.map((t,n)=>(0,j.jsxs)(`span`,{children:[n>0&&`, `,(0,j.jsx)(r8,{spec:e,id:t.id})]},t.id))]}),e.edges.map((t,n)=>(0,j.jsxs)(`li`,{children:[`Edge: `,(0,j.jsx)(i8,{spec:e,index:n})]},`e-${n}`))]})}function s8({view:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let{spec:i,latestAttempt:a}=e,[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(),f=(0,v.useId)(),p=a!==void 0,m=p||t||c,h=a?.grade.result===`answered`&&`text`in a.answer?a.answer.text:void 0,g=async t=>{if(m)return;l(!0),d(void 0);let i=await MM(e.id,t);if(i.ok)return l(!1),n(i.view);d(i.error);try{await r()}catch{}finally{l(!1)}},_=o.trim();return(0,j.jsxs)(e2,{role:`region`,"aria-label":`Anything else to add`,children:[(0,j.jsx)(t2,{kind:`Placement`,aside:`Optional`}),(0,j.jsxs)(r2,{className:`gap-4`,children:[(0,j.jsx)(`label`,{htmlFor:f,className:`font-heading text-[1.2rem] leading-snug font-medium text-pretty`,children:(0,j.jsx)(W0,{text:i.question,mode:`math`})}),p?h===void 0?(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm font-medium`,children:`Skipped.`}):(0,j.jsx)(`p`,{className:`bg-sunken rounded-md px-3 py-2 text-sm whitespace-pre-wrap wrap-anywhere`,children:h}):(0,j.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),_&&g({text:_})},children:[(0,j.jsx)(h2,{id:f,value:o,maxLength:Hk,rows:3,placeholder:`For example: I know the basics, but I want to go deep on one part of it.`,"aria-describedby":`${f}-help`,disabled:m,onChange:e=>s(e.target.value)}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(M,{type:`submit`,size:`sm`,disabled:m||!_,children:`Send`}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground`,disabled:m,onClick:()=>void g({skipped:!0}),children:`Skip`}),(0,j.jsxs)(`span`,{id:`${f}-help`,className:`text-muted-foreground ml-auto text-xs`,children:[`Fine to leave blank · `,o.length,`/`,Hk]})]})]}),(0,j.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-1 text-sm`,children:[!p&&t&&(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Answer once the reply finishes.`}),u&&(0,j.jsx)(`p`,{className:`text-destructive`,children:u})]})]})]})}function c8({view:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let{spec:i,latestAttempt:a}=e,[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)(),u=a!==void 0,d=u||t||o!==void 0,f=a?.answer.optionIndex,p=a?.grade,m=async t=>{if(d)return;s(t),l(void 0);let i=await AM(e.id,t);if(i.ok)return s(void 0),n(i.view);l(i.error);try{await r()}catch{}finally{s(void 0)}},h=e=>{if(p)return e===p.correctOptionIndex?`correct`:e===f?`incorrect`:void 0},g=e=>p?e===f?p.correct?`✓ Your answer, correct`:`✗ Your answer, incorrect`:e===p.correctOptionIndex?`✓ Correct answer`:null:null;return(0,j.jsxs)(e2,{role:`region`,"aria-label":`Check: ${i.concept}`,children:[(0,j.jsx)(t2,{kind:`Check`,aside:`Graded against an answer key`,children:(0,j.jsx)(`span`,{className:`text-muted-foreground min-w-0 text-sm font-semibold wrap-anywhere`,children:i.concept})}),(0,j.jsxs)(r2,{className:`gap-4`,children:[(0,j.jsx)(`div`,{"data-slot":`check-question`,className:`font-heading text-[1.2rem] leading-snug font-medium text-pretty`,children:(0,j.jsx)(W0,{text:i.question,mode:`math`})}),(0,j.jsx)(`div`,{className:`flex flex-col gap-2`,role:`group`,"aria-label":`Options`,children:i.options.map((e,t)=>{let n=h(t);return(0,j.jsxs)(M,{type:`button`,variant:`outline`,"data-result":n,className:A(`border-border-strong dark:border-border-strong bg-card dark:bg-card hover:bg-sunken dark:hover:bg-sunken h-auto flex-wrap justify-start gap-x-3 gap-y-1 rounded-[10px] px-3.5 py-2.5 text-left font-medium whitespace-normal`,u&&`disabled:opacity-100`,o===t&&`border-foreground dark:border-foreground`,n===`correct`&&`border-success bg-success/10 dark:border-success dark:bg-success/15`,n===`incorrect`&&`border-destructive bg-destructive/10 dark:border-destructive dark:bg-destructive/15`),disabled:d,onClick:()=>void m(t),children:[(0,j.jsx)(i2,{index:t}),(0,j.jsx)(`span`,{className:`min-w-0 flex-[1_1_10rem] wrap-anywhere`,children:(0,j.jsx)(W0,{text:e.text,mode:`math`})}),g(t)&&(0,j.jsx)(`span`,{className:A(`shrink-0 pl-9 text-sm font-semibold sm:pl-0`,n===`incorrect`?`text-destructive`:`text-success`),children:g(t)})]},t)})}),(0,j.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-2`,children:[!u&&t&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Answer once the reply finishes.`}),c&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:c}),p&&(0,j.jsxs)(f2,{className:`bg-sunken border-0 px-4 py-3`,children:[(0,j.jsx)(p2,{className:A(`font-heading text-[1.15rem] font-medium`,p.correct?`text-success`:`text-destructive`),children:p.correct?`Correct!`:`Not quite.`}),(0,j.jsxs)(m2,{className:`text-foreground`,children:[p.feedback&&(0,j.jsx)(`p`,{children:(0,j.jsx)(W0,{text:p.feedback,mode:`math`})}),(0,j.jsx)(`p`,{children:(0,j.jsx)(W0,{text:p.explanation,mode:`math`})})]})]})]})]})]})}var l8=e=>e===`unsure`?{unsure:!0}:e===`skipped`?{skipped:!0}:{optionIndex:e};function u8({view:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let{spec:i,latestAttempt:a}=e,[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)(),u=a!==void 0,d=u||t||o!==void 0,f=a?.grade,p=a?.answer,m=p&&`optionIndex`in p?p.optionIndex:void 0,h=async t=>{if(d)return;s(t),l(void 0);let i=await jM(e.id,l8(t));if(i.ok)return s(void 0),n(i.view);l(i.error);try{await r()}catch{}finally{s(void 0)}},g=e=>{if(f)return e===f.correctOptionIndex?`correct`:e===m?`incorrect`:void 0},_=f?.result===`correct`?`Correct.`:f?.result===`incorrect`?`Not quite.`:f?.result===`unsure`?`Marked as not sure.`:`Skipped.`;return(0,j.jsxs)(e2,{role:`region`,"aria-label":`Placement question: ${i.concept}`,children:[(0,j.jsx)(t2,{kind:`Placement`,children:(0,j.jsx)(`span`,{className:`text-muted-foreground min-w-0 text-sm font-semibold wrap-anywhere`,children:i.concept})}),(0,j.jsxs)(r2,{className:`gap-4`,children:[(0,j.jsx)(`div`,{className:`font-heading text-[1.2rem] leading-snug font-medium text-pretty`,children:(0,j.jsx)(W0,{text:i.question,mode:`math`})}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,role:`group`,"aria-label":`Answers`,children:[i.options.map((e,t)=>{let n=g(t);return(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,"data-result":n,"aria-pressed":m===t,className:A(`border-border-strong dark:border-border-strong bg-card dark:bg-card hover:bg-sunken dark:hover:bg-sunken h-auto max-w-full rounded-[10px] px-3.5 py-2 text-left font-medium whitespace-normal wrap-anywhere`,u&&`disabled:opacity-100`,o===t&&`border-foreground dark:border-foreground`,n===`correct`&&`border-success bg-success/10 dark:border-success dark:bg-success/15`,n===`incorrect`&&`border-destructive bg-destructive/10 dark:border-destructive dark:bg-destructive/15`),disabled:d,onClick:()=>void h(t),children:(0,j.jsx)(W0,{text:e.text,mode:`math`})},t)}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-pressed":f?.result===`unsure`,className:A(u&&`disabled:opacity-100`,f?.result===`unsure`&&`bg-muted`),disabled:d,onClick:()=>void h(`unsure`),children:`Not sure`}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`sm`,"aria-pressed":f?.result===`skipped`,className:A(`text-muted-foreground`,u&&`disabled:opacity-100`,f?.result===`skipped`&&`bg-muted`),disabled:d,onClick:()=>void h(`skipped`),children:`Skip`})]}),(0,j.jsxs)(`div`,{"aria-live":`polite`,className:`flex flex-col gap-1 text-sm`,children:[!u&&t&&(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Answer once the reply finishes.`}),c&&(0,j.jsx)(`p`,{className:`text-destructive`,children:c}),f&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:A(`font-medium`,f.result===`correct`?`text-success`:f.result===`incorrect`?`text-destructive`:`text-muted-foreground`),children:_}),f.result!==`skipped`&&(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:(0,j.jsx)(W0,{text:f.explanation,mode:`math`})})]})]})]})]})}var d8=se(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 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/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function f8({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?Gt:`span`;return(0,j.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:A(d8({variant:t}),e),...r})}function p8({className:e,...t}){return(0,j.jsx)(Dg,{role:`status`,"aria-label":`Loading`,className:A(`size-4 animate-spin motion-reduce:animate-none`,e),...t})}var m8=(0,v.createContext)(void 0),h8={timeout:`Stopped: it took longer than the time limit.`,output_limit:`Stopped: it printed more than the output limit.`,start_failed:`Your command couldn't start.`,no_run_output_command:`This case runs your program's output: set a command for that with --run-output.`};function g8({label:e,text:t,tone:n}){return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,j.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.6875rem] tracking-[0.06em] uppercase`,children:e}),(0,j.jsx)(`pre`,{className:A(`bg-sunken max-h-48 min-w-0 overflow-auto rounded-md px-3 py-2 font-mono text-xs leading-relaxed whitespace-pre-wrap wrap-anywhere`,n===`error`&&`text-destructive`),children:t===``?(0,j.jsx)(`span`,{className:`text-muted-foreground italic`,children:`(nothing)`}):t})]})}function _8({text:e,label:t}){let[n,r]=(0,v.useState)(!1);return(0,j.jsxs)(`div`,{className:`bg-sunken flex min-w-0 items-center gap-2 rounded-md py-1 pr-1 pl-3`,children:[(0,j.jsx)(`code`,{className:`min-w-0 flex-1 overflow-x-auto font-mono text-xs whitespace-pre`,children:e}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`xs`,"aria-label":n?`Copied: ${t}`:`Copy: ${t}`,onClick:async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)}catch{}},children:n?(0,j.jsx)(dh,{"aria-hidden":!0}):(0,j.jsx)(jh,{"aria-hidden":!0})})]})}var v8=[[`noHardCodedOutputs`,`Computes its output`],[`concept`,`Shows the milestone's concept`],[`quality`,`Code quality`]],y8={kept:`kept`,withdrawn:`withdrawn`,corrected:`corrected`,upheld:`upheld`,overturned:`overturned`};function b8({artifactId:e,target:t,label:n,onDone:r,onCancel:i}){let[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(),d=(0,v.useId)(),f=async()=>{c(!0),u(void 0);let n=await FM(e,{...t,reason:a.trim()});c(!1),n.ok?await r():u(n.error)};return(0,j.jsxs)(`form`,{className:`flex flex-col gap-2`,onSubmit:e=>{e.preventDefault(),a.trim()&&!s&&f()},children:[(0,j.jsx)(`label`,{htmlFor:d,className:`text-sm font-medium`,children:n}),(0,j.jsx)(h2,{id:d,value:a,maxLength:2e3,disabled:s,onChange:e=>o(e.target.value),placeholder:`What's wrong with it? The tutor will look again.`}),(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(M,{type:`submit`,size:`sm`,disabled:s||!a.trim(),children:[s&&(0,j.jsx)(p8,{}),s?`The tutor is looking again…`:`Send dispute`]}),(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`ghost`,disabled:s,onClick:i,children:`Cancel`})]}),l&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:l})]})}function x8({review:e,createdAt:t}){return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,"data-testid":`milestone-review`,"data-approved":e.approved,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,j.jsx)(`span`,{className:A(`font-medium`,e.approved?`text-success`:`text-destructive`),children:e.approved?`Approved`:`Changes requested`}),(0,j.jsx)(f8,{variant:`outline`,children:`Judged by a model`}),(0,j.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[e.model,`, `,(0,j.jsx)(`time`,{dateTime:t,children:new Date(t).toLocaleString()})]})]}),(0,j.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:v8.map(([t,n])=>(0,j.jsxs)(`li`,{className:`flex gap-2 text-sm`,children:[e[t].passed?(0,j.jsx)(dh,{className:`text-success mt-0.5 size-4 shrink-0`,"aria-hidden":!0}):(0,j.jsx)(M_,{className:`text-destructive mt-0.5 size-4 shrink-0`,"aria-hidden":!0}),(0,j.jsxs)(`span`,{className:`min-w-0`,children:[(0,j.jsx)(`span`,{className:`font-medium`,children:n}),(0,j.jsx)(`span`,{className:`sr-only`,children:e[t].passed?`: passed`:`: not yet`}),` `,(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:e[t].note})]})]},t))}),(0,j.jsx)(`div`,{className:`text-[0.95rem]`,children:(0,j.jsx)(W0,{text:e.summary,mode:`block`})}),e.suggestions.length>0&&(0,j.jsx)(`ul`,{className:`text-muted-foreground list-disc pl-5 text-sm`,children:e.suggestions.map((e,t)=>(0,j.jsx)(`li`,{children:e},t))})]})}function S8({view:e,onRefresh:t}){let{spec:n,latestAttempt:r,latestReview:i}=e,a=(0,v.useContext)(m8),o=(0,v.useId)(),[s,c]=(0,v.useState)(),l=r?.grade,u=r?.answer.results,d=n.cases.some(e=>e.compare===`run_output`),f=n.checkType===`review`,p=new Map((l?.cases??[]).map((e,t)=>[e.case??t,{passed:e.passed,result:u?.[t]}])),m=r?.answer.files??[],h=async()=>{c(void 0),await t()};return(0,j.jsxs)(e2,{role:`region`,"aria-labelledby":o,"data-testid":`project-milestone`,children:[(0,j.jsx)(t2,{kind:`Milestone`,aside:f?`Checked by a code review`:`Checked in your repository`,children:(0,j.jsx)(n2,{id:o,text:n.title})}),(0,j.jsxs)(r2,{className:`@container gap-4`,children:[(0,j.jsx)(`div`,{className:`text-[0.95rem]`,"data-testid":`milestone-spec`,children:(0,j.jsx)(W0,{text:n.spec,mode:`block`})}),(0,j.jsxs)(`section`,{className:`flex flex-col gap-1.5`,"aria-label":`Output format`,children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium`,children:`Output format`}),(0,j.jsx)(`div`,{className:`text-[0.95rem]`,children:(0,j.jsx)(W0,{text:n.outputFormat,mode:`block`})})]}),n.reviewFocus&&(0,j.jsxs)(`section`,{className:`flex flex-col gap-1.5`,"aria-label":`What the review looks for`,children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium`,children:`What the review looks for`}),(0,j.jsx)(`div`,{className:`text-[0.95rem]`,children:(0,j.jsx)(W0,{text:n.reviewFocus,mode:`block`})})]}),(0,j.jsxs)(`section`,{className:`flex flex-col gap-2`,"aria-label":`Check it`,children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium`,children:`Check it`}),(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`In your project's folder, link it to this course once, with the command that runs your program. `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`{input}`}),` becomes the path to a file holding each case's input, which also comes on stdin. Then check whenever you like.`]}),a&&(0,j.jsx)(_8,{label:`link command`,text:`mivra link ${a} --run "./your-program {input}"${d?` --run-output "./run-it {output}"`:``}`}),(0,j.jsx)(_8,{label:`check command`,text:`mivra check`}),(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Each check also sends the files that changed since your last passed milestone to a code review, which must approve too. It follows your `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`.gitignore`}),` and never sends `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`.env`}),` files or keys; `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra check --dry-run`}),` lists exactly what it would send.`]}),d&&(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Some cases run what your program prints: `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`{output}`}),` in your run-output command becomes the path to a file holding it.`]})]}),(0,j.jsx)(`div`,{"aria-live":`polite`,"data-testid":`milestone-status`,children:l?(0,j.jsxs)(f2,{className:`bg-sunken border-0 px-4 py-3`,children:[(0,j.jsx)(p2,{className:A(`font-heading text-[1.15rem] font-medium`,e.passed?`text-success`:`text-destructive`),children:e.passed?`Milestone passed.`:`Not yet.`}),(0,j.jsxs)(m2,{className:`text-foreground`,children:[`Latest check`,l.total>0?`: ${l.passed} of ${l.total} ${l.total===1?`case`:`cases`} passed`:``,`,`,` `,(0,j.jsx)(`time`,{dateTime:r.createdAt,children:new Date(r.createdAt).toLocaleString()}),`.`]})]}):(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Not checked yet.`})}),r&&(0,j.jsxs)(`section`,{className:`flex flex-col gap-2 rounded-lg border px-3 py-2.5`,"aria-label":`Code review`,children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium`,children:`Code review`}),i?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(x8,{review:i.review,createdAt:i.createdAt}),!i.review.approved&&(s===`review`?(0,j.jsx)(b8,{artifactId:e.id,target:{target:`review`},label:`Why is the verdict wrong?`,onDone:h,onCancel:()=>c(void 0)}):(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`outline`,className:`self-start`,onClick:()=>c(`review`),children:`Dispute this verdict`}))]}):(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`milestone-review-missing`,children:l?.correct?r.answer.source===`none`?`Nothing was sent to review: run mivra check in a git repository.`:m.length===0?`No changed files were sent to review.`:`The review of the latest check didn't finish. Run mivra check again.`:`The review runs once every case passes.`}),m.length>0&&(0,j.jsxs)(`p`,{className:`text-muted-foreground text-xs wrap-anywhere`,children:[`Sent for review: `,m.slice(0,12).join(`, `),m.length>12?` and ${m.length-12} more`:``,`.`]})]}),n.cases.length>0&&(0,j.jsx)(`ol`,{className:`flex flex-col gap-2`,"aria-label":`Test cases`,children:n.cases.map((t,n)=>{let r=p.get(n),i=t.withdrawn?void 0:r?.passed,a=r?.result;return(0,j.jsxs)(`li`,{className:A(`flex min-w-0 flex-col gap-2 rounded-lg border px-3 py-2.5`,t.withdrawn&&`opacity-60`),"data-testid":`milestone-case`,"data-result":t.withdrawn?`withdrawn`:i===void 0?`pending`:i?`passed`:`failed`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[i===!0&&(0,j.jsx)(dh,{className:`text-success size-4 shrink-0`,"aria-hidden":!0}),i===!1&&(0,j.jsx)(M_,{className:`text-destructive size-4 shrink-0`,"aria-hidden":!0}),(0,j.jsx)(`span`,{className:A(`min-w-0 font-medium wrap-anywhere`,t.withdrawn&&`line-through`),children:t.name}),i!==void 0&&(0,j.jsx)(`span`,{className:`sr-only`,children:i?` passed`:` failed`}),t.withdrawn&&(0,j.jsx)(f8,{variant:`outline`,children:`Withdrawn`}),(0,j.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[t.compare===`run_output`&&(0,j.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`runs your output`}),!t.withdrawn&&s!==n&&(0,j.jsx)(M,{type:`button`,size:`xs`,variant:`ghost`,onClick:()=>c(n),"aria-label":`Dispute case: ${t.name}`,children:`Dispute`})]})]}),s===n&&(0,j.jsx)(b8,{artifactId:e.id,target:{target:`case`,caseIndex:n},label:`Why is "${t.name}" wrong?`,onDone:h,onCancel:()=>c(void 0)}),(0,j.jsxs)(`div`,{className:`grid gap-2 @[34rem]:grid-cols-2`,children:[(0,j.jsx)(g8,{label:`Input`,text:t.input}),(0,j.jsx)(g8,{label:t.compare===`run_output`?`Running your output prints`:`Expected output`,text:t.expected})]}),i===!1&&a&&(0,j.jsxs)(j.Fragment,{children:[a.error?(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:h8[a.error]}):(0,j.jsxs)(j.Fragment,{children:[a.exitCode!==0&&(0,j.jsxs)(`p`,{className:`text-destructive text-sm`,children:[`Exited with code `,a.exitCode,`.`]}),(0,j.jsx)(g8,{label:`Your program printed`,text:a.truncated?`${a.stdout}\n… (cut short)`:a.stdout})]}),a.stderr&&(0,j.jsx)(g8,{label:`stderr`,text:a.stderr,tone:`error`})]})]},n)})}),n.disputes.length>0&&(0,j.jsxs)(`section`,{className:`flex flex-col gap-2`,"aria-label":`Disputes`,children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium`,children:`Disputes`}),(0,j.jsx)(`ul`,{className:`flex flex-col gap-2`,"data-testid":`milestone-disputes`,children:n.disputes.map(e=>(0,j.jsxs)(`li`,{className:`bg-sunken flex flex-col gap-1 rounded-md px-3 py-2 text-sm`,children:[(0,j.jsxs)(`span`,{children:[(0,j.jsx)(`span`,{className:`font-medium`,children:e.target===`case`?`Case "${e.caseName??``}"`:`Review verdict`}),`: `,y8[e.outcome]]}),(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[`You said: `,e.reason]}),(0,j.jsx)(`span`,{children:e.explanation})]},e.id))})]})]})]})}var C8=380,w8=100,T8={1:{width:C8,height:320,radius:w8,circles:[{x:190,y:148}],slots:{1:{x:190,y:148,width:136,rows:5},0:{x:318,y:278,width:106,rows:3}}},2:{width:C8,height:320,radius:w8,circles:[{x:135,y:148},{x:245,y:148}],slots:{1:{x:104,y:148,width:76,rows:5},2:{x:276,y:148,width:76,rows:5},3:{x:190,y:148,width:53,rows:3},0:{x:318,y:288,width:106,rows:2}}},3:{width:C8,height:410,radius:w8,circles:[{x:138,y:148},{x:242,y:148},{x:190,y:238}],slots:{1:{x:100,y:116,width:76,rows:2},2:{x:280,y:116,width:76,rows:2},4:{x:190,y:280,width:124,rows:2},3:{x:190,y:116,width:64,rows:1},5:{x:124,y:220,width:53,rows:1},6:{x:256,y:220,width:53,rows:1},7:{x:190,y:172,width:53,rows:2},0:{x:318,y:366,width:106,rows:3}}}},E8=16/(230/C8);function D8(e,t,n){let r=n/e.width;return{width:t.width*r,height:t.rows*E8*r}}var O8=.5,k8=(e,t)=>e.width<=t.width+O8&&e.height<=t.height+O8;function A8(e,t,n){return k8(t,e)?`contents`:k8(n,e)?`marker`:`arrow`}function j8(e){return Array.from({length:2**e},(e,t)=>t)}function M8({circles:e,radius:t},n){let r=[];return e.forEach((i,a)=>{let o=e=>({x:i.x+t*Math.cos(e),y:i.y+t*Math.sin(e)}),s=e.flatMap((e,n)=>{if(n===a)return[];let r=Math.atan2(e.y-i.y,e.x-i.x),o=Math.acos(Math.hypot(e.x-i.x,e.y-i.y)/(2*t));return[r-o,r+o]}),c=(s.length?s:[0,Math.PI]).map(e=>(e+2*Math.PI)%(2*Math.PI)).sort((e,t)=>e-t);c.forEach((i,s)=>{let l=s+1<c.length?c[s+1]:c[0]+2*Math.PI,u=o((i+l)/2);if(!e.every((e,r)=>r===a||Math.hypot(u.x-e.x,u.y-e.y)<t==!!(n&1<<r)))return;let d=l-i>Math.PI;r.push(n&1<<a?{from:o(i),to:o(l),large:d,sweep:1}:{from:o(l),to:o(i),large:d,sweep:0})})}),r}var N8=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y)<1e-6,P8=e=>String(Math.round(e*100)/100);function F8(e,t){let{radius:n,width:r,height:i}=e,a=M8(e,t),o=[];for(;a.length;){let e=a.shift(),t=`M${P8(e.from.x)} ${P8(e.from.y)}`,r=e;for(;r;){let{to:e,large:i,sweep:o}=r;t+=`A${n} ${n} 0 ${+!!i} ${o} ${P8(e.x)} ${P8(e.y)}`;let s=a.findIndex(t=>N8(t.from,e));r=s>=0?a.splice(s,1)[0]:void 0}o.push(`${t}Z`)}return t===0&&o.unshift(I8(r,i)),o.join(``)}var I8=(e,t)=>`M1 1H${e-1}V${t-1}H1Z`,L8={active:{word:`Focus`,tint:`fill-foreground/15`,pattern:`hatch`,line:`stroke-foreground`,outline:``},done:{word:`Done`,tint:`fill-success/20`,pattern:`dots`,line:`stroke-success`,outline:``},muted:{word:`Ruled out`,tint:`fill-muted-foreground/15`,pattern:``,line:`stroke-muted-foreground`,outline:`5 4`}};function R8(e,t){return e.sets.reduce((e,n,r)=>t.includes(n.id)?e|1<<r:e,0)}function z8(e,t){let n=e.steps?.[t],r=new Map;for(let t of n?.highlights??[])r.set(R8(e,t.in),t.tone??`active`);return{explanation:n?.explanation??``,tones:r,variables:n?.variables??[]}}function B8(e){return j8(e.sets.length).filter(t=>t!==0||e.universe!==void 0).sort((e,t)=>e===0?1:t===0?-1:e-t)}var V8=e=>String(e);function H8({text:e}){return(0,j.jsx)(W0,{text:e,mode:`math`})}function U8({elements:e}){return e.map((e,t)=>(0,j.jsxs)(v.Fragment,{children:[t>0&&`, `,(0,j.jsx)(H8,{text:V8(e)})]},t))}function W8(e,t){return e.map((n,r)=>(0,j.jsxs)(v.Fragment,{children:[r>0&&(r===e.length-1?` ${t} `:`, `),n]},r))}function G8({spec:e,mask:t}){let n=e=>(0,j.jsx)(H8,{text:e.label},e.id),r=e.sets.filter((e,n)=>t&1<<n).map(n),i=e.sets.filter((e,n)=>!(t&1<<n)).map(n);return r.length===0?(0,j.jsxs)(j.Fragment,{children:[`outside `,W8(i,`and`)]}):(0,j.jsxs)(j.Fragment,{children:[`in `,W8(r,`and`),i.length>0&&(0,j.jsxs)(j.Fragment,{children:[`, not `,W8(i,`or`)]})]})}var K8=e=>e.count??e.elements.length;function q8({total:e}){return(0,j.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`n = `,e]})}function J8({region:e}){let t=K8(e);return e.elements.length===0?(0,j.jsx)(q8,{total:t}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(U8,{elements:e.elements}),t!==e.elements.length&&(0,j.jsxs)(j.Fragment,{children:[` `,`(`,(0,j.jsx)(q8,{total:t}),`)`]})]})}function Y8({slot:e,layout:t,children:n,...r}){let i=(e,t)=>`${e/t*100}%`;return(0,j.jsx)(`div`,{className:`absolute flex -translate-x-1/2 -translate-y-1/2 items-center justify-center text-center font-mono text-xs leading-4`,style:{left:i(e.x,t.width),top:i(e.y,t.height),width:i(e.width,t.width),height:i(e.rows*E8,t.height)},...r,children:(0,j.jsx)(`span`,{className:`bg-card/85 rounded-sm px-0.5`,children:n})})}function X8(e){let{width:t,height:n}=e.getBoundingClientRect();return{width:t+[...e.querySelectorAll(`.katex`)].reduce((e,t)=>e+Math.max(0,t.scrollWidth-t.clientWidth),0),height:n}}function Z8(e){return[e,...e.querySelectorAll(`.katex`)].some(e=>e.scrollWidth>e.clientWidth)}function Q8(e,t){let n=(0,v.useRef)(null),[r,i]=(0,v.useState)(new Map),[a,o]=(0,v.useState)([]);return(0,v.useLayoutEffect)(()=>{let r=n.current,a=0,s=()=>{if(a=r.getBoundingClientRect().width,a===0)return;let n=new Map;for(let i of B8(e)){let e=r.querySelector(`[data-probe="contents"][data-mask="${i}"] > span`),o=r.querySelector(`[data-probe="marker"][data-mask="${i}"] > span`);e&&o&&n.set(i,A8(D8(t,t.slots[i],a),X8(e),X8(o)))}i(e=>n.size===e.size&&[...n].every(([t,n])=>e.get(t)===n)?e:n);let s=[...r.querySelectorAll(`[data-label]`)].filter(Z8).map(e=>e.dataset.label);o(e=>e.join()===s.join()?e:s)};s();let c=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{r.getBoundingClientRect().width!==a&&(0,It.flushSync)(s)});return c?.observe(r),document.fonts?.addEventListener(`loadingdone`,s),()=>{c?.disconnect(),document.fonts?.removeEventListener(`loadingdone`,s)}},[e,t]),[n,r,a]}var $8=[`Top left`,`Top right`,`Bottom left`];function e5(e,t){return e===0?{left:`2%`,top:`1.5%`,width:`45%`}:e===1?{right:`2%`,top:`1.5%`,width:`45%`,textAlign:`right`}:{left:`2%`,bottom:`1.5%`,width:t===3?`30%`:`45%`}}function t5({d:e,mask:t,tone:n,ids:r}){let i=n&&L8[n],a=`${r.clip}-${t}`;return(0,j.jsxs)(`g`,{"data-testid":`set-region`,"data-mask":t,"data-tone":n??`none`,children:[(0,j.jsx)(`path`,{d:e,fillRule:`evenodd`,className:i?i.tint:`fill-transparent`,"data-testid":`set-region-shape`}),i&&(0,j.jsxs)(j.Fragment,{children:[i.pattern&&(0,j.jsx)(`path`,{d:e,fillRule:`evenodd`,fill:`url(#${i.pattern===`hatch`?r.hatch:r.dots})`}),(0,j.jsx)(`clipPath`,{id:a,children:(0,j.jsx)(`path`,{d:e,clipRule:`evenodd`})}),(0,j.jsx)(`path`,{d:e,clipPath:`url(#${a})`,fill:`none`,strokeWidth:6,strokeDasharray:i.outline||void 0,className:i.line})]})]})}function n5({spec:e,layout:t,tones:n,fits:r,drawing:i}){let a=(0,v.useId)().replace(/[^a-zA-Z0-9_-]/g,``),o={hatch:`${a}-hatch`,dots:`${a}-dots`,clip:`${a}-clip`},{width:s,height:c,radius:l,circles:u,slots:d}=t,f=B8(e),p=new Map(e.regions.map(t=>[R8(e,t.in),t]));return(0,j.jsxs)(`div`,{ref:i,className:`relative mx-auto w-full max-w-md`,style:{aspectRatio:`${s} / ${c}`},"aria-hidden":`true`,inert:!0,"data-testid":`set-diagram`,children:[(0,j.jsxs)(`svg`,{viewBox:`0 0 ${s} ${c}`,className:`absolute inset-0 size-full`,children:[(0,j.jsxs)(`defs`,{children:[(0,j.jsx)(`pattern`,{id:o.hatch,patternUnits:`userSpaceOnUse`,width:`10`,height:`10`,patternTransform:`rotate(45)`,children:(0,j.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:`10`,strokeWidth:`2`,className:`stroke-foreground/45`})}),(0,j.jsx)(`pattern`,{id:o.dots,patternUnits:`userSpaceOnUse`,width:`10`,height:`10`,children:(0,j.jsx)(`circle`,{cx:`5`,cy:`5`,r:`1.6`,className:`fill-success/70`})})]}),f.map(e=>(0,j.jsx)(t5,{d:F8(t,e),mask:e,tone:n.get(e),ids:o},e)),e.universe!==void 0&&(0,j.jsx)(`rect`,{x:1,y:1,width:s-2,height:c-2,strokeWidth:`1.5`,className:`stroke-muted-foreground fill-none`,"data-testid":`set-universe`}),u.map((e,t)=>(0,j.jsx)(`circle`,{cx:e.x,cy:e.y,r:l,strokeWidth:`1.5`,className:`stroke-foreground/70 fill-none`,"data-testid":`set-circle`},t))]}),e.sets.map((t,n)=>(0,j.jsx)(`div`,{className:`absolute text-xs leading-4 font-medium`,style:e5(n,e.sets.length),"data-testid":`set-label`,"data-label":n,children:(0,j.jsx)(`span`,{className:`bg-card/85 rounded-sm px-0.5`,children:(0,j.jsx)(H8,{text:t.label})})},t.id)),e.universe!==void 0&&(0,j.jsx)(`div`,{className:`text-muted-foreground absolute bottom-[1.5%] left-1/2 w-[36%] -translate-x-1/2 text-center text-xs leading-4`,"data-testid":`set-universe-label`,"data-label":`universe`,children:(0,j.jsx)(`span`,{className:`bg-card/85 rounded-sm px-0.5`,children:(0,j.jsx)(H8,{text:e.universe})})}),f.map(e=>{let n=p.get(e);if(!n)return null;let i=r.get(e)??`contents`;return(0,j.jsx)(Y8,{slot:d[e],layout:t,"data-testid":`set-elements`,"data-mask":e,"data-fit":i,children:K8(n)===0?`∅`:i===`contents`?(0,j.jsx)(J8,{region:n}):i===`marker`?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(q8,{total:K8(n)}),` ↓`]}):`↓`},e)}),(0,j.jsx)(`div`,{className:`invisible absolute inset-0 overflow-hidden`,children:f.map(e=>{let n=p.get(e);return!n||K8(n)===0?null:(0,j.jsxs)(v.Fragment,{children:[(0,j.jsx)(Y8,{slot:d[e],layout:t,"data-probe":`contents`,"data-mask":e,children:(0,j.jsx)(J8,{region:n})}),(0,j.jsxs)(Y8,{slot:d[e],layout:t,"data-probe":`marker`,"data-mask":e,children:[(0,j.jsx)(q8,{total:K8(n)}),` ↓`]})]},e)})})]})}function r5({view:e}){let{spec:t}=e,n=t.steps?.length??0,r=X0(n),{index:i}=r,a=(0,v.useId)(),o=(0,v.useId)(),s=T8[t.sets.length],c=z8(t,i),l=B8(t),u=new Map(t.regions.map(e=>[R8(t,e.in),e])),d=l.filter(e=>c.tones.has(e)),[f,p,m]=Q8(t,s),h=l.filter(e=>(p.get(e)??`contents`)!==`contents`);return(0,j.jsxs)(e2,{role:`region`,"aria-labelledby":`${a} ${o}`,...n>0?{tabIndex:0,onKeyDown:r.onKeyDown}:{},children:[(0,j.jsx)(t2,{kind:`Set diagram`,kindId:o,children:(0,j.jsx)(n2,{id:a,text:t.title})}),(0,j.jsxs)(r2,{children:[(0,j.jsxs)(`ul`,{className:`sr-only`,"data-testid":`set-description`,children:[t.sets.map(e=>(0,j.jsxs)(`li`,{children:[`Set: `,(0,j.jsx)(H8,{text:e.label})]},e.id)),t.universe!==void 0&&(0,j.jsxs)(`li`,{children:[`Universe: `,(0,j.jsx)(H8,{text:t.universe})]}),l.map(e=>{let n=u.get(e);if(!n)return null;let r=n.elements.length===0&&!n.count;return(0,j.jsxs)(`li`,{children:[(0,j.jsx)(G8,{spec:t,mask:e}),`: `,r&&`empty`,(0,j.jsx)(U8,{elements:n.elements}),n.count!==void 0&&n.count!==n.elements.length&&!r&&`${n.elements.length>0?`, `:``}${n.count} in total`]},e)})]}),(0,j.jsx)(n5,{spec:t,layout:s,tones:c.tones,fits:p,drawing:f}),(h.length>0||m.length>0)&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,"data-testid":`set-overflow`,children:[(0,j.jsx)(`p`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:`↓ Doesn't fit in the diagram:`}),m.map(e=>(0,j.jsxs)(Q0,{children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[e===`universe`?`Universe`:`${$8[Number(e)]} label`,`:`]}),` `,(0,j.jsx)(H8,{text:e===`universe`?t.universe:t.sets[Number(e)].label})]},e)),h.map(e=>(0,j.jsxs)(Q0,{children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[(0,j.jsx)(G8,{spec:t,mask:e}),`:`]}),` `,(0,j.jsx)(`span`,{className:`font-mono`,children:(0,j.jsx)(J8,{region:u.get(e)})})]},e))]}),d.length>0&&(0,j.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1 text-xs`,"data-testid":`set-key`,children:d.map(e=>{let n=c.tones.get(e);return(0,j.jsx)(`div`,{className:`max-w-full min-w-0`,"data-tone":n,children:(0,j.jsxs)(Q0,{children:[(0,j.jsxs)(`span`,{className:`font-medium`,children:[L8[n].word,`:`]}),` `,(0,j.jsx)(G8,{spec:t,mask:e})]})},e)})}),c.variables.length>0&&(0,j.jsx)(`div`,{className:`flex flex-wrap gap-2`,"data-testid":`set-variables`,children:c.variables.map((e,t)=>(0,j.jsx)(`div`,{className:`border-border-strong bg-card max-w-full min-w-0 rounded-md border px-2 py-0.5 font-mono text-xs`,children:(0,j.jsxs)(Q0,{children:[(0,j.jsx)(H8,{text:e.name}),` = `,(0,j.jsx)(H8,{text:String(e.value)})]})},t))}),n>0&&(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`set-announcement`,children:[(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Step `,i+1,` of `,n,`:`,` `]}),(0,j.jsx)(`div`,{"data-testid":`set-explanation`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:c.explanation,mode:`math`})})}),(0,j.jsxs)(`span`,{className:`sr-only`,children:[d.length===0&&`Nothing highlighted. `,d.map(e=>(0,j.jsxs)(v.Fragment,{children:[L8[c.tones.get(e)].word,`: `,(0,j.jsx)(G8,{spec:t,mask:e}),`.`,` `]},e)),c.variables.map((e,t)=>(0,j.jsxs)(v.Fragment,{children:[(0,j.jsx)(H8,{text:e.name}),` = `,(0,j.jsx)(H8,{text:String(e.value)}),`.`,` `]},t))]})]})})]}),n>0&&(0,j.jsx)($0,{stepper:r,play:!0})]})}var i5={active:`Highlighted`,done:`Done`,muted:`Ruled out`};function a5(e,t){let n=e.rows.map(e=>[...e]);for(let r of e.steps?.slice(0,t+1)??[])for(let{row:e,column:t,value:i}of r.cells??[])n[e]&&t<n[e].length&&(n[e][t]=i);let r=e.steps?.[t];return{rows:n,explanation:r?.explanation,highlight:r?.highlight??[],changes:r?.cells??[]}}var o5=e=>typeof e==`boolean`?e?`T`:`F`:String(e),s5=({row:e,column:t})=>[e!==void 0&&`row ${e+1}`,t!==void 0&&`column ${t+1}`].filter(Boolean).join(`, `),c5=`wrap-normal!`;function l5({view:e}){let{spec:t}=e,n=X0(t.steps?.length??1),r=a5(t,n.index),i=e=>{let t=r.highlight.findLast(e);return t&&(t.tone??`active`)},a=t.steps!==void 0,o=(0,v.useId)(),s=(0,v.useId)();return(0,j.jsxs)(e2,{role:`region`,"aria-labelledby":`${o} ${s}`,...a?{tabIndex:0,onKeyDown:n.onKeyDown}:{},children:[(0,j.jsx)(t2,{kind:`Table`,kindId:s,children:(0,j.jsx)(n2,{id:o,text:t.title})}),(0,j.jsxs)(r2,{children:[(0,j.jsx)(`div`,{className:`overflow-x-auto`,role:`group`,"aria-label":`Table contents, scrolls sideways`,tabIndex:0,"data-testid":`table-scroll`,onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.stopPropagation()},children:(0,j.jsxs)(`table`,{className:`mx-auto border-collapse text-sm`,children:[(0,j.jsx)(`caption`,{className:`sr-only`,children:(0,j.jsx)(W0,{text:t.title,mode:`math`})}),(0,j.jsx)(`thead`,{children:(0,j.jsxs)(`tr`,{children:[t.rowHeaders&&(0,j.jsx)(`td`,{className:`border-b px-3 py-1.5`}),t.columns.map((e,t)=>{let n=i(e=>e.column===t&&e.row===void 0);return(0,j.jsx)(`th`,{scope:`col`,className:A(`border-b px-3 py-1.5 text-center font-medium`,n&&J0[n]),children:(0,j.jsx)(W0,{text:e,mode:`math`,className:c5})},t)})]})}),(0,j.jsx)(`tbody`,{children:r.rows.map((e,n)=>{let r=i(e=>e.row===n&&e.column===void 0),a=t.rowHeaders?.[n];return(0,j.jsxs)(`tr`,{className:`border-b last:border-b-0`,children:[a!==void 0&&(0,j.jsx)(`th`,{scope:`row`,className:A(`border-r px-3 py-1.5 text-center font-medium`,r&&J0[r]),children:(0,j.jsx)(W0,{text:a,mode:`math`,className:c5})}),e.map((e,t)=>{let r=i(e=>(e.row===void 0||e.row===n)&&(e.column===void 0||e.column===t));return(0,j.jsx)(`td`,{className:A(`px-3 py-1.5 text-center tabular-nums`,r&&J0[r]),"data-tone":r,"data-testid":`table-cell`,children:(0,j.jsx)(W0,{text:o5(e),mode:`math`,className:c5})},t)})]},n)})})]})}),a&&(0,j.jsxs)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`table-live`,children:[(0,j.jsxs)(`span`,{className:`sr-only`,children:[`Step `,n.index+1,` of `,n.last+1,`.`,` `]}),(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:r.explanation??``,mode:`math`})}),(0,j.jsxs)(`span`,{className:`sr-only`,"data-testid":`table-description`,children:[r.highlight.map(e=>` ${i5[e.tone??`active`]}: ${s5(e)}.`),r.changes.map(e=>` Changed ${s5(e)} to ${o5(e.value)}.`)]})]})]}),(0,j.jsx)($0,{stepper:n,play:!0})]})}function u5({view:e}){let{spec:t}=e,n=X0(t.steps.length),{index:r,last:i,go:a}=n,o=r===i,s=t.steps[r],c=(0,v.useId)(),l=(0,v.useId)();return(0,j.jsxs)(e2,{role:`region`,"aria-labelledby":`${c} ${l}`,tabIndex:0,onKeyDown:n.onKeyDown,children:[(0,j.jsx)(t2,{kind:`Worked steps`,kindId:l,children:(0,j.jsx)(n2,{id:c,text:t.title})}),(0,j.jsxs)(r2,{children:[t.goal&&(0,j.jsx)(`p`,{className:`bg-sunken rounded-lg px-3.5 py-2.5 leading-normal`,children:(0,j.jsxs)(Z0,{children:[(0,j.jsx)(`span`,{className:`font-semibold`,children:`Goal: `}),(0,j.jsx)(W0,{text:t.goal,mode:`math`})]})}),(0,j.jsx)(`ol`,{className:`flex flex-col`,children:t.steps.slice(0,r+1).map((e,t)=>(0,j.jsxs)(`li`,{"aria-current":t===r?`step`:void 0,className:`group relative flex min-w-0 flex-col gap-0.5 border-t py-2.5 pl-9 first:border-t-0 first:pt-0.5 last:pb-0`,"data-testid":`worked-step`,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,className:A(`absolute top-2.5 left-0 grid size-6 place-items-center rounded-full font-mono text-[0.7rem] font-medium group-first:top-0.5`,t===r?Y0.current:Y0.other),"data-testid":`worked-step-number`,children:t+1}),e.label&&(0,j.jsx)(`p`,{className:`text-muted-foreground font-mono text-[0.6875rem] font-medium tracking-[0.06em] uppercase`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:e.label,mode:`math`})})}),(0,j.jsx)(`div`,{className:`font-heading text-[1.0625rem] leading-normal`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:e.statement,mode:`math`})})}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm leading-snug`,children:(0,j.jsx)(Z0,{children:(0,j.jsx)(W0,{text:e.justification,mode:`math`})})})]},t))}),(0,j.jsxs)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,"data-testid":`worked-status`,children:[`Step `,r+1,` of `,i+1,`.`,` `,s?.label&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(W0,{text:s.label,mode:`math`}),`.`,` `]}),s&&(0,j.jsx)(W0,{text:s.statement,mode:`math`}),` `,s&&(0,j.jsx)(W0,{text:s.justification,mode:`math`})]})]}),(0,j.jsx)($0,{stepper:n,children:(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground hover:text-foreground decoration-border-strong underline underline-offset-4 hover:bg-transparent dark:hover:bg-transparent`,onClick:()=>a(o?0:i),children:o?`Start over`:`Show all`})})]})}var d5={algorithm_trace:u2,code_exercise:M2,code_walkthrough:F2,composition:s4,graph:t8,interview_context:s8,multiple_choice:c8,placement_question:u8,project_milestone:S8,set_diagram:r5,table:l5,worked_steps:u5};function f5({data:e,replyInProgress:t,onUpdate:n,onRefresh:r}){let i=uM.safeParse(e);if(!i.success)return(0,j.jsx)(`div`,{className:`text-muted-foreground rounded-lg border border-dashed p-3 text-sm`,role:`note`,children:`Can't display this item.`});let a=i.data,o=d5[a.kind];return(0,j.jsx)(o,{view:a,replyInProgress:t,onUpdate:n,onRefresh:r})}function p5(e,t,n){return(e===`submitted`||e===`streaming`)&&t===n-1}function m5(e,t){return e.id&&t[e.id]||e.data}function h5(e){let t={};for(let n of e)for(let e of n.parts){if(e.type!==`data-artifact`)continue;let n=uM.safeParse(e.data);n.success&&(t[n.data.id]=n.data)}return t}var g5=e=>e!==void 0&&`latestAttempt`in e&&e.latestAttempt!==void 0;function _5(e,t){let n={...e};for(let[r,i]of Object.entries(t))(!g5(e[r])||g5(i))&&(n[r]=i);return n}function v5({className:e,...t}){return(0,j.jsx)(Qo,{"data-slot":`checkbox`,className:A(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary`,e),...t,children:(0,j.jsx)(es,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,j.jsx)(dh,{className:`size-3.5`})})})}function y5({...e}){return(0,j.jsx)(wr,{"data-slot":`collapsible`,...e})}function b5({...e}){return(0,j.jsx)(Er,{"data-slot":`collapsible-trigger`,...e})}function x5({...e}){return(0,j.jsx)(Or,{"data-slot":`collapsible-content`,...e})}function S5({className:e,...t}){return(0,j.jsx)(Wd,{"data-slot":`label`,className:A(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function C5({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,j.jsx)(Xp,{"data-slot":`separator`,decorative:n,orientation:t,className:A(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}var w5=se(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:[`flex-col [&>*]:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`[&>[data-slot=field-label]]:flex-auto`,`has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto`,`@md/field-group:[&>[data-slot=field-label]]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}});function T5({className:e,orientation:t=`vertical`,...n}){return(0,j.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:A(w5({orientation:t}),e),...n})}function E5({className:e,...t}){return(0,j.jsx)(S5,{"data-slot":`field-label`,className:A(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4`,`has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10`,e),...t})}function D5({className:e,...t}){return(0,j.jsx)(`p`,{"data-slot":`field-description`,className:A(`text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function O5({className:e,children:t,errors:n,...r}){let i=(0,v.useMemo)(()=>{if(t)return t;if(!n?.length)return null;let e=[...new Map(n.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,j.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,j.jsx)(`li`,{children:e.message},t))})},[t,n]);return i?(0,j.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:A(`text-sm font-normal text-destructive`,e),...r,children:i}):null}function k5({className:e,type:t,...n}){return(0,j.jsx)(`input`,{type:t,"data-slot":`input`,className:A(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...n})}var A5=1,Dne=.9,One=.8,kne=.17,j5=.1,M5=.999,Ane=.9999,jne=.99,Mne=/[\\\/_+.#"@\[\(\{&]/,Nne=/[\\\/_+.#"@\[\(\{&]/g,Pne=/[\s-]/,N5=/[\s-]/g;function P5(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?A5:jne;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=P5(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=A5:Mne.test(e.charAt(l-1))?(d*=One,p=e.slice(i,l-1).match(Nne),p&&i>0&&(d*=M5**+p.length)):Pne.test(e.charAt(l-1))?(d*=Dne,m=e.slice(i,l-1).match(N5),m&&i>0&&(d*=M5**+m.length)):(d*=kne,i>0&&(d*=M5**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Ane)),(d<j5&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=P5(e,t,n,r,l+1,a+2,o),f*j5>d&&(d=f*j5)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function F5(e){return e.toLowerCase().replace(N5,` `)}function Fne(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,P5(e,t,F5(e),F5(t),0,0,{})}var I5=`[cmdk-group=""]`,L5=`[cmdk-group-items=""]`,Ine=`[cmdk-group-heading=""]`,R5=`[cmdk-item=""]`,z5=`${R5}:not([aria-disabled="true"])`,B5=`cmdk-item-select`,V5=`data-value`,Lne=(e,t,n)=>Fne(e,t,n),H5=v.createContext(void 0),U5=()=>v.useContext(H5),W5=v.createContext(void 0),G5=()=>v.useContext(W5),K5=v.createContext(void 0),q5=v.forwardRef((e,t)=>{let n=Z5(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Z5(()=>new Set),i=Z5(()=>new Map),a=Z5(()=>new Map),o=Z5(()=>new Set),s=Y5(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,y=gr(),b=gr(),x=gr(),S=v.useRef(null),C=Jne();X5(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),X5(()=>{C(6,te)},[]);let w=v.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)ee(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=ne()?.id,w.emit()}),r||C(5,te),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=v.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{ee(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=ne();C(4,()=>{ee(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??Lne;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;re().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(L5);t?t.appendChild(e.parentElement===t?e:e.closest(`${L5} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${L5} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${I5}[${V5}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=re().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(V5);w.setState(`value`,e||void 0)}function ee(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function te(){var e;let t=ne();t&&(t.parentElement?.firstChild===t&&((e=t.closest(I5)?.querySelector(Ine))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function ne(){return S.current?.querySelector(`${R5}[aria-selected="true"]`)}function re(){return Array.from(S.current?.querySelectorAll(z5)||[])}function ie(e){let t=re()[e];t&&w.setState(`value`,t.getAttribute(V5))}function ae(e){var t;let n=ne(),r=re(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(V5))}function oe(e){let t=ne()?.closest(I5),n;for(;t&&!n;)t=e>0?Kne(t,I5):qne(t,I5),n=t?.querySelector(z5);n?w.setState(`value`,n.getAttribute(V5)):ae(e)}let k=()=>ie(re().length-1),se=e=>{e.preventDefault(),e.metaKey?k():e.altKey?oe(1):ae(1)},ce=e=>{e.preventDefault(),e.metaKey?ie(0):e.altKey?oe(-1):ae(-1)};return v.createElement(un.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&se(e);break;case`ArrowDown`:se(e);break;case`p`:case`k`:g&&e.ctrlKey&&ce(e);break;case`ArrowUp`:ce(e);break;case`Home`:e.preventDefault(),ie(0);break;case`End`:e.preventDefault(),k();break;case`Enter`:{e.preventDefault();let t=ne();if(t){let e=new Event(B5);t.dispatchEvent(e)}}}}},v.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:Xne},c),e7(e,e=>v.createElement(W5.Provider,{value:w},v.createElement(H5.Provider,{value:T},e))))}),Rne=v.forwardRef((e,t)=>{let n=gr(),r=v.useRef(null),i=v.useContext(K5),a=U5(),o=Y5(e),s=o.current?.forceMount??i?.forceMount;X5(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=$5(n,r,[e.value,e.children,r],e.keywords),l=G5(),u=Q5(e=>e.value&&e.value===c.current),d=Q5(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);v.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(B5,f),()=>t.removeEventListener(B5,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:y,...b}=e;return v.createElement(un.div,{ref:Bt(r,t),...b,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),zne=v.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=gr(),s=v.useRef(null),c=v.useRef(null),l=gr(),u=U5(),d=Q5(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));X5(()=>u.group(o),[]),$5(o,s,[e.value,e.heading,c]);let f=v.useMemo(()=>({id:o,forceMount:i}),[i]);return v.createElement(un.div,{ref:Bt(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&v.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),e7(e,e=>v.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},v.createElement(K5.Provider,{value:f},e))))}),Bne=v.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=v.useRef(null),a=Q5(e=>!e.search);return!n&&!a?null:v.createElement(un.div,{ref:Bt(i,t),...r,"cmdk-separator":``,role:`separator`})}),Vne=v.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=G5(),o=Q5(e=>e.search),s=Q5(e=>e.selectedItemId),c=U5();return v.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),v.createElement(un.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Hne=v.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=v.useRef(null),o=v.useRef(null),s=Q5(e=>e.selectedItemId),c=U5();return v.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),v.createElement(un.div,{ref:Bt(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},e7(e,e=>v.createElement(`div`,{ref:Bt(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Une=v.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return v.createElement(eo,{open:n,onOpenChange:r},v.createElement(oo,{container:o},v.createElement(co,{"cmdk-overlay":``,className:i}),v.createElement(po,{"aria-label":e.label,"cmdk-dialog":``,className:a},v.createElement(q5,{ref:t,...s}))))}),Wne=v.forwardRef((e,t)=>Q5(e=>e.filtered.count===0)?v.createElement(un.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Gne=v.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return v.createElement(un.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},e7(e,e=>v.createElement(`div`,{"aria-hidden":!0},e)))}),J5=Object.assign(q5,{List:Hne,Item:Rne,Input:Vne,Group:zne,Separator:Bne,Dialog:Une,Empty:Wne,Loading:Gne});function Kne(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function qne(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Y5(e){let t=v.useRef(e);return X5(()=>{t.current=e}),t}var X5=typeof window>`u`?v.useEffect:v.useLayoutEffect;function Z5(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function Q5(e){let t=G5(),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function $5(e,t,n,r=[]){let i=v.useRef(),a=U5();return X5(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(V5,s),i.current=s}),i}var Jne=()=>{let[e,t]=v.useState(),n=Z5(()=>new Map);return X5(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Yne(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function e7({asChild:e,children:t},n){return e&&v.isValidElement(t)?v.cloneElement(Yne(t),{ref:t.ref},n(t.props.children)):n(t)}var Xne={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function t7({...e}){return(0,j.jsx)(eo,{"data-slot":`dialog`,...e})}function Zne({...e}){return(0,j.jsx)(oo,{"data-slot":`dialog-portal`,...e})}function Qne({className:e,...t}){return(0,j.jsx)(co,{"data-slot":`dialog-overlay`,className:A(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function n7({className:e,children:t,showCloseButton:n=!0,...r}){return(0,j.jsxs)(Zne,{"data-slot":`dialog-portal`,children:[(0,j.jsx)(Qne,{}),(0,j.jsxs)(po,{"data-slot":`dialog-content`,className:A(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...r,children:[t,n&&(0,j.jsxs)(bo,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 rounded-xs opacity-70 after:absolute after:-inset-3 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,j.jsx)(M_,{}),(0,j.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function r7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`dialog-header`,className:A(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function i7({className:e,showCloseButton:t=!1,children:n,...r}){return(0,j.jsxs)(`div`,{"data-slot":`dialog-footer`,className:A(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,j.jsx)(bo,{asChild:!0,children:(0,j.jsx)(M,{variant:`outline`,children:`Close`})})]})}function a7({className:e,...t}){return(0,j.jsx)(_o,{"data-slot":`dialog-title`,className:A(`text-lg leading-none font-semibold`,e),...t})}function o7({className:e,...t}){return(0,j.jsx)(vo,{"data-slot":`dialog-description`,className:A(`text-sm text-muted-foreground`,e),...t})}function s7({className:e,...t}){return(0,j.jsx)(J5,{"data-slot":`command`,className:A(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t})}function c7({className:e,...t}){return(0,j.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,j.jsx)(i_,{className:`size-4 shrink-0 opacity-50`}),(0,j.jsx)(J5.Input,{"data-slot":`command-input`,className:A(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function l7({className:e,...t}){return(0,j.jsx)(J5.List,{"data-slot":`command-list`,className:A(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function u7({...e}){return(0,j.jsx)(J5.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function $ne({className:e,...t}){return(0,j.jsx)(J5.Group,{"data-slot":`command-group`,className:A(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t})}function d7({className:e,...t}){return(0,j.jsx)(J5.Item,{"data-slot":`command-item`,className:A(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...t})}function f7({...e}){return(0,j.jsx)(jd,{"data-slot":`dropdown-menu`,...e})}function p7({...e}){return(0,j.jsx)(Nd,{"data-slot":`dropdown-menu-trigger`,...e})}function m7({className:e,sideOffset:t=4,...n}){return(0,j.jsx)(Pd,{children:(0,j.jsx)(Id,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:A(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function h7({className:e,inset:t,variant:n=`default`,...r}){return(0,j.jsx)(Rd,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:A(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...r})}function g7({...e}){return(0,j.jsx)(zd,{"data-slot":`dropdown-menu-radio-group`,...e})}function _7({className:e,children:t,...n}){return(0,j.jsxs)(Bd,{"data-slot":`dropdown-menu-radio-item`,className:A(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,j.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,j.jsx)(Vd,{children:(0,j.jsx)(Dh,{className:`size-2 fill-current`})})}),t]})}function ere({className:e,inset:t,...n}){return(0,j.jsx)(Ld,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:A(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function tre({className:e,...t}){return(0,j.jsx)(Hd,{"data-slot":`dropdown-menu-separator`,className:A(`-mx-1 my-1 h-px bg-border`,e),...t})}function v7({...e}){return(0,j.jsx)(nf,{"data-slot":`popover`,...e})}function y7({...e}){return(0,j.jsx)(af,{"data-slot":`popover-trigger`,...e})}function b7({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,j.jsx)(lf,{children:(0,j.jsx)(df,{"data-slot":`popover-content`,align:t,sideOffset:n,className:A(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r})})}function x7({className:e}){return(0,j.jsx)(`svg`,{viewBox:`0 0 21 21`,fill:`none`,"aria-hidden":`true`,focusable:`false`,className:A(`size-[21px] shrink-0`,e),children:(0,j.jsx)(`path`,{fill:`currentColor`,d:`M11.8102 19.1625C11.2327 19.1625 10.6841 19.0528 10.1643 18.8334C9.64459 18.6139 9.18259 18.3078 8.77834 17.9151C8.33944 18.0653 7.88322 18.1404 7.40967 18.1404C6.63582 18.1404 5.91972 17.9498 5.26137 17.5686C4.60302 17.1875 4.07172 16.6677 3.66747 16.0094C3.27477 15.351 3.07842 14.6176 3.07842 13.8091C3.07842 13.4742 3.12462 13.1103 3.21702 12.7176C2.75502 12.2903 2.39697 11.7994 2.14287 11.245C1.88877 10.679 1.76172 10.09 1.76172 9.47785C1.76172 8.85415 1.89454 8.25355 2.16019 7.67605C2.42584 7.09855 2.79544 6.6019 3.26899 6.1861C3.75409 5.75875 4.31427 5.46422 4.94952 5.30252C5.07657 4.64417 5.34222 4.05512 5.74647 3.53537C6.16227 3.00407 6.67047 2.58827 7.27107 2.28797C7.87167 1.98767 8.51269 1.83752 9.19414 1.83752C9.77164 1.83752 10.3203 1.94725 10.84 2.1667C11.3598 2.38615 11.8218 2.69222 12.226 3.08492C12.6649 2.93477 13.1211 2.8597 13.5947 2.8597C14.3685 2.8597 15.0846 3.05027 15.743 3.43142C16.4013 3.81257 16.9269 4.33232 17.3196 4.99067C17.7238 5.64902 17.9259 6.38245 17.9259 7.19095C17.9259 7.5259 17.8797 7.88973 17.7873 8.28242C18.2493 8.70977 18.6074 9.20643 18.8615 9.77238C19.1156 10.3268 19.2426 10.91 19.2426 11.5222C19.2426 12.1459 19.1098 12.7465 18.8442 13.324C18.5785 13.9015 18.2031 14.4039 17.718 14.8313C17.2445 15.2471 16.6901 15.5358 16.0548 15.6975C15.9278 16.3559 15.6564 16.9449 15.2406 17.4647C14.8363 17.996 14.3339 18.4118 13.7333 18.7121C13.1327 19.0124 12.4917 19.1625 11.8102 19.1625ZM7.53094 16.9969C8.10844 16.9969 8.61087 16.8756 9.03822 16.6331L12.2953 14.762C12.4108 14.6811 12.4686 14.5714 12.4686 14.4328V12.9429L8.27592 15.351C8.02182 15.5012 7.76772 15.5012 7.51362 15.351L4.23919 13.4626C4.23919 13.4973 4.23342 13.5377 4.22187 13.5839C4.22187 13.6301 4.22187 13.6994 4.22187 13.7918C4.22187 14.3808 4.36047 14.9237 4.63767 15.4203C4.92642 15.9054 5.32489 16.2866 5.83309 16.5638C6.34129 16.8525 6.90724 16.9969 7.53094 16.9969ZM7.70419 14.1729C7.77349 14.2076 7.83702 14.2249 7.89477 14.2249C7.95252 14.2249 8.01027 14.2076 8.06802 14.1729L9.36739 13.4279L5.19207 11.0024C4.93797 10.8523 4.81092 10.6271 4.81092 10.3268V6.56725C4.23342 6.82135 3.77142 7.21405 3.42492 7.74535C3.07842 8.2651 2.90517 8.8426 2.90517 9.47785C2.90517 10.0438 3.04954 10.5866 3.33829 11.1064C3.62704 11.6261 4.00242 12.0189 4.46442 12.2845L7.70419 14.1729ZM11.8102 18.0191C12.4224 18.0191 12.9768 17.8805 13.4734 17.6033C13.9701 17.3261 14.3628 16.9449 14.6515 16.4598C14.9403 15.9747 15.0846 15.4319 15.0846 14.8313V11.0891C15.0846 10.9505 15.0269 10.8465 14.9114 10.7772L13.5947 10.0149V14.8486C13.5947 15.1489 13.4676 15.3741 13.2135 15.5243L9.93912 17.4127C10.5051 17.817 11.1288 18.0191 11.8102 18.0191ZM12.4686 11.6781V9.32192L10.5108 8.21312L8.53579 9.32192V11.6781L10.5108 12.7869L12.4686 11.6781ZM7.40967 6.15145C7.40967 5.85115 7.53672 5.62592 7.79082 5.47577L11.0652 3.58735C10.4993 3.1831 9.87559 2.98097 9.19414 2.98097C8.58199 2.98097 8.02759 3.11957 7.53094 3.39677C7.03429 3.67397 6.64159 4.05512 6.35284 4.54022C6.07564 5.02532 5.93704 5.56817 5.93704 6.16878V9.89365C5.93704 10.0323 5.99479 10.142 6.11029 10.2228L7.40967 10.9851V6.15145ZM16.2108 14.4328C16.7883 14.1787 17.2445 13.786 17.5794 13.2547C17.9259 12.7234 18.0992 12.1459 18.0992 11.5222C18.0992 10.9562 17.9548 10.4134 17.6661 9.89365C17.3773 9.3739 17.0019 8.9812 16.5399 8.71555L13.3002 6.84445C13.2309 6.79825 13.1673 6.78092 13.1096 6.79248C13.0518 6.79248 12.9941 6.8098 12.9363 6.84445L11.637 7.5721L15.8296 10.0149C15.9567 10.0842 16.0491 10.1766 16.1068 10.2921C16.1761 10.3961 16.2108 10.5231 16.2108 10.6733V14.4328ZM12.7284 5.6317C12.9825 5.47 13.2366 5.47 13.4907 5.6317L16.7825 7.55477C16.7825 7.47393 16.7825 7.36997 16.7825 7.24292C16.7825 6.68852 16.6439 6.163 16.3667 5.66635C16.101 5.15815 15.7141 4.7539 15.2059 4.4536C14.7093 4.1533 14.1318 4.00315 13.4734 4.00315C12.8959 4.00315 12.3935 4.12442 11.9661 4.36697L8.70904 6.23808C8.59354 6.31892 8.53579 6.42865 8.53579 6.56725V8.0572L12.7284 5.6317Z`})})}function nre({busy:e,className:t,...n}){return(0,j.jsxs)(`button`,{type:`button`,"aria-busy":e||void 0,className:A(`inline-flex min-h-[45px] w-full max-w-[242px] items-center justify-center gap-3 rounded-[12px] px-5 py-3 text-[15px] font-medium`,`bg-black text-white hover:opacity-85 active:opacity-70 disabled:opacity-50 dark:bg-white dark:text-black`,`focus-visible:ring-ring/50 outline-none focus-visible:ring-[3px]`,t),...n,children:[(0,j.jsx)(x7,{}),e?`Opening ChatGPT…`:`Continue with ChatGPT`]})}function S7({className:e,primary:t=!1}){return(0,j.jsx)(M,{asChild:!0,size:t?`sm`:`xs`,variant:t?`default`:`link`,className:A(!t&&`h-auto p-0`,e),children:(0,j.jsxs)(`a`,{href:dM,target:`_blank`,rel:`noreferrer`,"aria-label":`Manage ChatGPT usage (opens in a new tab)`,children:[`Manage usage `,(0,j.jsx)(Zh,{"aria-hidden":!0})]})})}function rre(){return(0,j.jsxs)(`span`,{className:`text-muted-foreground inline-flex items-center gap-1.5 text-xs`,"aria-live":`polite`,children:[(0,j.jsx)(x7,{className:`size-4`}),`Using ChatGPT plan`,(0,j.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,j.jsx)(S7,{})]})}function ire(){return(0,j.jsxs)(`div`,{role:`alert`,className:`flex flex-col gap-1 rounded-lg border p-3 text-sm`,children:[(0,j.jsxs)(`span`,{className:`text-muted-foreground inline-flex items-center gap-1.5 text-xs font-medium`,children:[(0,j.jsx)(x7,{className:`size-4`}),` ChatGPT`]}),(0,j.jsx)(`p`,{className:`font-semibold`,children:`Usage limit reached`}),(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Review your plan or this app's limit in ChatGPT settings.`}),(0,j.jsx)(S7,{primary:!0,className:`mt-1 self-start`})]})}function are(){let[e,t]=(0,v.useState)(!1),n=(0,v.useCallback)(()=>{TN().then(e=>{e.ok&&e.value.chatgpt?.welcome&&t(!0)})},[]);(0,v.useEffect)(()=>(n(),window.addEventListener(CN,n),()=>window.removeEventListener(CN,n)),[n]);let r=()=>{t(!1),MN()};return(0,j.jsx)(t7,{open:e,onOpenChange:e=>!e&&r(),children:(0,j.jsxs)(n7,{className:`sm:max-w-sm`,children:[(0,j.jsxs)(r7,{className:`items-center text-center sm:text-center`,children:[(0,j.jsx)(x7,{className:`text-foreground mb-2 size-[72px]`}),(0,j.jsx)(a7,{children:`You're using your ChatGPT plan`}),(0,j.jsx)(o7,{children:`Eligible usage in this app uses your ChatGPT plan. Manage usage in your ChatGPT settings.`})]}),(0,j.jsx)(i7,{className:`sm:justify-center`,children:(0,j.jsx)(M,{onClick:r,children:`Got it`})})]})})}var C7=50,w7={none:`None`,minimal:`Minimal`,low:`Low`,medium:`Medium`,high:`High`,xhigh:`Extra high`,max:`Max`},ore=`custom:`,T7=e=>e.startsWith(ore)&&e.indexOf(`/`)>7?e.slice(0,e.indexOf(`/`)):void 0,E7=e=>T7(e)?e.slice(e.indexOf(`/`)+1):e.slice(e.indexOf(`:`)+1);function sre(e,t=[]){if(T7(e))return E7(e);let n=t.find(t=>t.id===e)?.name;return n&&n!==e?n.replace(/^[^:]{1,40}:\s+/,``):e.replace(/^[a-z][a-z0-9-]*:/,``)}var D7={openrouter:`OpenRouter`,anthropic:`Anthropic`,openai:`OpenAI`,chatgpt:`ChatGPT`};function O7(e,t=[]){let n=T7(e);if(n)return t.find(e=>e.id===n)?.name??`Removed provider`;let r=e.slice(0,Math.max(0,e.indexOf(`:`)));return D7[r]??r}function k7(e,t=[],n=[]){let r=sre(e,t);return T7(e)?`${r} (${O7(e,n)})`:e.startsWith(`openrouter:`)||!(e.split(`:`)[0]in D7)?r:`${r} (${O7(e)})`}var cre={unverified:`not tested`,verified:`tested`,failed:`test failed`};function lre(e){if(!e)return;if(e.input===0&&e.output===0)return`free`;let t=e=>`$${e<1?e.toFixed(2):Number(e.toFixed(2))}`;return`${t(e.input)} in · ${t(e.output)} out per 1M tokens`}function ure(e,t){let n=t.toLowerCase().split(/\s+/).filter(Boolean);return e.filter(e=>{let t=`${e.name} ${e.id}`.toLowerCase();return n.every(e=>t.includes(e))})}function A7(){let[e,t]=(0,v.useState)(),[n,r]=(0,v.useState)(),i=(0,v.useCallback)(async()=>{let e=await fN();e.ok?t(e.value):r(e.error)},[]);return(0,v.useEffect)(()=>{i();let e=()=>void i();return window.addEventListener(CN,e),()=>window.removeEventListener(CN,e)},[i]),{view:e,error:n,refresh:i,choose:(0,v.useCallback)(async e=>{r(void 0);let n=await pN(e);if(!n.ok)return r(n.error);t(e=>e&&{...e,current:n.value,unavailable:null})},[]),togglePin:(0,v.useCallback)(async n=>{if(!e)return;r(void 0);let i=await mN(e.pinned.includes(n)?e.pinned.filter(e=>e!==n):[...e.pinned,n]);if(!i.ok)return r(i.error);t(e=>e&&{...e,pinned:i.value})},[e])}}function dre({model:e,selected:t,names:n}){let r=e.id.startsWith(`chatgpt:`)?`your ChatGPT plan`:e.verification?cre[e.verification]:lre(e.price);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(dh,{className:A(`mt-0.5 self-start`,t?`opacity-100`:`opacity-0`),"aria-hidden":!0}),(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,j.jsx)(`span`,{className:`truncate`,children:e.name}),(0,j.jsxs)(`span`,{className:`text-muted-foreground truncate text-xs`,children:[O7(e.id,n),` · `,E7(e.id),r&&` · ${r}`]})]})]})}function j7({state:e,disabled:t,value:n,onChoose:r,unavailable:i,label:a=`Model`}){let{view:o,error:s,refresh:c,togglePin:l}=e,u=r??e.choose,d=n===void 0,f=o&&n?{...o,current:n,unavailable:i??null}:o,[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(``),_=(0,v.useMemo)(()=>new Map(f?.models.map(e=>[e.id,e])),[f]),y=(0,v.useMemo)(()=>{if(!f)return[];let e=e=>e.flatMap(e=>_.get(e)??[]);if(h.trim()){let e=ure(f.models,h),t=e.slice(0,C7),n=e.length>C7?`First ${C7} of ${e.length} matches`:void 0,r=[...new Set(t.map(e=>O7(e.id,f.providers)))];return r.length<2?[{heading:n,models:t}]:r.map((e,r)=>({heading:r===0&&n?`${n} · ${e}`:e,models:t.filter(t=>O7(t.id,f.providers)===e)}))}let t=new Set(f.pinned),n=new Set([...f.pinned,...f.recent]),r=f.models.filter(e=>e.id.startsWith(`chatgpt:`)),i=f.providers.filter(e=>!e.removed).map(e=>({heading:e.name,models:f.models.filter(t=>t.id.startsWith(`${e.id}/`)&&!n.has(t.id))})),a=[{heading:`Pinned`,models:e(f.pinned)},{heading:`Recent`,models:e(f.recent.filter(e=>!t.has(e)))},{heading:`ChatGPT plan`,models:r.filter(e=>!n.has(e.id))},...i,{heading:`Suggested`,models:e(f.suggested.filter(e=>!e.startsWith(`chatgpt:`)))}],o=new Set(a.flatMap(e=>e.models.map(e=>e.id))),s=_.get(f.current.model);return[...s&&!o.has(s.id)?[{heading:`Current`,models:[s]}]:[],...a].filter(e=>e.models.length>0)},[f,h,_]);if(!f)return s?(0,j.jsx)(`span`,{className:`text-destructive text-xs`,children:s}):null;let b=_.get(f.current.model),x=k7(f.current.model,f.models,f.providers),S=b?.reasoning?.efforts??[],C=b?.reasoning?.defaultEffort,w=f.pinned.includes(f.current.model),T=e=>{m(!1),g(``);let t=f.current.effort&&e.reasoning?.efforts.includes(f.current.effort)?f.current.effort:null;(e.id!==f.current.model||t!==f.current.effort)&&u({model:e.id,effort:t})};return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-1`,children:[(0,j.jsxs)(v7,{open:p,onOpenChange:e=>{m(e),e?c():g(``)},children:[(0,j.jsx)(y7,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-w-64 min-w-0`,"aria-label":`${a}: ${x}. Change model`,disabled:t,children:[(0,j.jsx)(`span`,{className:`truncate`,children:x}),(0,j.jsx)(xh,{"aria-hidden":!0})]})}),(0,j.jsx)(b7,{className:`w-[min(28rem,calc(100vw-2rem))] p-0`,align:`start`,children:(0,j.jsxs)(s7,{shouldFilter:!1,label:`Choose a model`,children:[(0,j.jsx)(c7,{placeholder:`Search models…`,value:h,onValueChange:g}),(0,j.jsxs)(l7,{className:`max-h-80`,label:`Models`,children:[(0,j.jsx)(u7,{children:f.catalog===`unavailable`?`The model list couldn't be loaded.`:`No models match.`}),y.map((e,t)=>(0,j.jsx)($ne,{heading:e.heading,children:e.models.map(e=>(0,j.jsx)(d7,{value:e.id,onSelect:()=>T(e),className:`items-start`,children:(0,j.jsx)(dre,{model:e,selected:e.id===f.current.model,names:f.providers})},e.id))},e.heading??t))]}),f.catalog!==`fresh`&&(0,j.jsx)(`p`,{className:`text-muted-foreground border-t px-3 py-2 text-xs`,children:f.catalog===`stale`?`Couldn't refresh every provider's model list, so some of this is a saved copy.`:`Couldn't load the model list. Search covers only the default model.`})]})})]}),d&&(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,"aria-label":w?`Unpin ${x}`:`Pin ${x}`,"aria-pressed":w,title:w?`Unpin this model`:`Pin this model to the top of the list`,disabled:t,onClick:()=>void l(f.current.model),children:(0,j.jsx)(m_,{className:A(w&&`fill-current`),"aria-hidden":!0})}),S.length>0&&(0,j.jsxs)(f7,{children:[(0,j.jsx)(p7,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,className:`text-muted-foreground`,disabled:t,"aria-label":`${d?`Reasoning effort`:`${a} reasoning effort`}: ${f.current.effort?w7[f.current.effort]:`the model's default`}. Change effort`,children:[f.current.effort?w7[f.current.effort]:`Default effort`,(0,j.jsx)(xh,{"aria-hidden":!0})]})}),(0,j.jsxs)(m7,{align:`start`,children:[(0,j.jsx)(ere,{children:`Reasoning effort`}),(0,j.jsx)(tre,{}),(0,j.jsxs)(g7,{value:f.current.effort??`default`,onValueChange:e=>void u({model:f.current.model,effort:e==="default"?null:e}),children:[(0,j.jsxs)(_7,{value:`default`,children:[`Default`,C?` (${w7[C]})`:``]}),S.map(e=>(0,j.jsx)(_7,{value:e,children:w7[e]},e))]})]})]}),d&&f.current.model.startsWith(`chatgpt:`)&&(0,j.jsx)(rre,{}),f.unavailable&&!s&&(0,j.jsx)(`span`,{role:`alert`,className:`text-destructive text-xs`,children:f.unavailable}),s&&(0,j.jsx)(`span`,{role:`alert`,className:`text-destructive text-xs`,children:s})]})}var M7=`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,N7=`bg-card gap-0`,P7=`border-b px-5 py-4`,F7=`font-heading text-[1.35rem] leading-tight font-medium tracking-[-0.015em]`,I7=`bg-sunken inline-flex max-w-full flex-wrap gap-0.5 self-start rounded-lg border p-0.5`,L7=e=>A(`h-7 rounded-md px-2.5 text-[0.8125rem] font-medium hover:bg-transparent dark:hover:bg-transparent`,e?`bg-card text-foreground hover:bg-card dark:hover:bg-card shadow-xs`:`text-muted-foreground hover:text-foreground`);function fre({onStarted:e,onFreeChat:t}){let n=(0,v.useId)(),[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(`lessons`),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(),d=A7();return(0,j.jsxs)(`form`,{onSubmit:async t=>{t.preventDefault();let n=r.trim();if(!n||s)return;c(!0),u(void 0);let i=await nN(n,a);if(c(!1),!i.ok)return u(i.error);e({session:i.value.session,goal:n})},className:`m-auto flex w-full max-w-xl flex-col gap-5 p-4 sm:p-6`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-2 text-center`,children:[(0,j.jsx)(`h2`,{className:`font-heading text-[2rem] leading-[1.08] font-normal tracking-[-0.024em] text-balance`,children:`What do you want to learn?`}),(0,j.jsx)(D5,{id:`${n}-description`,className:`text-center text-[0.95rem]`,children:`Mivra asks a few quick questions to see what you already know, then plans a course of short lessons.`})]}),(0,j.jsxs)(T5,{"data-invalid":!!l,className:`bg-card border-border-strong shadow-paper rounded-xl border p-4 sm:p-5`,children:[(0,j.jsx)(E5,{htmlFor:n,className:M7,children:`Learning goal`}),(0,j.jsxs)(`div`,{className:`flex gap-2 max-[480px]:flex-col`,children:[(0,j.jsx)(k5,{id:n,"aria-describedby":`${n}-description${l?` ${n}-error`:``}`,"aria-invalid":!!l,value:r,onChange:e=>i(e.target.value),maxLength:300,placeholder:`e.g. Calculus for machine learning`,className:`bg-card dark:bg-card h-10 text-base md:text-base`,autoFocus:!0}),(0,j.jsxs)(M,{type:`submit`,className:`h-10 px-5`,disabled:!r.trim()||s,children:[s&&(0,j.jsx)(p8,{"aria-hidden":`true`}),s?`Starting…`:`Start`]})]}),l&&(0,j.jsx)(O5,{id:`${n}-error`,role:`alert`,children:l}),(0,j.jsxs)(`div`,{className:`flex items-start gap-2.5 pt-1`,children:[(0,j.jsx)(v5,{id:`${n}-project`,"aria-describedby":`${n}-project-description`,checked:a===`project`,onCheckedChange:e=>o(e===!0?`project`:`lessons`),disabled:s,className:`mt-0.5`}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,j.jsx)(E5,{htmlFor:`${n}-project`,className:`font-normal`,children:`Build it as a project in my own repository`}),(0,j.jsxs)(D5,{id:`${n}-project-description`,className:`text-[0.8125rem]`,children:[`Milestones instead of lessons, in any language you have installed, each checked with `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra check`}),`.`]})]})]})]}),(0,j.jsx)(`div`,{className:`flex justify-center`,children:(0,j.jsx)(j7,{state:d,disabled:s})}),(0,j.jsx)(M,{type:`button`,variant:`link`,className:`text-muted-foreground self-center`,onClick:t,children:`Or just chat`})]})}var pre={memory:`From memory`,test:`From the test`,guess:`Guessed`};function R7({course:e,children:t,onUndo:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(),l=e.syllabus;return(0,j.jsxs)(y5,{open:r,onOpenChange:i,className:`bg-sunken/60 shrink-0 border-b`,"aria-label":`Course`,role:`region`,children:[(0,j.jsxs)(`div`,{className:`mx-auto flex max-w-3xl items-center gap-x-2 gap-y-1 px-4 py-2 text-sm max-sm:flex-wrap`,children:[(0,j.jsx)(pg,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":!0}),(0,j.jsx)(`span`,{className:`min-w-0 truncate font-medium max-sm:min-w-48`,children:e.goal}),(0,j.jsx)(f8,{variant:`outline`,className:`border-border-strong bg-card shrink-0 font-mono text-[0.6875rem] font-medium tracking-[0.06em] uppercase`,children:e.status===`interviewing`?`Placement interview`:e.status===`complete`?`Complete`:`In progress`}),e.kind===`project`&&(0,j.jsx)(f8,{variant:`outline`,className:`border-border-strong bg-card shrink-0 font-mono text-[0.6875rem] font-medium tracking-[0.06em] uppercase`,children:`Project`}),l&&(0,j.jsx)(b5,{asChild:!0,children:(0,j.jsxs)(M,{variant:`ghost`,size:`sm`,className:`ml-auto shrink-0`,children:[`Syllabus · `,l.topics.length,` `,e.kind===`project`?`milestones`:`topics`,(0,j.jsx)(ph,{className:A(`transition-transform`,r&&`rotate-180`),"aria-hidden":!0})]})}),t&&(0,j.jsx)(`div`,{className:A(`flex shrink-0 gap-2`,!l&&`ml-auto`),children:t})]}),l?.canUndo&&(0,j.jsxs)(`div`,{className:`mx-auto flex max-w-3xl flex-wrap items-center gap-2 px-4 pb-2 text-sm`,role:`status`,children:[(0,j.jsxs)(`span`,{children:[`Mivra changed the plan: `,l.reason]}),n&&(0,j.jsx)(M,{variant:`outline`,size:`xs`,disabled:a,onClick:async()=>{o(!0),c(await n()),o(!1)},children:`Undo`}),s&&(0,j.jsx)(`span`,{className:`text-destructive`,children:s})]}),l&&(0,j.jsx)(x5,{children:(0,j.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 pt-1 pb-4`,children:(0,j.jsxs)(`div`,{className:`bg-card border-border-strong shadow-paper focus-visible:ring-ring/50 flex max-h-[50svh] flex-col gap-4 overflow-y-auto overscroll-contain rounded-xl border px-4 py-3 outline-none focus-visible:ring-[3px]`,role:`region`,"aria-label":`Syllabus`,tabIndex:0,children:[l.reason&&l.version>1&&(0,j.jsxs)(`p`,{className:`text-muted-foreground`,role:`status`,children:[`Version `,l.version,l.source===`adaptive`?` (changed by Mivra)`:``,`: `,l.reason]}),(0,j.jsx)(`ol`,{className:`flex flex-col`,"aria-label":`Syllabus topics`,children:l.topics.map((e,t)=>(0,j.jsxs)(`li`,{className:A(`flex gap-3 border-t py-3 first:border-t-0`,l.changedTopicIds.includes(e.id)&&`bg-sunken -mx-4 px-4`),children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,className:`bg-sunken text-muted-foreground ring-border-strong mt-0.5 grid size-6 shrink-0 place-items-center rounded-full font-mono text-[0.7rem] font-medium ring-1 ring-inset`,children:t+1}),(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5 wrap-anywhere`,children:[(0,j.jsxs)(`p`,{className:`font-heading text-[1.0625rem] leading-snug font-medium`,children:[e.title,l.changedTopicIds.includes(e.id)&&(0,j.jsxs)(f8,{variant:`secondary`,className:`ml-2 align-middle`,children:[`Changed in v`,l.version]}),e.requestedByLearner&&(0,j.jsx)(f8,{variant:`secondary`,className:`ml-2 align-middle`,children:`You asked for this`})]}),(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:e.summary}),(0,j.jsxs)(`p`,{className:`text-muted-foreground text-[0.8125rem] italic`,children:[`Why: `,e.reason]})]})]},e.id))}),l.known.length>0&&(0,j.jsxs)(`div`,{className:`border-t pt-3`,children:[(0,j.jsx)(`p`,{className:A(`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,`mb-2`),children:`What Mivra thinks you know`}),(0,j.jsx)(`ul`,{className:`flex flex-col`,"aria-label":`What Mivra thinks you know`,children:l.known.map((e,t)=>(0,j.jsxs)(`li`,{className:`flex flex-wrap items-baseline gap-x-2 border-t py-1.5 first:border-t-0 wrap-anywhere`,children:[(0,j.jsx)(`span`,{children:e.concept}),(0,j.jsx)(f8,{variant:`outline`,className:`text-xs`,children:pre[e.source]}),(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:e.note})]},t))})]})]})})})]})}var mre={sigma:u_,calculator:rh,code:kh,terminal:S_,cpu:Fh,database:Lh,network:Vg,shield:c_,"flask-conical":sg,atom:Ym,dna:zh,leaf:Cg,telescope:b_,globe:dg,landmark:yg,"book-open":Zm,"pen-tool":iee,languages:xg,music:qh,palette:eee,camera:ah,brain:$m,users:E_,"chart-line":lh,briefcase:th,scale:n_,stethoscope:g_,"heart-pulse":hg,wrench:A_,dumbbell:Gh};function hre({icon:e,...t}){let n=Jk.safeParse(e),r=n.success?mre[n.data]:pg;return(0,j.jsx)(r,{"data-icon":n.success?n.data:`graduation-cap`,...t})}function z7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`skeleton`,className:A(`animate-pulse rounded-md bg-accent`,e),...t})}function gre(e){let[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)(),a=(0,v.useRef)(void 0),o=(0,v.useCallback)(e=>{a.current=e.revision,n(e.lesson),i(void 0)},[]);return(0,v.useEffect)(()=>{let t=new AbortController;return a.current=void 0,n(void 0),(async()=>{let n=0;for(;!t.signal.aborted;){let r=await sN(e,a.current,t.signal);if(t.signal.aborted)return;if(r.ok){if(n=0,o(r.value),r.value.lesson.status===`finished`)return}else i(r.error),await new Promise(e=>setTimeout(e,Math.min(1e4,1e3*2**n++)))}})(),()=>t.abort()},[e,o]),{lesson:t,error:r,apply:o}}function _re(e){return e===`finished`?` (finished)`:e===`generating`?` (being written)`:e===`failed`?` (stopped)`:e?` (started)`:` (not started)`}function B7({lessons:e,selectedId:t,onSelect:n}){return(0,j.jsx)(`nav`,{"aria-label":`Lessons`,children:(0,j.jsx)(`ol`,{className:`flex flex-col gap-1 text-sm`,children:e.topics.map((e,r)=>{let i=e.lesson?.status;return(0,j.jsx)(`li`,{children:(0,j.jsxs)(`button`,{type:`button`,disabled:!e.lesson,"aria-current":e.lesson?.id===t?`page`:void 0,onClick:()=>e.lesson&&n(e.lesson.id),className:A(`flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left`,e.lesson?`hover:bg-accent`:`text-muted-foreground cursor-default`,e.lesson?.id===t&&`bg-accent font-medium`),children:[(0,j.jsx)(`span`,{className:`mt-0.5 shrink-0`,"aria-hidden":!0,children:i===`finished`?(0,j.jsx)(dh,{className:`text-success size-4`}):i===`generating`?(0,j.jsx)(p8,{"aria-hidden":`true`}):(0,j.jsx)(Ch,{className:`size-4`})}),(0,j.jsxs)(`span`,{className:`min-w-0`,children:[r+1,`. `,e.title,(0,j.jsx)(`span`,{className:`sr-only`,children:_re(i)})]})]})},e.topicId)})})})}function vre({lessonId:e,nextTopic:t,onFinished:n,onStartNext:r,onExplain:i,onChange:a,onLoaded:o,onOpenSection:s,focusSectionId:c,courseComplete:l=!1}){let{lesson:u,error:d,apply:f}=gre(e),[p,m]=(0,v.useState)({}),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(),b=(0,v.useRef)(o);b.current=o,(0,v.useEffect)(()=>{u&&b.current?.(u)},[u]);let x=!!u;if((0,v.useEffect)(()=>{if(!x||!c)return;let e=document.getElementById(`section-${c}`);e?.scrollIntoView({block:`start`}),e?.focus({preventScroll:!0})},[x,c]),!u)return d?(0,j.jsx)(`p`,{className:`text-destructive m-auto p-6`,children:d}):(0,j.jsxs)(`p`,{className:`text-muted-foreground m-auto flex items-center gap-2 p-6`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Loading the lesson…`]});let S=u.status===`generating`,C=u.status===`ready`,w=new Set(u.changedSectionIds),T=u.outline?u.outline.sections.slice(u.sections.length):[],E=async e=>{g(!0),y(void 0);let t=await e();return g(!1),t.ok?f(t.value):y(t.error),t.ok};return(0,j.jsx)(m8.Provider,{value:u.courseId,children:(0,j.jsxs)(`article`,{className:`mx-auto flex w-full max-w-3xl flex-col gap-6 p-4 pb-16`,"aria-busy":S,"aria-labelledby":`lesson-title`,children:[(0,j.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Lesson `,u.position+1]}),(0,j.jsx)(`h2`,{id:`lesson-title`,className:`font-heading text-2xl font-semibold`,children:u.outline?.title??u.topicTitle}),u.status===`finished`&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Finished. This lesson won't change.`}),u.changeReason&&u.version&&u.version>1&&(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,role:`status`,children:[`Version `,u.version,`: `,u.changeReason]})]}),!u.outline&&S&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Planning the lesson…`]}),u.sections.map(t=>(0,j.jsxs)(`section`,{id:`section-${t.id}`,tabIndex:-1,"aria-label":t.title,"data-changed":w.has(t.id)||void 0,className:A(`group flex min-w-0 flex-col gap-2`,w.has(t.id)&&`bg-muted/60 -mx-3 rounded-lg px-3 py-2`),children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`h3`,{className:`font-heading text-lg font-medium`,children:t.title}),w.has(t.id)&&(0,j.jsxs)(f8,{variant:`secondary`,children:[`Changed in v`,u.version]}),(i||a&&C)&&(0,j.jsxs)(`div`,{className:`ml-auto flex gap-1`,children:[i&&(0,j.jsxs)(M,{variant:`ghost`,size:`xs`,onClick:()=>i(t),"aria-label":`Explain: ${t.title}`,children:[(0,j.jsx)(Th,{"aria-hidden":!0}),` Explain`]}),a&&C&&(0,j.jsxs)(M,{variant:`ghost`,size:`xs`,onClick:()=>a(t),"aria-label":`Change: ${t.title}`,children:[(0,j.jsx)(Jg,{"aria-hidden":!0}),` Change`]})]})]}),t.kind===`prose`?(0,j.jsxs)(j.Fragment,{children:[t.revisits.length>0&&(0,j.jsx)(`ul`,{className:`flex flex-wrap gap-2 text-sm`,"aria-label":`Revisits`,children:t.revisits.map(e=>(0,j.jsx)(`li`,{children:(0,j.jsxs)(M,{variant:`outline`,size:`xs`,onClick:()=>s?.(e.lessonId,e.sectionId),disabled:!s,children:[(0,j.jsx)(Nh,{"aria-hidden":!0}),` `,e.lessonTitle,`: `,e.title]})},e.sectionId))}),(0,j.jsx)(W0,{text:t.markdown})]}):(0,j.jsx)(f5,{data:t.artifact?.id?p[t.artifact.id]??t.artifact:t.artifact,replyInProgress:!1,onUpdate:e=>m(t=>_5(t,{[e.id]:e})),onRefresh:async()=>{let t=await sN(e);t.ok&&f(t.value)}})]},t.id)),S&&T.map((e,t)=>(0,j.jsxs)(`section`,{"aria-label":`${e.title} (being written)`,className:`flex flex-col gap-2`,children:[(0,j.jsx)(`h3`,{className:`font-heading text-muted-foreground text-lg font-medium`,children:e.title}),t===0?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Writing…`]}),(0,j.jsx)(z7,{className:`h-16 w-full`})]}):(0,j.jsx)(z7,{className:`h-4 w-1/3`})]},`pending-${t}`)),u.status===`failed`&&(0,j.jsxs)(f2,{variant:`destructive`,children:[(0,j.jsx)(p2,{children:u.error}),(0,j.jsxs)(m2,{children:[(0,j.jsxs)(`p`,{children:[`The sections above are kept. Mivra can carry on from here`,u.errorAction===`lesson-model`?` once the lesson model can be used`:``,`.`]}),(0,j.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[u.errorAction===`lesson-model`&&(0,j.jsx)(M,{size:`sm`,variant:`outline`,onClick:()=>window.dispatchEvent(new Event(`mivra:open-settings`)),children:`Lesson model settings`}),(0,j.jsx)(M,{size:`sm`,disabled:h,onClick:()=>void E(()=>lN(e)),children:`Continue writing`})]})]})]}),(u.status===`ready`||u.status===`finished`)&&(0,j.jsxs)(`footer`,{className:`flex flex-col gap-3 border-t pt-4`,"aria-live":`polite`,children:[u.status===`ready`?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[u.checks.answered,` of `,u.checks.total,` checks answered.`,!u.canFinish&&(u.sections.some(e=>e.kind===`artifact`&&e.artifact.kind===`project_milestone`)?` Answer every check and run mivra check on the milestone to finish; it doesn't have to pass.`:` Answer every check to finish; your score doesn't matter.`)]}),(0,j.jsx)(M,{className:`self-start`,disabled:!u.canFinish||h,onClick:async()=>{await E(()=>cN(e))&&n()},children:`Finish lesson`})]}):t?(0,j.jsxs)(M,{className:`self-start`,disabled:h,onClick:async()=>{g(!0),await r(t.id),g(!1)},children:[`Next lesson: `,t.title]}):l?(0,j.jsx)(`p`,{className:`font-medium`,children:`You've reached the end of the syllabus.`}):null,_&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:_})]}),d&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:d})]})})}function V7({delayDuration:e=0,...t}){return(0,j.jsx)(cm,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function H7({...e}){return(0,j.jsx)(fm,{"data-slot":`tooltip`,...e})}function U7({...e}){return(0,j.jsx)(mm,{"data-slot":`tooltip-trigger`,...e})}function W7({className:e,sideOffset:t=0,children:n,...r}){return(0,j.jsx)(vm,{children:(0,j.jsxs)(bm,{"data-slot":`tooltip-content`,sideOffset:t,className:A(`z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,e),...r,children:[n,(0,j.jsx)(wm,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var yre=`Only text is read: images and diagrams aren't, and formulas may come through garbled.`,G7=new Set;function bre(e){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(),[a,o]=(0,v.useState)(),s=(0,v.useRef)(e);s.current=e;let c=(0,v.useRef)(!0);(0,v.useEffect)(()=>(c.current=!0,()=>{c.current=!1}),[]),(0,v.useEffect)(()=>{n([]),i(void 0),o(void 0);let t=!1,r=()=>void UM(e).then(e=>{t||(e.ok?n(t=>[...e.value,...t.filter(t=>!e.value.some(e=>e.id===t.id))]):o(e.error))});r();let a=t=>{t===e&&r()};return G7.add(a),()=>{t=!0,G7.delete(a)}},[e]);let l=(0,v.useCallback)(async()=>{let t=await UM(e);c.current&&s.current===e&&(t.ok?n(e=>[...t.value,...e.filter(e=>!t.value.some(t=>t.id===e.id))]):o(t.error))},[e]);return{documents:t,uploading:r,error:a,upload:(0,v.useCallback)(async t=>{if(o(void 0),t.size>26214400)return o(`${t.name} is over the ${Rj/1048576} MB limit.`);i(t.name);let r=await WM(e,t);if(c.current)s.current===e&&(i(void 0),r.ok?n(e=>[...e.filter(e=>e.id!==r.value.id),r.value]):o(r.error));else if(r.ok)for(let t of G7)t(e)},[e]),remove:(0,v.useCallback)(async t=>{o(void 0);let r=await GM(t);s.current===e&&(r.ok?n(e=>e.filter(e=>e.id!==t)):o(r.error))},[e]),refresh:l}}function xre({kind:e,pageCount:t,pagesWithText:n}){let r=`${t} ${e===`pptx`?`slide`:`page`}${t===1?``:`s`}`;return n<t?`${r}, ${n} with text`:r}function Sre({documents:{uploading:e,upload:t}}){let n=(0,v.useRef)(null);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`input`,{ref:n,type:`file`,accept:`.pdf,.pptx`,className:`hidden`,"data-testid":`document-input`,onChange:e=>{let n=e.target.files?.[0];e.target.value=``,n&&t(n)}}),(0,j.jsx)(V7,{delayDuration:400,children:(0,j.jsxs)(H7,{children:[(0,j.jsx)(U7,{asChild:!0,children:(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Attach a PDF or PowerPoint file`,disabled:e!==void 0,onClick:()=>n.current?.click(),children:e===void 0?(0,j.jsx)(nee,{"aria-hidden":`true`}):(0,j.jsx)(p8,{"aria-hidden":`true`})})}),(0,j.jsx)(W7,{children:`Attach a PDF or PowerPoint file`})]})})]})}function K7({documents:{documents:e,uploading:t,error:n,remove:r},messageId:i}){let a=e.filter(e=>(e.messageId??void 0)===i);return i&&(t=void 0,n=void 0),a.length===0&&t===void 0&&!n?null:(0,j.jsxs)(`div`,{className:`mx-auto flex max-w-3xl flex-col gap-1.5 px-3 pt-3 text-sm`,children:[a.length>0&&(0,j.jsx)(`ul`,{"aria-label":`Attached documents`,className:`flex flex-wrap gap-1.5`,children:a.map(e=>(0,j.jsxs)(`li`,{className:`bg-muted text-foreground flex max-w-full min-w-0 flex-wrap items-center gap-1.5 rounded-md border py-0.5 pr-0.5 pl-2`,children:[(0,j.jsx)(ag,{className:`text-muted-foreground size-3.5 shrink-0`,"aria-hidden":!0}),(0,j.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.filename,children:e.filename}),(0,j.jsx)(`span`,{className:`text-muted-foreground shrink-0 text-xs`,children:xre(e)}),(0,j.jsx)(V7,{delayDuration:400,children:(0,j.jsxs)(H7,{children:[(0,j.jsx)(U7,{asChild:!0,children:(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6`,"aria-label":`Remove ${e.filename}`,onClick:()=>void r(e.id),children:(0,j.jsx)(M_,{"aria-hidden":`true`})})}),(0,j.jsx)(W7,{children:`Remove attachment`})]})})]},e.id))}),t!==void 0&&(0,j.jsxs)(`p`,{role:`status`,className:`text-muted-foreground flex min-w-0 items-center gap-2`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),(0,j.jsxs)(`span`,{className:`truncate`,children:[`Reading `,t,`…`]})]}),n&&(0,j.jsx)(`p`,{role:`alert`,className:`text-destructive wrap-anywhere`,children:n}),a.length>0&&!i&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:yre})]})}var q7=(0,v.createContext)(null),Cre=()=>{let e=(0,v.useContext)(q7);if(!e)throw Error(`ChainOfThought components must be used within ChainOfThought`);return e},J7=(0,v.memo)(({className:e,open:t,defaultOpen:n=!1,onOpenChange:r,children:i,...a})=>{let[o,s]=Qn({prop:t,defaultProp:n,onChange:r}),c=(0,v.useMemo)(()=>({isOpen:o}),[o]);return(0,j.jsx)(q7.Provider,{value:c,children:(0,j.jsx)(y5,{asChild:!0,open:o,onOpenChange:s,children:(0,j.jsx)(`div`,{className:A(`not-prose min-w-0 max-w-prose space-y-4`,e),...a,children:i})})})}),Y7=(0,v.memo)(({className:e,children:t,...n})=>{let{isOpen:r}=Cre();return(0,j.jsxs)(b5,{className:A(`flex min-w-0 w-full items-center gap-2 rounded-sm text-muted-foreground text-sm hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,e),...n,children:[(0,j.jsx)($m,{"aria-hidden":`true`,className:`size-4 shrink-0`}),(0,j.jsx)(`span`,{className:`min-w-0 flex-1 text-left wrap-anywhere`,children:t??`Chain of Thought`}),(0,j.jsx)(ph,{"aria-hidden":`true`,className:A(`size-4 shrink-0`,r?`rotate-180`:`rotate-0`)})]})}),X7=(0,v.memo)(({className:e,icon:t=Vh,label:n,description:r,status:i=`complete`,children:a,...o})=>(0,j.jsxs)(`div`,{className:A(`flex min-w-0 gap-2 text-sm`,{complete:`text-muted-foreground`,active:`text-foreground`,pending:`text-muted-foreground/50`}[i],e),...o,children:[(0,j.jsxs)(`div`,{"aria-hidden":`true`,className:`relative mt-0.5 shrink-0`,children:[(0,j.jsx)(t,{className:`size-4`}),(0,j.jsx)(`div`,{className:`-mx-px absolute top-7 bottom-0 left-1/2 w-px bg-border`})]}),(0,j.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 wrap-anywhere`,children:[(0,j.jsx)(`div`,{children:n}),r&&(0,j.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:r}),a]})]})),Z7=(0,v.memo)(({className:e,children:t,...n})=>(0,j.jsx)(x5,{className:A(`mt-2 min-w-0 space-y-3 text-foreground outline-none`,e),...n,children:t}));J7.displayName=`ChainOfThought`,Y7.displayName=`ChainOfThoughtHeader`,X7.displayName=`ChainOfThoughtStep`,Z7.displayName=`ChainOfThoughtContent`;function Q7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`empty`,className:A(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12`,e),...t})}function $7({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`empty-header`,className:A(`flex max-w-sm flex-col items-center gap-2 text-center`,e),...t})}var wre=se(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6`}},defaultVariants:{variant:`default`}});function e9({className:e,variant:t=`default`,...n}){return(0,j.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:A(wre({variant:t,className:e})),...n})}function t9({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`empty-title`,className:A(`text-lg font-medium tracking-tight`,e),...t})}function n9({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`empty-description`,className:A(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function r9({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`empty-content`,className:A(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,e),...t})}function i9({...e}){return(0,j.jsx)(eo,{"data-slot":`sheet`,...e})}function Tre({...e}){return(0,j.jsx)(oo,{"data-slot":`sheet-portal`,...e})}function Ere({className:e,...t}){return(0,j.jsx)(co,{"data-slot":`sheet-overlay`,className:A(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function a9({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,j.jsxs)(Tre,{children:[(0,j.jsx)(Ere,{}),(0,j.jsxs)(po,{"data-slot":`sheet-content`,className:A(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,j.jsxs)(bo,{className:`absolute top-4 right-4 rounded-xs opacity-70 after:absolute after:-inset-3 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,j.jsx)(M_,{className:`size-4`}),(0,j.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function o9({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sheet-header`,className:A(`flex flex-col gap-1.5 p-4`,e),...t})}function s9({className:e,...t}){return(0,j.jsx)(_o,{"data-slot":`sheet-title`,className:A(`font-semibold text-foreground`,e),...t})}function c9({className:e,...t}){return(0,j.jsx)(vo,{"data-slot":`sheet-description`,className:A(`text-sm text-muted-foreground`,e),...t})}function Dre({className:e,value:t,...n}){return(0,j.jsx)(Ef,{"data-slot":`progress`,className:A(`relative h-2 w-full overflow-hidden rounded-full bg-primary/20`,e),...n,children:(0,j.jsx)(Of,{"data-slot":`progress-indicator`,className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(t||0)}%)`}})})}function l9(){let[e,t]=(0,v.useState)({step:`idle`}),n=async()=>{t({step:`busy`});let e=await HN();t(e.ok?{step:`done`,filename:e.filename}:{step:`error`,error:e.error})};return(0,j.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,j.jsxs)(M,{type:`button`,variant:`outline`,className:`self-start`,disabled:e.step===`busy`,onClick:()=>void n(),children:[e.step===`busy`?(0,j.jsx)(p8,{"aria-hidden":`true`}):(0,j.jsx)(Uh,{"aria-hidden":`true`}),`Export to Obsidian`]}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,role:`status`,children:e.step===`done`?`Downloaded ${e.filename}. Unzip it into your vault: it adds a Mivra folder of concepts and memories that link to your notes.`:`Concepts and memories as linked notes, for your Obsidian vault. Your own notes aren't included.`}),e.step===`error`&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:e.error})]})}var Ore=Gj*4,kre=1048576;function Are(e){let t=(e.webkitRelativePath||e.name).split(`/`);return t.length<2?{folder:void 0,path:t[0]}:{folder:t[0],path:t.slice(1).join(`/`)}}function jre(e){let t,n=[],r=[],i=0,a=0;for(let o of Array.from(e)){let e=Are(o);t??=e.folder;let{path:s}=e;if(!s.split(`/`).some(e=>e.startsWith(`.`)||e===``)){if(!/\.md$/i.test(s))i++;else if(o.size>Ore)r.push(s);else{if(n.length>=1e4)return{ok:!1,error:`This folder has more than ${Wj.toLocaleString(`en`)} notes, more than one import can take.`};if(a+=o.size,a>67108864)return{ok:!1,error:`This folder's notes come to more than ${Kj/kre} MB, more than one import can take.`};n.push({path:s,file:o})}}}return n.sort((e,t)=>e.path.localeCompare(t.path)),{ok:!0,folder:t,notes:n,tooLong:r,notMarkdown:i}}async function Mre(e,t){let n=jre(e);if(!n.ok)return n;let{folder:r,notes:i,notMarkdown:a}=n,o=[...n.tooLong],s=[];t?.(0,i.length);for(let[e,{path:n,file:r}]of i.entries()){let a;try{a=await r.text()}catch{return{ok:!1,error:`Couldn't read ${n}. It may have been moved or deleted; choose the folder again.`}}a.length>1e6?o.push(n):s.push({path:n,text:a}),t?.(e+1,i.length)}return{ok:!0,vault:{folder:r,files:s,notMarkdown:a,tooLong:o}}}var u9=(e,t,n=`${t}s`)=>`${e.toLocaleString(`en`)} ${e===1?t:n}`,Nre=1500,d9=e=>e.status===`queued`||e.status===`running`;function Pre({open:e,onOpenChange:t,onOpenGraph:n}){let r=(0,v.useRef)(!1),[i,a]=(0,v.useState)(),[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)({open:!1,key:0}),u=e=>l(t=>({open:!0,key:t.key+1,...e?{reimport:e}:{}}));(0,v.useEffect)(()=>{if(!e)return;let t=!1;return a(void 0),s(void 0),l(e=>({...e,open:!1})),KM().then(e=>{t||(e.ok?a(e.value):s(e.error))}),()=>{t=!0}},[e]);let d=({import:e})=>a((t=[])=>t.some(t=>t.id===e.id)?t.map(t=>t.id===e.id?e:t):[...t,e]),f=(e,t)=>a(n=>n?.map(n=>n.id===e?{...n,distillation:t}:n)),p=!!i?.some(e=>d9(e.distillation));return(0,v.useEffect)(()=>{if(!e||!p)return;let t=!1,n=setInterval(()=>{KM().then(e=>{!t&&e.ok&&a(e.value)})},Nre);return()=>{t=!0,clearInterval(n)}},[e,p]),(0,j.jsxs)(i9,{open:e,onOpenChange:t,children:[(0,j.jsxs)(a9,{className:`w-full overflow-y-auto sm:max-w-md`,onCloseAutoFocus:e=>{e.preventDefault(),r.current?(r.current=!1,document.querySelector(`[data-notes-graph-start]`)?.focus()):(document.querySelector(`[data-imports-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,j.jsxs)(o9,{children:[(0,j.jsx)(s9,{className:`font-heading`,children:`Imported notes`}),(0,j.jsx)(c9,{children:`Notes from your Obsidian vaults. They're read-only here: edit them in Obsidian, then re-import the vault.`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pb-4`,"aria-live":`polite`,children:[i&&i.length>0&&(0,j.jsxs)(M,{type:`button`,className:`self-start`,onClick:()=>u(),children:[(0,j.jsx)(lg,{"aria-hidden":`true`}),`Import a vault`]}),i&&i.length>0&&(0,j.jsx)(l9,{}),o&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:o}),!i&&!o&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Loading imports…`]}),i?.length===0&&(0,j.jsxs)(Q7,{className:`border p-6 md:p-6`,children:[(0,j.jsxs)($7,{children:[(0,j.jsx)(e9,{variant:`icon`,children:(0,j.jsx)(Tg,{"aria-hidden":`true`})}),(0,j.jsx)(t9,{children:`No vaults imported yet`}),(0,j.jsx)(n9,{children:`Import an Obsidian vault to bring its notes, links and tags into Mivra. Only Markdown notes are read.`})]}),(0,j.jsx)(r9,{children:(0,j.jsxs)(M,{type:`button`,onClick:()=>u(),children:[(0,j.jsx)(lg,{"aria-hidden":`true`}),`Import a vault`]})})]}),i&&i.length>0&&(0,j.jsx)(`ul`,{className:`flex flex-col gap-2`,"aria-label":`Imported vaults`,children:i.map(e=>(0,j.jsx)(Fre,{entry:e,onReimport:()=>u(e),onGraph:n&&(()=>{r.current=!0,n(e.id),t(!1)}),onDelete:()=>a(t=>t?.filter(t=>t.id!==e.id)),onDistillation:t=>f(e.id,t)},e.id))})]})]}),(0,j.jsx)(Rre,{open:c.open,onOpenChange:e=>{e||l(e=>({...e,open:!1}))},imports:i??[],...c.reimport?{reimport:c.reimport}:{},onImported:d},c.key)]})}function Fre({entry:e,onReimport:t,onGraph:n,onDelete:r,onDistillation:i}){let[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(),d=async()=>{c(!0),u(void 0);let t=await qM(e.id);c(!1),t.ok?r():u(t.error)};return(0,j.jsxs)(`li`,{className:`flex flex-col gap-2 rounded-lg border p-3 text-sm wrap-anywhere`,"aria-label":e.name,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,j.jsx)(`span`,{className:`font-medium`,children:e.name}),(0,j.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[u9(e.noteCount,`note`),` · Updated `,new Date(e.updatedAt).toLocaleDateString()]})]}),(0,j.jsx)(Ire,{entry:e,onChange:i}),a?(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Delete this import and its `,u9(e.noteCount,`note`),`, with the concepts and memories drawn from them? Your vault itself isn't touched.`]}),(0,j.jsxs)(M,{type:`button`,variant:`destructive`,size:`sm`,disabled:s,onClick:()=>void d(),children:[s&&(0,j.jsx)(p8,{"aria-hidden":`true`}),`Yes, delete`]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:s,onClick:()=>o(!1),children:`Keep`})]}):(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n&&e.noteCount>0&&(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:n,children:[(0,j.jsx)(O_,{"aria-hidden":`true`}),`Graph`]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:t,children:`Re-import`}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>o(!0),children:`Delete`})]}),l&&(0,j.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:l})]})}function Ire({entry:e,onChange:t}){let n=e.distillation,[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(),s=async n=>{i(!0),o(void 0);let r=await n(e.id);i(!1),r.ok?t(r.value):o(r.error)},c=`${u9(n.concepts,`concept`)} and ${u9(n.memories,`memory`,`memories`)} drawn from these notes`,l;if(d9(n)){let e=n.groups>0?Math.round(n.groupsDone/n.groups*100):0;l=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),n.status===`queued`?`Waiting to read these notes for concepts…`:n.groups>0?`Reading notes for concepts… group ${Math.min(n.groupsDone+1,n.groups).toLocaleString(`en`)} of ${n.groups.toLocaleString(`en`)}`:`Reading notes for concepts…`]}),(0,j.jsx)(Dre,{value:e,"aria-label":`Reading notes for concepts`}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,disabled:r,onClick:()=>void s(YM),children:`Cancel`})]})}else if(n.pendingNotes>0){let e=n.status===`failed`?`Reading notes for concepts stopped: ${n.error??`the model request failed.`}`:n.status===`cancelled`?`Cancelled. ${u9(n.pendingNotes,`note`)} not read for concepts yet.`:`${u9(n.pendingNotes,`note`)} not read for concepts yet.`;l=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:n.status===`failed`?`text-destructive`:`text-muted-foreground`,children:e}),(n.concepts>0||n.memories>0)&&(0,j.jsxs)(`p`,{className:`text-muted-foreground`,children:[`So far: `,c,`.`]}),(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,disabled:r,onClick:()=>void s(JM),children:[r&&(0,j.jsx)(p8,{"aria-hidden":`true`}),n.status===`failed`?`Try again`:n.status===`cancelled`?`Resume`:`Read notes`]})]})}else if(n.concepts>0||n.memories>0)l=(0,j.jsxs)(`p`,{className:`text-muted-foreground`,children:[c[0].toUpperCase()+c.slice(1),`.`]});else return null;return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,role:`group`,"aria-label":`Concepts from these notes`,children:[l,a&&(0,j.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:a})]})}var Lre=e=>e.replace(/\.zip$/i,``).trim(),f9=e=>(e.kind===`zip`?Lre(e.file.name):e.vault.folder??``).slice(0,120);function Rre({open:e,onOpenChange:t,imports:n,reimport:r,onImported:i}){let a=(0,v.useId)(),o=(0,v.useRef)(null),s=(0,v.useRef)(null),[c,l]=(0,v.useState)({step:`choose`}),[u,d]=(0,v.useState)(``),f=(0,v.useRef)(0);(0,v.useEffect)(()=>{e&&(f.current++,l({step:`choose`}),d(``))},[e]);let p=r??n.find(e=>e.name===u.trim()),m=p?{importId:p.id}:{name:u.trim()},h=async e=>{let t=++f.current;l({step:`reading`,read:0,total:0});let n=await Mre(e,(e,n)=>{f.current===t&&l({step:`reading`,read:e,total:n})});if(f.current!==t)return;if(!n.ok)return l({step:`choose`,error:n.error});if(n.vault.files.length===0)return l({step:`choose`,error:`No Markdown notes were found in this folder. Choose the folder that holds your vault's notes.`});let r={kind:`folder`,vault:n.vault};d(f9(r)),l({step:`ready`,source:r})},g=e=>{f.current++;let t={kind:`zip`,file:e};d(f9(t)),l({step:`ready`,source:t})},_=async e=>{if(e.preventDefault(),c.step!==`ready`)return;let{source:t}=c,n=++f.current;l({step:`sending`,source:t});let r=t.kind===`zip`?await tN(m,t.file):await eN(m,t.vault.files);if(f.current===n){if(!r.ok)return l({step:`ready`,source:t,error:r.error});i(r.value),l({step:`done`,result:r.value,source:t,replaced:!!p})}},y=r?`Re-import ${r.name}`:`Import an Obsidian vault`;return(0,j.jsx)(t7,{open:e,onOpenChange:t,children:(0,j.jsxs)(n7,{className:`sm:max-w-lg`,children:[(0,j.jsxs)(r7,{children:[(0,j.jsx)(a7,{className:`font-heading wrap-anywhere`,children:y}),(0,j.jsx)(o7,{children:r?`Choose the same vault again. Changed notes are updated, new ones added, and notes that are gone from it removed.`:`Choose your vault's folder. Only Markdown notes are read; attachments and hidden folders such as .obsidian are left out.`})]}),(0,j.jsx)(`input`,{ref:o,type:`file`,multiple:!0,className:`hidden`,"data-testid":`vault-folder-input`,webkitdirectory:``,onChange:e=>{let t=e.target.files;t&&t.length>0&&h(t),e.target.value=``}}),(0,j.jsx)(`input`,{ref:s,type:`file`,accept:`.zip,application/zip`,className:`hidden`,"data-testid":`vault-zip-input`,onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t&&g(t)}}),c.step===`choose`&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,j.jsxs)(T5,{"data-invalid":!!c.error,children:[(0,j.jsxs)(M,{type:`button`,onClick:()=>o.current?.click(),children:[(0,j.jsx)(lg,{"aria-hidden":`true`}),`Choose vault folder`]}),c.error&&(0,j.jsx)(O5,{role:`alert`,children:c.error})]}),(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Can't choose a folder on this device?`,` `,(0,j.jsx)(M,{type:`button`,variant:`link`,className:`h-auto p-0`,onClick:()=>s.current?.click(),children:`Upload a .zip instead`})]})]}),c.step===`reading`&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),c.total>0?`Reading notes… ${c.read.toLocaleString(`en`)} of ${c.total.toLocaleString(`en`)}`:`Looking through the folder…`]}),(c.step===`ready`||c.step===`sending`)&&(0,j.jsxs)(`form`,{onSubmit:_,className:`flex flex-col gap-4`,children:[(0,j.jsx)(zre,{source:c.source}),!r&&(0,j.jsxs)(T5,{"data-invalid":c.step===`ready`&&!!c.error,children:[(0,j.jsx)(E5,{htmlFor:a,children:`Import name`}),(0,j.jsx)(k5,{id:a,value:u,maxLength:120,disabled:c.step===`sending`,onChange:e=>d(e.target.value),"aria-describedby":`${a}-description`}),(0,j.jsx)(D5,{id:`${a}-description`,children:p?`An import called ${p.name} already exists, so this re-imports it: changed notes are updated and notes that are gone are removed.`:`Tells your imports apart. Import the same vault under this name again to update it.`})]}),c.step===`ready`&&c.error&&(0,j.jsx)(O5,{role:`alert`,className:`wrap-anywhere`,children:c.error}),c.step===`sending`&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),c.source.kind===`zip`?`Uploading and unpacking the zip…`:`Sending ${u9(c.source.vault.files.length,`note`)}…`]}),(0,j.jsxs)(i7,{children:[(0,j.jsx)(M,{type:`button`,variant:`outline`,disabled:c.step===`sending`,onClick:()=>l({step:`choose`}),children:`Choose again`}),(0,j.jsxs)(M,{type:`submit`,disabled:c.step===`sending`||!r&&!u.trim(),children:[c.step===`sending`&&(0,j.jsx)(p8,{"aria-hidden":`true`}),p?`Re-import`:`Import`]})]})]}),c.step===`done`&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,j.jsx)(Vre,{result:c.result,source:c.source,replaced:c.replaced}),(0,j.jsx)(i7,{children:(0,j.jsx)(M,{type:`button`,onClick:()=>t(!1),children:`Done`})})]})]})})}function zre({source:e}){if(e.kind===`zip`)return(0,j.jsxs)(`p`,{className:`flex items-center gap-2 text-sm wrap-anywhere`,children:[(0,j.jsx)(rg,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),e.file.name,` (`,(e.file.size/1048576).toFixed(1),` MB)`]});let{vault:t}=e,n=[t.notMarkdown>0&&u9(t.notMarkdown,`other file`),t.tooLong.length>0&&u9(t.tooLong.length,`note`)+` too long to import`].filter(Boolean);return(0,j.jsxs)(`div`,{className:`flex flex-col gap-1 text-sm`,children:[(0,j.jsxs)(`p`,{className:`flex items-center gap-2 wrap-anywhere`,children:[(0,j.jsx)(lg,{className:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`}),u9(t.files.length,`note`),` found`,t.folder?` in ${t.folder}`:``]}),n.length>0&&(0,j.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Left out: `,n.join(`, `),`.`]})]})}var Bre={not_markdown:`not a note`,hidden:`hidden`,bad_path:`unsafe path`,duplicate:`duplicate`,too_long:`too long`,symlink:`link to another file`,generated:`exported by Mivra`};function Vre({result:e,source:t,replaced:n}){let r=t.kind===`folder`?t.vault.tooLong:[],i=t.kind===`folder`?t.vault.notMarkdown:0,a=[...r.map(e=>({path:e,reason:`too_long`})),...e.skipped],o=e.skippedCount+r.length+i,s=[[`Added`,e.added],[`Updated`,e.updated],[`Removed`,e.removed],[`Unchanged`,e.unchanged]];return(0,j.jsxs)(`div`,{className:`flex flex-col gap-3 text-sm`,role:`status`,children:[(0,j.jsxs)(`p`,{className:`wrap-anywhere`,children:[n?`Re-imported`:`Imported`,` `,(0,j.jsx)(`span`,{className:`font-medium`,children:e.import.name}),`: `,u9(e.import.noteCount,`note`),` in all.`]}),(0,j.jsx)(`dl`,{className:`grid grid-cols-4 gap-2`,"aria-label":`What changed`,children:s.map(([e,t])=>(0,j.jsxs)(`div`,{className:`bg-muted flex flex-col rounded-md px-2 py-1.5`,children:[(0,j.jsx)(`dt`,{className:`text-muted-foreground text-xs`,children:e}),(0,j.jsx)(`dd`,{className:`font-medium tabular-nums`,children:t.toLocaleString(`en`)})]},e))}),o>0&&(0,j.jsxs)(`div`,{className:`text-muted-foreground flex flex-col gap-1`,children:[(0,j.jsxs)(`p`,{children:[`Skipped `,u9(o,`file`),i>0?`, including ${u9(i,`attachment or other file`,`attachments and other files`)}`:``,`.`]}),a.length>0&&(0,j.jsxs)(`ul`,{className:`list-disc pl-5 wrap-anywhere`,children:[a.slice(0,5).map(e=>(0,j.jsxs)(`li`,{children:[e.path,` (`,Bre[e.reason],`)`]},`${e.path}:${e.reason}`)),a.length>5&&(0,j.jsx)(`li`,{children:`…`})]})]}),e.truncated&&(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Some links or tags were left out: a note or the vault had more than Mivra keeps.`}),d9(e.import.distillation)&&(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Mivra is now reading the new and changed notes for concepts and memories, using your model. Follow or cancel it in the list.`})]})}var Hre=[{kind:`goal`,title:`Goals`},{kind:`preference`,title:`Preferences`},{kind:`misconception`,title:`Misconceptions`},{kind:`known`,title:`Known from your notes`}],Ure=[{value:`all`,label:`All`},{value:`import`,label:`From notes`},{value:`other`,label:`From learning`}],Wre=(e,t)=>e===`all`||e===`import`==(t.basis===`import`),Gre=e=>e.basis===`import`?e.source?`From your note ${e.source.title}`:`From your notes`:e.basis===`wrong_answer`?`From a wrong answer`:`From chat`;function Kre({open:e,onOpenChange:t}){let[n,r]=(0,v.useState)(),[i,a]=(0,v.useState)(),[o,s]=(0,v.useState)(`all`),c=n?.filter(e=>e.basis===`import`).length??0,l=n?.filter(e=>Wre(o,e));return(0,v.useEffect)(()=>{if(!e)return;let t=!1;r(void 0),s(`all`);let n=()=>{a(void 0),zM().then(e=>{t||(e.ok?r(e.value):a(e.error))})};return n(),window.addEventListener(`focus`,n),()=>{t=!0,window.removeEventListener(`focus`,n)}},[e]),(0,j.jsx)(i9,{open:e,onOpenChange:t,children:(0,j.jsxs)(a9,{className:A(`w-full overflow-y-auto sm:max-w-md`,N7),onCloseAutoFocus:e=>{e.preventDefault(),(document.querySelector(`[data-memory-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,j.jsxs)(o9,{className:P7,children:[(0,j.jsx)(s9,{className:F7,children:`Memory`}),(0,j.jsx)(c9,{children:`What Mivra has noted about you across sessions. It can be wrong, so correct or delete anything here.`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-5 px-5 py-5`,"aria-live":`polite`,children:[i&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:i}),!n&&!i&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Loading memories…`]}),n?.length===0&&(0,j.jsxs)(Q7,{className:`bg-sunken/50 border border-dashed p-6 md:p-6`,children:[(0,j.jsxs)($7,{children:[(0,j.jsx)(e9,{variant:`icon`,children:(0,j.jsx)($m,{"aria-hidden":`true`})}),(0,j.jsx)(t9,{children:`No memories yet`}),(0,j.jsx)(n9,{children:`Start a conversation or course. As you learn, Mivra can remember your goals, preferences and concepts to revisit.`})]}),(0,j.jsx)(r9,{children:(0,j.jsx)(M,{variant:`outline`,onClick:()=>t(!1),children:`Back to learning`})})]}),c>0&&(0,j.jsx)(qre,{filter:o,onFilter:s,count:c,onDeleted:()=>{r(e=>e?.filter(e=>e.basis!==`import`)),s(`all`)}}),l&&Hre.map(({kind:e,title:t})=>{let n=l.filter(t=>t.kind===e);return n.length>0?(0,j.jsxs)(`section`,{className:`flex flex-col gap-1.5 [section+&]:border-t [section+&]:pt-4`,children:[(0,j.jsx)(`h2`,{className:`text-muted-foreground font-mono text-[0.6875rem] leading-snug font-medium tracking-[0.09em] uppercase`,children:t}),(0,j.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:n.map(e=>(0,j.jsx)(Jre,{memory:e,onChange:e=>r(t=>t?.map(t=>t.id===e.id?e:t)),onDelete:()=>r(t=>t?.filter(t=>t.id!==e.id))},e.id))})]},e):null}),n&&n.length>0&&(0,j.jsx)(`div`,{className:`border-t pt-4`,children:(0,j.jsx)(l9,{})})]})]})})}function qre({filter:e,onFilter:t,count:n,onDeleted:r}){let[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(),u=async()=>{s(!0),l(void 0);let e=await HM();if(s(!1),!e.ok)return l(e.error);a(!1),r()};return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[(0,j.jsx)(`div`,{className:I7,role:`group`,"aria-label":`Show memories`,children:Ure.map(({value:n,label:r})=>(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`ghost`,className:L7(e===n),"aria-pressed":e===n,onClick:()=>t(n),children:r},n))}),e===`import`&&(i?(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Delete all `,n.toLocaleString(`en`),` memories drawn from your notes? Your notes stay imported.`]}),(0,j.jsxs)(M,{type:`button`,variant:`destructive`,size:`sm`,disabled:o,onClick:()=>void u(),children:[o&&(0,j.jsx)(p8,{"aria-hidden":`true`}),`Yes, delete all`]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:o,onClick:()=>a(!1),children:`Keep`})]}):(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,onClick:()=>a(!0),children:`Delete all from notes`})),c&&(0,j.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:c})]})}function Jre({memory:e,onChange:t,onDelete:n}){let r=(0,v.useId)(),[i,a]=(0,v.useState)(`view`),[o,s]=(0,v.useState)(e.text??``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(),f=async n=>{n.preventDefault(),l(!0),d(void 0);let r=await BM(e.id,o);if(l(!1),!r.ok)return d(r.error);t(r.value),a(`view`)},p=async()=>{l(!0),d(void 0);let t=await VM(e.id);l(!1),t.ok?n():d(t.error)};return(0,j.jsxs)(`li`,{className:`hover:bg-sunken focus-within:bg-sunken -mx-2.5 flex flex-col gap-1.5 rounded-lg px-2.5 py-2.5 text-[0.95rem] leading-snug wrap-anywhere transition-colors`,children:[i===`edit`?(0,j.jsxs)(`form`,{onSubmit:f,className:`flex flex-col gap-2`,children:[(0,j.jsxs)(T5,{"data-invalid":!!u,children:[(0,j.jsx)(E5,{htmlFor:r,children:`Memory text`}),(0,j.jsx)(h2,{id:r,"aria-describedby":`${r}-description${u?` ${r}-error`:``}`,"aria-invalid":!!u,value:o,maxLength:300,onChange:e=>s(e.target.value),autoFocus:!0}),(0,j.jsx)(D5,{id:`${r}-description`,children:`Correct what Mivra should remember. Up to 300 characters.`}),u&&(0,j.jsx)(O5,{id:`${r}-error`,role:`alert`,children:u})]}),(0,j.jsxs)(`div`,{className:`flex gap-2`,children:[(0,j.jsxs)(M,{type:`submit`,size:`sm`,disabled:c||!o.trim(),children:[c&&(0,j.jsx)(p8,{"aria-hidden":`true`}),c?`Saving…`:`Save`]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{s(e.text??``),d(void 0),a(`view`)},children:`Cancel`})]})]}):(0,j.jsxs)(j.Fragment,{children:[e.held?(0,j.jsx)(`p`,{className:`text-muted-foreground italic`,children:`Hidden until you answer the check in that session.`}):(0,j.jsx)(`p`,{children:e.text}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[!e.held&&(0,j.jsx)(`span`,{className:`text-muted-foreground max-w-full truncate text-[0.8125rem]`,title:e.source?`${e.source.importName}: ${e.source.path}`:void 0,children:Gre(e)}),e.editedAt&&(0,j.jsx)(f8,{variant:`outline`,children:`Edited by you`}),(0,j.jsx)(`span`,{className:`text-muted-foreground font-mono text-[0.72rem]`,children:new Date(e.createdAt).toLocaleDateString()})]}),i===`confirm-delete`?(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:`Delete permanently?`}),(0,j.jsx)(M,{type:`button`,variant:`destructive`,size:`sm`,disabled:c,onClick:()=>void p(),children:`Yes, delete`}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(`view`),children:`Keep`})]}):(0,j.jsxs)(`div`,{className:`flex gap-1.5`,children:[!e.held&&(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 bg-card dark:bg-card border-border-strong dark:border-border-strong hover:bg-sunken dark:hover:bg-sunken`,onClick:()=>{s(e.text??``),a(`edit`)},children:`Edit`}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`h-7 bg-card dark:bg-card border-border-strong dark:border-border-strong hover:bg-sunken dark:hover:bg-sunken`,onClick:()=>a(`confirm-delete`),children:`Delete`})]})]}),u&&i!==`edit`&&(0,j.jsx)(`p`,{className:`text-destructive`,role:`alert`,children:u})]})}function Yre({...e}){return(0,j.jsx)(ep,{"data-slot":`select`,...e})}function Xre({...e}){return(0,j.jsx)(ip,{"data-slot":`select-value`,...e})}function Zre({className:e,size:t=`default`,children:n,...r}){return(0,j.jsxs)(np,{"data-slot":`select-trigger`,"data-size":t,className:A(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,j.jsx)(ap,{asChild:!0,children:(0,j.jsx)(ph,{className:`size-4 opacity-50`})})]})}function Qre({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,j.jsx)(cp,{children:(0,j.jsxs)(up,{"data-slot":`select-content`,className:A(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,j.jsx)(eie,{}),(0,j.jsx)(Sp,{className:A(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,j.jsx)(tie,{})]})})}function $re({className:e,children:t,...n}){return(0,j.jsxs)(Op,{"data-slot":`select-item`,className:A(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,j.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,j.jsx)(Mp,{children:(0,j.jsx)(dh,{className:`size-4`})})}),(0,j.jsx)(Ap,{children:t})]})}function eie({className:e,...t}){return(0,j.jsx)(Pp,{"data-slot":`select-scroll-up-button`,className:A(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,j.jsx)(yh,{className:`size-4`})})}function tie({className:e,...t}){return(0,j.jsx)(Ip,{"data-slot":`select-scroll-down-button`,className:A(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,j.jsx)(ph,{className:`size-4`})})}var nie=220,rie=70,iie=4e4,p9=40,m9=14;function aie(e=1){let t=e;return()=>(t=(t*1664525+1013904223)%4294967296,t/4294967296)}function oie(e,t){return e===`note`?5+Math.min(7,Math.sqrt(t)*1.4):e===`ghost`?4:5+Math.min(5,Math.sqrt(t))}function sie(e){let t=new Map(e.nodes.map((e,t)=>[e.id,t])),n=e.edges.flatMap(({from:e,to:n})=>{let r=t.get(e),i=t.get(n);return r===void 0||i===void 0||r===i?[]:[[r,i]]}),r=e.nodes.map(()=>0);for(let[e,t]of n)r[e]++,r[t]++;let i=e.nodes.map((e,t)=>({index:t,radius:oie(e.kind,r[t])}));if(i.length>0){let e=Math.min(1,60/i.length),t=Math.round(Math.min(nie,Math.max(rie,iie/i.length))),r=Math.round(t*.65);x3(i).stop().randomSource(aie()).alphaDecay(1-.001**(1/t)).force(`link`,B4(n.map(([e,t])=>({source:e,target:t}))).id(e=>e.index).distance(e=>26+e.source.radius+e.target.radius)).force(`charge`,S3().strength(-90-120*e).theta(.9).distanceMax(250)).force(`x`,C3().strength(.06)).force(`y`,w3().strength(.06)).tick(r).force(`collide`,L4(e=>e.radius+m9).iterations(1)).tick(t-r)}let a=i.length>0?i.map(e=>e.x):[0],o=i.length>0?i.map(e=>e.y):[0],s=Math.min(...a)-p9,c=Math.min(...o)-p9,l=Math.max(...a)+p9-s,u=Math.max(...o)+p9+m9-c;return{width:Math.max(l,200),height:Math.max(u,160),nodes:i.map((t,n)=>({id:e.nodes[n].id,x:t.x-s,y:t.y-c,radius:t.radius})),edges:n}}var h9=`__all`,g9=1.25,_9=.1,v9=3,cie=1.6,lie=150,uie=14,die=200,y9=(e,t,n=`${t}s`)=>`${e.toLocaleString(`en`)} ${e===1?t:n}`,b9=e=>Math.min(v9,Math.max(_9,e));function fie(e,t){let n=y9(t,`connection`);switch(e.kind){case`note`:return`${e.label}, note in ${e.path}, ${n}`;case`tag`:return`${e.label}, tag on ${y9(e.notes??0,`note`)}`;case`concept`:return`${e.label}, concept from ${y9(e.notes??0,`note`)}`;case`ghost`:return`${e.label}, unresolved link, no such note`}}var x9,pie=0;function mie(e){let[t,n]=(0,v.useState)();return(0,v.useEffect)(()=>{if(!e)return;let t=()=>n({view:e,layout:sie(e)});if(typeof Worker>`u`)return t();let r;try{r=x9??=new Worker(new URL(`/assets/notes-graph.worker-Dqb5HK34.js`,``+import.meta.url),{type:`module`,name:`mivra-graph-layout`})}catch{return t()}let i=++pie,a=!1,o=()=>{a=!0,r.removeEventListener(`message`,s),r.removeEventListener(`error`,c)},s=t=>{t.data.id===i&&(o(),n({view:e,layout:t.data.layout}))},c=()=>{o(),r.terminate(),x9===r&&(x9=void 0),t()};return r.addEventListener(`message`,s),r.addEventListener(`error`,c),r.postMessage({id:i,view:{nodes:e.nodes,edges:e.edges}}),()=>{a||(o(),r.terminate(),x9===r&&(x9=void 0))}},[e]),{drawn:t,pending:!!(e&&t?.view!==e)}}function hie({importId:e}){let[t,n]=(0,v.useState)(e);(0,v.useEffect)(()=>n(e),[e]);let[r,i]=(0,v.useState)([]);(0,v.useEffect)(()=>{KM().then(e=>e.ok&&i(e.value))},[]);let[a,o]=(0,v.useState)({mode:`auto`,depth:2}),[s,c]=(0,v.useState)({loading:!0});(0,v.useEffect)(()=>{let e=!1;return c(e=>({...e,loading:!0,error:void 0})),XM(t,a).then(t=>{e||c(t.ok?{view:t.value,loading:!1}:{error:t.error,loading:!1})}),()=>{e=!0}},[t,a]);let l=s.view,u=mie(l),[d,f]=(0,v.useState)(),[p,m]=(0,v.useState)();(0,v.useEffect)(()=>{l&&f(e=>e&&l.nodes.some(t=>t.id===e)?e:l.focus??void 0)},[l]);let h=e=>{n(e),o({mode:`auto`,depth:2}),f(void 0)},g=e=>{f(e),o(t=>({...t,focus:e,mode:l&&l.matchingNotes>500?`local`:t.mode}))},_=e=>{f(e.id),e.kind===`note`&&m(e.id)},y=r.find(e=>e.id===t)?.name,b=!!(l&&l.matchingNotes>500);return(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,"data-testid":`notes-graph`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2 border-b p-3`,role:`toolbar`,"aria-label":`Graph filters`,children:[(0,j.jsx)(C9,{label:`Import`,value:t,onChange:h,options:(r.length>0?r:[{id:t,name:`This import`}]).map(e=>({value:e.id,text:e.name}))}),(0,j.jsx)(C9,{label:`Tag`,value:a.tag??h9,onChange:e=>o(t=>({...t,tag:e===h9?void 0:e})),options:[{value:h9,text:`All tags`},...S9(l?.tags.map(e=>({value:e.name,text:`#${e.name} (${e.notes})`}))??[],a.tag,e=>`#${e}`)]}),(0,j.jsx)(C9,{label:`Folder`,value:a.folder??h9,onChange:e=>o(t=>({...t,folder:e===h9?void 0:e})),options:[{value:h9,text:`All folders`},...S9(l?.folders.map(e=>({value:e.path,text:`${e.path} (${e.notes})`}))??[],a.folder,e=>e)]}),(0,j.jsx)(C9,{label:`Show`,value:a.mode===`local`||b?`local`:`auto`,onChange:e=>o(t=>({...t,mode:e})),options:[{value:`auto`,text:b?`Whole graph (over 500 notes)`:`Whole graph`,disabled:b},{value:`local`,text:`Around the selected note`}]}),(a.mode===`local`||b)&&(0,j.jsx)(C9,{label:`Reach`,value:String(a.depth),onChange:e=>o(t=>({...t,depth:Number(e)})),options:[1,2,3].map(e=>({value:String(e),text:y9(e,`hop`)}))}),(0,j.jsx)(gie,{importId:t,onPick:e=>g(e.id)})]}),(0,j.jsx)(_ie,{view:l,loading:s.loading||u.pending,error:s.error,importName:y}),!u.drawn&&!s.error&&(s.loading||u.pending)&&(0,j.jsxs)(`div`,{"aria-hidden":!0,className:`text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm`,children:[(0,j.jsx)(p8,{}),`Drawing the graph…`]}),u.drawn&&(0,j.jsx)(bie,{view:u.drawn.view,layout:u.drawn.layout,selected:d,onSelect:f,onActivate:_}),(0,j.jsx)(Sie,{noteId:p,onOpenChange:e=>!e&&m(void 0),onCentre:e=>{m(void 0),o(t=>({...t,mode:`local`,focus:e})),f(e)}})]})}function S9(e,t,n){return t&&!e.some(e=>e.value===t)?[{value:t,text:n(t)},...e]:e}function C9({label:e,value:t,onChange:n,options:r}){let i=(0,v.useId)();return(0,j.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,j.jsx)(`span`,{id:i,className:`text-muted-foreground text-xs`,children:e}),(0,j.jsxs)(Yre,{value:t,onValueChange:n,children:[(0,j.jsx)(Zre,{size:`sm`,"aria-labelledby":i,className:`max-w-56`,children:(0,j.jsx)(Xre,{})}),(0,j.jsx)(Qre,{position:`popper`,className:`max-h-80`,children:r.map(e=>(0,j.jsx)($re,{value:e.value,disabled:e.disabled,children:e.text},e.value))})]})]})}function gie({importId:e,onPick:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)([]);return(0,v.useEffect)(()=>{let t=i.trim();if(!t)return s([]);let n=!1,r=setTimeout(()=>{ZM(e,t).then(e=>{!n&&e.ok&&s(e.value)})},die);return()=>{n=!0,clearTimeout(r)}},[e,i]),(0,j.jsxs)(v7,{open:n,onOpenChange:r,children:[(0,j.jsx)(y7,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,children:[(0,j.jsx)(i_,{}),`Find a note`]})}),(0,j.jsx)(b7,{className:`w-80 p-0`,align:`start`,children:(0,j.jsxs)(s7,{shouldFilter:!1,children:[(0,j.jsx)(c7,{placeholder:`Title or path`,value:i,onValueChange:a,"aria-label":`Find a note by title or path`}),(0,j.jsxs)(l7,{children:[i.trim()&&(0,j.jsx)(u7,{children:`No note matches.`}),o.map(e=>(0,j.jsx)(d7,{value:e.id,onSelect:()=>{r(!1),a(``),t(e)},children:(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,j.jsx)(`span`,{className:`truncate`,children:e.title}),(0,j.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.path})]})},e.id))]})]})})]})}function _ie({view:e,loading:t,error:n,importName:r}){let i=``;if(e){let t=t=>e.nodes.filter(e=>e.kind===t).length,n=[y9(t(`note`),`note`),y9(t(`tag`),`tag`),y9(t(`concept`),`concept`),y9(t(`ghost`),`unresolved link`)],r=e.nodes.find(t=>t.id===e.focus),a=e.mode===`whole`?`Whole graph`:`Around ${r?.label??`the best-connected note`}, within ${y9(e.depth,`hop`)}`,o=e.matchingNotes===e.totalNotes?y9(e.totalNotes,`note`):`${y9(e.matchingNotes,`matching note`)} (${y9(e.totalNotes,`note`)} in all)`;i=`${a}: ${n.join(`, `)}, of ${o}.${e.truncated?` Only the nearest are drawn; filter or centre on a note to see others.`:``}`,e.matchingNotes===0&&(i=e.totalNotes===0?`This import has no notes.`:`No note matches these filters.`)}return(0,j.jsxs)(`div`,{className:`flex min-h-9 items-center gap-2 border-b px-3 py-1.5 text-sm`,children:[r&&(0,j.jsxs)(`span`,{className:`sr-only`,children:[r,`.`]}),(0,j.jsx)(`p`,{role:`status`,"aria-live":`polite`,className:A(`min-w-0 flex-1`,n?`text-destructive`:`text-muted-foreground`),"data-testid":`notes-graph-status`,children:n??i}),t&&(0,j.jsx)(p8,{"aria-label":`Loading the graph`}),(0,j.jsx)(vie,{})]})}function vie(){return(0,j.jsx)(`ul`,{className:`text-muted-foreground hidden shrink-0 items-center gap-3 text-xs sm:flex`,"aria-hidden":`true`,children:[[`note`,`Note`],[`concept`,`Concept`],[`tag`,`Tag`],[`ghost`,`Unresolved`]].map(([e,t])=>(0,j.jsxs)(`li`,{className:`flex items-center gap-1`,children:[(0,j.jsx)(`svg`,{viewBox:`-7 -7 14 14`,className:`size-3.5 overflow-visible`,children:(0,j.jsx)(w9,{kind:e,radius:5,emphasis:!1})}),t]},e))})}function w9({kind:e,radius:t,emphasis:n}){switch(e){case`note`:return(0,j.jsx)(`circle`,{r:t,className:n?`fill-foreground`:`fill-muted-foreground`});case`concept`:return(0,j.jsx)(`polygon`,{points:`0,${-t*1.2} ${t*1.2},0 0,${t*1.2} ${-t*1.2},0`,className:A(`stroke-foreground stroke-[1.5]`,n?`fill-foreground`:`fill-card`)});case`tag`:return(0,j.jsx)(`rect`,{x:-t,y:-t,width:t*2,height:t*2,rx:1.5,className:A(`stroke-muted-foreground stroke-[1.5]`,n?`fill-muted-foreground`:`fill-muted`)});case`ghost`:return(0,j.jsx)(`circle`,{r:t,className:A(`fill-card stroke-muted-foreground stroke-[1.5]`,n&&`stroke-foreground`),strokeDasharray:`2 2`})}}function yie(e,t,n){let[r,i]={ArrowRight:[1,0],ArrowLeft:[-1,0],ArrowDown:[0,1],ArrowUp:[0,-1]}[n]??[0,0];if(r===0&&i===0)return;let a=e.nodes[t],o,s=1/0;return e.nodes.forEach((e,n)=>{let c=e.x-a.x,l=e.y-a.y,u=c*r+l*i;if(n===t||u<=0)return;let d=u+Math.abs(c*i-l*r)*2;d<s&&(s=d,o=n)}),o}function bie({view:e,layout:t,selected:n,onSelect:r,onActivate:i}){let a=(0,v.useMemo)(()=>new Map(e.nodes.map((e,t)=>[e.id,t])),[e]),o=(0,v.useMemo)(()=>{let n=e.nodes.map(()=>new Set);for(let[e,r]of t.edges)n[e].add(r),n[r].add(e);return n},[e,t]),s=(0,v.useRef)(null),[c,l]=(0,v.useState)(1),u=()=>{let e=s.current;return!e||e.clientWidth===0?1:b9(Math.min(cie,e.clientWidth/t.width,e.clientHeight/t.height))},d=n===void 0?void 0:a.get(n),f=(e,n)=>{let r=s.current;if(!r)return;let i=e===void 0?void 0:t.nodes[e];r.scrollLeft=i?i.x*n-r.clientWidth/2:(t.width*n-r.clientWidth)/2,r.scrollTop=i?i.y*n-r.clientHeight/2:(t.height*n-r.clientHeight)/2};(0,v.useLayoutEffect)(()=>{let t=u();l(t),requestAnimationFrame(()=>f(e.focus?a.get(e.focus):void 0,t))},[t]);let p=e=>{let t=b9(e);l(t),requestAnimationFrame(()=>f(d,t))},[m,h]=(0,v.useState)(),g=m!==void 0&&m<e.nodes.length?m:d??0;(0,v.useEffect)(()=>h(void 0),[e]);let _=(0,v.useRef)(new Map),y=e=>{h(e);let t=_.current.get(e);t?.focus({preventScroll:!0}),t?.scrollIntoView?.({block:`nearest`,inline:`nearest`})},b=(i,o)=>{if(i.key===`Escape`){n!==void 0&&(i.stopPropagation(),r(void 0));return}if(i.key===`Home`){i.preventDefault(),y(e.focus?a.get(e.focus)??0:0);return}let s=yie(t,o,i.key);i.key.startsWith(`Arrow`)&&i.preventDefault(),s!==void 0&&y(s)},x=(0,v.useRef)(void 0),S=e=>{let t=s.current;t&&e.button===0&&!e.target.closest(`button`)&&(x.current={x:e.clientX,y:e.clientY,left:t.scrollLeft,top:t.scrollTop},e.currentTarget.setPointerCapture?.(e.pointerId))},C=e=>{let t=s.current;t&&x.current&&(t.scrollLeft=x.current.left-(e.clientX-x.current.x),t.scrollTop=x.current.top-(e.clientY-x.current.y))},w=()=>x.current=void 0,[T,E]=(0,v.useState)(),D=new Set;for(let e of[d,T,m])if(e!==void 0&&(D.add(e),e===d))for(let t of o[e]??[])D.add(t);let O=e.nodes.length<=lie||c>=1.5,ee=d!==void 0,te=e=>Math.max(uie,e*2*c),ne=(0,v.useId)(),re=e.nodes[g];return e.nodes.length===0?(0,j.jsx)(`div`,{className:`flex-1`}):(0,j.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,j.jsx)(`div`,{ref:s,className:`bg-background flex min-h-64 flex-1 cursor-grab overflow-auto active:cursor-grabbing`,onPointerDown:S,onPointerMove:C,onPointerUp:w,onPointerCancel:w,"data-testid":`notes-graph-scroll`,children:(0,j.jsxs)(`div`,{className:`relative m-auto shrink-0`,style:{width:t.width*c,height:t.height*c},"data-testid":`notes-graph-canvas`,"data-zoom":c.toFixed(3),children:[(0,j.jsxs)(`svg`,{viewBox:`0 0 ${t.width} ${t.height}`,className:`absolute inset-0 size-full`,"aria-hidden":`true`,children:[(0,j.jsx)(`defs`,{children:(0,j.jsx)(`marker`,{id:`${ne}-arrow`,viewBox:`0 0 10 10`,refX:`10`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,j.jsx)(`path`,{d:`M 0 0 L 10 5 L 0 10 z`,className:`fill-muted-foreground`})})}),t.edges.map(([n,r],i)=>{let a=e.edges[i],o=t.nodes[n],s=t.nodes[r],c=d!==void 0&&(n===d||r===d),l=Math.hypot(s.x-o.x,s.y-o.y)||1,u=a.kind===`prerequisite`?s.radius+2:0;return(0,j.jsx)(`line`,{x1:o.x,y1:o.y,x2:s.x-(s.x-o.x)/l*u,y2:s.y-(s.y-o.y)/l*u,className:A(c?`stroke-foreground`:`stroke-muted-foreground`,ee&&!c&&`opacity-25`),strokeOpacity:c?1:a.kind===`tag`||a.kind===`concept`?.45:.7,strokeWidth:c?1.6:1,strokeDasharray:a.kind===`tag`||a.kind===`concept`?`3 3`:void 0,markerEnd:a.kind===`prerequisite`?`url(#${ne}-arrow)`:void 0,"data-testid":`notes-graph-edge`,"data-kind":a.kind},i)}),t.nodes.map((t,n)=>(0,j.jsxs)(`g`,{transform:`translate(${t.x} ${t.y})`,className:A(ee&&!D.has(n)&&`opacity-35`),children:[(n===d||e.focus===t.id&&d===void 0)&&(0,j.jsx)(`circle`,{r:t.radius+4,className:`fill-none stroke-foreground stroke-[1.5]`}),(0,j.jsx)(w9,{kind:e.nodes[n].kind,radius:t.radius,emphasis:D.has(n)})]},t.id))]}),(0,j.jsx)(`div`,{className:`pointer-events-none absolute inset-0 text-[11px] leading-tight`,"aria-hidden":`true`,children:t.nodes.map((t,n)=>O||D.has(n)||e.focus===t.id?(0,j.jsx)(`span`,{className:A(`bg-background/80 absolute max-w-40 -translate-x-1/2 truncate rounded-sm px-0.5`,D.has(n)?`text-foreground font-medium`:`text-muted-foreground`,e.nodes[n].kind===`ghost`&&`italic`,ee&&!D.has(n)&&`opacity-50`),style:{left:t.x*c,top:t.y*c+t.radius*c+2},"data-testid":`notes-graph-label`,children:e.nodes[n].label},t.id):null)}),(0,j.jsx)(`div`,{role:`group`,"aria-label":`Notes graph. Arrow keys move between nodes by where they're drawn; Enter opens a note.`,"aria-describedby":ne,className:`absolute inset-0`,children:t.nodes.map((t,n)=>{let r=e.nodes[n],a=te(t.radius);return(0,j.jsx)(`button`,{ref:e=>{e?_.current.set(n,e):_.current.delete(n)},type:`button`,tabIndex:n===g?0:-1,"aria-label":fie(r,o[n].size),"aria-pressed":n===d,className:A(`focus-visible:ring-ring/60 absolute -translate-x-1/2 -translate-y-1/2 cursor-pointer rounded-full outline-none focus-visible:ring-[3px]`,n===d&&`z-10`),style:{left:t.x*c,top:t.y*c,width:a,height:a},onClick:()=>{h(n),i(r)},onFocus:()=>h(n),onKeyDown:e=>b(e,n),onPointerEnter:()=>E(n),onPointerLeave:()=>E(e=>e===n?void 0:e),"data-testid":`notes-graph-node`,"data-node":t.id,"data-kind":r.kind},t.id)})})]})}),(0,j.jsx)(`p`,{id:ne,className:`sr-only`,"aria-live":`polite`,"data-testid":`notes-graph-neighbours`,children:re&&m!==void 0?xie(e,o[g],re):``}),(0,j.jsxs)(`div`,{className:`bg-card/90 absolute right-3 bottom-3 flex gap-1 rounded-md border p-1 shadow-xs`,role:`group`,"aria-label":`Zoom`,children:[(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Zoom out`,onClick:()=>p(c/g9),disabled:c<=_9,children:(0,j.jsx)(Fg,{})}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Fit to the window`,onClick:()=>p(u()),children:(0,j.jsx)(kg,{})}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Zoom in`,onClick:()=>p(c*g9),disabled:c>=v9,children:(0,j.jsx)(Qg,{})})]})]})}function xie(e,t,n){let r=[...t].map(t=>e.nodes[t]).map(e=>e.kind===`ghost`?`${e.label} (unresolved)`:e.label),i=r.slice(0,12),a=r.length-i.length;return r.length===0?`${n.label} connects to nothing drawn.`:`${n.label} connects to ${i.join(`, `)}${a>0?` and ${y9(a,`more`)}`:``}.`}function Sie({noteId:e,onOpenChange:t,onCentre:n}){let[r,i]=(0,v.useState)();(0,v.useEffect)(()=>{if(!e)return;let t=!1;return i({id:e}),QM(e).then(n=>{t||i(n.ok?{id:e,view:n.value}:{id:e,error:n.error})}),()=>{t=!0}},[e]);let a=r?.view;return(0,j.jsx)(i9,{open:!!e,onOpenChange:t,children:(0,j.jsxs)(a9,{className:`w-full overflow-y-auto sm:max-w-xl`,"data-testid":`note-reader`,onCloseAutoFocus:e=>{let t=r&&document.querySelector(`[data-testid="notes-graph-node"][data-node="${CSS.escape(r.id)}"]`);t&&(e.preventDefault(),t.focus())},children:[(0,j.jsxs)(o9,{children:[(0,j.jsx)(s9,{className:`font-heading wrap-anywhere`,children:a?.title??`Note`}),(0,j.jsx)(c9,{className:`wrap-anywhere`,children:a?`${a.path} · read-only`:r?.error?`Couldn't open this note.`:`Loading…`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-3 px-4 pb-6`,children:[r?.error&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,children:r.error}),!a&&!r?.error&&(0,j.jsx)(p8,{"aria-label":`Loading the note`}),a&&(0,j.jsxs)(j.Fragment,{children:[(a.tags.length>0||a.aliases.length>0)&&(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[a.tags.map(e=>(0,j.jsxs)(f8,{variant:`secondary`,children:[`#`,e]},e)),a.aliases.length>0&&(0,j.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`Also called `,a.aliases.join(`, `)]})]}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,className:`self-start`,onClick:()=>n(a.id),children:`Show the graph around this note`}),(0,j.jsx)(`div`,{className:`text-sm leading-relaxed wrap-anywhere whitespace-pre-wrap`,"data-testid":`note-body`,children:a.body})]})]})]})})}function Cie({custom:e,canEdit:t,onChange:n}){let[r,i]=(0,v.useState)(!1);return(0,j.jsxs)(`section`,{className:`flex flex-col gap-3`,"aria-labelledby":`custom-providers-heading`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(`h2`,{id:`custom-providers-heading`,className:`text-sm font-semibold`,children:`OpenAI-compatible providers`}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Any service with an OpenAI-compatible Chat Completions API, such as a local server or another provider. Compatibility varies: test each model before relying on it.`})]}),e.map(e=>(0,j.jsx)(Eie,{provider:e,canEdit:t,onChange:n},e.id)),t&&(r?(0,j.jsx)(Tie,{onDone:()=>i(!1),onChange:n}):(0,j.jsx)(M,{type:`button`,variant:`outline`,className:`self-start`,onClick:()=>i(!0),children:`Add an OpenAI-compatible provider`}))]})}var T9=`The API base, including any version prefix, such as https://api.example.com/v1 or http://127.0.0.1:11434/v1. Not the full /chat/completions address.`,wie=e=>[...new Set(e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean))];function Tie({onDone:e,onChange:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)();return(0,j.jsxs)(`form`,{onSubmit:async r=>{r.preventDefault(),d(!0),p(void 0);let a=await LN({name:n,baseUrl:i.trim()||null,...o.trim()?{key:o.trim()}:{},models:wie(c).map(e=>({id:e}))});if(!a.ok)return d(!1),p(a.error);t(a.value);let s=a.value.custom.at(-1);if(s?.baseUrl.value){let e=await BN(s.id);e.ok&&t(e.value)}d(!1),e()},className:`flex flex-col gap-3 rounded-lg border p-3`,"aria-label":`Add an OpenAI-compatible provider`,children:[(0,j.jsxs)(T5,{children:[(0,j.jsx)(E5,{htmlFor:`custom-new-name`,children:`Provider name`}),(0,j.jsx)(k5,{id:`custom-new-name`,value:n,onChange:e=>r(e.target.value),disabled:u,autoComplete:`off`,placeholder:`DeepSeek`})]}),(0,j.jsxs)(T5,{children:[(0,j.jsx)(E5,{htmlFor:`custom-new-url`,children:`API base URL`}),(0,j.jsx)(D5,{id:`custom-new-url-help`,children:T9}),(0,j.jsx)(k5,{id:`custom-new-url`,"aria-describedby":`custom-new-url-help`,value:i,onChange:e=>a(e.target.value),disabled:u,autoComplete:`off`,spellCheck:!1,inputMode:`url`,placeholder:`https://api.example.com/v1`})]}),(0,j.jsxs)(T5,{children:[(0,j.jsx)(E5,{htmlFor:`custom-new-key`,children:`API key`}),(0,j.jsx)(D5,{id:`custom-new-key-help`,children:`Kept on this computer and never shown again. Leave it empty for a local server that needs none.`}),(0,j.jsx)(k5,{id:`custom-new-key`,"aria-describedby":`custom-new-key-help`,type:`password`,value:o,onChange:e=>s(e.target.value),disabled:u,autoComplete:`off`,spellCheck:!1,placeholder:`Paste your API key`})]}),(0,j.jsxs)(T5,{children:[(0,j.jsx)(E5,{htmlFor:`custom-new-models`,children:`Model ids`}),(0,j.jsx)(D5,{id:`custom-new-models-help`,children:`One per line, as the provider names them. You can also pick from its list after saving.`}),(0,j.jsx)(h2,{id:`custom-new-models`,"aria-describedby":`custom-new-models-help`,value:c,onChange:e=>l(e.target.value),disabled:u,spellCheck:!1,rows:2,placeholder:`model-id`})]}),f&&(0,j.jsx)(O5,{children:f}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsxs)(M,{type:`submit`,disabled:u||!n.trim(),children:[u&&(0,j.jsx)(p8,{"aria-hidden":`true`}),`Save provider`]}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,disabled:u,onClick:e,children:`Cancel`})]})]})}function Eie({provider:e,canEdit:t,onChange:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(),p=`custom-${e.id}`,m=async(e,t)=>{u(e),c(!0),f(void 0);let r=await t();return c(!1),r.ok?(n(r.value),!0):(f({kind:`error`,text:r.error}),!1)},h=t=>m(`Saving models…`,()=>RN(e.id,{models:t})),g=e.models.map(({id:e,contextLength:t,maxOutputTokens:n})=>({id:e,contextLength:t,maxOutputTokens:n})),_=e.baseUrl,y=_.value?`${_.value} · ${_.source===`env`?`from ${e.envNames.baseUrl}`:`saved`}`:`No API base URL. Set one here or with ${e.envNames.baseUrl}.`,b=e.key.source===`env`?`Key set by ${e.envNames.key}${e.key.hint?` · ends in ${e.key.hint}`:``}.`:e.key.source===`saved`?`Key saved${e.key.hint?` · ends in ${e.key.hint}`:``}.`:`No key.`;return(0,j.jsxs)(`section`,{className:`flex flex-col gap-3 rounded-lg border p-3`,"aria-labelledby":`${p}-name`,children:[(0,j.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,j.jsx)(`h3`,{id:`${p}-name`,className:`text-sm font-semibold wrap-anywhere`,children:e.name}),(0,j.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Chat Completions`})]}),(0,j.jsxs)(`div`,{className:`text-muted-foreground flex flex-col gap-0.5 text-xs wrap-anywhere`,children:[(0,j.jsx)(`p`,{children:y}),_.error&&(0,j.jsx)(`p`,{className:`text-destructive`,children:_.error}),(0,j.jsx)(`p`,{children:b})]}),r?(0,j.jsx)(Die,{provider:e,onDone:()=>i(!1),onChange:n}):t&&(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(M,{size:`sm`,variant:`outline`,disabled:s,onClick:()=>i(!0),children:`Edit`}),_.source===`saved`&&_.env&&(0,j.jsxs)(M,{size:`sm`,variant:`outline`,disabled:s,onClick:()=>void m(`Resetting the URL…`,()=>RN(e.id,{baseUrl:null})),children:[`Use `,e.envNames.baseUrl]}),!a&&(0,j.jsx)(M,{size:`sm`,variant:`ghost`,className:`text-destructive`,disabled:s,onClick:()=>o(!0),children:`Remove provider`})]}),a&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Remove `,e.name,` and its saved key? Replies it wrote stay in your sessions.`]}),(0,j.jsx)(M,{type:`button`,variant:`destructive`,size:`sm`,disabled:s,onClick:()=>void m(`Removing…`,()=>zN(e.id)).then(e=>e&&o(!1)),children:`Yes, remove`}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:s,onClick:()=>o(!1),children:`Keep`})]}),(0,j.jsx)(kie,{provider:e,canEdit:t,busy:s,onRemove:e=>void h(g.filter(t=>t.id!==e)),onChange:n}),t&&(0,j.jsx)(Aie,{provider:e,busy:s,onAdd:e=>h([...g,e])}),(0,j.jsx)(jie,{provider:e,busy:s,onRefresh:()=>void m(`Loading the provider's models…`,()=>BN(e.id))}),s&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` `,l]}),d&&(0,j.jsx)(`p`,{className:d.kind===`ok`?`text-success text-sm`:`text-destructive text-sm`,role:d.kind===`error`?`alert`:void 0,children:d.text})]})}function Die({provider:e,onDone:t,onChange:n}){let[r,i]=(0,v.useState)(e.name),[a,o]=(0,v.useState)(e.baseUrl.source===`saved`?e.baseUrl.value??``:``),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(),p=`custom-${e.id}-edit`,m=e.key.source===`env`,h=async r=>{u(!0),f(void 0);let i=await RN(e.id,r);if(u(!1),!i.ok)return f(i.error);n(i.value),t()};return(0,j.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),h({name:r,baseUrl:a.trim()||null,...s.trim()?{key:s.trim()}:{}})},className:`flex flex-col gap-3`,"aria-label":`Edit ${e.name}`,children:[(0,j.jsxs)(T5,{children:[(0,j.jsx)(E5,{htmlFor:`${p}-name`,children:`Provider name`}),(0,j.jsx)(k5,{id:`${p}-name`,value:r,onChange:e=>i(e.target.value),disabled:l,autoComplete:`off`})]}),(0,j.jsxs)(T5,{children:[(0,j.jsx)(E5,{htmlFor:`${p}-url`,children:`API base URL`}),(0,j.jsxs)(D5,{id:`${p}-url-help`,children:[T9,e.baseUrl.env?` Leave it empty to use ${e.envNames.baseUrl} (${e.baseUrl.env}).`:``,` A new URL or key clears earlier test results.`]}),(0,j.jsx)(k5,{id:`${p}-url`,"aria-describedby":`${p}-url-help`,value:a,onChange:e=>o(e.target.value),disabled:l,autoComplete:`off`,spellCheck:!1,inputMode:`url`,placeholder:e.baseUrl.env??`https://api.example.com/v1`})]}),!m&&(0,j.jsxs)(T5,{children:[(0,j.jsx)(E5,{htmlFor:`${p}-key`,children:`New API key`}),(0,j.jsx)(D5,{id:`${p}-key-help`,children:`Leave it empty to keep the current key.`}),(0,j.jsx)(k5,{id:`${p}-key`,"aria-describedby":`${p}-key-help`,type:`password`,value:s,onChange:e=>c(e.target.value),disabled:l,autoComplete:`off`,spellCheck:!1,placeholder:`Paste a new API key`})]}),d&&(0,j.jsx)(O5,{children:d}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsxs)(M,{type:`submit`,size:`sm`,disabled:l||!r.trim(),children:[l&&(0,j.jsx)(p8,{"aria-hidden":`true`}),`Save`]}),!m&&e.key.source===`saved`&&(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`outline`,disabled:l,onClick:()=>void h({key:null}),children:`Remove saved key`}),(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`ghost`,disabled:l,onClick:t,children:`Cancel`})]})]})}var Oie={unverified:{text:`Not tested`,className:``},verified:{text:`Works`,className:`text-success`},failed:{text:`Test failed`,className:`text-destructive`}};function kie({provider:e,canEdit:t,busy:n,onRemove:r,onChange:i}){let[a,o]=(0,v.useState)(),[s,c]=(0,v.useState)({}),l=(0,v.useRef)(void 0);if((0,v.useEffect)(()=>()=>l.current?.abort(),[]),e.models.length===0)return(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`No models yet. Add a model id`,e.baseUrl.value?` or pick one from the provider's list`:``,`.`]});let u=async t=>{let n=new AbortController;l.current=n,o(t),c(e=>({...e,[t]:void 0}));let r=await VN(e.id,t,n.signal);if(o(void 0),n.signal.aborted)return c(e=>({...e,[t]:{kind:`error`,text:`Test cancelled.`}}));if(!r.ok)return c(e=>({...e,[t]:{kind:`error`,text:r.error}}));i(r.value.providers),c(e=>({...e,[t]:{kind:r.value.result.ok?`ok`:`error`,text:r.value.result.message}}))};return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Test model sends a short request with a tool call, which may use a few tokens.`}),(0,j.jsx)(`ul`,{className:`flex flex-col gap-2`,"aria-label":`${e.name} models`,children:e.models.map(i=>{let o=Oie[i.verification.status],c=s[i.id],d=[i.contextLength&&`${i.contextLength.toLocaleString()} context`,i.maxOutputTokens&&`${i.maxOutputTokens.toLocaleString()} max output`].filter(Boolean).join(` · `);return(0,j.jsxs)(`li`,{className:`flex flex-col gap-1 rounded-md border px-2 py-1.5 text-sm`,"aria-label":i.id,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`min-w-0 flex-1 font-mono text-xs wrap-anywhere`,children:i.id}),(0,j.jsx)(f8,{variant:`outline`,className:o.className,children:o.text})]}),d&&(0,j.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:d}),!c&&i.verification.status===`failed`&&i.verification.message&&(0,j.jsx)(`span`,{className:`text-destructive text-xs`,children:i.verification.message}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[a===i.id?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`span`,{className:`text-muted-foreground flex items-center gap-1.5 text-xs`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Testing `,i.id,`…`]}),(0,j.jsx)(M,{size:`xs`,variant:`outline`,onClick:()=>l.current?.abort(),children:`Cancel test`})]}):(0,j.jsx)(M,{size:`xs`,variant:`outline`,disabled:n||a!==void 0||!e.baseUrl.value,onClick:()=>void u(i.id),"aria-label":`Test model ${i.id}`,children:`Test model`}),t&&(0,j.jsx)(M,{size:`xs`,variant:`ghost`,className:`text-destructive`,disabled:n||a===i.id,onClick:()=>r(i.id),"aria-label":`Remove model ${i.id}`,children:`Remove`})]}),c&&(0,j.jsx)(`span`,{className:c.kind===`ok`?`text-success text-xs`:`text-destructive text-xs`,role:`status`,children:c.text})]},i.id)})})]})}function Aie({provider:e,busy:t,onAdd:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(),d=`custom-${e.id}-add`,f=`${d}-suggestions`,p=new Set(e.models.map(e=>e.id)),m=e.discovery.ids.filter(e=>!p.has(e)),h=e=>e.trim()?Number(e.trim().replace(/[,_]/g,``)):null,g=e=>e===null||Number.isInteger(e)&&e>0;return(0,j.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault();let t=r.trim();if(t){if(u(void 0),!g(h(a))||!g(h(s)))return u(`Limits are whole numbers of tokens, such as 128000.`);await n({id:t,contextLength:h(a),maxOutputTokens:h(s)})&&(i(``),o(``),c(``))}},className:`flex flex-col gap-2`,"aria-label":`Add a model to ${e.name}`,children:[(0,j.jsxs)(T5,{children:[(0,j.jsx)(E5,{htmlFor:d,children:`Add a model id`}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(k5,{id:d,className:`min-w-0 flex-[1_1_10rem] font-mono`,list:m.length?f:void 0,value:r,onChange:e=>i(e.target.value),disabled:t,autoComplete:`off`,spellCheck:!1,placeholder:m[0]??`model-id`}),(0,j.jsx)(M,{type:`submit`,size:`sm`,variant:`outline`,disabled:t||!r.trim(),children:`Add`})]}),m.length>0&&(0,j.jsx)(`datalist`,{id:f,children:m.slice(0,500).map(e=>(0,j.jsx)(`option`,{value:e},e))})]}),l&&(0,j.jsx)(O5,{children:l}),(0,j.jsxs)(`details`,{className:`text-sm`,children:[(0,j.jsx)(`summary`,{className:`text-muted-foreground cursor-pointer text-xs`,children:`Advanced: limits`}),(0,j.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2`,children:[(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Only if you know them. Mivra doesn't guess a model's limits; the output limit caps each reply.`}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsxs)(T5,{className:`flex-[1_1_8rem]`,children:[(0,j.jsx)(E5,{htmlFor:`${d}-context`,children:`Context length`}),(0,j.jsx)(k5,{id:`${d}-context`,inputMode:`numeric`,value:a,onChange:e=>o(e.target.value),disabled:t,placeholder:`Unknown`})]}),(0,j.jsxs)(T5,{className:`flex-[1_1_8rem]`,children:[(0,j.jsx)(E5,{htmlFor:`${d}-output`,children:`Max output tokens`}),(0,j.jsx)(k5,{id:`${d}-output`,inputMode:`numeric`,value:s,onChange:e=>c(e.target.value),disabled:t,placeholder:`Provider default`})]})]})]})]})]})}function jie({provider:e,busy:t,onRefresh:n}){let r=e.discovery,i=r.fetchedAt?new Date(r.fetchedAt).toLocaleString():void 0,a=r.state===`fresh`?`The provider lists ${r.ids.length} ${r.ids.length===1?`model`:`models`}. Type in the field above to pick one.`:r.state===`stale`?`Showing the list from ${i}: ${r.error}`:r.state===`failed`?r.error:`Load the provider's own list of models, or enter ids by hand.`;return(0,j.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,j.jsx)(`p`,{className:r.state===`failed`||r.state===`stale`?`text-destructive text-xs`:`text-muted-foreground text-xs`,children:a}),(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`outline`,className:`self-start`,disabled:t||!e.baseUrl.value,onClick:n,children:`Refresh models`})]})}var Mie={openrouter:{env:`OPENROUTER_API_KEY`,keysUrl:`https://openrouter.ai/keys`,note:`One key reaches every model.`},anthropic:{env:`ANTHROPIC_API_KEY`,keysUrl:`https://console.anthropic.com/settings/keys`,note:`Claude models, directly.`},openai:{env:`OPENAI_API_KEY`,keysUrl:`https://platform.openai.com/api-keys`,note:`GPT models, directly.`}},E9=e=>e.providers.some(e=>e.source!==null)||!!e.chatgpt?.signedIn||e.custom.some(e=>e.baseUrl.value!==null);function Nie({open:e,onOpenChange:t,firstRun:n=!1}){let[r,i]=(0,v.useState)(),[a,o]=(0,v.useState)();return(0,v.useEffect)(()=>{if(!e)return;let t=!1;return o(void 0),TN().then(e=>{t||(e.ok?i(e.value):o(e.error))}),()=>{t=!0}},[e]),(0,j.jsx)(i9,{open:e,onOpenChange:t,children:(0,j.jsxs)(a9,{className:`w-full overflow-y-auto sm:max-w-md`,onCloseAutoFocus:e=>{e.preventDefault(),(document.querySelector(`[data-providers-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,j.jsxs)(o9,{children:[(0,j.jsx)(s9,{className:`font-heading`,children:`Model providers`}),(0,j.jsx)(c9,{children:n&&r&&!E9(r)?`Mivra needs a model provider before it can teach: sign in with ChatGPT, or add an API key from one of these providers. OpenRouter is the simplest key: one key reaches every model.`:`How Mivra reaches models. Keys and sign-ins stay on this computer, and keys are never shown again after you save them.`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pb-4`,"aria-live":`polite`,children:[a&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:a}),!r&&!a&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Loading providers…`]}),r&&!r.canEdit&&(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`API keys can only be changed on the computer running Mivra. There, open this panel or run `,(0,j.jsx)(`code`,{children:`mivra auth set <provider>`}),`.`]}),r?.chatgpt&&(0,j.jsx)(Iie,{chatgpt:r.chatgpt,canEdit:r.canEdit,onChange:i}),r?.providers.map(e=>(0,j.jsx)(Pie,{provider:e,canEdit:r.canEdit,onChange:i},e.id)),r&&(0,j.jsx)(Cie,{custom:r.custom,canEdit:r.canEdit,onChange:i})]})]})})}function Pie({provider:e,canEdit:t,onChange:n}){let r=Mie[e.id],[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(),m=`provider-key-${e.id}`,h=async()=>{d(`Checking the key…`),l(!0),p(void 0);let t=await PN(e.id);if(l(!1),!t.ok)return p({kind:`error`,text:t.error});p(t.value.ok?{kind:`ok`,text:`The key works.`}:{kind:`error`,text:t.value.message??`The key didn't work.`})},g=async t=>{if(t.preventDefault(),!o.trim())return;d(`Saving the key…`),l(!0),p(void 0);let r=await EN(e.id,o);if(l(!1),!r.ok)return p({kind:`error`,text:r.error});s(``),a(!1),n(r.value),await h()},_=async()=>{d(`Removing the key…`),l(!0),p(void 0);let t=await DN(e.id);if(l(!1),!t.ok)return p({kind:`error`,text:t.error});n(t.value)},y=t&&e.source!==`env`&&(e.source===null||i),b=e.hint?` · ends in ${e.hint}`:``;return(0,j.jsxs)(`section`,{className:`flex flex-col gap-2 rounded-lg border p-3`,"aria-labelledby":`${m}-name`,children:[(0,j.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,j.jsx)(`h2`,{id:`${m}-name`,className:`text-sm font-semibold`,children:e.label}),(0,j.jsxs)(`a`,{href:r.keysUrl,target:`_blank`,rel:`noreferrer`,className:`text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-xs underline-offset-2 hover:underline`,children:[`Get a key `,(0,j.jsx)(Zh,{className:`size-3`,"aria-hidden":!0})]})]}),(0,j.jsx)(`p`,{id:`${m}-source`,className:`text-muted-foreground text-xs`,children:e.source===`env`?`Set by ${r.env}${b}. Change it there.`:e.source===`saved`?`Saved${b}.`:`Not set. ${r.note}`}),y?(0,j.jsx)(`form`,{onSubmit:g,children:(0,j.jsxs)(T5,{"data-invalid":f?.kind===`error`,children:[(0,j.jsxs)(E5,{htmlFor:m,children:[e.label,` API key`]}),(0,j.jsxs)(D5,{id:`${m}-description`,children:[`Paste a key from your `,e.label,` account.`]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(k5,{className:`min-w-0 flex-[1_1_10rem]`,"aria-describedby":`${m}-source ${m}-description${f?` ${m}-status`:``}`,"aria-invalid":f?.kind===`error`,id:m,type:`password`,autoComplete:`off`,spellCheck:!1,placeholder:`Paste your API key`,value:o,onChange:e=>s(e.target.value),disabled:c}),(0,j.jsx)(M,{type:`submit`,disabled:c||!o.trim(),children:c?`Saving…`:`Save`}),i&&(0,j.jsx)(M,{type:`button`,variant:`ghost`,disabled:c,onClick:()=>a(!1),children:`Cancel`})]}),f?.kind===`error`&&(0,j.jsx)(O5,{id:`${m}-status`,children:f.text})]})}):e.source!==null&&(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(M,{size:`sm`,variant:`outline`,disabled:c,onClick:()=>void h(),children:`Check`}),t&&e.source===`saved`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(M,{size:`sm`,variant:`outline`,disabled:c,onClick:()=>a(!0),children:`Replace`}),(0,j.jsx)(M,{size:`sm`,variant:`ghost`,className:`text-destructive`,disabled:c,onClick:()=>void _(),children:`Remove`})]})]}),c&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` `,u]}),f&&!(y&&f.kind===`error`)&&(0,j.jsx)(`p`,{id:`${m}-status`,className:f.kind===`ok`?`text-success text-sm`:`text-destructive text-sm`,children:f.text})]})}var Fie=1500;function Iie({chatgpt:e,canEdit:t,onChange:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(),p=`provider-chatgpt`,m=t;(0,v.useEffect)(()=>{if(!e.pending)return;let t=setInterval(()=>{TN().then(e=>{e.ok&&!e.value.chatgpt?.pending&&(n(e.value),f(void 0),window.dispatchEvent(new Event(CN)))})},Fie);return()=>clearInterval(t)},[e.pending,n]);let h=async(e,t)=>{o(e),i(!0),c(void 0);let n=await t();return i(!1),n.ok||c({kind:`error`,text:n.error}),n.ok?n.value:void 0},g=async(e=!1)=>{let t=window.open(`about:blank`,`_blank`),r=await h(`Opening ChatGPT…`,()=>ON(e));if(!r){t?.close();return}t?(t.opener=null,t.location.href=r.url):f(r.url);let i=await TN();i.ok&&n(i.value)},_=async e=>{if(e.preventDefault(),!l.trim())return;let t=await h(`Finishing sign-in…`,()=>kN(l));t&&(u(``),f(void 0),n(t))},y=async()=>{let e=await h(`Cancelling…`,AN);f(void 0),e&&n(e)},b=async()=>{let e=await h(`Disconnecting…`,jN);e&&n(e)},x=async()=>{let e=await h(`Checking the connection…`,NN);e&&c(e.ok?{kind:`ok`,text:`The connection works.`}:{kind:`error`,text:e.message??`The connection didn't work.`})},S=e.signedIn?`Replies from ChatGPT models use your ChatGPT plan, not an API key.`:e.pending?`Finish connecting in your browser.`:e.previous&&e.notice?`Reconnect to renew your ChatGPT connection.`:`Complete eligible AI requests in this app with usage included in your ChatGPT plan or credits balance.`;return(0,j.jsxs)(`section`,{className:`flex flex-col gap-2 rounded-lg border p-3`,"aria-labelledby":`${p}-name`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,j.jsxs)(`h2`,{id:`${p}-name`,className:`inline-flex items-center gap-1.5 text-sm font-semibold`,children:[(0,j.jsx)(x7,{className:`size-4`}),`ChatGPT`]}),e.signedIn&&(0,j.jsx)(f8,{variant:`secondary`,children:`Connected`})]}),e.signedIn?(0,j.jsxs)(`p`,{className:`text-sm`,children:[(0,j.jsx)(`span`,{className:`font-medium`,children:e.name??`Connected with ChatGPT`}),e.email&&(0,j.jsx)(`span`,{className:`text-muted-foreground block text-xs`,children:e.email})]}):!e.pending&&(0,j.jsx)(`p`,{className:`text-sm font-medium`,children:e.previous&&e.notice?`Reconnect to ChatGPT`:`Use your ChatGPT plan`}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:S}),e.notice&&!e.pending&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:e.notice}),e.pending?(0,j.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Waiting for you to approve Mivra in the ChatGPT tab…`]}),d&&(0,j.jsx)(`a`,{href:d,target:`_blank`,rel:`noreferrer`,className:`text-sm underline underline-offset-2`,children:`Open the ChatGPT sign-in page`}),(0,j.jsx)(`form`,{onSubmit:_,children:(0,j.jsxs)(T5,{"data-invalid":s?.kind===`error`,children:[(0,j.jsx)(E5,{htmlFor:`${p}-address`,children:m?`Browser showing an error page?`:`Paste the address from the ChatGPT tab`}),(0,j.jsx)(D5,{id:`${p}-address-description`,children:m?`After approving, if the tab can't load, copy its whole address and paste it here.`:`This browser isn't on the computer running Mivra, so after you approve, the tab will show an error page. Copy its whole address and paste it here.`}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,j.jsx)(k5,{className:`min-w-0 flex-[1_1_10rem]`,id:`${p}-address`,"aria-describedby":`${p}-address-description${s?` ${p}-status`:``}`,"aria-invalid":s?.kind===`error`,autoComplete:`off`,spellCheck:!1,placeholder:`http://127.0.0.1:1455/auth/callback?code=…`,value:l,onChange:e=>u(e.target.value),disabled:r}),(0,j.jsx)(M,{type:`submit`,disabled:r||!l.trim(),children:`Finish`}),(0,j.jsx)(M,{type:`button`,variant:`ghost`,disabled:r,onClick:()=>void y(),children:`Cancel`})]}),s?.kind===`error`&&(0,j.jsx)(O5,{id:`${p}-status`,children:s.text})]})})]}):e.signedIn?(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(S7,{primary:!0}),(0,j.jsx)(M,{size:`sm`,variant:`outline`,disabled:r,onClick:()=>void x(),children:`Check`}),(0,j.jsx)(M,{size:`sm`,variant:`ghost`,className:`text-destructive`,disabled:r,onClick:()=>void b(),children:`Disconnect`})]}):(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,j.jsx)(nre,{busy:r,disabled:r,onClick:()=>void g()}),e.previous&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex flex-wrap items-center gap-x-2 text-xs`,children:[`Signs in as `,e.previous,`.`,(0,j.jsx)(M,{size:`xs`,variant:`link`,className:`h-auto p-0`,disabled:r,onClick:()=>void g(!0),children:`Use a different account`})]})]}),r&&(e.signedIn||e.pending)&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` `,a]}),s&&!(e.pending&&s.kind===`error`)&&(0,j.jsx)(`p`,{id:`${p}-status`,className:s.kind===`ok`?`text-success text-sm`:`text-destructive text-sm`,children:s.text})]})}var Lie=new Set([`localhost`,`127.0.0.1`,`[::1]`]);function D9({text:e,label:t,onFail:n}){let[r,i]=(0,v.useState)(!1);return(0,j.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,"aria-label":r?`Copied ${t}`:`Copy ${t}`,onClick:async()=>{try{await navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)}catch{n?.()}},children:[r?(0,j.jsx)(dh,{"aria-hidden":`true`}):(0,j.jsx)(jh,{"aria-hidden":`true`}),r?`Copied`:`Copy`]})}function Rie(){let[e,t]=(0,v.useState)(!1),{origin:n,hostname:r}=window.location,i=`mivra link --server ${n}`;return(0,j.jsxs)(`section`,{"aria-labelledby":`settings-cli`,className:`flex flex-col gap-2 px-4 pb-4`,children:[(0,j.jsx)(`h3`,{id:`settings-cli`,className:`font-heading text-base font-medium`,children:`Connect a CLI`}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`To check a project course from another computer, install Mivra there and run this in a terminal. Paste the token when it asks; it's saved on that computer, never in your repository. The checks run on that computer.`}),(0,j.jsxs)(`div`,{className:`bg-sunken flex min-w-0 items-center gap-2 rounded-md py-1 pr-1 pl-3`,children:[(0,j.jsx)(`code`,{className:`min-w-0 flex-1 overflow-x-auto font-mono text-xs whitespace-pre`,"data-testid":`cli-link-command`,children:i}),(0,j.jsx)(D9,{text:i,label:`link command`})]}),Lie.has(r)&&(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Other computers can't reach this address. Use the one they reach Mivra by, such as its `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`tailscale serve`}),` `,`name.`]}),(0,j.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,j.jsx)(k5,{readOnly:!0,"aria-label":`Token`,type:e?`text`:`password`,value:EM,className:`min-w-0 flex-1 font-mono text-xs`,onFocus:e=>e.currentTarget.select()}),(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,"aria-pressed":e,"aria-label":e?`Hide token`:`Show token`,onClick:()=>t(e=>!e),children:e?(0,j.jsx)($h,{"aria-hidden":`true`}):(0,j.jsx)(tg,{"aria-hidden":`true`})}),(0,j.jsx)(D9,{text:EM,label:`token`,onFail:()=>t(!0)})]}),(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Anyone with the token can use this Mivra, so keep it private. On the computer running Mivra, `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra token`}),` prints it too, and `,(0,j.jsx)(`code`,{className:`font-mono text-xs`,children:`mivra check`}),` there needs no token.`]})]})}var zie={lesson:{title:`Lesson generation`,label:`Lesson model`,description:`Writes each lesson's outline and sections in the background.`}};function Bie({open:e,onOpenChange:t}){return(0,j.jsx)(i9,{open:e,onOpenChange:t,children:(0,j.jsxs)(a9,{className:`w-full overflow-y-auto sm:max-w-md`,onCloseAutoFocus:e=>{e.preventDefault(),(document.querySelector(`[data-settings-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,j.jsxs)(o9,{children:[(0,j.jsx)(s9,{className:`font-heading`,children:`Settings`}),(0,j.jsx)(c9,{children:`Settings apply from the next reply or lesson; anything already being written keeps its model.`})]}),e&&(0,j.jsx)(Vie,{}),e&&(0,j.jsxs)(`section`,{"aria-labelledby":`settings-usage`,className:`flex flex-col gap-2 px-4 pb-4`,children:[(0,j.jsx)(`h3`,{id:`settings-usage`,className:`font-heading text-base font-medium`,children:`Usage`}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Tokens and costs of Mivra's model calls, custom prices and clearing the history are on the Usage page.`}),(0,j.jsx)(`div`,{children:(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>window.dispatchEvent(new Event(`mivra:open-usage`)),children:`Open Usage`})})]}),e&&(0,j.jsx)(Rie,{})]})})}function Vie(){let e=A7(),[t,n]=(0,v.useState)(),[r,i]=(0,v.useState)();(0,v.useEffect)(()=>{let e=!1;return hN().then(t=>{e||(t.ok?n(t.value):i(t.error))}),()=>{e=!0}},[]);let a=(0,v.useCallback)(e=>n(t=>t?.map(t=>t.id===e.id?e:t)),[]);return(0,j.jsxs)(`section`,{"aria-labelledby":`settings-models`,className:`flex flex-col gap-4 px-4 pb-4`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(`h3`,{id:`settings-models`,className:`font-heading text-base font-medium`,children:`Models`}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`The picker under the message box sets the main model, which chat and new syllabuses always use. A task uses the main model too, and follows it when it changes, unless you choose one for it here.`})]}),r&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:r}),!t&&!r&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Loading…`]}),t?.map(t=>(0,j.jsx)(Hie,{task:t,picker:e,onChange:a},t.id))]})}function Hie({task:e,picker:t,onChange:n}){let{title:r,label:i,description:a}=zie[e.id],[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(),u=t.view,d=e=>k7(e.model,u?.models,u?.providers),f=async e=>{s(!0),l(void 0);let t=await e();s(!1),t.ok?n(t.value):l(t.error)};return(0,j.jsxs)(`div`,{role:`group`,"aria-labelledby":`task-${e.id}`,className:`flex flex-col gap-2 rounded-md border p-3`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,j.jsx)(`h4`,{id:`task-${e.id}`,className:`text-sm font-medium`,children:r}),(0,j.jsx)(f8,{variant:e.override?`default`:`secondary`,children:e.override?`Own model`:`Uses main model`})]}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:a}),e.override?(0,j.jsx)(`p`,{className:`text-sm`,children:`Always uses the model below, whatever the main model is.`}):(0,j.jsxs)(`p`,{className:`text-sm`,children:[`Follows the main model, now `,d(e.effective),`. Choose a model below to use another one for this task.`]}),e.unavailable&&(0,j.jsxs)(f2,{variant:`destructive`,children:[(0,j.jsxs)(p2,{children:[d(e.effective),` can't be used for this task`]}),(0,j.jsxs)(m2,{children:[(0,j.jsx)(`p`,{children:e.unavailable}),(0,j.jsx)(`p`,{children:`Choose another model, or use the main model. Until then, this task fails rather than switching models.`})]})]}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(j7,{state:t,disabled:o,label:i,value:e.effective,unavailable:null,onChoose:t=>void f(()=>gN(e.id,t))}),e.override&&(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:o,onClick:()=>void f(()=>_N(e.id)),children:`Use main model`})]}),c&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:c})]})}var O9=[{id:`7`,label:`7 days`,days:7},{id:`30`,label:`30 days`,days:30},{id:`90`,label:`90 days`,days:90},{id:`all`,label:`All time`,days:null}],k9=new Intl.NumberFormat(void 0,{maximumFractionDigits:0}),Uie=new Intl.NumberFormat(void 0,{notation:`compact`,maximumFractionDigits:1}),A9=e=>e===null?`Unknown`:k9.format(e),j9=e=>e===null?`Unknown`:Uie.format(e);function M9(e){return e===0?`$0.00`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}var N9=(e,t)=>`${e} ${t}${e===1?``:`s`}`;function P9(e){let t=[];return e.reportedCost!==null&&t.push(`${M9(e.reportedCost)} reported`),e.estimatedCost!==null&&t.push(`≈${M9(e.estimatedCost)} estimated`),e.unknownCost>0&&t.push(`${N9(e.unknownCost,`call`)} unknown`),t.length>0?t.join(` + `):`None`}function Wie({open:e,onOpenChange:t}){return(0,j.jsx)(i9,{open:e,onOpenChange:t,children:(0,j.jsxs)(a9,{className:A(`w-full overflow-y-auto sm:max-w-2xl`,N7),onCloseAutoFocus:e=>{e.preventDefault(),(document.querySelector(`[data-usage-trigger]`)??document.querySelector(`[data-sidebar="trigger"]`))?.focus()},children:[(0,j.jsxs)(o9,{className:P7,children:[(0,j.jsx)(s9,{className:F7,children:`Usage`}),(0,j.jsx)(c9,{children:`Tokens and costs from the model calls Mivra makes, counted from when usage tracking started on this computer. It isn't your whole account's usage and doesn't show any remaining allowance.`})]}),e&&(0,j.jsx)(Gie,{})]})})}function Gie(){let[e,t]=(0,v.useState)(`30`),[n,r]=(0,v.useState)(),[i,a]=(0,v.useState)(),[o,s]=(0,v.useState)(0),c=(0,v.useCallback)(()=>s(e=>e+1),[]);return(0,v.useEffect)(()=>{let t=!1,n=O9.find(t=>t.id===e).days;return vN(n===null?null:new Date(Date.now()-n*24*60*60*1e3)).then(e=>{t||(e.ok?(r(e.value),a(void 0)):a(e.error))}),()=>{t=!0}},[e,o]),(0,j.jsxs)(`div`,{className:`flex flex-col gap-6 px-5 py-5`,children:[(0,j.jsx)(`div`,{role:`radiogroup`,"aria-label":`Date range`,className:I7,children:O9.map(n=>(0,j.jsx)(M,{type:`button`,size:`sm`,role:`radio`,"aria-checked":e===n.id,variant:`ghost`,className:L7(e===n.id),onClick:()=>t(n.id),children:n.label},n.id))}),i&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:i}),!n&&!i&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Loading…`]}),n&&(0,j.jsx)(Kie,{view:n,onChanged:c})]})}function Kie({view:e,onChanged:t}){let{totals:n,api:r,subscription:i}=e,a=n.calls===0;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e.since?`Counting since ${new Date(e.since).toLocaleString()}.`:`Nothing recorded yet. Usage is counted from the next model call.`}),!a&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`section`,{"aria-label":`Totals`,className:`grid gap-x-6 gap-y-4 sm:grid-cols-3`,children:[(0,j.jsxs)(F9,{label:`Tokens`,value:j9(n.total),children:[(0,j.jsxs)(`span`,{children:[A9(n.input),` in · `,A9(n.output),` out`]}),n.cacheRead!==null&&(0,j.jsxs)(`span`,{children:[`of input, `,A9(n.cacheRead),` cached`]}),n.reasoning!==null&&(0,j.jsxs)(`span`,{children:[`of output, `,A9(n.reasoning),` reasoning`]}),n.unreported>0&&(0,j.jsxs)(`span`,{children:[N9(n.unreported,`call`),` didn't report tokens`]})]}),(0,j.jsxs)(F9,{label:`API spending`,value:r.calls===0?`None`:Yie(r),children:[(0,j.jsx)(`span`,{children:N9(r.calls,`API call`)}),r.calls>0&&(0,j.jsx)(`span`,{children:P9(r)})]}),(0,j.jsxs)(F9,{label:`ChatGPT plan`,value:i.calls===0?`Not used`:j9(i.total),children:[i.calls>0&&(0,j.jsxs)(`span`,{children:[`tokens in `,N9(i.calls,`call`),`, billed to your plan`]}),(0,j.jsxs)(`span`,{children:[`Limits and plan usage: `,(0,j.jsx)(S7,{})]})]})]}),i.calls>0&&(0,j.jsx)(Xie,{totals:i}),(n.incomplete>0||n.unreported>0)&&(0,j.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[N9(n.incomplete,`call`),` failed or `,n.incomplete===1?`was`:`were`,` cancelled. Whatever tokens they reported are counted; calls that reported none are shown as unknown rather than free, since a provider may still bill them.`]}),(0,j.jsx)(Zie,{days:e.days}),(0,j.jsx)(I9,{title:`By model`,rows:e.byModel.map(e=>({key:e.key,name:e.label,detail:e.providerLabel,totals:e,billing:e.billing}))}),(0,j.jsx)(I9,{title:`By provider`,rows:e.byProvider.map(e=>({key:e.key,name:e.label,totals:e,billing:e.billing}))}),(0,j.jsx)(I9,{title:`By activity`,rows:e.byKind.map(e=>({key:e.key,name:e.label,detail:qie[e.kind],totals:e}))}),(0,j.jsx)(I9,{title:`Recent runs`,note:`A run is one reply, continuation, lesson or test; each tool-call step is a separate call.`,rows:e.runs.map(e=>({key:e.key,name:e.session??`Model test`,detail:`${Jie[e.kind]} · ${e.label} · ${new Date(e.startedAt).toLocaleString()}${e.status===`completed`?``:` · ${e.status}`}`,totals:e,billing:e.billing}))}),(0,j.jsx)(I9,{title:`Sessions`,rows:e.sessions.map(e=>({key:e.key,name:e.label,detail:e.deleted?`Its records are kept`:void 0,totals:e}))})]}),(0,j.jsx)($ie,{prices:e.prices,onChanged:t}),(0,j.jsx)(tae,{disabled:!e.since,onCleared:t})]})}var qie={chat:`Your messages and the tutor's replies, syllabus writing included`,continuation:`The tutor carrying on after you answer its checks`,lesson:`Background generation of lessons`,distillation:`Background reading of imported notes into concepts and memories`,review:`Reviews of project milestones' code, and the tutor's answers to disputes`,test:`Test model under Model providers`},Jie={chat:`Chat`,continuation:`Continuation`,lesson:`Lesson`,distillation:`Note reading`,review:`Code review`,test:`Test model`};function Yie(e){let t=(e.reportedCost??0)+(e.estimatedCost??0);return e.reportedCost===null&&e.estimatedCost===null?`Unknown`:`${e.estimatedCost===null?``:`≈`}${M9(t)}${e.unknownCost>0?`+`:``}`}function F9({label:e,value:t,children:n}){return(0,j.jsxs)(`div`,{role:`group`,"aria-label":e,className:`flex min-w-0 flex-col gap-1`,children:[(0,j.jsx)(`span`,{className:M7,children:e}),(0,j.jsx)(`span`,{className:`font-heading text-[1.85rem] leading-tight font-normal tracking-[-0.02em] tabular-nums wrap-anywhere`,children:t}),(0,j.jsx)(`div`,{className:`text-muted-foreground flex flex-col text-[0.8125rem] leading-snug`,children:n})]})}function Xie({totals:e}){let[t,n]=(0,v.useState)(!1);return(0,j.jsxs)(y5,{open:t,onOpenChange:n,className:`border-border-strong rounded-lg border`,children:[(0,j.jsx)(b5,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`ghost`,className:`w-full justify-between`,children:[`Estimated API equivalent`,(0,j.jsx)(ph,{"aria-hidden":!0,className:A(`transition-transform`,t&&`rotate-180`)})]})}),(0,j.jsxs)(x5,{className:`flex flex-col gap-1 px-3 pb-3 text-sm`,children:[(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`What these tokens would cost at published API rates. This is not a charge or your subscription cost.`}),e.apiEquivalent===null?(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`None of these models has a published API price to compare with.`}):(0,j.jsxs)(`p`,{children:[(0,j.jsxs)(`span`,{className:`font-medium tabular-nums`,children:[`≈`,M9(e.apiEquivalent)]}),e.uncompared>0&&(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[` for the calls with a published price; `,N9(e.uncompared,`call`),` had none to compare with.`]})]})]})]})}function Zie({days:e}){if(e.length<2)return null;let t=e=>e.api+e.subscription,n=Math.max(1,...e.map(t));return(0,j.jsxs)(`section`,{"aria-labelledby":`usage-daily`,className:`flex flex-col gap-2`,children:[(0,j.jsx)(`h3`,{id:`usage-daily`,className:M7,children:`Tokens per day`}),(0,j.jsx)(`div`,{className:`border-border-strong flex h-28 items-end gap-0.5 border-b`,role:`list`,"aria-label":`Tokens per day`,children:e.map(e=>{let r=`${new Date(`${e.day}T00:00:00`).toLocaleDateString()}: ${k9.format(t(e))} tokens in ${N9(e.calls,`call`)}`;return(0,j.jsx)(`div`,{role:`listitem`,"aria-label":r,title:r,className:`group flex h-full min-w-1 flex-1 items-end`,children:(0,j.jsx)(`div`,{className:`bg-muted-foreground/60 group-hover:bg-foreground w-full rounded-t-[3px]`,style:{height:`${Math.max(2,t(e)/n*100)}%`}})},e.day)})}),(0,j.jsxs)(`div`,{className:`text-muted-foreground flex justify-between gap-2 font-mono text-[0.72rem] tabular-nums`,children:[(0,j.jsx)(`span`,{children:new Date(`${e[0].day}T00:00:00`).toLocaleDateString()}),(0,j.jsxs)(`span`,{children:[`Peak `,j9(n)]}),(0,j.jsx)(`span`,{children:new Date(`${e.at(-1).day}T00:00:00`).toLocaleDateString()})]})]})}function Qie(e){if(e.billing===`subscription`)return`ChatGPT plan`;let t=e.totals,n=P9(t);return e.billing===void 0&&(t.apiEquivalent!==null||t.uncompared>0)?n===`None`?`ChatGPT plan`:`${n} + ChatGPT plan`:n}function I9({title:e,note:t,rows:n}){if(n.length===0)return null;let r=`usage-${e.toLowerCase().replace(/\s+/g,`-`)}`;return(0,j.jsxs)(`section`,{"aria-labelledby":r,className:`flex flex-col gap-2`,children:[(0,j.jsx)(`h3`,{id:r,className:`font-heading text-[1.05rem] font-medium`,children:e}),t&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:t}),(0,j.jsx)(`div`,{className:`overflow-x-auto`,children:(0,j.jsxs)(`table`,{className:`w-full text-sm`,"aria-labelledby":r,children:[(0,j.jsx)(`thead`,{className:`text-muted-foreground text-left font-mono text-[0.6875rem] tracking-[0.09em] uppercase`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{scope:`col`,className:`pb-2 pr-2 font-medium`,children:`Name`}),(0,j.jsx)(`th`,{scope:`col`,className:`pb-2 pr-2 text-right font-medium`,children:`Tokens`}),(0,j.jsx)(`th`,{scope:`col`,className:`pb-2 pr-2 text-right font-medium`,children:`Calls`}),(0,j.jsx)(`th`,{scope:`col`,className:`pb-2 text-right font-medium`,children:`Cost`})]})}),(0,j.jsx)(`tbody`,{children:n.map(e=>(0,j.jsxs)(`tr`,{className:`border-t align-top`,children:[(0,j.jsxs)(`th`,{scope:`row`,className:`py-2.5 pr-2 text-left font-semibold`,children:[(0,j.jsx)(`span`,{className:`block break-words`,children:e.name}),e.detail&&(0,j.jsx)(`span`,{className:`text-muted-foreground block text-xs font-normal`,children:e.detail})]}),(0,j.jsxs)(`td`,{className:`py-2.5 pr-2 text-right font-mono text-[0.8125rem] tabular-nums`,children:[A9(e.totals.total),e.totals.unreported>0&&(0,j.jsxs)(`span`,{className:`text-muted-foreground block text-xs`,children:[`+`,e.totals.unreported,` unknown`]})]}),(0,j.jsx)(`td`,{className:`py-2.5 pr-2 text-right font-mono text-[0.8125rem] tabular-nums`,children:e.totals.calls}),(0,j.jsx)(`td`,{className:`py-2.5 text-right text-xs`,children:Qie(e)})]},e.key))})]})})]})}var L9=[{key:`input`,label:`Input`},{key:`output`,label:`Output`},{key:`cacheRead`,label:`Cached input`}];function $ie({prices:e,onChanged:t}){let[n,r]=(0,v.useState)(!1);return(0,j.jsxs)(y5,{open:n,onOpenChange:r,className:`border-border-strong rounded-lg border`,children:[(0,j.jsx)(b5,{asChild:!0,children:(0,j.jsxs)(M,{type:`button`,variant:`ghost`,className:`w-full justify-between`,children:[`Advanced: custom prices`,(0,j.jsx)(ph,{"aria-hidden":!0,className:A(`transition-transform`,n&&`rotate-180`)})]})}),(0,j.jsxs)(x5,{className:`flex flex-col gap-3 px-3 pb-3`,children:[(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`US dollars per million tokens. A price you set wins over the published one for calls from now on; costs already recorded don't change. No model needs a price to work: without one its cost stays unknown.`}),e.length===0&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No models yet.`}),e.map(e=>(0,j.jsx)(eae,{price:e,onChanged:t},e.model))]})]})}function eae({price:e,onChanged:t}){let n=t=>String(e.custom?.[t]??``),[r,i]=(0,v.useState)(()=>Object.fromEntries(L9.map(e=>[e.key,n(e.key)]))),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(),l=`price-${e.model.replace(/[^a-z0-9]/gi,`-`)}`,u=e.published?`Published: ${M9(e.published.input)} in, ${M9(e.published.output)} out`:`No published price`,d=async n=>{o(!0),c(void 0);let r=await bN(e.model,n);o(!1),r.ok?t():c(r.error)};return(0,j.jsxs)(`div`,{role:`group`,"aria-labelledby":l,className:`flex flex-col gap-2 border-t pt-3`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,j.jsx)(`span`,{id:l,className:`text-sm font-medium break-all`,children:e.label}),(0,j.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,j.jsx)(f8,{variant:`secondary`,children:e.providerLabel}),e.custom&&(0,j.jsx)(f8,{children:`Custom price`})]})]}),(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:e.billing===`subscription`?`Billed to your ChatGPT plan. Its API comparison uses only published prices, so it has no price of your own. ${u}.`:`${u}.`}),e.billing!==`subscription`&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[L9.map(t=>(0,j.jsxs)(`label`,{className:`flex w-28 flex-col gap-1 text-xs`,children:[t.label,(0,j.jsx)(k5,{inputMode:`decimal`,value:r[t.key],disabled:a,"aria-label":`${t.label} price for ${e.label}, dollars per million tokens`,onChange:e=>i(n=>({...n,[t.key]:e.target.value}))})]},t.key)),(0,j.jsx)(M,{type:`button`,size:`sm`,disabled:a,onClick:()=>{let e=Number(r.input),t=Number(r.output);if(r.input===``||r.output===``||!Number.isFinite(e)||!Number.isFinite(t)||e<0||t<0){c(`Enter input and output prices of 0 or more.`);return}let n=r.cacheRead===``?void 0:Number(r.cacheRead);n!==void 0&&(!Number.isFinite(n)||n<0)?c(`The cached input price must be 0 or more, or empty.`):d({input:e,output:t,...n===void 0?{}:{cacheRead:n}})},children:`Save price`}),e.custom&&(0,j.jsx)(M,{type:`button`,size:`sm`,variant:`outline`,disabled:a,onClick:()=>void d(null),children:`Remove`})]}),s&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:s})]})}function tae({disabled:e,onCleared:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(),c=async()=>{a(!0),s(void 0);let e=await yN();if(a(!1),!e.ok)return s(e.error);r(!1),t()};return(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(`div`,{children:(0,j.jsx)(M,{type:`button`,variant:`outline`,size:`sm`,disabled:e,onClick:()=>r(!0),children:`Clear usage history`})}),(0,j.jsx)(t7,{open:n,onOpenChange:r,children:(0,j.jsxs)(n7,{children:[(0,j.jsxs)(r7,{children:[(0,j.jsx)(a7,{children:`Clear usage history?`}),(0,j.jsx)(o7,{children:`This deletes Mivra's usage records. Your conversations, lessons and provider settings are kept. It doesn't reset any provider's billing or your plan's limits. Usage starts counting again from the next model call.`})]}),o&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:o}),(0,j.jsxs)(i7,{children:[(0,j.jsx)(M,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Cancel`}),(0,j.jsx)(M,{type:`button`,variant:`destructive`,disabled:i,onClick:()=>void c(),children:`Clear usage history`})]})]})})]})}var R9=768;function nae(){let[e,t]=v.useState(void 0);return v.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<R9)};return e.addEventListener(`change`,n),t(window.innerWidth<R9),()=>e.removeEventListener(`change`,n)},[]),!!e}var rae=`sidebar_state`,iae=604800,aae=`16rem`,oae=`18rem`,sae=`3rem`,cae=`b`,z9=v.createContext(null);function B9(){let e=v.useContext(z9);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function lae({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=nae(),[c,l]=v.useState(!1),[u,d]=v.useState(e),f=t??u,p=v.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t),document.cookie=`${rae}=${t}; path=/; max-age=${iae}`},[n,f]),m=v.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);v.useEffect(()=>{let e=e=>{e.key===cae&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=v.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return(0,j.jsx)(z9.Provider,{value:g,children:(0,j.jsx)(V7,{delayDuration:0,children:(0,j.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":aae,"--sidebar-width-icon":sae,...i},className:A(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})})}function uae({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:l}=B9();return n===`none`?(0,j.jsx)(`div`,{"data-slot":`sidebar`,className:A(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?(0,j.jsx)(i9,{open:c,onOpenChange:l,...a,children:(0,j.jsxs)(a9,{"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":oae},side:e,children:[(0,j.jsxs)(o9,{className:`sr-only`,children:[(0,j.jsx)(s9,{children:`Sidebar`}),(0,j.jsx)(c9,{children:`Displays the mobile sidebar.`})]}),(0,j.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,j.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,j.jsx)(`div`,{"data-slot":`sidebar-gap`,className:A(`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(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,j.jsx)(`div`,{"data-slot":`sidebar-container`,className:A(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,j.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm`,children:i})})]})}function dae({className:e,onClick:t,...n}){let{toggleSidebar:r}=B9();return(0,j.jsxs)(M,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:A(`size-7`,e),onClick:e=>{t?.(e),r()},...n,children:[(0,j.jsx)(tee,{}),(0,j.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function fae({className:e,...t}){let{toggleSidebar:n}=B9();return(0,j.jsx)(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:n,title:`Toggle Sidebar`,className:A(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...t})}function pae({className:e,...t}){return(0,j.jsx)(`main`,{"data-slot":`sidebar-inset`,className:A(`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 mae({className:e,...t}){return(0,j.jsx)(k5,{"data-slot":`sidebar-input`,"data-sidebar":`input`,className:A(`h-8 w-full bg-background shadow-none`,e),...t})}function hae({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:A(`flex flex-col gap-2 p-2`,e),...t})}function gae({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:A(`flex flex-col gap-2 p-2`,e),...t})}function _ae({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:A(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function vae({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:A(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function yae({className:e,asChild:t=!1,...n}){let r=t?Gt:`div`;return(0,j.jsx)(r,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:A(`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 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...n})}function V9({className:e,...t}){return(0,j.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:A(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function H9({className:e,...t}){return(0,j.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:A(`group/menu-item relative`,e),...t})}var bae=se(`peer/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-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{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 U9({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let s=e?Gt:`button`,{isMobile:c,state:l}=B9(),u=(0,j.jsx)(s,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:A(bae({variant:n,size:r}),a),...o});if(!i)return u;typeof i==`string`&&(i={children:i});let d=l!==`collapsed`||c;return(0,j.jsxs)(H7,{open:!d&&void 0,children:[(0,j.jsx)(U7,{asChild:!0,children:u}),(0,j.jsx)(W7,{side:`right`,align:`center`,hidden:d,...i})]})}function xae({className:e,asChild:t=!1,showOnHover:n=!1,...r}){let i=t?Gt:`button`;return(0,j.jsx)(i,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:A(`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 peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 md:pointer-fine:after:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,n&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground data-[state=open]:opacity-100 md:pointer-fine:opacity-0`,e),...r})}var W9=[{value:`system`,label:`System`,Icon:Lg},{value:`light`,label:`Light`,Icon:v_},{value:`dark`,label:`Dark`,Icon:zg}];function Sae({choice:e,onChange:t}){let{label:n,Icon:r}=W9.find(t=>t.value===e)??W9[0];return(0,j.jsx)(V9,{children:(0,j.jsx)(H9,{children:(0,j.jsxs)(f7,{children:[(0,j.jsx)(p7,{asChild:!0,children:(0,j.jsxs)(U9,{tooltip:`Theme`,"aria-label":`Theme: ${n}`,children:[(0,j.jsx)(r,{}),(0,j.jsx)(`span`,{children:n})]})}),(0,j.jsx)(m7,{side:`top`,align:`start`,children:(0,j.jsx)(g7,{value:e,onValueChange:e=>t(e),children:W9.map(({value:e,label:t,Icon:n})=>(0,j.jsxs)(_7,{value:e,children:[(0,j.jsx)(n,{}),t]},e))})})]})})})}var G9=`mivra-theme`,K9=()=>window.matchMedia(`(prefers-color-scheme: dark)`);function Cae(){try{let e=localStorage.getItem(G9);return e===`light`||e===`dark`?e:`system`}catch{return`system`}}function q9(e){let t=e===`dark`||e===`system`&&K9().matches;document.documentElement.classList.toggle(`dark`,t)}function wae(){let[e,t]=(0,v.useState)(Cae);return(0,v.useEffect)(()=>{q9(e);try{e===`system`?localStorage.removeItem(G9):localStorage.setItem(G9,e)}catch{}if(e!==`system`)return;let t=K9(),n=()=>q9(`system`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)},[e]),[e,t]}function Tae(e,t=new Date){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()-7).getTime(),i=[{label:`Today`,sessions:[]},{label:`Previous 7 days`,sessions:[]},{label:`Older`,sessions:[]}];for(let t of e){let e=new Date(t.updatedAt).getTime();(e>=n?i[0]:e>=r?i[1]:i[2]).sessions.push(t)}return i.filter(e=>e.sessions.length>0)}function Eae({...e}){return(0,j.jsx)(Oo,{"data-slot":`alert-dialog`,...e})}function Dae({...e}){return(0,j.jsx)(ko,{"data-slot":`alert-dialog-portal`,...e})}function Oae({className:e,...t}){return(0,j.jsx)(Ao,{"data-slot":`alert-dialog-overlay`,className:A(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function kae({className:e,size:t=`default`,...n}){return(0,j.jsxs)(Dae,{children:[(0,j.jsx)(Oae,{}),(0,j.jsx)(No,{"data-slot":`alert-dialog-content`,"data-size":t,className:A(`group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg`,e),...n})]})}function Aae({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:A(`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-6 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 jae({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:A(`flex flex-col-reverse gap-2 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 Mae({className:e,...t}){return(0,j.jsx)(Po,{"data-slot":`alert-dialog-title`,className:A(`text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function Nae({className:e,...t}){return(0,j.jsx)(Fo,{"data-slot":`alert-dialog-description`,className:A(`text-sm text-muted-foreground`,e),...t})}function Pae({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,j.jsx)(M,{variant:t,size:n,asChild:!0,children:(0,j.jsx)(Io,{"data-slot":`alert-dialog-action`,className:A(e),...r})})}function Fae({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,j.jsx)(M,{variant:t,size:n,asChild:!0,children:(0,j.jsx)(Ro,{"data-slot":`alert-dialog-cancel`,className:A(e),...r})})}var Iae=120;function Lae({onRename:e,onDelete:t}){let n=(0,v.useRef)(!1);return(0,j.jsxs)(f7,{children:[(0,j.jsx)(p7,{asChild:!0,children:(0,j.jsx)(xae,{showOnHover:!0,"aria-label":`Session actions`,children:(0,j.jsx)(Yh,{})})}),(0,j.jsxs)(m7,{side:`right`,align:`start`,onCloseAutoFocus:t=>{n.current&&(n.current=!1,t.preventDefault(),e())},children:[(0,j.jsxs)(h7,{onSelect:()=>n.current=!0,children:[(0,j.jsx)(Jg,{}),`Rename`]}),(0,j.jsxs)(h7,{variant:`destructive`,onSelect:t,children:[(0,j.jsx)(w_,{}),`Delete`]})]})]})}function Rae({session:e,onDone:t,onRenamed:n}){let[r,i]=(0,v.useState)(e.title),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(),l=(0,v.useRef)(null),u=(0,v.useRef)(!1);(0,v.useEffect)(()=>{l.current?.focus(),l.current?.select()},[]);let d=async()=>{if(u.current||a)return;let i=r.trim();if(!i||i===e.title)return u.current=!0,t();o(!0),c(void 0);let s=await FN(e.id,i);o(!1),s.ok?(u.current=!0,n(s.value),t()):(c(s.error),l.current?.focus())};return(0,j.jsxs)(`div`,{className:`px-0.5 py-0.5`,children:[(0,j.jsx)(mae,{ref:l,value:r,maxLength:Iae,readOnly:a,"aria-label":`Title`,"aria-invalid":s?!0:void 0,"aria-describedby":s?`rename-error-${e.id}`:void 0,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),d()):e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),u.current=!0,t())},onBlur:()=>void d()}),s&&(0,j.jsx)(`p`,{id:`rename-error-${e.id}`,className:`text-destructive px-1 pt-1 text-xs`,role:`alert`,children:s})]})}function zae({session:e,onClose:t,onDeleted:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(),s=async()=>{if(!e)return;i(!0),o(void 0);let t=await IN(e.id);if(i(!1),!t.ok)return o(t.error);n(e)};return(0,j.jsx)(Eae,{open:!!e,onOpenChange:e=>{e||r||(o(void 0),t())},children:(0,j.jsxs)(kae,{children:[(0,j.jsxs)(Aae,{children:[(0,j.jsxs)(Mae,{className:`font-heading wrap-anywhere`,children:[`Delete “`,e?.title,`”?`]}),(0,j.jsx)(Nae,{children:e?.courseId?`This deletes the course with its syllabus, lessons and every lesson's chat. It can't be undone. What Mivra remembers about you is kept.`:`This deletes the session with its messages and attached documents. It can't be undone. What Mivra remembers about you is kept.`})]}),a&&(0,j.jsx)(`p`,{className:`text-destructive text-sm`,role:`alert`,children:a}),(0,j.jsxs)(jae,{children:[(0,j.jsx)(Fae,{disabled:r,children:`Cancel`}),(0,j.jsxs)(Pae,{variant:`destructive`,disabled:r,onClick:e=>{e.preventDefault(),s()},children:[r&&(0,j.jsx)(p8,{}),`Delete`]})]})]})})}function Bae({className:e,...t}){return(0,j.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:A(`group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30`,`h-9 min-w-0 has-[>textarea]:h-auto`,`has-[>[data-align=inline-start]]:[&>input]:pl-2`,`has-[>[data-align=inline-end]]:[&>input]:pr-2`,`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3`,`has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] 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-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40`,e),...t})}var Vae=se(`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-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]`,"inline-end":`order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]`,"block-start":`order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3`,"block-end":`order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3`}},defaultVariants:{align:`inline-start`}});function J9({className:e,align:t=`inline-start`,...n}){return(0,j.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:A(Vae({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot="input-group-control"]`)?.focus()},...n})}function Hae({className:e,...t}){return(0,j.jsx)(k5,{"data-slot":`input-group-control`,className:A(`flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent`,e),...t})}function Uae(){let[e,t]=(0,v.useState)([]),[n,r]=(0,v.useState)({kind:`start`}),i=n.kind===`session`?n.id:void 0,[a,o]=(0,v.useState)(),[s,c]=(0,v.useState)(),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(0),p=async()=>{try{let e=await OM.sessions.$get();if(!e.ok)return o(await kM(e));t(await e.json()),o(void 0)}catch{o(`Can't reach the Mivra server.`)}};(0,v.useEffect)(()=>{p()},[]);let m=()=>{r({kind:`draft`}),f(e=>e+1)},h=(e,n)=>{t(t=>[e,...t]),c({sessionId:e.id,...n}),r({kind:`session`,id:e.id})},g=({session:e,goal:t})=>h(e,{message:t}),_=(e,t)=>{u(``),h(e,t)},[y,b]=(0,v.useState)(),x=e=>{b(void 0),r(e)},S=e.find(e=>e.id===i),[C,w]=(0,v.useState)(),T=e=>{w(void 0),t(t=>t.filter(t=>t.id!==e.id)),s?.sessionId===e.id&&c(void 0),i===e.id&&r({kind:`start`})},[E,D]=wae(),[O,ee]=(0,v.useState)(!1),[te,ne]=(0,v.useState)(!1),[re,ie]=(0,v.useState)(!1),[ae,oe]=(0,v.useState)(!1),[k,se]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let e=()=>oe(!0),t=()=>{oe(!1),se(!0)};return window.addEventListener(SN,e),window.addEventListener(xN,t),()=>{window.removeEventListener(SN,e),window.removeEventListener(xN,t)}},[]);let[ce,le]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{EM&&TN().then(e=>{e.ok&&!E9(e.value)&&(le(!0),ie(!0))})},[]),(0,j.jsxs)(lae,{children:[(0,j.jsx)(Wae,{sessions:e,activeId:i,theme:E,onThemeChange:D,drafting:n.kind===`draft`,onSelect:e=>x({kind:`session`,id:e}),onDelete:w,onRenamed:e=>t(t=>t.map(t=>t.id===e.id?{...t,title:e.title}:t)),onNew:()=>{b(void 0),m()},onNewCourse:()=>x({kind:`start`}),onOpenMemory:()=>ee(!0),onOpenImports:()=>ne(!0),onOpenProviders:()=>ie(!0),onOpenSettings:()=>oe(!0),onOpenUsage:()=>se(!0)}),(0,j.jsx)(Kre,{open:O,onOpenChange:ee}),(0,j.jsx)(Pre,{open:te,onOpenChange:ne,onOpenGraph:b}),(0,j.jsx)(Nie,{open:re,onOpenChange:ie,firstRun:ce}),(0,j.jsx)(Bie,{open:ae,onOpenChange:oe}),(0,j.jsx)(Wie,{open:k,onOpenChange:se}),(0,j.jsx)(are,{}),(0,j.jsx)(zae,{session:C,onClose:()=>w(void 0),onDeleted:T}),(0,j.jsxs)(pae,{className:`h-svh min-w-0 overflow-hidden`,children:[(0,j.jsxs)(`header`,{className:`flex h-13 shrink-0 items-center gap-2 border-b px-3`,children:[(0,j.jsx)(dae,{}),(0,j.jsx)(C5,{orientation:`vertical`,className:`mr-1 data-[orientation=vertical]:h-4`}),(0,j.jsx)(`h1`,{className:`truncate text-base font-medium outline-none`,tabIndex:y?-1:void 0,"data-notes-graph-start":y?``:void 0,children:y?`Notes graph`:S?.title??(n.kind===`draft`?`New session`:`Mivra`)})]}),EM?y?(0,j.jsx)(hie,{importId:y}):a?(0,j.jsx)(Y9,{error:!0,children:a}):i?(0,j.jsx)(Gae,{sessionId:i,course:!!S?.courseId,start:s?.sessionId===i?s:void 0,onStartUsed:()=>c(void 0),onReply:p},i):n.kind===`draft`?(0,j.jsx)(Jae,{text:l,onTextChange:u,focus:d,onSaved:_}):(0,j.jsx)(fre,{onStarted:g,onFreeChat:m}):(0,j.jsx)(Y9,{error:!0,children:`No API token found. Start the server, then reload this page.`})]})]})}function Y9({error:e,children:t}){return(0,j.jsx)(`p`,{className:A(`m-auto p-6 text-center`,e?`text-destructive`:`text-muted-foreground`),children:t})}function Wae({sessions:e,activeId:t,drafting:n,theme:r,onThemeChange:i,onSelect:a,onDelete:o,onRenamed:s,onNew:c,onNewCourse:l,onOpenMemory:u,onOpenImports:d,onOpenProviders:f,onOpenSettings:p,onOpenUsage:m}){let{isMobile:h,setOpenMobile:g}=B9(),[_,y]=(0,v.useState)(),b=e=>{y(void 0),requestAnimationFrame(()=>document.querySelector(`[data-session-id="${CSS.escape(e)}"]`)?.focus())},x=()=>{h&&g(!1)};return(0,j.jsxs)(uae,{collapsible:`icon`,children:[(0,j.jsxs)(hae,{children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2 p-1`,children:[(0,j.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground font-heading grid size-6 shrink-0 place-items-center rounded-md text-sm font-semibold`,children:`M`}),(0,j.jsx)(`span`,{className:`font-heading truncate text-base font-semibold group-data-[collapsible=icon]:hidden`,children:`Mivra`})]}),(0,j.jsxs)(V9,{children:[(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{variant:`outline`,tooltip:`New session`,isActive:n,onClick:()=>{c(),x()},children:[(0,j.jsx)(Qg,{}),(0,j.jsx)(`span`,{children:`New session`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`New course`,onClick:()=>{l(),x()},children:[(0,j.jsx)(pg,{}),(0,j.jsx)(`span`,{children:`New course`})]})})]})]}),(0,j.jsx)(_ae,{children:Tae(e).map(e=>(0,j.jsxs)(vae,{children:[(0,j.jsx)(yae,{children:e.label}),(0,j.jsx)(V9,{children:e.sessions.map(e=>(0,j.jsx)(H9,{children:_===e.id?(0,j.jsx)(Rae,{session:e,onRenamed:s,onDone:()=>b(e.id)}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(U9,{"data-session-id":e.id,isActive:e.id===t,tooltip:e.title,onClick:()=>{a(e.id),x()},children:[e.courseId?(0,j.jsx)(hre,{icon:e.icon,"aria-label":`Course`}):(0,j.jsx)(jg,{}),(0,j.jsx)(`span`,{children:e.title})]}),(0,j.jsx)(Lae,{onRename:()=>y(e.id),onDelete:()=>o(e)})]})},e.id))})]},e.label))}),(0,j.jsxs)(gae,{className:`border-t border-sidebar-border`,children:[(0,j.jsxs)(V9,{children:[(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Memory`,"data-memory-trigger":!0,onClick:()=>{u(),x()},children:[(0,j.jsx)($m,{}),(0,j.jsx)(`span`,{children:`Memory`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Imported notes`,"data-imports-trigger":!0,onClick:()=>{d(),x()},children:[(0,j.jsx)(Tg,{}),(0,j.jsx)(`span`,{children:`Imported notes`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Model providers`,"data-providers-trigger":!0,onClick:()=>{f(),x()},children:[(0,j.jsx)(_g,{}),(0,j.jsx)(`span`,{children:`Model providers`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Settings`,"data-settings-trigger":!0,onClick:()=>{p(),x()},children:[(0,j.jsx)(o_,{}),(0,j.jsx)(`span`,{children:`Settings`})]})}),(0,j.jsx)(H9,{children:(0,j.jsxs)(U9,{tooltip:`Usage`,"data-usage-trigger":!0,onClick:()=>{m(),x()},children:[(0,j.jsx)(sh,{}),(0,j.jsx)(`span`,{children:`Usage`})]})})]}),(0,j.jsx)(Sae,{choice:r,onChange:i})]}),(0,j.jsx)(fae,{})]})}function Gae({course:e,...t}){return e?(0,j.jsx)(Kae,{...t}):(0,j.jsx)(X9,{...t})}function Kae(e){let{sessionId:t}=e,[n,r]=(0,v.useState)(),[i,a]=(0,v.useState)(),[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)(),[u,d]=(0,v.useState)(!1),f=(0,v.useRef)(0),p=()=>{f.current=performance.now(),d(!0)},[m,h]=(0,v.useState)(),[g,_]=(0,v.useState)(),[y,b]=(0,v.useState)(),x=(0,v.useRef)(void 0),S=(0,v.useRef)(e.onReply);S.current=e.onReply;let C=(0,v.useRef)(!1),w=(0,v.useCallback)(async()=>{let e=await rN(t);if(!e.ok)return h(e.error);if(r(e.value),C.current&&e.value.status!==`interviewing`&&S.current(),C.current=e.value.status===`interviewing`,e.value.status===`interviewing`)return;let n=await iN(e.value.id);n.ok&&a(n.value)},[t]);(0,v.useEffect)(()=>{w()},[w]);let T=async e=>{if(!n)return;let t=await oN(n.id,e);if(!t.ok)return h(t.error);s(t.value.lesson.id),await w()},E=o??i?.currentLessonId??void 0,D=i?.topics.find(e=>e.lesson&&e.lesson.id===i.currentLessonId&&e.lesson.status!==`finished`);(0,v.useEffect)(()=>{if(!E)return;let e=e=>{(e.ctrlKey||e.metaKey)&&!e.altKey&&e.key.toLowerCase()===`k`&&(e.preventDefault(),f.current=performance.now(),d(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[E]);let O=(0,v.useRef)(0),ee=(e,t)=>{_({text:e,send:t,nonce:++O.current}),p()},te=async e=>{if(!E)return`No lesson is open.`;let t=x.current?.lessonId===E&&y?.id===E&&y.sections.some(e=>e.id===x.current.section.id)?x.current.section:void 0,n=t??(y?.id===E?y.sections.at(-1):void 0),r=await uN(E,{messageId:e,afterSectionId:n?.id??null,title:t?`More on ${t.title}`.slice(0,120):`From the tutor`});if(!r.ok)return r.error;b(r.value.lesson)},ne=n?.syllabus?.version,re=y?.syllabusVersion;(0,v.useEffect)(()=>{re&&ne&&re!==ne&&w()},[re,ne,w]);let ie=y?.status,ae=y&&i?.topics.find(e=>e.lesson?.id===y.id)?.lesson?.status;(0,v.useEffect)(()=>{ie&&ae&&ie!==ae&&w()},[ie,ae,w]);let oe=async()=>{if(!n?.syllabus)return;let e=await dN(n.id,n.syllabus.version);if(!e.ok)return e.error;await w()};if(m)return(0,j.jsx)(Y9,{error:!0,children:m});if(!n)return null;let k=i?.topics.find(e=>e.topicId===i.nextTopicId);return E?(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,j.jsx)(R7,{course:n,onUndo:oe,children:(0,j.jsxs)(M,{size:`sm`,variant:`outline`,onClick:p,"data-tutor-trigger":!0,children:[(0,j.jsx)(Ng,{"aria-hidden":!0}),` Tutor`]})}),(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[i&&(0,j.jsx)(`aside`,{className:`hidden w-60 shrink-0 overflow-y-auto border-r p-3 md:block`,children:(0,j.jsx)(B7,{lessons:i,selectedId:E,onSelect:e=>{l(void 0),s(e)}})}),(0,j.jsxs)(`div`,{className:`min-w-0 flex-1 overflow-y-auto`,"data-testid":`lesson-scroll`,children:[i&&(0,j.jsxs)(`details`,{className:`border-b px-4 py-2 md:hidden`,children:[(0,j.jsx)(`summary`,{className:`cursor-pointer text-sm font-medium`,children:`Lessons`}),(0,j.jsx)(`div`,{className:`pt-2`,children:(0,j.jsx)(B7,{lessons:i,selectedId:E,onSelect:e=>{l(void 0),s(e)}})})]}),D&&E!==D.lesson.id&&(0,j.jsxs)(`div`,{className:`bg-muted mx-auto mt-4 flex max-w-3xl flex-wrap items-center gap-2 rounded-lg px-4 py-2 text-sm`,role:`status`,children:[(0,j.jsx)(`span`,{children:`You're looking at an earlier lesson.`}),(0,j.jsxs)(M,{size:`xs`,variant:`outline`,onClick:()=>{l(void 0),s(D.lesson.id)},children:[`Back to lesson `,i.topics.indexOf(D)+1,`: `,D.title]})]}),(0,j.jsx)(vre,{courseComplete:n.status===`complete`,lessonId:E,nextTopic:k&&{id:k.topicId,title:k.title},onFinished:()=>void w(),onStartNext:T,onLoaded:b,focusSectionId:c,onOpenSection:(e,t)=>{s(e),l(t)},onExplain:e=>{x.current={lessonId:E,section:e},ee(`Explain "${e.title}"`,!0)},onChange:e=>{x.current=void 0,ee(`Change "${e.title}": `,!1)}},E)]})]}),(0,j.jsx)(i9,{open:u,onOpenChange:d,children:(0,j.jsxs)(a9,{className:`flex w-full flex-col gap-0 p-0 sm:max-w-lg`,onPointerDownOutside:e=>{e.detail.originalEvent.timeStamp<f.current&&e.preventDefault()},children:[(0,j.jsxs)(o9,{className:`border-b`,children:[(0,j.jsx)(s9,{className:`font-heading`,children:`Tutor`}),(0,j.jsxs)(c9,{children:[`Ask anything and the lesson stays as it is, or ask for a change. `,(0,j.jsx)(`kbd`,{className:`text-xs`,children:`Ctrl K`}),` opens and closes this.`]})]}),(0,j.jsx)(X9,{...e,onSettled:w,lessonId:E,prompt:g,onPromptUsed:()=>_(void 0),foldThroughMessageId:n.interviewMessageId,placeholder:`Ask the tutor…`,onAddToLesson:y?.status===`ready`?te:void 0})]})})]}):(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,j.jsx)(R7,{course:n,children:k&&(0,j.jsx)(M,{size:`sm`,onClick:()=>void T(k.topicId),children:`Start lesson 1`})}),(0,j.jsx)(X9,{...e,onSettled:w})]})}function X9({sessionId:e,onReply:t,...n}){let[r,i]=(0,v.useState)(()=>n.start?[]:void 0),[a,o]=(0,v.useState)();return(0,v.useEffect)(()=>{r||IM(e).then(e=>e.ok?i(e.messages):o(e.error))},[e]),a?(0,j.jsxs)(Y9,{error:!0,children:[`Couldn't load this session: `,a]}):r?(0,j.jsx)(qae,{sessionId:e,initialMessages:r,onReply:t,...n}):(0,j.jsxs)(`div`,{className:`text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Loading the session…`]})}function qae({sessionId:e,initialMessages:t,start:n,onStartUsed:r,onReply:i,onSettled:a,lessonId:o,prompt:s,onPromptUsed:c,onAddToLesson:l,foldThroughMessageId:u,placeholder:d=`What do you want to learn?`}){let[f,p]=(0,v.useState)(!1),m=(0,v.useRef)(o);m.current=o;let[h,g]=(0,v.useState)(n?.input??``),_=bre(e),y=A7(),b=(0,v.useRef)(_);b.current=_;let[x,S]=(0,v.useState)({}),C=w({initial:`instant`,resize:`instant`}),T=(0,v.useRef)(!1),E=(0,v.useRef)(null),[D,O]=(0,v.useState)(),[ee,te]=(0,v.useState)(),ne=(0,v.useRef)(void 0),re=(0,v.useRef)(!1),ie=(0,v.useRef)(0),ae=(0,v.useRef)(!1),oe=(0,v.useRef)(!1),k=(0,v.useRef)(!1),se=(0,v.useRef)(0),ce=(0,v.useRef)(!0),{messages:le,sendMessage:ue,setMessages:de,status:fe,error:pe,resumeStream:me,stop:he}=FO({id:e,experimental_throttle:50,messages:t,transport:new CO({api:`/api/sessions/${e}/chat`,headers:DM,prepareReconnectToStreamRequest:()=>({api:`/api/sessions/${e}/continuation`}),prepareSendMessagesRequest:({messages:e,body:t})=>({body:{...t,message:e.at(-1),...m.current?{lessonId:m.current}:{}}}),fetch:async(e,t)=>{let n=se.current,r=await fetch(e,t);if(t?.method===`GET`){ne.current=r.headers.get(`x-mivra-continuation-stop-id`)??void 0,re.current=r.status===200,re.current&&(k.current=!1),r.status===204&&await Se(n),oe.current=!1;let e=r.headers.get(`x-mivra-continuation-error`);if(e&&(te(e),r.status===204))throw Error(e)}else r.ok&&await b.current.refresh();return r}}),onFinish:({message:t,isDisconnect:n})=>{ae.current||n||!ce.current||(re.current?(re.current=!1,ne.current=void 0,Se(se.current)):T.current&&IM(e).then(e=>{e.ok&&de(n=>n.at(-1)?.id===t.id?e.messages:n)}),i())}}),ge=(0,v.useRef)(0);(0,v.useEffect)(()=>{s&&s.nonce!==ge.current&&(ge.current=s.nonce,c?.(),s.send&&!xe.current.busy?ue({text:s.text},{body:{documentIds:[]}}):(g(s.text),requestAnimationFrame(()=>E.current?.focus())))},[s,ue,c]);let _e=(0,v.useRef)(!1),{upload:ve}=_;(0,v.useEffect)(()=>{!n||_e.current||t.length>0||(_e.current=!0,r(),n.file&&ve(n.file),n.message&&ue({text:n.message},{body:{documentIds:[]}}))},[n,t.length,r,ue,ve]),(0,v.useEffect)(()=>{let e=C.scrollRef.current;if(!e)return;e.dataset.testid=`transcript`,e.tabIndex=0,e.setAttribute(`aria-label`,`Conversation messages`);let t,n=e=>{let n=e.touches[0];t=n?{x:n.clientX,y:n.clientY}:void 0},r=n=>{let r=n.touches[0];if(!t||!r||e.scrollTop<=0)return;let i=r.clientY-t.y;i>8&&i>Math.abs(r.clientX-t.x)&&C.stopScroll()},i=t=>{t.target===e&&([`ArrowUp`,`PageUp`,`Home`].includes(t.key)||t.key===` `&&t.shiftKey)&&C.stopScroll()};return e.addEventListener(`touchstart`,n,{passive:!0}),e.addEventListener(`touchmove`,r,{passive:!0}),e.addEventListener(`keydown`,i),()=>{e.removeEventListener(`touchstart`,n),e.removeEventListener(`touchmove`,r),e.removeEventListener(`keydown`,i)}},[C.scrollRef,C.stopScroll]),(0,v.useEffect)(()=>{let e=requestAnimationFrame(()=>{let e=C.scrollRef.current;e&&e.scrollHeight-e.clientHeight-e.scrollTop<=1&&C.scrollToBottom(`instant`)});return()=>cancelAnimationFrame(e)},[x,C.scrollRef,C.scrollToBottom]);let ye=fe===`submitted`||fe===`streaming`,be=(0,v.useRef)(a);be.current=a,(0,v.useEffect)(()=>{ye||be.current?.()},[ye,le.length]);let xe=(0,v.useRef)({busy:ye,resumeStream:me,stop:he});xe.current={busy:ye,resumeStream:me,stop:he};async function Se(t){let n=await IM(e);n.ok&&ce.current&&se.current===t&&de(n.messages)}let Ce=async(e=!1)=>{if(oe.current){e&&(k.current=!0);return}if(xe.current.busy&&!ne.current)return;oe.current=!0;let t=++ie.current,n=se.current;try{if(ne.current&&(ae.current=!0,await xe.current.stop(),ae.current=!1),!ce.current||se.current!==n)return;oe.current=!0,T.current=!1,await xe.current.resumeStream()}finally{ie.current===t&&(oe.current=!1,k.current&&ce.current&&(k.current=!1,we.current())),ae.current=!1}},we=(0,v.useRef)(Ce);we.current=Ce;let Te=(0,v.useRef)(!!n?.message&&t.length===0);(0,v.useEffect)(()=>{ce.current=!0;let e=()=>{document.visibilityState===`visible`&&we.current()};return Te.current||e(),window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{ce.current=!1,window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[]);let Ee=async()=>{let t=await IM(e);t.ok&&S(e=>_5(e,h5(t.messages))),Ce(!0)},De=async e=>{e.preventDefault();let t=h.trim();if(!t||ye)return;T.current=!1,O(void 0),te(void 0),se.current++,ie.current++,k.current=!1,ae.current=!0,await he(),oe.current=!1,ae.current=!1,re.current=!1,ne.current=void 0,C.scrollToBottom(`instant`);let n=_.documents.filter(e=>e.messageId===null).map(e=>e.id);ue({text:t},{body:{documentIds:n}}),g(``)},Oe=u?le.findIndex(e=>e.id===u):-1;return(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,j.jsxs)(N_,{"aria-busy":ye,instance:C,initial:`instant`,resize:`instant`,className:`min-h-0 min-w-0`,children:[(0,j.jsxs)(P_,{className:`relative mx-auto max-w-3xl gap-5 px-4 py-6 leading-relaxed`,scrollClassName:`overflow-y-auto overscroll-contain [scrollbar-gutter:auto]!`,onPointerDownCapture:e=>{e.target.closest(`button, input, [role=button]`)&&C.stopScroll()},onKeyDownCapture:e=>{e.key!==`Tab`&&e.target.closest(`button, input, [role=region]`)&&C.stopScroll()},children:[le.length===0&&!ye&&(0,j.jsx)(Z9,{}),Oe>=0&&!f&&(0,j.jsx)(M,{variant:`ghost`,size:`sm`,className:`text-muted-foreground self-center`,onClick:()=>p(!0),children:`Show the placement interview`}),le.map((e,t)=>!f&&t<=Oe?null:(0,j.jsxs)(`div`,{"data-message-id":e.id,"data-message-role":e.role,className:A(`flex min-w-0 flex-col gap-3`,e.role===`user`&&`bg-sunken text-foreground max-w-[min(80%,34rem)] self-end rounded-2xl rounded-br-sm px-4 py-2.5 leading-relaxed whitespace-pre-wrap wrap-anywhere`),children:[e.role===`user`&&(0,j.jsx)(K7,{documents:_,messageId:e.id}),e.role===`assistant`&&e.parts.some(e=>e.type===`reasoning`&&e.text.length>0)&&(0,j.jsxs)(J7,{defaultOpen:!1,children:[(0,j.jsxs)(Y7,{children:[`Thinking`,p5(fe,t,le.length)&&e.parts.some(e=>e.type===`reasoning`&&e.state===`streaming`)&&(0,j.jsx)(`span`,{className:`ml-2 text-xs`,children:`In progress…`})]}),(0,j.jsx)(Z7,{children:e.parts.map((e,n)=>e.type===`reasoning`&&(0,j.jsx)(X7,{label:(0,j.jsx)(`span`,{className:`whitespace-pre-wrap`,children:e.text}),status:p5(fe,t,le.length)&&e.state===`streaming`?`active`:`complete`},n))})]}),e.parts.map((n,r)=>n.type===`text`?e.role===`user`?(0,j.jsx)(`p`,{children:n.text},r):(0,j.jsx)(W0,{text:n.text},r):n.type===`data-artifact`?(0,j.jsx)(f5,{data:m5(n,x),replyInProgress:p5(fe,t,le.length),onUpdate:e=>{S(t=>_5(t,{[e.id]:e})),Ce(!0)},onRefresh:Ee},n.id??r):null),e.role===`assistant`&&typeof e.metadata?.model==`string`&&(0,j.jsx)(`p`,{className:`text-muted-foreground text-xs`,"data-reply-model":!0,children:k7(e.metadata.model,y.view?.models,y.view?.providers)}),l&&e.role===`assistant`&&t>Oe&&!p5(fe,t,le.length)&&e.parts.some(e=>e.type===`text`&&e.text.trim())&&(0,j.jsx)(Yae,{onAdd:()=>l(e.id)})]},e.id)),fe===`submitted`&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Thinking…`]}),D&&(0,j.jsx)(`p`,{className:`text-destructive`,children:D}),(pe||ee)&&((pe?$9(pe):ee)===`ChatGPT usage limit reached. Review your plan or this app's limit in ChatGPT settings.`?(0,j.jsx)(ire,{}):(0,j.jsx)(`p`,{className:`text-destructive`,children:pe?$9(pe):ee}))]}),(0,j.jsx)(F_,{"aria-label":`Scroll to bottom`,onClick:()=>void C.scrollToBottom(`instant`)})]}),(0,j.jsx)(Q9,{documents:_,input:h,onInputChange:g,onSubmit:De,inputRef:E,placeholder:d,modelPicker:y,action:ye?(0,j.jsx)(M,{type:`button`,variant:`secondary`,onClick:async t=>{let n=t.currentTarget,r=document.activeElement===n;try{if(T.current)return;T.current=!0;let t=ne.current??le.findLast(e=>e.role===`user`)?.id;if(!t)return;let i=await OM.sessions[`:id`].stop.$post({param:{id:e},json:{messageId:t}});i.ok&&r&&(document.activeElement===n||document.activeElement===document.body)&&E.current?.focus(),i.ok||(T.current=!1),i.ok||O(`Couldn’t stop the reply. Try again.`)}catch{T.current=!1,O(`Couldn’t stop the reply. Try again.`)}},children:`Stop`}):(0,j.jsx)(M,{type:`submit`,disabled:!h.trim(),children:`Send`})})]})}function Z9(){return(0,j.jsx)(Q7,{className:`my-auto`,children:(0,j.jsxs)($7,{children:[(0,j.jsx)(e9,{variant:`icon`,children:(0,j.jsx)(Ng,{"aria-hidden":`true`})}),(0,j.jsx)(t9,{children:`Start a conversation`}),(0,j.jsx)(n9,{children:`Ask a question, explore a concept or attach course notes to learn from.`})]})})}function Q9({documents:e,input:t,onInputChange:n,onSubmit:r,inputRef:i,placeholder:a,modelPicker:o,action:s,disabled:c}){return(0,j.jsxs)(`form`,{onSubmit:r,className:`bg-background border-t`,children:[(0,j.jsx)(K7,{documents:e}),(0,j.jsx)(`div`,{className:`mx-auto w-full max-w-3xl p-3`,children:(0,j.jsxs)(Bae,{className:`bg-card dark:bg-card border-border-strong shadow-paper h-auto min-h-11 rounded-xl`,"aria-label":`Message composer`,children:[(0,j.jsx)(J9,{align:`inline-start`,children:(0,j.jsx)(Sre,{documents:e})}),(0,j.jsx)(Hae,{ref:i,value:t,onChange:e=>n(e.target.value),placeholder:a,"aria-label":`Message`,readOnly:c,autoFocus:!0}),(0,j.jsx)(J9,{align:`inline-end`,children:s})]})}),(0,j.jsx)(`div`,{className:`mx-auto flex max-w-3xl px-3 pb-2`,children:(0,j.jsx)(j7,{state:o})})]})}function Jae({text:e,onTextChange:t,focus:n,onSaved:r}){let i=A7(),a=(0,v.useRef)(null),[o,s]=(0,v.useState)(),[c,l]=(0,v.useState)();(0,v.useEffect)(()=>{a.current?.focus()},[n]);let u=async(e,t)=>{if(o)return;s({file:t}),l(void 0);let n=await RM();if(s(void 0),!n.ok)return l(n.error);r(n.value,e)},d={documents:[],uploading:o?.file,error:c,upload:t=>u({file:t,input:e},t.name),remove:async()=>{},refresh:async()=>{}};return(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,j.jsxs)(`div`,{className:`mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col overflow-y-auto p-4`,children:[(0,j.jsx)(Z9,{}),o&&!o.file&&(0,j.jsxs)(`p`,{className:`text-muted-foreground flex items-center gap-2`,role:`status`,children:[(0,j.jsx)(p8,{"aria-hidden":`true`}),` Thinking…`]})]}),(0,j.jsx)(Q9,{documents:d,input:e,onInputChange:t,onSubmit:t=>{t.preventDefault();let n=e.trim();n&&u({message:n})},inputRef:a,placeholder:`What do you want to learn?`,modelPicker:i,disabled:o!==void 0,action:(0,j.jsx)(M,{type:`submit`,disabled:!e.trim()||o!==void 0,children:`Send`})})]})}function Yae({onAdd:e}){let[t,n]=(0,v.useState)(`idle`),[r,i]=(0,v.useState)();return(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsxs)(M,{variant:`outline`,size:`xs`,className:`self-start`,disabled:t!==`idle`,onClick:async()=>{n(`adding`),i(void 0);let t=await e();i(t),n(t?`idle`:`added`)},children:[(0,j.jsx)(f_,{"aria-hidden":!0}),` `,t===`added`?`Added to lesson`:`Add to lesson`]}),r&&(0,j.jsx)(`span`,{className:`text-destructive text-xs`,children:r})]})}function $9(e){try{let t=JSON.parse(e.message);if(t.error)return t.error}catch{}return e.message}(0,re.createRoot)(document.getElementById(`root`)).render((0,j.jsx)(v.StrictMode,{children:(0,j.jsx)(Uae,{})}));
|