neko-harness 0.2.3 → 0.2.5
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/README.md +3 -8
- package/dist/client/assets/index-DehA3f4w.js +82 -0
- package/dist/client/index.html +1 -1
- package/dist/gateway.js +1971 -1412
- package/dist/neko.js +2459 -1802
- package/dist/skills/skill-creator/LICENSE.txt +202 -0
- package/dist/skills/skill-creator/SKILL.md +270 -0
- package/dist/skills/skill-creator/assets/eval_review.html +146 -0
- package/dist/skills/skill-finder/SKILL.md +51 -0
- package/package.json +8 -9
- package/dist/client/assets/index-DXuZXmFD.js +0 -90
|
@@ -1,90 +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),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ee=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function M(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 N(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,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(ee,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ee,`$&/`)+`/`)+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+j(a,u),c+=N(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+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(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 te(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(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 re=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 ie(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,re)}catch(e){re(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ae(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 ie(ae.bind(null,e))}var P={map:te,forEach:function(e,t,n){te(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return te(e,function(){t++}),t},toArray:function(e){return te(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=P,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=ae,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ie,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),d=o(((e,t)=>{t.exports=u()})),f=l(d(),1),p=f.useLayoutEffect;function m(e){return e[e.length-1]}function h(e,t){return typeof e==`function`?e(t):e}var g=Object.prototype.hasOwnProperty;function _(e){for(let t in e)if(g.call(e,t))return!0;return!1}var v=()=>Object.create(null),y=(e,t)=>b(e,t,!0);function b(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(x(e)&&x(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&m(a)!==`${o-1}`||c&&m(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;l<c&&(f=l,d=e[f],u=t[f],u=d===u?d:typeof d==`object`?b(d,u,n,r):u,u===d);l++);if(l===c&&o===c)return e}else{let i=o===c,p=!0;for(;l<c;l++){f=s[l],d=e[f];let o=t[f];u=d===o?d:typeof d==`object`?b(d,o,n,r):o,i&&=u===d&&(a[l]===f||g.call(e,f)),p&&=Object.is(u,o),a[l]=u}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}let p=i?s.fill(0):n?v():{};for(let o=0;o<c;o++)f=i?o:s[o],i?(d=e[f],o>l&&(u=t[f],u=d===u?d:typeof d==`object`?b(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function x(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function S(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!S(a,o,n,r))return!1}return!0}if(x(e)&&x(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!S(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!S(e[a],t[a],n,r)))return!1;return i===0}return!1}var C=/[\x00-\x1f\x7f"<>`{}]/g;function w(e){return e.replace(C,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function T(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return w(t)}var E=[`http:`,`https:`,`mailto:`,`tel:`];function D(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var O=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function k(e,t){if(!e)return!1;if(O.test(e))return!0;let n=D(e);return n?!t.has(n):!1}function A(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=T(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=T(r?e.slice(r):e)}return t}function ee(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function j(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function M(){throw Error(`Invariant failed`)}function N(e){return e.replace(/\/{2,}/g,`/`)}function te(e){return e===`/`?e:e.replace(/^\/+/,``)}function ne(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function re(e){return ne(te(e))}function ie(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function ae(e,t,n=`never`,r){if(t.includes(`//`)&&(t=N(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=N(e)),o=e.split(`/`);o.length>1&&m(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(m(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?N(s):s)||`/`;return a&&r&&r.set(a,c),c}function P(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function oe(e){return e==null||e===``}function se(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function ce(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&oe(f)){if(c===`/`&&!d)continue;f=``}o+=c+se(s,f,r)+(d||``)}}return o+a||`/`}function le(e){return e?.isNotFound===!0}function ue(){try{return sessionStorage}catch{return}}var de=`tsr-scroll-restoration-v1_3`,fe=ue();function pe(){try{return JSON.parse(fe?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var F=pe(),I=`data-scroll-restoration-id`,me=e=>e.state.__TSR_key||e.href;function he(e){let t=e.getAttribute(I);if(t)return`[${I}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var ge=!1,_e=`window`;function ve(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function ye(e){let t=new Set;for(let n of e){if(n===_e)continue;let e=ve(n);e&&t.add(e)}return t}function be(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||me,a=new Set,o=e=>{let t=F[e]||={};for(let e of a)e===document?t[_e]={scrollX,scrollY}:e.isConnected&&(t[he(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,ge=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{ge||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{fe?.setItem(de,JSON.stringify(F))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=F[d];if(e){let t=F[u];for(let n in e){if(n===_e){if(s)continue}else{let e=ve(n);if(!e||s&&o&&(l??=ye(o),l.has(e)))continue}t||=F[u]={},t[n]??=e[n]}}}ge=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=ye(o));let t=e&&i&&c,s=r.e?F[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===_e){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=ve(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{ge=!1}}))}function xe(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function Se(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ce(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Se(r):Array.isArray(t)?t.push(Se(r)):n[e]=[t,Se(r)]}return n}var we=/^(?:\s|["[{\d-]|fa|nu|tr)/,Te=De(JSON.parse),Ee=Oe(JSON.stringify,JSON.parse);function De(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=Ce(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!we.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Oe(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!we.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=xe(e,r);return t?`?${t}`:``}}var ke=`__root__`;function Ae(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function je(e){return e instanceof Response&&!!e.options}function Me(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var Ne=4,Pe=5;function Fe(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function Ie(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function Le(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,h=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=m(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],h=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=Ie(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=ze(r);c=n,t.set(e,n)}}else{let t=a[0],m=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&h<n&&(h<e-1&&p.push(s.slice(h,e-1)),a[2]=`/`+m,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),h=n),!r)continue;let _=d&&!!(m||g);d||(m=m.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===m&&e.suffix===g);if(y)c=y;else{let e=ze(r,t,_,m,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&h<u&&p.push(s.slice(h,u));let g=p?.slice();if(!r)return g;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=ze(r,Pe);(r.pathless??=[]).push(e),r=e}let _=(t.path||!t.children)&&!t.isRoot;if(_&&u<l){let e=ze(r,Ne);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=g,_&&(r.route=t)),[r,o,g]}function Re(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ze(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Be(e,t){let n=ze(),r=[];function i(e,t,n,a){let[o,s,c]=Le(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(Re);t.masksTree=n,t.flatCache=Me(1e3)}function Ve(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Ge(e,t.masksTree);return t.flatCache.set(e,r),r}function He(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=ze(),Le(t,{from:e},1,o),i.singleCache.set(a,o)),Ge(r,o,n)}function Ue(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Ge(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=qe(a.route)),t.matchCache.set(r,a),a}function We(e,t=!1){let n=ze(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&M(),i[e.id]=e,o!==0&&e.path){let t=ne(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=Le(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(Re);return{processedTree:{segmentTree:n,singleCache:Me(1e3),matchCache:Me(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Ge(e,t,n=!1){let r=e.split(`/`),i=Ye(e,r,t,n);if(!i)return null;let[a]=Ke(e,r,i);return{route:i.node.route,rawParams:a}}function Ke(e,t,n){let r=Je(n.node),i=n.node.data&&Fe(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===Ne)break;if(u.kind===Pe){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function qe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Je(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ye(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!m(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!$e(l,n))continue;if(i.parse){if(!Qe(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==Ne&&$e(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===Ne||i.kind===2)&&$e(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Qe(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Ze(f,o))return n;$e(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+Xe(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+Xe(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+Xe(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+Xe(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Xe(e,t){return 2**(e-t-1)}function Ze(e,t){return e===2**(t-1)-1}function Qe(e,t,n){let r,i;try{[r,i]=Ke(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function $e(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ne)>(e.node.kind===Ne)||t.node.kind===Ne==(e.node.kind===Ne)&&t.node.depth>e.node.depth)))}function et(e,t,n){let r=re(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=N(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>tt(n,s.input({url:e})),output:({url:e})=>s.output({url:nt(n,e)})}:s}function tt(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function nt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function rt(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{j(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var it=`__TSR_index`,at=`popstate`,ot=`beforeunload`,st=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function ct(e){let t=st.exec(e);return t?`/`+e.slice(t[0].length):e}function lt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
2
|
-
\r`.includes(e)?``:encodeURIComponent(e))),ct(e)}function ut(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=pt(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[it];i=dt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[it];i=dt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[it]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function dt(e,t){let n=mt();return{...t,key:n,__TSR_key:n,[it]:e}}function ft(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>lt(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>pt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=mt();t.history.replaceState({[it]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=pt(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[it]-l.state[it],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=ut({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(ot,x,{capture:!0}),t.removeEventListener(at,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(ot,x,{capture:!0}),t.addEventListener(at,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function pt(e,t){let n=lt(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=mt();t={[it]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function mt(){return(Math.random()+1).toString(36).slice(7)}function ht(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function gt(e){return e.pathname+e.search+e.hash}function _t(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function vt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function yt({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function bt(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function xt(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var St=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:ft()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&re(n)?et(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=rt(this.latestLocation,e),be(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=We(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Be(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Me(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:A(e),external:!1,searchStr:o,search:y(t?.search,i),hash:A(r.slice(1)),state:b(t?.state,a)}}let o=tt(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:A(ct(o.pathname)),external:!!this.rewrite&&ht(o,this.origin),searchStr:c,search:y(t?.search,s),hash:A(o.hash.slice(1)),state:b(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Ue(ne(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=pt(n.href,{});n={...n,to:tt(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=ae(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[ne(c)],u=c.includes(`$`),d;if(l)d=l._branch??=qe(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??Le(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=Dt(n.params,e),!_(p))break;p===e&&(p=Object.assign(v(),p));try{Object.assign(p,t(p))}catch{}}}p??=Dt(n.params,Ot(n.params,f)?o()[3]:kt);let m=e.leaveParams?c:ct(A(f?ce(c,f,p,this.pathParamsDecoder):c)),h=At(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,Et(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},y=h.length?jt(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||kt,b=this.options.stringifySearch(y),x=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,S=x?`#${x}`:``,C=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:kt,w=`${m}${b}${S}`,T,E,D=!1;if(this.rewrite){let e=new URL(w,this.origin),t=e.origin,n=nt(this.rewrite,e);T=gt(e),ht(n,t)?(E=n.href,D=!0):E=ct(gt(n))}else T=ee(w),E=T;return{publicHref:E,href:T,pathname:m,search:y,searchStr:b,state:C,hash:x??``,external:D,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=Ve(r.pathname,this.processedTree);if(t){let i=Object.assign(v(),t.rawParams),{from:a,params:o,...s}=t.route,c=Dt(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return Ct(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=ne(this.latestLocation.href)===ne(n.href)&&S(yt(n.state),yt(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?D(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return Ct(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await wn(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(vt(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&_t(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(O.test(n)||(r=D(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:ht(e,this.origin)||(n=gt(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=It,this.preloadRoute=e=>Tn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?ae(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=He(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!S(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?S(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=P(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Ee,parseSearch:e.parseSearch??Te,protocolAllowlist:e.protocolAllowlist??E}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=Le(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:ne(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Mt(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=Et(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof wt||(r=new wt(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=v(),_=i._interpolation?ce(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,x=i.id+_+h,S=u(i,n),C=this._cache.get(x)??(S?.id===x?S:void 0);d=C?._strictParams??Object.assign(g,d);let w;if(!C)try{Nt(i,d)}catch(e){if(w=le(e)||je(e)?e:new Tt(e.message,{cause:e}),t?.throwOnError)throw w}let T=S?`stay`:`enter`,E;if(C)E={...C,cause:T,search:y(S?S.search:C.search,l),_strictSearch:f,searchError:p};else{let e=_t(i)?`pending`:`success`;E={id:x,ssr:i.options.ssr,index:n,routeId:i.id,params:S?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:S?y(S.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:w,context:{},abortController:t?._controller??new AbortController,cause:T,loaderDeps:S?b(S.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let D=s===i.id;E._notFound&&!D&&(E.error=void 0),E._notFound=D,c[n]=E}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?y(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=m(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=m(a),c={...e.search};for(let e of a)try{Object.assign(c,Et(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{Nt(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function Ct(e,t,{replace:n,ignoreBlocker:r}){if(!k(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var wt=class extends Error{},Tt=class extends Error{};function Et(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new wt(`Async validation not supported`);if(n.issues)throw new wt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Dt(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function Ot(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!g.call(e,t[1]))}var kt=Object.freeze({});function At(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=Et(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function jt(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=h(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function Mt(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return ke}function Nt(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Pt(e,t){return e.options[t]?.preload?.()}function Ft(e,t){let n=Pt(e,`component`),r=Pt(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function It(e,t,n){let r=()=>t===!1?void 0:t?Pt(e,t):Ft(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Lt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function Rt(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}var zt=0,Bt=1,Vt=2,Ht=3,Ut=[4];function Wt(e){return typeof e[0]==`number`}function Gt(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function L(e,t){return e.routesById[t.routeId]}function Kt(e,t,n){return je(e)?[Ht,e]:le(e)?(e.routeId||=n,[Vt,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[Bt,e]):[zt,e]}function qt(e,t){let n=Kt(t,!0,e.id);if(n[0]!==Bt)return n;try{e.options.onError?.(n[1])}catch(t){n=Kt(t,!0,e.id)}return n}function Jt(e,t,n,r,i){return i[0].signal.aborted?Ut:dn(e,t,n,qt(n,r),i)}async function Yt(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=L(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Zt(e,r),[i,Jt(e,t,u,a,n)]}if(c.aborted)return[i,Ut];let p=r.paramsError??r.searchError;if(p!==void 0)return Zt(e,r),[i,Jt(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{en(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?Gt(a,c):a);if(c.aborted)return[i,Ut];let s=dn(e,t,u,Kt(o,!1,u.id),n);if(s[0]!==zt)return Zt(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Zt(e,r),[i,Jt(e,t,u,a,n)]}finally{r.status=h,en(e,r,!1,n[0])}}i()}function Xt(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Zt(e,t){let n=t._flight;t._flight=void 0,Xt(e,t,n)?.abort()}function Qt(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Xt(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function $t(e){for(let t of e){let e=t._flight;e&&e[2]++}}function en(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function tn(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function nn(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Ut;if(!i)return[zt,void 0];let l=n._flight;en(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(tn(e,t,n,r,s,a,!!o[3]))).then(e=>Kt(e,!1,r.id),e=>Kt(e,!0,r.id)).then(t=>(t[0]!==zt&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Bt&&l[2]?qt(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],dn(e,t,r,await Gt(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Zt(e,n),Ut}finally{en(e,n,!1,s)}}function rn(e,t,n){t[0]!==Ht&&(e.status=`success`,e.error=void 0,t[0]===zt?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function an(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Zt(e,r)}function on(e,t){return t[0]===Bt||t[0]===Vt?{...e,status:t[0]===Bt?`error`:`notFound`,error:t[1],_flight:void 0}:e}function sn(e,t,n,r,i,a,o){let s=t[1][n],c=L(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(tn(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Ut)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,Zt(e,s),p=Jt(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Xt(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?nn(e,t,s,c,g,i,a).then(t=>(rn(s,t,l),t[0]===zt&&(m&&!a[0].signal.aborted&&an(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[zt,s.loaderData]),T=(async()=>{try{let e=It(c,void 0,C);e&&await Gt(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Jt(e,t,c,r,a)]}let r=await w;x&&r[0]===zt&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>on(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=nn(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,rn(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>on(E,e))}async function cn(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=L(e,t[n]);try{let e=It(i,!1);e&&await Gt(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function ln(e,t){t[2]&&=(Qt(e,t[2].map(e=>e[3])),void 0)}async function un(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Ht)throw[a,t];!i&&t[0]!==zt&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Ht)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function dn(e,t,n,r,i,a){for(;r[0]===Ht;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[Ht,t]:[Ht,t,a]}return[Ht,o,n]}catch(e){r=a?[Bt,e]:qt(n,e),a=!0}}return r}async function fn(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Vt?cn(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Ht)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==zt&&t[0]<Ht&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Ht){let n=s[1];if(n[0]!==Ht||n[1].options.reloadDocument||n[2])return ln(e,t),n;c=!0,s=[0,[Bt,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===Bt?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=L(e,u);try{await Gt(i?Promise.resolve().then(()=>It(m,l===Bt?`errorComponent`:`notFoundComponent`)):Promise.all([It(m),It(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return ln(e,t),Ut}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),ln(e,t),Qt(e,o),p()):u.status=`success`}return t}async function pn(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=L(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await Gt(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function mn(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await cn(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=sn(e,i,t,u,f,r,l)},m=await Yt(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Vt){let t=await cn(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=Ht&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=fn(e,i,u,r[0],un(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=un(i[2],void 0,void 0,h.then(e=>Wt(e)?0:Lt(n).length,()=>0))),o=await h}catch(t){if(ln(e,i),t===a&&a.aborted)return Ut;throw t}return Wt(o)?o:pn(e,o,a,r[6]===n.length?r[6]:0)}function hn(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=L(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>hn(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function gn(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function _n(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Lt(t[3]).some(e=>e.id===n[1]))return;let i;try{await Gt(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function vn(e,t){e._committed=t,e.stores.setMatches(t)}function yn(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=Lt(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=L(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=bt(n);vn(e,n),Qt(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),xt(e,i,n,a,l,t)}async function bn(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function xn(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function Sn(e,t,n,r,i){let a=n.map(e=>({...e}));$t(a);for(let t of r)Zt(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await fn(e,o,r,t[0],i)}catch(t){throw Qt(e,a),t}if(Wt(s))Qt(e,a),s[0]===Ht&&e._tx===t&&e._committed===n&&await xn(e,t,s);else if(await pn(e,s,t[0].signal),e._tx!==t||e._committed!==n)Qt(e,a);else{for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Zt(e,n))}vn(e,a),Qt(e,n,a)}}async function Cn(e,t,n,r,i,a){let o=await mn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Wt(o)){let n=o[0]===Ht&&e._tx===t;if((!n||o[1].options.reloadDocument)&&gn(e,t),Qt(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){gn(e,t);return}await xn(e,t,o);return}let s=o[1];if(e._tx===t&&await _n(e,t),e._tx!==t){gn(e,t),Qt(e,s),ln(e,o);return}let c=t[2],l=vt(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await _n(e,t),e._tx!==t){gn(e,t),Qt(e,s),ln(e,o);return}let n=await e.startTransition(()=>{gn(e,t),yn(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);e._tx===t?(u?.length&&Sn(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)):ln(e,o)})}async function wn(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=vt(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await bn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});$t(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Qt(e,m),await bn(e,n);return}e._preflight=void 0;let g,_=()=>Cn(e,y,f,()=>hn(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>bn(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&en(e,t,!1)}n[0].abort(),Qt(e,n[3],y[3],!0)}e._tx===y?(e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&hn(e,y),g?.(_()),await y[5]):(Qt(e,y[3]),y[3]=[],g?.(),await bn(e,y))}async function Tn(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),$t(a),o=(e._preloads??=new Map).set(i,a),s=await mn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Qt(e,a)),i.abort()}if(!Wt(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){le(e)||console.error(e);return}}}var En=`Error preloading route! ☝️`,Dn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=ke:this.parentRoute||M();let r=n?ke:t?.path;r&&r!==`/`&&(r=te(r));let i=t?.id||r,a=n?ke:N((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:N(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=ne(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Ae({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},On=class extends Dn{constructor(e){super(e)}},kn=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})),R=o(((e,t)=>{t.exports=kn()}))(),An=class extends f.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?f.createElement(this.props.errorComponent??jn,{error:e[0],reset:this.reset}):this.props.children}};function jn({error:e}){let[t,n]=f.useState(!1);return(0,R.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,R.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,R.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,R.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,R.jsx)(`div`,{children:(0,R.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,R.jsx)(`code`,{children:e.message}):null})}):null]})}var Mn=()=>!0,Nn=()=>!1;function Pn({children:e,fallback:t=null}){return(0,R.jsx)(f.Fragment,{children:Fn()?e:t})}function Fn(e=!0){return f.useSyncExternalStore(In,Mn,e?Nn:Mn)}function In(){return()=>{}}var Ln=f.createContext(null);function Rn(e){return f.useContext(Ln)}function zn(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{Rt(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var Bn=f.createContext(void 0),Vn=f.createContext(void 0);function Hn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Un(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Wn=[],Gn=0,{link:Kn,unlink:qn,propagate:Jn,checkDirty:Yn,shallowPropagate:Xn}=Hn({update(e){return e._update()},notify(e){Wn[Qn++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,nr(e))}}),Zn=0,Qn=0,$n,er=0;function tr(e){try{++er,e()}finally{--er||rr()}}function nr(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=qn(n,e)}function rr(){if(!(er>0)){for(;Zn<Qn;){let e=Wn[Zn];Wn[Zn++]=void 0,e.notify()}Zn=0,Qn=0}}function ir(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return $n!==void 0&&Kn(i,$n,Gn),i._snapshot},subscribe(e){let t=Un(e),n={current:!1},r=ar(()=>{i.get(),n.current?($n=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=$n,o=t?.compare??Object.is;if(n)$n=i,++Gn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{$n=a,n&&(i.flags&=-5),nr(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Yn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Xn(e)}}else e&32&&(i.flags=e&-33);return $n!==void 0&&Kn(i,$n,Gn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Jn(e),Xn(e),rr())}},i}function ar(e){let t=()=>{let t=$n;$n=n,++Gn,n.depsTail=void 0,n.flags=6;try{return e()}finally{$n=t,n.flags&=-5,nr(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Yn(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,nr(this)}};return t(),n}var or=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),sr=o(((e,t)=>{t.exports=or()})),cr=o((e=>{var t=d(),n=sr();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),lr=o(((e,t)=>{t.exports=cr()}))();function ur(e,t){return e===t}function dr(e,t=e=>e,n){let r=n?.compare??ur,i=(0,f.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,f.useCallback)(()=>e.get(),[e]);return(0,lr.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var fr={};function pr(e,t){let n=f.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=b(n.current,i):i}}function mr(e){let t=Rn(),n=f.useContext(e.from?Vn:Bn),r=e.from??n,i=t.stores.getMatchStore(r),a=pr(e,t),o=dr(i,e=>e?a(e):fr);if(o!==fr)return o;(e.shouldThrow??!0)&&M()}function hr(e){return mr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function gr(e){let{select:t,...n}=e;return mr({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function _r(e){return mr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function vr(e){return mr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function yr(e){let t=Rn();return f.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function br(e){return mr({...e,select:t=>e.select?e.select(t.context):t.context})}function xr(...e){let t=f.useRef(e),n=t.current;return e.forEach((e,t)=>{S(n[t],e,!1,!0)||(n[t]=e)}),t.current}function Sr(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(En)})}function Cr(e,t){let n=typeof e==`string`&&D(e);if(n)return t.has(n)?e:null}function wr(e,t,n,r){let i=ie(e.pathname,r),a=ie(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!S(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function Tr(e,t,n){let r=Rn(),i=f.useRef(null),a=f.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:p,onBlur:m,onFocus:h,onMouseEnter:g,onMouseLeave:_,onTouchStart:v}=e,[y,b,x]=xr(e.search,e.params,o),S=f.useContext(Bn),C=(r.stores._linkScopes??={})[S]??=zn(r,S),[w,T,E]=f.useMemo(()=>{let t=Cr(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=C[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=Nr(t,r,u),s=u||o&&!D(o)?wr(e,t,x,r.basepath):void 0;(!a||a[0]!==o||a[1]!==s)&&(a=[o,s]),i=e}return a};return[n,c,x?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,C,e.from,e.hash,e.href,s,y,b,e.state,e.mask,e.unsafeRelative,x,u]),[O,k]=f.useSyncExternalStore(C[1],T,E||T),A=k===void 0&&O,ee=u||O===void 0,j=f.useRef(!1),M=e.reloadDocument||A||ee?!1:c??r.options.defaultPreload,N=l??r.options.defaultPreloadDelay??0,te=f.useCallback(e=>{let t=e?.isIntersecting;t??M===`intent`?N?i.t??=setTimeout(()=>{i.t=void 0,Sr(r,w)},N):Sr(r,w):t===!1&&jr(i)},[r,w,i,M,N]);f.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,Sr(r,w));let e=!0,t;return M===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&te(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),jr(i)}},[r,w,M,te,i]);let ne=kr(e,n);if(ne.ref=t?a:i,A)return ne.href=A,ne;let re=t=>{let n=d??t.currentTarget.getAttribute(`target`);!ee&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(!n||n===`_self`)&&t.button===0&&(t.preventDefault(),jr(i),r.navigate({...e,_fromLocation:w._fromLocation}))},ie=()=>{M===`intent`&&Sr(r,w)},ae=()=>{M===`intent`&&jr(i)};return ne.onClick=Mr(p,re),ne.onBlur=Mr(m,ae),ne.onFocus=Mr(h,te),ne.onMouseEnter=Mr(g,te),ne.onMouseLeave=Mr(_,ae),ne.onTouchStart=Mr(v,ie),Ar(ne,e,k,O,ee,n)}var Er={},Dr={className:`active`},Or=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function kr(e,t){let n={};for(let r in e)Or.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function Ar(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=h(n?o:s,{})??(n?Dr:Er);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var jr=e=>{clearTimeout(e.t),e.t=void 0},Mr=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Nr(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!k(i,t.protocolAllowlist))return i}var Pr=f.memo(f.forwardRef((e,t)=>{let n=e._asChild||`a`,r=Tr(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return f.createElement(n,r,i)}),Fr);function Fr(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!Or.has(r)||!S(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var Ir=class extends Dn{constructor(e){super(e),this.useMatch=e=>mr({...e,from:this.id}),this.useRouteContext=e=>br({...e,from:this.id}),this.useSearch=e=>vr({...e,from:this.id}),this.useParams=e=>_r({...e,from:this.id}),this.useLoaderDeps=e=>gr({...e,from:this.id}),this.useLoaderData=e=>hr({...e,from:this.id}),this.useNavigate=()=>yr({from:this.fullPath}),this.Link=f.forwardRef((e,t)=>(0,R.jsx)(Pr,{ref:t,from:this.fullPath,...e}))}};function Lr(e){return new Ir(e)}var Rr=class extends On{constructor(e){super(e),this.useMatch=e=>mr({...e,from:this.id}),this.useRouteContext=e=>br({...e,from:this.id}),this.useSearch=e=>vr({...e,from:this.id}),this.useParams=e=>_r({...e,from:this.id}),this.useLoaderDeps=e=>gr({...e,from:this.id}),this.useLoaderData=e=>hr({...e,from:this.id}),this.useNavigate=()=>yr({from:this.fullPath}),this.Link=f.forwardRef((e,t)=>(0,R.jsx)(Pr,{ref:t,from:this.fullPath,...e}))}};function zr(e){return new Rr(e)}function Br(e){let t=Rn(),n=`not-found-${dr(t.stores.location,e=>e.pathname)}-${dr(t.stores.status)}`;return(0,R.jsx)(An,{getResetKey:()=>n,onCatch:(t,n)=>{if(le(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(le(t))return e.fallback?.(t);throw t},children:e.children})}function Vr(){return(0,R.jsx)(`p`,{children:`Not Found`})}function Hr(e,t,n){return t.options.notFoundComponent?(0,R.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,R.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,R.jsx)(Vr,{})}function Ur(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,R.jsx)(n,{}):null}var Wr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Gr=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Kr=f.memo(function({routeId:e}){let t=Rn();return qr(t,dr(t.stores.getMatchStore(e)))});function qr(e,t){let n=e.routesById[t.routeId],r=Ur(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Gr(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,R.jsx)(Jr,{match:t});s&&(l=(0,R.jsx)(Pn,{fallback:r,children:l})),o&&(l=(0,R.jsx)(Br,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return f.createElement(o,e)},children:l})),i&&(l=(0,R.jsx)(An,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(le(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,R.jsx)(f.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,R.jsx)(Bn.Provider,{value:t.routeId,children:(0,R.jsxs)(u,{children:[l,null]})}):(0,R.jsxs)(Bn.Provider,{value:t.routeId,children:[l,null]})}var Jr=f.memo(function({match:e}){let t=Rn(),n=e.routeId,r=t.routesById[n],i=f.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=f.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,R.jsx)(e,{},i):(0,R.jsx)(Yr,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Gr(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Ur(t,r)}if(e.status===`notFound`)return Hr(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Yr=f.memo(function(){let e=Rn(),t=f.useContext(Bn),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=dr(a,e=>[!!e._notFound,e.error],{compare:Wr}),i=dr(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Hr(e,e.routesById[t],r);if(!i)return null;let a=(0,R.jsx)(Kr,{routeId:i});return t===`__root__`?(0,R.jsx)(f.Suspense,{fallback:Ur(e),children:a}):a});function Xr(e,t){let n=e[1];e.length=0,n?.(t)}function Zr({t:e}){let t=Rn(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Xr(n,!1),n.push(i,a),e(t),f.startTransition(r)}),p(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(ne(r.publicHref)!==ne(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...vt(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Qr(){let e=Rn(),t=e.routesById[ke],n=Ur(e,t),r=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Zr,{t:f.useState()[1]}),e.ssr?(0,R.jsx)($r,{}):(0,R.jsx)(f.Suspense,{fallback:n,children:(0,R.jsx)($r,{})})]});return e.options.InnerWrap?(0,R.jsx)(e.options.InnerWrap,{children:r}):r}function $r(){let e=Rn(),t=e._rendered,n=dr(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;p(()=>{t[0]===n&&Xr(t,!0)},[t,n]);let a=i?(0,R.jsx)(Kr,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,R.jsx)(An,{getResetKey:()=>r,onCatch:void 0,children:a})}var ei=e=>({createMutableStore:ir,createReadonlyStore:ir,batch:tr}),ti=e=>new ni(e),ni=class extends St{constructor(e){super(e,ei)}};function ri({router:e,children:t,...n}){_(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,R.jsx)(Ln.Provider,{value:e,children:t});return e.options.Wrap?(0,R.jsx)(e.options.Wrap,{children:r}):r}function ii({router:e,...t}){return(0,R.jsx)(ri,{router:e,...t,children:(0,R.jsx)(Qr,{})})}var ai=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&&ee(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&&ee(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function ee(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,ee(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}}}})),oi=o(((e,t)=>{t.exports=ai()})),si=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),ci=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=si()})),li=o((e=>{var t=oi(),n=d(),r=ci();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 p(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)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(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 h(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 g(e){var t=[null,null],n=m(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(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)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(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 y=null,b=null;function x(e,t,n){return e===n||e===t&&(y=e,!0)}function S(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function C(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 w(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 T=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),A=Symbol.for(`react.strict_mode`),ee=Symbol.for(`react.profiler`),j=Symbol.for(`react.consumer`),M=Symbol.for(`react.context`),N=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),ae=Symbol.for(`react.activity`),P=Symbol.for(`react.legacy_hidden`),oe=Symbol.for(`react.memo_cache_sentinel`),se=Symbol.for(`react.view_transition`),ce=Symbol.for(`react.recoverable`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case ee:return`Profiler`;case A:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`;case ae:return`Activity`;case se:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case M:return e.displayName||`Context`;case j:return(e._context.displayName||`Context`)+`.Consumer`;case N:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case ie:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function _e(e){return{current:e}}function ve(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function ye(e,t){ge++,he[ge]=e.current,e.current=t}var be=_e(null),xe=_e(null),Se=_e(null),Ce=_e(null);function we(e,t){switch(ye(Se,t),ye(xe,e),ye(be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?hp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=hp(t),e=gp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ve(be),ye(be,e)}function Te(){ve(be),ve(xe),ve(Se)}function Ee(e){var t=e.memoizedState;t!==null&&(fh._currentValue=t.memoizedState,ye(Ce,e)),t=be.current;var n=gp(t,e.type);t!==n&&(ye(xe,e),ye(be,n))}function De(e){xe.current===e&&(ve(be),ve(xe)),Ce.current===e&&(ve(Ce),fh._currentValue=me)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1<e.stack.indexOf(`
|
|
3
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
-
`+Oe+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!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(`
|
|
5
|
-
`),l=s.split(`
|
|
6
|
-
`);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=`
|
|
7
|
-
`+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{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);case 30:return Ae(`ViewTransition`);default:return``}}function Pe(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
-
Error generating stack: `+e.message+`
|
|
9
|
-
`+e.stack}}var Fe=Object.prototype.hasOwnProperty,Ie=t.unstable_scheduleCallback,Le=t.unstable_cancelCallback,Re=t.unstable_shouldYield,ze=t.unstable_requestPaint,Be=t.unstable_now,Ve=t.unstable_getCurrentPriorityLevel,He=t.unstable_ImmediatePriority,Ue=t.unstable_UserBlockingPriority,We=t.unstable_NormalPriority,Ge=t.unstable_LowPriority,Ke=t.unstable_IdlePriority,qe=t.log,Je=t.unstable_setDisableYieldValue,Ye=null,Xe=null;function Ze(e){if(typeof qe==`function`&&Je(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Ye,e)}catch{}}var Qe=Math.clz32?Math.clz32:tt,$e=Math.log,et=Math.LN2;function tt(e){return e>>>=0,e===0?32:31-($e(e)/et|0)|0}var nt=256,rt=262144,it=4194304;function at(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 ot(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=at(n))):i=at(o):i=at(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=at(n))):i=at(o)):i=at(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 st(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ct(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-Qe(n),i=1<<r;t|=e[r],n&=~i}return t}function lt(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 ut(){var e=it;return it<<=1,!(it&62914560)&&(it=4194304),e}function dt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ft(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pt(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-Qe(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&&mt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function mt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Qe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ht(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function gt(e,t){var n=t&-t;return n=n&42?1:_t(n),(n&(e.suspendedLanes|t))===0?n:0}function _t(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 vt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function yt(){var e=I.p;return e===0?(e=window.event,e===void 0?32:Oh(e.type)):e}function bt(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var xt=Math.random().toString(36).slice(2),St=`__reactFiber$`+xt,Ct=`__reactProps$`+xt,wt=`__reactContainer$`+xt,Tt=`__reactEvents$`+xt,Et=`__reactListeners$`+xt,Dt=`__reactHandles$`+xt,Ot=`__reactResources$`+xt,kt=`__reactMarker$`+xt,At=`__reactLoad$`+xt;function jt(e){delete e[St],delete e[Ct],delete e[Et],delete e[Dt]}function Mt(e){var t;if(t=e[St])return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_m(e);e!==null;){if(n=e[St])return n;e=_m(e)}return t}e=n,n=e.parentNode}return null}function Nt(e){if(e=e[St]||e[wt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ft(e){var t=e[Ot];return t||=e[Ot]={hoistableStyles:new Map,hoistableScripts:new Map},t}function It(e){e[kt]=!0}function Lt(e){e[At]=void 0}var Rt=new Set,zt={};function Bt(e,t){Vt(e,t),Vt(e+`Capture`,t)}function Vt(e,t){for(zt[e]=t,e=0;e<t.length;e++)Rt.add(t[e])}var Ht=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]*$`),Ut={},Wt={};function Gt(e){return Fe.call(Wt,e)?!0:Fe.call(Ut,e)?!1:Ht.test(e)?Wt[e]=!0:(Ut[e]=!0,!1)}var L=!1;function Kt(){var e=L;return L=!1,e}function qt(e,t,n){if(Gt(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 Jt(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 Yt(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 Xt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Qt(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 $t(e){if(!e._valueTracker){var t=Zt(e)?`checked`:`value`;e._valueTracker=Qt(e,t,``+e[t])}}function en(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Zt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var tn=/[\n"\\]/g;function nn(e){return e.replace(tn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function rn(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=``+Xt(t)):e.value!==``+Xt(t)&&(e.value=``+Xt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):on(e,Xt(n)):o===`number`&&e.value==t?on(e,Xt(e.value)):on(e,Xt(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=``+Xt(s):e.removeAttribute(`name`)}function an(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)){$t(e);return}n=n==null?``:``+Xt(n),t=t==null?n:``+Xt(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),$t(e)}function on(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function sn(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=``+Xt(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 cn(e,t,n){t!=null&&(t=``+Xt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Xt(n)}function ln(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(pe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),$t(e)}function un(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dn=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 fn(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||dn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function pn(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]=``,L=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(fn(e,a,r),L=!0)}else for(var o in t)t.hasOwnProperty(o)&&fn(e,o,t[o])}function mn(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 hn=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`]]),gn=/^[\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 _n(e){return gn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function vn(){}var yn=null;function bn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xn=null,Sn=null;function Cn(e){var t=Nt(e);if(t&&(e=t.stateNode)){var n=e[Ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(rn(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="`+nn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ct]||null;if(!a)throw Error(i(90));rn(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&&en(r)}break a;case`textarea`:cn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&sn(e,!!n.multiple,t,!1)}}}var wn=!1;function Tn(e,t,n){if(wn)return e(t,n);wn=!0;try{return e(t)}finally{if(wn=!1,(xn!==null||Sn!==null)&&(Ud(),xn&&(t=xn,e=Sn,Sn=xn=null,Cn(t),e)))for(t=0;t<e.length;t++)Cn(e[t])}}function En(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ct]||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 Dn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,On=!1;if(Dn)try{var kn={};Object.defineProperty(kn,"passive",{get:function(){On=!0}}),window.addEventListener(`test`,kn,kn),window.removeEventListener(`test`,kn,kn)}catch{On=!1}var R=null,An=null,jn=null;function Mn(){if(jn)return jn;var e,t=An,n=t.length,r,i=`value`in R?R.value:R.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 jn=i.slice(e,1<r?1-r:void 0)}function Nn(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 Pn(){return!0}function Fn(){return!1}function In(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)?Pn:Fn,this.isPropagationStopped=Fn,this}return T(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=Pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rn=In(Ln),zn=T({},Ln,{view:0,detail:0}),Bn=In(zn),Vn,Hn,Un,Wn=T({},zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,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!==Un&&(Un&&e.type===`mousemove`?(Vn=e.screenX-Un.screenX,Hn=e.screenY-Un.screenY):Hn=Vn=0,Un=e),Vn)},movementY:function(e){return`movementY`in e?e.movementY:Hn}}),Gn=In(Wn),Kn=In(T({},Wn,{dataTransfer:0})),qn=In(T({},zn,{relatedTarget:0})),Jn=In(T({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=In(T({},Ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=In(T({},Ln,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=In(T({},zn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=In(T({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=In(T({},Ln,{submitter:0})),ar=In(T({},zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),or=In(T({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),sr=In(T({},Wn,{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})),cr=In(T({},Ln,{newState:0,oldState:0,source:0})),lr=[9,13,27,32],ur=Dn&&`CompositionEvent`in window,dr=null;Dn&&`documentMode`in document&&(dr=document.documentMode);var fr=Dn&&`TextEvent`in window&&!dr,pr=Dn&&(!ur||dr&&8<dr&&11>=dr),mr=` `,hr=!1;function gr(e,t){switch(e){case`keyup`:return lr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function _r(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var vr=!1;function yr(e,t){switch(e){case`compositionend`:return _r(t);case`keypress`:return t.which===32?(hr=!0,mr):null;case`textInput`:return e=t.data,e===mr&&hr?null:e;default:return null}}function br(e,t){if(vr)return e===`compositionend`||!ur&&gr(e,t)?(e=Mn(),jn=An=R=null,vr=!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 pr&&t.locale!==`ko`?null:t.data;default:return null}}var xr={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 Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!xr[e.type]:t===`textarea`}function Cr(e,t,n,r){xn?Sn?Sn.push(r):Sn=[r]:xn=r,t=Qf(t,`onChange`),0<t.length&&(n=new Rn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var wr=null,Tr=null;function Er(e){Kf(e,0)}function Dr(e){if(en(Pt(e)))return e}function Or(e,t){if(e===`change`)return t}var kr=!1;if(Dn){var Ar;if(Dn){var jr=`oninput`in document;if(!jr){var Mr=document.createElement(`div`);Mr.setAttribute(`oninput`,`return;`),jr=typeof Mr.oninput==`function`}Ar=jr}else Ar=!1;kr=Ar&&(!document.documentMode||9<document.documentMode)}function Nr(){wr&&(wr.detachEvent(`onpropertychange`,Pr),Tr=wr=null)}function Pr(e){if(e.propertyName===`value`&&Dr(Tr)){var t=[];Cr(t,Tr,e,bn(e)),Tn(Er,t)}}function Fr(e,t,n){e===`focusin`?(Nr(),wr=t,Tr=n,wr.attachEvent(`onpropertychange`,Pr)):e===`focusout`&&Nr()}function Ir(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Dr(Tr)}function Lr(e,t){if(e===`click`)return Dr(t)}function Rr(e,t){if(e===`input`||e===`change`)return Dr(t)}function zr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Br=typeof Object.is==`function`?Object.is:zr;function Vr(e,t){if(Br(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(!Fe.call(t,i)||!Br(e[i],t[i]))return!1}return!0}function Hr(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 Ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wr(e,t){var n=Ur(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=Ur(n)}}function Gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hr(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=Hr(e.document)}return t}function qr(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 Jr=Dn&&`documentMode`in document&&11>=document.documentMode,Yr=null,Xr=null,Zr=null,Qr=!1;function $r(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qr||Yr==null||Yr!==Hr(r)||(r=Yr,`selectionStart`in r&&qr(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}),Zr&&Vr(Zr,r)||(Zr=r,r=Qf(Xr,`onSelect`),0<r.length&&(t=new Rn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Yr)))}function ei(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ti={animationend:ei(`Animation`,`AnimationEnd`),animationiteration:ei(`Animation`,`AnimationIteration`),animationstart:ei(`Animation`,`AnimationStart`),transitionrun:ei(`Transition`,`TransitionRun`),transitionstart:ei(`Transition`,`TransitionStart`),transitioncancel:ei(`Transition`,`TransitionCancel`),transitionend:ei(`Transition`,`TransitionEnd`)},ni={},ri={};Dn&&(ri=document.createElement(`div`).style,`AnimationEvent`in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),`TransitionEvent`in window||delete ti.transitionend.transition);function ii(e){if(ni[e])return ni[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ri)return ni[e]=t[n];return e}var ai=ii(`animationend`),si=ii(`animationiteration`),li=ii(`animationstart`),ui=ii(`transitionrun`),di=ii(`transitionstart`),fi=ii(`transitioncancel`),pi=ii(`transitionend`),mi=new Map,hi=`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(` `);hi.push(`scrollEnd`);function gi(e,t){mi.set(e,t),Bt(t,[e])}var _i=0;function vi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=wd.identifierPrefix;var n=_i++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function yi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Md;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 bi(e,t){return e=yi(e),t=yi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var xi=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)},Si=[],Ci=0,wi=0;function Ti(){for(var e=Ci,t=wi=Ci=0;t<e;){var n=Si[t];Si[t++]=null;var r=Si[t];Si[t++]=null;var i=Si[t];Si[t++]=null;var a=Si[t];if(Si[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&&ki(n,i,a)}}function Ei(e,t,n,r){Si[Ci++]=e,Si[Ci++]=t,Si[Ci++]=n,Si[Ci++]=r,wi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Di(e,t,n,r){return Ei(e,t,n,r),Ai(e)}function Oi(e,t){return Ei(e,null,null,t),Ai(e)}function ki(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-Qe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ai(e){if(50<Nd)throw Nd=0,Pd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function Mi(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 Ni(e,t,n,r){return new Mi(e,t,n,r)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fi(e,t){var n=e.alternate;return n===null?(n=Ni(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 Ii(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 Li(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Pi(r)&&(s=1);else if(typeof r==`string`)s=Qm(e,n,be.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ae:return e=Ni(31,n,t,a),e.elementType=ae,e.lanes=o,e;case k:return Ri(n.children,a,o,t);case A:s=8,a|=24;break;case ee:return e=Ni(12,n,t,a|2),e.elementType=ee,e.lanes=o,e;case te:return e=Ni(13,n,t,a),e.elementType=te,e.lanes=o,e;case ne:return e=Ni(19,n,t,a),e.elementType=ne,e.lanes=o,e;case P:case se:return e=a|32,e=Ni(30,n,t,e),e.elementType=se,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case M:s=10;break a;case j:s=9;break a;case N:s=11;break a;case re:s=14;break a;case ie:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ni(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ri(e,t,n,r){return e=Ni(7,e,r,t),e.lanes=n,e}function zi(e,t,n){return e=Ni(6,e,null,t),e.lanes=n,e}function Bi(e){var t=Ni(18,null,null,0);return t.stateNode=e,t}function Vi(e,t,n){return t=Ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hi=new WeakMap;function Ui(e,t){if(typeof e==`object`&&e){var n=Hi.get(e);return n===void 0?(t={value:e,source:t,stack:Pe(t)},Hi.set(e,t),t):n}return{value:e,source:t,stack:Pe(t)}}var Wi=[],Gi=0,Ki=null,qi=0,Ji=[],Yi=0,Xi=null,Zi=1,Qi=``;function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ki,Ki=e,qi=t}function ea(e,t,n){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Xi=e;var r=Zi;e=Qi;var i=32-Qe(r)-1;r&=~(1<<i),n+=1;var a=32-Qe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zi=1<<32-Qe(t)+i|n<<i|r,Qi=a+e}else Zi=1<<a|n<<i|r,Qi=e}function ta(e){e.return!==null&&($i(e,1),ea(e,1,0))}function na(e){for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null;for(;e===Xi;)Xi=Ji[--Yi],Ji[Yi]=null,Qi=Ji[--Yi],Ji[Yi]=null,Zi=Ji[--Yi],Ji[Yi]=null}function ra(e,t){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Zi=t.id,Qi=t.overflow,Xi=e}var ia=null,aa=null,z=!1,oa=null,sa=!1,ca=Error(i(519));function la(e){throw ha(Ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ca}function ua(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[St]=e,t[Ct]=r,n){case`dialog`:qf(`cancel`,t),qf(`close`,t);break;case`iframe`:case`object`:case`embed`:qf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Wf.length;n++)qf(Wf[n],t);break;case`source`:qf(`error`,t);break;case`img`:case`image`:case`link`:qf(`error`,t),qf(`load`,t);break;case`details`:qf(`toggle`,t);break;case`input`:qf(`invalid`,t),an(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:qf(`invalid`,t);break;case`textarea`:qf(`invalid`,t),ln(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||ip(t.textContent,n)?(r.popover!=null&&(qf(`beforetoggle`,t),qf(`toggle`,t)),r.onScroll!=null&&qf(`scroll`,t),r.onScrollEnd!=null&&qf(`scrollend`,t),r.onClick!=null&&(t.onclick=vn),t=!0):t=!1,t||la(e,!0)}function da(e){for(ia=e.return;ia;)switch(ia.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:ia=ia.return}}function fa(e){if(e!==ia)return!1;if(!z)return da(e),z=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||vp(e.type,e.memoizedProps)),n=!n),n&&aa&&la(e),da(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=gm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=gm(e)}else t===27?(t=aa,Dp(e.type)?(e=hm,hm=null,aa=e):aa=t):aa=ia?mm(e.stateNode.nextSibling):null;return!0}function pa(){aa=ia=null,z=!1}function ma(){var e=oa;return e!==null&&(gd===null?gd=e:gd.push.apply(gd,e),oa=null),e}function ha(e){oa===null?oa=[e]:oa.push(e)}var ga=_e(null),_a=null,va=null;function ya(e,t,n){ye(ga,t._currentValue),t._currentValue=n}function ba(e){e._currentValue=ga.current,ve(ga)}function xa(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 Sa(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),xa(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),xa(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),xa(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 Ca(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;Br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[fh]:e.push(fh))}a=a.return}return e!==null&&Sa(t,e,n,r),t.flags|=262144,e!==null}function wa(e){for(e=e.firstContext;e!==null;){if(!Br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ta(e){_a=e,va=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ea(e){return Oa(_a,e)}function Da(e,t){return _a===null&&Ta(e),Oa(e,t)}function Oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},va===null){if(e===null)throw Error(i(308));va=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else va=va.next=t;return n}var ka=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()})}},Aa=t.unstable_scheduleCallback,ja=t.unstable_NormalPriority,Ma={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Na(){return{controller:new ka,data:new Map,refCount:0}}function Pa(e){e.refCount--,e.refCount===0&&Aa(ja,function(){e.controller.abort()})}function Fa(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 Ia=null;function La(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ra=null,za=0,Ba=0,Va=null;function Ha(e,t){if(Ra===null){var n=Ra=[];za=0,Ba=zf(),Va={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return za++,t.then(Ua,Ua),t}function Ua(){if(--za===0&&(Ia=null,Ra!==null)){Va!==null&&(Va.status=`fulfilled`);var e=Ra;Ra=null,Ba=0,Va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Wa(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 Ga=F.S;F.S=function(e,t){if(yd=Be(),typeof t==`object`&&t&&typeof t.then==`function`&&Ha(e,t),Ia!==null)for(var n=Tf;n!==null;)Fa(n,Ia),n=n.next;if(n=e.types,n!==null){for(var r=Tf;r!==null;)Fa(r,n),r=r.next;if(Ba!==0){r=Ia,r===null&&(r=Ia=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ga!==null&&Ga(e,t)};var Ka=_e(null);function qa(){var e=Ka.current;return e===null?ed.pooledCache:e}function Ja(e,t){t===null?ye(Ka,Ka.current):ye(Ka,t.pool)}function Ya(){var e=qa();return e===null?null:{parent:Ma._currentValue,pool:e}}var Xa=Error(i(460)),Za=Error(i(474)),Qa=Error(i(542)),$a={then:function(){}};function eo(e){return e=e.status,e===`fulfilled`||e===`rejected`}function to(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(vn,vn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ao(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(vn,vn);else{if(e=ed,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,ao(e),e}throw ro=t,Xa}}function no(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ro=e,Xa):e}}var ro=null;function io(){if(ro===null)throw Error(i(459));var e=ro;return ro=null,e}function ao(e){if(e===Xa||e===Qa)throw Error(i(483))}var oo=null,so=0;function co(e){var t=so;return so+=1,oo===null&&(oo=[]),to(oo,e,t)}function lo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function uo(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function fo(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=Fi(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=zi(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===k?(e=d(e,t,n.props.children,r,n.key),lo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ie&&no(i)===t.type)?(t=a(t,n.props),lo(t,n),t.return=e,t):(t=Li(n.type,n.key,n.props,null,e.mode,r),lo(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=Vi(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=Ri(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=zi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Li(t.type,t.key,t.props,null,e.mode,n),lo(n,t),n.return=e,n;case O:return t=Vi(t,e.mode,n),t.return=e,t;case ie:return t=no(t),f(e,t,n)}if(pe(t)||ue(t))return t=Ri(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,co(t),n);if(t.$$typeof===M)return f(e,Da(e,t),n);uo(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 D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case ie:return n=no(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,co(n),r);if(n.$$typeof===M)return p(e,t,Da(e,n),r);uo(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 D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ie:return r=no(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,co(r),i);if(r.$$typeof===M)return m(e,t,n,Da(t,r),i);uo(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),z&&$i(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 z&&$i(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)}),z&&$i(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),z&&$i(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 z&&$i(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)}),z&&$i(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),lo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&no(l)===r.type){n(e,r.sibling),c=a(r,o.props),lo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Ri(o.props.children,e.mode,c,o.key),lo(c,o),c.return=e,e=c):(c=Li(o.type,o.key,o.props,null,e.mode,c),lo(c,o),c.return=e,e=c)}return s(e);case O: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=Vi(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=no(o),_(e,r,o,c)}if(pe(o))return h(e,r,o,c);if(ue(o)){if(l=ue(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,co(o),c);if(o.$$typeof===M)return _(e,r,Da(e,o),c);uo(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=zi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{so=0;var i=_(e,t,n,r);return oo=null,i}catch(t){if(t===Xa||t===Qa)throw t;var a=Ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var po=fo(!0),mo=fo(!1),ho=!1;function go(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _o(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 vo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,$u&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ai(e),ki(e,null,n),t}return Ei(e,r,t,n),Ai(e)}function B(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,ht(e,n)}}function bo(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 xo=!1;function So(){if(xo){var e=Va;if(e!==null)throw e}}function Co(e,t,n,r){xo=!1;var i=e.updateQueue;ho=!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?(nd&f)===f:(r&f)===f){f!==0&&f===Ba&&(xo=!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=T({},d,f);break a;case 2:ho=!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),ud|=o,e.lanes=o,e.memoizedState=d}}function wo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function To(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)wo(n[e],t)}var Eo=_e(null),Do=_e(0);function Oo(e,t){e=cd,ye(Do,e),ye(Eo,t),cd=e|t.baseLanes}function ko(){ye(Do,cd),ye(Eo,Eo.current)}function Ao(){cd=Do.current,ve(Eo),ve(Do)}var jo=_e(null),V=null;function Mo(e){var t=e.alternate;ye(Lo,Lo.current&1),ye(jo,e),V===null&&(t===null||Eo.current!==null||t.memoizedState!==null)&&(V=e)}function No(e){ye(Lo,Lo.current),ye(jo,e),V===null&&(V=e)}function Po(e){e.tag===22?(ye(Lo,Lo.current),ye(jo,e),V===null&&(V=e)):Fo()}function Fo(){ye(Lo,Lo.current),ye(jo,jo.current)}function Io(e){ve(jo),V===e&&(V=null),ve(Lo)}var Lo=_e(0);function Ro(e,t){ye(jo,jo.current),ye(Lo,t)}function zo(e){ve(Lo),ve(jo),V===e&&(V=null)}function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||dm(n)||fm(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 Vo=0,H=null,Ho=null,Uo=null,U=!1,Wo=!1,W=!1,Go=0,G=0,Ko=null,qo=0;function Jo(){throw Error(i(321))}function Yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Br(e[n],t[n]))return!1;return!0}function Xo(e,t,n,r,i,a){return Vo=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?pc:mc,W=!1,a=n(r,i),W=!1,Wo&&(a=Qo(t,n,r,i)),Zo(e),a}function Zo(e){F.H=fc;var t=Ho!==null&&Ho.next!==null;if(Vo=0,Uo=Ho=H=null,U=!1,G=0,Ko=null,t)throw Error(i(300));e===null||jc||(e=e.dependencies,e!==null&&wa(e)&&(jc=!0))}function Qo(e,t,n,r){H=e;var a=0;do{if(Wo&&(Ko=null),G=0,Wo=!1,25<=a)throw Error(i(301));if(a+=1,Uo=Ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=hc,o=t(n,r)}while(Wo);return o}function $o(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?os(t):t,e=e.useState()[0],(Ho===null?null:Ho.memoizedState)!==e&&(H.flags|=1024),t}function es(){var e=Go!==0;return Go=0,e}function ts(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ns(e){if(U){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}U=!1}Vo=0,Uo=Ho=H=null,Wo=!1,G=Go=0,Ko=null}function rs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Uo===null?H.memoizedState=Uo=e:Uo=Uo.next=e,Uo}function is(){if(Ho===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=Ho.next;var t=Uo===null?H.memoizedState:Uo.next;if(t!==null)Uo=t,Ho=e;else{if(e===null)throw H.alternate===null?Error(i(467)):Error(i(310));Ho=e,e={memoizedState:Ho.memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},Uo===null?H.memoizedState=Uo=e:Uo=Uo.next=e}return Uo}function as(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function os(e){var t=G;return G+=1,Ko===null&&(Ko=[]),e=to(Ko,e,t),t=H,(Uo===null?t.memoizedState:Uo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?pc:mc),e}function ss(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return os(e);if(e.$$typeof===ce)return;if(e.$$typeof===M)return Ea(e)}throw Error(i(438,String(e)))}function cs(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=as(),H.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]=oe;return t.index++,n}function ls(e,t){return typeof t==`function`?t(e):t}function us(e){return ds(is(),Ho,e)}function ds(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Vo&f)===f:(nd&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===Ba&&(d=!0);else if((Vo&p)===p){u=u.next,p===Ba&&(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,H.lanes|=p,ud|=p;f=u.action,W&&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,H.lanes|=f,ud|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Br(o,e.memoizedState)&&(jc=!0,d&&(n=Va,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function fs(e){var t=is(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Br(o,t.memoizedState)||(jc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ps(e,t,n){var r=H,a=is(),o=z;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Br((Ho||a).memoizedState,n);if(s&&(a.memoizedState=n,jc=!0),a=a.queue,Rs(gs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Uo!==null&&!!(Uo.memoizedState.tag&1),Ns(e?9:8,{destroy:void 0},hs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,ed===null)throw Error(i(349));o||Vo&127||ms(r,t,n)}return n}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=as(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&vs(e)}function gs(e,t,n){return n(function(){_s(t)&&vs(e)})}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Br(e,n)}catch{return!0}}function vs(e){var t=Oi(e,2);t!==null&&Rd(t,e,2)}function ys(e){var t=rs();if(typeof e==`function`){var n=e;if(e=n(),W){Ze(!0);try{n()}finally{Ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:e},t}function bs(e,t,n,r){return e.baseState=n,ds(e,Ho,typeof r==`function`?r:ls)}function xs(e,t,n,r,a){if(lc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};o.types=a===null?null:a.types,F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Cs(e,t,s)}catch(n){Ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Cs(e,t,a)}catch(n){Ts(e,t,n)}}function Cs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ws(e,t,n)},function(n){return Ts(e,t,n)}):ws(e,t,n)}function ws(e,t,n){t.status=`fulfilled`,t.value=n,Es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ss(e,n)))}function Ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Es(t),t=t.next;while(t!==r)}e.action=null}function Es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function Os(e,t){if(z){var n=ed.formState;if(n!==null){a:{var r=H;if(z){if(aa){b:{for(var i=aa,a=sa;i.nodeType!==8;)if(!a||(i=mm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){aa=mm(i.nextSibling),r=i.data===`F!`;break a}}la(r)}r=!1}r&&(t=n[0])}}return n=rs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=oc.bind(null,H,r),r.dispatch=n,r=ys(!1),a=cc.bind(null,H,!1,r.queue),r=rs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=xs.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ks(e){return As(is(),Ho,e)}function As(e,t,n){if(t=ds(e,t,Ds)[0],e=us(ls)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=os(t)}catch(e){throw e===Xa?Qa:e}else r=t;t=is();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,Ns(9,{destroy:void 0},js.bind(null,i,n),null)),[r,a,e]}function js(e,t){e.action=t}function Ms(e){var t=is(),n=Ho;if(n!==null)return As(t,n,e);is(),t=t.memoizedState,n=is();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=as(),H.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ps(){return is().memoizedState}function Fs(e,t,n,r){var i=rs();H.flags|=e,i.memoizedState=Ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function Is(e,t,n,r){var i=is();r=r===void 0?null:r;var a=i.memoizedState.inst;Ho!==null&&r!==null&&Yo(r,Ho.memoizedState.deps)?i.memoizedState=Ns(t,a,n,r):(H.flags|=e,i.memoizedState=Ns(1|t,a,n,r))}function Ls(e,t){Fs(8390656,8,e,t)}function Rs(e,t){Is(2048,8,e,t)}function zs(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=as(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bs(e){var t=is().memoizedState;return zs({ref:t,nextImpl:e}),function(){if($u&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vs(e,t){return Is(4,2,e,t)}function Hs(e,t){return Is(4,4,e,t)}function Us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ws(e,t,n){n=n==null?null:n.concat([e]),Is(4,4,Us.bind(null,t,e),n)}function Gs(){}function Ks(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Yo(t,r[1]))return r[0];if(r=e(),W){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r}function Js(e,t,n){return n===void 0||Vo&1073741824&&!(nd&261930)?e.memoizedState=t:(e.memoizedState=n,e=Id(),H.lanes|=e,ud|=e,n)}function Ys(e,t,n,r){return Br(n,t)?n:Eo.current===null?!(Vo&106)||Vo&1073741824&&!(nd&261930)?(jc=!0,e.memoizedState=n):(e=Id(),H.lanes|=e,ud|=e,t):(e=Js(e,n,r),Br(e,t)||(jc=!0),e)}function Xs(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};s.types=o===null?null:o.types,F.T=s,cc(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,Wa(c,r),Fd(e)):sc(e,t,r,Fd(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},Fd())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,me,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:me},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},Fd())}function tc(){return Ea(fh)}function nc(){return is().memoizedState}function rc(){return is().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Fd();e=vo(n);var r=yo(t,e,n);r!==null&&(Rd(r,t,n),B(r,t,n)),t={cache:Na()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=Fd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=Di(e,t,n,r),n!==null&&(Rd(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,Fd())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Br(s,o))return Ei(e,t,i,0),ed===null&&Ti(),!1}catch{}if(n=Di(e,t,i,r),n!==null)return Rd(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:zf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=Di(e,n,r,2),t!==null&&Rd(t,e,2)}function lc(e){var t=e.alternate;return e===H||t!==null&&t===H}function uc(e,t){Wo=U=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ht(e,n)}}var fc={readContext:Ea,use:ss,useCallback:Jo,useContext:Jo,useEffect:Jo,useImperativeHandle:Jo,useLayoutEffect:Jo,useInsertionEffect:Jo,useMemo:Jo,useReducer:Jo,useRef:Jo,useState:Jo,useDebugValue:Jo,useDeferredValue:Jo,useTransition:Jo,useSyncExternalStore:Jo,useId:Jo,useHostTransitionStatus:Jo,useFormState:Jo,useActionState:Jo,useOptimistic:Jo,useMemoCache:Jo,useCacheRefresh:Jo,useEffectEvent:Jo},pc={readContext:Ea,use:ss,useCallback:function(e,t){return rs().memoizedState=[e,t===void 0?null:t],e},useContext:Ea,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=rs();t=t===void 0?null:t;var r=e();if(W){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=rs();if(n!==void 0){var i=n(t);if(W){Ze(!0);try{n(t)}finally{Ze(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ac.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=rs();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(rs(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,H,e.queue,!0,!1),rs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,a=rs();if(z){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ed===null)throw Error(i(349));nd&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=rs(),t=ed.identifierPrefix;if(z){var n=Qi,r=Zi;n=(r&~(1<<32-Qe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=qo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Os,useActionState:Os,useOptimistic:function(e){var t=rs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:cs,useCacheRefresh:function(){return rs().memoizedState=ic.bind(null,H)},useEffectEvent:function(e){var t=rs(),n={impl:e};return t.memoizedState=n,function(){if($u&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},mc={readContext:Ea,use:ss,useCallback:Ks,useContext:Ea,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:us,useRef:Ps,useState:function(){return us(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){return Ys(is(),Ho.memoizedState,e,t)},useTransition:function(){var e=us(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){return bs(is(),Ho,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs},hc={readContext:Ea,use:ss,useCallback:Ks,useContext:Ea,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:fs,useRef:Ps,useState:function(){return fs(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=is();return Ho===null?Js(n,e,t):Ys(n,Ho.memoizedState,e,t)},useTransition:function(){var e=fs(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){var n=is();return Ho===null?(n.baseState=e,[e,n.queue.dispatch]):bs(n,Ho,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs};function gc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fd(),i=vo(r);i.payload=t,n!=null&&(i.callback=n),t=yo(e,i,r),t!==null&&(Rd(t,e,r),B(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fd(),i=vo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=yo(e,i,r),t!==null&&(Rd(t,e,r),B(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fd(),r=vo(n);r.tag=2,t!=null&&(r.callback=t),t=yo(e,r,n),t!==null&&(Rd(t,e,n),B(t,e,n))}};function vc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Vr(n,r)||!Vr(i,a):!0}function yc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function bc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function xc(e){xi(e)}function Sc(e){console.error(e)}function Cc(e){xi(e)}function wc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ec(e,t,n){return n=vo(n),n.tag=3,n.payload={element:null},n.callback=function(){wc(e,t)},n}function Dc(e){return e=vo(e),e.tag=3,e}function Oc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Tc(t,n,r),typeof i!=`function`&&(Sd===null?Sd=new Set([this]):Sd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function kc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ca(t,n,a,!0),n=jo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return V===null?Xd():n.alternate===null&&ld===0&&(ld=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===$a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),yf(e,r,a)),!1;case 22:return n.flags|=65536,r===$a?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)),yf(e,r,a)),!1}throw Error(i(435,n.tag))}return yf(e,r,a),Xd(),!1}if(z)return t=jo.current,t===null?(r!==ca&&(t=Error(i(423),{cause:r}),ha(Ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ui(r,n),a=Ec(e.stateNode,r,a),bo(e,a),ld!==4&&(ld=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ca&&(e=Error(i(422),{cause:r}),ha(Ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ui(o,n),hd===null?hd=[o]:hd.push(o),ld!==4&&(ld=2),t===null)return!0;r=Ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ec(n.stateNode,r,e),bo(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`&&(Sd===null||!Sd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Dc(a),Oc(a,e,n,r),bo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ac=Error(i(461)),jc=!1;function Mc(e,t,n,r){t.child=e===null?mo(t,null,n,r):po(t,e.child,n,r)}function Nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ta(t),r=Xo(e,t,n,o,a,i),s=es(),e!==null&&!jc?(ts(e,t,i),sl(e,t,i)):(z&&s&&ta(t),t.flags|=1,Mc(e,t,r,i),t.child)}function Pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Fc(e,t,a,r,i)):(e=Li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!cl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Vr:n,n(o,r)&&e.ref===t.ref)return sl(e,t,i)}return t.flags|=1,e=Fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Vr(a,r)&&e.ref===t.ref){if(jc=!1,t.pendingProps=r=a,cl(e,i))e.flags&131072&&(jc=!0);else return t.lanes=e.lanes,sl(e,t,i)}}return Uc(e,t,n,r,i)}function Ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ja(t,a===null?null:a.cachePool),a===null?ko():Oo(t,a),Po(t);else return r=t.lanes=536870912,Rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ja(t,null),ko(),Fo()):(Ja(t,a.cachePool),Oo(t,a),Fo(),t.memoizedState=null);return Mc(e,t,i,n),t.child}function Lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rc(e,t,n,r,i){var a=qa();return a=a===null?null:{parent:Ma._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ja(t,null),ko(),Po(t),e!==null&&Ca(e,t,r,!0),t.childLanes=i,null}function zc(e,t){return t=Qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bc(e,t,n){return po(t,e.child,null,n),e=zc(t,t.pendingProps),e.flags|=2,Io(t),t.memoizedState=null,e}function Vc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(z){if(r.mode===`hidden`)return e=zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lc(null,e);if(No(t),(e=aa)?(e=um(e,sa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=536870912,null}return zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(No(t),a){if(t.flags&256)t.flags&=-257,t=Bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(jc||Ca(e,t,n,!1),a=(n&e.childLanes)!==0,jc||a){if(Eo.current===null){if(r=ed,r!==null&&(s=gt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Oi(e,s),Rd(r,e,s),Ac;Xd()}t=Bc(e,t,n)}else e=o.treeContext,aa=mm(s.nextSibling),ia=t,z=!0,oa=null,sa=!1,e!==null&&ra(t,e),t=zc(t,r),t.flags|=134221824;return t}return e=Fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Uc(e,t,n,r,i){return Ta(t),n=Xo(e,t,n,r,void 0,i),r=es(),e!==null&&!jc?(ts(e,t,i),sl(e,t,i)):(z&&r&&ta(t),t.flags|=1,Mc(e,t,n,i),t.child)}function Wc(e,t,n,r,i,a){return Ta(t),t.updateQueue=null,n=Qo(t,r,n,i),Zo(e),r=es(),e!==null&&!jc?(ts(e,t,a),sl(e,t,a)):(z&&r&&ta(t),t.flags|=1,Mc(e,t,n,a),t.child)}function Gc(e,t,n,r,i){if(Ta(t),t.stateNode===null){var a=ji,o=n.contextType;typeof o==`object`&&o&&(a=Ea(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=_c,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},go(t),o=n.contextType,a.context=typeof o==`object`&&o?Ea(o):ji,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(gc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&_c.enqueueReplaceState(a,a.state,null),Co(t,r,a,i),So(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=bc(n,s);a.props=c;var l=a.context,u=n.contextType;o=ji,typeof u==`object`&&u&&(o=Ea(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&yc(t,a,r,o),ho=!1;var f=t.memoizedState;a.state=f,Co(t,r,a,i),So(),l=t.memoizedState,s||f!==l||ho?(typeof d==`function`&&(gc(t,n,d,r),l=t.memoizedState),(c=ho||vc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,_o(e,t),o=t.memoizedProps,u=bc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ji,typeof l==`object`&&l&&(c=Ea(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&yc(t,a,r,c),ho=!1,f=t.memoizedState,a.state=f,Co(t,r,a,i),So();var p=t.memoizedState;o!==d||f!==p||ho||e!==null&&e.dependencies!==null&&wa(e.dependencies)?(typeof s==`function`&&(gc(t,n,s,r),p=t.memoizedState),(u=ho||vc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&wa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Hc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=po(t,e.child,null,i),t.child=po(t,null,n,i)):Mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=sl(e,t,i),e}function Kc(e,t,n,r){return pa(),t.flags|=256,Mc(e,t,n,r),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Ya()}}function Yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=pd),e}function Xc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Lo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(z){if(i?Mo(t):Fo(),(e=aa)?(e=um(e,sa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=fm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Fo(),i=t.mode,a=Qc({mode:`hidden`,children:a},i),r=Ri(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Jc(n),r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(null,r)):(Mo(t),Zc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return el(e,t,a,o,r,c,s,n)}return i?(Fo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Fi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ri(i,a,n,null),i.flags|=2):i=Fi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Lc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Jc(n):(a=i.cachePool,a===null?a=Ya():(s=Ma._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(e.child,r)):(Mo(t),n=e.child,e=n.sibling,n=Fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Zc(e,t){return t=Qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Qc(e,t){return e=Ni(22,e,null,t),e.lanes=0,e}function $c(e,t,n){return po(t,e.child,null,n),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function el(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Mo(t),t.flags&=-257,$c(e,t,c)):t.memoizedState===null?(Fo(),o=a.fallback,s=t.mode,a=Qc({mode:`visible`,children:a.children},s),o=Ri(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,po(t,e.child,null,c),a=t.child,a.memoizedState=Jc(c),a.childLanes=Yc(e,r,c),t.memoizedState=qc,Lc(null,a)):(Fo(),t.child=e.child,t.flags|=128,null);if(Mo(t),fm(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,ha({value:a,source:null,stack:null})),$c(e,t,c)}if(jc||Ca(e,t,c,!1),r=(c&e.childLanes)!==0,jc||r){if(Eo.current!==null)return $c(e,t,c);if(r=ed,r!==null&&(a=gt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Oi(e,a),Rd(r,e,a),Ac;return dm(o)||Xd(),$c(e,t,c)}return dm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,aa=mm(o.nextSibling),ia=t,z=!0,oa=null,sa=!1,e!==null&&ra(t,e),t=Zc(t,a.children),t.flags|=134221824,t)}function tl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),xa(e.return,t,n)}function nl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Bo(n)===null&&(t=e),e=e.sibling}return t}function rl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function il(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function al(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Lo.current;if(t.flags&128)return Ro(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Ro(t,o),i===`backwards`&&e!==null?(il(e),Mc(e,t,r,n),il(e)):Mc(e,t,r,n),r=z?qi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tl(e,n,t);else if(e.tag===19)tl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,il(t)),rl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Bo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rl(t,!0,n,null,a,r);break;case`together`:rl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rl(t,!1,i,n,a,r)}return t.child}function ol(e,t,n){var r=t.pendingProps;return ya(t,t.type,r.value),Mc(e,t,r.children,n),t.child}function sl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ud|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ca(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=Fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&wa(e)))}function ll(e,t,n){switch(t.tag){case 3:we(t,t.stateNode.containerInfo),ya(t,Ma,e.memoizedState.cache),pa();break;case 27:case 5:Ee(t);break;case 4:we(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,No(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Mo(t),t.flags|=128,null;r=Ca(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Xc(e,t,n):(Mo(t),e=sl(e,t,n),e===null?null:e.sibling)}Mo(t);break;case 19:if(t.flags&128)return al(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Ca(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return al(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ro(t,Lo.current),r)break;return null;case 22:return t.lanes=0,Ic(e,t,n,t.pendingProps);case 24:ya(t,Ma,e.memoizedState.cache)}return sl(e,t,n)}function ul(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)jc=!0;else{if(!cl(e,n)&&!(t.flags&128))return jc=!1,ll(e,t,n);jc=!!(e.flags&131072)}}else jc=!1,z&&t.flags&1048576&&ea(t,qi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=no(t.elementType),t.type=e,typeof e==`function`)Pi(e)?(r=bc(e,r),t.tag=1,t=Gc(null,t,e,r,n)):(t.tag=0,t=Uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===N){t.tag=11,t=Nc(null,t,e,r,n);break a}if(a===re){t.tag=14,t=Pc(null,t,e,r,n);break a}if(a===M){t.tag=10,t.type=e,t=ol(null,t,n);break a}}throw t=fe(e)||e,Error(i(306,t,``))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=bc(r,t.pendingProps),Gc(e,t,r,a,n);case 3:a:{if(we(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,_o(e,t),Co(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ya(t,Ma,r),r!==o.cache&&Sa(t,[Ma],n,!0),So(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Kc(e,t,r,n);break a}if(r!==a){a=Ui(Error(i(424)),t),ha(a),t=Kc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(aa=mm(e.firstChild),ia=t,z=!0,oa=null,sa=!0,n=mo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(pa(),r===a){t=sl(e,t,n);break a}Mc(e,t,r,n)}t=t.child}return t;case 26:return Hc(e,t),e===null?(n=Rm(t.type,null,t.pendingProps,null))?t.memoizedState=n:z||(t.stateNode=_p(t.type,t.pendingProps,Se.current,t)):t.memoizedState=Rm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ee(t),e===null&&z&&(r=t.stateNode=bm(t.type,t.pendingProps,Se.current),ia=t,sa=!0,a=aa,Dp(t.type)?(hm=a,aa=mm(r.firstChild)):aa=a),Mc(e,t,t.pendingProps.children,n),Hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&z&&((a=r=aa)&&(r=cm(r,t.type,t.pendingProps,sa),r===null?a=!1:(t.stateNode=r,ia=t,aa=mm(r.firstChild),sa=!1,a=!0)),a||la(t)),Ee(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,vp(a,o)?r=null:s!==null&&vp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Xo(e,t,$o,null,null,n),fh._currentValue=a),Hc(e,t),Mc(e,t,r,n),t.child;case 6:return e===null&&z&&((e=n=aa)&&(n=lm(n,t.pendingProps,sa),n===null?e=!1:(t.stateNode=n,ia=t,aa=null,e=!0)),e||la(t)),null;case 13:return Xc(e,t,n);case 4:return we(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=po(t,null,r,n):Mc(e,t,r,n),t.child;case 11:return Nc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Hc(e,t),Mc(e,t,r,n),t.child;case 8:return Mc(e,t,t.pendingProps.children,n),t.child;case 12:return Mc(e,t,t.pendingProps.children,n),t.child;case 10:return ol(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ta(t),a=Ea(a),r=r(a),t.flags|=1,Mc(e,t,r,n),t.child;case 14:return Pc(e,t,t.type,t.pendingProps,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return Vc(e,t,n);case 22:return Ic(e,t,n,t.pendingProps);case 24:return Ta(t),r=Ea(Ma),e===null?(a=qa(),a===null&&(a=ed,o=Na(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},go(t),ya(t,Ma,a)):((e.lanes&n)!==0&&(_o(e,t),Co(t,null,null,n),So()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ya(t,Ma,r),r!==a.cache&&Sa(t,[Ma],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ya(t,Ma,r))),Mc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:z&&ta(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Hc(e,t),Mc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function dl(e){e.flags|=4}function fl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?$m(t,r):$m(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(qd())e.flags|=8192;else throw ro=$a,Za}}else e.flags&=-16777217}function pl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!eh(t)){if(qd())e.flags|=8192;else throw ro=$a,Za}}function ml(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ut(),e.lanes|=t,md|=t)}function hl(e,t){if(!z)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function gl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function _l(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gl(t),null;case 1:return gl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ba(Ma),Te(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(fa(t)?dl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ma())),gl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(dl(t),o===null?(gl(t),fl(t,a,null,r,n)):(gl(t),pl(t,o))):o?o===e.memoizedState?(gl(t),t.flags&=-16777217):(dl(t),gl(t),pl(t,o)):(e=e.memoizedProps,e!==r&&dl(t),gl(t),fl(t,a,e,r,n)),null;case 27:if(De(t),n=Se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}e=be.current,fa(t)?ua(t,e):(e=bm(a,r,n),t.stateNode=e,dl(t))}return gl(t),t.subtreeFlags&=-33554433,null;case 5:if(De(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}if(o=be.current,fa(t))ua(t,o);else{var s=mp(Se.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[St]=t,o[Ct]=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(sp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&dl(t)}}return gl(t),t.subtreeFlags&=-33554433,fl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Se.current,fa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ia,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[St]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ip(e.nodeValue,n)),e||la(t,!0)}else e=mp(e).createTextNode(r),e[St]=t,t.stateNode=e}return gl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=fa(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[St]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),e=!1}else n=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Io(t),t):(Io(t),null);if(t.flags&128)throw Error(i(558))}return gl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=fa(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[St]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),a=!1}else a=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Io(t),t):(Io(t),null)}return Io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ml(t,t.updateQueue),gl(t),null);case 4:return Te(),e===null&&q(t.stateNode.containerInfo),t.flags|=67108864,gl(t),null;case 10:return ba(t.type),gl(t),null;case 19:if(zo(t),r=t.memoizedState,r===null)return gl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)hl(r,!1);else{if(ld!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Bo(e),o!==null){for(t.flags|=128,hl(r,!1),e=o.updateQueue,t.updateQueue=e,ml(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ii(n,e),n=n.sibling;return Ro(t,Lo.current&1|2),z&&$i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Be()>bd&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Bo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ml(t,e),hl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!z)return gl(t),null}else 2*Be()-r.renderingStartTime>bd&&n!==536870912&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Be(),e.sibling=null,o=Lo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||z?Ro(t,o):(n=o,ye(jo,t),ye(Lo,n),V===null&&(V=t)),z&&$i(t,r.treeForkCount),e}return gl(t),null;case 22:case 23:return Io(t),Ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(gl(t),t.subtreeFlags&6&&(t.flags|=8192)):gl(t),n=t.updateQueue,n!==null&&ml(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ve(Ka),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ba(Ma),gl(t),null;case 25:return null;case 30:return t.flags|=33554432,gl(t),null}throw Error(i(156,t.tag))}function vl(e,t){switch(na(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ba(Ma),Te(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return De(t),null;case 31:if(t.memoizedState!==null){if(Io(t),t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zo(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 Te(),null;case 10:return ba(t.type),null;case 22:case 23:return Io(t),Ao(),e!==null&&ve(Ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ba(Ma),null;case 25:return null;default:return null}}function yl(e,t){switch(na(t),t.tag){case 3:ba(Ma),Te();break;case 26:case 27:case 5:De(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&Io(t);break;case 13:Io(t);break;case 19:zo(t);break;case 10:ba(t.type);break;case 22:case 23:Io(t),Ao(),e!==null&&ve(Ka);break;case 24:ba(Ma)}}function bl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){vf(t,t.return,e)}}function xl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){vf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){vf(t,t.return,e)}}function Sl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{To(t,n)}catch(t){vf(e,e.return,t)}}}function Cl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){vf(e,t,n)}}function wl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=vi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=zp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Bp(e);p(e.child,!1,rm,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){vf(e,t,n)}}function Tl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){vf(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){vf(e,t,n)}else n.current=null}}function El(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)am(e.stateNode,t[n])}function Dl(e){for(var t=e.return;t!==null&&(Al(t)&&am(e.stateNode,t.stateNode),!kl(t));)t=t.return}function Ol(e){for(var t=e.return;t!==null&&(Al(t)&&om(e.stateNode,t.stateNode),!kl(t));)t=t.return}function kl(e){return e.tag===5||e.tag===3||e.tag===27}function Al(e){return e&&e.tag===7&&e.stateNode!==null}function jl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){vf(e,e.return,t)}}function Ml(e,t,n){try{var r=e.stateNode;lp(r,e.type,n,t),r[Ct]=t}catch(t){vf(e,e.return,t)}}function Nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dp(e.type)||e.tag===4}function Pl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Dp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vn)),El(e,r),L=!0;else if(i!==4&&(i===27&&(El(e,r),r=null,Dp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Fl(e,t,n,r),e=e.sibling;e!==null;)Fl(e,t,n,r),e=e.sibling}function Il(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),El(e,r),L=!0;else if(i!==4&&(i===27&&(El(e,r),r=null,Dp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Il(e,t,n,r),e=e.sibling;e!==null;)Il(e,t,n,r),e=e.sibling}function Ll(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);sp(t,r,n),t[St]=e,t[Ct]=n}catch(t){vf(e,e.return,t)}}var Rl=!1,zl=null;function Bl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Rl=!0)}var Vl=null;function Hl(){var e=Vl;return Vl=null,e}var Ul=0;function Wl(e,t,n,r,i){return Ul=0,Gl(e.child,t,n,r,i)}function Gl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Np(o);r.push(s),s.view&&(a=!0)}else a||Np(o).view&&(a=!0);Rl=!0,Ap(o,Ul===0?t:t+`_`+Ul,n),Ul++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Gl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Kl(e,t){for(;e!==null;)e.tag===5?jp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Kl(e.child,t)),e=e.sibling}function ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(ql(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=bi(t.default,t.share),t!==`none`&&(Wl(e,n,t,null,!1)||Kl(e.child,!1))}e=e.sibling}}function Jl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=vi(r,n),a=bi(r.default,n.paired?r.share:r.enter);a===`none`?ql(e):Wl(e,i,a,null,!1)?(ql(e),n.paired||t||Ld(e,r.onEnter)):Kl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e,t),e=e.sibling;else ql(e)}function Yl(e){if(zl!==null&&zl.size!==0){var t=zl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=bi(n.default,n.share);if(a!==`none`&&(Wl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Ld(e,n.onShare)):Kl(e.child,!1)),t.delete(r),t.size===0)break}}}Yl(e)}e=e.sibling}}}function Xl(e){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode),r=zl===null?void 0:zl.get(n),i=bi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Wl(e,n,i,null,!1)?r===void 0?Ld(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,zl.delete(n),Ld(e,t.onShare)):Kl(e.child,!1)),zl!==null&&Yl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e),e=e.sibling;else zl!==null&&Yl(e)}function Zl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode);t=bi(t.default,t.update),e.flags&=-5,t!==`none`&&Wl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Zl(e);e=e.sibling}}function Ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Kl(e.child,!1))}Ql(e)}e=e.sibling}}function $l(e){if(e.tag===30)e.stateNode.paired=null,Kl(e.child,!1),Ql(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e),e=e.sibling;else Ql(e)}function eu(e){for(e=e.child;e!==null;)e.tag===30?Kl(e.child,!1):e.subtreeFlags&33554432&&eu(e),e=e.sibling}function tu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Ul<a.length){var l=a[Ul],u=Np(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&&Ap(c,Ul===0?n:n+`_`+Ul,i),s&&e.flags&4||(Vl===null&&(Vl=[]),Vl.push(c,Ul===0?r:r+`_`+Ul,t.memoizedProps)),Ul++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:tu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function nu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=vi(n,r),a=bi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Pp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Ul=0,i=tu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Ld(e,n.onUpdate))}else e.subtreeFlags&33554432&&nu(e,t);e=e.sibling}}var ru=!1,iu=!1,au=!1,ou=!1,su=typeof WeakSet==`function`?WeakSet:Set,cu=null,lu=!1,uu=!1,du=!1,fu=!1;function pu(e,t,n){if(e=e.containerInfo,fp=xh,e=Kr(e),qr(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(pp={focusedElem:e,selectionRange:r},xh=!1,n=(n&335544064)===n,cu=t,t=n?9270:1024;cu!==null;){if(e=cu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Xl(r[a]);if(e.alternate===null&&e.flags&2)n&&Bl(e),mu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Xl(r),mu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Bl(e),mu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,cu=r):(n&&Zl(e),mu(n))}}zl=null}function mu(e){for(;cu!==null;){var t=cu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=bc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){vf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)sm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:sm(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=vi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=bi(a.default,a.update),a!==`none`&&Wl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,cu=r;break}cu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Pu(e,n),r&4&&bl(5,n);break;case 1:if(Pu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){vf(n,n.return,e)}else{var i=bc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){vf(n,n.return,e)}}}r&64&&Sl(n),r&512&&wl(n,n.return);break;case 3:if(Pu(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{To(e,t)}catch(e){vf(n,n.return,e)}}break;case 27:t===null&&r&4&&Ll(n);case 26:case 5:Pu(e,n),t===null&&r&4&&jl(n),r&512&&wl(n,n.return);break;case 12:Pu(e,n);break;case 31:Pu(e,n),r&4&&Cu(e,n);break;case 13:Pu(e,n),r&4&&wu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Sf.bind(null,n),pm(e,n))));break;case 22:if(r=n.memoizedState!==null||ru,!r){var a=t!==null&&t.memoizedState!==null||iu;t=ru,i=iu,ru=r,(iu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Iu(e,n,r)):Pu(e,n),ru=t,iu=i}break;case 30:Pu(e,n),r&512&&wl(n,n.return);break;case 7:r&512&&wl(n,n.return);default:Pu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){vf(e,e.return,t)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,L=!0}catch(t){vf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?kp(s,!0):kp(e.stateNode,!1)}catch(t){vf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&jt(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 K=null,bu=!1;function xu(e,t,n){for(n=n.child;n!==null;)Su(e,t,n),n=n.sibling}function Su(e,t,n){if(Xe&&typeof Xe.onCommitFiberUnmount==`function`)try{Xe.onCommitFiberUnmount(Ye,n)}catch{}switch(n.tag){case 26:iu||Tl(n,t),xu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!iu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:iu||Tl(n,t),Ol(n);var r=K,i=bu;Dp(n.type)&&(K=n.stateNode,bu=!1),xu(e,t,n),xm(n.stateNode,n.type,n.memoizedProps),K=r,bu=i;break;case 5:iu||Tl(n,t),Ol(n);case 6:if(n.tag===6&&Ol(n),r=K,i=bu,K=null,xu(e,t,n),K=r,bu=i,K!==null){if(bu)try{(K.nodeType===9?K.body:K.nodeName===`HTML`?K.ownerDocument.body:K).removeChild(n.stateNode),L=!0}catch(e){vf(n,t,e)}else try{K.removeChild(n.stateNode),L=!0}catch(e){vf(n,t,e)}}break;case 18:K!==null&&(bu?(e=K,Op(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),qh(e)):Op(K,n.stateNode));break;case 4:r=K,i=bu,K=n.stateNode.containerInfo,bu=!0,xu(e,t,n),K=r,bu=i;break;case 0:case 11:case 14:case 15:xl(2,n,t),iu||xl(4,n,t),xu(e,t,n);break;case 1:iu||(Tl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Cl(n,t,r)),xu(e,t,n);break;case 21:xu(e,t,n);break;case 22:iu=(r=iu)||n.memoizedState!==null,xu(e,t,n),iu=r;break;case 30:Tl(n,t),xu(e,t,n);break;case 7:iu||Tl(n,t),xu(e,t,n);break;default:xu(e,t,n)}}function Cu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qh(e)}catch(e){vf(t,t.return,e)}}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qh(e)}catch(e){vf(t,t.return,e)}}function Tu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new su),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new su),t;default:throw Error(i(435,e.tag))}}function Eu(e,t){var n=Tu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Cf.bind(null,e,t);t.then(r,r)}})}function Du(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(Dp(l.type)){K=l.stateNode,bu=!1;break a}break;case 5:K=l.stateNode,bu=!1;break a;case 3:case 4:K=l.stateNode.containerInfo,bu=!0;break a}l=l.return}if(K===null)throw Error(i(160));Su(s,c,o),K=null,bu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ku(t,e,n),t=t.sibling}var Ou=null;function ku(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}Du(t,e,n),Au(e),a&4&&(xl(3,e,e.return),bl(3,e),xl(5,e,e.return));break;case 1:Du(t,e,n),Au(e),a&512&&(iu||r===null||Tl(r,r.return)),a&64&&ru&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Ou,Du(t,e,n),Au(e),a&512&&(iu||r===null||Tl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(ru)e.stateNode=_p(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[kt]||r[St]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),sp(r,t,n),r[St]=e,It(r),t=r;break a;case`link`:if(o=Xm(`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),sp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Xm(`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),sp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[St]=e,It(r),t=r}e.stateNode=t}}else ru||Zm(o,e.type,e.stateNode)}else e.stateNode=Gm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ml(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||iu||t.parentNode.removeChild(t)):a.count--,n===null?ru||Zm(o,e.type,e.stateNode):Gm(o,n,e.memoizedProps))}break;case 27:Du(t,e,n),Au(e),a&512&&(iu||r===null||Tl(r,r.return)),r!==null&&a&4&&Ml(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=au,au=!1,Du(t,e,n),au=o,Au(e),a&512&&(iu||r===null||Tl(r,r.return)),e.flags&32){t=e.stateNode;try{un(t,``),L=!0}catch(t){vf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ml(e,t,r===null?t:r.memoizedProps)),a&1024&&(ou=!0);break;case 6:if(Du(t,e,n),Au(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,L=!0}catch(t){vf(e,e.return,t)}}break;case 3:if(L=!1,Ym=null,o=Ou,Ou=Tm(t.containerInfo),Du(t,e,n),Ou=o,Au(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{qh(t.containerInfo)}catch(t){vf(e,e.return,t)}ou&&(ou=!1,ju(e)),L=!1;break;case 4:a=au,au=ru,r=Kt(),o=Ou,Ou=Tm(e.stateNode.containerInfo),Du(t,e,n),Au(e),Ou=o,L&&uu&&(du=!0),L=r,au=a;break;case 12:Du(t,e,n),Au(e);break;case 31:Du(t,e,n),Au(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Eu(e,t)));break;case 13:Du(t,e,n),Au(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(vd=Be()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Eu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=ru,l=iu,u=au;ru=c||o,au=u||o,iu=l||s,Du(t,e,n),iu=l,au=u,ru=c,Au(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||ru||iu||(t=s||iu,n=ru,r=iu,ru=o||ru,iu=t,Fu(e,2),ru=n,iu=r),!o&&au||gu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Eu(e,n))));break;case 19:Du(t,e,n),Au(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Eu(e,t)));break;case 30:a&512&&(iu||r===null||Tl(r,r.return)),a=Kt(),o=uu,s=(n&335544064)===n,c=e.memoizedProps,uu=s&&bi(c.default,c.update)!==`none`,Du(t,e,n),Au(e),s&&r!==null&&L&&(e.flags|=4),uu=o,L=a;break;case 21:break;case 7:a&512&&(iu||r===null||Tl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Du(t,e,n),Au(e)}}function Au(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Nl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Al(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(kl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Il(e,Pl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(un(l,``),n.flags&=-33),Il(e,Pl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Fl(e,Pl(e),u,s);break;default:throw Error(i(161))}}catch(t){vf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ju(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ju(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,xh=!0,t.reset(),xh=!1),e=e.sibling}}function Mu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Nu(t,e),t=t.sibling;else nu(t,!1)}function Nu(e,t){var n=e.alternate;if(n===null)Jl(e,!1);else switch(e.tag){case 3:if(fu=lu=!1,Hl(),Mu(t,e),!lu&&!du){if(e=Vl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];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`})),fu=!0}Vl=null;break;case 5:Mu(t,e);break;case 4:r=lu,lu=!1,Mu(t,e),lu&&(du=!0),lu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Mu(t,e):Jl(e,!1));break;case 30:r=lu,i=Hl(),lu=!1,Mu(t,e),lu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=vi(a,o),o=vi(n.memoizedProps,o);var s=bi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Ul=0,t=tu(e,n,t,o,s,a,!0),Ul!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Ld(e,e.memoizedProps.onUpdate),Vl=i):i!==null&&(i.push.apply(i,Vl),Vl=i),lu=e.flags&32?!0:r;break;default:Mu(t,e)}}function Pu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Fu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:xl(4,n,n.return),Fu(n,r);break;case 1:Tl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Cl(n,n.return,i),Fu(n,r);break;case 27:r&2&&xm(n.stateNode,n.type,n.memoizedProps);case 5:Tl(n,n.return),n.tag!==5&&n.tag!==27||Ol(n),Fu(n,r);break;case 6:Ol(n);break;case 26:Tl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||iu||i.parentNode.removeChild(i),Fu(n,r);break;case 22:n.memoizedState===null&&Fu(n,r);break;case 30:Tl(n,n.return),Fu(n,r);break;case 7:Tl(n,n.return);default:Fu(n,r)}e=e.sibling}}function Iu(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:Iu(i,a,n),bl(4,a);break;case 1:if(Iu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){vf(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++)wo(l[i],c)}catch(e){vf(r,r.return,e)}}s&&o&64&&Sl(a),wl(a,a.return);break;case 27:n&2&&Ll(a);case 5:a.tag!==5&&a.tag!==27||Dl(a),Iu(i,a,n),s&&r===null&&o&4&&jl(a),wl(a,a.return);break;case 6:Dl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||ru||Zm(Tm(c.ownerDocument),a.type,c),Iu(i,a,n),s&&r===null&&o&4&&jl(a),wl(a,a.return);break;case 12:Iu(i,a,n);break;case 31:Iu(i,a,n),s&&o&4&&Cu(i,a);break;case 13:Iu(i,a,n),s&&o&4&&wu(i,a);break;case 22:a.memoizedState===null&&Iu(i,a,n),wl(a,a.return);break;case 30:Iu(i,a,n),wl(a,a.return);break;case 7:wl(a,a.return);default:Iu(i,a,n)}t=t.sibling}}function Lu(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&&Pa(n))}function Ru(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pa(e))}function zu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Bu(e,t,n,r),t=t.sibling;else i&&eu(t)}function Bu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&$l(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:zu(e,t,n,r),a&2048&&bl(9,t);break;case 1:zu(e,t,n,r);break;case 3:zu(e,t,n,r),i&&fu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Pa(a)));break;case 12:if(a&2048){zu(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){vf(t,t.return,e)}}else zu(e,t,n,r);break;case 31:zu(e,t,n,r);break;case 13:zu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&$l(t),o._visibility&2?zu(e,t,n,r):(o._visibility|=2,Vu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&$l(s),o._visibility&2?zu(e,t,n,r):Hu(e,t)),a&2048&&Lu(s,t);break;case 24:zu(e,t,n,r),a&2048&&Ru(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Kl(a.child,!0),Kl(t.child,!0))),zu(e,t,n,r);break;default:zu(e,t,n,r)}}function Vu(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:Vu(a,o,s,c,i),bl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Vu(a,o,s,c,i)):u._visibility&2?Vu(a,o,s,c,i):Hu(a,o),i&&l&2048&&Lu(o.alternate,o);break;case 24:Vu(a,o,s,c,i),i&&l&2048&&Ru(o.alternate,o);break;default:Vu(a,o,s,c,i)}t=t.sibling}}function Hu(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:Hu(n,r),i&2048&&Lu(r.alternate,r);break;case 24:Hu(n,r),i&2048&&Ru(r.alternate,r);break;default:Hu(n,r)}t=t.sibling}}var Uu=8192;function Wu(e,t,n){if(e.subtreeFlags&Uu)for(e=e.child;e!==null;)Gu(e,t,n),e=e.sibling}function Gu(e,t,n){switch(e.tag){case 26:Wu(e,t,n),e.flags&Uu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&nh(n,e)):rh(n,Ou,e.memoizedState,e.memoizedProps));break;case 5:Wu(e,t,n),e.flags&Uu&&(e=e.stateNode,(t&335544128)===t&&nh(n,e));break;case 3:case 4:var r=Ou;Ou=Tm(e.stateNode.containerInfo),Wu(e,t,n),Ou=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Uu,Uu=16777216,Wu(e,t,n),Uu=r):Wu(e,t,n));break;case 30:if((e.flags&Uu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,zl===null&&(zl=new Map),zl.set(r,i)}Wu(e,t,n);break;default:Wu(e,t,n)}}function Ku(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 qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Xu(r,e)}Ku(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ju(e),e=e.sibling}function Ju(e){switch(e.tag){case 0:case 11:case 15:qu(e),e.flags&2048&&xl(9,e,e.return);break;case 3:qu(e);break;case 12:qu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yu(e)):qu(e);break;default:qu(e)}}function Yu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Xu(r,e)}Ku(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xl(8,t,t.return),Yu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Yu(t));break;default:Yu(t)}e=e.sibling}}function Xu(e,t){for(;cu!==null;){var n=cu;switch(n.tag){case 0:case 11:case 15:xl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Pa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cu=r;else a:for(n=e;cu!==null;){r=cu;var i=r.sibling,a=r.return;if(yu(r),r===n){cu=null;break a}if(i!==null){i.return=a,cu=i;break a}cu=a}}}var Zu={getCacheForType:function(e){var t=Ea(Ma),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ea(Ma).controller.signal}},Qu=typeof WeakMap==`function`?WeakMap:Map,$u=0,ed=null,td=null,nd=0,rd=0,id=null,ad=!1,od=!1,sd=!1,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=0,hd=null,gd=null,_d=!1,vd=0,yd=0,bd=1/0,xd=null,Sd=null,Cd=0,wd=null,Td=null,Ed=0,Dd=0,Od=null,kd=null,Ad=null,jd=null,Md=null,Nd=0,Pd=null;function Fd(){return $u&2&&nd!==0?nd&-nd:F.T===null?yt():zf()}function Id(){if(pd===0){if(!(nd&536870912)||z){var e=rt;rt<<=1,!(rt&3932160)&&(rt=262144),pd=e}else pd=536870912}return e=jo.current,e!==null&&(e.flags|=32),pd}function Ld(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=zp(vi(e.memoizedProps,n))),jd===null&&(jd=[]),jd.push(t.bind(null,r))}}function Rd(e,t,n){(e===ed&&(rd===2||rd===9)||e.cancelPendingCommit!==null)&&(Gd(e,0),Hd(e,nd,pd,!1)),ft(e,n),(!($u&2)||e!==ed)&&(e===ed&&(!($u&2)&&(dd|=n),ld===4&&Hd(e,nd,pd,!1)),jf(e))}function zd(e,t,n){if($u&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||st(e,t),a=r?$d(e,t):Zd(e,t,!0),o=r;do{if(a===0){od&&!r&&Hd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Vd(n))a=Zd(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=hd;var l=c.current.memoizedState.isDehydrated;if(l&&(Gd(c,s).flags|=256),s=Zd(c,s,!1),s!==2&&s!==6){if(sd&&!l){c.errorRecoveryDisabledLanes|=o,dd|=o,a=4;break a}o=gd,gd=a,o!==null&&(gd===null?gd=o:gd.push.apply(gd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Gd(e,0),Hd(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:Hd(r,t,pd,!ad);break a;case 2:gd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=vd+300-Be(),10<a)){if(Hd(r,t,pd,!ad),ot(r,0,!0)!==0)break a;Ed=t,r.timeoutHandle=xp(Bd.bind(null,r,n,gd,xd,_d,t,pd,dd,md,ad,o,`Throttled`,-0,0),a);break a}Bd(r,n,gd,xd,_d,t,pd,dd,md,ad,o,null,-0,0)}break}}while(1);jf(e)}function Bd(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:vn},zl=null,Gu(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?vd-Be():(a&4194048)===a?yd-Be():0,m=ah(d,m),m!==null)?(Ed=a,e.cancelPendingCommit=m(sf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Hd(e,a,o,!l)):sf(e,t,a,n,r,i,o,s,c,l,u,d)}function Vd(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(!Br(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 Hd(e,t,n,r){t=ct(e,t),t&=~fd,t&=~dd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Qe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&mt(e,n,t)}function Ud(){return $u&6?!0:(Mf(0,!1),!1)}function Wd(){if(td!==null){if(rd===0)var e=td.return;else e=td,va=_a=null,ns(e),oo=null,so=0,e=td;for(;e!==null;)yl(e.alternate,e),e=e.return;td=null}}function Gd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Sp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ed=0,Wd(),ed=e,td=n=Fi(e.current,null),nd=t,rd=0,id=null,ad=!1,od=st(e,t),sd=!1,md=pd=fd=dd=ud=ld=0,gd=hd=null,_d=!1,cd=ct(e,t),Ti(),n}function Kd(e,t){H=null,F.H=fc,t===Xa||t===Qa?(t=io(),rd=3):t===Za?(t=io(),rd=4):rd=t===Ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,id=t,td===null&&(ld=1,wc(e,Ui(t,e.current)))}function qd(){var e=jo.current;return e===null?!0:(nd&4194048)===nd?V===null:(nd&62914560)===nd||nd&536870912?e===V:!1}function Jd(){var e=F.H;return F.H=fc,e===null?fc:e}function Yd(){var e=F.A;return F.A=Zu,e}function Xd(){ld=4,ad||(nd&4194048)!==nd&&jo.current!==null||(od=!0),!(ud&134217727)&&!(dd&134217727)||ed===null||Hd(ed,nd,pd,!1)}function Zd(e,t,n){var r=$u;$u|=2;var i=Jd(),a=Yd();(ed!==e||nd!==t)&&(xd=null,Gd(e,t)),t=!1;var o=ld;a:do try{if(rd!==0&&td!==null){var s=td,c=id;switch(rd){case 8:Wd(),o=6;break a;case 3:case 2:case 9:case 6:jo.current===null&&(t=!0);var l=rd;if(rd=0,id=null,rf(e,s,c,l),n&&od){o=0;break a}break;default:l=rd,rd=0,id=null,rf(e,s,c,l)}}Qd(),o=ld;break}catch(t){Kd(e,t)}while(1);return t&&e.shellSuspendCounter++,va=_a=null,$u=r,F.H=i,F.A=a,td===null&&(ed=null,nd=0,Ti()),o}function Qd(){for(;td!==null;)tf(td)}function $d(e,t){var n=$u;$u|=2;var r=Jd(),a=Yd();ed!==e||nd!==t?(xd=null,bd=Be()+500,Gd(e,t)):od=st(e,t);a:do try{if(rd!==0&&td!==null){t=td;var o=id;b:switch(rd){case 1:rd=0,id=null,rf(e,t,o,1);break;case 2:case 9:if(eo(o)){rd=0,id=null,nf(t);break}t=function(){rd!==2&&rd!==9||ed!==e||(rd=7),jf(e)},o.then(t,t);break a;case 3:rd=7;break a;case 4:rd=5;break a;case 7:eo(o)?(rd=0,id=null,nf(t)):(rd=0,id=null,rf(e,t,o,7));break;case 5:var s=null;switch(td.tag){case 26:s=td.memoizedState;case 5:case 27:var c=td;if(s?eh(s):c.stateNode.complete){rd=0,id=null;var l=c.sibling;if(l!==null)td=l;else{var u=c.return;u===null?td=null:(td=u,af(u))}break b}}rd=0,id=null,rf(e,t,o,5);break;case 6:rd=0,id=null,rf(e,t,o,6);break;case 8:Wd(),ld=6;break a;default:throw Error(i(462))}}ef();break}catch(t){Kd(e,t)}while(1);return va=_a=null,F.H=r,F.A=a,$u=n,td===null?(ed=null,nd=0,Ti(),ld):0}function ef(){for(;td!==null&&!Re();)tf(td)}function tf(e){var t=ul(e.alternate,e,cd);e.memoizedProps=e.pendingProps,t===null?af(e):td=t}function nf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wc(n,t,t.pendingProps,t.type,void 0,nd);break;case 11:t=Wc(n,t,t.pendingProps,t.type.render,t.ref,nd);break;case 5:ns(t);var r=t;r===ia&&(z?(da(r),r.tag===5&&r.stateNode!=null&&(aa=r.stateNode)):(da(r),z=!0));default:yl(n,t),t=td=Ii(t,cd),t=ul(n,t,cd)}e.memoizedProps=e.pendingProps,t===null?af(e):td=t}function rf(e,t,n,r){va=_a=null,ns(t),oo=null,so=0;var i=t.return;try{if(kc(e,i,t,n,nd)){ld=1,wc(e,Ui(n,e.current)),td=null;return}}catch(t){if(i!==null)throw td=i,t;ld=1,wc(e,Ui(n,e.current)),td=null;return}t.flags&32768?(z||r===1?e=!0:od||nd&536870912?e=!1:(ad=e=!0,(r===2||r===9||r===3||r===6)&&(r=jo.current,r!==null&&r.tag===13&&(r.flags|=16384))),of(t,e)):af(t)}function af(e){var t=e;do{if(t.flags&32768){of(t,ad);return}e=t.return;var n=_l(t.alternate,t,cd);if(n!==null){td=n;return}if(t=t.sibling,t!==null){td=t;return}td=t=e}while(t!==null);ld===0&&(ld=5)}function of(e,t){do{var n=vl(e.alternate,e);if(n!==null){n.flags&=32767,td=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){td=e;return}td=e=n}while(e!==null);ld=6,td=null}function sf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do hf();while(Cd!==0);if($u&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===ed&&(td=ed=null,nd=0),Td=t,wd=e,Ed=n,Od=a,kd=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(Dd=s,s|=wi,pt(e,n,s,r,i,a),jd=null,(n&335544064)===n?(Md=La(e),r=10262):(Md=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,wf(We,function(){return gf(),null})):(e.callbackNode=null,e.callbackPriority=0),Rl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=F.T,F.T=null,i=I.p,I.p=2,a=$u,$u|=4;try{pu(e,t,n)}finally{$u=a,I.p=i,F.T=r}}Cd=1,Rl?Ad=Lp(o,e.containerInfo,Md,df,ff,uf,pf,gf,lf,null,null):(df(),ff(),pf())}function lf(e){if(Cd!==0){var t=wd.onRecoverableError;t(e,{componentStack:null})}}function uf(){Cd===3&&(Cd=0,Nu(Td,wd),Cd=4)}function df(){if(Cd===1){Cd=0;var e=wd,t=Td,n=Ed,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=F.T,F.T=null;var i=I.p;I.p=2;var a=$u;$u|=4;try{uu=du=!1,ku(t,e,n),n=pp;var o=Kr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Gr(s.ownerDocument.documentElement,s)){if(c!==null&&qr(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 _=Wr(s,h),v=Wr(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}}xh=!!fp,pp=fp=null}finally{$u=a,I.p=i,F.T=r}}e.current=t,Cd=2}}function ff(){if(Cd===2){Cd=0;var e=wd,t=Td,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=$u;$u|=4;try{hu(e,t.alternate,t)}finally{$u=i,I.p=r,F.T=n}}Cd=3}}function pf(){if(Cd===4||Cd===3){Cd=0;var e=Ad;Ad=null,ze();var t=wd,n=Td,r=Ed,i=kd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Cd=5:(Cd=0,Td=wd=null,mf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Sd=null),vt(r),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Ye,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=F.T,a=I.p,I.p=2,F.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{F.T=n,I.p=a}}if(i=jd,o=Md,Md=null,i!==null&&(jd=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);Ed&3&&hf(),jf(t),a=t.pendingLanes,r&261930&&a&42?t===Pd?Nd++:(Nd=0,Pd=t):(Nd=0,Pd=null),Mf(0,!1)}}function mf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Pa(t)))}function hf(){return Ad!==null&&(Ad.skipTransition(),Ad=null),df(),ff(),pf(),gf()}function gf(){if(Cd!==5)return!1;var e=wd,t=Dd;Dd=0;var n=vt(Ed),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=Od,Od=null;var o=wd,s=Ed;if(Cd=0,Td=wd=null,Ed=0,$u&6)throw Error(i(331));var c=$u;if($u|=4,Ju(o.current),Bu(o,o.current,s,n),$u=c,Mf(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Ye,o)}catch{}return!0}finally{I.p=a,F.T=r,mf(e,t)}}function _f(e,t,n){t=Ui(n,t),t=Ec(e.stateNode,t,2),e=yo(e,t,2),e!==null&&(ft(e,2),jf(e))}function vf(e,t,n){if(e.tag===3)_f(e,e,n);else for(;t!==null;){if(t.tag===3){_f(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Sd===null||!Sd.has(r))){e=Ui(n,e),n=Dc(2),r=yo(t,n,2),r!==null&&(Oc(n,r,t,e),ft(r,2),jf(r));break}}t=t.return}}function yf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Qu;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=bf.bind(null,e,t,n),t.then(e,e))}function bf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ed===e&&(nd&n)===n&&(ld===4||ld===3&&(nd&62914560)===nd&&300>Be()-vd?$u&2?fd|=n:Gd(e,0):fd|=n,md===nd&&(md=0)),jf(e)}function xf(e,t){t===0&&(t=ut()),e=Oi(e,t),e!==null&&(ft(e,t),jf(e))}function Sf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xf(e,n)}function Cf(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),xf(e,n)}function wf(e,t){return Ie(e,t)}var Tf=null,Ef=null,Df=!1,Of=!1,kf=!1,Af=0;function jf(e){e!==Ef&&e.next===null&&(Ef===null?Tf=Ef=e:Ef=Ef.next=e),Of=!0,Df||(Df=!0,Rf())}function Mf(e,t){if(!kf&&Of){kf=!0;do for(var n=!1,r=Tf;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-Qe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Lf(r,a))}else a=nd,a=ot(r,r===ed?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||st(r,a)||(n=!0,Lf(r,a))}r=r.next}while(n);kf=!1}}function Nf(){Pf()}function Pf(){Of=Df=!1;var e=0;Af!==0&&bp()&&(e=Af);for(var t=Be(),n=null,r=Tf;r!==null;){var i=r.next,a=Ff(r,t);a===0?(r.next=null,n===null?Tf=i:n.next=i,i===null&&(Ef=n)):(n=r,(e!==0||a&3)&&(Of=!0)),r=i}Cd!==0&&Cd!==5||Mf(e,!1),Af!==0&&(Af=0)}function Ff(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Qe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=lt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ed,n=nd,n=ot(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(rd===2||rd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Le(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||st(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Le(r),vt(n)){case 2:case 8:n=Ue;break;case 32:n=We;break;case 268435456:n=Ke;break;default:n=We}return r=If.bind(null,e),n=Ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Le(r),e.callbackPriority=2,e.callbackNode=null,2}function If(e,t){if(Cd!==0&&Cd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(hf()&&e.callbackNode!==n)return null;var r=nd;return r=ot(e,e===ed?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(zd(e,r,t),Ff(e,Be()),e.callbackNode!=null&&e.callbackNode===n?If.bind(null,e):null)}function Lf(e,t){if(hf())return null;zd(e,t,!0)}function Rf(){Tp(function(){$u&6?Ie(He,Nf):Pf()})}function zf(){if(Af===0){var e=Ba;e===0&&(e=nt,nt<<=1,!(nt&261888)&&(nt=256)),Af=e}return Af}function Bf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:_n(e)}function Vf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Bf((i[Ct]||null).action),o=r.submitter;o&&(t=(t=o[Ct]||null)?Bf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Rn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Af!==0){var e=new FormData(i,o);Qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Hf=0;Hf<hi.length;Hf++){var Uf=hi[Hf];gi(Uf.toLowerCase(),`on`+(Uf[0].toUpperCase()+Uf.slice(1)))}gi(ai,`onAnimationEnd`),gi(si,`onAnimationIteration`),gi(li,`onAnimationStart`),gi(`dblclick`,`onDoubleClick`),gi(`focusin`,`onFocus`),gi(`focusout`,`onBlur`),gi(ui,`onTransitionRun`),gi(di,`onTransitionStart`),gi(fi,`onTransitionCancel`),gi(pi,`onTransitionEnd`),Vt(`onMouseEnter`,[`mouseout`,`mouseover`]),Vt(`onMouseLeave`,[`mouseout`,`mouseover`]),Vt(`onPointerEnter`,[`pointerout`,`pointerover`]),Vt(`onPointerLeave`,[`pointerout`,`pointerover`]),Bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Wf=`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(` `),Gf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Wf));function Kf(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){xi(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){xi(e)}i.currentTarget=null,a=c}}}}function qf(e,t){var n=t[Tt];n===void 0&&(n=t[Tt]=new Set);var r=e+`__bubble`;n.has(r)||(Xf(t,e,2,!1),n.add(r))}function Jf(e,t,n){var r=0;t&&(r|=4),Xf(n,e,r,t)}var Yf=`_reactListening`+Math.random().toString(36).slice(2);function q(e){if(!e[Yf]){e[Yf]=!0,Rt.forEach(function(t){t!==`selectionchange`&&(Gf.has(t)||Jf(t,!1,e),Jf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yf]||(t[Yf]=!0,Jf(`selectionchange`,!1,t))}}function Xf(e,t,n,r){switch(Oh(t)){case 2:var i=Sh;break;case 8:i=Ch;break;default:i=wh}n=i.bind(null,t,n,e),i=void 0,!On||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 J(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=Mt(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}Tn(function(){var r=a,i=bn(n),s=[];a:{var c=mi.get(e);if(c!==void 0){var l=Rn,u=e;switch(e){case`keypress`:if(Nn(n)===0)break a;case`keydown`:case`keyup`:l=nr;break;case`focusin`:u=`focus`,l=qn;break;case`focusout`:u=`blur`,l=qn;break;case`beforeblur`:case`afterblur`:l=qn;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=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ar;break;case ai:case si:case li:l=Jn;break;case pi:l=or;break;case`scroll`:case`scrollend`:l=Bn;break;case`wheel`:l=sr;break;case`copy`:case`cut`:case`paste`:l=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=rr;break;case`submit`:l=ir;break;case`toggle`:case`beforetoggle`:l=cr}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=En(m,p),g!=null&&d.push(Zf(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!==yn&&(u=n.relatedTarget||n.fromElement)&&(Mt(u)||u[wt]))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?Mt(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=Gn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=rr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Pt(c),h=l==null?u:Pt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Mt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,$f):null,c!==null&&ep(s,u,c,d,!1),l!==null&&f!==null&&ep(s,f,l,d,!0)))}a:{if(c=r?Pt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Or;else if(Sr(c)){if(kr)_=Rr;else{_=Ir;var v=Fr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&mn(r.elementType)&&(_=Or):_=Lr;if(_&&=_(e,r)){Cr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Pt(r):window,e){case`focusin`:(Sr(v)||v.contentEditable===`true`)&&(Yr=v,Xr=r,Zr=null);break;case`focusout`:Zr=Xr=Yr=null;break;case`mousedown`:Qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Qr=!1,$r(s,n,i);break;case`selectionchange`:if(Jr)break;case`keydown`:case`keyup`:$r(s,n,i)}var y;if(ur)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 vr?gr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(pr&&n.locale!==`ko`&&(vr||b!==`onCompositionStart`?b===`onCompositionEnd`&&vr&&(y=Mn()):(R=i,An=`value`in R?R.value:R.textContent,vr=!0)),v=Qf(r,b),0<v.length&&(b=new Xn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=_r(n),y!==null&&(b.data=y)))),(y=fr?yr(e,n):br(e,n))&&(b=Qf(r,`onBeforeInput`),0<b.length&&(v=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Vf(s,e,r,n,i)}Kf(s,t)})}function Zf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qf(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=En(e,n),i!=null&&r.unshift(Zf(e,i,a)),i=En(e,t),i!=null&&r.push(Zf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function $f(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ep(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=En(n,a),l!=null&&o.unshift(Zf(n,l,c))):i||(l=En(n,a),l!=null&&o.push(Zf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var tp=/\r\n?/g,np=/\u0000|\uFFFD/g;function rp(e){return(typeof e==`string`?e:``+e).replace(tp,`
|
|
10
|
-
`).replace(np,``)}function ip(e,t){return t=rp(t),rp(e)===t}function ap(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||un(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&un(e,``+r);else return;break;case`className`:Jt(e,`class`,r);break;case`tabIndex`:Jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Jt(e,n,r);break;case`style`:pn(e,r,o);return;case`data`:if(t!==`object`){Jt(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=_n(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`&&ap(e,t,`name`,a.name,a,null),ap(e,t,`formEncType`,a.formEncType,a,null),ap(e,t,`formMethod`,a.formMethod,a,null),ap(e,t,`formTarget`,a.formTarget,a,null)):(ap(e,t,`encType`,a.encType,a,null),ap(e,t,`method`,a.method,a,null),ap(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=_n(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=vn);return;case`onScroll`:r!=null&&qf(`scroll`,e);return;case`onScrollEnd`:r!=null&&qf(`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=_n(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`:qf(`beforetoggle`,e),qf(`toggle`,e),qt(e,`popover`,r);break;case`xlinkActuate`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:qt(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=hn.get(n)||n,qt(e,n,r);else return}L=!0}function op(e,t,n,r,a,o){switch(n){case`style`:pn(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`)un(e,r);else if(typeof r==`number`||typeof r==`bigint`)un(e,``+r);else return;break;case`onScroll`:r!=null&&qf(`scroll`,e);return;case`onScrollEnd`:r!=null&&qf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=vn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!zt.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[Ct]||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}L=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):qt(e,n,r)}return}L=!0}function sp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:qf(`error`,e),qf(`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:ap(e,t,o,s,n,null)}}a&&ap(e,t,`srcSet`,n.srcSet,n,null),r&&ap(e,t,`src`,n.src,n,null);return;case`input`:qf(`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:ap(e,t,r,d,n,null)}}an(e,o,c,l,u,s,a,!1);return;case`select`:for(a in qf(`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:ap(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&sn(e,!!r,n,!0):sn(e,!!r,t,!1);return;case`textarea`:for(s in qf(`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:ap(e,t,s,c,n,null)}ln(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:ap(e,t,l,r,n,null)}return;case`dialog`:qf(`beforetoggle`,e),qf(`toggle`,e),qf(`cancel`,e),qf(`close`,e);break;case`iframe`:case`object`:qf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Wf.length;r++)qf(Wf[r],e);break;case`image`:qf(`error`,e),qf(`load`,e);break;case`details`:qf(`toggle`,e);break;case`embed`:case`source`:case`link`:qf(`error`,e),qf(`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:ap(e,t,u,r,n,null)}return;default:if(mn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&op(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ap(e,t,c,r,n,null))}var cp={};function lp(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)||ap(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&&(L=!0),o=m;break;case`name`:m!==f&&(L=!0),a=m;break;case`checked`:m!==f&&(L=!0),u=m;break;case`defaultChecked`:m!==f&&(L=!0),d=m;break;case`value`:m!==f&&(L=!0),s=m;break;case`defaultValue`:m!==f&&(L=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ap(e,t,p,m,r,f)}}rn(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)||ap(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&&(L=!0),p=o;break;case`defaultValue`:o!==l&&(L=!0),c=o;break;case`multiple`:o!==l&&(L=!0),s=o;default:o!==l&&ap(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?sn(e,!!n,n?[]:``,!1):sn(e,!!n,t,!0)):sn(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:ap(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&&(L=!0),p=a;break;case`defaultValue`:a!==o&&(L=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ap(e,t,s,a,r,o)}cn(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:ap(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&&(L=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ap(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)&&ap(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:ap(e,t,u,p,r,m)}return;default:if(mn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&op(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||op(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ap(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||ap(e,t,f,p,r,m)}function up(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function dp(){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&&up(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&&up(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 fp=null,pp=null;function mp(e){return e.nodeType===9?e:e.ownerDocument}function hp(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 gp(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 _p(e,t,n,r){return n=mp(n).createElement(e),n[St]=r,n[Ct]=t,sp(n,e,t),It(n),n}function vp(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 yp=null;function bp(){var e=window.event;return e&&e.type===`popstate`?e!==yp&&(yp=e,!0):(yp=null,!1)}var xp=typeof setTimeout==`function`?setTimeout:void 0,Sp=typeof clearTimeout==`function`?clearTimeout:void 0,Cp=typeof Promise==`function`?Promise:void 0,wp=typeof requestAnimationFrame==`function`?requestAnimationFrame:xp,Tp=typeof queueMicrotask==`function`?queueMicrotask:Cp===void 0?xp:function(e){return Cp.resolve(null).then(e).catch(Ep)};function Ep(e){setTimeout(function(){throw e})}function Dp(e){return e===`head`}function Op(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),qh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Sm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Sm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[kt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Sm(e.ownerDocument.body)}n=i}while(n);qh(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 Ap(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 Mp(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 Np(e){return Mp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Pp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Mp(t,n,e)}function Fp(e){return e.documentElement.clientHeight}function Ip(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Lp(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`&&(Fp(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+=th(f),u>ih){s.length=o;break}f=new Promise(Ip.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 Rp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Rp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Rp.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},Rp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function zp(e){return{name:e,group:new Rp(`group`,e),imagePair:new Rp(`image-pair`,e),old:new Rp(`old`,e),new:new Rp(`new`,e)}}function Bp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Bp.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(Gp(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=Up(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Vp,e,s,r)}this._eventListeners=a}};function Vp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Bp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Gp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Up(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Hp,e,n,i),r.splice(t,1),a!==null&&a()}};function Hp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Up(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Wp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Gp(e,t,n,r){if(e.length===0)return-1;r=Wp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Wp(a.optionsOrUseCapture)===r)return i}return-1}Bp.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(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,Up(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,Up(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Bp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag!==6&&(e=v(e),vm(e,t))}Bp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,qp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Kp(t[n],e);n--);};function qp(e,t){return t.push(e),!1}Bp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=mp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Jp,e,void 0,void 0))};function Jp(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Bp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Yp,e,void 0,void 0)};function Yp(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}Bp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,Xp,e,void 0,void 0);for(var n=t=0;n<Zp.length;n++){var r=Zp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Zp[t++]=r}Zp.length=t}};function Xp(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var Zp=[],Qp=!1;function $p(e,t,n){Zp.push({fragmentInstance:e,observer:t,instance:n}),Qp||(Qp=!0,ym(function(){Qp=!1;var e=Zp;Zp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Bp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,em,e,void 0,void 0),e};function em(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=v(e),t.push.apply(t,e.getClientRects());return!1}Bp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Bp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,qp,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(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=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(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=v(n[0]),i=v(n[n.length-1]);var a=h(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||tm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function tm(e,t,n,r,i){var a=Mt(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=m(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=w(n,a,C),t===null?t=!1:(p(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(p(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function nm(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)}Bp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,qp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),nm(e,n);return}if(r=v(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=v(a),nm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function rm(e,t){return e=v(e),im(e,t),!1}function im(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function am(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,Up(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Zp.length;i++){var a=Zp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Zp[r++]=a)}Zp.length=r,n.observe(e)}),im(e,t))}function om(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,Up(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?$p(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function sm(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`:sm(n),jt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function cm(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[kt])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=mm(e.nextSibling),e===null)break}return null}function lm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=mm(e.nextSibling),e===null))return null;return e}function um(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=mm(e.nextSibling),e===null))return null;return e}function dm(e){return e.data===`$?`||e.data===`$~`}function fm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function pm(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 mm(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 hm=null;function gm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return mm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function _m(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 vm(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 ym(e){wp(function(){wp(function(t){return e(t)})})}function bm(e,t,n){switch(t=mp(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 xm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ap(e,t,r,null,cp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===vn&&(e.onclick=null),jt(e)}function Sm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);jt(e)}var Cm=new Map,wm=new Set;function Tm(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 Em=I.d;I.d={f:Dm,r:Om,D:jm,C:Mm,L:Nm,m:Pm,X:Im,S:Fm,M:Lm};function Dm(){var e=Em.f(),t=Ud();return e||t}function Om(e){var t=Nt(e);t!==null&&t.tag===5&&t.type===`form`?ec(t):Em.r(e)}var km=typeof document>`u`?null:document;function Am(e,t,n){var r=km;if(r&&typeof t==`string`&&t){var i=nn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wm.has(i)||(wm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),sp(t,`link`,e),It(t),r.head.appendChild(t)))}}function jm(e){Em.D(e),Am(`dns-prefetch`,e,null)}function Mm(e,t){Em.C(e,t),Am(`preconnect`,e,t)}function Nm(e,t,n){Em.L(e,t,n);var r=km;if(r&&e&&t){var i=`link[rel="preload"][as="`+nn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+nn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+nn(n.imageSizes)+`"]`)):i+=`[href="`+nn(e)+`"]`;var a=i;switch(t){case`style`:a=zm(e);break;case`script`:a=Um(e)}if(!(Cm.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bm(a))||t===`script`&&r.querySelector(Wm(a))))){var o=r.createElement(`link`);sp(o,`link`,e),t===`style`&&(o[At]=!0,o.onload=o.onerror=function(){Lt(o)}),It(o),r.head.appendChild(o)}}}function Pm(e,t){Em.m(e,t);var n=km;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+nn(r)+`"][href="`+nn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Um(e)}if(!Cm.has(a)&&(e=T({rel:`modulepreload`,href:e},t),Cm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wm(a)))return}r=n.createElement(`link`),sp(r,`link`,e),It(r),n.head.appendChild(r)}}}function Fm(e,t,n){Em.S(e,t,n);var r=km;if(r&&e){var i=Ft(r).hoistableStyles,a=zm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cm.get(a))&&qm(e,n);var c=o=r.createElement(`link`);It(c),sp(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,Km(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Im(e,t){Em.X(e,t);var n=km;if(n&&e){var r=Ft(n).hoistableScripts,i=Um(e),a=r.get(i);a||(a=n.querySelector(Wm(i)),a||(e=T({src:e,async:!0},t),(t=Cm.get(i))&&Jm(e,t),a=n.createElement(`script`),It(a),sp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lm(e,t){Em.M(e,t);var n=km;if(n&&e){var r=Ft(n).hoistableScripts,i=Um(e),a=r.get(i);a||(a=n.querySelector(Wm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=Cm.get(i))&&Jm(e,t),a=n.createElement(`script`),It(a),sp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rm(e,t,n,r){var a=(a=Se.current)?Tm(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=zm(n.href),t=Ft(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=zm(n.href);var o=Ft(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(Bm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Cm.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},Cm.set(e,o)),Hm(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=Um(n),t=Ft(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 zm(e){return`href="`+nn(e)+`"`}function Bm(e){return`link[rel="stylesheet"][`+e+`]`}function Vm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Hm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[At]){r.loading=1;return}}else t=e.createElement(`link`),t[At]=!0,t.onload=t.onerror=Lt.bind(null,t),sp(t,`link`,n),It(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 Um(e){return`[src="`+nn(e)+`"]`}function Wm(e){return`script[async]`+e}function Gm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+nn(n.href)+`"]`);if(r)return t.instance=r,It(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),It(r),sp(r,`style`,a),Km(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zm(n.href);var o=e.querySelector(Bm(a));if(o)return t.state.loading|=4,t.instance=o,It(o),o;r=Vm(n),(a=Cm.get(a))&&qm(r,a),o=(e.ownerDocument||e).createElement(`link`),It(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),sp(o,`link`,r),t.state.loading|=4,Km(o,n.precedence,e),t.instance=o;case`script`:return o=Um(n.src),(a=e.querySelector(Wm(o)))?(t.instance=a,It(a),a):(r=n,(a=Cm.get(o))&&(r=T({},n),Jm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),It(a),sp(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,Km(r,n.precedence,e));return t.instance}function Km(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 qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Jm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Ym=null;function Xm(e,t,n){if(Ym===null){var r=new Map,i=Ym=new Map;i.set(n,r)}else i=Ym,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[kt]||a[St]||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 Zm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Qm(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 $m(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function eh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function th(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function nh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=th(t),e.suspenseyImages.push(t)),e=ch.bind(e),t.decode().then(e,e))}function rh(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=zm(r.href),a=t.querySelector(Bm(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,It(a);return}a=t.ownerDocument||t,r=Vm(r),(i=Cm.get(i))&&qm(r,i),a=a.createElement(`link`),It(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),sp(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 ih=0;function ah(e,t){return e.stylesheets&&e.count===0&&uh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ih===0&&(ih=62500*dp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ih?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function oh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)uh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function sh(){this.count--,oh(this)}function ch(){this.imgCount--,oh(this)}var lh=null;function uh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,lh=new Map,t.forEach(dh,e),lh=null,sh.call(e))}function dh(e,t){if(!(t.state.loading&4)){var n=lh.get(e);if(n)var r=n.get(null);else{n=new Map,lh.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 fh={$$typeof:M,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function ph(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=dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dt(0),this.hiddenUpdates=dt(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 mh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ph(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ni(3,null,null,t),e.current=a,a.stateNode=e,t=Na(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},go(a),e}function hh(e){return e?(e=ji,e):ji}function gh(e,t,n,r,i,a){i=hh(i),r.context===null?r.context=i:r.pendingContext=i,r=vo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=yo(e,r,t),n!==null&&(Rd(n,e,t),B(n,e,t))}function _h(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vh(e,t){_h(e,t),(e=e.alternate)&&_h(e,t)}function yh(e){if(e.tag===13||e.tag===31){var t=Oi(e,67108864);t!==null&&Rd(t,e,67108864),vh(e,67108864)}}function bh(e){if(e.tag===13||e.tag===31){var t=Fd();t=_t(t);var n=Oi(e,t);n!==null&&Rd(n,e,t),vh(e,t)}}var xh=!0;function Sh(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,wh(e,t,n,r)}finally{I.p=a,F.T=i}}function Ch(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,wh(e,t,n,r)}finally{I.p=a,F.T=i}}function wh(e,t,n,r){if(xh){var i=Th(r);if(i===null)J(e,t,r,Eh,n),Lh(e,r);else if(zh(i,e,t,n,r))r.stopPropagation();else if(Lh(e,r),t&4&&-1<Ih.indexOf(e)){for(;i!==null;){var a=Nt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=at(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Qe(o);s.entanglements[1]|=c,o&=~c}jf(a),!($u&6)&&(bd=Be()+500,Mf(0,!1))}}break;case 31:case 13:s=Oi(a,2),s!==null&&Rd(s,a,2),Ud(),vh(a,2)}if(a=Th(r),a===null&&J(e,t,r,Eh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else J(e,t,r,null,n)}}function Th(e){return e=bn(e),Dh(e)}var Eh=null;function Dh(e){if(Eh=null,e=Mt(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 Eh=e,null}function Oh(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(Ve()){case He:return 2;case Ue:return 8;case We:case Ge:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var kh=!1,Ah=null,jh=null,Mh=null,Nh=new Map,Ph=new Map,Fh=[],Ih=`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 Lh(e,t){switch(e){case`focusin`:case`focusout`:Ah=null;break;case`dragenter`:case`dragleave`:jh=null;break;case`mouseover`:case`mouseout`:Mh=null;break;case`pointerover`:case`pointerout`:Nh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ph.delete(t.pointerId)}}function Rh(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=Nt(t),t!==null&&yh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function zh(e,t,n,r,i){switch(t){case`focusin`:return Ah=Rh(Ah,e,t,n,r,i),!0;case`dragenter`:return jh=Rh(jh,e,t,n,r,i),!0;case`mouseover`:return Mh=Rh(Mh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Nh.set(a,Rh(Nh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ph.set(a,Rh(Ph.get(a)||null,e,t,n,r,i)),!0}return!1}function Bh(e){var t=Mt(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,bt(e.priority,function(){bh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,bt(e.priority,function(){bh(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 Vh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Th(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yn=r,n.target.dispatchEvent(r),yn=null}else return t=Nt(n),t!==null&&yh(t),e.blockedOn=n,!1;t.shift()}return!0}function Hh(e,t,n){Vh(e)&&n.delete(t)}function Uh(){kh=!1,Ah!==null&&Vh(Ah)&&(Ah=null),jh!==null&&Vh(jh)&&(jh=null),Mh!==null&&Vh(Mh)&&(Mh=null),Nh.forEach(Hh),Ph.forEach(Hh)}function Wh(e,n){e.blockedOn===n&&(e.blockedOn=null,kh||(kh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Uh)))}var Gh=null;function Kh(e){Gh!==e&&(Gh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Gh===e&&(Gh=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(Dh(r||n)===null)continue;break}var a=Nt(n);a!==null&&(e.splice(t,3),t-=3,Qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function qh(e){function t(t){return Wh(t,e)}Ah!==null&&Wh(Ah,e),jh!==null&&Wh(jh,e),Mh!==null&&Wh(Mh,e),Nh.forEach(t),Ph.forEach(t);for(var n=0;n<Fh.length;n++){var r=Fh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Fh.length&&(n=Fh[0],n.blockedOn===null);)Bh(n),n.blockedOn===null&&Fh.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[Ct]||null;if(typeof a==`function`)o||Kh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ct]||null)s=o.formAction;else if(Dh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Kh(n)}}}function Jh(){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 Yh(e){this._internalRoot=e}Xh.prototype.render=Yh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;gh(n,Fd(),e,t,null,null)},Xh.prototype.unmount=Yh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gh(e.current,2,null,e,null,null),Ud(),t[wt]=null}};function Xh(e){this._internalRoot=e}Xh.prototype.unstable_scheduleHydration=function(e){if(e){var t=yt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fh.length&&t!==0&&t<Fh[n].priority;n++);Fh.splice(n,0,e),n===0&&Bh(e)}};var Zh=n.version;if(Zh!==`19.3.0`)throw Error(i(527,Zh,`19.3.0`));I.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 Qh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var $h=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$h.isDisabled&&$h.supportsFiber)try{Ye=$h.inject(Qh),Xe=$h}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=xc,s=Sc,c=Cc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=mh(e,1,!1,null,null,n,r,null,o,s,c,Jh),e[wt]=t.current,q(e),new Yh(t)}})),ui=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=li()}))(),di=Object.freeze({token:Symbol(`chord.abortSignal`)}),fi=class{get abortSignal(){return this.value(di)}},pi=class extends fi{#e;constructor(e){super(),this.#e=e}value(e){}toString(){return this.#e}},mi=class extends fi{#e;#t;#n;constructor(e,t,n){super(),this.#e=e,this.#t=t,this.#n=n}value(e){return e.token===this.#t.token?this.#n:this.#e.value(e)}toString(){return`${this.#e}.WithValue(${this.#t.token.description??`anonymous`})`}},hi=new pi(`[Context BACKGROUND_CONTEXT]`);new pi(`[Context TODO_CONTEXT]`);function gi(e,t,n){return new mi(n,e,t)}function _i(e,t){let n=t.abortSignal;return gi(di,n===void 0?e:AbortSignal.any([n,e]),t)}function vi(e){let t=new AbortController;return{context:_i(t.signal,e),cancel:e=>t.abort(e)}}function yi(e,t){let n=t.abortSignal;return n===void 0?e:n.aborted?Promise.reject(bi(n)):new Promise((t,r)=>{let i=()=>r(bi(n));n.addEventListener(`abort`,i,{once:!0}),e.then(e=>{n.removeEventListener(`abort`,i),t(e)},e=>{n.removeEventListener(`abort`,i),r(e)})})}function bi(e){let t=e.reason;return t instanceof Error?t:new DOMException(`The operation was aborted`,`AbortError`)}var xi=class extends Error{code;constructor(e,t){super(t),this.name=`RemoteServiceError`,this.code=e}},Si,Ci=class{#e;#t;#n;constructor(e,t){this.#e=e,this.#t=t}view(e){return new wi(this,e,this.#t).proxy}bind(e){this.#n=e}unbind(){this.#n=void 0}resolve(e,t){t();let n=this.#n;if(n===void 0)throw Error(`Service ${this.#e} is disconnected`);return{value:Reflect.get(n,e,n),receiver:n}}},wi=class{#e;#t;#n;#r=new Map;proxy;constructor(e,t,n){this.#e=e,this.#t=t,this.#n=n,this.proxy=new Proxy(Object.create(null),{get:(e,t)=>this.#i(t)})}#i(e){let t=()=>this.#e.resolve(e,this.#t),n=t().value;if(!Ei(n)||typeof n!=`function`&&!this.#n)return n;let r=this.#r.get(e);return r===void 0&&(r=new Ti(t,typeof n==`function`),this.#r.set(e,r)),r.proxy}},Ti=class{#e;#t=new Map;proxy;constructor(e,t){this.#e=e;let n=t?()=>void 0:Object.create(null);this.proxy=new Proxy(n,{apply:(e,t,n)=>this.#n(n),get:(e,t)=>this.#r(t)})}#n(e){let{value:t,receiver:n}=this.#e();if(typeof t!=`function`)throw TypeError(`Service member is not callable`);return Reflect.apply(t,n,e)}#r(e){let t=()=>{let t=this.#e();if(!Ei(t.value))throw TypeError(`Service member does not have properties`);return{value:Reflect.get(t.value,e,t.value),receiver:t.value}},n=t().value;if(typeof n!=`function`)return n;let r=this.#t.get(e);return r===void 0&&(r=new Si(t,!0),this.#t.set(e,r)),r.proxy}};Si=Ti;function Ei(e){return typeof e==`object`&&!!e||typeof e==`function`}var Di=class{#e=new Map;#t=new Set;#n;#r;#i=!1;constructor(e){this.#r=e.ready,this.#n=e.onError}get observerCount(){return this.#t.size}values(){return this.#e.values()}get(e){return this.#e.get(e)}insert(e){if(this.#c(),this.#e.has(e.key))throw Error(`Keyed service already has a live instance with key ${e.key}`);this.#e.set(e.key,e),this.#r&&this.#o(e)}replace(e){this.#c();let t=this.#e.get(e.key);if(t!==void 0){if(t.generation===e.generation)throw Error(`Keyed service repeated a live generation`);this.#a(t)}this.#e.set(e.key,e),this.#r&&this.#o(e)}remove(e){this.#e.get(e.key)===e&&this.#a(e)}ready(){if(this.#c(),!this.#r){this.#r=!0;for(let e of this.#e.values())this.#o(e)}}reset(){if(!this.#i){this.#r=!1;for(let e of[...this.#e.values()])this.#a(e)}}observe(e){this.#c();let t={handler:e,tasks:new Map,closed:!1};if(this.#t.add(t),this.#r)for(let e of this.#e.values())this.#s(t,e);return()=>{if(!t.closed){t.closed=!0;for(let e of t.tasks.values())e.cancel();t.tasks.clear(),this.#t.delete(t)}}}dispose(){if(!this.#i){this.#i=!0;for(let e of this.#t){e.closed=!0;for(let t of e.tasks.values())t.cancel();e.tasks.clear()}this.#t.clear();for(let e of[...this.#e.values()])e.deactivate();this.#e.clear()}}#a(e){if(this.#e.get(e.key)===e){this.#e.delete(e.key),e.deactivate();for(let t of this.#t)t.tasks.get(e)?.cancel(),t.tasks.delete(e)}}#o(e){for(let t of this.#t)this.#s(t,e)}#s(e,t){if(e.closed||e.tasks.has(t))return;let{context:n,cancel:r}=vi(hi);e.tasks.set(t,{cancel:r});try{Promise.resolve(e.handler(t.service,n)).catch(e=>{n.abortSignal?.aborted||this.#n(Oi(e))})}catch(e){n.abortSignal?.aborted||this.#n(Oi(e))}}#c(){if(this.#i)throw Error(`Keyed service directory is disposed`)}};function Oi(e){return e instanceof Error?e:Error(String(e))}function ki(e){return Ai(e,new Set)}function Ai(e,t){if(e===null||typeof e==`string`||typeof e==`boolean`)return!0;if(typeof e==`number`)return Number.isFinite(e);if(Array.isArray(e)){if(Object.getPrototypeOf(e)!==Array.prototype)return!1;let n=Reflect.ownKeys(e);if(n.length!==e.length+1||n.some(e=>typeof e!=`string`)||t.has(e))return!1;t.add(e);try{for(let n=0;n<e.length;n++){let r=Object.getOwnPropertyDescriptor(e,String(n));if(r===void 0||!r.enumerable||!(`value`in r)||!Ai(r.value,t))return!1}return!0}finally{t.delete(e)}}if(typeof e!=`object`||!e)return!1;let n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null||Reflect.ownKeys(e).some(e=>typeof e!=`string`)||t.has(e))return!1;t.add(e);try{for(let n of Object.values(Object.getOwnPropertyDescriptors(e)))if(!n.enumerable||!(`value`in n)||!Ai(n.value,t))return!1;return!0}finally{t.delete(e)}}var ji=e=>typeof e==`object`&&!!e,Mi=e=>e.length>0&&e[0][0]===`r`,Ni=new Set([`__proto__`,`constructor`,`prototype`]),Pi=class extends Error{segment;constructor(e){super(`unsafe path segment: ${String(e)}`),this.segment=e,this.name=`UnsafePathError`}};function Fi(e){if(!Array.isArray(e)||e.length===0)throw TypeError(`op is not a tuple`);switch(e[0]){case`r`:if(e.length!==2)throw TypeError(`r arity`);return;case`s`:if(e.length!==3)throw TypeError(`s arity`);Ii(e[1],!0);return;case`d`:if(e.length!==2)throw TypeError(`d arity`);Ii(e[1],!0);return;case`a`:if(e.length!==3||typeof e[2]!=`string`)throw TypeError(`a shape`);Ii(e[1],!0);return;case`t`:if(e.length!==3||!Number.isInteger(e[2])||e[2]<0)throw TypeError(`t shape`);Ii(e[1],!0);return;case`p`:if(e.length!==5)throw TypeError(`p arity`);if(Ii(e[1]),!Number.isInteger(e[2])||e[2]<0)throw TypeError(`p index`);if(!Number.isInteger(e[3])||e[3]<0)throw TypeError(`p remove`);if(!Array.isArray(e[4]))throw TypeError(`p items`);return;case`m`:if(e.length!==3)throw TypeError(`m arity`);Ii(e[1]),Li(e[2]);return;default:throw TypeError(`unknown op verb: ${String(e[0])}`)}}function Ii(e,t=!1){if(!Array.isArray(e))throw TypeError(`path is not an array`);if(t&&e.length===0)throw TypeError(`path is empty`);zi(e)}function Li(e){if(!Array.isArray(e))throw TypeError(`m permutation is not an array`);let t=new Uint8Array(e.length);for(let n of e){if(!Number.isInteger(n)||n<0||n>=e.length||t[n]!==0)throw TypeError(`m permutation is not a bijection`);t[n]=1}}function Ri(e){if(!Array.isArray(e)||e.length===0)throw TypeError(`op is not a tuple`);let[t]=e,n=e=>{if(typeof e==`number`){if(!Number.isInteger(e)||e<0)throw TypeError(`bad path id`)}else{if(!Array.isArray(e))throw TypeError(`path is not an array`);zi(e)}};switch(t){case`r`:if(e.length!==2)throw TypeError(`r arity`);return;case`s`:if(e.length===3)n(e[1]);else if(e.length!==2)throw TypeError(`s arity`);return;case`d`:if(e.length===2)n(e[1]);else if(e.length!==1)throw TypeError(`d arity`);return;case`a`:if(e.length===3){if(n(e[1]),typeof e[2]!=`string`)throw TypeError(`a value`)}else if(e.length===2){if(typeof e[1]!=`string`)throw TypeError(`a value`)}else throw TypeError(`a arity`);return;case`t`:if(e.length===3){if(n(e[1]),!Number.isInteger(e[2])||e[2]<0)throw TypeError(`t count`)}else if(e.length===2){if(!Number.isInteger(e[1])||e[1]<0)throw TypeError(`t count`)}else throw TypeError(`t arity`);return;case`p`:{let[t,r,i]=e.length===5?[e[2],e[3],e[4]]:e.length===4?[e[1],e[2],e[3]]:[];if(i===void 0)throw TypeError(`p arity`);if(e.length===5&&n(e[1]),!Number.isInteger(t)||t<0)throw TypeError(`p index`);if(!Number.isInteger(r)||r<0)throw TypeError(`p remove`);if(!Array.isArray(i))throw TypeError(`p items`);return}case`m`:if(e.length===3)n(e[1]);else if(e.length!==2)throw TypeError(`m arity`);Li(e[e.length-1]);return;case`#`:if(e.length!==3||!Number.isInteger(e[1])||e[1]<0||!Array.isArray(e[2]))throw TypeError(`# shape`);zi(e[2]);return;default:throw TypeError(`unknown op verb: ${String(t)}`)}}function zi(e){for(let t of e)if(typeof t==`string`){if(Ni.has(t))throw new Pi(t)}else if(!Number.isInteger(t)||t<0)throw new Pi(t)}function Bi(e,t){if(t>e.length)throw new Pi(t)}var Vi=class extends Error{path;constructor(e){super(`unresolvable path: ${JSON.stringify(e)}`),this.path=e,this.name=`PathError`}};function Hi(e,t){let n=e;for(let e of t){if(Fi(e),e[0]===`r`){n=e[1];continue}let t=e[1];if(zi(t),e[0]===`p`){let r=t.length===0?n:qi(n,t);if(!Array.isArray(r))throw new Vi(t);r.splice(e[2],e[3]);let i=1e4;for(let t=0;t<e[4].length;t+=i)r.splice(e[2]+t,0,...e[4].slice(t,t+i));continue}if(e[0]===`m`){let r=t.length===0?n:qi(n,t);if(!Array.isArray(r)||r.length!==e[2].length)throw new Vi(t);let i=r.slice();for(let t=0;t<e[2].length;t++)r[t]=i[e[2][t]];continue}let r=qi(n,t.slice(0,-1)),i=t[t.length-1];if(Array.isArray(r)){if(typeof i!=`number`)throw new Pi(i);Bi(r,i)}let a=e=>{Object.defineProperty(r,i,{value:e,writable:!0,enumerable:!0,configurable:!0})},o=()=>Object.hasOwn(r,i)?r[i]:void 0;switch(e[0]){case`s`:a(e[2]);break;case`d`:if(Array.isArray(r)){if(typeof i!=`number`||i>=r.length)throw new Vi(t);r.splice(i,1)}else delete r[i];break;case`a`:{let n=o();if(typeof n!=`string`)throw new Vi(t);a(`${n}${e[2]}`);break}case`t`:{let n=o();if(typeof n!=`string`)throw new Vi(t);a(n.slice(e[2]));break}}}return n}function Ui(e,t){return Wi(e,[t])}function Wi(e,t){let n=e,r=new WeakSet;for(let e of t)for(let t of e)Fi(t),t[0]===`r`?n=t[1]:(n=Gi(n,t[0]===`p`||t[0]===`m`?t[1]:t[1].slice(0,-1),r),n=Hi(n,[t]));return n}function Gi(e,t,n){let r=e=>{if(Array.isArray(e))return e.slice();if(!ji(e))throw new Vi(t);let n=Object.create(Object.getPrototypeOf(e)===null?null:Object.prototype);for(let t of Object.keys(e))Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0,configurable:!0});return n};if(!ji(e))throw new Vi(t);let i;n.has(e)?i=e:(i=r(e),n.add(i));let a=i;for(let e of t){if(!Object.hasOwn(a,e))throw new Vi(t);if(Array.isArray(a)&&typeof e!=`number`)throw new Pi(e);let i=a[e];if(!ji(i))throw new Vi(t);if(n.has(i)){a=i;continue}let o=r(i);Object.defineProperty(a,e,{value:o,writable:!0,enumerable:!0,configurable:!0}),n.add(o),a=o}return i}function Ki(e,t){let n=e;for(let e of t){if(!ji(n))throw new Vi(t);if(Array.isArray(n)&&typeof e!=`number`)throw new Pi(e);if(!Object.hasOwn(n,e))throw new Vi(t);n=n[e]}return n}function qi(e,t){let n=Ki(e,t);if(!ji(n))throw new Vi(t);return n}function Ji(){let e=new Map;return{decode(t){let n,r=[];for(let i of t){if(Ri(i),i[0]===`#`){zi(i[2]),e.set(i[1],i[2]);continue}if(i[0]===`r`){r.push(i),e.clear(),n=void 0;continue}let t=i[0]===`d`&&i.length===1||i[0]!==`d`&&i[0]!==`p`&&i.length===2||i[0]===`p`&&i.length===4,a;if(t){if(n===void 0)throw new Vi([]);a=n}else{let t=i[1];if(typeof t==`number`){let n=e.get(t);if(n===void 0)throw new Vi(t);a=n}else a=t;n=a}if(i[0]!==`p`&&i[0]!==`m`&&a.length===0)throw new Vi(a);switch(i[0]){case`s`:r.push([`s`,a,t?i[1]:i[2]]);break;case`d`:r.push([`d`,a]);break;case`a`:r.push([`a`,a,t?i[1]:i[2]]);break;case`t`:r.push([`t`,a,t?i[1]:i[2]]);break;case`p`:{let[e,n,o]=t?[i[1],i[2],i[3]]:[i[2],i[3],i[4]];r.push([`p`,a,e,n,o]);break}case`m`:r.push([`m`,a,t?i[1]:i[2]])}}return r}}}var Yi=e=>typeof e==`object`&&!!e,Xi=class{#e=new WeakSet;validate(e){return this.#t(e,new Set,new WeakSet)}#t(e,t,n){if(!Yi(e)||this.#e.has(e))return Yi(e)?e:Zi(e);if(n.has(e))return e;if(t.has(e))throw TypeError(`Replicated state cannot contain cycles`);t.add(e);try{if(Array.isArray(e)){$i(e);for(let r=0;r<e.length;r++)this.#t(e[r],t,n)}else{Qi(e);for(let r of Reflect.ownKeys(e)){if(typeof r==`symbol`)throw TypeError(`Replicated state cannot contain symbol properties`);let i=Object.getOwnPropertyDescriptor(e,r);if(i===void 0||!i.enumerable||!(`value`in i))throw TypeError(`Replicated state objects must contain enumerable data properties`);this.#t(i.value,t,n)}}return n.add(e),this.#e.add(e),e}finally{t.delete(e)}}};function Zi(e){if(e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&Number.isFinite(e))return e;throw TypeError(`Replicated state values must be strict JSON`)}function Qi(e){let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)throw TypeError(`Replicated state containers must be plain objects or arrays`)}function $i(e){let t=Reflect.ownKeys(e);if(t.length!==e.length+1||t.some(e=>typeof e!=`string`))throw TypeError(`Replicated state arrays must be dense and contain only indexed entries`);for(let t=0;t<e.length;t++){let n=Object.getOwnPropertyDescriptor(e,String(t));if(n===void 0||!n.enumerable||!(`value`in n)||n.value===void 0)throw TypeError(`Replicated state arrays must contain enumerable indexed data properties with defined values`)}}var ea=class{#e;#t;#n=[];#r=!1;#i=!1;#a=!1;constructor(e,t){this.#e=e,this.#t=t}push(e){if(!this.#a){if(this.#n.length===100){let e=this.#i?void 0:this.#n[0];this.#n.length=0,e!==void 0&&this.#n.push(e)}this.#n.push(e)}}drain(){if(!(this.#r||this.#a)){this.#r=!0;for(let e=this.#n.shift();e!==void 0;e=this.#n.shift()){this.#i=!0;try{let t=this.#e(e.value,e.context,e.delivery);if(ra(t)){Promise.resolve(t).then(()=>this.#o(),e=>{this.#s(e),this.#o()});return}}catch(e){this.#s(e)}}this.#r=!1}}clear(){this.#n.length=0}close(){this.#a=!0,this.clear()}#o(){this.#r=!1,this.drain()}#s(e){try{this.#t(aa(e))}catch(e){ia(aa(e))}}},ta=class{#e=new Set;#t;#n=new Xi;#r;#i;constructor(e){this.#t=e}get value(){return this.#r}subscribe(e){let t=new ea(e,this.#t);return this.#e.add(t),this.#r!==void 0&&(t.push({value:this.#r,context:na(),delivery:{kind:`hydrate`,sequence:this.#i}}),t.drain()),()=>{t.close(),this.#e.delete(t)}}hydrate(e,t,n){let r;try{if(!Mi(t))throw Error(`Replicated state snapshot is not a base operation batch`);r=this.#n.validate(Ui(void 0,t))}catch(e){throw this.clear(),e}this.#i=e,this.#r=r,this.#a(n,{kind:`hydrate`,sequence:e})}update(e,t,n){if(this.#i===void 0||this.#r===void 0)throw Error(`Replicated state received an update before hydration`);if(e!==this.#i+1)throw this.clear(),Error(`Replicated state update sequence has a gap`);let r;try{r=this.#n.validate(Ui(this.#r,t))}catch(e){throw this.clear(),e}this.#i=e,this.#r=r,this.#a(n,{kind:`update`,sequence:e})}clear(){this.#r=void 0,this.#i=void 0;for(let e of this.#e)e.clear()}#a(e,t){if(this.#r===void 0)return;let n={value:this.#r,context:e,delivery:t},r=[...this.#e];for(let e of r)e.push(n);for(let e of r)e.drain()}};function na(){return hi}function ra(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&typeof e.then==`function`}function ia(e){queueMicrotask(()=>{throw e})}function aa(e){return e instanceof Error?e:Error(String(e))}var z=class{#e;#t;#n;#r;#i;#a;value;#o;#s;constructor(e,t,n,r,i,a){this.#e=e,this.#t=t,this.#n=n,this.#i=r,this.#a=i,this.#r=new ta(a);let o=()=>{};this.value=new Proxy(o,{apply:(e,t,n)=>this.#u(n),get:(e,t)=>{if(t===`value`)return this.#a(),this.#l(`state`),this.#r.value;if(t===`subscribe`)return this.#c.bind(this);if(t===Symbol.toStringTag)return`RemoteServiceMember`}})}setDescription(e){if(this.#o!==void 0&&this.#o!==e)throw Error(`Remote service member ${this.#e}.${this.#t} changed kind`);if(this.#o=e,this.#s!==void 0&&this.#s!==e)throw new xi(`service_member_mismatch`,`Remote service member ${this.#e}.${this.#t} is ${e}, not ${this.#s}`)}hydrate(e,t,n){this.setDescription(`state`),this.#r.hydrate(e,t,n)}update(e,t,n){this.setDescription(`state`),this.#r.update(e,t,n)}clear(){this.#r.clear()}#c(e){if(this.#a(),typeof e!=`function`)throw TypeError(`Replicated state subscription listener must be a function`);return this.#l(`state`),this.#r.subscribe(e)}#l(e){if(this.#s!==void 0&&this.#s!==e)throw new xi(`service_member_mismatch`,`Remote service member ${this.#e}.${this.#t} was used as two different kinds`);if(this.#s=e,this.#o!==void 0&&this.#o!==e)throw new xi(`service_member_mismatch`,`Remote service member ${this.#e}.${this.#t} is ${this.#o}, not ${e}`)}#u(e){if(this.#a(),this.#l(`method`),!this.#i())return Promise.reject(new xi(`service_stale_instance`,`Remote service ${this.#e} binding is closed`));let t=e.at(-1);if(!fa(t))return Promise.reject(new xi(`service_invalid_value`,`Remote service method ${this.#e}.${this.#t} requires a trailing Context`));let n=e.slice(0,-1);return this.#n(n,t)}},oa=class{#e;#t;#n;#r;#i=new Map;#a=new Map;#o;#s;proxy;constructor(e,t,n,r,i,a){this.#e=e,this.#t=t,this.#n=n,this.#o=r,this.#s=i,this.#r=a,this.proxy=new Proxy(Object.create(null),{get:(e,t)=>{if(typeof t==`string`)return this.#c(t).value}})}install(e,t){if(!da(e.instance,this.#t))throw Error(`Remote service snapshot has the wrong address`);let n=ua(e.members);for(let e of this.#i.keys())if(!n.has(e))throw new xi(`service_member_not_found`,`Unknown remote service member ${this.#e}.${e}`);this.#a.clear();for(let[e,t]of n)this.#a.set(e,t.kind);for(let e of n.values()){let n=this.#i.get(e.name);e.kind===`state`?(n??this.#c(e.name)).hydrate(e.sequence,e.ops,t):n?.setDescription(e.kind)}}update(e,t,n,r){if(this.#a.get(e)!==`state`)throw Error(`Remote service update targets non-state member ${this.#e}.${e}`);this.#c(e).update(t,n,r)}clear(){for(let e of this.#i.values())e.clear()}#c(e){let t=this.#i.get(e);if(t!==void 0)return t;t=new z(this.#e,e,(t,n)=>this.#n.invoke({serviceId:this.#e,...this.#t===void 0?{}:{instance:this.#t},member:e,args:t},n),this.#o,this.#s,this.#r);let n=this.#a.get(e);return n!==void 0&&t.setDescription(n),this.#i.set(e,t),t}},sa=class{#e;#t;#n;#r;#i;#a;#o;#s;#c=!1;#l;#u=0;constructor(e,t,n,r,i,a){this.#e=e,this.#t=t,this.#n=n,this.#r=r,this.#i=i,this.#l=a,this.#a=new Di({ready:!1,onError:n})}observe(e){if(this.#c)throw Error(`Remote keyed service binding is closed`);let t=!1,n=this.#a.observe((n,r)=>{let i=new Ci(this.#e.id,!0);return i.bind(n),e(i.view(()=>{if(this.#r(),t||r.abortSignal?.aborted)throw new xi(`service_stale_instance`,`Remote service ${this.#e.id} observation is closed`)}),r)});if(this.#l&&this.#s===void 0){let e=this.#u,t=this.#f(e);this.#s=t,t.catch(t=>{!this.#c&&this.#u===e&&this.#l&&this.#n(pa(t))})}return()=>{t||(t=!0,n(),this.#a.observerCount===0&&this.#i())}}async rebind(e,t){if(this.#c)return;this.#l=e;let n=++this.#u;if(await this.#d(t,!1),!(this.#c||this.#u!==n||this.#l!==e)&&e&&this.#a.observerCount>0){let e=this.#f(n);this.#s=e,await e}}ready(){return this.#s??Promise.resolve()}async close(e){this.#c||(this.#c=!0,this.#u+=1,await this.#d(e,!0),this.#a.dispose())}async#d(e,t){this.#a.reset();let n=this.#s;this.#s=void 0;let r=this.#o;this.#o=void 0,await Promise.all([t?n?.catch(()=>{}):void 0,r===void 0?void 0:r.close(e)])}async#f(e){let t=await this.#t.subscribe(this.#e.id,`keyed`,(t,n)=>{this.#u===e&&this.#p(t,n)},hi);if(this.#c||!this.#l||this.#u!==e)await t.close(hi);else{if(this.#o=t,t.snapshot.mode!==`keyed`||t.snapshot.serviceId!==this.#e.id)throw Error(`Remote service ${this.#e.id} returned the wrong keyed snapshot`);for(let e of t.snapshot.instances)this.#m(e,na());t.activate(),this.#a.ready()}}#p(e,t){if(!this.#c)try{switch(e.type){case`reset`:{la(e.snapshot,this.#e.id,`keyed`);let n=new Map(e.snapshot.instances.map(e=>[e.instance.key,e]));for(let e of[...this.#a.values()])n.get(e.key)?.instance?.generation!==e.generation&&this.#a.remove(e);for(let e of n.values()){let n=this.#a.get(e.instance.key);n===void 0?this.#m(e,t):n.facade.install(e,t)}break}case`unavailable`:case`replaced`:throw Error(`Keyed service received a singleton lifecycle update`);case`spawned`:this.#m(e.instance,t);break;case`closed`:{let t=this.#a.get(e.instance.key);t?.generation===e.instance.generation&&this.#a.remove(t);break}case`state`:{if(e.instance===void 0)throw Error(`Keyed state update has no instance address`);let n=this.#a.get(e.instance.key);if(n?.generation!==e.instance.generation)return;n.facade.update(e.member,e.sequence,e.ops,t);break}}}catch(e){this.#n(pa(e))}}#m(e,t){let n=e.instance;if(n===void 0)throw Error(`Keyed service instance snapshot has no address`);let r=!0,i=new oa(this.#e.id,n,this.#t,()=>r&&!this.#c,this.#r,this.#n);i.install(e,t),this.#a.replace({key:n.key,generation:n.generation,service:i.proxy,facade:i,deactivate:()=>{r=!1,i.clear()}})}},ca=class{#e;#t=new Set;#n;#r=new Map;#i;#a=new Map;#o=new Map;#s;#c=0;#l=Promise.resolve();#u=!1;constructor(e){this.#e=e.transport;let t=e.services.map(({id:e})=>e);if(new Set(t).size!==t.length)throw TypeError(`Remote service binding has duplicate service IDs`);for(let e of t)this.#t.add(e);this.#n=e.onError??(()=>{}),this.#i=e.assertAccess??(()=>{}),this.#s=e.bound??!0}use(e){this.#p(e),this.#m(e.id,`singleton`);let t=this.#a.get(e.id);if(t!==void 0)return t.facade.proxy;if(t={facade:void 0,active:!0,revision:0},t.facade=new oa(e.id,void 0,this.#e,()=>t.active&&!this.#u&&this.#s,()=>this.#f(),this.#n),this.#a.set(e.id,t),this.#c+=1,this.#s){let n=t.revision,r=this.#d(e.id,t,n);t.starting=r,r.catch(e=>{t.active&&t.revision===n&&!this.#u&&this.#s&&this.#n(pa(e))})}return t.facade.proxy}observe(e,t){this.#p(e),this.#m(e.id,`keyed`);let n=this.#o.get(e.id);return n===void 0&&(n=new sa(e,this.#e,this.#n,()=>this.#f(),()=>{this.#o.get(e.id)===n&&(this.#o.delete(e.id),this.#c+=1,n.close(hi).catch(this.#n))},this.#s),this.#o.set(e.id,n),this.#c+=1),n.observe(t)}async ready(e){if(this.#u)throw Error(`Remote service binding is disposed`);for(;;){let t=this.#c,n=[this.#l,...[...this.#a.values()].flatMap(e=>e.starting===void 0?[]:[e.starting]),...[...this.#o.values()].map(e=>e.ready())];if(await yi(Promise.all(n).then(()=>void 0),e),this.#u)throw Error(`Remote service binding is disposed`);if(t===this.#c)return}}async rebind(e,t){if(this.#u)throw Error(`Remote service binding is disposed`);this.#s=e,this.#c+=1;let n=[];for(let[r,i]of this.#a){i.revision+=1,i.facade.clear();let a=i.subscription;delete i.subscription;let o=i.revision,s=(async()=>{await a?.close(t),e&&await this.#d(r,i,o)})();i.starting=s,n.push(s)}for(let r of this.#o.values())n.push(r.rebind(e,t));let r=(async()=>{let e=(await Promise.allSettled(n)).filter(e=>e.status===`rejected`);if(e.length>0)throw AggregateError(e.map(({reason:e})=>e),`Failed to rebind services`)})();this.#l=r,await r}async dispose(e){if(this.#u)return;this.#u=!0;let t=[];for(let n of this.#a.values())n.active=!1,n.facade.clear(),n.starting&&t.push(n.starting.catch(()=>{})),n.subscription&&t.push(Promise.resolve(n.subscription.close(e)));for(let n of this.#o.values())t.push(n.close(e));this.#a.clear(),this.#o.clear();let n=(await Promise.allSettled(t)).filter(e=>e.status===`rejected`);if(n.length>0)throw AggregateError(n.map(({reason:e})=>e),`Failed to dispose services`)}async#d(e,t,n){let r=await this.#e.subscribe(e,`singleton`,(r,i)=>{if(t.active&&t.revision===n)try{if(r.type===`reset`){la(r.snapshot,e,`singleton`);let n=r.snapshot.instances[0];n===void 0?t.facade.clear():t.facade.install(n,i)}else if(r.type===`unavailable`)t.facade.clear();else if(r.type===`replaced`){if(r.snapshot.instance!==void 0)throw Error(`Singleton replacement has an instance address`);t.facade.install(r.snapshot,i)}else r.type===`state`&&r.instance===void 0&&t.facade.update(r.member,r.sequence,r.ops,i)}catch(e){this.#n(pa(e))}},hi);if(!t.active||this.#u||!this.#s||t.revision!==n){await r.close(hi);return}t.subscription=r;let i=r.snapshot;if(i.mode!==`singleton`||i.serviceId!==e||i.instances.length!==1)throw Error(`Remote service ${e} returned an invalid singleton snapshot`);t.facade.install(i.instances[0],na()),r.activate()}#f(){if(this.#u)throw Error(`Remote service binding is disposed`);this.#i()}#p(e){if(e.local)throw new xi(`service_not_allowed`,`Service ${e.id} is process-local`)}#m(e,t){if(this.#u)throw Error(`Remote service binding is disposed`);if(!this.#t.has(e))throw new xi(`service_not_allowed`,`Remote service ${e} is not allowlisted`);let n=this.#r.get(e);if(n!==void 0&&n!==t)throw new xi(`service_mode_mismatch`,`Remote service ${e} is already used as ${n}`);this.#r.set(e,t)}};function la(e,t,n){if(e.serviceId!==t||e.mode!==n||n===`singleton`&&e.instances.length>1)throw Error(`Remote service reset has the wrong service or mode`);let r=new Set;for(let t of e.instances){if(n===`singleton`?t.instance!==void 0:t.instance===void 0)throw Error(`Remote service reset has an invalid instance address`);if(t.instance!==void 0){if(r.has(t.instance.key))throw Error(`Remote service reset repeats an instance key`);r.add(t.instance.key)}for(let e of t.members)if(e.kind===`state`&&(e.ops.length!==1||e.ops[0]?.[0]!==`r`))throw Error(`Remote service reset must contain full root replacements`)}}function ua(e){let t=new Map;for(let n of e){if(n.name.length===0||t.has(n.name))throw Error(`Remote service has invalid member descriptions`);t.set(n.name,n)}return t}function da(e,t){return e===void 0||t===void 0?e===t:e.key===t.key&&e.generation===t.generation}function fa(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.value==`function`&&typeof t.toString==`function`}function pa(e){return e instanceof Error?e:Error(String(e))}var ma=`$chord.service`,ha=`catalogue`,ga=`subscribe`,_a=`unsubscribe`;function va(){return{serviceId:ma,member:ha,args:[]}}function ya(e,t,n){return{serviceId:ma,member:ga,args:[e,t,n]}}function ba(e){return{serviceId:ma,member:_a,args:[e]}}function xa(e){let t=ka(e,`service call`);if(Aa(t,[`serviceId`,`member`,`args`],[`instance`],`service call`),!ja(t.serviceId)||!ja(t.member)||!Array.isArray(t.args))throw TypeError(`Invalid service call`);return t.instance!==void 0&&Oa(t.instance),e}function Sa(e){if(!Array.isArray(e))throw TypeError(`Invalid service catalogue`);let t=new Set;for(let n of e){let e=ka(n,`service catalogue entry`);if(Aa(e,[`serviceId`,`mode`],[],`service catalogue entry`),!ja(e.serviceId)||!Ma(e.mode)||t.has(e.serviceId))throw TypeError(`Invalid service catalogue`);t.add(e.serviceId)}return e}function Ca(e){return Ta(e,Ri),e}function wa(e){return Ea(e,Ri),e}function Ta(e,t){let n=ka(e,`service subscription snapshot`);if(Aa(n,[`serviceId`,`mode`,`instances`],[],`service subscription snapshot`),!ja(n.serviceId)||!Ma(n.mode)||!Array.isArray(n.instances))throw TypeError(`Invalid service subscription snapshot`);for(let e of n.instances)Da(e,t)}function Ea(e,t){let n=ka(e,`service provider update`);switch(n.type){case`state`:if(Aa(n,[`type`,`member`,`sequence`,`ops`],[`instance`],`state update`),!ja(n.member)||!Na(n.sequence,1)||!Array.isArray(n.ops))throw TypeError(`Invalid service state update`);n.instance!==void 0&&Oa(n.instance);for(let e of n.ops)t(e);return;case`reset`:{Aa(n,[`type`,`snapshot`],[],`reset update`),Ta(n.snapshot,t);let e=n.snapshot;for(let t of e.instances)for(let e of t.members)if(e.kind===`state`&&(e.ops.length!==1||e.ops[0]?.[0]!==`r`))throw TypeError(`Service reset must contain full root replacements`);return}case`unavailable`:Aa(n,[`type`],[],`unavailable update`);return;case`replaced`:Aa(n,[`type`,`snapshot`],[],`replacement update`),Da(n.snapshot,t);return;case`spawned`:Aa(n,[`type`,`instance`],[],`spawn update`),Da(n.instance,t);return;case`closed`:Aa(n,[`type`,`instance`],[],`close update`),Oa(n.instance);return;default:throw TypeError(`Invalid service provider update`)}}function Da(e,t){let n=ka(e,`service instance snapshot`);if(Aa(n,[`members`],[`instance`],`service instance snapshot`),n.instance!==void 0&&Oa(n.instance),!Array.isArray(n.members))throw TypeError(`Invalid service instance snapshot`);for(let e of n.members){let n=ka(e,`service member snapshot`);if(n.kind===`method`){if(Aa(n,[`name`,`kind`],[],`service method snapshot`),!ja(n.name))throw TypeError(`Invalid service method snapshot`)}else if(n.kind===`state`){if(Aa(n,[`name`,`kind`,`sequence`,`ops`],[],`service state snapshot`),!ja(n.name)||!Na(n.sequence,0)||!Array.isArray(n.ops))throw TypeError(`Invalid service state snapshot`);for(let e of n.ops)t(e)}else throw TypeError(`Invalid service member snapshot`)}}function Oa(e){let t=ka(e,`service instance address`);if(Aa(t,[`key`,`generation`],[],`service instance address`),!ja(t.key)||!Na(t.generation,1))throw TypeError(`Invalid service instance address`)}function ka(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`Invalid ${t}`);return e}function Aa(e,t,n,r){let i=new Set([...t,...n]);if(t.some(t=>!Object.hasOwn(e,t))||Object.keys(e).some(e=>!i.has(e)))throw TypeError(`Invalid ${r}`)}function ja(e){return typeof e==`string`&&e.length>0}function Ma(e){return e===`singleton`||e===`keyed`}function Na(e,t){return typeof e==`number`&&Number.isInteger(e)&&e>=t}function Pa(e,t){if(e.length===0)throw TypeError(`Service ID must not be empty`);if(e.startsWith(`$chord.`))throw TypeError(`Service IDs beginning with $chord. are reserved`);return Object.freeze({id:e,local:t?.local??!1})}function Fa(e){return new ca(e)}var Ia=class{#e;#t=new Map;constructor(e){this.#e=e}reset(){this.#t.clear()}add(e,t){let n=za(e,t);if(this.#t.has(n))throw Error(`Duplicate service state ${Va(e,t)}`);let r=this.#e();return this.#t.set(n,{instance:e,codec:r}),r}get(e,t){let n=this.#t.get(za(e,t))?.codec;if(n===void 0)throw Error(`Unknown service state ${Va(e,t)}`);return n}removeInstance(e){for(let[t,n]of this.#t)Ba(n.instance,e)&&this.#t.delete(t)}};function La(){let e=new Ia(Ji);return{decodeSnapshot(t){return e.reset(),{...t,instances:t.instances.map(t=>Ra(t,e))}},decodeUpdate(t){switch(t.type){case`reset`:return e.reset(),{...t,snapshot:{...t.snapshot,instances:t.snapshot.instances.map(t=>Ra(t,e))}};case`state`:return{...t,ops:e.get(t.instance,t.member).decode(t.ops)};case`replaced`:return e.reset(),{...t,snapshot:Ra(t.snapshot,e)};case`spawned`:return{...t,instance:Ra(t.instance,e)};case`unavailable`:return e.reset(),t;case`closed`:return e.removeInstance(t.instance),t}}}}function Ra(e,t){return{...e,members:e.members.map(n=>n.kind===`state`?{...n,ops:t.add(e.instance,n.name).decode(n.ops)}:n)}}function za(e,t){return JSON.stringify([e?.key??null,e?.generation??null,t])}function Ba(e,t){return e?.key===t.key&&e.generation===t.generation}function Va(e,t){return e===void 0?t:`${e.key}@${e.generation}.${t}`}var Ha=4294967296,Ua=4294967295,Wa=512,Ga=class extends Error{constructor(e){super(e),this.name=`CborError`}},Ka=new TextEncoder,qa=new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});function Ja(e,t,n){if(!Number.isSafeInteger(t)||t<0||t>n)throw RangeError(`${e} must be an integer between 0 and ${n}`);return t}function Ya(e){return{maxByteLength:Ja(`maxByteLength`,e?.maxByteLength??16777216,Ua),maxContainerLength:Ja(`maxContainerLength`,e?.maxContainerLength??1e6,Ua),maxDepth:Ja(`maxDepth`,e?.maxDepth??64,Wa)}}var Xa=class{bytes;offset=0;options;constructor(e,t){this.bytes=e,this.options=t}decode(){let e=this.readItem(0);if(this.offset!==this.bytes.byteLength)throw new Ga(`CBOR payload contains trailing data`);return e}readItem(e){if(e>this.options.maxDepth)throw new Ga(`CBOR nesting depth exceeds configured limit of ${this.options.maxDepth}`);let t=this.readByte(),n=t>>>5,r=t&31;switch(n){case 0:return this.readArgument(r);case 1:{let e=-1-this.readArgument(r);if(!Number.isSafeInteger(e))throw new Ga(`Decoded CBOR integer is outside the safe range`);return e}case 2:{let e=this.readLength(r,`byte string`,this.options.maxByteLength);return new Uint8Array(this.readBytes(e))}case 3:{let e=this.readLength(r,`text string`,this.options.maxByteLength),t=this.readBytes(e);try{return qa.decode(t)}catch{throw new Ga(`CBOR text string contains invalid UTF-8`)}}case 4:{let t=this.readLength(r,`array`,this.options.maxContainerLength),n=[];for(let r=0;r<t;r++)n.push(this.readItem(e+1));return n}case 5:{let t=this.readLength(r,`map`,this.options.maxContainerLength),n={},i=new Set;for(let r=0;r<t;r++){let t=this.readItem(e+1);if(typeof t!=`string`)throw new Ga(`CBOR map keys must be strings`);if(i.has(t))throw new Ga(`CBOR map contains a duplicate key`);i.add(t),Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:this.readItem(e+1),writable:!0})}return n}case 6:throw new Ga(`CBOR tags are not supported`);case 7:return this.readSimple(r);default:throw new Ga(`Malformed CBOR major type`)}}readSimple(e){switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 27:{let e=this.readBytes(8),t=new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(0,!1);if(!Number.isFinite(t))throw new Ga(`Decoded CBOR number must be finite`);if(Number.isInteger(t)&&!Number.isSafeInteger(t))throw new Ga(`Decoded CBOR integer is outside the safe range`);return t}case 31:throw new Ga(`CBOR break marker is not supported`);default:throw new Ga(`Unsupported CBOR simple value or floating-point width`)}}readLength(e,t,n){if(e===31)throw new Ga(`Indefinite-length CBOR ${t}s are not supported`);let r=this.readArgument(e);if(r>n)throw new Ga(`CBOR ${t} length exceeds configured limit of ${n}`);return r}readArgument(e){if(e<24)return e;switch(e){case 24:return this.readByte();case 25:{let e=this.readBytes(2);return e[0]*256+e[1]}case 26:{let e=this.readBytes(4);return e[0]*16777216+e[1]*65536+e[2]*256+e[3]}case 27:{let e=this.readArgument(26),t=this.readArgument(26);if(e>2097151)throw new Ga(`Decoded CBOR integer or length is outside the safe range`);return e*Ha+t}case 31:throw new Ga(`Indefinite-length CBOR items are not supported`);default:throw new Ga(`Malformed CBOR additional information`)}}readByte(){if(this.offset>=this.bytes.byteLength)throw new Ga(`Truncated CBOR payload`);let e=this.bytes[this.offset];return this.offset++,e}readBytes(e){if(e>this.bytes.byteLength-this.offset)throw new Ga(`Truncated CBOR payload`);let t=this.bytes.subarray(this.offset,this.offset+e);return this.offset+=e,t}};function Za(e,t){if(!(e instanceof Uint8Array))throw TypeError(`CBOR input must be a Uint8Array`);let n=Ya(t);if(e.byteLength>n.maxByteLength)throw new Ga(`CBOR byte length exceeds configured limit of ${n.maxByteLength}`);return new Xa(e,n).decode()}var Qa=class{buffer;offset=0;maxByteLength;constructor(e){this.maxByteLength=e,this.buffer=new Uint8Array(Math.min(256,e))}writeByte(e){this.ensureCapacity(1),this.buffer[this.offset]=e,this.offset++}writeBytes(e){this.ensureCapacity(e.byteLength),this.buffer.set(e,this.offset),this.offset+=e.byteLength}writeUint16(e){this.ensureCapacity(2),this.buffer[this.offset]=e>>>8,this.buffer[this.offset+1]=e,this.offset+=2}writeUint32(e){this.ensureCapacity(4),this.buffer[this.offset]=e>>>24,this.buffer[this.offset+1]=e>>>16,this.buffer[this.offset+2]=e>>>8,this.buffer[this.offset+3]=e,this.offset+=4}writeUint64(e){let t=Math.floor(e/Ha),n=e-t*Ha;this.writeUint32(t),this.writeUint32(n)}writeFloat64(e){this.ensureCapacity(9),this.buffer[this.offset]=251,new DataView(this.buffer.buffer).setFloat64(this.offset+1,e,!1),this.offset+=9}finish(){return this.buffer.slice(0,this.offset)}ensureCapacity(e){let t=this.offset+e;if(t>this.maxByteLength)throw new Ga(`CBOR byte length exceeds configured limit of ${this.maxByteLength}`);if(t<=this.buffer.byteLength)return;let n=Math.max(1,this.buffer.byteLength);for(;n<t;)n=Math.min(this.maxByteLength,Math.max(t,n*2));let r=new Uint8Array(n);r.set(this.buffer),this.buffer=r}};function $a(e,t,n){let r=t<<5;n<24?e.writeByte(r|n):n<=255?(e.writeByte(r|24),e.writeByte(n)):n<=65535?(e.writeByte(r|25),e.writeUint16(n)):n<=4294967295?(e.writeByte(r|26),e.writeUint32(n)):(e.writeByte(r|27),e.writeUint64(n))}function eo(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function to(e,t,n){let r=Ka.encode(t);if(r.byteLength>n.maxByteLength)throw new Ga(`CBOR text string length exceeds configured limit of ${n.maxByteLength}`);if(qa.decode(r)!==t)throw new Ga(`CBOR text strings must contain valid Unicode scalar values`);$a(e,3,r.byteLength),e.writeBytes(r)}function no(e,t,n,r,i){if(r>n.maxDepth)throw new Ga(`CBOR nesting depth exceeds configured limit of ${n.maxDepth}`);if(t===null)e.writeByte(246);else if(typeof t==`boolean`)e.writeByte(t?245:244);else if(typeof t==`number`){if(!Number.isFinite(t))throw new Ga(`CBOR numbers must be finite`);if(Number.isInteger(t)&&!Object.is(t,-0)){if(!Number.isSafeInteger(t))throw new Ga(`CBOR integers must be safe JavaScript integers`);t>=0?$a(e,0,t):$a(e,1,-1-t)}else e.writeFloat64(t)}else if(typeof t==`string`)to(e,t,n);else if(t instanceof Uint8Array){if(t.byteLength>n.maxByteLength)throw new Ga(`CBOR byte string length exceeds configured limit of ${n.maxByteLength}`);$a(e,2,t.byteLength),e.writeBytes(t)}else if(Array.isArray(t)){if(i.has(t))throw new Ga(`CBOR values must not contain cycles`);if(t.length>n.maxContainerLength)throw new Ga(`CBOR array length exceeds configured limit of ${n.maxContainerLength}`);i.add(t);try{$a(e,4,t.length);for(let a=0;a<t.length;a++){if(!Object.hasOwn(t,a)||t[a]===void 0)throw new Ga(`CBOR arrays must not contain holes or undefined values`);no(e,t[a],n,r+1,i)}}finally{i.delete(t)}}else if(eo(t)){if(i.has(t))throw new Ga(`CBOR values must not contain cycles`);for(let e of Object.getOwnPropertySymbols(t))if(Object.prototype.propertyIsEnumerable.call(t,e))throw new Ga(`CBOR map keys must be strings`);let a=[];for(let e of Object.keys(t)){let n=t[e];n!==void 0&&a.push([e,n])}if(a.length>n.maxContainerLength)throw new Ga(`CBOR map length exceeds configured limit of ${n.maxContainerLength}`);i.add(t);try{$a(e,5,a.length);for(let[t,o]of a)to(e,t,n),no(e,o,n,r+1,i)}finally{i.delete(t)}}else throw new Ga(`Unsupported CBOR value type: ${typeof t}`)}function ro(e,t){let n=Ya(t),r=new Qa(n.maxByteLength);return no(r,e,n,0,new Set),r.finish()}function io(e,t){return t[e.length]?.(...e)??(()=>{throw Error(`Invalid Arguments`)})()}function ao(e,t,n){return e>=t&&e<=n}function oo(e){return e===8205}function so(e){return ao(e,55296,56319)}function co(e){return ao(e,127462,127487)}function lo(e){return ao(e,65024,65039)}function uo(e){return ao(e,768,879)||ao(e,6832,6911)||ao(e,7616,7679)||ao(e,65056,65071)}function fo(e){return e>65535?2:1}function po(e,t){for(;t<e.length;){let n=e.codePointAt(t);if(uo(n)||lo(n))t+=fo(n);else break}return t}function mo(e,t){let n=e.codePointAt(t),r=t+fo(n);for(r=po(e,r);r<e.length-1&&oo(e.codePointAt(r));){let t=e.codePointAt(r+1);r+=1+fo(t),r=po(e,r)}return co(n)&&r<e.length&&co(e.codePointAt(r))&&(r+=fo(e.codePointAt(r))),r}function ho(e){return e>=768&&(so(e)||uo(e)||lo(e)||oo(e))}function go(e,t){let n=0,r=0;for(;r<e.length;)if(r=mo(e,r),++n>=t)return!0;return!1}function _o(e,t){let n=0,r=0;for(;r<e.length;)if(r=mo(e,r),++n>t)return!1;return!0}function vo(e,t){if(t===0)return!0;if(e.length<t)return!1;let n=0;for(;;){if(ho(e.charCodeAt(n)))return go(e,t);if(++n>=t)return!0}}function yo(e,t){if(e.length<=t)return!0;let n=0;for(;;){if(ho(e.charCodeAt(n)))return _o(e,t);if(++n>t)return!1}}function B(e){return Array.isArray(e)}function bo(e){return V(typeof e,`bigint`)}function xo(e){return V(typeof e,`boolean`)}function So(e){if(jo(e)||!Co(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function Co(e){return V(typeof e,`function`)}function wo(e){return Number.isInteger(e)}function To(e){return V(e,null)}function Eo(e){return Number.isFinite(e)}function Do(e){return Oo(e)&&!B(e)}function Oo(e){return V(typeof e,`object`)&&!To(e)}function ko(e){return V(typeof e,`string`)}function Ao(e){return V(typeof e,`symbol`)}function jo(e){return V(e,void 0)}function V(e,t){return e===t}function Mo(e,t){return e>t}function No(e,t){return e<t}function Po(e,t){return e<=t}function Fo(e,t){return e>=t}function Io(e,t){if(bo(e)||bo(t))return BigInt(e)%BigInt(t)===0n;if(!Eo(e)||wo(e)&&1/t%1==0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t),Math.abs(n+t))<1e-10}function Lo(e){if(!Oo(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return!To(t)&&V(typeof t.constructor,`function`)&&!(V(t.constructor,globalThis.Object)||V(t.constructor.name,`Object`))}function Ro(e){return bo(e)||xo(e)||To(e)||Eo(e)||ko(e)||jo(e)}function zo(e,t){return yo(e,t)}function Bo(e,t){return vo(e,t)}function Vo(e,t,n){return e.every((e,r)=>r<t||n(e,r))}function H(e,t){return e.some((e,n)=>t(e,n))}function Ho(e,t){let n=!1;return e.forEach((e,r)=>{t(e,r)&&(n=!0)}),n}function Uo(e,t){return e.reduce((e,n,r)=>t(n,r)?++e:e,0)}function U(e,t,n){return V(e.length,0)?n():t(e[0],e.slice(1))}function Wo(e){return V(e,`__proto__`)||V(e,`constructor`)||V(e,`prototype`)}function W(e,t){return Wo(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Go(e){return Object.entries(e)}function G(e){return Object.getOwnPropertyNames(e)}function Ko(e){return Object.getOwnPropertySymbols(e)}function qo(e){return Object.values(e)}function Jo(e,t){if(!Oo(t))return!1;let n=G(e);return V(n.length,G(t).length)&&n.every(n=>Xo(e[n],t[n]))}function Yo(e,t){return B(t)&&V(e.length,t.length)&&e.every((n,r)=>Xo(e[r],t[r]))}function Xo(e,t){return B(e)?Yo(e,t):Oo(e)?Jo(e,t):V(e,t)}function Zo(e){return e instanceof Boolean}function Qo(e){return e instanceof Number}function $o(e){return e instanceof String}function es(e){return globalThis.ArrayBuffer.isView(e)}function ts(e){return e instanceof globalThis.RegExp}function ns(e){return e instanceof globalThis.Date}function rs(e){return e instanceof globalThis.Set}function is(e){return e instanceof globalThis.Map}var as={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function os(){return as}function ss(e){return W(e,`~refine`)&&B(e[`~refine`])&&Vo(e[`~refine`],0,e=>Oo(e)&&W(e,`check`)&&W(e,`error`)&&Co(e.check)&&Co(e.error))}function cs(e){return Oo(e)&&!B(e)}function ls(e){return xo(e)}function us(e){return cs(e)||ls(e)}function ds(e){return W(e,`additionalItems`)&&us(e.additionalItems)}function fs(e){return W(e,`additionalProperties`)&&us(e.additionalProperties)}function ps(e){return W(e,`allOf`)&&B(e.allOf)&&e.allOf.every(e=>us(e))}function ms(e){return W(e,`$anchor`)&&ko(e.$anchor)}function hs(e){return W(e,`anyOf`)&&B(e.anyOf)&&e.anyOf.every(e=>us(e))}function gs(e){return W(e,`const`)}function _s(e){return W(e,`contains`)&&us(e.contains)}function vs(e){return W(e,`dependencies`)&&Oo(e.dependencies)&&Object.values(e.dependencies).every(e=>us(e)||B(e)&&e.every(e=>ko(e)))}function ys(e){return W(e,`dependentRequired`)&&Oo(e.dependentRequired)&&Object.values(e.dependentRequired).every(e=>B(e)&&e.every(e=>ko(e)))}function bs(e){return W(e,`dependentSchemas`)&&Oo(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(e=>us(e))}function xs(e){return W(e,`$dynamicAnchor`)&&ko(e.$dynamicAnchor)}function Ss(e){return W(e,`$dynamicRef`)&&ko(e.$dynamicRef)}function Cs(e){return W(e,`else`)&&us(e.else)}function ws(e){return W(e,`enum`)&&B(e.enum)}function Ts(e){return W(e,`exclusiveMaximum`)&&(Eo(e.exclusiveMaximum)||bo(e.exclusiveMaximum))}function Es(e){return W(e,`exclusiveMinimum`)&&(Eo(e.exclusiveMinimum)||bo(e.exclusiveMinimum))}function Ds(e){return W(e,`format`)&&ko(e.format)}function Os(e){return W(e,`$id`)&&ko(e.$id)}function ks(e){return W(e,`if`)&&us(e.if)}function As(e){return W(e,`items`)&&(us(e.items)||B(e.items)&&e.items.every(e=>us(e)))}function js(e){return As(e)&&B(e.items)}function Ms(e){return W(e,`maximum`)&&(Eo(e.maximum)||bo(e.maximum))}function Ns(e){return W(e,`maxContains`)&&Eo(e.maxContains)}function Ps(e){return W(e,`maxItems`)&&Eo(e.maxItems)}function Fs(e){return W(e,`maxLength`)&&Eo(e.maxLength)}function Is(e){return W(e,`maxProperties`)&&Eo(e.maxProperties)}function Ls(e){return W(e,`minimum`)&&(Eo(e.minimum)||bo(e.minimum))}function Rs(e){return W(e,`minContains`)&&Eo(e.minContains)}function zs(e){return W(e,`minItems`)&&Eo(e.minItems)}function Bs(e){return W(e,`minLength`)&&Eo(e.minLength)}function Vs(e){return W(e,`minProperties`)&&Eo(e.minProperties)}function Hs(e){return W(e,`multipleOf`)&&(Eo(e.multipleOf)||bo(e.multipleOf))}function Us(e){return W(e,`not`)&&us(e.not)}function Ws(e){return W(e,`oneOf`)&&B(e.oneOf)&&e.oneOf.every(e=>us(e))}function Gs(e){return W(e,`pattern`)&&(ko(e.pattern)||e.pattern instanceof RegExp)}function Ks(e){return W(e,`patternProperties`)&&Oo(e.patternProperties)&&Object.values(e.patternProperties).every(e=>us(e))}function qs(e){return W(e,`prefixItems`)&&B(e.prefixItems)&&e.prefixItems.every(e=>us(e))}function Js(e){return W(e,`properties`)&&Oo(e.properties)&&Object.values(e.properties).every(e=>us(e))}function Ys(e){return W(e,`propertyNames`)&&(Oo(e.propertyNames)||us(e.propertyNames))}function Xs(e){return W(e,`$recursiveAnchor`)&&xo(e.$recursiveAnchor)}function Zs(e){return Xs(e)&&V(e.$recursiveAnchor,!0)}function Qs(e){return W(e,`$recursiveRef`)&&ko(e.$recursiveRef)}function $s(e){return W(e,`$ref`)&&ko(e.$ref)}function ec(e){return W(e,`required`)&&B(e.required)&&e.required.every(e=>ko(e))}function tc(e){return W(e,`then`)&&us(e.then)}function nc(e){return W(e,`type`)&&(ko(e.type)||B(e.type)&&e.type.every(e=>ko(e)))}function rc(e){return W(e,`uniqueItems`)&&xo(e.uniqueItems)}function ic(e){return W(e,`unevaluatedItems`)&&us(e.unevaluatedItems)}function ac(e){return W(e,`unevaluatedProperties`)&&us(e.unevaluatedProperties)}var oc=class{constructor(){let e=new Set,t=new Set;this.stack=[{indices:e,keys:t}]}Push(){let e=new Set,t=new Set;return this.stack.push({indices:e,keys:t}),!0}Pop(){return this.stack.pop(),!0}AddIndex(e){return this.GetIndices().add(e),!0}AddKey(e){return this.GetKeys().add(e),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(e){for(let t of e)t.GetIndices().forEach(e=>this.GetIndices().add(e)),t.GetKeys().forEach(e=>this.GetKeys().add(e));return!0}};function sc(e,t,n,r){return Vo(n[`~refine`],0,(e,t)=>e.check(r))}function cc(e){return As(e)&&B(e.items)}function lc(e,t,n,r){return!cc(n)||Vo(r,0,(r,i)=>No(i,n.items.length)||Id(e,t,n.additionalItems,r)&&t.AddIndex(i))}function uc(e){return new RegExp(e,`u`)}function dc(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}$`}function fc(e){let t=[];return Ks(e)&&t.push(...G(e.patternProperties)),Js(e)&&t.push(...G(e.properties).map(dc)),V(t.length,0)?`(?!)`:`(${t.join(`|`)})`}function pc(e,t,n,r){let i=uc(fc(n));return Vo(G(r),0,(a,o)=>i.test(a)||Id(e,t,n.additionalProperties,r[a])&&t.AddKey(a))}function mc(e,t,n,r){let i=n.allOf.reduce((t,n)=>{let i=new oc;return Ld(e,i,n,r)?[...t,i]:t},[]);return V(i.length,n.allOf.length)&&t.Merge(i)}function hc(e,t,n,r){let i=n.anyOf.reduce((t,n)=>{let i=new oc;return Ld(e,i,n,r)?[...t,i]:t},[]);return Mo(i.length,0)&&t.Merge(i)}function gc(e,t,n,r){return n}function _c(e,t,n,r){return Ro(n.const)?V(r,n.const):Xo(r,n.const)}function vc(e){return!(Rs(e)&&V(e.minContains,0))}function yc(e,t,n,r){return!vc(n)||!V(r.length,0)&&Ho(r,(r,i)=>Ld(e,t,n.contains,r)&&t.AddIndex(i))}function bc(e,t,n,r){let i=V(G(r).length,0),a=Vo(Go(n.dependencies),0,([n,i])=>!W(r,n)||(B(i)?i.every(e=>W(r,e)):Ld(e,t,i,r)));return i||a}function xc(e,t,n,r){let i=V(G(r).length,0),a=Vo(Go(n.dependentRequired),0,([e,t])=>!W(r,e)||t.every(e=>W(r,e)));return i||a}function Sc(e,t,n,r){let i=V(G(r).length,0),a=Vo(Go(n.dependentSchemas),0,([n,i])=>!W(r,n)||Ld(e,t,i,r));return i||a}function Cc(e,t,n,r){let i=e.DynamicRef(n)??!1;return us(i)&&Ld(e,t,i,r)}function wc(e,t,n,r){return H(n.enum,e=>Ro(e)?V(r,e):Xo(r,e))}function Tc(e,t,n,r){return No(r,n.exclusiveMaximum)}function Ec(e,t,n,r){return Mo(r,n.exclusiveMinimum)}var Dc=[0,31,28,31,30,31,30,31,31,30,31,30,31],Oc=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function kc(e){return e%4==0&&(e%100!=0||e%400==0)}function Ac(e){let t=Oc.exec(e);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&kc(n)?29:Dc[r])}var jc=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function Mc(e,t=!0){let n=jc.exec(e);if(!n||t&&!n[4]&&!n[5])return!1;let r=+n[1],i=+n[2],a=+n[3];if(r>23||i>59||a>60)return!1;if(n[5]){let e=+n[6],t=+n[7];if(e>23||t>59)return!1}if(a<60)return!0;let o=n[5]===`-`?-1:1,s=+(n[6]||0),c=+(n[7]||0);return((r*60+i-o*(s*60+c))%1440+1440)%1440==1439}function Nc(e){let t=e.split(/T/i);return t.length===2&&Ac(t[0])&&Mc(t[1])}var Pc=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function Fc(e){return Pc.test(e)}var Ic=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;function Lc(e){return Ic.test(e)}var Rc=/^(?!-).*(?<!-)$/,zc=/^(?!..--)/,Bc=/^[a-zA-Z0-9-]*$/,Vc=/[^\p{ASCII}]/u,Hc=/[0-9]/,Uc=/[\u{0660}-\u{0669}]/u,Wc=/[\u{06f0}-\u{06f9}]/u,Gc=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,Kc=/[\u{002d}\u{002b}]/u,qc=/\p{Mn}/u,Jc=/\p{Mc}/u,Yc=/[\p{Mn}\p{Mc}\p{Me}]/u,Xc=/\p{L}/u,Zc=/\p{Nd}/u,Qc=/\p{Script=Greek}/u,$c=/\p{Script=Hebrew}/u,el=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,tl=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,nl=/[\u{094d}\u{09cd}\u{0a4d}\u{0acd}\u{0b4d}\u{0bcd}\u{0c4d}\u{0ccd}\u{0d3b}\u{0d3c}\u{0d4d}\u{0dca}\u{1b44}\u{1baa}\u{1bab}\u{a9c0}\u{11046}\u{1107f}\u{110b9}\u{11133}\u{11134}\u{111c0}\u{11235}\u{1134d}\u{11442}\u{114c2}\u{115bf}\u{1163f}\u{116b6}\u{11c3f}\u{11d44}\u{11d45}]/u,rl=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,il=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,al=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,ol=new RegExp([Hc,Wc].map(e=>e.source).join(`|`),`u`),sl=new RegExp([Xc,Kc,Gc,Zc,qc,Jc,il,al].map(e=>e.source).join(`|`),`u`);function cl(e){return Rc.test(e)&&zc.test(e)&&Bc.test(e)}var ll=36,ul=1,dl=26,fl=38,pl=700,ml=72,hl=128;function gl(){throw null}function _l(e){return e.toLowerCase().startsWith(`xn--`)}function vl(e,t,n){e=n?Math.floor(e/pl):e>>1,e+=Math.floor(e/t);let r=0;for(;e>455;)e=Math.floor(e/35),r+=ll;return r+Math.floor(36*e/(e+fl))}function yl(e){let t=[],n=hl,r=0,i=ml,a=e.lastIndexOf(`-`);if(a>0)for(let n=0;n<a;n++){let r=e.charCodeAt(n);r>=128&&gl(),t.push(r)}let o=a<0?0:a+1;for(;o<e.length;){let a=r,s=1,c=ll;for(;;){o>=e.length&&gl();let t=e.charCodeAt(o++),n;t>=97&&t<=122?n=t-97:t>=48&&t<=57?n=t-48+26:gl(),r+=n*s;let a=c<=i?ul:c>=i+dl?dl:c-i;if(n<a)break;s*=ll-a,c+=ll}let l=t.length+1;i=vl(r-a,l,a===0),n+=Math.floor(r/l),r%=l,t.splice(r,0,n),r++}return String.fromCodePoint(...t)}function bl(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}var xl=new RegExp(Vc.source,`gu`);function Sl(e){let t=e.replace(xl,``),n=t.length,r=n>0?[t,`-`]:[],i=Array.from(e,e=>e.codePointAt(0)),a=hl,o=0,s=ml,c=n;for(;c<i.length;){let e=1/0;for(let t of i)t>=a&&t<e&&(e=t);o+=(e-a)*(c+1),a=e;for(let e of i)if(e<a&&o++,e===a){let e=o;for(let t=ll;;t+=ll){let n=t<=s?ul:t>=s+dl?dl:t-s;if(e<n)break;let i=n+(e-n)%(ll-n);r.push(bl(i)),e=Math.floor((e-n)/(ll-n))}r.push(bl(e)),s=vl(o,c+1,c===n),o=0,c++}o++,a++}return r.join(``)}var Cl=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,wl=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,Tl=/^(?:R|AL|AN)$/;function El(e){if(_l(e))try{return Ol(yl(e.slice(4).toLowerCase()))}catch{return!1}return Ol(e)}function Dl(e){let t=String.fromCodePoint(e);return ol.test(t)?`EN`:Uc.test(t)?`AN`:qc.test(t)?`NSM`:$c.test(t)?`R`:tl.test(t)?`AL`:Xc.test(t)?`L`:`ON`}function Ol(e){for(let t of e)if(Tl.test(Dl(t.codePointAt(0))))return!0;return!1}function kl(e){let t=!1,n=wl,r=!1,i=!1,a=!0;for(let o of e){let e=Dl(o.codePointAt(0));if(a){if(e!==`L`&&e!==`R`&&e!==`AL`)return!1;t=e===`R`||e===`AL`,n=t?Cl:wl,a=!1}if(!n.test(e))return!1;e===`EN`?r=!0:e===`AN`&&(i=!0)}return!(t&&r&&i)}function Al(e){return Vc.test(e)&&Sl(e).length+4>63}function jl(e){return e[0]===`-`||e[e.length-1]===`-`||e.slice(2).join(``).startsWith(`--`)}function Ml(e){if(Al(e)||Ol(e)&&!kl(e))return!1;let t=[...e],n=t.map(e=>e.codePointAt(0)),r=n.length;if(jl(t)||Yc.test(t[0]))return!1;let i=!1;for(let e=0;e<r;e++){let r=n[e],a=t[e];if(rl.test(a)||!sl.test(a))return!1;el.test(a)&&(i=!0);let o=n[e-1],s=n[e+1];switch(r){case 183:if(o!==108||s!==108)return!1;break;case 885:if(!s||!Qc.test(t[e+1]))return!1;break;case 1523:case 1524:if(!o||!$c.test(t[e-1]))return!1;break;case 8204:if(!o||o<128&&!nl.test(t[e-1]))return!1;break;case 8205:if(!o||!nl.test(t[e-1]))return!1}}return!(e.includes(`・`)&&!i)}function Nl(e){if(!_l(e))return!1;try{let t=e.slice(4).toLowerCase();if(t.lastIndexOf(`-`)===0)return!1;let n=yl(t);return Vc.test(n)?Ml(n):!1}catch{return!1}}function Pl(e){return e.length>0&&e.length<=63}function Fl(e){return Pl(e)&&(Nl(e)||cl(e))}function Il(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(`.`).every(e=>Fl(e))}function Ll(e){return e.length>0&&e.length<=63}function Rl(e){return Ll(e)&&(Nl(e)||Ml(e))}function zl(e){return e.replace(/[\uff01-\uff5e]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248)).normalize(`NFC`).replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu,``).replace(/[\u002E\u3002\uFF0E\uFF61]/g,`.`)}function Bl(e){if(e.length===0||e.includes(` `))return!1;let t=zl(e);if(t.length>253)return!1;let n=t.split(`.`),r=n.some(e=>El(e));return n.every(e=>Rl(e)&&(!r||kl(e)))}function Vl(e){return Il(e)}var Hl=/^(?:[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+(?:\.[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+)*|"(?:[^"\\]|\\.)*")@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,62})(?<!-)(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,62})(?<!-))*$/iu;function Ul(e){return Hl.test(e.normalize(`NFC`))}function Wl(e){return Bl(e)}var Gl=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function Kl(e){return Gl.test(e)}var ql=/^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;function Jl(e){return ql.test(e)}var Yl=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,Xl=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function Zl(e){return!Yl.test(e)&&!Xl.test(e)&&URL.canParse(e,`http://example.com`)}var Ql=2048,$l=/\[[vV][0-9a-fA-F]+\.[^\]]+\]/,eu=/[\x00-\x20<>\^`{|}\\]/,tu=/%(?![0-9a-fA-F]{2})/;function nu(e){return e.length<Ql?e.replace($l,`[::1]`):e}function ru(e){return eu.test(e)||tu.test(e)?!1:URL.canParse(nu(e))}var iu=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function au(e){return iu.test(e)}var ou=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function su(e){return ou.test(e)}function cu(e){try{return new RegExp(e,`u`),!0}catch{return!1}}var lu=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function uu(e){return lu.test(e)}var du=/^(?:[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function fu(e){return du.test(e)}var pu=/^(?:(?:[^\x00-\x20"<>%\\^`{|}\x7f]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?)*\})*$/i;function mu(e){return pu.test(e)}var hu=/^[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function gu(e){return hu.test(e)}function _u(e){return URL.canParse(e)}var vu=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function yu(e){return vu.test(e)}var K=new Map;function bu(){K.clear()}function xu(e,t){return K.get(e)?.(t)??!0}function Su(){bu(),K.set(`date-time`,Nc),K.set(`date`,Ac),K.set(`duration`,Fc),K.set(`email`,Lc),K.set(`hostname`,Vl),K.set(`idn-email`,Ul),K.set(`idn-hostname`,Wl),K.set(`ipv4`,Kl),K.set(`ipv6`,Jl),K.set(`iri-reference`,Zl),K.set(`iri`,ru),K.set(`json-pointer-uri-fragment`,au),K.set(`json-pointer`,su),K.set(`regex`,cu),K.set(`relative-json-pointer`,uu),K.set(`time`,Mc),K.set(`uri-reference`,fu),K.set(`uri-template`,mu),K.set(`uri`,gu),K.set(`url`,_u),K.set(`uuid`,yu)}Su();function Cu(e,t,n,r){return xu(n.format,r)}function wu(e,t,n,r){let i=!tc(n)||n.then,a=!Cs(n)||n.else;return Ld(e,t,n.if,r)?Ld(e,t,i,r):Ld(e,t,a,r)}function Tu(e,t,n,r){return Vo(n.items,0,(n,i)=>Po(r.length,i)||Id(e,t,n,r[i])&&t.AddIndex(i))}function Eu(e,t,n,r){return Vo(r,qs(n)?n.prefixItems.length:0,(r,i)=>Id(e,t,n.items,r)&&t.AddIndex(i))}function Du(e,t,n,r){return js(n)?Tu(e,t,n,r):Eu(e,t,n,r)}function Ou(e){return _s(e)}function ku(e,t,n,r){return!Ou(n)||Po(Uo(r,r=>Ld(e,t,n.contains,r)),n.maxContains)}function Au(e,t,n,r){return Po(r,n.maximum)}function ju(e,t,n,r){return Po(r.length,n.maxItems)}function Mu(e,t,n,r){return zo(r,n.maxLength)}function Nu(e,t,n,r){return Po(G(r).length,n.maxProperties)}function Pu(e){return _s(e)}function Fu(e,t,n,r){return!Pu(n)||Fo(Uo(r,(r,i)=>Ld(e,t,n.contains,r)&&t.AddIndex(i)),n.minContains)}function Iu(e,t,n,r){return Fo(r,n.minimum)}function Lu(e,t,n,r){return Fo(r.length,n.minItems)}function Ru(e,t,n,r){return Bo(r,n.minLength)}function zu(e,t,n,r){return Fo(G(r).length,n.minProperties)}function Bu(e,t,n,r){return Io(r,n.multipleOf)}function Vu(e,t,n,r){let i=new oc;return!Ld(e,i,n.not,r)&&t.Merge([i])}function Hu(e,t,n,r){let i=n.oneOf.reduce((t,n)=>{let i=new oc;return Ld(e,i,n,r)?[...t,i]:t},[]);return V(i.length,1)&&t.Merge(i)}function Uu(e,t,n,r){return(ko(n.pattern)?uc(n.pattern):n.pattern).test(r)}function Wu(e,t,n,r){return Vo(Go(n.patternProperties),0,([n,i])=>{let a=uc(n);return Vo(Go(r),0,([n,r])=>!a.test(n)||Id(e,t,i,r)&&t.AddKey(n))})}function Gu(e,t,n,r){return V(r.length,0)||Vo(n.prefixItems,0,(n,i)=>Po(r.length,i)||Id(e,t,n,r[i])&&t.AddIndex(i))}function Ku(e,t){return e.includes(t)||os().exactOptionalPropertyTypes}function qu(e,t){return jo(e[t])}function Ju(e,t,n,r){let i=ec(n)?n.required:[];return Vo(Go(n.properties),0,([n,a])=>{let o=!W(r,n)||Id(e,t,a,r[n])&&t.AddKey(n);return Ku(i,n)?o:qu(r,n)||o})}function Yu(e,t,n,r){return Vo(G(r),0,(r,i)=>Ld(e,t,n.propertyNames,r))}function Xu(e,t,n,r){let i=e.RecursiveRef(n)??!1;return us(i)&&Ld(e,t,i,r)}function Zu(e,t,n,r){let i=e.Ref(n)??!1,a=new oc,o=us(i)&&Ld(e,a,i,r);return o&&t.Merge([a]),o}function Qu(e,t,n,r){return Vo(n.required,0,e=>W(r,e))}function $u(e,t,n,r,i){return V(n,`object`)?Do(i):V(n,`array`)?B(i):V(n,`boolean`)?xo(i):V(n,`integer`)?wo(i):V(n,`number`)?Eo(i):V(n,`null`)?To(i):V(n,`string`)?ko(i):V(n,`bigint`)?bo(i):V(n,`constructor`)?So(i):V(n,`function`)?Co(i):V(n,`symbol`)?Ao(i):V(n,`undefined`)?jo(i):!V(n,`void`)||jo(i)}function ed(e,t,n,r,i){return H(n,n=>$u(e,t,n,r,i))}function td(e,t,n,r){return B(n.type)?ed(e,t,n.type,n,r):$u(e,t,n.type,n,r)}function nd(e,t,n,r){let i=t.GetIndices();return Vo(r,0,(r,a)=>(i.has(a)||Ld(e,t,n.unevaluatedItems,r))&&t.AddIndex(a))}function rd(e,t,n,r){let i=t.GetKeys();return Vo(Go(r),0,([r,a])=>i.has(r)||Ld(e,t,n.unevaluatedProperties,a)&&t.AddKey(r))}function id(){throw Error(`Unreachable`)}function ad(e){let t=new Set,n=e;for(;n&&n!==Object.prototype;){for(let e of Reflect.ownKeys(n))e!==`constructor`&&typeof e!=`symbol`&&t.add(e);n=Object.getPrototypeOf(n)}return[...t]}function od(e){return typeof e==`number`}var sd;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(sd||={});var cd=BigInt(`14695981039346656037`),[ld,ud]=[BigInt(`1099511628211`),BigInt(`18446744073709551616`)],dd=Array.from({length:256}).map((e,t)=>BigInt(t)),fd=new Float64Array(1),pd=new DataView(fd.buffer),md=new Uint8Array(fd.buffer);function hd(e){cd^=dd[e],cd=cd*ld%ud}function gd(e){hd(sd.Array);for(let t of e)jd(t)}function _d(e){hd(sd.BigInt),pd.setBigInt64(0,e);for(let e of md)hd(e)}function vd(e){hd(sd.Boolean),hd(+!!e)}function yd(e){hd(sd.Constructor),jd(e.toString())}function bd(e){hd(sd.Date),jd(e.getTime())}function xd(e){hd(sd.Function),jd(e.toString())}function Sd(e){hd(sd.Null)}function Cd(e){hd(sd.Number),pd.setFloat64(0,e,!0);for(let e of md)hd(e)}function wd(e){hd(sd.Object);for(let t of ad(e).sort())jd(t),jd(e[t])}function Td(e){hd(sd.RegExp),Dd(e.toString())}var Ed=new TextEncoder;function Dd(e){hd(sd.String);for(let t of Ed.encode(e))hd(t)}function Od(e){hd(sd.Symbol),jd(e.toString())}function kd(e){hd(sd.TypeArray);let t=new Uint8Array(e.buffer);for(let e=0;e<t.length;e++)hd(t[e])}function Ad(e){return hd(sd.Undefined)}function jd(e){return es(e)?kd(e):ns(e)?bd(e):ts(e)?Td(e):Zo(e)?vd(e.valueOf()):$o(e)?Dd(e.valueOf()):Qo(e)?Cd(e.valueOf()):od(e)?Cd(e):B(e)?gd(e):xo(e)?vd(e):bo(e)?_d(e):So(e)?yd(e):To(e)?Sd(e):Oo(e)?wd(e):ko(e)?Dd(e):Ao(e)?Od(e):jo(e)?Ad(e):Co(e)?xd(e):id()}function Md(e){return cd=BigInt(`14695981039346656037`),jd(e),cd}function Nd(e){return Md(e).toString(16).padStart(16,`0`)}function Pd(e){return!V(e.uniqueItems,!1)}function Fd(e,t,n,r){if(!Pd(n))return!0;let i=new Set(r.map(Nd)).size,a=r.length;return V(i,a)}function Id(e,t,n,r){return t.Push()&&Ld(e,t,n,r)&&t.Pop()}function Ld(e,t,n,r){e.Push(n);let i=ls(n)?gc(e,t,n,r):(!nc(n)||td(e,t,n,r))&&(!(Oo(r)&&!B(r))||(!ec(n)||Qu(e,t,n,r))&&(!fs(n)||pc(e,t,n,r))&&(!vs(n)||bc(e,t,n,r))&&(!ys(n)||xc(e,t,n,r))&&(!bs(n)||Sc(e,t,n,r))&&(!Ks(n)||Wu(e,t,n,r))&&(!Js(n)||Ju(e,t,n,r))&&(!Ys(n)||Yu(e,t,n,r))&&(!Vs(n)||zu(e,t,n,r))&&(!Is(n)||Nu(e,t,n,r)))&&(!B(r)||(!ds(n)||lc(e,t,n,r))&&(!_s(n)||yc(e,t,n,r))&&(!As(n)||Du(e,t,n,r))&&(!Ns(n)||ku(e,t,n,r))&&(!Ps(n)||ju(e,t,n,r))&&(!Rs(n)||Fu(e,t,n,r))&&(!zs(n)||Lu(e,t,n,r))&&(!qs(n)||Gu(e,t,n,r))&&(!rc(n)||Fd(e,t,n,r)))&&(!ko(r)||(!Fs(n)||Mu(e,t,n,r))&&(!Bs(n)||Ru(e,t,n,r))&&(!Ds(n)||Cu(e,t,n,r))&&(!Gs(n)||Uu(e,t,n,r)))&&(!(Eo(r)||bo(r))||(!Ts(n)||Tc(e,t,n,r))&&(!Es(n)||Ec(e,t,n,r))&&(!Ms(n)||Au(e,t,n,r))&&(!Ls(n)||Iu(e,t,n,r))&&(!Hs(n)||Bu(e,t,n,r)))&&(!$s(n)||Zu(e,t,n,r))&&(!Qs(n)||Xu(e,t,n,r))&&(!Ss(n)||Cc(e,t,n,r))&&(!gs(n)||_c(e,t,n,r))&&(!ws(n)||wc(e,t,n,r))&&(!ks(n)||wu(e,t,n,r))&&(!Us(n)||Vu(e,t,n,r))&&(!ps(n)||mc(e,t,n,r))&&(!hs(n)||hc(e,t,n,r))&&(!Ws(n)||Hu(e,t,n,r))&&(!ic(n)||!B(r)||nd(e,t,n,r))&&(!ac(n)||!Oo(r)||rd(e,t,n,r))&&(!ss(n)||sc(e,t,n,r));return e.Pop(n),i}function Rd(e,t){return Oo(t)&&!Wo(e)?t[e]:void 0}function zd(e,t){return e.reduce((e,t)=>Rd(t,e),t)}function Bd(e){if(V(e.length,0))return[];let t=e.split(`/`).map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`));return t.length>0&&t[0]===``?t.slice(1):t}function Vd(e,t){return zd(Bd(t),e)}var Hd=`https://json-schema.org`;function Ud(e,t){if(Oo(e)&&xs(e)&&V(e.$dynamicAnchor,t))return e;if(Oo(e))for(let n of G(e)){let r=Ud(e[n],t);if(r)return r}}function Wd(e,t,n){if(V(e,n))return t.href;let r=cs(e)&&Os(e)?new URL(e.$id,t.href):t;if(B(e))for(let t of e){let e=Wd(t,r,n);if(!jo(e))return e}else if(Oo(e))for(let t of G(e)){let i=Wd(e[t],r,n);if(!jo(i))return i}}function Gd(e,t,n){if(V(e.$id,n.hash))return e;let r=new URL(n.href,t.href);if(V(t.pathname,r.pathname))return n.hash.startsWith(`#`)?Jd(e,n):e}function Kd(e,t,n){let r=new URL(`#${e.$anchor}`,t.href),i=new URL(n.href,t.href);return V(r.href,i.href)?e:void 0}function qd(e,t,n){let r=new URL(`#${e.$dynamicAnchor}`,t.href),i=new URL(n.href,t.href);return V(r.href,i.href)?e:void 0}function Jd(e,t){if(t.href.endsWith(`#`))return e;if(!t.hash.startsWith(`#`))return;let n=decodeURIComponent(t.hash.slice(1));if(n.startsWith(`/`))return Vd(e,n)}function Yd(e,t,n){if(Os(e)){let r=Gd(e,t,n);if(!jo(r))return r}if(ms(e)){let r=Kd(e,t,n);if(!jo(r))return r}if(xs(e)){let r=qd(e,t,n);if(!jo(r))return r}return Jd(e,n)}function Xd(e,t,n){return e.reduce((e,r)=>{let i=$d(r,t,n);return jo(i)?e:i},void 0)}function Zd(e){return V(e,`const`)||V(e,`enum`)}function Qd(e,t,n){return G(e).reduce((r,i)=>{if(Zd(i))return r;let a=$d(e[i],t,n);return jo(a)?r:a},void 0)}function $d(e,t,n){let r=cs(e)&&Os(e)?new URL(e.$id,t.href):t;if(cs(e)){let t=Yd(e,r,n);if(!jo(t))return t}if(B(e))return Xd(e,r,n);if(Oo(e))return Qd(e,r,n)}function ef(e,t,n){return Wd(e,new URL(t||`.`,Hd),n)}function tf(e,t,n,r){let i=df(e,t,n,r,!1);return cs(i)&&Os(i)?i:void 0}function nf(e){return e.href.split(`#`)[0]}function rf(e,t){return W(e,t)?e[t]:void 0}function af(e,t,n){return $d(e,t,n)}function of(e,t,n){let r=nf(n);if(V(r,nf(t))||!W(e,r))return;let i=e[r],a=cs(i)&&Os(i)?new URL(i.$id,r):new URL(r);return V(n.hash,``)?i:$d(i,a,n)}function sf(e,t,n,r,i){if(!r.$ref.startsWith(`#`)||W(e,`$schema`))return;let a=ef(t,n,i);if(!(jo(a)||V(a,n)))return{target:i,base:a,root:t}}function cf(e,t,n){let r=e[t];if(cs(r))return{target:n,base:t,root:r}}function lf(e,t,n,r,i){let a=i?cf(e.context,r,n):void 0;return jo(a)?sf(e.root,e.lexicalSchema,e.referenceBase,t,n):a}function uf(e,t,n,r,i,a){if(Os(i))return;let o=tf(e,t,n,r);if(o&&!a.includes(o))return{target:i,resource:o}}function df(e,t,n,r,i=!0){let a=new URL(n||`.`,Hd),o=i&&Os(t)?new URL(t.$id,a):a,s=new URL(r,o.href);return rf(e,r)??af(t,o,s)??of(e,o,s)}function ff(e,t,n,r,i,a){let o=new URL(n||`.`,Hd),s=df(e,i.$dynamicRef.startsWith(`#`)?r:t,n,i.$dynamicRef,!1);if(jo(s)){let e=new URL(i.$dynamicRef,o).hash;if(!e.startsWith(`#/`)&&e.startsWith(`#`)){let n=decodeURIComponent(e.slice(1));return a.find(e=>V(e.$dynamicAnchor,n))??Ud(t,n)}}else return!cs(s)||!xs(s)||new URL(i.$dynamicRef,o).hash.startsWith(`#/`)?s:a.find(e=>V(e.$dynamicAnchor,s.$dynamicAnchor))??s}function pf(e,t){let n=e.inRetrievedFrame?e.lexicalSchema:e.root,r=t.$ref.startsWith(`#`)?e.lexicalSchema:n,i=df(e.context,r,e.referenceBase,t.$ref,!1);if(!i||!cs(i))return{schema:i};let a=new URL(t.$ref,e.referenceBase).href.split(`#`)[0],o=!V(a,e.resourceBase);return{schema:i,retrievedResource:lf(e,t,i,a,o),resolvedResource:o?uf(e.context,e.root,e.referenceBase,a,i,e.ids):void 0}}function mf(e,t){let n=Zs(e.lexicalSchema)?e.recursiveAnchors[0]:e.lexicalSchema;return df(e.context,n,e.lexicalBase,t.$recursiveRef,!1)}function hf(e,t){return ff(e.context,e.root,e.lexicalBase,e.lexicalSchema,t,e.dynamicAnchors)}var gf=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},_f,vf,yf,bf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf=class{constructor(e,t){_f.add(this),this.context=e,this.schema=t,this.ids=[],this.resourceIds=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[],this.retrievedResources=new Map,this.retrievedFrames=[],this.resolvedResources=new Map,this.pendingResource=!0}LexicalBaseURL(){return gf(this,_f,`m`,bf).call(this,this.ids)}Push(e){if(!cs(e))return;Os(e)&&gf(this,_f,`m`,Of).call(this,e),ms(e)&&this.anchors.push(e),Zs(e)&&this.recursiveAnchors.push(e),xs(e)&&this.dynamicAnchors.push(e);let t=this.retrievedResources.get(e);t&&this.retrievedFrames.push({schema:t.root,base:t.base,idDepth:this.ids.length,resourceDepth:this.resourceIds.length})}Pop(e){cs(e)&&(Os(e)&&gf(this,_f,`m`,kf).call(this,e),ms(e)&&this.anchors.pop(),Zs(e)&&this.recursiveAnchors.pop(),xs(e)&&this.dynamicAnchors.pop(),this.retrievedResources.has(e)&&this.retrievedFrames.pop(),gf(this,_f,`m`,jf).call(this,e))}Ref(e){let t=pf(gf(this,_f,`m`,vf).call(this),e);return gf(this,_f,`m`,yf).call(this,t),t.schema}RecursiveRef(e){let t=mf(gf(this,_f,`m`,vf).call(this),e);return t&&(this.pendingResource=!0),t}DynamicRef(e){let t=hf(gf(this,_f,`m`,vf).call(this),e);return t&&(this.pendingResource=!0),t}};_f=new WeakSet,vf=function(){return{context:this.context,root:this.schema,ids:this.ids,lexicalSchema:gf(this,_f,`m`,Cf).call(this),lexicalBase:this.LexicalBaseURL(),referenceBase:gf(this,_f,`m`,Sf).call(this),resourceBase:gf(this,_f,`m`,xf).call(this),recursiveAnchors:this.recursiveAnchors,dynamicAnchors:this.dynamicAnchors,inRetrievedFrame:this.retrievedFrames.length>0}},yf=function(e){jo(e.schema)||(this.pendingResource=!0),jo(e.resolvedResource)||gf(this,_f,`m`,Af).call(this,e.resolvedResource.target,e.resolvedResource.resource),jo(e.retrievedResource)||this.retrievedResources.set(e.retrievedResource.target,{base:e.retrievedResource.base,root:e.retrievedResource.root})},bf=function(e){let t=this.retrievedFrames[this.retrievedFrames.length-1],n=t?new URL(t.base):new URL(Hd);return(t?e.slice(t.idDepth):e).reduce((e,t)=>new URL(t.$id,e),n).href},xf=function(){let e=this.retrievedFrames[this.retrievedFrames.length-1];return e?this.resourceIds.slice(e.resourceDepth).reduce((e,t)=>new URL(t.$id,e),new URL(e.base)).href:gf(this,_f,`m`,bf).call(this,this.resourceIds)},Sf=function(){if(this.retrievedFrames.length>0)return gf(this,_f,`m`,xf).call(this);let e=this.ids[this.ids.length-1];return e&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e.$id)?this.LexicalBaseURL():gf(this,_f,`m`,xf).call(this)},Cf=function(){let e=this.retrievedFrames[this.retrievedFrames.length-1];return e?this.ids.length>e.idDepth?this.ids[this.ids.length-1]:e.schema:this.ids.length>0?this.ids[this.ids.length-1]:this.schema},wf=function(e){e.forEach(e=>gf(this,_f,`m`,Ef).call(this,e,!1))},Tf=function(e){e.forEach(e=>gf(this,_f,`m`,Df).call(this,e,!1))},Ef=function e(t,n=!0){if(ls(t))return;if(B(t))return gf(this,_f,`m`,wf).call(this,t);if(!cs(t))return;let r=t;if(n||!Os(r)){!n&&xs(r)&&this.dynamicAnchors.push(r);for(let t of G(r))gf(this,_f,`m`,e).call(this,r[t],!1)}},Df=function e(t,n=!0){if(ls(t))return;if(B(t))return gf(this,_f,`m`,Tf).call(this,t);if(!cs(t))return;let r=t;if(n||!Os(r)){!n&&xs(r)&&this.dynamicAnchors.pop();for(let t of G(r))gf(this,_f,`m`,e).call(this,r[t],!1)}},Of=function(e){this.ids.push(e);let t=this.pendingResource;this.pendingResource=!1,t&&this.resourceIds.push(e),gf(this,_f,`m`,Ef).call(this,e,!0)},kf=function(e){this.ids.pop(),this.resourceIds.length>0&&V(this.resourceIds[this.resourceIds.length-1],e)&&this.resourceIds.pop(),gf(this,_f,`m`,Df).call(this,e,!0)},Af=function(e,t){gf(this,_f,`m`,Of).call(this,t),this.resolvedResources.set(e,t)},jf=function(e){if(!this.resolvedResources.has(e))return;let t=this.resolvedResources.get(e);gf(this,_f,`m`,kf).call(this,t),this.resolvedResources.delete(e)};var Nf={assign:0,create:0,clone:0,discard:0,update:0};function Pf(e){return os().immutableTypes?Object.freeze(e):e}function Ff(e,t){return Nf.assign+=1,Pf({...e,...t})}function If(e){return e}function Lf(e){return W(e,`~kind`)||W(e,`~unsafe`)}function Rf(e){let t={};for(let n of G(e)){if(Wo(n))continue;let r=Object.getOwnPropertyDescriptor(e,n);r.value=Kf(r.value),V(r.enumerable,!0)?t[n]=r.value:Object.defineProperty(t,n,r)}return t}function zf(e){let t={};for(let n of G(e))Wo(n)||(t[n]=Kf(e[n]));for(let n of Ko(e))t[n]=Kf(e[n]);return t}function Bf(e){return Lo(e)?If(e):Lf(e)?Rf(e):zf(e)}function Vf(e){return e.map(e=>Kf(e))}function Hf(e){return e.slice()}function Uf(e){return new RegExp(e.source,e.flags)}function Wf(e){return new Map(Kf([...e.entries()]))}function Gf(e){return new Set(Kf([...e.values()]))}function Kf(e){return es(e)?Hf(e):ts(e)?Uf(e):is(e)?Wf(e):rs(e)?Gf(e):B(e)?Vf(e):Oo(e)?Bf(e):e}function qf(e){return Nf.clone+=1,Kf(e)}function Jf(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function Yf(e,t){return{...e,...t}}function q(e,t,n={}){Nf.create+=1;let r=Yf(t,n);return Pf(os().enumerableKind?Yf(r,e):Jf(r,e))}function Xf(e,t){Nf.discard+=1;let n={};for(let r of G(e)){if(t.includes(r))continue;let i=Object.getOwnPropertyDescriptor(e,r);i.value=qf(i.value),Object.defineProperty(n,r,i)}return Pf(n)}function J(e,t,n){Nf.update+=1;let r=os(),i=qf(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return Pf(i)}function Zf(...e){let[t,n,r]=io(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return Ld(new Mf(t,n),new oc,n,r)}function Qf(...e){let[t,n,r]=io(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[{},e,t]});return Zf(t,n,r)}function $f(e,t){return Oo(e)&&W(e,`~kind`)&&V(e[`~kind`],t)}function ep(e){return Oo(e)}function tp(e,t,n){return q({"~kind":`Deferred`},{type:`deferred`,action:e,parameters:t,options:n},{})}function np(e){return $f(e,`Deferred`)}function rp(e){return J(e,{"~readonly":!0},{})}function ip(e,t){return J(rp(e),{},t)}function ap(e,t,n,r){return ip(Q(e,t,n),r)}function op(e){return J(e,{"~optional":!0},{})}function sp(e,t){return J(op(e),{},t)}function cp(e,t,n,r){return sp(Q(e,t,n),r)}function lp(e,t){return q({"~kind":`Array`},{type:`array`,items:e},t)}function up(e){return $f(e,`Array`)}function dp(e){return Xf(e,[`~kind`,`type`,`items`])}function fp(e,t,n={}){return q({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function pp(e){return $f(e,`Constructor`)}function mp(e){return Xf(e,[`~kind`,`type`,`parameters`,`instanceType`])}function hp(e,t,n={}){return q({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function gp(e){return $f(e,`Function`)}function _p(e){return Xf(e,[`~kind`,`type`,`parameters`,`returnType`])}function vp(e,t){return q({"~kind":`Ref`},{$ref:e},t)}function yp(e){return $f(e,`Ref`)}function bp(e,t){return q({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function xp(e){return $f(e,`Generic`)}function Sp(e){return q({"~kind":`Any`},{},e)}function Cp(e){return $f(e,`Any`)}var wp=`(?!)`;function Tp(e){return q({"~kind":`Never`},{not:{}},e)}function Ep(e){return $f(e,`Never`)}function Dp(e,t={}){return tp(`AddOptional`,[e],t)}function Op(e,t={}){return sp(e,t)}function kp(e){return Op(e)}function Ap(e){return ep(e)&&W(e,`~optional`)}function jp(e){return G(e).filter(t=>!Ap(e[t]))}function Mp(e){return G(e)}function Np(e){return qo(e)}function Pp(e,t={}){let n=jp(e);return q({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function Fp(e){return $f(e,`Object`)}function Ip(e){return Xf(e,[`~kind`,`type`,`properties`,`required`])}function Lp(e){return q({"~kind":`Unknown`},{},e)}function Rp(e){return $f(e,`Unknown`)}function zp(e,t,n){return q({"~kind":`Cyclic`},{$defs:G(e).reduce((t,n)=>({...t,[n]:J(e[n],{},{$id:n})}),{}),$ref:t},n)}function Bp(e){return $f(e,`Cyclic`)}function Vp(e){return J(e,{"~unsafe":null},{})}function Hp(e){return Do(e)&&W(e,`~unsafe`)&&To(e[`~unsafe`])}function Up(...e){let[t,n]=io(e,{2:(e,t)=>[e,t,t],1:e=>[e,Lp(),Lp()]});return q({"~kind":`Infer`},{type:`infer`,name:t,extends:n},{})}function Wp(e){return $f(e,`Infer`)}function Gp(e,t,n,r={}){return q({"~kind":`Dependent`},{if:e,then:t,else:n},r)}function Kp(e){return $f(e,`Dependent`)}function qp(e){return Xf(e,[`~kind`,`if`,`then`,`else`])}function Jp(e){return Do(e)}function Yp(e){return G(e).filter(e=>isNaN(e)).reduce((t,n)=>[...t,e[n]],[])}function Xp(e){return ko(e)||Eo(e)}function Zp(e,t){return q({"~kind":`Enum`},{enum:Jp(e)?Yp(e):e},t)}function Qp(e){return $f(e,`Enum`)}function $p(e,t={}){return q({"~kind":`Intersect`},{allOf:e},t)}function em(e){return $f(e,`Intersect`)}function tm(e){return Xf(e,[`~kind`,`allOf`])}var nm=class{constructor(e,t){this.type=e,this.decode=t}Encode(e){let t=this.type,n={decode:sm(t)?e=>this.decode(t[`~codec`].decode(e)):this.decode,encode:sm(t)?n=>t[`~codec`].encode(e(n)):e};return J(this.type,{"~codec":n},{})}},rm=class{constructor(e){this.type=e}Decode(e){return new nm(this.type,e)}};function im(e){return new rm(e)}function am(e,t){return im(e).Decode(t).Encode(()=>{throw Error(`Encode not implemented`)})}function om(e,t){return im(e).Decode(()=>{throw Error(`Decode not implemented`)}).Encode(t)}function sm(e){return ep(e)&&W(e,`~codec`)&&Oo(e[`~codec`])&&W(e[`~codec`],`encode`)&&W(e[`~codec`],`decode`)}function cm(e){return Uk(e)}function lm(e){return ep(e)&&W(e,`~immutable`)}function um(e,t={}){return tp(`AddReadonly`,[e],t)}function dm(e,t={}){return ip(e,t)}function fm(e){return dm(e)}function pm(e){return ep(e)&&W(e,`~readonly`)}function mm(e,t){return J(e,{"~refine":_m(e)?[...e[`~refine`],t]:[t]},{})}function hm(...e){let[t,n,r]=io(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[e,t,()=>`Refine Error`]});return mm(t,{check:n,error:r})}function gm(e){return Do(e)&&W(e,`check`)&&W(e,`error`)&&Co(e.check)&&Co(e.error)}function _m(e){return ep(e)&&W(e,`~refine`)&&B(e[`~refine`])&&Vo(e[`~refine`],0,e=>gm(e))}var vm=`-?(?:0|[1-9][0-9]*)n`;function ym(e){return q({"~kind":`BigInt`},{type:`bigint`},e)}function bm(e){return $f(e,`BigInt`)}function xm(e){return q({"~kind":`Boolean`},{type:`boolean`},e)}function Sm(e){return $f(e,`Boolean`)}function Cm(e){return q({"~kind":`Identifier`},{name:e})}function wm(e){return $f(e,`Identifier`)}var Tm=`-?(?:0|[1-9][0-9]*)`;function Em(e){return q({"~kind":`Integer`},{type:`integer`},e)}function Dm(e){return $f(e,`Integer`)}var Om=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,"cause",{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function km(e){return bo(e)?`bigint`:xo(e)?`boolean`:Eo(e)?`number`:ko(e)?`string`:(()=>{throw new Om(e)})()}function Am(e,t){return q({"~kind":`Literal`},{type:km(e),const:e},t)}function jm(e){return bo(e)||xo(e)||Eo(e)||ko(e)}function Mm(e){return Pm(e)&&Eo(e.const)}function Nm(e){return Pm(e)&&ko(e.const)}function Pm(e){return $f(e,`Literal`)}function Fm(e){return q({"~kind":`Null`},{type:`null`},e)}function Im(e){return $f(e,`Null`)}var Lm=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function Rm(e){return q({"~kind":`Number`},{type:`number`},e)}function zm(e){return $f(e,`Number`)}function Bm(e){return q({"~kind":`Symbol`},{type:`symbol`},e)}function Vm(e){return $f(e,`Symbol`)}function Hm(...e){let[t,n,r]=io(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[e,t,t],1:e=>[e,Lp(),Lp()]});return q({"~kind":`Parameter`},{name:t,extends:n,equals:r},{})}function Um(e){return $f(e,`Parameter`)}function Wm(e){return q({"~kind":`String`},{type:`string`},e)}function Gm(e){return $f(e,`String`)}function Km(e,t={}){return q({"~kind":`Union`},{anyOf:e},t)}function qm(e){return $f(e,`Union`)}function Jm(e){return Xf(e,[`~kind`,`anyOf`])}function Ym(e){let t=dS(e);return V(t.length,2)?t[0]:[]}function Xm(e){return!0}function Zm(e){return U(e,(e,t)=>$m(e)?Zm(t):!1,()=>!0)}function Qm(e){return!V(e.length,0)&&Zm(e)}function $m(e){return qm(e)?Qm(e.anyOf):Pm(e)?Xm(e.const):!1}function eh(e){return Qm(e)}function th(e){return q({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function nh(e,t,n=[]){return U(e,(e,r)=>nh(r,t,[...n,`${e}${t}`]),()=>n)}function rh(e,t){return V(e.length,0)?[`${t}`]:nh(e,t)}function ih(e,t,n=[]){return U(t,(t,r)=>ih(e,r,[...n,...ah(e,t)]),()=>n)}function ah(e,t){return qm(t)?ih(e,t.anyOf):Pm(t)?rh(e,t.const):id()}function oh(e,t){return U(t,(t,n)=>oh(ah(e,t),n),()=>e)}function sh(e){return e.map(e=>Am(e))}function ch(e){return Km(sh(oh([],e)))}function lh(e){return V(e.length,0)?id():V(e.length,1)&&Pm(e[0])?e[0]:ch(e)}function uh(e){let t=Ym(e);return V(t.length,0)?Wm():eh(t)?lh(t):th(e)}function dh(e){let t=uh(e);return XS(t)?Wm():t}function fh(e,t){return q({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}function ph(e){return fh(xg,e)}function mh(e){return Pp({true:e,false:e})}function hh(e,t={}){let[n,r,i]=[e,e.length,!1];return q({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function gh(e){return $f(e,`Tuple`)}function _h(e){return Xf(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function vh(e){return Xf(e,[`~readonly`])}function yh(e,t){return J(vh(e),{},t)}function bh(e,t,n,r){return yh(Q(e,t,n),r)}function xh(e,t={}){return tp(`RemoveReadonly`,[e],t)}function Sh(e,t={}){return yh(e,t)}function Ch(e){return Xf(e,[`~optional`])}function wh(e,t){return J(Ch(e),{},t)}function Th(e,t,n,r){return wh(Q(e,t,n),r)}function Eh(e,t={}){return tp(`RemoveOptional`,[e],t)}function Dh(e,t={}){return wh(e,t)}function Oh(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function kh(e){return Pp(Oh(e.items))}function Ah(e){return Fp(e)||gh(e)}function jh(e,t){return pm(e)?!!pm(t):!1}function Mh(e,t){return Ap(e)?!!Ap(t):!1}function Nh(e,t){let n=jh(e,t),r=Mh(e,t),i=Sh(Dh(Zh([e,t])));return n&&r?dm(Op(i)):n&&!r?dm(i):!n&&r?Op(i):i}function Ph(e,t,n){return n in e?n in t?Nh(e[n],t[n]):e[n]:n in t?t[n]:Tp()}function Fh(e,t){return[...new Set([...G(e),...G(t)])].reduce((n,r)=>({...n,[r]:Ph(e,t,r)}),{})}function Ih(e){return Fp(e)?e.properties:gh(e)?Oh(e.items):{}}function Lh(e,t){return Pp(Fh(Ih(e),Ih(t)))}function Rh(e,t){let n=tT(e,t);return V(n,2)?e:V(n,3)||V(n,0)?t:Tp()}function zh(e,t){let n=Ah(e),r=Ah(t);return n&&r?Lh(e,t):n&&!r?e:!n&&r?t:Rh(e,t)}function Bh(e,t){return Ep(e)||Cp(e)?e:Rp(e)||Ep(t)||Cp(t)?t:Rp(t)?e:zh(e,t)}function Vh(e,t){return qm(e)||qm(t)}function Hh(e,t){let n=eg(e),r=eg(t);return Vh(n,r)?Zh([n,r]):Bh(n,r)}function Uh(e,t,n=[]){return U(t,(t,r)=>Uh(e,r,[...n,Hh(t,e)]),()=>V(n.length,0)?[e]:n)}function Wh(e,t,n=[]){return U(e,(e,r)=>Wh(r,t,[...n,...Gh([e],t)]),()=>n)}function Gh(e,t=[]){return U(e,(e,n)=>qm(e)?Gh(n,Wh(e.anyOf,t)):Gh(n,Uh(e,t)),()=>t)}function Kh(e,t){return rC(eT({},e,t))?[]:[e]}function qh(e,t,n=[]){return U(e,(e,r)=>qh(r,t,[...n,...Kh(e,t)]),()=>n)}function Jh(e,t){let n=eg(e);return $h(qh(qm(n)?n.anyOf:[n],t))}function Yh(e,t,n){return $h([Zh([e,t]),Jh(n,e)])}function Xh(e,t=[]){return U(e,(e,n)=>Xh(n,[...t,Am(e)]),()=>$h(t))}function Zh(e){return $h(aT(Gh(e)))}function Qh(e){return eg(dh(e))}function $h(e){return tg(aT(e))}function eg(e){return Kp(e)?Yh(e.if,e.then,e.else):Qp(e)?Xh(e.enum):em(e)?Zh(e.allOf):XS(e)?Qh(e.pattern):qm(e)?$h(e.anyOf):e}function tg(e){return V(e.length,1)?e[0]:V(e.length,0)?Tp():Km(e)}function ng(e,t){return gg(Xh(e),t)}function rg(e,t){return fh(yg,t)}function ig(e,t){return gg(Zh(e),t)}function ag(e,t){return ko(e)||Eo(e)?Pp({[e]:t}):V(e,!1)?Pp({false:t}):V(e,!0)?Pp({true:t}):Pp({})}function og(e,t){return fh(bg,t)}function sg(e,t){return W(e,`pattern`)&&(ko(e.pattern)||e.pattern instanceof RegExp)?fh(e.pattern.toString(),t):fh(xg,t)}function cg(e,t){return eh(Ym(e))?gg(Qh(e),t):fh(e,t)}function lg(e){return qm(e)?ug(e.anyOf):[e]}function ug(e,t=[]){return U(e,(e,n)=>ug(n,[...t,...lg(e)]),()=>t)}function dg(e){return e.some(e=>Gm(e)||zm(e)||Dm(e))}function fg(e,t){return V(dg(e),!0)?fh(xg,t):void 0}function pg(e,t){return e.reduce((e,n)=>Pm(n)&&(ko(n.const)||Eo(n.const))?{...e,[n.const]:t}:e,{})}function mg(e,t){return Pp(pg(e,t))}function hg(e,t){let n=ug(e),r=fg(n,t);return ep(r)?r:mg(n,t)}function gg(e,t){return Cp(e)?ph(t):Sm(e)?mh(t):Qp(e)?ng(e.enum,t):Dm(e)?rg(e,t):em(e)?ig(e.allOf,t):Pm(e)?ag(e.const,t):zm(e)?og(e,t):qm(e)?hg(e.anyOf,t):Gm(e)?sg(e,t):XS(e)?cg(e.pattern,t):Pp({})}function _g(e,t,n){return jk([e])?J(gg(e,t),{},n):Sg(e,t,n)}function vg(e,t,n,r,i){return _g(Q(e,t,n),Q(e,t,r),i)}var yg=`^${Tm}$`,bg=`^${Lm}$`,xg=`^.*$`;function Sg(e,t,n={}){return tp(`Record`,[e,t],n)}function Cg(e,t,n={}){return _g(e,t,n)}function wg(e,t){return fh(e,t)}function Tg(e){return V(e,xg)?Wm():V(e,yg)?Em():V(e,bg)?Rm():uh(e)}function Eg(e){return G(e.patternProperties)[0]}function Dg(e){return Tg(Eg(e))}function Og(e){return e.patternProperties[Eg(e)]}function kg(e){return $f(e,`Record`)}function Ag(e){return q({"~kind":`Rest`},{type:`rest`,items:e},{})}function jg(e){return $f(e,`Rest`)}function Mg(e){return q({"~kind":`This`},{$ref:`#`},e)}function Ng(e){return $f(e,`This`)}function Pg(e){return q({"~kind":`Undefined`},{type:`undefined`},e)}function Fg(e){return $f(e,`Undefined`)}function Ig(e){return q({"~kind":`Void`},{type:`void`},e)}function Lg(e){return $f(e,`Void`)}function Rg(e,t){return V(e,`Array`)?lp(t[0]):V(e,`Capitalize`)?XT(t[0]):V(e,`ConstructorParameters`)?xE(t[0]):V(e,`Evaluate`)?Wk(t[0]):V(e,`Exclude`)?EE(t[0],t[1]):V(e,`Extract`)?AE(t[0],t[1]):V(e,`Index`)?zE(t[0],t[1]):V(e,`InstanceType`)?PD(t[0]):V(e,`Lowercase`)?QT(t[0]):V(e,`NonNullable`)?gO(t[0]):V(e,`Omit`)?xO(t[0],t[1]):V(e,`Parameters`)?OO(t[0]):V(e,`Partial`)?NO(t[0]):V(e,`Pick`)?UO(t[0],t[1]):V(e,`Readonly`)?YO(t[0]):V(e,`KeyOf`)?zD(t[0]):V(e,`Record`)?Sg(t[0],t[1]):V(e,`Required`)?hk(t[0]):V(e,`ReturnType`)?yk(t[0]):V(e,`Uncapitalize`)?eE(t[0]):V(e,`Uppercase`)?nE(t[0]):zT(vp(e),t)}function zg(){throw Error(`Unreachable`)}function Bg(e,t=[]){return U(e,(e,n)=>Bg(n,[...t,e[1]]),()=>t)}function Vg(e){return V(e.length,3)?[e[0],...Bg(e[1])]:[]}function Hg(e){return Hm(e[0],e[2],e[4])}function Ug(e){return Hm(e[0],e[2],e[2])}function Wg(e){return Hm(e[0],Lp(),e[2])}function Gg(e){return Hm(e,Lp(),Lp())}function Kg(e){return e}function qg(e){return Vg(e)}function Jg(e){return e[1]}function Yg(e){return Vg(e)}function Xg(e){return e[1]}function Zg(e){return Rg(e[0],e[1])}function Qg(e){return null}function $g(e){return Wm()}function e_(e){return Rm()}function t_(e){return xm()}function n_(e){return Pg()}function r_(e){return Fm()}function i_(e){return Em()}function a_(e){return ym()}function o_(e){return Lp()}function s_(e){return Sp()}function c_(e){return Pp({})}function l_(e){return Tp()}function u_(e){return Bm()}function d_(e){return Ig()}function f_(e){return Mg()}function p_(e){return Am(BigInt(e))}function m_(e){return Am(V(e,`true`))}function h_(e){return Am(parseFloat(e))}function g_(e){return Am(e)}function __(e){return e[1]}function v_(e){return Am(e)}function y_(e){return V(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function b_(e){return e[1]}function x_(e){return GS(e)}function S_(e){return V(e.length,6)?Gp(e[1],e[3],e[5]):Gp(e[1],e[3],Lp())}function C_(e){return e.length>0}function w_(e){return e.reduce((e,t)=>V(t.length,3)?[...e,[t[1]]]:[...e,[]],[])}function T_(e){return V(e.length,6)?[e[1],e[3],e[5]]:[]}function E_(e){return B(e)&&V(e.length,3)?e[1]:e}function D_(e){return V(e.length,2)?e[1]:[]}function O_(e,t){return t.reduce((e,t)=>{let n=t;return V(n.length,1)?zE(e,n[0]):V(n.length,0)?lp(e):zg()},e)}function k_(e,t){return V(t.length,3)?gE(e,t[0],t[1],t[2]):e}function A_(e,t){return B(t)&&V(t.length,0)?e:wk(e,t)}function j_(e){let[t,n,r,i,a]=e;return A_(k_(t?zD(O_(n,r)):O_(n,r),i),a)}function M_(e,t){return V(t.length,3)?(()=>{let[n,r,i]=t,a=M_(r,i);if(V(n,`&`))return em(a)?$p([e,...a.allOf]):$p([e,a]);if(V(n,`|`))return qm(a)?Km([e,...a.anyOf]):Km([e,a]);zg()})():e}function N_(e){return e}function P_(e){let[t,n]=e;return M_(t,n)}function F_(e){return e}function I_(e){let[t,n]=e;return M_(t,n)}function L_(e){return Hk(e[1])}function R_(e){return e[1]}function z_(e){return bp(e[0],e[2])}function B_(e){return V(e.length,4)?Up(e[1],e[3]):V(e.length,2)?Up(e[1],Lp()):zg()}function V_(e){return e}function H_(e){return`${e}`}function U_(e){return e}function W_(e){return e}function G_(e){return Dm(e[3])?yg:zm(e[3])?bg:Vm(e[3])||Gm(e[3])?xg:zg()}function K_(e){return e}function q_(e){return e.length>0}function J_(e){return e.length>0}function Y_(e){let[t,n,r,i,a]=e;return{[n]:t&&r?um(Dp(a)):t&&!r?um(a):!t&&r?Dp(a):a}}function X_(e){return e}function Z_(e){return Vg(e)}function Q_(e){return e.reduce((e,t)=>W(t,yg)||W(t,bg)||W(t,xg)?[e[0],Ff(e[1],t)]:[Ff(e[0],t),e[1]],[{},{}])}function $_(e){return Q_(e[1])}function ev(e){let[t,n]=e;return Pp(t,V(G(n).length,0)?{}:{patternProperties:n})}function tv(e){return V(e.length,5)?um(Dp(e[4])):V(e.length,3)?e[2]:V(e.length,4)?V(e[2],`readonly`)?um(e[3]):Dp(e[3]):zg()}function nv(e){if(!B(e)||!V(e.length,3))return e;let[t,n,r]=e;return t&&r?um(Dp(n)):t&&!r?um(n):!t&&r?Dp(n):n}function rv(e){return V(e.length,2)?Ag(e[1]):V(e.length,1)?e[0]:zg()}function iv(e){return Vg(e)}function av(e){return hh(e[1])}function ov(e){return um(Dp(e[4]))}function sv(e){return um(e[3])}function cv(e){return Dp(e[3])}function lv(e){return e[2]}function uv(e){return e}function dv(e){return V(e.length,2)?Ag(e[1]):V(e.length,1)?e[0]:zg()}function fv(e){return Vg(e)}function pv(e){return hp(e[1],e[4])}function mv(e){return fp(e[2],e[5])}function hv(e,t){return V(e,`remove`)?xh(t):V(e,`add`)?um(t):t}function gv(e){return V(e.length,2)&&V(e[0],`-`)?`remove`:V(e.length,2)&&V(e[0],`+`)||V(e.length,1)?`add`:`none`}function _v(e,t){return V(e,`remove`)?Eh(t):V(e,`add`)?Dp(t):t}function vv(e){return V(e.length,2)&&V(e[0],`-`)?`remove`:V(e.length,2)&&V(e[0],`+`)||V(e.length,1)?`add`:`none`}function yv(e){return V(e.length,2)?[e[1]]:[]}function bv(e){return B(e[6])&&V(e[6].length,1)?ZD(Cm(e[3]),e[5],e[6][0],hv(e[1],_v(e[8],e[10]))):ZD(Cm(e[3]),e[5],vp(e[3]),hv(e[1],_v(e[8],e[10])))}function xv(e){return vp(e)}function Sv(e){return BigInt(e)}function Cv(e){return parseFloat(e)}function wv(e){return V(e,`true`)}function Tv(e){return e}function Ev(e){return null}function Dv(e){return{[e[0]]:e[2]}}function Ov(e){return Vg(e)}function kv(e){return e.reduce((e,t)=>Ff(e,t),{})}function Av(e){return kv(e[1])}function jv(e){return Vg(e)}function Mv(e){return e[1]}function Nv(e){return e}function Pv(e){return ym()}function Fv(e){return Wm()}function Iv(e){return Rm()}function Lv(e){return Em()}function Rv(e){return Tp()}function zv(e){return Am(e)}function Bv(e){return e}function Vv(e){return Km(e[1])}function Hv(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Uv(e){return[e[0],...e[1]]}function Wv(e){return e}function Gv(e){return e[1]}function Kv(e){return Vg(e)}function qv(e){return V(e.length,2)?e[1]:[]}function Jv(e){let t=e[2],n=e[3],[r,i]=e[4],a=V(G(i).length,0)?{}:{patternProperties:i};return{[e[1]]:bp(t,Dw(n,r,a))}}function Yv(e){let t=e[2],[n,r]=e[3],i=V(G(r).length,0)?{}:{patternProperties:r};return{[e[1]]:Dw(t,n,i)}}function Xv(e){return{[e[1]]:bp(e[2],e[4])}}function Zv(e){return{[e[1]]:e[3]}}function Qv(e){return null}function $v(e){return e}function ey(e){return Vg(e)}function ty(e){return e[1]}function ny(e){let[t,n]=[e[0],e[1]];return Kk(Ff(t,Q_(n)[0]))}function ry(e){return e}function iy(e){return V(e.length,2)}function ay(e,t,n){return iy(e)?t(e[0],e[1]):n()}function oy(e,t){return V(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function sy(e,t){for(let n=0;n<e.length;n++){let r=oy(e[n],t);if(iy(r))return r}return[]}function cy(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var ly=[...cy(97,122),...cy(65,90)],uy=cy(49,57),dy=[`0`,...uy],fy=`//`,py=`/*`,my=`*/`;function hy(e){let t=e.indexOf(my);return V(t,-1)?``:e.slice(t+2)}function gy(e){let t=e.indexOf(`
|
|
11
|
-
`);return V(t,-1)?``:e.slice(t)}function _y(e){return e.replace(/^[ \t\r\f\v]+/,``)}function vy(e){let t=_y(e);return t.startsWith(py)?vy(hy(t.slice(2))):t.startsWith(fy)?vy(gy(t.slice(2))):t}function yy(e){let t=e.trimStart();return t.startsWith(py)?yy(hy(t.slice(2))):t.startsWith(fy)?yy(gy(t.slice(2))):t}function by(e,t){return ay(sy([e],t),(e,t)=>[e,t],()=>[``,t])}function xy(e,t){return e.includes(t)}function Sy(e,t,n,r=``){return ay(sy(e,n),(n,i)=>xy(t,n)?Sy(e,t,i,r):Sy(e,t,i,`${r}${n}`),()=>[r,n])}function Cy(e){return sy(uy,e)}var wy=[...dy,`_`];function Ty(e){return Sy(wy,[`_`],e)}function Ey(e){return ay(sy([`0`],e),(e,t)=>[e,t],()=>ay(Cy(e),(e,t)=>ay(Ty(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[]))}function Dy(e){return Ey(yy(e))}function Oy(e){return by(`-`,e)}function ky(e){return ay(Oy(e),(e,t)=>ay(Dy(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function Ay(e){return ky(yy(e))}function jy(e){return ay(Ay(e),(e,t)=>ay(sy([`n`],t),(t,n)=>[`${e}`,n],()=>[]),()=>[])}function My(e){return jy(e)}function Ny(e,t){return sy([e],t)}function Y(e,t){return V(e,``)?[``,t]:e.startsWith(`
|
|
12
|
-
`)?Ny(e,vy(t)):e.startsWith(` `)?Ny(e,t):Ny(e,yy(t))}var Py=[...ly,`_`,`$`];function Fy(e){return sy(Py,e)}var Iy=[...Py,...dy];function Ly(e,t=``){return ay(sy(Iy,e),(e,n)=>Ly(n,`${t}${e}`),()=>[t,e])}function Ry(e){return ay(Fy(e),(e,t)=>ay(Ly(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function zy(e){return Ry(yy(e))}var By=[...dy,`_`];function Vy(e){return iy(sy([`.`],e))}function Hy(e){return ay(Sy(By,[`_`],e),(e,t)=>V(e,``)?[]:[e,t],()=>[])}function Uy(e){return ay(sy([`.`],e),(e,t)=>ay(Hy(t),(t,n)=>[`0${e}${t}`,n],()=>[]),()=>[])}function Wy(e){return ay(Dy(e),(e,t)=>ay(sy([`.`],t),(t,n)=>ay(Hy(n),(n,r)=>[`${e}${t}${n}`,r],()=>[`${e}`,n]),()=>[`${e}`,t]),()=>[])}function Gy(e){return Vy(e)?Uy(e):Wy(e)}function Ky(e){return Gy(yy(e))}function qy(e){return by(`-`,e)}function Jy(e){return ay(qy(e),(e,t)=>ay(Ky(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function Yy(e){return Jy(yy(e))}function Xy(e){return V(e,``)?[]:[e.slice(0,1),e.slice(1)]}function Zy(e,t){return U(e,(e,n)=>t.startsWith(e)?!0:Zy(n,t),()=>!1)}function Qy(e,t,n=``){return ay(Xy(t),(r,i)=>Zy(e,t)?[n,t]:Qy(e,i,`${n}${r}`),()=>[])}function $y(e,t,n){return ay(sy([e],n),(e,n)=>ay(Qy([t],n),(e,n)=>ay(sy([t],n),(t,n)=>[`${e}`,n],()=>[]),()=>[]),()=>[])}function eb(e,t,n){return ay(sy([e],n),(e,n)=>ay(Qy([`
|
|
13
|
-
`,t],n),(e,n)=>ay(sy([t],n),(t,n)=>[`${e}`,n],()=>[]),()=>[]),()=>[])}function tb(e,t,n,r){return n?$y(e,t,yy(r)):eb(e,t,yy(r))}function nb(e,t){return sy(e,t)}function rb(e,t){return tb(e,e,!1,t)}function ib(e,t){return ay(nb(e,t),(e,t)=>rb(e,`${e}${t}`),()=>[])}function ab(e,t){return ib(e,yy(t))}function ob(e,t){return ay(Qy(e,t),(e,t)=>V(e,``)?[]:[e,t],()=>[])}var X=(e,t,n=()=>[])=>e.length===2?t(e):n(),sb=e=>X(X(zy(e),([e,t])=>X(Y(`extends`,t),([t,n])=>X(ax(n),([n,r])=>X(Y(`=`,r),([r,i])=>X(ax(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Hg(e),t]),cb=e=>X(X(zy(e),([e,t])=>X(Y(`extends`,t),([t,n])=>X(ax(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ug(e),t]),lb=e=>X(X(zy(e),([e,t])=>X(Y(`=`,t),([t,n])=>X(ax(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Wg(e),t]),ub=e=>X(zy(e),([e,t])=>[Gg(e),t]),db=e=>X(X(sb(e),([e,t])=>[e,t],()=>X(cb(e),([e,t])=>[e,t],()=>X(lb(e),([e,t])=>[e,t],()=>X(ub(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[Kg(e),t]),fb=(e,t=[])=>X(X(Y(`,`,e),([e,t])=>X(db(t),([t,n])=>[[e,t],n])),([e,n])=>fb(n,[...t,e]),()=>[t,e]),pb=e=>X(X(X(db(e),([e,t])=>X(fb(t),([t,n])=>X(X(Y(`,`,n),([e,t])=>[[e],t],()=>[[],n]),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[qg(e),t]),mb=e=>X(X(Y(`<`,e),([e,t])=>X(pb(t),([t,n])=>X(Y(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Jg(e),t]),hb=(e,t=[])=>X(X(Y(`,`,e),([e,t])=>X(ax(t),([t,n])=>[[e,t],n])),([e,n])=>hb(n,[...t,e]),()=>[t,e]),gb=e=>X(X(X(ax(e),([e,t])=>X(hb(t),([t,n])=>X(X(Y(`,`,n),([e,t])=>[[e],t],()=>[[],n]),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Yg(e),t]),_b=e=>X(X(Y(`<`,e),([e,t])=>X(gb(t),([t,n])=>X(Y(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Xg(e),t]),vb=e=>X(X(zy(e),([e,t])=>X(_b(t),([t,n])=>[[e,t],n])),([e,t])=>[Zg(e),t]),yb=e=>X(X(X(Y(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Qg(e),t]),bb=e=>X(Y(`string`,e),([e,t])=>[$g(e),t]),xb=e=>X(Y(`number`,e),([e,t])=>[e_(e),t]),Sb=e=>X(Y(`boolean`,e),([e,t])=>[t_(e),t]),Cb=e=>X(Y(`undefined`,e),([e,t])=>[n_(e),t]),wb=e=>X(Y(`null`,e),([e,t])=>[r_(e),t]),Tb=e=>X(Y(`integer`,e),([e,t])=>[i_(e),t]),Eb=e=>X(Y(`bigint`,e),([e,t])=>[a_(e),t]),Db=e=>X(Y(`unknown`,e),([e,t])=>[o_(e),t]),Ob=e=>X(Y(`any`,e),([e,t])=>[s_(e),t]),kb=e=>X(Y(`object`,e),([e,t])=>[c_(e),t]),Ab=e=>X(Y(`never`,e),([e,t])=>[l_(e),t]),jb=e=>X(Y(`symbol`,e),([e,t])=>[u_(e),t]),Mb=e=>X(Y(`void`,e),([e,t])=>[d_(e),t]),Nb=e=>X(Y(`this`,e),([e,t])=>[f_(e),t]),Pb=e=>X(X(Y("${",e),([e,t])=>X(ax(t),([t,n])=>X(Y(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[__(e),t]),Fb=e=>X(Qy(["${","`"],e),([e,t])=>[v_(e),t]),Ib=e=>X(X(X(Fb(e),([e,t])=>X(Pb(t),([t,n])=>X(Ib(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X(X(Fb(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X(X(Fb(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[y_(e),t]),Lb=e=>X(X(Y("`",e),([e,t])=>X(Ib(t),([t,n])=>X(Y("`",n),([n,r])=>[[e,t,n],r]))),([e,t])=>[b_(e),t]),Rb=e=>X(Lb(e),([e,t])=>[x_(e),t]),zb=e=>X(X(X(Y(`if`,e),([e,t])=>X(ax(t),([t,n])=>X(Y(`then`,n),([n,r])=>X(ax(r),([r,i])=>X(Y(`else`,i),([i,a])=>X(ax(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[e,t],()=>X(X(Y(`if`,e),([e,t])=>X(ax(t),([t,n])=>X(Y(`then`,n),([n,r])=>X(ax(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>[])),([e,t])=>[S_(e),t]),Bb=e=>X(My(e),([e,t])=>[p_(e),t]),Vb=e=>X(X(Y(`true`,e),([e,t])=>[e,t],()=>X(Y(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[m_(e),t]),Hb=e=>X(Yy(e),([e,t])=>[h_(e),t]),Ub=e=>X(ab([`'`,`"`],e),([e,t])=>[g_(e),t]),Wb=e=>X(X(X(Y(`keyof`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[C_(e),t]),Gb=(e,t=[])=>X(X(X(Y(`[`,e),([e,t])=>X(ax(t),([t,n])=>X(Y(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X(X(Y(`[`,e),([e,t])=>X(Y(`]`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,n])=>Gb(n,[...t,e]),()=>[t,e]),Kb=e=>X(Gb(e),([e,t])=>[w_(e),t]),qb=e=>X(X(X(Y(`extends`,e),([e,t])=>X(ax(t),([t,n])=>X(Y(`?`,n),([n,r])=>X(ax(r),([r,i])=>X(Y(`:`,i),([i,a])=>X(ax(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[T_(e),t]),Jb=e=>X(X(X(Y(`(`,e),([e,t])=>X(ax(t),([t,n])=>X(Y(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X(bb(e),([e,t])=>[e,t],()=>X(xb(e),([e,t])=>[e,t],()=>X(Sb(e),([e,t])=>[e,t],()=>X(Cb(e),([e,t])=>[e,t],()=>X(wb(e),([e,t])=>[e,t],()=>X(Tb(e),([e,t])=>[e,t],()=>X(Eb(e),([e,t])=>[e,t],()=>X(Db(e),([e,t])=>[e,t],()=>X(Ob(e),([e,t])=>[e,t],()=>X(kb(e),([e,t])=>[e,t],()=>X(Ab(e),([e,t])=>[e,t],()=>X(jb(e),([e,t])=>[e,t],()=>X(Mb(e),([e,t])=>[e,t],()=>X(Nb(e),([e,t])=>[e,t],()=>X(Bb(e),([e,t])=>[e,t],()=>X(Vb(e),([e,t])=>[e,t],()=>X(Hb(e),([e,t])=>[e,t],()=>X(Ub(e),([e,t])=>[e,t],()=>X(Rb(e),([e,t])=>[e,t],()=>X(zb(e),([e,t])=>[e,t],()=>X(vx(e),([e,t])=>[e,t],()=>X(wx(e),([e,t])=>[e,t],()=>X(Px(e),([e,t])=>[e,t],()=>X(Nx(e),([e,t])=>[e,t],()=>X(Rx(e),([e,t])=>[e,t],()=>X(vb(e),([e,t])=>[e,t],()=>X(zx(e),([e,t])=>[e,t],()=>[])))))))))))))))))))))))))))),([e,t])=>[E_(e),t]),Yb=e=>X(X(X(Y(`with`,e),([e,t])=>X(Yx(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[D_(e),t]),Xb=e=>X(X(Wb(e),([e,t])=>X(Jb(t),([t,n])=>X(Kb(n),([n,r])=>X(qb(r),([r,i])=>X(Yb(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[j_(e),t]),Zb=e=>X(X(X(Y(`&`,e),([e,t])=>X(Xb(t),([t,n])=>X(Zb(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[N_(e),t]),Qb=e=>X(X(Xb(e),([e,t])=>X(Zb(t),([t,n])=>[[e,t],n])),([e,t])=>[P_(e),t]),$b=e=>X(X(X(Y(`|`,e),([e,t])=>X(Qb(t),([t,n])=>X($b(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[F_(e),t]),ex=e=>X(X(Qb(e),([e,t])=>X($b(t),([t,n])=>[[e,t],n])),([e,t])=>[I_(e),t]),tx=e=>X(X(Y(`readonly`,e),([e,t])=>X(ex(t),([t,n])=>[[e,t],n])),([e,t])=>[L_(e),t]),nx=e=>X(X(Y(`|`,e),([e,t])=>X(ex(t),([t,n])=>[[e,t],n])),([e,t])=>[R_(e),t]),rx=e=>X(X(mb(e),([e,t])=>X(Y(`=`,t),([t,n])=>X(ax(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[z_(e),t]),ix=e=>X(X(X(Y(`infer`,e),([e,t])=>X(zy(t),([t,n])=>X(Y(`extends`,n),([n,r])=>X(ex(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>X(X(Y(`infer`,e),([e,t])=>X(zy(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,t])=>[B_(e),t]),ax=e=>X(X(ix(e),([e,t])=>[e,t],()=>X(nx(e),([e,t])=>[e,t],()=>X(tx(e),([e,t])=>[e,t],()=>X(ex(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[V_(e),t]),ox=e=>X(Yy(e),([e,t])=>[H_(e),t]),sx=e=>X(zy(e),([e,t])=>[U_(e),t]),cx=e=>X(ab([`'`,`"`],e),([e,t])=>[W_(e),t]),lx=e=>X(X(Y(`[`,e),([e,t])=>X(zy(t),([t,n])=>X(Y(`:`,n),([n,r])=>X(X(Tb(r),([e,t])=>[e,t],()=>X(xb(r),([e,t])=>[e,t],()=>X(bb(r),([e,t])=>[e,t],()=>X(jb(r),([e,t])=>[e,t],()=>[])))),([r,i])=>X(Y(`]`,i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[G_(e),t]),ux=e=>X(X(ox(e),([e,t])=>[e,t],()=>X(sx(e),([e,t])=>[e,t],()=>X(cx(e),([e,t])=>[e,t],()=>X(lx(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[K_(e),t]),dx=e=>X(X(X(Y(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[q_(e),t]),fx=e=>X(X(X(Y(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[J_(e),t]),px=e=>X(X(dx(e),([e,t])=>X(ux(t),([t,n])=>X(fx(n),([n,r])=>X(Y(`:`,r),([r,i])=>X(ax(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Y_(e),t]),mx=e=>X(X(X(Y(`,`,e),([e,t])=>X(Y(`
|
|
14
|
-
`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X(X(Y(`;`,e),([e,t])=>X(Y(`
|
|
15
|
-
`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X(X(Y(`,`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X(X(Y(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X(X(Y(`
|
|
16
|
-
`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))))),([e,t])=>[X_(e),t]),hx=(e,t=[])=>X(X(mx(e),([e,t])=>X(px(t),([t,n])=>[[e,t],n])),([e,n])=>hx(n,[...t,e]),()=>[t,e]),gx=e=>X(X(X(px(e),([e,t])=>X(hx(t),([t,n])=>X(X(mx(n),([e,t])=>[[e],t],()=>[[],n]),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Z_(e),t]),_x=e=>X(X(Y(`{`,e),([e,t])=>X(gx(t),([t,n])=>X(Y(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[$_(e),t]),vx=e=>X(_x(e),([e,t])=>[ev(e),t]),yx=e=>X(X(X(zy(e),([e,t])=>X(Y(`?`,t),([t,n])=>X(Y(`:`,n),([n,r])=>X(Y(`readonly`,r),([r,i])=>X(ax(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[e,t],()=>X(X(zy(e),([e,t])=>X(Y(`:`,t),([t,n])=>X(Y(`readonly`,n),([n,r])=>X(ax(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>X(X(zy(e),([e,t])=>X(Y(`?`,t),([t,n])=>X(Y(`:`,n),([n,r])=>X(ax(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>X(X(zy(e),([e,t])=>X(Y(`:`,t),([t,n])=>X(ax(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>[])))),([e,t])=>[tv(e),t]),bx=e=>X(X(yx(e),([e,t])=>[e,t],()=>X(X(dx(e),([e,t])=>X(ax(t),([t,n])=>X(fx(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>[])),([e,t])=>[nv(e),t]),xx=e=>X(X(X(Y(`...`,e),([e,t])=>X(bx(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X(X(bx(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[rv(e),t]),Sx=(e,t=[])=>X(X(Y(`,`,e),([e,t])=>X(xx(t),([t,n])=>[[e,t],n])),([e,n])=>Sx(n,[...t,e]),()=>[t,e]),Cx=e=>X(X(X(xx(e),([e,t])=>X(Sx(t),([t,n])=>X(X(Y(`,`,n),([e,t])=>[[e],t],()=>[[],n]),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[iv(e),t]),wx=e=>X(X(Y(`[`,e),([e,t])=>X(Cx(t),([t,n])=>X(Y(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[av(e),t]),Tx=e=>X(X(zy(e),([e,t])=>X(Y(`?`,t),([t,n])=>X(Y(`:`,n),([n,r])=>X(Y(`readonly`,r),([r,i])=>X(ax(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[ov(e),t]),Ex=e=>X(X(zy(e),([e,t])=>X(Y(`:`,t),([t,n])=>X(Y(`readonly`,n),([n,r])=>X(ax(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[sv(e),t]),Dx=e=>X(X(zy(e),([e,t])=>X(Y(`?`,t),([t,n])=>X(Y(`:`,n),([n,r])=>X(ax(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[cv(e),t]),Ox=e=>X(X(zy(e),([e,t])=>X(Y(`:`,t),([t,n])=>X(ax(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[lv(e),t]),kx=e=>X(X(Tx(e),([e,t])=>[e,t],()=>X(Ex(e),([e,t])=>[e,t],()=>X(Dx(e),([e,t])=>[e,t],()=>X(Ox(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[uv(e),t]),Ax=e=>X(X(X(Y(`...`,e),([e,t])=>X(kx(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X(X(kx(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[dv(e),t]),jx=(e,t=[])=>X(X(Y(`,`,e),([e,t])=>X(Ax(t),([t,n])=>[[e,t],n])),([e,n])=>jx(n,[...t,e]),()=>[t,e]),Mx=e=>X(X(X(Ax(e),([e,t])=>X(jx(t),([t,n])=>X(X(Y(`,`,n),([e,t])=>[[e],t],()=>[[],n]),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[fv(e),t]),Nx=e=>X(X(Y(`(`,e),([e,t])=>X(Mx(t),([t,n])=>X(Y(`)`,n),([n,r])=>X(Y(`=>`,r),([r,i])=>X(ax(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[pv(e),t]),Px=e=>X(X(Y(`new`,e),([e,t])=>X(Y(`(`,t),([t,n])=>X(Mx(n),([n,r])=>X(Y(`)`,r),([r,i])=>X(Y(`=>`,i),([i,a])=>X(ax(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[mv(e),t]),Fx=e=>X(X(X(Y(`+`,e),([e,t])=>X(Y(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X(X(Y(`-`,e),([e,t])=>X(Y(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X(X(Y(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[gv(e),t]),Ix=e=>X(X(X(Y(`+`,e),([e,t])=>X(Y(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X(X(Y(`-`,e),([e,t])=>X(Y(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X(X(Y(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[vv(e),t]),Lx=e=>X(X(X(Y(`as`,e),([e,t])=>X(ax(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[yv(e),t]),Rx=e=>X(X(Y(`{`,e),([e,t])=>X(Fx(t),([t,n])=>X(Y(`[`,n),([n,r])=>X(zy(r),([r,i])=>X(Y(`in`,i),([i,a])=>X(ax(a),([a,o])=>X(Lx(o),([o,s])=>X(Y(`]`,s),([s,c])=>X(Ix(c),([c,l])=>X(Y(`:`,l),([l,u])=>X(ax(u),([u,d])=>X(yb(d),([d,f])=>X(Y(`}`,f),([f,p])=>[[e,t,n,r,i,a,o,s,c,l,u,d,f],p]))))))))))))),([e,t])=>[bv(e),t]),zx=e=>X(zy(e),([e,t])=>[xv(e),t]),Bx=e=>X(My(e),([e,t])=>[Sv(e),t]),Vx=e=>X(Yy(e),([e,t])=>[Cv(e),t]),Hx=e=>X(X(Y(`true`,e),([e,t])=>[e,t],()=>X(Y(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[wv(e),t]),Ux=e=>X(ab([`"`,`'`],e),([e,t])=>[Tv(e),t]),Wx=e=>X(Y(`null`,e),([e,t])=>[Ev(e),t]),Gx=e=>X(Y(`undefined`,e),([e,t])=>[void 0,t]),Kx=e=>X(X(ux(e),([e,t])=>X(Y(`:`,t),([t,n])=>X($x(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Dv(e),t]),qx=(e,t=[])=>X(X(mx(e),([e,t])=>X(Kx(t),([t,n])=>[[e,t],n])),([e,n])=>qx(n,[...t,e]),()=>[t,e]),Jx=e=>X(X(X(Kx(e),([e,t])=>X(qx(t),([t,n])=>X(X(mx(n),([e,t])=>[[e],t],()=>[[],n]),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Ov(e),t]),Yx=e=>X(X(Y(`{`,e),([e,t])=>X(Jx(t),([t,n])=>X(Y(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Av(e),t]),Xx=(e,t=[])=>X(X(Y(`,`,e),([e,t])=>X($x(t),([t,n])=>[[e,t],n])),([e,n])=>Xx(n,[...t,e]),()=>[t,e]),Zx=e=>X(X(X($x(e),([e,t])=>X(Xx(t),([t,n])=>X(X(Y(`,`,n),([e,t])=>[[e],t],()=>[[],n]),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[jv(e),t]),Qx=e=>X(X(Y(`[`,e),([e,t])=>X(Zx(t),([t,n])=>X(Y(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Mv(e),t]),$x=e=>X(X(Bx(e),([e,t])=>[e,t],()=>X(Vx(e),([e,t])=>[e,t],()=>X(Hx(e),([e,t])=>[e,t],()=>X(Ux(e),([e,t])=>[e,t],()=>X(Wx(e),([e,t])=>[e,t],()=>X(Gx(e),([e,t])=>[e,t],()=>X(Yx(e),([e,t])=>[e,t],()=>X(Qx(e),([e,t])=>[e,t],()=>[])))))))),([e,t])=>[Nv(e),t]),eS=e=>X(Y(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[Pv(e),t]),tS=e=>X(Y(`.*`,e),([e,t])=>[Fv(e),t]),nS=e=>X(Y(`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,e),([e,t])=>[Iv(e),t]),rS=e=>X(Y(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[Lv(e),t]),iS=e=>X(Y(`(?!)`,e),([e,t])=>[Rv(e),t]),aS=e=>X(ob([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[zv(e),t]),oS=e=>X(X(eS(e),([e,t])=>[e,t],()=>X(tS(e),([e,t])=>[e,t],()=>X(nS(e),([e,t])=>[e,t],()=>X(rS(e),([e,t])=>[e,t],()=>X(iS(e),([e,t])=>[e,t],()=>X(sS(e),([e,t])=>[e,t],()=>X(aS(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[Bv(e),t]),sS=e=>X(X(Y(`(`,e),([e,t])=>X(uS(t),([t,n])=>X(Y(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Vv(e),t]),cS=e=>X(X(X(lS(e),([e,t])=>X(Y(`|`,t),([t,n])=>X(cS(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X(X(lS(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[Hv(e),t]),lS=e=>X(X(oS(e),([e,t])=>X(uS(t),([t,n])=>[[e,t],n])),([e,t])=>[Uv(e),t]),uS=e=>X(X(cS(e),([e,t])=>[e,t],()=>X(lS(e),([e,t])=>[e,t],()=>[])),([e,t])=>[Wv(e),t]),dS=e=>X(X(Y(`^`,e),([e,t])=>X(uS(t),([t,n])=>X(Y(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Gv(e),t]),fS=(e,t=[])=>X(X(Y(`,`,e),([e,t])=>X(ax(t),([t,n])=>[[e,t],n])),([e,n])=>fS(n,[...t,e]),()=>[t,e]),pS=e=>X(X(X(ax(e),([e,t])=>X(fS(t),([t,n])=>X(X(Y(`,`,n),([e,t])=>[[e],t],()=>[[],n]),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Kv(e),t]),mS=e=>X(X(X(Y(`extends`,e),([e,t])=>X(pS(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[qv(e),t]),hS=e=>X(X(Y(`interface`,e),([e,t])=>X(zy(t),([t,n])=>X(mb(n),([n,r])=>X(mS(r),([r,i])=>X(_x(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Jv(e),t]),gS=e=>X(X(Y(`interface`,e),([e,t])=>X(zy(t),([t,n])=>X(mS(n),([n,r])=>X(_x(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[Yv(e),t]),_S=e=>X(X(Y(`type`,e),([e,t])=>X(zy(t),([t,n])=>X(mb(n),([n,r])=>X(Y(`=`,r),([r,i])=>X(ax(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Xv(e),t]),vS=e=>X(X(Y(`type`,e),([e,t])=>X(zy(t),([t,n])=>X(Y(`=`,n),([n,r])=>X(ax(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[Zv(e),t]),yS=e=>X(X(X(Y(`export`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Qv(e),t]),bS=e=>X(X(X(Y(`;`,e),([e,t])=>X(Y(`
|
|
17
|
-
`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>X(X(Y(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>X(X(Y(`
|
|
18
|
-
`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[$v(e),t]),xS=(e,t=[])=>X(X(bS(e),([e,t])=>X(CS(t),([t,n])=>[[e,t],n])),([e,n])=>xS(n,[...t,e]),()=>[t,e]),SS=e=>X(X(X(CS(e),([e,t])=>X(xS(t),([t,n])=>X(X(bS(n),([e,t])=>[[e],t],()=>[[],n]),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>X([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[ey(e),t]),CS=e=>X(X(yS(e),([e,t])=>X(X(hS(t),([e,t])=>[e,t],()=>X(gS(t),([e,t])=>[e,t],()=>X(_S(t),([e,t])=>[e,t],()=>X(vS(t),([e,t])=>[e,t],()=>[])))),([t,n])=>X(yb(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ty(e),t]),wS=e=>X(X(CS(e),([e,t])=>X(SS(t),([t,n])=>[[e,t],n])),([e,t])=>[ny(e),t]),TS=e=>X(X(wS(e),([e,t])=>[e,t],()=>X(rx(e),([e,t])=>[e,t],()=>X(ax(e),([e,t])=>[e,t],()=>[]))),([e,t])=>[ry(e),t]);function ES(e){let t=Lb(`\`${e}\``);return V(t.length,2)?t[0]:id()}function DS(e){return e.join(`|`)}function OS(e){return e.slice(1,e.length-1)}function kS(e,t,n){return BS(t,`${n}${e}`)}function AS(e,t){return BS(e,`${t}${vm}`)}function jS(e,t){return BS(e,`${t}${Tm}`)}function MS(e,t){return BS(e,`${t}${Lm}`)}function NS(e,t){return zS(Km([Am(`false`),Am(`true`)]),e,t)}function PS(e,t){return BS(e,`${t}.*`)}function FS(e,t,n){return BS(t,`${n}${OS(e)}`)}function IS(e,t,n){return zS(US(e,{}),t,n)}function LS(e,t,n){return zS(Xh(e),t,n)}function RS(e,t,n,r=[]){return U(e,(e,i)=>RS(i,t,n,[...r,zS(e,[],``)]),()=>BS(t,`${n}(${DS(r)})`))}function zS(e,t,n){return Qp(e)?LS(e.enum,t,n):Dm(e)?jS(t,n):Pm(e)?kS(e.const,t,n):bm(e)?AS(t,n):Sm(e)?NS(t,n):zm(e)?MS(t,n):Gm(e)?PS(t,n):XS(e)?FS(e.pattern,t,n):KS(e)?IS(e.parameters[0],t,n):qm(e)?RS(e.anyOf,t,n):wp}function BS(e,t){return U(e,(e,n)=>zS(e,n,t),()=>t)}function VS(e){return`^${BS(e,``)}$`}function HS(e){return th(VS(e))}function US(e,t){return jk(e)?J(HS(e),{},t):GS(e,t)}function WS(e,t,n,r){return US(Pk(e,t,n),r)}function GS(e,t={}){return tp(`TemplateLiteral`,[e],t)}function KS(e){return ep(e)&&W(e,`action`)&&V(e.action,`TemplateLiteral`)}function qS(e){return US(e,{})}function JS(e){return qS(ES(e))}function YS(e,t={}){return J(ko(e)?JS(e):qS(e),{},t)}function XS(e){return $f(e,`TemplateLiteral`)}var ZS=s({ExtendsFalse:()=>tC,ExtendsTrue:()=>Z,ExtendsUnion:()=>QS,IsExtendsFalse:()=>nC,IsExtendsTrue:()=>eC,IsExtendsTrueLike:()=>rC,IsExtendsUnion:()=>$S,Match:()=>iC});function QS(e){return q({"~kind":`ExtendsUnion`},{inferred:e})}function $S(e){return Oo(e)&&W(e,`~kind`)&&W(e,`inferred`)&&V(e[`~kind`],`ExtendsUnion`)&&Oo(e.inferred)}function Z(e){return q({"~kind":`ExtendsTrue`},{inferred:e})}function eC(e){return Oo(e)&&W(e,`~kind`)&&W(e,`inferred`)&&V(e[`~kind`],`ExtendsTrue`)&&Oo(e.inferred)}function tC(){return q({"~kind":`ExtendsFalse`},{})}function nC(e){return Oo(e)&&W(e,`~kind`)&&V(e[`~kind`],`ExtendsFalse`)}function rC(e){return $S(e)||eC(e)}function iC(e,t,n){return rC(e)?t(e.inferred):n()}function aC(e,t,n,r){return iC(Cw(e,n,r),r=>Z(Ff(Ff(e,r),{[t]:n})),()=>tC())}function oC(e,t){return Z(e)}function sC(e,t,n,r,i){return iC(Cw(e,t,n),e=>iC(Cw(e,t,r),e=>Z(e),()=>tC()),()=>iC(Cw(e,t,i),e=>Z(e),()=>tC()))}function cC(e,t,n){return Cw(e,t,Xh(n))}function lC(e,t,n){return U(n,(n,r)=>iC(Cw(e,t,n),e=>lC(e,t,r),()=>tC()),()=>Z(e))}function uC(e,t,n){return Cw(e,t,Qh(n))}function dC(e,t,n){return U(n,(n,r)=>iC(Cw(e,t,n),e=>Z(e),()=>dC(e,t,r)),()=>tC())}function fC(e,t,n){return Cp(n)?oC(e,t):Kp(n)?sC(e,t,n.if,n.then,n.else):Qp(n)?cC(e,t,n.enum):Wp(n)?aC(e,n.name,t,n.extends):em(n)?lC(e,t,n.allOf):XS(n)?uC(e,t,n.pattern):qm(n)?dC(e,t,n.anyOf):Rp(n)?Z(e):tC()}function pC(e,t,n){return Wp(n)?fC(e,t,n):Cp(n)||Rp(n)?Z(e):QS(e)}function mC(e,t){let n=lm(e),r=lm(t);return n&&r||!n&&r?!0:!(n&&!r)}function hC(e,t,n,r){return up(r)?mC(t,r)?Cw(e,n,r.items):tC():fC(e,t,r)}function gC(e,t,n){return bm(n)?Z(e):fC(e,t,n)}function _C(e,t,n){return Sm(n)?Z(e):fC(e,t,n)}function vC(e,t,n,r,i){let a=Wp(r)?t:r,o=Wp(r)?r:t,s=Ap(t),c=Ap(r);return!s&&c?tC():iC(Cw(e,a,o),e=>xC(e,n,i),()=>tC())}function yC(e,t,n,r){return U(r,(r,i)=>vC(e,t,n,r,i),()=>Ap(t)?Z(e):tC())}function bC(e,t,n){return U(t,(t,r)=>yC(e,t,r,n),()=>Z(e))}function xC(e,t,n){return bC(e,t,n)}function SC(e,t,n){return Lg(n)?Z(e):Cw(e,t,n)}function CC(e,t,n,r){return Cp(r)||Rp(r)?Z(e):pp(r)?iC(xC(e,t,r.parameters),e=>SC(e,n,r.instanceType),()=>tC()):tC()}function wC(e,t,n,r,i){return iC(Cw(e,t,i),()=>Cw(e,n,i),()=>Cw(e,r,i))}function TC(e,t,n){return Cw(e,Xh(t),n)}function EC(e,t,n,r){return Cp(r)||Rp(r)?Z(e):gp(r)?iC(xC(e,t,r.parameters),e=>SC(e,n,r.returnType),()=>tC()):tC()}function DC(e,t,n){return Dm(n)||zm(n)?Z(e):fC(e,t,n)}function OC(e,t,n){return Cw(e,Zh(t),n)}function kC(e,t,n){return t===n?Z(e):tC()}function AC(e,t,n){return Pm(n)?kC(e,t,n.const):bm(n)?Z(e):fC(e,Am(t),n)}function jC(e,t,n){return Pm(n)?kC(e,t,n.const):Sm(n)?Z(e):fC(e,Am(t),n)}function MC(e,t,n){return Pm(n)?kC(e,t,n.const):zm(n)?Z(e):fC(e,Am(t),n)}function NC(e,t,n){return Pm(n)?kC(e,t,n.const):Gm(n)?Z(e):fC(e,Am(t),n)}function PC(e,t,n){return bo(t.const)?AC(e,t.const,n):xo(t.const)?jC(e,t.const,n):Eo(t.const)?MC(e,t.const,n):ko(t.const)?NC(e,t.const,n):id()}function FC(e,t,n){return Wp(n)?fC(e,t,n):Z(e)}function IC(e,t,n){return Im(n)?Z(e):fC(e,t,n)}function LC(e,t,n){return zm(n)?Z(e):fC(e,t,n)}function RC(e,t,n){return Ap(t)?Ap(n)?Z(e):tC():Z(e)}function zC(e,t,n){return Wp(n)&&Ep(n.extends)?tC():iC(Cw(e,t,n),e=>RC(e,t,n),()=>tC())}function BC(e,t){return e.reduce((e,n)=>n in t&&rC(t[n])?{...e,...t[n].inferred}:id(),{})}function VC(e,t,n){let r={};for(let i of G(n))r[i]=i in t?zC({},t[i],n[i]):Ap(n[i])?Wp(n[i])?Z(Ff(e,{[n[i].name]:n[i].extends})):Z(e):tC();let i=qo(r).every(e=>rC(e)),a=i?BC(G(r),r):{};return i?Z(a):tC()}function HC(e,t,n){let r=VC(e,t,n);return rC(r)?Z(Ff(e,r.inferred)):tC()}function UC(e,t,n){return HC(e,t,n)}function WC(e,t){return G(t).reduce((n,r)=>({...n,[r]:W(e,r)?qm(n[r])?Km([...n[r].anyOf,t[r]]):Km([e[r],t[r]]):t[r]}),e)}function GC(e,t,n,r){return U(t,(t,i)=>iC(Cw({},e[t],n),t=>GC(e,i,n,WC(r,t)),()=>tC()),()=>Z(r))}function KC(e,t,n,r){return GC(t,G(t),r,e)}function qC(e,t,n){return kg(n)?KC(e,t,Eg(n),Og(n)):Fp(n)?UC(e,t,n.properties):fC(e,Pp(t),n)}function JC(e,t){return V(G(t).length,0)?Z(e):tC()}function YC(e,t,n,r,i){return Cw(e,n,i)}function XC(e,t,n,r){return kg(r)?YC(e,Tg(t),n,Tg(Eg(r)),Og(r)):Fp(r)?JC(e,r.properties):Cp(r)||Rp(r)?Z(e):tC()}function ZC(e,t,n){return Gm(n)?Z(e):fC(e,t,n)}function QC(e,t,n){return Vm(n)?Z(e):fC(e,t,n)}function $C(e,t,n){return Cw(e,Qh(t),n)}function ew(e,t){return q({"~kind":`Inferrable`},{name:e,type:t},{})}function tw(e){return Oo(e)&&W(e,`~kind`)&&W(e,`name`)&&W(e,`type`)&&V(e[`~kind`],`Inferrable`)&&ko(e.name)&&Oo(e.type)}function nw(e){return jg(e)?Wp(e.items)?up(e.items.extends)?ew(e.items.name,e.items.extends.items):Rp(e.items.extends)?ew(e.items.name,e.items.extends):void 0:id():void 0}function rw(e){return Wp(e)?ew(e.name,e.extends):void 0}function iw(e,t,n=[]){return U(e,(e,r)=>iC(Cw({},e,t),()=>iw(r,t,[...n,e]),()=>void 0),()=>n)}function aw(e,t,n,r){let i=iw(n,r);return B(i)?Z(Ff(e,{[t]:hh(i)})):tC()}function ow(e,t,n,r){let i=iw(n,r);return B(i)?Z(Ff(e,{[t]:Km(i)})):tC()}function sw(e){return[...e].reverse()}function cw(e,t){return t?sw(e):e}function lw(e){let t=e.length>0?e[0]:void 0;return ep(ep(t)?nw(t):void 0)}function uw(e,t,n,r,i,a){return iC(Cw(e,n,i),e=>pw(e,t,r,a),()=>tC())}function dw(e,t,n,r,i){let a=nw(r);return tw(a)?aw(e,a.name,cw(n,t),a.type):U(n,(n,a)=>uw(e,t,n,a,r,i),()=>tC())}function fw(e,t,n,r){return U(r,(r,i)=>dw(e,t,n,r,i),()=>V(n.length,0)?Z(e):tC())}function pw(e,t,n,r){return fw(e,t,n,r)}function mw(e,t,n){let r=Nk(e,Ak([],[]),n),i=lw(r);return pw(e,i,cw(t,i),cw(r,i))}function hw(e,t,n){let r=rw(n);return tw(r)?ow(e,r.name,t,r.type):U(t,(t,r)=>iC(Cw(e,t,n),e=>hw(e,r,n),()=>tC()),()=>Z(e))}function gw(e,t,n){let r=Nk(e,Ak([],[]),t);return gh(n)?mw(e,r,n.items):up(n)?hw(e,r,n.items):fC(e,hh(r),n)}function _w(e,t,n){return Lg(n)||Fg(n)?Z(e):fC(e,t,n)}function vw(e,t,n){return U(n,(n,r)=>iC(Cw(e,t,n),e=>Z(e),()=>vw(e,t,r)),()=>tC())}function yw(e,t,n){return U(t,(t,r)=>iC(vw(e,t,n),e=>yw(e,r,n),()=>tC()),()=>Z(e))}function bw(e,t,n){let r=rw(n);return tw(r)?ow(e,r.name,t,r.type):qm(n)?yw(e,t,n.anyOf):yw(e,t,[n])}function xw(e,t,n){return Wp(n)?fC(e,t,n):Cp(n)||Rp(n)?Z(e):tC()}function Sw(e,t,n){return Lg(n)?Z(e):fC(e,t,n)}function Cw(e,t,n){return Cp(t)?pC(e,t,n):up(t)?hC(e,t,t.items,n):bm(t)?gC(e,t,n):Sm(t)?_C(e,t,n):pp(t)?CC(e,t.parameters,t.instanceType,n):Kp(t)?wC(e,t.if,t.then,t.else,n):Qp(t)?TC(e,t.enum,n):gp(t)?EC(e,t.parameters,t.returnType,n):Dm(t)?DC(e,t,n):em(t)?OC(e,t.allOf,n):Pm(t)?PC(e,t,n):Ep(t)?FC(e,t,n):Im(t)?IC(e,t,n):zm(t)?LC(e,t,n):Fp(t)?qC(e,t.properties,n):kg(t)?XC(e,Eg(t),Og(t),n):Gm(t)?ZC(e,t,n):Vm(t)?QC(e,t,n):XS(t)?$C(e,t.pattern,n):gh(t)?gw(e,t.items,n):Fg(t)?_w(e,t,n):qm(t)?bw(e,t.anyOf,n):Rp(t)?xw(e,t,n):Lg(t)?Sw(e,t,n):tC()}function ww(e,t){return Zh([...e,Pp(t)])}function Tw(e,t,n){return jk(e)?J(ww(e,t),{},n):Dw(e,t,n)}function Ew(e,t,n,r,i){return Tw(Pk(e,t,n),Mk(e,t,r),i)}function Dw(e,t,n={}){return tp(`Interface`,[e,t],n)}function Ow(e){return ep(e)&&W(e,`action`)&&V(e.action,`Interface`)}function kw(e,t,n={}){return Tw(e,t,n)}function Aw(e,t,n){return e.includes(n)?!0:Nw([...e,n],t,t[n])}function jw(e,t,n){return Mw(e,t,Np(n))}function Mw(e,t,n){return U(n,(n,r)=>Nw(e,t,n)?!0:Mw(e,t,r),()=>!1)}function Nw(e,t,n){return yp(n)?Aw(e,t,n.$ref):up(n)?Nw(e,t,n.items):pp(n)?Mw(e,t,[...n.parameters,n.instanceType]):gp(n)?Mw(e,t,[...n.parameters,n.returnType]):Ow(n)?jw(e,t,n.parameters[1]):em(n)?Mw(e,t,n.allOf):Fp(n)?jw(e,t,n.properties):qm(n)?Mw(e,t,n.anyOf):gh(n)?Mw(e,t,n.items):kg(n)?Nw(e,t,Og(n)):!1}function Pw(e,t,n){return Nw(e,t,n)}function Fw(e,t){return t.reduce((t,n)=>Pw([n],e,e[n])?[...t,n]:t,[])}function Iw(e){return Fw(e,Mp(e))}function Lw(e,t,n){return n.includes(t)?n:t in e?Bw(e,e[t],[...n,t]):id()}function Rw(e,t,n){return zw(e,Np(t),n)}function zw(e,t,n){return t.reduce((t,n)=>Bw(e,n,t),n)}function Bw(e,t,n){return yp(t)?Lw(e,t.$ref,n):up(t)?Bw(e,t.items,n):pp(t)?zw(e,[...t.parameters,t.instanceType],n):gp(t)?zw(e,[...t.parameters,t.returnType],n):Ow(t)?Rw(e,t.parameters[1],n):em(t)?zw(e,t.allOf,n):Fp(t)?Rw(e,t.properties,n):qm(t)?zw(e,t.anyOf,n):gh(t)?zw(e,t.items,n):kg(t)?Bw(e,Og(t),n):n}function Vw(e,t,n){return Bw(e,n,[t])}function Hw(e){return Sp()}function Uw(e){return G(e).reduce((t,n)=>({...t,[n]:Gw(e[n])}),{})}function Ww(e){return e.reduce((e,t)=>[...e,Gw(t)],[])}function Gw(e){return yp(e)?Hw(e.$ref):up(e)?lp(Gw(e.items),dp(e)):pp(e)?fp(Ww(e.parameters),Gw(e.instanceType)):gp(e)?hp(Ww(e.parameters),Gw(e.returnType)):em(e)?$p(Ww(e.allOf)):Fp(e)?Pp(Uw(e.properties)):kg(e)?Cg(Dg(e),Gw(Og(e))):qm(e)?Km(Ww(e.anyOf)):gh(e)?hh(Ww(e.items)):e}function Kw(e,t){return t in e?Gw(e[t]):Lp()}function qw(e){return Kw(e.$defs,e.$ref)}function Jw(e,t,n){let r=Pk(e,Ak([],[]),t),i=Mk({},Ak([],[]),n);return Zh([...r,Pp(i)])}function Yw(e,t){return G(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=Ow(r)?Jw(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function Xw(e,t,n){return zp(Yw(e,Vw(e,t,n)),t)}function Zw(e,t){return t in e?yp(e[t])?Zw(e,e[t].$ref):e[t]:Tp()}function Qw(e,t){return Zw(e,t)}function $w(e){return Bp(e)?qw(e):Hp(e)?Lp():e}function eT(e,t,n){return Cw(e,$w(t),$w(n))}function tT(e,t){let n=[eT({},e,t),eT({},t,e)];return rC(n[0])&&rC(n[1])?0:rC(n[0])&&nC(n[1])?2:nC(n[0])&&rC(n[1])?3:1}function nT(e,t,n=[],r=t){return U(t,(t,i)=>{let a=tT(e,t);return V(a,2)||V(a,0)?r:V(a,1)?nT(e,i,[...n,t],r):nT(e,i,n,r)},()=>[...n,e])}function rT(e,t,n){let r=eg(e);return Cp(r)||Rp(r)?[r]:Ep(r)?iT(t,n):Fp(r)?iT(t,[...n,r]):iT(t,nT(r,n))}function iT(e,t=[]){return U(e,(e,n)=>rT(e,n,t),()=>t)}function aT(e){return ug(iT(e))}function oT(e,t){return J(eg(e),{},t)}function sT(e,t,n,r){return oT(Q(e,t,n),r)}function cT(e,t=[]){return np(e)&&V(e.action,`Conditional`)?yp(e.parameters[0])?cT(e.parameters[2],cT(e.parameters[3],[...t,e.parameters[0].$ref])):cT(e.parameters[2],cT(e.parameters[3],t)):np(e)&&V(e.action,`Mapped`)&&np(e.parameters[1])&&V(e.parameters[1].action,`KeyOf`)&&yp(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function lT(e,t){return e.reduce((e,n)=>[...e,t.includes(n.name)],[])}function uT(e,t,n=[]){return U(e,(e,r)=>U(t,(t,i)=>uT(r,i,[...n,[t,e]]),()=>n),()=>n)}function dT(e){return XS(e)?Qh(e.pattern):Qp(e)?Xh(e.enum):e}function fT(e){let t=dT(e);return qm(t)?[...t.anyOf]:[t]}function pT(e,t){return e.reduce((e,n)=>[...e,[...n,t]],[])}function mT(e,t){return t.reduce((t,n)=>[...t,...pT(e,n)],[])}function hT(e){return e.reduce((e,t)=>V(t[0],!0)?mT(e,fT(t[1])):mT(e,[t[1]]),[[]])}function gT(e,t,n){let r=uT(t,lT(e,cT(n)));return np(n)&&V(n.action,`Conditional`)||np(n)&&V(n.action,`Mapped`)?hT(r):[t]}function _T(){return[`(not-resolvable)`,Tp()]}function vT(){return[`(not-generic)`,Tp()]}function yT(e,t,n){return[e,bp(t,n)]}function bT(e,t,n){return t in e?xT(e,t,e[t],n):_T()}function xT(e,t,n,r){return xp(n)?yT(t,n.parameters,n.expression):yp(n)?bT(e,n.$ref,r):vT()}function ST(e,t,n){return xT(e,`(anonymous)`,t,n)}function CT(e,t,n){if(Wp(t)||VT(t)||rC(eT({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function wT(e,t,n,r,i){let a=Q(e,t,i);return CT(n,a,r),Ff(e,{[n]:a})}function TT(e,t,n,r,i){let a=Q(e,t,n.extends),o=Q(e,t,n.equals);return U(i,(i,o)=>ET(wT(e,t,n.name,a,i),t,r,o),()=>ET(wT(e,t,n.name,a,o),t,r,[]))}function ET(e,t,n,r){return U(n,(n,i)=>TT(e,t,n,i,r),()=>e)}function DT(e,t,n,r){return ET(e,t,n,r)}var OT=0,kT=0;function AT(){if(!No(kT,os().maxInstantiationCount))throw Error(`Type instantiation is excessively deep and possibly infinite`)}function jT(){AT(),kT++,OT++}function MT(){OT--,V(OT,0)&&(kT=0)}function NT(e){return Mo(e.callstack.length,0)?e.callstack[e.callstack.length-1]:``}function PT(e,t){return V(NT(e),t)}function FT(e,t,n,r,i,a){jT();try{let o=DT(e,t,r,a),s=Q(o,Ak([...t.callstack,n.$ref],t.visited),i);return Q(o,Ak([],[]),s)}finally{MT()}}function IT(e,t,n,r,i,a){return a.reduce((a,o)=>{let s=FT(e,t,n,r,i,o);return[...a,s]},[])}function LT(e,t,n,r,i,a){let o=IT(e,t,n,r,i,gT(r,a,i));return V(o.length,1)?o[0]:$h(o)}function RT(e,t,n,r){let i=Pk(e,t,r),a=ST(e,n,r),o=a[0],s=a[1];return xp(s)?PT(t,o)?zT(vp(o),i):LT(e,t,vp(o),s.parameters,s.expression,i):zT(n,i)}function zT(e,t){return q({"~kind":`Call`},{type:`call`,target:e,arguments:t},{})}function BT(e,t){return RT({},Ak([],[]),e,t)}function VT(e){return $f(e,`Call`)}function HT(e){return Xf(e,[`~immutable`])}function UT(e,t){return J(HT(e),{},t)}function WT(e,t,n,r){return UT(Q(e,t,n),r)}function GT(e,t){return e(t)}function KT(e,t){return ko(t)?Am(GT(e,t)):Am(t)}function qT(e,t){return YT(e,Qh(t))}function JT(e,t){return Km(t.map(t=>YT(e,t)))}function YT(e,t){return Pm(t)?KT(e,t.const):XS(t)?qT(e,t.pattern):qm(t)?JT(e,t.anyOf):t}function XT(e,t={}){return tp(`Capitalize`,[e],t)}function ZT(e,t={}){return cE(e,t)}function QT(e,t={}){return tp(`Lowercase`,[e],t)}function $T(e,t={}){return lE(e,t)}function eE(e,t={}){return tp(`Uncapitalize`,[e],t)}function tE(e,t={}){return uE(e,t)}function nE(e,t={}){return tp(`Uppercase`,[e],t)}function rE(e,t={}){return dE(e,t)}var iE=e=>e[0].toUpperCase()+e.slice(1),aE=e=>e.toLowerCase(),oE=e=>e[0].toLowerCase()+e.slice(1),sE=e=>e.toUpperCase();function cE(e,t){return jk([e])?J(YT(iE,e),{},t):XT(e,t)}function lE(e,t){return jk([e])?J(YT(aE,e),{},t):QT(e,t)}function uE(e,t){return jk([e])?J(YT(oE,e),{},t):eE(e,t)}function dE(e,t){return jk([e])?J(YT(sE,e),{},t):nE(e,t)}function fE(e,t,n,r){return cE(Q(e,t,n),r)}function pE(e,t,n,r){return lE(Q(e,t,n),r)}function mE(e,t,n,r){return uE(Q(e,t,n),r)}function hE(e,t,n,r){return dE(Q(e,t,n),r)}function gE(e,t,n,r,i={}){return tp(`Conditional`,[e,t,n,r],i)}function _E(e,t,n,r,i={}){return yE({},Ak([],[]),e,t,n,r,i)}function vE(e,t,n,r,i,a){let o=eT(e,n,r);return $S(o)?Km([Q(o.inferred,t,i),Q(e,t,a)]):eC(o)?Q(o.inferred,t,i):Q(e,t,a)}function yE(e,t,n,r,i,a,o){return jk([n,r])?J(vE(e,t,n,r,i,a),{},o):gE(n,r,i,a,o)}function bE(e,t,n,r,i,a,o){return yE(e,t,Q(e,t,n),Q(e,t,r),i,a,o)}function xE(e,t={}){return tp(`ConstructorParameters`,[e],t)}function SE(e,t={}){return wE(e,t)}function CE(e){let t=pp(e)?e.parameters:[];return hh(Nk({},Ak([],[]),t))}function wE(e,t){return jk([e])?J(CE(e),{},t):xE(e,t)}function TE(e,t,n,r){return wE(Q(e,t,n),r)}function EE(e,t,n={}){return tp(`Exclude`,[e,t],n)}function DE(e,t,n={}){return OE(e,t,n)}function OE(e,t,n){return jk([e,t])?J(Jh(e,t),{},n):EE(e,t,n)}function kE(e,t,n,r,i){return OE(Q(e,t,n),Q(e,t,r),i)}function AE(e,t,n={}){return tp(`Extract`,[e,t],n)}function jE(e,t,n={}){return FE(e,t,n)}function ME(e,t){return rC(eT({},e,t))?[e]:[]}function NE(e,t,n=[]){return U(e,(e,r)=>NE(r,t,[...n,...ME(e,t)]),()=>n)}function PE(e,t){let n=eg(e);return $h(NE(qm(n)?n.anyOf:[n],t))}function FE(e,t,n){return jk([e,t])?J(PE(e,t),{},n):AE(e,t,n)}function IE(e,t,n,r,i){return FE(Q(e,t,n),Q(e,t,r),i)}function LE(e){return e.reduce((e,t)=>jm(t)?[...e,Am(t)]:e,[])}function RE(e){return Km(LE(e))}function zE(e,t,n={}){return tp(`Index`,[e,t],n)}function BE(e,t,n={}){return MD(e,B(t)?RE(t):t,n)}function VE(e,t){return XE(Qw(e,t))}function HE(e,t,n){return XE(Yh(e,t,n))}function UE(e,t){let n=G(e).filter(e=>!W(t,e)),r=G(t).filter(t=>!W(e,t)),i=G(e).filter(e=>W(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:Zh([e[r],t[r]])}),{});return Ff(Ff(a,o),s)}function WE(e){return e.reduce((e,t)=>UE(e,XE(t)),{})}function GE(e){return e}function KE(e){return XE(kh(hh(e)))}function qE(e,t){return G(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:$h([e[r],t[r]])}),{})}function JE(e,t){return U(e,(e,n)=>JE(n,qE(t,XE(e))),()=>t)}function YE(e){return U(e,(e,t)=>JE(t,XE(e)),()=>id())}function XE(e){return Bp(e)?VE(e.$defs,e.$ref):Kp(e)?HE(e.if,e.then,e.else):em(e)?WE(e.allOf):qm(e)?YE(e.anyOf):gh(e)?KE(e.items):Fp(e)?GE(e.properties):{}}function ZE(e){return Pp(XE(e))}var QE=RegExp(`^(?:0|[1-9][0-9]*)$`);function $E(e){let t=`${e}`;return QE.test(t)?parseInt(t):e}function eD(e){return Am($E(e))}function tD(e){return e.map(e=>nD(e))}function nD(e){return em(e)?$p(tD(e.allOf)):qm(e)?Km(tD(e.anyOf)):Pm(e)?eD(e.const):e}function rD(e,t){return rC(eT({},nD(t),Rm()))?e:Pm(t)&&V(t.const,`length`)?Rm():Tp()}function iD(e,t){return dD(Qw(e,t))}function aD(e,t,n){return dD(Yh(e,t,n))}function oD(e){return dD(Xh(e))}function sD(e){return dD(Zh(e))}function cD(e){return[`${e}`]}function lD(e){return dD(Qh(e))}function uD(e){return e.reduce((e,t)=>[...e,...dD(t)],[])}function dD(e){return Bp(e)?iD(e.$defs,e.$ref):Kp(e)?aD(e.if,e.then,e.else):Qp(e)?oD(e.enum):em(e)?sD(e.allOf):Pm(e)?cD(e.const):XS(e)?lD(e.pattern):qm(e)?uD(e.anyOf):[]}function fD(e){return dD(e)}function pD(e,t){return t.map(t=>mD(e,t))}function mD(e,t){return up(t)?lp(mD(e,t.items)):pp(t)?fp(pD(e,t.parameters),mD(e,t.instanceType)):gp(t)?hp(pD(e,t.parameters),mD(e,t.returnType)):gh(t)?hh(pD(e,t.items)):qm(t)?Km(pD(e,t.anyOf)):em(t)?$p(pD(e,t.allOf)):Ng(t)?Pp(e):t}function hD(e,t){return mD(e,t)}function gD(e,t){return hD(e,t in e?e[t]:Tp())}function _D(e,t){return t.reduce((t,n)=>[...t,gD(e,n)],[])}function vD(e,t){return $h(_D(e,fD(t)))}var yD=new RegExp(yg);function bD(e){return e.filter(e=>yD.test(e))}function xD(e){return $h(_D(e,bD(Mp(e))))}function SD(e,t){return zm(t)?xD(e):vD(e,t)}function CD(e){return Am($E(e))}function wD(e){return e.map(e=>TD(e))}function TD(e){return em(e)?$p(wD(e.allOf)):qm(e)?Km(wD(e.anyOf)):Pm(e)?CD(e.const):e}function ED(e,t){return e.reduceRight((e,n,r)=>rC(eT({},Am(r),t))?[n,...e]:e,[])}function DD(e,t){return tg(ED(e,TD(t)))}function OD(e){return tg(e)}function kD(e,t){return Pm(t)&&V(t.const,`length`)?Am(e.length):zm(t)||Dm(t)?OD(e):DD(e,t)}function AD(e,t){return up(e)?rD(e.items,t):Fp(e)?SD(e.properties,t):gh(e)?kD(e.items,t):Tp()}function jD(e){return Bp(e)||Kp(e)||em(e)||qm(e)?ZE(e):e}function MD(e,t,n){return jk([e,t])?J(AD(jD(e),t),{},n):zE(e,t,n)}function ND(e,t,n,r,i){return MD(Q(e,t,n),Q(e,t,r),i)}function PD(e,t={}){return tp(`InstanceType`,[e],t)}function FD(e,t={}){return LD(e,t)}function ID(e){return pp(e)?e.instanceType:Tp()}function LD(e,t){return jk([e])?J(ID(e),{},t):PD(e,t)}function RD(e,t,n,r={}){return LD(Q(e,t,n),r)}function zD(e,t={}){return tp(`KeyOf`,[e],t)}function BD(e,t={}){return YD(e,t)}function VD(){return Km([Rm(),Wm(),Bm()])}function HD(e){return Rm()}function UD(e){return e.reduce((e,t)=>jm(t)?[...e,Am($E(t))]:id(),[])}function WD(e){return tg(UD(G(e)))}function GD(e){return Dg(e)}function KD(e){return tg(e.map((e,t)=>Am(t)))}function qD(e){return Cp(e)?VD():up(e)?HD(e.items):Fp(e)?WD(e.properties):kg(e)?GD(e):gh(e)?KD(e.items):Tp()}function JD(e){return Bp(e)||Kp(e)||em(e)||qm(e)?ZE(e):e}function YD(e,t){return jk([e])?J(qD(JD(e)),{},t):zD(e,t)}function XD(e,t,n,r){return YD(Q(e,t,n),r)}function ZD(e,t,n,r,i={}){return tp(`Mapped`,[e,t,n,r],i)}function QD(e,t,n,r,i={}){return uO({},Ak([],[]),e,t,n,r,i)}function $D(e){return rO(Qh(e))}function eO(e){return e.reduce((e,t)=>[...e,...rO(t)],[])}function tO(e){return rO(Xh(e))}function nO(e){return Eo(e)?[Am(`${e}`)]:[Am(e)]}function rO(e){return Qp(e)?tO(e.enum):Pm(e)?nO(e.const):XS(e)?$D(e.pattern):qm(e)?eO(e.anyOf):[e]}function iO(e){return rO(e)}function aO(e){return XS(e)?Qh(e.pattern):e}function oO(e,t,n,r,i,a){let o=Ff(e,{[n.name]:r}),s=aO(Q(o,t,i)),c=Q(o,t,a);return Mm(s)||Nm(s)?{[s.const]:c}:{}}function sO(e,t,n,r,i,a){return r.reduce((r,o)=>[...r,oO(e,t,n,o,i,a)],[])}function cO(e){return e.reduce((e,t)=>[...e,Pp(t)],[])}function lO(e,t,n,r,i,a){return Zh(cO(sO(e,t,n,iO(r),i,a)))}function uO(e,t,n,r,i,a,o){return jk([r])?J(lO(e,t,n,r,i,a),{},o):ZD(n,r,i,a,o)}function dO(e,t,n,r,i,a,o){return uO(e,t,n,Q(e,t,r),i,a,o)}function fO(e,t,n){let r=Ff(e,t);return G(t).filter(e=>n.includes(e)).reduce((e,n)=>({...e,[n]:Xw(r,n,t[n])}),{})}function pO(e,t,n){let r=Ff(e,t);return G(t).filter(e=>!n.includes(e)).reduce((e,n)=>({...e,[n]:Q(r,Ak([],[]),t[n])}),{})}function mO(e,t,n){let r=Iw(t),i=fO(e,t,r),a=pO(e,t,r);return J({...i,...a},{},n)}function hO(e,t,n,r){return mO(e,n,r)}function gO(e,t={}){return tp(`NonNullable`,[e],t)}function _O(e,t={}){return yO(e,t)}function vO(e){return OE(e,Km([Fm(),Pg()]),{})}function yO(e,t){return jk([e])?J(vO(e),{},t):gO(e,t)}function bO(e,t,n,r){return yO(Q(e,t,n),r)}function xO(e,t,n={}){return tp(`Omit`,[e,t],n)}function SO(e,t,n={}){return EO(e,B(t)?RE(t):t,n)}function CO(e){let t=ZE(e);return Fp(t)?t.properties:id()}function wO(e,t){return G(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function TO(e,t){return Pp(wO(CO(e),fD(t)))}function EO(e,t,n){return jk([e,t])?J(TO(e,t),{},n):xO(e,t,n)}function DO(e,t,n,r,i){return EO(Q(e,t,n),Q(e,t,r),i)}function OO(e,t={}){return tp(`Parameters`,[e],t)}function kO(e,t={}){return jO(e,t)}function AO(e){let t=gp(e)?e.parameters:[];return hh(Nk({},Ak([],[]),t))}function jO(e,t){return jk([e])?J(AO(e),{},t):OO(e,t)}function MO(e,t,n,r){return jO(Q(e,t,n),r)}function NO(e,t={}){return tp(`Partial`,[e],t)}function PO(e,t={}){return VO(e,t)}function FO(e,t){let n=BO(Qw(e,t));return zp(Ff(e,{[t]:n}),t)}function IO(e,t,n){return BO(Yh(e,t,n))}function LO(e){return BO(Zh(e))}function RO(e){return Km(e.map(e=>BO(e)))}function zO(e){return Pp(G(e).reduce((t,n)=>({...t,[n]:Op(e[n])}),{}))}function BO(e){return Bp(e)?FO(e.$defs,e.$ref):Kp(e)?IO(e.if,e.then,e.else):em(e)?LO(e.allOf):qm(e)?RO(e.anyOf):Fp(e)?zO(e.properties):Pp({})}function VO(e,t){return jk([e])?J(BO(e),{},t):NO(e,t)}function HO(e,t,n,r){return VO(Q(e,t,n),r)}function UO(e,t,n={}){return tp(`Pick`,[e,t],n)}function WO(e,t,n={}){return qO(e,B(t)?RE(t):t,n)}function GO(e,t){return G(e).reduce((n,r)=>t.includes(r)?Ff(n,{[r]:e[r]}):n,{})}function KO(e,t){return Pp(GO(CO(e),fD(t)))}function qO(e,t,n){return jk([e,t])?J(KO(e,t),{},n):UO(e,t,n)}function JO(e,t,n,r,i){return qO(Q(e,t,n),Q(e,t,r),i)}function YO(e,t={}){return tp(`ReadonlyObject`,[e],t)}function XO(e,t={}){return ok(e,t)}var ZO=XO;function QO(e){return Uk(lp(e))}function $O(e,t){let n=ak(Qw(e,t));return zp(Ff(e,{[t]:n}),t)}function ek(e,t,n){return ak(Yh(e,t,n))}function tk(e){return ak(Zh(e))}function nk(e){return Pp(G(e).reduce((t,n)=>({...t,[n]:dm(e[n])}),{}))}function rk(e){return Uk(hh(e))}function ik(e){return Km(e.map(e=>ak(e)))}function ak(e){return up(e)?QO(e.items):Bp(e)?$O(e.$defs,e.$ref):Kp(e)?ek(e.if,e.then,e.else):em(e)?tk(e.allOf):Fp(e)?nk(e.properties):gh(e)?rk(e.items):qm(e)?ik(e.anyOf):e}function ok(e,t){return jk([e])?J(ak(e),{},t):YO(e)}function sk(e,t,n,r){return ok(Q(e,t,n),r)}function ck(e,t,n,r){return t.visited.includes(r)?n:r in e?Q(e,Ak(t.callstack,[...t.visited,r]),e[r]):n}function lk(e,t){let n=mk(Qw(e,t));return zp(Ff(e,{[t]:n}),t)}function uk(e,t,n){return mk(Yh(e,t,n))}function dk(e){return mk(Zh(e))}function fk(e){return Km(e.map(e=>mk(e)))}function pk(e){return Pp(G(e).reduce((t,n)=>({...t,[n]:Dh(e[n])}),{}))}function mk(e){return Bp(e)?lk(e.$defs,e.$ref):Kp(e)?uk(e.if,e.then,e.else):em(e)?dk(e.allOf):qm(e)?fk(e.anyOf):Fp(e)?pk(e.properties):Pp({})}function hk(e,t={}){return tp(`Required`,[e],t)}function gk(e,t={}){return _k(e,t)}function _k(e,t){return jk([e])?J(mk(e),{},t):hk(e,t)}function vk(e,t,n,r){return _k(Q(e,t,n),r)}function yk(e,t={}){return tp(`ReturnType`,[e],t)}function bk(e,t={}){return Sk(e,t)}function xk(e){return gp(e)?e.returnType:Tp()}function Sk(e,t){return jk([e])?J(xk(e),{},t):yk(e,t)}function Ck(e,t,n,r={}){return Sk(Q(e,t,n),r)}function wk(e,t){return tp(`With`,[e,t],{})}function Tk(e,t){return Ek(e,t)}function Ek(e,t){return jk([e])?J(e,{},t):wk(e,t)}function Dk(e,t,n,r){return Ek(Q(e,t,n),r)}function Ok(e){return jg(e)?gh(e.items)?kk(e.items.items):Wp(e.items)||yp(e.items)?[e]:[Tp()]:[e]}function kk(e){return e.reduce((e,t)=>[...e,...Ok(t)],[])}function Ak(e,t){return{callstack:e,visited:t}}function jk(e){return U(e,(e,t)=>!yp(e)&&jk(t),()=>!0)}function Mk(e,t,n){return G(n).reduce((r,i)=>({...r,[i]:Q(e,t,n[i])}),{})}function Nk(e,t,n){return kk(Pk(e,t,n))}function Pk(e,t,n){return n.map(n=>Q(e,t,n))}function Fk(e,t){let n=Ap(e)?sp(t,{}):t,r=pm(e)?ip(n,{}):n;return lm(e)?Bk(r,{}):r}function Ik(e,t,n,r,i){return V(n,`AddImmutable`)?Vk(e,t,r[0],i):V(n,`RemoveImmutable`)?WT(e,t,r[0],i):V(n,`AddReadonly`)?ap(e,t,r[0],i):V(n,`RemoveReadonly`)?bh(e,t,r[0],i):V(n,`AddOptional`)?cp(e,t,r[0],i):V(n,`RemoveOptional`)?Th(e,t,r[0],i):V(n,`Capitalize`)?fE(e,t,r[0],i):V(n,`Conditional`)?bE(e,t,r[0],r[1],r[2],r[3],i):V(n,`ConstructorParameters`)?TE(e,t,r[0],i):V(n,`Evaluate`)?sT(e,t,r[0],i):V(n,`Exclude`)?kE(e,t,r[0],r[1],i):V(n,`Extract`)?IE(e,t,r[0],r[1],i):V(n,`Index`)?ND(e,t,r[0],r[1],i):V(n,`InstanceType`)?RD(e,t,r[0],i):V(n,`Interface`)?Ew(e,t,r[0],r[1],i):V(n,`KeyOf`)?XD(e,t,r[0],i):V(n,`Lowercase`)?pE(e,t,r[0],i):V(n,`Mapped`)?dO(e,t,r[0],r[1],r[2],r[3],i):V(n,`Module`)?hO(e,t,r[0],i):V(n,`NonNullable`)?bO(e,t,r[0],i):V(n,`Pick`)?JO(e,t,r[0],r[1],i):V(n,`Parameters`)?MO(e,t,r[0],i):V(n,`Partial`)?HO(e,t,r[0],i):V(n,`Omit`)?DO(e,t,r[0],r[1],i):V(n,`ReadonlyObject`)?sk(e,t,r[0],i):V(n,`Record`)?vg(e,t,r[0],r[1],i):V(n,`Required`)?vk(e,t,r[0],i):V(n,`ReturnType`)?Ck(e,t,r[0],i):V(n,`TemplateLiteral`)?WS(e,t,r[0],i):V(n,`Uncapitalize`)?mE(e,t,r[0],i):V(n,`Uppercase`)?hE(e,t,r[0],i):V(n,`With`)?Dk(e,t,r[0],r[1]):tp(n,r,i)}function Lk(e,t,n){return Fk(n,yp(n)?ck(e,t,n,n.$ref):up(n)?lp(Q(e,t,n.items),dp(n)):VT(n)?RT(e,t,n.target,n.arguments):pp(n)?fp(Pk(e,t,n.parameters),Q(e,t,n.instanceType),mp(n)):gp(n)?hp(Pk(e,t,n.parameters),Q(e,t,n.returnType),_p(n)):Kp(n)?Gp(Q(e,t,n.if),Q(e,t,n.then),Q(e,t,n.else),qp(n)):em(n)?$p(Pk(e,t,n.allOf),tm(n)):Fp(n)?Pp(Mk(e,t,n.properties),Ip(n)):kg(n)?wg(Eg(n),Q(e,t,Og(n))):jg(n)?Ag(Q(e,t,n.items)):gh(n)?hh(Nk(e,t,n.items),_h(n)):qm(n)?Km(Pk(e,t,n.anyOf),Jm(n)):n)}function Q(e,t,n){return np(n)?Ik(e,t,n.action,n.parameters,n.options):Lk(e,t,n)}function Rk(e,t){return Q(e,Ak([],[]),t)}function zk(e){return J(e,{"~immutable":!0},{})}function Bk(e,t){return J(zk(e),{},t)}function Vk(e,t,n,r){return Bk(Q(e,t,n),r)}function Hk(e,t={}){return tp(`AddImmutable`,[e],t)}function Uk(e,t={}){return Bk(e,t)}function Wk(e,t={}){return tp(`Evaluate`,[e],t)}function Gk(e,t={}){return oT(e,t)}function Kk(e,t={}){return tp(`Module`,[e],t)}function qk(e,t={}){return hO({},Ak([],[]),e,t)}function Jk(...e){let[t,n,r]=io(e,{2:(e,t)=>ko(e)?[{},e,t]:[e,t,{}],3:(e,t,n)=>[e,t,n],1:e=>[{},e,{}]}),i=TS(n);return J(B(i)&&V(i.length,2)?Q(t,Ak([],[]),i[0]):Tp(),{},r)}BigInt(2**53-1),BigInt(-(2**53-1)),Km([Pp({type:Am(`insert`),path:Wm(),value:Lp()}),Object({type:Am(`update`),path:Wm(),value:Lp()}),Pp({type:Am(`delete`),path:Wm()})]);var Yk=4,Xk=4294967295,Zk=65536,Qk=class extends Error{constructor(e){super(e),this.name=`FrameError`}};function $k(e){let t=e?.maxFrameLength??16777216;if(!Number.isSafeInteger(t)||t<0||t>Xk)throw RangeError(`maxFrameLength must be an integer between 0 and ${Xk}`);return t}function eA(e){if(!(e instanceof Uint8Array))throw TypeError(`Frame payload must be a Uint8Array`);if(e.byteLength>Xk)throw RangeError(`Frame payload exceeds the unsigned 32-bit length limit`);let t=new Uint8Array(Yk+e.byteLength),n=e.byteLength;return t[0]=n>>>24,t[1]=n>>>16,t[2]=n>>>8,t[3]=n,t.set(e,Yk),t}var tA=class{header=new Uint8Array(Yk);headerLength=0;maxFrameLength;payloadBlocks=[];currentPayloadBlock;currentPayloadBlockLength=0;expectedPayloadLength;payloadLength=0;state=`open`;constructor(e){this.maxFrameLength=$k(e)}push(e){if(this.state===`ended`)throw new Qk(`Frame decoder has ended`);if(this.state===`failed`)throw new Qk(`Frame decoder has failed`);if(!(e instanceof Uint8Array))throw TypeError(`Frame chunk must be a Uint8Array`);let t=[],n=0;for(;n<e.byteLength;){if(this.expectedPayloadLength===void 0){let r=Math.min(Yk-this.headerLength,e.byteLength-n);if(this.header.set(e.subarray(n,n+r),this.headerLength),this.headerLength+=r,n+=r,this.headerLength<Yk)continue;let i=this.header[0]*16777216+this.header[1]*65536+this.header[2]*256+this.header[3];if(this.headerLength=0,i>this.maxFrameLength&&this.fail(`Frame length ${i} exceeds configured limit of ${this.maxFrameLength}`),i===0){t.push(new Uint8Array);continue}this.expectedPayloadLength=i,this.payloadBlocks=[],this.currentPayloadBlock=void 0,this.currentPayloadBlockLength=0,this.payloadLength=0}let r=this.expectedPayloadLength;if(r!==void 0){for(;n<e.byteLength&&this.payloadLength<r;){let t=this.currentPayloadBlock;(!t||this.currentPayloadBlockLength===t.byteLength)&&(t=new Uint8Array(Math.min(Zk,r-this.payloadLength)),this.payloadBlocks.push(t),this.currentPayloadBlock=t,this.currentPayloadBlockLength=0);let i=Math.min(t.byteLength-this.currentPayloadBlockLength,e.byteLength-n);t.set(e.subarray(n,n+i),this.currentPayloadBlockLength),this.currentPayloadBlockLength+=i,this.payloadLength+=i,n+=i}if(this.payloadLength===r){if(this.payloadBlocks.length===1)t.push(this.payloadBlocks[0]);else{let e=new Uint8Array(r),n=0;for(let t of this.payloadBlocks)e.set(t,n),n+=t.byteLength;t.push(e)}this.payloadBlocks=[],this.currentPayloadBlock=void 0,this.currentPayloadBlockLength=0,this.expectedPayloadLength=void 0,this.payloadLength=0}}}return t}end(){if(this.state===`ended`)throw new Qk(`Frame decoder has ended`);if(this.state===`failed`)throw new Qk(`Frame decoder has failed`);(this.headerLength!==0||this.expectedPayloadLength!==void 0)&&this.fail(`Truncated frame at end of stream`),this.state=`ended`}fail(e){throw this.state=`failed`,this.headerLength=0,this.payloadBlocks=[],this.currentPayloadBlock=void 0,this.currentPayloadBlockLength=0,this.expectedPayloadLength=void 0,this.payloadLength=0,new Qk(e)}},nA=s({Any:()=>Sp,Array:()=>lp,BigInt:()=>ym,Boolean:()=>xm,Call:()=>BT,Capitalize:()=>ZT,Codec:()=>im,Conditional:()=>_E,Constructor:()=>fp,ConstructorParameters:()=>SE,Cyclic:()=>zp,Decode:()=>am,DecodeBuilder:()=>rm,Dependent:()=>Gp,Encode:()=>om,EncodeBuilder:()=>nm,Enum:()=>Zp,Evaluate:()=>Gk,Exclude:()=>DE,Extends:()=>eT,ExtendsResult:()=>ZS,Extract:()=>jE,Function:()=>hp,Generic:()=>bp,Identifier:()=>Cm,Immutable:()=>cm,Index:()=>BE,Infer:()=>Up,InstanceType:()=>FD,Instantiate:()=>Rk,Integer:()=>Em,Interface:()=>kw,Intersect:()=>$p,IsAny:()=>Cp,IsArray:()=>up,IsBigInt:()=>bm,IsBoolean:()=>Sm,IsCall:()=>VT,IsCodec:()=>sm,IsConstructor:()=>pp,IsCyclic:()=>Bp,IsDependent:()=>Kp,IsEnum:()=>Qp,IsEnumValue:()=>Xp,IsFunction:()=>gp,IsGeneric:()=>xp,IsIdentifier:()=>wm,IsImmutable:()=>lm,IsInfer:()=>Wp,IsInteger:()=>Dm,IsIntersect:()=>em,IsKind:()=>$f,IsLiteral:()=>Pm,IsNever:()=>Ep,IsNull:()=>Im,IsNumber:()=>zm,IsObject:()=>Fp,IsOptional:()=>Ap,IsParameter:()=>Um,IsReadonly:()=>pm,IsRecord:()=>kg,IsRef:()=>yp,IsRefine:()=>_m,IsRest:()=>jg,IsSchema:()=>ep,IsString:()=>Gm,IsSymbol:()=>Vm,IsTemplateLiteral:()=>XS,IsThis:()=>Ng,IsTuple:()=>gh,IsUndefined:()=>Fg,IsUnion:()=>qm,IsUnknown:()=>Rp,IsUnsafe:()=>Hp,IsVoid:()=>Lg,KeyOf:()=>BD,Literal:()=>Am,Lowercase:()=>$T,Mapped:()=>QD,Module:()=>qk,Never:()=>Tp,NonNullable:()=>_O,Null:()=>Fm,Number:()=>Rm,Object:()=>Pp,Omit:()=>SO,Optional:()=>kp,Parameter:()=>Hm,Parameters:()=>kO,Partial:()=>PO,Pick:()=>WO,Readonly:()=>fm,ReadonlyObject:()=>XO,ReadonlyType:()=>ZO,Record:()=>Cg,RecordKey:()=>Dg,RecordPattern:()=>Eg,RecordValue:()=>Og,Ref:()=>vp,Refine:()=>hm,Required:()=>gk,Rest:()=>Ag,ReturnType:()=>bk,Script:()=>Jk,String:()=>Wm,Symbol:()=>Bm,TemplateLiteral:()=>YS,This:()=>Mg,Tuple:()=>hh,Uncapitalize:()=>tE,Undefined:()=>Pg,Union:()=>Km,Unknown:()=>Lp,Unsafe:()=>Vp,Uppercase:()=>rE,Void:()=>Ig,With:()=>Tk}),rA=nA.String({minLength:1}),iA=nA.Unsafe(nA.Unknown()),aA=e=>nA.Object(e,{additionalProperties:!1}),oA=nA.String({pattern:`^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$`});function sA(e){return Qf(oA,e)}var cA=aA({code:rA,message:nA.String()}),lA=aA({type:nA.Literal(`hello`),version:nA.Integer({minimum:0})}),uA=aA({serverId:oA}),dA=aA({serverId:oA,sessionId:rA,attachmentId:rA}),fA=nA.Union([uA,dA]),pA=aA({type:nA.Literal(`request`),id:rA,target:fA,call:iA}),mA=aA({type:nA.Literal(`cancel`),id:rA,target:fA}),hA=nA.Union([lA,pA,mA]),gA=aA({type:nA.Literal(`hello`),version:nA.Literal(8),serverId:oA}),_A=aA({type:nA.Literal(`hello_error`),error:cA}),vA=nA.Union([aA({type:nA.Literal(`response`),id:rA,ok:nA.Literal(!0),result:nA.Optional(iA)}),aA({type:nA.Literal(`response`),id:rA,ok:nA.Literal(!1),error:cA})]),yA=aA({type:nA.Literal(`service_update`),subscriptionId:rA,update:iA}),bA=aA({type:nA.Literal(`attachment`),attachment:nA.Union([dA,nA.Null()])}),xA=nA.Union([gA,_A,vA,yA,bA]),SA=class extends Error{constructor(e){super(e),this.name=`ProtocolValidationError`}};function CA(e){if(!Qf(hA,e)||!ki(e))throw new SA(`Invalid client protocol message`);return e}function wA(e){if(!Qf(xA,e)||!ki(e))throw new SA(`Invalid server protocol message`);return e}function TA(e){return e instanceof Error?e.message.length<=500?e.message:`${e.message.slice(0,497)}...`:`Unknown codec error`}function EA(e,t,n,r){let i=t(e);try{return eA(ro(i,{maxByteLength:r?.maxFrameLength??16777216}))}catch(e){throw e instanceof SA?e:new SA(`Unable to encode ${n} protocol message: ${TA(e)}`)}}function DA(e,t){return EA(e,CA,`client`,t)}var OA=class{failed=!1;frames;kind;maxFrameLength;parse;constructor(e,t,n){this.frames=new tA(n),this.kind=e,this.maxFrameLength=n?.maxFrameLength??16777216,this.parse=t}push(e){if(this.failed)throw new SA(`${this.kind} message decoder has failed`);try{let t=[];for(let n of this.frames.push(e))t.push(this.parse(Za(n,{maxByteLength:this.maxFrameLength})));return t}catch(e){throw this.failed=!0,e instanceof SA?e:new SA(`Invalid ${this.kind} protocol frame: ${TA(e)}`)}}end(){if(this.failed)throw new SA(`${this.kind} message decoder has failed`);try{this.frames.end()}catch(e){throw this.failed=!0,new SA(`Invalid ${this.kind} protocol framing: ${TA(e)}`)}}},kA=class{decoder;constructor(e){this.decoder=new OA(`server`,wA,e)}push(e){return this.decoder.push(e)}end(){this.decoder.end()}},AA=class extends Error{code;constructor(e){super(e.message),this.name=`ServerError`,this.code=e.code}},jA=class extends Error{constructor(e=`Client is disconnected`,t){super(e,t===void 0?void 0:{cause:t}),this.name=`DisconnectedError`}},MA=class extends Error{constructor(){super(`Client is disposed`),this.name=`ClientDisposedError`}};function NA(e){return e instanceof Error?e:Error(String(e))}function PA(e){let t=NA(e);return t instanceof jA?t:new jA(t.message,t)}function FA(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var IA=4294967295,LA=class{#e;#t;#n={state:`disconnected`};#r=0;constructor(e){if(this.#e=e,this.#t=e.maxFrameLength??16777216,!Number.isSafeInteger(this.#t)||this.#t<=0||this.#t>IA)throw TypeError(`Client maxFrameLength must be an integer between 1 and ${IA}`)}get state(){return this.#n.state}get maxFrameLength(){return this.#t}connect(){if(this.#n.state!==`disconnected`)return Promise.reject(new jA(`Client is already ${this.#n.state}`));let e=++this.#r,t=FA();return this.#n={state:`connecting`,id:e,decoder:new kA({maxFrameLength:this.#t}),handshake:t},this.#e.onStateChange({state:`connecting`}),this.#i(e,{onData:t=>this.#a(e,t),onClose:()=>{this.#u(e)&&this.#s()},onError:t=>{this.#u(e)&&this.#c(PA(t))}}),t.promise}disconnect(e=`Client disconnected`){this.#n.state!==`disconnected`&&this.#c(typeof e==`string`?new jA(e):e)}fail(e){this.#c(e)}send(e){let t=this.#n;if(t.state!==`connected`)throw new jA;let n;try{n=t.transport.send(e)}catch(e){this.#c(PA(e));return}n.catch(e=>{let n=this.#n;n.state!==`disconnected`&&n.transport===t.transport&&this.#c(PA(e))})}async#i(e,t){let n;try{n=await this.#e.transportFactory(t)}catch(t){this.#u(e)&&this.#l(PA(t));return}let r=this.#n;if(r.state!==`connecting`||r.id!==e)n.close();else{this.#n={...r,transport:n};try{await n.send(DA({type:`hello`,version:8},{maxFrameLength:this.#t}))}catch(t){this.#u(e)&&this.#c(PA(t))}}}#a(e,t){let n=this.#n;if(n.state===`disconnected`||n.id!==e)return;if(n.state===`connecting`&&!n.transport){this.#c(new SA(`Received server data before the client hello was sent`));return}let r;try{r=n.decoder.push(t)}catch(e){this.#c(NA(e));return}for(let e of r){if(this.#n.state===`disconnected`)return;this.#o(e)}}#o(e){let t=this.#n;if(t.state===`connecting`){if(e.type===`hello_error`){this.#c(new AA(e.error));return}if(e.type!==`hello`){this.#c(new SA(`Expected server hello as first message`));return}if(e.serverId!==this.#e.serverId){this.#c(new SA(`Connected server ${JSON.stringify(e.serverId)} does not match ${JSON.stringify(this.#e.serverId)}`));return}if(!t.transport){this.#c(new SA(`Received server hello before the client hello was sent`));return}let n={state:`connected`,id:t.id,decoder:t.decoder,transport:t.transport,handshake:t.handshake};this.#n=n;try{this.#e.onHandshake(e)}catch(e){this.#n===n&&this.#c(NA(e));return}if(this.#n!==n||(this.#e.onStateChange({state:`connected`}),this.#n!==n))return;this.#n={...n,handshake:void 0},t.handshake.resolve(e)}else t.state===`connected`&&(e.type===`hello`||e.type===`hello_error`?this.#c(new SA(`Unexpected handshake message`)):this.#e.onMessage(e))}#s(){let e=this.#n;if(e.state===`disconnected`)return;let t=new jA(`Byte transport closed`);try{e.decoder.end()}catch(e){t=NA(e)}this.#l(t)}#c(e){let t=this.#n,n=t.state===`disconnected`?void 0:t.transport;this.#l(e),n?.close()}#l(e){let t=this.#n;t.state!==`disconnected`&&(this.#n={state:`disconnected`},t.handshake?.reject(e),this.#e.onStateChange({state:`disconnected`,error:e}))}#u(e){return this.#n.state!==`disconnected`&&this.#n.id===e}},RA=class e{#e;#t;#n=new Map;#r=new Set;#i=new Set;#a=new Map;#o=0;#s=0;#c;#l;#u=!1;#d;constructor(e){if(!sA(e.serverId))throw TypeError(`serverId must be a canonical lowercase UUIDv4`);this.#e=e,this.#t=new LA({transportFactory:e.transportFactory,serverId:e.serverId,maxFrameLength:e.maxFrameLength,onHandshake:e=>{this.#c=e},onMessage:e=>this.#p(e),onStateChange:e=>this.#m(e)})}get disposed(){return this.#u}get connectionState(){return this.#t.state}get connected(){return this.#t.state===`connected`}get serverId(){return this.#e.serverId}get hello(){return this.#c}get attachment(){return this.#l}static async connect(t){let n=new e(t);try{return await n.connect(),n}catch(e){throw await n.dispose(),e}}connect(){return this.#u?Promise.reject(new MA):(this.#c=void 0,this.#t.connect())}reconnect(){return this.connect()}disconnect(e=`Client disconnected`){this.#t.disconnect(e)}onConnectionStateChange(e){return this.#b(),this.#r.add(e),()=>this.#r.delete(e)}onAttachmentChange(e){return this.#b(),this.#i.add(e),()=>this.#i.delete(e)}request(e,t,n){return this.#f(e,t,n)}async serviceCatalogue(e,t){let n=await this.#f(e,va(),t);try{return Sa(n)}catch(e){let t=new SA(e instanceof Error?e.message:`Invalid service catalogue`);throw this.#t.fail(t),t}}async subscribeService(e,t,n,r,i){let a=`service-${++this.#s}`,o={target:e,listener:r,decoder:La(),queuedWireUpdates:[],queued:[],deliveryTail:Promise.resolve(),hydrated:!1,ready:!1};this.#a.set(a,o);let s;try{s=await this.#f(e,ya(a,t,n),i,e=>{let t=o.decoder.decodeSnapshot(Ca(e));o.hydrated=!0;for(let e of o.queuedWireUpdates.splice(0))o.queued.push(o.decoder.decodeUpdate(wa(e)));return t})}catch(e){throw this.#a.get(a)===o&&this.#a.delete(a),e}if(this.#a.get(a)!==o)throw new jA;let c=!1;return{id:a,target:e,snapshot:s,start:()=>{if(!(c||o.ready)){o.ready=!0;for(let e of o.queued.splice(0))this.#v(o,e)}},dispose:async()=>{if(!c){c=!0,this.#a.get(a)===o&&this.#a.delete(a);try{this.connected&&this.#y(e)&&await this.#f(e,ba(a)),await o.deliveryTail}finally{o.queuedWireUpdates.length=0,o.queued.length=0}}}}}#f(e,t,n,r){if(this.#u)return Promise.reject(new MA);if(!this.connected)return Promise.reject(new jA);if(n?.aborted)return Promise.reject(BA(n));let i=`request-${++this.#o}`,{promise:a,resolve:o,reject:s}=FA(),c=!1,l=!1,u,d=()=>{if(c&&this.connected)try{this.#t.send(DA({type:`cancel`,id:i,target:e},{maxFrameLength:this.#t.maxFrameLength}))}catch(e){this.#t.fail(NA(e))}};n!==void 0&&(u=()=>{l||(l=!0,s(BA(n)),d())},n.addEventListener(`abort`,u,{once:!0})),this.#n.set(i,{resolve:e=>{try{o(r===void 0?e:r(e))}catch(e){let t=new SA(e instanceof Error?e.message:`Invalid service operation stream`);this.#t.fail(t),s(t)}},reject:s,cleanup:()=>{n!==void 0&&u!==void 0&&n.removeEventListener(`abort`,u)}});let f;try{f=DA({type:`request`,id:i,target:e,call:xa(t)},{maxFrameLength:this.#t.maxFrameLength})}catch(e){return this.#h(i)?.reject(NA(e)),a}return this.#t.send(f),c=!0,l&&d(),a}#p(e){if(e.type===`attachment`){if(e.attachment!==null&&e.attachment.serverId!==this.#e.serverId){this.#t.fail(new SA(`Attachment update belongs to another server`));return}this.#_(e.attachment??void 0);return}if(e.type===`service_update`){let t=this.#a.get(e.subscriptionId);if(t===void 0)return;if(!t.hydrated){t.queuedWireUpdates.push(e.update);return}let n;try{n=t.decoder.decodeUpdate(wa(e.update))}catch(e){this.#t.fail(new SA(e instanceof Error?e.message:`Invalid service operation stream`));return}t.ready?this.#v(t,n):t.queued.push(n);return}let t=this.#h(e.id);t?e.ok?t.resolve(e.result):t.reject(new AA(e.error)):this.#t.fail(new SA(`Response has no matching request`))}#m(e){e.state===`disconnected`&&(this.#c=void 0,this.#_(void 0),this.#g(e.error??new jA),this.#a.clear());for(let t of this.#r)try{t(e)}catch(e){this.#x(e)}}#h(e){let t=this.#n.get(e);return t&&(this.#n.delete(e),t.cleanup()),t}#g(e){let t=[...this.#n.values()];this.#n.clear();for(let n of t)n.cleanup(),n.reject(e)}dispose(){if(this.#d)return this.#d;this.#u=!0,this.#d=Promise.resolve();let e=new MA;return this.#g(e),this.#t.disconnect(e),this.#c=void 0,this.#_(void 0),this.#r.clear(),this.#i.clear(),this.#a.clear(),this.#d}[Symbol.asyncDispose](){return this.dispose()}#_(e){let t=this.#l;if(t?.serverId!==e?.serverId||t?.sessionId!==e?.sessionId||t?.attachmentId!==e?.attachmentId){this.#l=e;for(let t of this.#i)try{t(e)}catch(e){this.#x(e)}}}#v(e,t){e.deliveryTail=e.deliveryTail.then(()=>e.listener(t)).catch(e=>this.#x(e))}#y(e){if(!(`sessionId`in e))return this.#c?.serverId===e.serverId;let t=this.#l;return t?.serverId===e.serverId&&t.sessionId===e.sessionId&&t.attachmentId===e.attachmentId}#b(){if(this.#u)throw new MA}#x(e){if(this.#e.onListenerError)try{this.#e.onListenerError(NA(e))}catch{}}};function zA(e,t){let n=()=>{let e=t();if(e===void 0)throw Error(`Remote service target is unavailable`);return e};return{invoke:async(t,r)=>e.request(n(),t,r.abortSignal),async subscribe(t,r,i,a){let o=await e.subscribeService(n(),t,r,e=>i(e,hi),a.abortSignal);return{snapshot:o.snapshot,activate:()=>o.start(),close:()=>o.dispose()}}}}function BA(e){let t=e.reason;return t instanceof Error?t:new DOMException(`The operation was aborted`,`AbortError`)}function VA(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t)}function HA(e){return Uint8Array.from(atob(e),e=>e.charCodeAt(0))}async function UA(e,t){let n=await t.begin({name:e.name,mimeType:e.mimeType,size:e.bytes.length});try{for(let r=0;r<e.bytes.length;r+=262144)await t.append({id:n,offset:r,data:VA(e.bytes.subarray(r,r+262144))});return await t.finish(n),n}catch(e){throw await t.release(n).catch(()=>{}),e}}async function WA(e){let t=[],n=0,r=0,i=``;do{let a=await e(n);if(!Number.isSafeInteger(a.total)||a.total<=0||a.total>20971520||n>0&&(a.total!==r||a.mimeType!==i))throw Error(`Invalid image size or format`);if(r=a.total,i=a.mimeType,a.data.length>349528)throw Error(`Image chunk is too large`);let o=HA(a.data);if(o.length>262144||n+o.length>r||!o.length&&n<r)throw Error(`Incomplete image`);t.push(o),n+=o.length}while(n<r);let a=new Uint8Array(n),o=0;for(let e of t)a.set(e,o),o+=e.length;return{name:`Image`,mimeType:i,bytes:a}}function GA(e){let t=/^\/compact(?:\s+([\s\S]*))?$/.exec(e.trim());return t?t[1]?.trim()??``:null}var KA=(e,t=`New session`)=>e.title||e.firstPromptPreview||t,qA=e=>e.lastMessageAt??e.createdAt,JA=(e,t)=>qA(t)-qA(e)||Number(t.id)-Number(e.id),YA=(e,t)=>t.lastUsedAt-e.lastUsedAt||Number(t.id)-Number(e.id),XA=(e,t)=>`${e.title} ${e.firstPromptPreview} ${e.id}`.toLocaleLowerCase().includes(t.trim().toLocaleLowerCase());function ZA(e,t,n=`en`){let r=Math.floor(Math.max(0,t-e)/6e4);if(r<1)return n===`zh`?`刚刚`:`now`;let i=Math.floor(r/60),a=Math.floor(i/24);if(a>=30)return new Date(e).toLocaleDateString(n===`zh`?`zh-CN`:`en-GB`);let o=a||i||r,s=a?[`天`,`d`]:i?[`小时`,`h`]:[`分钟`,`m`];return n===`zh`?`${o} ${s[0]}前`:`${o}${s[1]}`}var QA=Pa(`neko.session-directory`),$A=Pa(`neko.session-management`),ej=Pa(`neko.models`),tj=Pa(`neko.chat`),nj=Pa(`neko.workspaces`),rj=Pa(`neko.credentials`),ij=Pa(`neko.workspace-files`),aj=Pa(`neko.skill-market`);function oj(e){return t=>{let n=new WebSocket(e);n.binaryType=`arraybuffer`;let r=!1,i=[];return n.onopen=()=>{r=!0;for(let e of i.splice(0))n.send(e.slice())},n.onmessage=e=>{e.data instanceof ArrayBuffer?t.onData(new Uint8Array(e.data)):e.data instanceof Blob&&e.data.arrayBuffer().then(e=>t.onData(new Uint8Array(e)))},n.onclose=()=>t.onClose(),n.onerror=()=>t.onError(Error(`WebSocket transport error`)),{send(e){return n.readyState===WebSocket.CLOSING||n.readyState===WebSocket.CLOSED?Promise.reject(Error(`WebSocket transport is not open`)):(r?n.send(e.slice()):i.push(e),Promise.resolve())},close(){n.close()}}}}var sj=hi;function cj(e,t){return e.filter(e=>e.workspaceRoot===t).sort(JA)}var lj=class{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l;#u;#d=[];#f;#p;#m=[];#h;#g;#_=0;#v=0;#y=0;#b=!1;#x=!1;#S=!1;#C=!1;constructor(e){this.#e=e,this.#f=e.workspaceRoot}get currentSessionId(){return this.#p}get workspaceRoot(){return this.#f}get ready(){return this.#x&&!this.#S&&this.#u!==void 0}get managementReady(){return this.#x&&!this.#S}async saveCredential(e,t){if(!this.#x||!this.#c)throw Error(`网关未连接`);await this.#c.save({provider:e,key:t},sj)}async removeCredential(e){if(!this.#x||!this.#c)throw Error(`网关未连接`);await this.#c.remove({provider:e},sj)}async start(){this.#e.events.onPhase(`connecting`),this.#e.events.onWorkspace(this.#f);try{await this.#j()}catch(e){this.#w(e),this.#M()}}#w(e){this.#e.events.onError(e instanceof Error?e.message:String(e))}#T(e){if(this.#b||e!==this.#v)throw Error(`连接已变化,请重试`)}async#E(e){if(!this.managementReady)throw Error(`操作进行中或网关未连接,请稍后重试`);this.#S=!0,this.#e.events.onOperation(!0);let t=this.#v;try{await e(t)}finally{this.#S=!1,this.#e.events.onOperation(!1),t===this.#v&&this.#A()}}async selectWorkspace(e){await this.#E(async t=>{if(!this.#a?.state.value?.workspaces.some(t=>t.path===e))throw Error(`工作区不存在`);await this.#D(e,void 0,t)})}async addWorkspace(e){await this.#E(async t=>{let n=await this.#a.add({path:e},sj);this.#T(t),await this.#D(n.path,void 0,t)})}async browse(e){if(!this.#x||!this.#a)throw Error(`网关未连接`);return this.#a.browse(e,sj)}async attachTo(e){await this.#E(async t=>{if(!this.#d.find(t=>t.id===e&&t.workspaceRoot===this.#f))throw Error(`会话不属于当前工作区或已归档`);await this.#O(e,t)})}async createSession(){await this.#E(async e=>{let t=await this.#i.create({cwd:this.#f},sj);this.#T(e),await this.#O(t.id,e)})}async archiveSession(e){await this.#E(async t=>{await this.#i.archive(e,sj),this.#T(t),this.#d=this.#d.filter(t=>t.id!==e),this.#p===e&&await this.#D(this.#f,void 0,t)})}async#D(e,t,n){let r=cj(this.#d,e).sort(YA),i=r.find(e=>e.id===t)??r[0];try{i?await this.#O(i.id,n):await this.#k(n),this.#T(n),this.#f=e,this.#e.events.onWorkspace(e)}catch(e){throw n===this.#v&&(this.#N(),this.#p=void 0,this.#e.events.onSessionChange(null)),e}}async#O(e,t){if(this.#p===e&&this.#u)return;let n=this.#t;this.#N();let r=this.#y;this.#p=void 0,this.#e.events.onSessionChange(null);let i=this.#d.find(t=>t.id===e)?.lastUsedAt??-1,a=n.attachment?.sessionId!==e;if(await this.#i.attach(e,sj),this.#T(t),await uj(n,e),a){let n=Date.now();for(;(this.#d.find(t=>t.id===e)?.lastUsedAt??-1)<=i;){if(Date.now()-n>5e3)throw Error(`等待会话目录更新超时`);await new Promise(e=>setTimeout(e,5)),this.#T(t)}}this.#T(t);let o=Fa({services:[tj],transport:zA(n,(e=>()=>e)(n.attachment))});this.#r=o,await o.ready(sj),this.#T(t);let s=o.use(tj);this.#u=s,this.#p=e,this.#e.events.onSessionChange(e);let c=e=>{t===this.#v&&r===this.#y&&this.#e.events.onView(e)};s.view.value&&c(s.view.value),this.#h=s.view.subscribe(c)}async#k(e){this.#N(),this.#p=void 0,this.#e.events.onSessionChange(null),await this.#i.detach(sj),this.#T(e)}#A(){this.managementReady&&this.#p&&!this.#d.some(e=>e.id===this.#p)&&this.#E(e=>this.#D(this.#f,void 0,e)).catch(e=>this.#w(e))}async configure(e){if(!this.ready)throw Error(`会话未就绪`);await this.#u.configure(e,sj)}async submit(e,t=[],n=crypto.randomUUID(),r){if(r!==void 0&&r!==this.#p)throw Error(`会话已切换,草稿已保留`);if(!this.ready)throw Error(`会话未就绪`);let i=this.#u,a=[];try{for(let e of t)a.push(await UA(e,{begin:e=>i.beginImage(e,sj),append:e=>i.appendImage(e,sj),finish:e=>i.finishImage(e,sj),release:e=>i.releaseImage(e,sj)}));await i.submit({content:e,requestId:n,images:a},sj)}finally{for(let e of a)await i.releaseImage(e,sj).catch(()=>{})}}async searchFiles(e,t,n){if(!this.managementReady||!this.#o||t!==this.#f)throw Error(`工作区未就绪`);return this.#o.search({workspaceRoot:t,query:e},_i(n,sj))}async workspaceImage(e,t,n){if(!this.ready||t!==this.#p)throw Error(`会话已切换,草稿已保留`);let r=this.#u,i=_i(n,sj),a=await r.importImage(e,i);try{return{...await WA(e=>r.draftImage({id:a.id,offset:e},i)),name:a.name}}finally{await r.releaseImage(a.id,sj).catch(()=>{})}}async compact(e,t){if(t!==void 0&&t!==this.#p)throw Error(`会话已切换,草稿已保留`);if(!this.ready)throw Error(`会话未就绪`);await this.#u.compact({instructions:e},sj)}async image(e,t,n){if(n!==void 0&&n!==this.#p)throw Error(`会话已切换,草稿已保留`);if(!this.ready)throw Error(`会话未就绪`);let r=this.#u;return WA(n=>r.getImage({entryId:e,contentIndex:t,offset:n},sj))}abort(){this.ready&&this.#u.abort(sj).catch(e=>this.#w(e))}async listSkills(e,t){if(!this.ready||e!==this.#p)throw Error(`会话未就绪`);return this.#u.skills(_i(t,sj))}async listModels(){return this.#s?.list(sj)??[]}marketList(e){return this.#l?this.#l.list({...e?{query:e}:{},workspaceRoot:this.#f},sj):Promise.reject(Error(`网关未连接`))}marketDetail(e){return this.#l?this.#l.detail({name:e,workspaceRoot:this.#f},sj):Promise.reject(Error(`网关未连接`))}marketPreview(e){return this.#l?this.#l.preview({name:e},sj):Promise.reject(Error(`网关未连接`))}marketInstall(e,t,n){return this.#l?this.#l.install({name:e,scope:t,workspaceRoot:this.#f,...n?{overwrite:n}:{}},sj):Promise.reject(Error(`网关未连接`))}marketUninstall(e,t){return this.#l?this.#l.uninstall({name:e,scope:t,workspaceRoot:this.#f},sj):Promise.reject(Error(`网关未连接`))}async#j(){let e=++this.#v,t=await RA.connect({serverId:this.#e.serverId,transportFactory:oj(this.#e.url),onListenerError:e=>this.#w(e)});if(this.#b||e!==this.#v){await t.dispose();return}this.#t=t,t.onConnectionStateChange(e=>{e.state===`disconnected`&&t===this.#t&&this.#M()});let n=Fa({services:[QA,$A,ej,nj,rj,ij,aj],transport:zA(t,()=>({serverId:this.#e.serverId}))});this.#n=n,await n.ready(sj),this.#T(e),this.#i=n.use($A),this.#a=n.use(nj),this.#o=n.use(ij),this.#s=n.use(ej),this.#c=n.use(rj),this.#l=n.use(aj),this.#m.push(this.#c.state.subscribe(t=>{e===this.#v&&this.#e.events.onCredentials?.(t)})),this.#c.state.value&&this.#e.events.onCredentials?.(this.#c.state.value);let r=n.use(QA),i=t=>{e===this.#v&&(this.#d=t.sessions,this.#e.events.onDirectory(t),this.#A())};this.#m.push(r.state.subscribe(i)),this.#m.push(this.#a.state.subscribe(t=>{e===this.#v&&this.#e.events.onWorkspaces(t)})),this.#C||=(await this.#a.add({path:this.#f},sj),this.#T(e),!0);let a=Date.now();for(;!r.state.value||!this.#a.state.value;){if(Date.now()-a>5e3)throw Error(`等待工作区目录超时`);await new Promise(e=>setTimeout(e,10)),this.#T(e)}i(r.state.value),this.#e.events.onWorkspaces(this.#a.state.value),await this.#D(this.#f,this.#p,e),this.#T(e),this.#x=!0,this.#_=0,this.#e.events.onPhase(`ready`),this.#s.list(sj).then(t=>{e===this.#v&&this.#e.events.onModels(t)}).catch(()=>{})}#M(){if(this.#b||this.#g)return;++this.#v,this.#x=!1,this.#N(),this.#e.events.onPhase(`reconnecting`);let e=Math.min((this.#e.retryBaseMs??800)*++this.#_,this.#e.retryMaxMs??8e3);this.#g=setTimeout(()=>{this.#g=void 0,this.#P().then(()=>{if(!this.#b)return this.#j()}).catch(e=>{this.#w(e),this.#M()})},e)}#N(){++this.#y,this.#h?.(),this.#h=void 0,this.#u=void 0,this.#r?.dispose(sj).catch(()=>{}),this.#r=void 0,this.#e.events.onView(null)}async#P(){for(let e of this.#m.splice(0))e();this.#N(),this.#i=void 0,this.#a=void 0,this.#o=void 0,this.#c=void 0,this.#e.events.onCredentials?.(null),this.#s=void 0,await this.#n?.dispose(sj).catch(()=>{}),this.#n=void 0;let e=this.#t;this.#t=void 0,await e?.dispose().catch(()=>{})}dispose(){this.#b=!0,++this.#v,this.#x=!1,clearTimeout(this.#g),this.#P()}};function uj(e,t){return e.attachment?.sessionId===t?Promise.resolve():new Promise((n,r)=>{let i=setTimeout(()=>{a(),r(Error(`等待会话连接超时`))},5e3),a=e.onAttachmentChange(e=>{e?.sessionId===t&&(clearTimeout(i),a(),n())})})}var dj={phase:`connecting`,credentials:null,workspaceRoot:``,workspaces:[],operating:!1,sessions:[],models:[],currentSessionId:null,view:null,notice:null},fj=new Set;function pj(e){dj=e;for(let e of fj)e()}function mj(e){return fj.add(e),()=>{fj.delete(e)}}function hj(){return(0,f.useSyncExternalStore)(mj,()=>dj)}function gj(){return dj}var _j={setCredentials(e){e&&dj.credentials&&e.revision<dj.credentials.revision||pj({...dj,credentials:e})},setWorkspace(e){pj({...dj,workspaceRoot:e})},setWorkspaces(e){pj({...dj,workspaces:e})},setOperation(e){pj({...dj,operating:e})},setPhase(e){pj({...dj,phase:e})},setDirectory(e){pj({...dj,sessions:e})},setModels(e){pj({...dj,models:e})},setSession(e){pj({...dj,currentSessionId:e})},setView(e){pj({...dj,view:e})},notice(e){pj({...dj,notice:e})},clearNotice(){dj.notice!==null&&pj({...dj,notice:null})}};async function vj(){let e=await fetch(`/api/info`);if(!e.ok)throw Error(`GET /api/info 失败(${e.status})`);return await e.json()}var yj;function bj(){(async()=>{let e;try{e=await vj()}catch(e){_j.setPhase(`error`),_j.notice({level:`error`,text:`获取网关信息失败:${e instanceof Error?e.message:String(e)}`});return}yj=new lj({url:e.gatewayWs,serverId:e.serverId,workspaceRoot:e.workspaceRoot,events:{onPhase:_j.setPhase,onCredentials:_j.setCredentials,onWorkspaces:e=>_j.setWorkspaces(e.workspaces),onWorkspace:_j.setWorkspace,onOperation:_j.setOperation,onError:e=>_j.notice({level:`error`,text:e}),onDirectory:e=>_j.setDirectory(e.sessions),onModels:_j.setModels,onSessionChange:_j.setSession,onView:_j.setView}}),await yj.start()})()}function xj(){_j.notice({level:`error`,text:`网关连接未就绪,请稍候或刷新页面。`})}var Sj={saveCredential(e,t){return Cj().saveCredential(e,t)},removeCredential(e){return Cj().removeCredential(e)},configure(e,t){let n=Cj();return n.currentSessionId!==t||!n.ready?Promise.reject(Error(`会话已变化,请重试`)):n.configure(e)},submit(e,t=[],n,r){return Cj().submit(e,t,n,r)},searchFiles(e,t,n){return Cj().searchFiles(e,t,n)},workspaceImage(e,t,n){return Cj().workspaceImage(e,t,n)},compact(e,t){return Cj().compact(e,t)},listSkills(e,t){return Cj().listSkills(e,t)},marketList(e){return Cj().marketList(e)},marketDetail(e){return Cj().marketDetail(e)},marketPreview(e){return Cj().marketPreview(e)},marketInstall(e,t,n){return Cj().marketInstall(e,t,n)},marketUninstall(e,t){return Cj().marketUninstall(e,t)},image(e,t,n){return Cj().image(e,t,n)},abort(){yj?.ready===!0?yj.abort():xj()},selectSession(e){return Cj().attachTo(e)},selectWorkspace(e){return Cj().selectWorkspace(e)},addWorkspace(e){return Cj().addWorkspace(e)},browse(e){return Cj().browse(e)},createSession(){return Cj().createSession()},configureModel(e){yj===void 0?xj():yj.configure({model:e}).catch(e=>{_j.notice({level:`error`,text:e instanceof Error?e.message:String(e)})})},archiveSession(e){return Cj().archiveSession(e)}};function Cj(){if(!yj)throw Error(`网关尚未连接`);return yj}function wj(e){_j.notice({level:`error`,text:e instanceof Error?e.message:String(e)})}function Tj(e,t){let n=e.slice(0,t),r=/(?:^|\s|[([{])(@(?:"[^"\n]*"?|[^\s"@]*))$/.exec(n);if(!r?.[1])return null;let i=r[1];return{start:t-i.length,end:t,query:i.slice(1).replace(/^"|"$/g,``)}}function Ej(e,t=!1){let n=t&&!e.endsWith(`/`)?`${e}/`:e;return`@${/\s/.test(n)?`"${n}"`:n}`}function Dj(e,t,n,r){let i=Ej(n,r),a=r?``:` `;return{text:e.slice(0,t.start)+i+a+e.slice(t.end),cursor:t.start+i.length+a.length-(r&&i.endsWith(`"`)?1:0)}}var Oj=e=>/^\/[^\s]*$/.test(e);function kj(e,t){let n=Oj(e)?e:`/`;return[{key:`compact`,label:`/compact`,description:`压缩上下文(可附加要求)`},...t.map(e=>({key:`skill:${e.name}`,label:`/skill:${e.name}`,description:e.description,...e.level===`builtin`?{badge:`内置`}:{}}))].filter(e=>e.label.startsWith(n))}function Aj(){return typeof window<`u`}function jj(e){return Pj(e)?(e.nodeName||``).toLowerCase():`#document`}function Mj(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nj(e){return((Pj(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Pj(e){return Aj()?e instanceof Node||e instanceof Mj(e).Node:!1}function Fj(e){return Aj()?e instanceof Element||e instanceof Mj(e).Element:!1}function Ij(e){return Aj()?e instanceof HTMLElement||e instanceof Mj(e).HTMLElement:!1}function Lj(e){return!Aj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Mj(e).ShadowRoot}function Rj(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Yj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function zj(e){return/^(table|td|th)$/.test(jj(e))}function Bj(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Vj=/transform|translate|scale|rotate|perspective|filter/,Hj=/paint|layout|strict|content/,Uj=e=>!!e&&e!==`none`,Wj;function Gj(e){let t=Fj(e)?Yj(e):e;return Uj(t.transform)||Uj(t.translate)||Uj(t.scale)||Uj(t.rotate)||Uj(t.perspective)||!qj()&&(Uj(t.backdropFilter)||Uj(t.filter))||Vj.test(t.willChange||``)||Hj.test(t.contain||``)}function Kj(e){let t=Zj(e);for(;Ij(t)&&!Jj(t);){if(Gj(t))return t;if(Bj(t))return null;t=Zj(t)}return null}function qj(){return Wj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Wj}function Jj(e){return/^(html|body|#document)$/.test(jj(e))}function Yj(e){return Mj(e).getComputedStyle(e)}function Xj(e){return Fj(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zj(e){if(jj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Lj(e)&&e.host||Nj(e);return Lj(t)?t.host:t}function Qj(e){let t=Zj(e);return Jj(t)?(e.ownerDocument||e).body:Ij(t)&&Rj(t)?t:Qj(t)}function $j(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Qj(e),i=r===e.ownerDocument?.body,a=Mj(r);if(i){let e=eM(a);return t.concat(a,a.visualViewport||[],Rj(r)?r:[],e&&n?$j(e):[])}return t.concat(r,$j(r,[],n))}function eM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var tM=Math.min,nM=Math.max,rM=Math.round,iM=Math.floor,aM=e=>({x:e,y:e}),oM={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function sM(e,t,n){return nM(e,tM(t,n))}function cM(e,t){return typeof e==`function`?e(t):e}function lM(e){return e.split(`-`)[0]}function uM(e){return e.split(`-`)[1]}function dM(e){return e===`x`?`y`:`x`}function fM(e){return e===`y`?`height`:`width`}function pM(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function mM(e){return dM(pM(e))}function hM(e,t,n){n===void 0&&(n=!1);let r=uM(e),i=mM(e),a=fM(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=wM(o)),[o,wM(o)]}function gM(e){let t=wM(e);return[_M(e),t,_M(t)]}function _M(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var vM=[`left`,`right`],yM=[`right`,`left`],bM=[`top`,`bottom`],xM=[`bottom`,`top`];function SM(e,t,n){switch(e){case`top`:case`bottom`:return n?t?yM:vM:t?vM:yM;case`left`:case`right`:return t?bM:xM;default:return[]}}function CM(e,t,n,r){let i=uM(e),a=SM(lM(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(_M)))),a}function wM(e){let t=lM(e);return oM[t]+e.slice(t.length)}function TM(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function EM(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:TM(e)}function DM(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}}var OM=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),kM=typeof Element>`u`,AM=kM?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,jM=!kM&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},MM=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):MM(e.parentNode))},NM=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},PM=function(e,t,n){if(MM(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(OM));return t&&AM.call(e,OM)&&r.unshift(e),r=r.filter(n),r},FM=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!MM(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=FM(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{AM.call(a,OM)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!MM(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=FM(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},IM=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},LM=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||NM(e))&&!IM(e)?0:e.tabIndex},RM=function(e,t){var n=LM(e);return n<0&&t&&!IM(e)?0:n},zM=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},BM=function(e){return e.tagName===`INPUT`},VM=function(e){return BM(e)&&e.type===`hidden`},HM=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},UM=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},WM=function(e){if(!e.name)return!0;var t=e.form||jM(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=UM(r,e.form);return!i||i===e},GM=function(e){return BM(e)&&e.type===`radio`},KM=function(e){return GM(e)&&!WM(e)},qM=function(e){var t=e&&jM(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=jM(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},JM=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},YM=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=AM.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(AM.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=jM(e);if(s&&!s.shadowRoot&&r(s)===!0)return JM(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(qM(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return JM(e);return!1},XM=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return AM.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},ZM=function(e,t){return!(t.disabled||VM(t)||YM(t,e)||HM(t)||XM(t))},QM=function(e,t){return!(KM(t)||LM(t)<0||!ZM(e,t))},$M=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},eN=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=RM(a,i),s=i?eN(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(zM).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},tN=function(e,t){return t||={},eN(t.getShadowRoot?FM([e],t.includeContainer,{filter:QM.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:$M}):PM(e,t.includeContainer,QM.bind(null,t)))};function nN(){return/apple/i.test(navigator.vendor)}function rN(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function iN(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Lj(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function aN(e){return e?.ownerDocument||document}var oN=typeof document<`u`?f.useLayoutEffect:function(){},sN={...f}.useInsertionEffect||(e=>e());function cN(e){let t=f.useRef(()=>{});return sN(()=>{t.current=e}),f.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var lN=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function uN(e,t){let n=tN(e,lN()),r=n.length;if(r===0)return;let i=rN(aN(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function dN(e){return uN(aN(e).body,1)||e}function fN(e){return uN(aN(e).body,-1)||e}function pN(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!iN(n,r)}function mN(e){tN(e,lN()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function hN(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var gN=l(ci(),1);function _N(e,t,n){let{reference:r,floating:i}=e,a=pM(t),o=mM(t),s=fM(o),c=lM(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=uM(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function vN(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}=cM(t,e),p=EM(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=DM(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=DM(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 yN=50,bN=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:vN},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=_N(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<yN&&(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}=_N(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},xN=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}=cM(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=lM(r),_=pM(o),v=lM(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[wM(o)]:gM(o)),x=p!==`none`;!d&&x&&b.push(...CM(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=hM(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`||_===pM(t)||T.every(e=>pM(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=pM(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{}}}},SN=new Set([`left`,`top`]);async function CN(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=lM(n),s=uM(n),c=pM(n)===`y`,l=SN.has(o)?-1:1,u=a&&c?-1:1,d=cM(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 wN=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 CN(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}}}}},TN=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}=cM(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=pM(i),p=dM(f),m=u[p],h=u[f],g=(e,t)=>sM(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}}}}}},EN=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}=cM(e,t),c=await i.detectOverflow(t,s),l=lM(n),u=uM(n),d=pM(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=tM(p-c[m],g),y=tM(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*nM(c.left,c.right):S=p-2*nM(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 DN(e){let t=Yj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ij(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=rM(n)!==a||rM(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ON(e){return Fj(e)?e:e.contextElement}function kN(e){let t=ON(e);if(!Ij(t))return aM(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=DN(t),o=(a?rM(n.width):n.width)/r,s=(a?rM(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var AN=aM(0);function jN(e){let t=Mj(e);return!qj()||!t.visualViewport?AN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function MN(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Mj(e)}function NN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ON(e),o=aM(1);t&&(r?Fj(r)&&(o=kN(r)):o=kN(e));let s=MN(a,n,r)?jN(a):aM(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=Mj(a),t=Fj(r)?Mj(r):r,n=e,i=eM(n);for(;i&&t!==n;){let e=kN(i),t=i.getBoundingClientRect(),r=Yj(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=Mj(i),i=eM(n)}}return DM({width:u,height:d,x:c,y:l})}function PN(e,t){let n=Xj(e).scrollLeft;return t?t.left+n:NN(Nj(e)).left+n}function FN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-PN(e,n),y:n.top+t.scrollTop}}function IN(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Nj(r),s=t?Bj(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=aM(1),u=aM(0),d=Ij(r);if((d||!a)&&((jj(r)!==`body`||Rj(o))&&(c=Xj(r)),d)){let e=NN(r);l=kN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?FN(o,c):aM(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 LN(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function RN(e){let t=Xj(e),n=e.ownerDocument.body,r=nM(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=nM(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+PN(e),o=-t.scrollTop;return Yj(n).direction===`rtl`&&(a+=nM(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var zN=25;function BN(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Mj(e),a=Nj(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!qj()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(PN(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<=zN&&(s-=o)}return{width:s,height:c,x:l,y:u}}function VN(e,t){let n=NN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=kN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function HN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=BN(e,n,t);else if(t===`document`)r=RN(Nj(e));else if(Fj(t))r=VN(t,n);else{let n=jN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return DM(r)}function UN(e,t){let n=t.get(e);if(n)return n;let r=$j(e,[],!1).filter(e=>Fj(e)&&jj(e)!==`body`),i=null,a=Yj(e).position===`fixed`,o=a?Zj(e):e;for(;Fj(o)&&!Jj(o);){let e=Yj(o),t=Gj(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Zj(o)}return t.set(e,r),r}function WN(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Bj(t)?[]:UN(t,this._c):[].concat(n),r],o=HN(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=HN(t,a[e],i);s=nM(n.top,s),c=tM(n.right,c),l=tM(n.bottom,l),u=nM(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function GN(e){let{width:t,height:n}=DN(e);return{width:t,height:n}}function KN(e,t,n){let r=Ij(t),i=Nj(t),a=n===`fixed`,o=NN(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=aM(0);if((r||!a)&&((jj(t)!==`body`||Rj(i))&&(s=Xj(t)),r)){let e=NN(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=PN(i));let l=i&&!r&&!a?FN(i,s):aM(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 qN(e){return Yj(e).position===`static`}function JN(e,t){if(!Ij(e)||Yj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Nj(e)===n&&(n=n.ownerDocument.body),n}function YN(e,t){let n=Mj(e);if(Bj(e))return n;if(!Ij(e)){let t=Zj(e);for(;t&&!Jj(t);){if(Fj(t)&&!qN(t))return t;t=Zj(t)}return n}let r=JN(e,t);for(;r&&zj(r)&&qN(r);)r=JN(r,t);return r&&Jj(r)&&qN(r)&&!Gj(r)?n:r||Kj(e)||n}var XN=async function(e){let t=this.getOffsetParent||YN,n=this.getDimensions,r=await n(e.floating);return{reference:KN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ZN(e){return Yj(e).direction===`rtl`}var QN={convertOffsetParentRelativeRectToViewportRelativeRect:IN,getDocumentElement:Nj,getClippingRect:WN,getOffsetParent:YN,getElementRects:XN,getClientRects:LN,getDimensions:GN,getScale:kN,isElement:Fj,isRTL:ZN};function $N(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eP(e,t,n){let r=null,i,a=Nj(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=iM(d),h=iM(a.clientWidth-(u+f)),g=iM(a.clientHeight-(d+p)),_=iM(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:nM(0,tM(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!$N(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=Mj(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function tP(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=ON(e),u=i||a?[...l?$j(l):[],...t?$j(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?eP(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?NN(e):null;c&&g();function g(){let t=NN(e);h&&!$N(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 nP=wN,rP=TN,iP=xN,aP=EN,oP=(e,t,n)=>{let r=new Map,i=n??{},a={...QN,...i.platform,_c:r};return bN(e,t,{...i,platform:a})},sP=typeof document<`u`?f.useLayoutEffect:function(){};function cP(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(!cP(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)&&!cP(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function lP(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uP(e,t){let n=lP(e);return Math.round(t*n)/n}function dP(e){let t=f.useRef(e);return sP(()=>{t.current=e}),t}function fP(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]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=f.useState(r);cP(p,r)||m(r);let[h,g]=f.useState(null),[_,v]=f.useState(null),y=f.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=f.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=f.useRef(null),w=f.useRef(null),T=f.useRef(u),E=c!=null,D=dP(c),O=dP(i),k=dP(l),A=f.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),oP(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};ee.current&&!cP(T.current,t)&&(T.current=t,gN.flushSync(()=>{d(t)}))})},[p,t,n,O,k]);sP(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ee=f.useRef(!1);sP(()=>(ee.current=!0,()=>{ee.current=!1}),[]),sP(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let j=f.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),M=f.useMemo(()=>({reference:x,floating:S}),[x,S]),N=f.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=uP(M.floating,u.x),r=uP(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...lP(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:A,refs:j,elements:M,floatingStyles:N}),[u,A,j,M,N])}var pP=(e,t)=>{let n=nP(e);return{name:n.name,fn:n.fn,options:[e,t]}},mP=(e,t)=>{let n=rP(e);return{name:n.name,fn:n.fn,options:[e,t]}},hP=(e,t)=>{let n=iP(e);return{name:n.name,fn:n.fn,options:[e,t]}},gP=(e,t)=>{let n=aP(e);return{name:n.name,fn:n.fn,options:[e,t]}},_P=`ArrowLeft`,vP=`ArrowRight`,yP=`ArrowUp`,bP=`ArrowDown`,xP=[_P,vP],SP=[yP,bP];[...xP,...SP];var CP={...f},wP=!1,TP=0,EP=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+TP++;function DP(){let[e,t]=f.useState(()=>wP?EP():void 0);return oN(()=>{e??t(EP())},[]),f.useEffect(()=>{wP=!0},[]),e}var OP=CP.useId||DP;function kP(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var AP=f.createContext(null),jP=f.createContext(null),MP=()=>f.useContext(AP)?.id||null,NP=()=>f.useContext(jP);function PP(e){return`data-floating-ui-`+e}var FP={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`fixed`,whiteSpace:`nowrap`,width:`1px`,top:0,left:0},IP=f.forwardRef(function(e,t){let[n,r]=f.useState();oN(()=>{nN()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[PP(`focus-guard`)]:``,style:FP};return(0,R.jsx)(`span`,{...e,...i})}),LP={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},RP=f.createContext(null),zP=PP(`portal`);function BP(e){e===void 0&&(e={});let{id:t,root:n}=e,r=OP(),i=HP(),[a,o]=f.useState(null),s=f.useRef(null);return oN(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),oN(()=>{if(!r||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(zP,``),e.appendChild(n),s.current=n,o(n)},[t,r]),oN(()=>{if(n===null||!r||s.current)return;let e=n||i?.portalNode;e&&!Pj(e)&&(e=e.current),e||=document.body;let a=null;t&&(a=document.createElement(`div`),a.id=t,e.appendChild(a));let c=document.createElement(`div`);c.id=r,c.setAttribute(zP,``),e=a||e,e.appendChild(c),s.current=c,o(c)},[t,n,r,i]),a}function VP(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=BP({id:n,root:r}),[o,s]=f.useState(null),c=f.useRef(null),l=f.useRef(null),u=f.useRef(null),d=f.useRef(null),p=o?.modal,m=o?.open,h=!!o&&!o.modal&&o.open&&i&&!!(r||a);return f.useEffect(()=>{if(!a||!i||p)return;function e(e){a&&pN(e)&&(e.type===`focusin`?hN:mN)(a)}return a.addEventListener(`focusin`,e,!0),a.addEventListener(`focusout`,e,!0),()=>{a.removeEventListener(`focusin`,e,!0),a.removeEventListener(`focusout`,e,!0)}},[a,i,p]),f.useEffect(()=>{a&&(m||hN(a))},[m,a]),(0,R.jsxs)(RP.Provider,{value:f.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[h&&a&&(0,R.jsx)(IP,{"data-type":`outside`,ref:c,onFocus:e=>{if(pN(e,a)){var t;(t=u.current)==null||t.focus()}else fN(o?o.domReference:null)?.focus()}}),h&&a&&(0,R.jsx)(`span`,{"aria-owns":a.id,style:LP}),a&&gN.createPortal(t,a),h&&a&&(0,R.jsx)(IP,{"data-type":`outside`,ref:l,onFocus:e=>{if(pN(e,a)){var t;(t=d.current)==null||t.focus()}else dN(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var HP=()=>f.useContext(RP);function UP(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=OP(),a=f.useRef({}),[o]=f.useState(()=>kP()),s=MP()!=null,[c,l]=f.useState(r.reference),u=cN((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=f.useMemo(()=>({setPositionReference:l}),[]),p=f.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return f.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:p,events:o,floatingId:i,refs:d}),[t,u,p,o,i,d])}function WP(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=UP({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=f.useState(null),[l,u]=f.useState(null),d=o?.domReference||s,p=f.useRef(null),m=NP();oN(()=>{d&&(p.current=d)},[d]);let h=fP({...n,elements:{...o,...l&&{reference:l}}}),g=f.useCallback(e=>{let t=Fj(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),h.refs.setReference(t)},[h.refs]),_=f.useCallback(e=>{(Fj(e)||e===null)&&(p.current=e,c(e)),(Fj(h.refs.reference.current)||h.refs.reference.current===null||e!==null&&!Fj(e))&&h.refs.setReference(e)},[h.refs]),v=f.useMemo(()=>({...h.refs,setReference:_,setPositionReference:g,domReference:p}),[h.refs,_,g]),y=f.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),b=f.useMemo(()=>({...h,...a,refs:v,elements:y,nodeId:r}),[h,v,y,r,a]);return oN(()=>{a.dataRef.current.floatingContext=b;let e=m?.nodesRef.current.find(e=>e.id===r);e&&(e.context=b)}),f.useMemo(()=>({...h,context:b,refs:v,elements:y}),[h,v,y,b])}function GP({anchor:e,id:t,title:n,items:r,selected:i,onSelect:a,onAccept:o,message:s}){let{refs:c,floatingStyles:l,isPositioned:u}=WP({elements:{reference:e.current},placement:`top-start`,whileElementsMounted:tP,middleware:[pP(8),hP(),mP({padding:12}),gP({padding:12,apply({availableHeight:e,availableWidth:t,rects:n,elements:r}){Object.assign(r.floating.style,{maxHeight:`${Math.max(0,Math.min(320,e))}px`,width:`${Math.min(n.reference.width,t)}px`})}})]});return(0,f.useEffect)(()=>{document.getElementById(`${t}-${i}`)?.scrollIntoView({block:`nearest`})},[t,i]),(0,R.jsx)(VP,{children:(0,R.jsxs)(`div`,{ref:c.setFloating,style:{...l,visibility:u?`visible`:`hidden`},className:`z-50 overflow-y-auto rounded-xl border border-sakura-200 bg-base p-1.5 shadow-soft`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-3 gap-y-1 px-3 py-2 text-xs text-ink-500`,children:[(0,R.jsx)(`span`,{children:n}),(0,R.jsx)(`span`,{children:`↑↓ 选择 · Enter / Tab 确认 · Esc 关闭`})]}),(0,R.jsx)(`div`,{id:t,role:`listbox`,tabIndex:-1,"aria-label":n,children:r.map((e,n)=>(0,R.jsxs)(`button`,{type:`button`,role:`option`,id:`${t}-${n}`,"aria-selected":n===i,tabIndex:-1,title:e.description,onMouseDown:e=>e.preventDefault(),onPointerMove:e=>{e.pointerType===`mouse`&&(e.movementX!==0||e.movementY!==0)&&a(n)},onClick:()=>o(n),className:`block w-full rounded-lg px-3 py-2 text-left ${n===i?`bg-sakura-100`:``}`,children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`truncate text-sm text-ink-900`,children:e.label}),e.badge&&(0,R.jsx)(`span`,{className:`shrink-0 rounded-md bg-ink-100 px-1.5 py-0.5 text-xs text-ink-600`,children:e.badge})]}),(0,R.jsx)(`span`,{className:`block truncate text-xs text-ink-500`,children:e.description})]},e.key))}),s&&(0,R.jsx)(`output`,{className:`block break-words px-3 py-2 text-sm text-ink-500`,children:s})]})})}function KP(e,t,n,r,i){let[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)({entries:[],limited:!1}),[l,u]=(0,f.useState)(``),[d,p]=(0,f.useState)(0),m=(0,f.useRef)(0),h=(0,f.useId)(),g=()=>{m.current++,o(null),c({entries:[],limited:!1}),p(0)},_=()=>{let t=e.current;if(!t||!r)return g();let n=Tj(t.value,t.selectionStart);if(!n)return g();a&&n.start===a.start&&n.end===a.end&&n.query===a.query||(m.current++,c({entries:[],limited:!1}),u(`正在查找文件…`),o(n),p(0))};(0,f.useEffect)(()=>{if(!a||!r){o(null);return}let e=new AbortController,t=++m.current,i=setTimeout(()=>{Sj.searchFiles(a.query,n,e.signal).then(n=>{e.signal.aborted||t!==m.current||(c(n),u(n.entries.length?n.limited?`结果较多,请继续输入路径缩小范围`:``:`没有匹配的文件或目录`))}).catch(n=>{!e.signal.aborted&&t===m.current&&u(n instanceof Error?n.message:`查询失败,请重试`)})},120);return()=>{clearTimeout(i),e.abort()}},[a,n,r]);let v=e=>{a&&(i(e,a),g())};return{refresh:_,close:g,keyDown:e=>{if(!a||e.nativeEvent.isComposing)return!1;if(e.key===`Escape`||e.key===`Tab`&&(e.shiftKey||!s.entries.length))return g(),e.key===`Escape`&&e.preventDefault(),e.key===`Escape`;if(e.key===`ArrowDown`||e.key===`ArrowUp`)return e.preventDefault(),p(t=>Math.max(0,Math.min(s.entries.length-1,t+(e.key===`ArrowDown`?1:-1)))),!0;if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){e.preventDefault();let t=s.entries[d];return t&&v(t),!0}return!1},panel:a&&r?(0,R.jsx)(GP,{anchor:t,id:h,title:`工作区文件`,selected:d,onSelect:p,onAccept:e=>{let t=s.entries[e];t&&v(t)},items:s.entries.map(e=>({key:e.path,label:`${e.kind===`directory`?`▸`:`▤`} ${e.name}${e.kind===`directory`?`/`:``}`,description:e.path})),message:l}):null,open:!!a,controls:a?h:void 0,active:a&&s.entries[d]?`${h}-${d}`:void 0}}var qP=`(max-width: 768px)`;function JP({name:e,size:t=18,className:n}){return(0,R.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:e===`more`?3:1.6,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,className:n,children:(0,R.jsx)(`path`,{d:{folder:`M3 6h6l2 2h10v11H3z`,plus:`M12 5v14M5 12h14`,chevron:`m8 10 4 4 4-4`,panel:`M3 4h18v16H3zM9 4v16`,search:`M20 20l-5-5M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0`,more:`M5 12h.01M12 12h.01M19 12h.01`,chat:`M4 4h16v12H9l-5 4z`,close:`m6 6 12 12M6 18 18 6`,settings:`M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1M17 12a5 5 0 1 1-10 0 5 5 0 0 1 10 0`,archive:`M3 4h18v4H3zM5 8v12h14V8M10 12h4`,up:`m5 12 7-7 7 7M12 5v14`,bolt:`M13 2 4 14h6l-1 8 9-12h-6l1-8z`,check:`M5 12.5l4.5 4.5L19 7.5`,clock:`M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM12 7v5l3 2`,spinner:`M21 12a9 9 0 1 1-9-9`,store:`M4 9.5 5.6 4.5h12.8L20 9.5M4 9.5V20h16V9.5M4 9.5h16M9.5 20v-5.5h5V20`,key:`M12.7 11.3 21 3m-4.2 1.8 3 3M8 19a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z`,download:`M12 4v10m0 0-4-4m4 4 4-4M5 20h14`,trash:`M4.5 7h15M9.5 7V4.5h5V7m-7.5 0 .8 13h8.4l.8-13`,eye:`M2.5 12S6 6 12 6s9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Zm9.5 2.4a2.4 2.4 0 1 0 0-4.8 2.4 2.4 0 0 0 0 4.8Z`,sparkles:`M12 4l1.8 4.7L18.5 10.5l-4.7 1.8L12 17l-1.8-4.7L5.5 10.5l4.7-1.8zM18.5 3l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8zM5 16l.7 1.8 1.8.7-1.8.7L5 21l-.7-1.8-1.8-.7 1.8-.7z`}[e]})})}function YP(){let[e,t]=(0,f.useState)(()=>window.matchMedia(qP).matches);return(0,f.useEffect)(()=>{let e=window.matchMedia(qP),n=()=>t(e.matches);return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e}var XP=0,ZP=``;function QP(e){let t=(0,f.useRef)(null),n=(0,f.useId)();return(0,f.useEffect)(()=>{let e=document.activeElement,n=t.current;return XP===0&&(ZP=document.body.style.overflow),XP+=1,document.body.style.overflow=`hidden`,n.showModal(),()=>{n.close(),--XP,XP===0&&(document.body.style.overflow=ZP),e?.isConnected&&e.focus()}},[]),(0,gN.createPortal)((0,R.jsxs)(`dialog`,{ref:t,className:`chrome dialog ${e.drawer?`drawer`:``}`,"aria-labelledby":n,onCancel:t=>{t.preventDefault(),e.locked||e.onClose()},onKeyDown:e=>{if(e.key!==`Tab`)return;let t=[...e.currentTarget.querySelectorAll(`button:not(:disabled), input:not(:disabled), a[href], [tabindex='0']`)].filter(e=>e.getClientRects().length>0),n=t[0],r=t.at(-1);e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())},children:[(0,R.jsxs)(`div`,{className:`dialog-heading`,children:[(0,R.jsx)(`h2`,{id:n,children:e.title}),(0,R.jsx)(`button`,{type:`button`,className:`icon-btn`,"aria-label":`关闭`,title:`关闭`,disabled:e.locked,onClick:e.onClose,children:(0,R.jsx)(JP,{name:`close`})})]}),e.children]}),document.body)}function $P(e){let t=(0,f.useRef)(null),n=(0,f.useRef)(e.onClose);n.current=e.onClose;let[r,i]=(0,f.useState)({left:8,top:8});return(0,f.useLayoutEffect)(()=>{let r=t.current,a=()=>{let t=e.anchor.getBoundingClientRect(),n=t.bottom+4+r.offsetHeight>window.innerHeight?Math.max(8,t.top-r.offsetHeight-4):t.bottom+4;i({left:Math.max(8,Math.min(t.left,window.innerWidth-r.offsetWidth-8)),top:n})};a(),r.querySelector(`button:not(:disabled), input, a`)?.focus();let o=t=>{!r.contains(t.target)&&!e.anchor.contains(t.target)&&n.current()};return document.addEventListener(`pointerdown`,o),window.addEventListener(`resize`,a),()=>{document.removeEventListener(`pointerdown`,o),window.removeEventListener(`resize`,a),e.anchor.isConnected&&e.anchor.focus()}},[e.anchor]),(0,gN.createPortal)((0,R.jsx)(`div`,{ref:t,className:`chrome popover`,role:`dialog`,"aria-label":e.label,style:r,onKeyDown:t=>{if(t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),e.onClose()),t.key===`Tab`){e.onClose();return}if(t.key!==`ArrowDown`&&t.key!==`ArrowUp`)return;t.preventDefault();let n=[...t.currentTarget.querySelectorAll(`button:not(:disabled), a`)];n[(n.indexOf(document.activeElement)+(t.key===`ArrowDown`?1:-1)+n.length)%n.length]?.focus()},children:e.children}),e.anchor.closest(`dialog`)??document.body)}var eF=e=>e.split(/[\\/]/).filter(Boolean).at(-1)??e;function tF(e){let{models:t,currentSessionId:n,view:r,phase:i,operating:a}=hj(),[o,s]=(0,f.useState)(null),c=t.find(t=>t.provider===e.current?.provider&&t.modelId===e.current?.modelId);o&&o.id!==n&&s(null);let l=c?.name??e.fallbackLabel;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`button`,{type:`button`,disabled:!c||i!==`ready`||a,onClick:()=>n&&s({id:n}),className:`focus-neko min-w-0 truncate rounded-full px-2 py-1 text-left text-xs text-ink-500 hover:bg-sakura-50`,"aria-label":`模型与思考强度:${l} ${r?.agent.thinkingLevel??``}`,children:[l,` · `,r?.agent.thinkingLevel??`off`,` ▾`]}),o&&o.id===n&&c&&(0,R.jsx)(nF,{session:o.id,current:c,level:r?.agent.thinkingLevel??`off`,onClose:()=>s(e=>e===o?null:e)},o.id)]})}function nF(e){let{models:t}=hj(),[n,r]=(0,f.useState)(e.current),[i,a]=(0,f.useState)(e.level),[o,s]=(0,f.useState)(!1),c=(0,f.useRef)(!1),[l,u]=(0,f.useState)(``);async function d(){if(!c.current){c.current=!0,s(!0),u(``);try{await Sj.configure({model:{provider:n.provider,modelId:n.modelId},thinkingLevel:i},e.session),e.onClose()}catch{u(`配置失败,请重试。`)}finally{c.current=!1,s(!1)}}}return(0,R.jsx)(QP,{title:`模型与思考强度`,onClose:e.onClose,children:(0,R.jsxs)(`div`,{className:`space-y-5 p-5`,children:[(0,R.jsx)(`fieldset`,{className:`space-y-2`,"aria-label":`模型`,children:t.map(e=>(0,R.jsxs)(`button`,{type:`button`,disabled:o,"aria-pressed":e===n,onClick:()=>{r(e),a(e.thinkingLevelAdjustments[i])},className:`focus-neko block w-full rounded-xl border px-4 py-3 text-left text-sm ${e===n?`border-sakura-300 bg-sakura-50 text-sakura-800`:`border-sakura-200 bg-surface text-ink-700`}`,children:[e.name,e===n?` ✓`:``,(0,R.jsx)(`span`,{className:`mt-1 block text-xs text-ink-500`,children:e.input.includes(`image`)?`支持图片`:`仅文本`})]},`${e.provider}/${e.modelId}`))}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`mb-2 text-sm text-ink-600`,children:`思考强度`}),(0,R.jsx)(`fieldset`,{className:`flex flex-wrap gap-2`,"aria-label":`思考强度`,children:n.supportedThinkingLevels.map(e=>(0,R.jsx)(`button`,{type:`button`,disabled:o,"aria-pressed":i===e,onClick:()=>a(e),className:`focus-neko rounded-full border px-4 py-2 text-sm ${e===i?`border-tianyi-300 bg-tianyi-50 text-tianyi-800`:`border-sakura-200`}`,children:e},e))})]}),(0,R.jsx)(`p`,{className:`text-xs text-ink-500`,children:`仅当前会话,从下一次请求生效。`}),l&&(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-sakura-800`,children:l}),(0,R.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:e.onClose,className:`btn-outline rounded-full px-4 py-2 text-sm`,children:`取消`}),(0,R.jsx)(`button`,{type:`button`,disabled:o,onClick:()=>void d(),className:`btn-primary rounded-full px-5 py-2 text-sm`,children:o?`应用中…`:`应用`})]})]})})}var rF=new Map,iF=new Set,aF=e=>(iF.add(e),()=>{iF.delete(e)});function oF(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function sF(e){return`$${e.toFixed(e>=1?2:4)}`}function cF(e){let{currentSessionId:t,workspaceRoot:n}=hj();return(0,R.jsx)(uF,{sessionId:t??`none:${n}`,...e},t??`none:${n}`)}function lF({file:e}){let[t,n]=(0,f.useState)(``);return(0,f.useEffect)(()=>{let t=URL.createObjectURL(e);return n(t),()=>URL.revokeObjectURL(t)},[e]),(0,R.jsx)(`img`,{src:t||void 0,alt:e.name,className:`h-16 w-20 rounded-lg object-cover`})}function uF(e){let{credentials:t,view:n,models:r,workspaceRoot:i,phase:a,operating:o}=hj(),s=n?.compaction?.active??[];rF.has(e.sessionId)||rF.set(e.sessionId,{text:``,files:[],requestId:crypto.randomUUID()});let c=(0,f.useSyncExternalStore)(aF,()=>rF.get(e.sessionId)),[l,u]=(0,f.useState)(!1),[d,p]=(0,f.useState)(``),[m,h]=(0,f.useState)(!1),[g,_]=(0,f.useState)([]),[v,y]=(0,f.useState)(0),[b,x]=(0,f.useState)(``),S=(0,f.useId)(),[C,w]=(0,f.useState)(!1),T=(0,f.useRef)(null),E=(0,f.useRef)(null),D=(0,f.useRef)(null),O=(0,f.useRef)(c);O.current=c;let k=(0,f.useRef)(!1),A=t=>{O.current=t,rF.set(e.sessionId,t);for(let e of iF)e()},ee=e=>A({...O.current,...e,requestId:crypto.randomUUID()}),j=n?.agent.model?.provider===`deepseek`&&t?.statuses.deepseek.source===`none`,M=r.find(e=>e.provider===n?.agent.model?.provider&&e.modelId===n?.agent.model?.modelId),N=c.files.length>0&&M!==void 0&&!M.input.includes(`image`),te=e=>{let t=e.map(e=>({id:crypto.randomUUID(),file:e,processing:!0,error:[`image/png`,`image/jpeg`,`image/webp`].includes(e.type)?e.size>20971520?`单图不能超过 20 MiB`:void 0:`仅支持 PNG、JPEG、WebP`}));ee({files:[...O.current.files,...t]});for(let e of t)ne(e)},ne=async t=>{let n=t.error;if(!n)try{(await createImageBitmap(t.file)).close()}catch{n=`无法解码图片,请重新选择`}let r=rF.get(e.sessionId);if(!r?.files.some(e=>e.id===t.id))return;let i={...r,files:r.files.map(e=>e.id===t.id?{...e,error:n,processing:!1}:e)};A(i)},re=(0,f.useRef)(null),ie=(0,f.useRef)(!1);(0,f.useEffect)(()=>()=>{ie.current||re.current?.abort()},[]),(0,f.useEffect)(()=>{if(_([]),y(0),!m)return;if(e.sessionId.startsWith(`none:`)){x(`新建会话后可选择工作区技能`);return}if(a!==`ready`||o){x(`等待会话连接…`);return}let t=new AbortController;return x(`正在加载技能…`),Sj.listSkills(e.sessionId,t.signal).then(e=>{t.signal.aborted||(_(e),x(e.length?``:`当前工作区暂无可用技能`))}).catch(()=>{t.signal.aborted||x(`技能加载失败,请关闭菜单后重试`)}),()=>t.abort()},[e.sessionId,a,o,m]);let ae=KP(T,E,i,a===`ready`&&!o,(t,n)=>{let r=O.current;if(t.kind===`file`&&/\.(png|jpe?g|webp)$/i.test(t.path)){if(re.current)return;let a=new AbortController;re.current=a,p(`正在读取图片…`),(async()=>{let o=e.sessionId;if(o.startsWith(`none:`)){ie.current=!0,await Sj.createSession();let e=gj();if(e.workspaceRoot!==i||!e.currentSessionId)throw Error(`工作区已切换`);o=e.currentSessionId,rF.set(o,r);for(let e of iF)e()}let s=await Sj.workspaceImage(t.path,o,a.signal);if(a.signal.aborted||gj().currentSessionId!==o||gj().workspaceRoot!==i)return;let c=rF.get(o)??r,l={id:crypto.randomUUID(),file:new File([new Uint8Array(s.bytes)],s.name,{type:s.mimeType})},u=c.text===r.text?r.text.slice(0,n.start)+r.text.slice(n.end):c.text;rF.set(o,{...c,text:u,files:[...c.files,l],requestId:crypto.randomUUID()});for(let e of iF)e();p(``)})().catch(e=>{if(!a.signal.aborted){let t=e instanceof Error?e.message:`图片读取失败,请重试`;p(t),ie.current&&_j.notice({level:`error`,text:t})}}).finally(()=>{re.current===a&&(re.current=null)});return}let a=Dj(r.text,n,t.path,t.kind===`directory`),o=T.current;if(o){o.focus(),o.setSelectionRange(n.start,n.end);let e=a.text.slice(n.start,a.text.length-(r.text.length-n.end));document.execCommand(`insertText`,!1,e)?ee({text:o.value}):ee({text:a.text}),requestAnimationFrame(()=>{o.setSelectionRange(a.cursor,a.cursor),t.kind===`directory`&&ae.refresh()})}}),P=n?.contextUsage,oe=n?.compaction?.latest,se=oe&&![`summarizing`,`waiting-to-apply`].includes(oe.phase)?oe.at+(oe.phase===`failed`?1e4:5e3):null,[ce,le]=(0,f.useState)(se!==null&&se<=Date.now());(0,f.useEffect)(()=>{if(le(se!==null&&se<=Date.now()),se===null||se<=Date.now())return;let e=setTimeout(()=>le(!0),se-Date.now());return()=>clearTimeout(e)},[se]);let ue=s.length?s.some(e=>e.retry)?`压缩重试中`:s.some(e=>e.blocking)?`等待上下文压缩`:`正在压缩上下文`:oe&&!ce?{applied:`上下文已压缩`,nothing:`当前无需压缩`,skipped:`已跳过过期摘要`,cancelled:`压缩已取消`,failed:`压缩失败,可重试`,summarizing:`正在压缩上下文`,"waiting-to-apply":`等待应用压缩摘要`}[oe.phase]:null,de=!s.length&&oe?.phase===`failed`,fe=n?.usage??null,pe=async t=>{if(k.current||e.disabled)return;k.current=!0,u(!0),p(``);let n=O.current;rF.set(e.sessionId,n);try{await Sj.compact(t,e.sessionId),O.current===n&&rF.get(e.sessionId)===n&&GA(n.text)!==null&&A({...n,text:``,requestId:crypto.randomUUID()}),h(!1)}catch(e){p(e instanceof Error?e.message:`压缩失败,请重试`)}finally{k.current=!1,u(!1)}},F=async()=>{let t=GA(O.current.text);if(t!==null){await pe(t);return}let n=O.current;if(rF.set(e.sessionId,n),!(k.current||e.disabled||e.busy||j||N||!n.text.trim()&&!n.files.length)){if(n.files.length>4||n.files.reduce((e,t)=>e+t.file.size,0)>41943040)p(`每条消息最多 4 张图片,总大小不超过 40 MiB`);else if(!n.files.some(e=>e.processing)){if(n.files.some(e=>e.error))p(`请先移除不支持的附件`);else{k.current=!0,u(!0),p(``);try{let t=[];for(let e of n.files)t.push({name:e.file.name,mimeType:e.file.type,bytes:new Uint8Array(await e.file.arrayBuffer())});let r=e.sessionId;if(r.startsWith(`none:`)){await Sj.createSession();let e=gj();if(e.workspaceRoot!==i||!e.currentSessionId)throw Error(`工作区已切换,草稿已保留`);r=e.currentSessionId,rF.set(r,n);for(let e of iF)e()}if(await Sj.submit(n.text.trim(),t,n.requestId,r),r!==e.sessionId){rF.set(r,{text:``,files:[],requestId:crypto.randomUUID()});for(let e of iF)e()}let a=rF.get(e.sessionId);a&&A({text:a.text===n.text?``:a.text,files:a.files.filter(e=>!n.files.some(t=>t.id===e.id)),requestId:crypto.randomUUID()})}catch(t){let n=t instanceof Error?t.message:`发送失败,请重试`;p(n),gj().currentSessionId!==e.sessionId&&_j.notice({level:`error`,text:n})}finally{k.current=!1,u(!1)}}}}},I=kj(c.text,g),me=Math.min(v,Math.max(0,I.length-1)),he=(e=me)=>{let t=I[e];t&&(ee({text:`${t.label} `}),h(!1),T.current?.focus())},ge=e.busy||s.some(e=>e.reason===`manual`||e.blocking);return(0,R.jsx)(`section`,{"aria-label":`消息输入`,className:`relative shrink-0 px-3 pt-1 pb-3 sm:px-4 sm:pb-4`,onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),w(!0))},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||w(!1)},onDrop:e=>{e.preventDefault(),w(!1),te(Array.from(e.dataTransfer.files))},children:(0,R.jsxs)(`div`,{className:`chat-column`,children:[(0,R.jsxs)(`div`,{ref:E,className:`composer-card ${ge?`is-busy`:``} ${C?`ring-2 ring-sakura-300`:``}`,children:[(0,R.jsxs)(`div`,{className:`flex flex-col gap-1 px-4 pt-2.5 empty:pt-0`,children:[C&&(0,R.jsx)(`p`,{className:`text-sm text-sakura-700`,children:`松开以添加图片,不会自动发送`}),j&&(0,R.jsxs)(`p`,{className:`text-sm text-sakura-700`,children:[`尚未配置 DeepSeek Key。`,(0,R.jsx)(Pr,{to:`/settings`,className:`focus-neko underline`,children:`前往设置`})]}),N&&(0,R.jsx)(`p`,{className:`text-sm text-sakura-700`,children:`当前模型不支持图片,请切换模型或移除附件。`}),!M?.input.includes(`image`)&&n?.items.some(e=>e.type===`user`&&e.images?.length)&&(0,R.jsx)(`p`,{className:`text-xs text-ink-500`,children:`当前模型无法查看历史原图,仍可使用已有文字分析。`}),d&&(0,R.jsx)(`p`,{role:`alert`,className:`break-words text-sm text-sakura-700`,children:d})]}),!!c.files.length&&(0,R.jsx)(`ul`,{className:`flex max-h-40 flex-wrap gap-2 overflow-y-auto px-4 pt-2.5`,children:c.files.map(e=>(0,R.jsxs)(`li`,{className:`relative w-28 rounded-xl border border-sakura-200 bg-base p-2`,children:[(0,R.jsx)(lF,{file:e.file}),(0,R.jsx)(`span`,{className:`block truncate text-xs`,title:e.file.name,children:e.file.name}),e.processing&&(0,R.jsx)(`span`,{className:`text-xs text-ink-500`,children:`检查图片…`}),e.error&&(0,R.jsx)(`span`,{className:`text-xs text-sakura-700`,children:e.error}),(0,R.jsx)(`button`,{type:`button`,"aria-label":`移除 ${e.file.name}`,className:`focus-neko absolute right-0 top-0 rounded-full bg-base px-1`,onClick:()=>ee({files:O.current.files.filter(t=>t.id!==e.id)}),children:`×`})]},e.id))}),(0,R.jsx)(`textarea`,{ref:T,disabled:e.disabled,value:c.text,rows:1,placeholder:`输入消息,@ 引用文件,/ 命令`,"aria-label":`消息输入`,"aria-autocomplete":`list`,"aria-controls":ae.controls??(m?S:void 0),"aria-activedescendant":ae.active??(m&&I.length?`${S}-${me}`:void 0),onClick:e=>{ae.refresh(),h(Oj(e.currentTarget.value))},onBlur:()=>{ae.close(),h(!1)},onCompositionStart:()=>{ae.close(),h(!1)},onCompositionEnd:e=>{ae.refresh(),h(Oj(e.currentTarget.value))},className:`max-h-40 min-h-10 min-w-0 w-full resize-none bg-transparent px-4 py-2 text-base text-ink-900 focus:outline-none`,onChange:e=>{ee({text:e.target.value}),y(0),h(!e.nativeEvent.isComposing&&Oj(e.target.value)),e.nativeEvent.isComposing||ae.refresh(),e.target.style.height=`auto`,e.target.style.height=`${Math.min(e.target.scrollHeight,160)}px`},onPaste:e=>{let t=Array.from(e.clipboardData.files);t.length&&(e.preventDefault(),te(t))},onKeyDown:e=>{e.nativeEvent.isComposing||ae.keyDown(e)||(e.key===`Escape`&&m?(e.preventDefault(),h(!1)):m&&(e.key===`ArrowDown`||e.key===`ArrowUp`)?(e.preventDefault(),y(Math.max(0,Math.min(I.length-1,me+(e.key===`ArrowDown`?1:-1))))):m&&e.key===`Tab`?!e.shiftKey&&I.length?(e.preventDefault(),he()):h(!1):e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),m&&I.length?he():(h(!1),F())))}}),(0,R.jsxs)(`div`,{className:`composer-toolbar flex flex-wrap items-center gap-x-1 gap-y-1 border-t border-sakura-100 px-2 py-1.5`,children:[(0,R.jsx)(`input`,{ref:D,type:`file`,accept:`image/png,image/jpeg,image/webp`,multiple:!0,hidden:!0,onChange:e=>{te(Array.from(e.target.files??[])),e.target.value=``}}),(0,R.jsx)(`button`,{type:`button`,"aria-label":`添加图片`,title:`添加图片(最多 4 张)`,disabled:e.disabled,onClick:()=>D.current?.click(),className:`focus-neko inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-ink-600 hover:bg-sakura-50`,children:(0,R.jsx)(JP,{name:`plus`})}),(0,R.jsx)(`button`,{type:`button`,"aria-label":`输入操作菜单`,"aria-expanded":m,className:`focus-neko inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-ink-500 hover:bg-sakura-50`,onClick:()=>{ae.close(),h(!m),T.current?.focus()},children:(0,R.jsx)(JP,{name:`more`})}),(0,R.jsx)(`div`,{className:`min-w-0 max-w-64 [&>button]:max-w-full`,children:(0,R.jsx)(tF,{current:n?.agent.model??null,fallbackLabel:n?.model??`…`})}),P&&P.window>0&&(0,R.jsxs)(`span`,{className:`shrink-0 rounded-full bg-tianyi-50 px-2 py-1 font-mono text-xs ${P.percent!==null&&P.percent>90?`text-sakura-700 font-semibold`:`text-ink-600`}`,title:P.tokens===null?`暂无有效用量;首次回答或压缩后的新回答完成后更新`:`最近一次成功回答的上下文用量:${P.tokens} / ${P.window} tokens;非会话累计用量`,children:[`Ctx `,P.percent===null?`?`:`${P.percent.toFixed(1)}%`,`/`,oF(P.window)]}),(0,R.jsx)(`output`,{"aria-live":`polite`,"aria-atomic":`true`,className:`contents`,children:ue&&(0,R.jsx)(`span`,{className:`max-w-full whitespace-nowrap rounded-full border px-2 py-1 text-xs ${de?`border-sakura-300 bg-sakura-50 text-sakura-700`:`border-tianyi-200 bg-tianyi-50 text-ink-600`}`,title:oe?.phase===`nothing`&&!s.length?`保留近期上下文,暂无可压缩的旧内容;默认保留最近约 20,000 tokens`:void 0,children:ue})}),(0,R.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[e.busy&&e.status!==null&&(0,R.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-64 items-center gap-1.5 text-xs font-medium text-sakura-700`,title:e.status,children:[(0,R.jsxs)(`span`,{className:`dots shrink-0`,"aria-hidden":!0,children:[(0,R.jsx)(`span`,{}),(0,R.jsx)(`span`,{}),(0,R.jsx)(`span`,{})]}),(0,R.jsx)(`span`,{className:`truncate`,children:e.status.replace(/\.\.\.$/,``)})]}),fe!==null&&(0,R.jsxs)(`button`,{type:`button`,className:`telemetry focus-neko shrink-0 rounded-full px-1.5 py-1 font-mono text-xs text-ink-500`,"aria-label":`用量:输入 ${fe.input},输出 ${fe.output},缓存读 ${fe.cacheRead},成本 ${sF(fe.cost)}`,children:[`↑`,oF(fe.input),` ↓`,oF(fe.output),(0,R.jsxs)(`span`,{className:`telemetry-detail`,"aria-hidden":!0,children:[`输入 `,fe.input,` · 输出 `,fe.output,` · 缓存读 `,fe.cacheRead,` · `,sF(fe.cost)]})]}),(0,R.jsx)(`button`,{type:`button`,disabled:l||e.disabled||!c.text.trim()&&!c.files.length||GA(c.text)===null&&(e.busy||j||N||c.files.some(e=>!!e.error||e.processing)),onClick:()=>void F(),className:`btn-primary focus-neko h-10 shrink-0 rounded-full px-3 text-sm disabled:opacity-50`,children:l?`处理中`:`发送`}),ge&&(0,R.jsx)(`button`,{type:`button`,onClick:()=>Sj.abort(),className:`btn-stop focus-neko h-10 rounded-full px-2 text-sm`,title:`中止当前会话运行及可中止任务`,children:`停止`})]})]})]}),ae.panel,m&&!ae.open&&(0,R.jsx)(GP,{anchor:E,id:S,title:`输入命令`,items:I,selected:me,onSelect:y,message:b||(I.length?void 0:`没有匹配的命令或技能`),onAccept:he})]})})}var dF=e=>e.replace(/'/g,`'`).replace(/"/g,`"`).replace(/>/g,`>`).replace(/</g,`<`).replace(/&/g,`&`),fF=e=>{let t=/^<skill name="([^"]*)" location="([^"]*)">/.exec(e);if(!t)return null;let n=e.lastIndexOf(`</skill>`);if(n<t[0].length)return null;let r=e.slice(n+8);return r!==``&&!r.startsWith(`
|
|
19
|
-
|
|
20
|
-
`)?null:{name:dF(t[1]),location:dF(t[2]),body:e.slice(t[0].length,n),args:r.slice(2)}};function pF({image:e}){let{currentSessionId:t,phase:n}=hj(),[r,i]=(0,f.useState)(``),[a,o]=(0,f.useState)(``),[s,c]=(0,f.useState)(!1),[l,u]=(0,f.useState)(0),d=(0,f.useRef)(null);return(0,f.useEffect)(()=>{if(!t)return;i(``);let r=!1,a=``,s=!1,c=new IntersectionObserver(c=>{!s&&c.some(e=>e.isIntersecting)&&n===`ready`&&(s=!0,Sj.image(e.entryId,e.contentIndex,t).then(e=>{r||(a=URL.createObjectURL(new Blob([e.bytes],{type:e.mimeType})),i(a),o(``))}).catch(()=>{r||o(`图片加载失败,点击重试`)}))});return d.current&&c.observe(d.current),()=>{r=!0,c.disconnect(),a&&URL.revokeObjectURL(a)}},[t,n,e.entryId,e.contentIndex,l]),(0,R.jsxs)(`div`,{ref:d,className:`max-w-full`,children:[(0,R.jsx)(`button`,{type:`button`,"aria-label":`查看图片 ${e.name}`,className:`focus-neko max-w-full rounded-xl border border-sakura-200 p-1`,onClick:()=>{a?(o(``),u(l+1)):r&&c(!0)},children:r?(0,R.jsx)(`img`,{src:r,alt:e.name,className:`max-h-40 max-w-full rounded-lg object-contain`}):(0,R.jsx)(`span`,{className:`text-sm`,children:a||`加载图片…`})}),s&&r&&(0,R.jsxs)(QP,{title:e.name,onClose:()=>c(!1),children:[(0,R.jsx)(`div`,{className:`min-h-0 overflow-auto bg-surface p-3 sm:p-4`,children:(0,R.jsx)(`img`,{src:r,alt:e.name,className:`max-h-[65dvh] w-full rounded-lg object-contain`})}),(0,R.jsx)(`div`,{className:`flex shrink-0 justify-end border-t border-sakura-200 bg-surface px-4 py-3`,children:(0,R.jsxs)(`a`,{href:r,download:e.name,className:`btn-primary focus-neko inline-flex min-h-10 items-center gap-2 rounded-full px-5 py-2 text-sm font-medium no-underline`,children:[(0,R.jsx)(`svg`,{"aria-hidden":`true`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,children:(0,R.jsx)(`path`,{d:`M12 3v12m-5-5 5 5 5-5M4 16v4h16v-4`})}),`保存图片`]})})]})]})}function mF({images:e}){return(0,R.jsx)(`div`,{className:`my-2 flex flex-wrap gap-2`,children:e.map(e=>(0,R.jsx)(pF,{image:e},`${e.entryId}:${e.contentIndex}`))})}function hF(e,t){this.v=e,this.k=t}function gF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _F(e){if(Array.isArray(e))return e}function vF(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function yF(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
21
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bF(e,t){return _F(e)||vF(e,t)||xF(e,t)||yF()}function xF(e,t){if(e){if(typeof e==`string`)return gF(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gF(e,t):void 0}}function SF(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof hF;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}SF.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},SF.prototype.next=function(e){return this._invoke(`next`,e)},SF.prototype.throw=function(e){return this._invoke(`throw`,e)},SF.prototype.return=function(e){return this._invoke(`return`,e)};var CF=Object.entries,wF=Object.setPrototypeOf,TF=Object.isFrozen,EF=Object.getPrototypeOf,DF=Object.getOwnPropertyDescriptor,OF=Object.freeze,kF=Object.seal,AF=Object.create,jF=typeof Reflect<`u`&&Reflect,MF=jF.apply,NF=jF.construct;OF||=function(e){return e},kF||=function(e){return e},MF||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},NF||=function(e){return new e(...[...arguments].slice(1))};var PF=eI(Array.prototype.forEach);Array.prototype.indexOf;var FF=eI(Array.prototype.lastIndexOf),IF=eI(Array.prototype.pop),LF=eI(Array.prototype.push);Array.prototype.slice;var RF=eI(Array.prototype.splice),zF=Array.isArray,BF=eI(String.prototype.toLowerCase),VF=eI(String.prototype.toString),HF=eI(String.prototype.match),UF=eI(String.prototype.replace),WF=eI(String.prototype.indexOf),GF=eI(String.prototype.trim),KF=eI(Number.prototype.toString),qF=eI(Boolean.prototype.toString),JF=typeof BigInt>`u`?null:eI(BigInt.prototype.toString),YF=typeof Symbol>`u`?null:eI(Symbol.prototype.toString),XF=eI(Object.prototype.hasOwnProperty),ZF=eI(Object.prototype.toString),QF=eI(RegExp.prototype.test),$F=tI(TypeError);function eI(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return MF(e,t,n)}}function tI(e){return function(){return NF(e,[...arguments])}}function nI(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:BF;if(wF&&wF(e,null),!zF(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(TF(t)||(t[r]=e),i=e)}e[i]=!0}return e}function rI(e){for(let t=0;t<e.length;t++)XF(e,t)||(e[t]=null);return e}function iI(e){let t=AF(null);for(let r of CF(e)){var n=bF(r,2);let i=n[0],a=n[1];XF(e,i)&&(t[i]=zF(a)?rI(a):a&&typeof a==`object`&&a.constructor===Object?iI(a):a)}return t}function aI(e){switch(typeof e){case`string`:return e;case`number`:return KF(e);case`boolean`:return qF(e);case`bigint`:return JF?JF(e):`0`;case`symbol`:return YF?YF(e):`Symbol()`;case`undefined`:return ZF(e);case`function`:case`object`:{if(e===null)return ZF(e);let t=e,n=oI(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:ZF(e)}return ZF(e)}default:return ZF(e)}}function oI(e,t){for(;e!==null;){let n=DF(e,t);if(n){if(n.get)return eI(n.get);if(typeof n.value==`function`)return eI(n.value)}e=EF(e)}function n(){return null}return n}function sI(e){try{return QF(e,``),!0}catch{return!1}}var cI=OF(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),lI=OF(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),uI=OF([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),dI=OF([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),fI=OF(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),pI=OF([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),mI=OF([`#text`]),hI=OF(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),gI=OF(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),_I=OF(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),vI=OF([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),yI=kF(/{{[\w\W]*|^[\w\W]*}}/g),bI=kF(/<%[\w\W]*|^[\w\W]*%>/g),xI=kF(/\${[\w\W]*/g),SI=kF(/^data-[\-\w.\u00B7-\uFFFF]+$/),CI=kF(/^aria-[\-\w]+$/),wI=kF(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),TI=kF(/^(?:\w+script|data):/i),EI=kF(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DI=kF(/^html$/i),OI=kF(/^[a-z][.\w]*(-[.\w]+)+$/i),kI=kF(/<[/\w!]/g),AI=kF(/<[/\w]/g),jI=kF(/<\/no(script|embed|frames)/i),MI=kF(/\/>/i),NI={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},PI=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],FI=OF(nI({},PI)),II=function(){let e={};return PF(PI,t=>{e[t]=kF(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),OF(e)}(),LI=function(){return typeof window>`u`?null:window},RI=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},zI=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},BI=function(e,t,n,r){return XF(e,t)&&zF(e[t])?nI(r.base?iI(r.base):{},e[t],r.transform):n},VI=function(e,t,n){let r=XF(e,t)?e[t]:void 0;return r&&typeof r==`object`?iI(r):n()};function HI(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:LI(),t=e=>HI(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==NI.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=oI(d,`cloneNode`),p=oI(d,`remove`),m=oI(d,`removeAttributeNode`),h=oI(d,`nextSibling`),g=oI(d,`childNodes`),_=oI(d,`parentNode`),v=oI(d,`shadowRoot`),y=oI(d,`attributes`),b=o&&o.prototype?oI(o.prototype,`nodeType`):null,x=o&&o.prototype?oI(o.prototype,`nodeName`):null,S=o&&o.prototype?oI(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,D,O=!1,k=0,A=function(){if(k>0)throw $F(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ee=function(e){A(),k++;try{return T.createHTML(e)}finally{k--}},j=function(e){A(),k++;try{return T.createScriptURL(e)}finally{k--}},M=function(){return O||=(D=RI(u,i),!0),D},N=n,te=N.implementation,ne=N.createNodeIterator,re=N.createDocumentFragment,ie=N.getElementsByTagName,ae=r.importNode,P=zI();t.isSupported=typeof CF==`function`&&typeof _==`function`&&te&&te.createHTMLDocument!==void 0;let oe=yI,se=bI,ce=xI,le=SI,ue=CI,de=TI,fe=EI,pe=OI,F=wI,I=null,me=nI({},[...cI,...lI,...uI,...fI,...mI]),he=null,ge=nI({},[...hI,...gI,..._I,...vI]),_e=Object.seal(AF(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,ye=null,be=Object.seal(AF(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),xe=!0,Se=!0,Ce=!1,we=!0,Te=!1,Ee=!0,De=!1,Oe=!1,ke=null,Ae=null,je=!1,Me=!1,Ne=!1,Pe=!1,Fe=!0,Ie=!1,Le=`user-content-`,Re=!0,ze=!1,Be={},Ve=null,He=nI({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ue=null,We=nI({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ge=null,Ke=nI({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),qe=`http://www.w3.org/1998/Math/MathML`,Je=`http://www.w3.org/2000/svg`,Ye=`http://www.w3.org/1999/xhtml`,Xe=Ye,Ze=!1,Qe=null,$e=nI({},[qe,Je,Ye],VF),et=OF([`mi`,`mo`,`mn`,`ms`,`mtext`]),tt=nI({},et),nt=OF([`annotation-xml`]),rt=nI({},nt),it=nI({},[`title`,`style`,`font`,`a`,`script`]),at=null,ot=[`application/xhtml+xml`,`text/html`],st=null,ct=null,lt=n.createElement(`form`),ut=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ct&&ct===e)return;(!e||typeof e!=`object`)&&(e={}),e=iI(e),at=ot.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,st=at===`application/xhtml+xml`?VF:BF,I=BI(e,`ALLOWED_TAGS`,me,{transform:st}),he=BI(e,`ALLOWED_ATTR`,ge,{transform:st}),Qe=BI(e,`ALLOWED_NAMESPACES`,$e,{transform:VF}),Ge=BI(e,`ADD_URI_SAFE_ATTR`,Ke,{transform:st,base:Ke}),Ue=BI(e,`ADD_DATA_URI_TAGS`,We,{transform:st,base:We}),Ve=BI(e,`FORBID_CONTENTS`,He,{transform:st}),ve=BI(e,`FORBID_TAGS`,iI({}),{transform:st}),ye=BI(e,`FORBID_ATTR`,iI({}),{transform:st}),Be=XF(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?iI(e.USE_PROFILES):e.USE_PROFILES:!1,xe=e.ALLOW_ARIA_ATTR!==!1,Se=e.ALLOW_DATA_ATTR!==!1,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=e.SAFE_FOR_TEMPLATES||!1,Ee=e.SAFE_FOR_XML!==!1,De=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,Ne=e.RETURN_DOM_FRAGMENT||!1,Pe=e.RETURN_TRUSTED_TYPE||!1,je=e.FORCE_BODY||!1,Fe=e.SANITIZE_DOM!==!1,Ie=e.SANITIZE_NAMED_PROPS||!1,Re=e.KEEP_CONTENT!==!1,ze=e.IN_PLACE||!1,F=sI(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:wI,Xe=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ye,tt=VI(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>nI({},et)),rt=VI(e,`HTML_INTEGRATION_POINTS`,()=>nI({},nt));let t=VI(e,`CUSTOM_ELEMENT_HANDLING`,()=>AF(null));if(_e=AF(null),XF(t,`tagNameCheck`)&&ut(t.tagNameCheck)&&(_e.tagNameCheck=t.tagNameCheck),XF(t,`attributeNameCheck`)&&ut(t.attributeNameCheck)&&(_e.attributeNameCheck=t.attributeNameCheck),XF(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(_e.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),kF(_e),Te&&(Se=!1),Ne&&(Me=!0),Be&&(I=nI({},mI),he=AF(null),Be.html===!0&&(nI(I,cI),nI(he,hI)),Be.svg===!0&&(nI(I,lI),nI(he,gI),nI(he,vI)),Be.svgFilters===!0&&(nI(I,uI),nI(he,gI),nI(he,vI)),Be.mathMl===!0&&(nI(I,fI),nI(he,_I),nI(he,vI))),be.tagCheck=null,be.attributeCheck=null,XF(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?be.tagCheck=e.ADD_TAGS:zF(e.ADD_TAGS)&&(I===me&&(I=iI(I)),nI(I,e.ADD_TAGS,st))),XF(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?be.attributeCheck=e.ADD_ATTR:zF(e.ADD_ATTR)&&(he===ge&&(he=iI(he)),nI(he,e.ADD_ATTR,st))),XF(e,`ADD_FORBID_CONTENTS`)&&zF(e.ADD_FORBID_CONTENTS)&&(Ve===He&&(Ve=iI(Ve)),nI(Ve,e.ADD_FORBID_CONTENTS,st)),Re&&(I[`#text`]=!0),De&&nI(I,[`html`,`head`,`body`]),I.table&&(nI(I,[`tbody`]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw $F(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw $F(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=ee(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=M()),T&&typeof E==`string`&&(E=ee(``)));OF&&OF(e),ct=e},ft=nI({},[...lI,...uI,...dI]),pt=nI({},[...fI,...pI]),mt=function(e,t,n){return t.namespaceURI===Ye?e===`svg`:t.namespaceURI===qe?e===`svg`&&(n===`annotation-xml`||tt[n]):!!ft[e]},ht=function(e,t,n){return t.namespaceURI===Ye?e===`math`:t.namespaceURI===Je?e===`math`&&rt[n]:!!pt[e]},gt=function(e,t,n){return t.namespaceURI===Je&&!rt[n]||t.namespaceURI===qe&&!tt[n]?!1:!pt[e]&&(it[e]||!ft[e])},_t=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Xe,tagName:`template`});let n=BF(e.tagName),r=BF(t.tagName);return Qe[e.namespaceURI]?e.namespaceURI===Je?mt(n,t,r):e.namespaceURI===qe?ht(n,t,r):e.namespaceURI===Ye?gt(n,t,r):!!(at===`application/xhtml+xml`&&Qe[e.namespaceURI]):!1},vt=function(e){LF(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw $F(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},yt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},bt=function(e){Ct(e);let t=g(e);if(t){let e=[];PF(t,t=>{LF(e,t)}),PF(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&yt(e,r,i)}},xt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}LF(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Me||Ne)try{vt(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},St=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||he[st(i)]||yt(e,r,i)}},Ct=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===NI.element&&St(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},wt=function(e,t){return Ee?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Tt=function(e){if(!Ee)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===NI.processingInstruction||n===NI.comment&&QF(AI,e.data)){try{p(e)}catch{}continue}if(n===NI.element){let t=e,n=st(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&wt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Et=function(e){let t=null,r=null;if(je)e=`<remove></remove>`+e;else{let t=HF(e,/^[\r\n\t ]+/);r=t&&t[0]}at===`application/xhtml+xml`&&Xe===Ye&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?ee(e):e;if(Xe===Ye)try{t=new l().parseFromString(i,at)}catch{}if(!t||!t.documentElement){t=te.createDocument(Xe,`template`,null);try{t.documentElement.innerHTML=Ze?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Xe===Ye?ie.call(t,De?`html`:`body`)[0]:De?t.documentElement:a},Dt=function(e){let t=S?S(e):e.ownerDocument;return ne.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ot=function(e){return e=UF(e,oe,` `),e=UF(e,se,` `),e=UF(e,ce,` `),e},kt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=ne.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Ot(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&PF(i,e=>{jt(e.content)&&kt(e.content)})},At=function(e){let t=x?x(e):null;return typeof t!=`string`||st(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},jt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===NI.documentFragment}catch{return!1}},Mt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Nt(e,n,r){e.length!==0&&PF(e,e=>{e.call(t,n,r,ct)})}let Pt=function(e,t){return!!(Ee&&e.hasChildNodes()&&!Mt(e.firstElementChild)&&QF(kI,e.textContent)&&QF(kI,e.innerHTML)||Ee&&e.namespaceURI===Ye&&FI[t]&&(Mt(e.firstElementChild)||typeof e.textContent==`string`&&QF(II[t],e.textContent))||e.nodeType===NI.processingInstruction||Ee&&e.nodeType===NI.comment&&QF(AI,e.data))},Ft=function(e,t){return e instanceof RegExp?QF(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},It=function(e,t,n){if(!ve[t]&&Ht(t)&&Ft(_e.tagNameCheck,t))return!1;if(Re&&!Ve[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return vt(e),!0},Lt=function(e,t,n,r){return e.length===0?t:t===n||t===r?iI(t):t},Rt=function(e,t){return e===t||_(e)!==null?!1:(ze&&Ct(e),!0)},zt=function(e,n){if(Nt(P.beforeSanitizeElements,e,null),Rt(e,n))return!0;if(At(e))return vt(e),!0;let r=st(w(e));if(I=Lt(P.uponSanitizeElement,I,me,ke),Nt(P.uponSanitizeElement,e,{tagName:r,allowedTags:I}),Rt(e,n))return!0;if(Pt(e,r))return vt(e),!0;if(ve[r]||!(be.tagCheck instanceof Function&&be.tagCheck(r))&&!I[r]){let t=It(e,r,n);return t===!1&&(Nt(P.afterSanitizeElements,e,null),Rt(e,n))?!0:t}if(C(e)===NI.element&&!_t(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&QF(jI,e.innerHTML))return vt(e),!0;if(Te&&e.nodeType===NI.text){let n=Ot(e.textContent);e.textContent!==n&&(LF(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Nt(P.afterSanitizeElements,e,null),Rt(e,n)},Bt=function(e,t,r){if(ye[t]||wt(t,e)||Fe&&(t===`id`||t===`name`)&&(r in n||r in lt))return!1;let i=he[t]||be.attributeCheck instanceof Function&&be.attributeCheck(t,e);return Se&&QF(le,t)||xe&&QF(ue,t)?!0:i?Ge[t]||QF(F,UF(r,fe,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&WF(r,`data:`)===0&&Ue[e]||Ce&&!QF(de,UF(r,fe,``))?!0:!r:Ht(e)&&Ft(_e.tagNameCheck,e)&&Ft(_e.attributeNameCheck,t,e)||t===`is`&&_e.allowCustomizedBuiltInElements&&Ft(_e.tagNameCheck,r)},Vt=nI({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Ht=function(e){return!Vt[BF(e)]&&QF(pe,e)},Ut=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ee(r);case`TrustedScriptURL`:return j(r)}return r},Wt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!At(e)||(vt(e),!1)}catch{return xt(t,e),!1}},Gt=function(e,n){if(Nt(P.beforeSanitizeAttributes,e,null),Rt(e,n))return;let r=e.attributes;if(!r||At(e))return;he=Lt(P.uponSanitizeAttribute,he,ge,Ae);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:he,forceKeepAttr:void 0},a=r.length,o=st(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=st(s),d=l,f=s===`value`?d:GF(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Nt(P.uponSanitizeAttribute,e,i),f=i.attrValue,Ie&&(u===`id`||u===`name`)&&WF(f,Le)!==0&&(xt(s,e,n),f=Le+f,p=!0),Ee&&QF(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)||u===`attributename`&&HF(f,`href`)?xt(s,e,n):i.forceKeepAttr||(i.keepAttr?!we&&QF(MI,f)?xt(s,e,n):(Te&&(f=Ot(f)),Bt(o,u,f)?(f=Ut(o,u,c,f),f!==d&&Wt(e,s,c,f)&&p&&IF(t.removed)):xt(s,e,n)):xt(s,e,n))}Nt(P.afterSanitizeAttributes,e,null),Rt(e,n)},L=function(e){let t=null,n=Dt(e);for(Nt(P.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Nt(P.uponSanitizeShadowNode,t,null),zt(t,e),Gt(t,e),jt(t.content)&&L(t.content),C(t)===NI.element){let e=v(t);jt(e)&&(Kt(e),L(e))}Nt(P.afterSanitizeShadowDOM,e,null)},Kt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){L(e.shadow);continue}let n=e.node,r=C(n)===NI.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&st(e)===`template`){let e=n.content;jt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);jt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ze=!e,Ze&&(e=`<!-->`),typeof e!=`string`&&!Mt(e)&&(e=aI(e),typeof e!=`string`))throw $F(`dirty is not a string, aborting`);if(!t.isSupported)return e;Oe?(I=ke,he=Ae):dt(n),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(I=iI(I)),P.uponSanitizeAttribute.length>0&&(he=iI(he)),t.removed=[];let c=ze&&typeof e!=`string`&&Mt(e);if(c){Tt(e);let t=w(e);if(typeof t==`string`){let n=st(t);if(!I[n]||ve[n])throw bt(e),$F(`root node is forbidden and cannot be sanitized in-place`)}if(At(e))throw bt(e),$F(`root node is clobbered and cannot be sanitized in-place`);try{Kt(e)}catch(t){throw bt(e),t}}else if(Mt(e))i=Et(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===NI.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Kt(i);else{if(!Me&&!Te&&!De&&e.indexOf(`<`)===-1)return T&&Pe?ee(e):e;if(i=Et(e),!i)return Me?null:Pe?E:``}i&&je&&vt(i.firstChild);let l=c?e:i;try{let e=Dt(l);for(;o=e.nextNode();)zt(o,l),Gt(o,l),jt(o.content)&&L(o.content)}catch(n){throw c&&(bt(e),PF(t.removed,e=>{e.element&&Ct(e.element)})),n}if(c){let n=!1;if(PF(t.removed,t=>{t.element&&(t.element===e&&(n=!0),Ct(t.element))}),n)throw $F(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Te&&kt(e),e}if(Me){if(Te&&kt(i),Ne)for(s=re.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(he.shadowroot||he.shadowrootmode)&&(s=ae.call(r,s,!0)),s}let u=De?i.outerHTML:i.innerHTML;return De&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&QF(DI,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
22
|
-
`+u),Te&&(u=Ot(u)),T&&Pe?ee(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dt(e),Oe=!0,ke=I,Ae=he},t.clearConfig=function(){ct=null,Oe=!1,ke=null,Ae=null,T=D,E=``},t.isValidAttribute=function(e,t,n){ct||dt({});let r=st(e),i=st(t);return Bt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&XF(P,e)&&LF(P[e],t)},t.removeHook=function(e,t){if(XF(P,e)){if(t!==void 0){let n=FF(P[e],t);return n===-1?void 0:RF(P[e],n,1)[0]}return IF(P[e])}},t.removeHooks=function(e){XF(P,e)&&(P[e]=[])},t.removeAllHooks=function(){P=zI()},t}var UI=HI();function WI(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var GI=WI();function KI(e){GI=e}var qI={exec:()=>null};function JI(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function $(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(XI.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var YI=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),XI={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:JI(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:JI(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:JI(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:JI(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:JI(e=>RegExp(`^ {0,${e}}(?:</?(?:${dL})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:JI(e=>RegExp(`^ {0,${e}}>`))},ZI=/^(?:[ \t]*(?:\n|$))+/,QI=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$I=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,eL=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,nL=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,rL=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iL=$(rL).replace(/bull/g,nL).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),aL=$(rL).replace(/bull/g,nL).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),oL=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,sL=/^[^\n]+/,cL=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,lL=$(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,cL).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uL=$(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,nL).getRegex(),dL=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,fL=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,pL=$(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,fL).replace(`tag`,dL).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mL=e=>$(oL).replace(`hr`,eL).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,dL).getRegex(),hL=mL(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),gL=mL(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),_L={blockquote:$(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,gL).getRegex(),code:QI,def:lL,fences:$I,heading:tL,hr:eL,html:pL,lheading:iL,list:uL,newline:ZI,paragraph:hL,table:qI,text:sL},vL=$(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,eL).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,dL).getRegex(),yL={..._L,lheading:aL,table:vL,paragraph:$(oL).replace(`hr`,eL).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,vL).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,dL).getRegex()},bL={..._L,html:$(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,fL).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qI,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:$(oL).replace(`hr`,eL).replace(`heading`,` *#{1,6} *[^
|
|
23
|
-
]`).replace(`lheading`,iL).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},xL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,SL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,CL=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,wL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,TL=/[\p{P}\p{S}]/u,EL=/[\s\p{P}\p{S}]/u,DL=/[^\s\p{P}\p{S}]/u,OL=$(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,EL).getRegex(),kL=/[\p{Pi}\p{Ps}"']/u,AL=/(?!~)[\p{P}\p{S}]/u,jL=/(?!~)[\s\p{P}\p{S}]/u,ML=/(?:[^\s\p{P}\p{S}]|~)/u,NL=$(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,YI?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),PL=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,FL=$(PL,`u`).replace(/punct/g,TL).getRegex(),IL=$(PL,`u`).replace(/punct/g,AL).getRegex(),LL=$(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,kL).replace(/punct/g,TL).getRegex(),RL=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,zL=$(RL,`gu`).replace(/notPunctSpace/g,DL).replace(/punctSpace/g,EL).replace(/punct/g,TL).getRegex(),BL=$(RL,`gu`).replace(/notPunctSpace/g,ML).replace(/punctSpace/g,jL).replace(/punct/g,AL).getRegex(),VL=$(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,DL).replace(/punctSpace/g,EL).replace(/punct/g,TL).getRegex(),HL=$(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,DL).replace(/punctSpace/g,EL).replace(/punct/g,TL).getRegex(),UL=$(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,DL).replace(/punctSpace/g,EL).replace(/punct/g,TL).getRegex(),WL=$(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,TL).getRegex(),GL=$(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,DL).replace(/punctSpace/g,EL).replace(/punct/g,TL).getRegex(),KL=$(/\\(punct)/,`gu`).replace(/punct/g,TL).getRegex(),qL=$(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),JL=$(fL).replace(`(?:-->|$)`,`-->`).getRegex(),YL=$(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,JL).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),XL=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,ZL=$(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,XL).getRegex(),QL=$(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,ZL).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$L=$(/^!?\[(label)\]\[(ref)\]/).replace(`label`,ZL).replace(`ref`,cL).getRegex(),eR=$(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,cL).getRegex(),tR=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,nR=$(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,XL).getRegex(),rR=$(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,$(/^!?\[(label)\]\[(ref)\]/).replace(`label`,nR).replace(`ref`,tR).getRegex()).replace(`nolink`,$(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,tR).getRegex()).getRegex(),iR=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,aR=$(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),oR={_backpedal:qI,anyPunctuation:KL,autolink:qL,blockSkip:NL,br:CL,code:SL,del:qI,delLDelim:qI,delRDelim:qI,emStrongLDelim:FL,emStrongRDelimAst:zL,emStrongRDelimUnd:HL,escape:xL,link:QL,nolink:eR,punctuation:OL,reflink:$L,reflinkSearch:rR,tag:YL,text:wL,url:qI},sR={...oR,emStrongLDelim:LL,emStrongRDelimAst:VL,emStrongRDelimUnd:UL,link:$(/^!?\[(label)\]\((.*?)\)/).replace(`label`,ZL).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,ZL).getRegex()},cR={...oR,emStrongRDelimAst:BL,emStrongLDelim:IL,delLDelim:WL,delRDelim:GL,url:$(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,aR).replace(`protocol`,iR).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:$(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,iR).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},lR={...cR,br:$(CL).replace(`{2,}`,`*`).getRegex(),text:$(cR.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},uR={normal:_L,gfm:yL,pedantic:bL},dR={normal:oR,gfm:cR,breaks:lR,pedantic:sR},fR={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},pR=e=>fR[e];function mR(e,t){if(t){if(XI.escapeTest.test(e))return e.replace(XI.escapeReplace,pR)}else if(XI.escapeTestNoEncode.test(e))return e.replace(XI.escapeReplaceNoEncode,pR);return e}function hR(e){return e.replace(XI.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function gR(e){try{e=encodeURI(e).replace(XI.percentDecode,`%`)}catch{return null}return e}function _R(e,t){let n=e.replace(XI.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(XI.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(XI.slashPipe,`|`);return n}function vR(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function yR(e){let t=e.split(`
|
|
24
|
-
`),n=t.length-1;for(;n>=0&&XI.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
25
|
-
`)}function bR(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function xR(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function SR(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function CR(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function wR(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
26
|
-
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
|
|
27
|
-
`)}function TR(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var ER=class{options;rules;lexer;constructor(e){this.options=e||GI}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:yR(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=wR(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=vR(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:vR(t[0],`
|
|
28
|
-
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:vR(t[0],`
|
|
29
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=vR(t[0],`
|
|
30
|
-
`).split(`
|
|
31
|
-
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
32
|
-
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
33
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
34
|
-
${s}`:s,r=r?`${r}
|
|
35
|
-
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
|
|
36
|
-
`),o=t.raw+`
|
|
37
|
-
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
|
|
38
|
-
`).length:0,d=l?e.slice(0,-l):e;d.length>0&&(n=`${n}
|
|
39
|
-
${d.join(`
|
|
40
|
-
`)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
41
|
-
`+e.join(`
|
|
42
|
-
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
43
|
-
`)}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
44
|
-
`,1)[0],l=t[1].length,u=this.options.pedantic?SR(c,l):c.replace(this.rules.other.leadingSpaceTab,e=>SR(e,l)),d=e.split(`
|
|
45
|
-
`,1)[0],f=!u.trim(),p=0;if(this.options.pedantic?(p=2,s=u.trimStart()):f?p=l+1:(p=u.search(this.rules.other.nonSpaceChar),p=p>4?1:p,s=u.slice(p),p+=l),f&&this.rules.other.blankLine.test(d)&&(r+=d+`
|
|
46
|
-
`,e=e.substring(d.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),a=this.rules.other.headingBeginRegex(p),o=this.rules.other.htmlBeginRegex(p),c=this.rules.other.blockquoteBeginRegex(p);for(;e;){let l=e.split(`
|
|
47
|
-
`,1)[0],m;if(d=l,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting,` `),m=d):m=d.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal,` `)),i.test(d)||a.test(d)||o.test(d)||c.test(d)||t.test(d)||n.test(d))break;if(m.search(this.rules.other.nonSpaceChar)>=p||!d.trim())s+=`
|
|
48
|
-
`+m.slice(p);else{if(f||u.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(u)||a.test(u)||n.test(u))break;s+=`
|
|
49
|
-
`+d}f=!d.trim(),r+=l+`
|
|
50
|
-
`,e=e.substring(l.length+1),u=m.slice(p)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=yR(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&xR(t[2],`()`)!==-1)return;let e=bR(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:vR(t[0],`
|
|
51
|
-
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=_R(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
52
|
-
`):[],a={type:`table`,raw:vR(t[0],`
|
|
53
|
-
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(_R(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:vR(t[0],`
|
|
54
|
-
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
55
|
-
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&TR(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=vR(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=xR(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),CR(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&TR(e,n[1],r,this.rules))return;let i=t[bR((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return CR(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:hR(t[0]),escaped:e}}}},DR=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||GI,this.options.tokenizer=this.options.tokenizer||new ER,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:XI,block:uR.normal,inline:dR.normal};this.options.pedantic?(t.block=uR.pedantic,t.inline=dR.pedantic):this.options.gfm&&(t.block=uR.gfm,t.inline=this.options.breaks?dR.breaks:dR.gfm),this.tokenizer.rules=t}static get rules(){return{block:uR,inline:dR}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(XI.carriageReturn,`
|
|
56
|
-
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(XI.tabCharGlobal,` `).replace(XI.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
|
57
|
-
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
58
|
-
`)?``:`
|
|
59
|
-
`)+i.raw,n.text+=`
|
|
60
|
-
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if((i=this.tokenizer.fences(e))||(i=this.tokenizer.heading(e))||(i=this.tokenizer.hr(e))||(i=this.tokenizer.blockquote(e))||(i=this.tokenizer.list(e))||(i=this.tokenizer.html(e))){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
61
|
-
`)?``:`
|
|
62
|
-
`)+i.raw,n.text+=`
|
|
63
|
-
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if((i=this.tokenizer.table(e))||(i=this.tokenizer.lheading(e))){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
|
64
|
-
`)?``:`
|
|
65
|
-
`)+i.raw,r.text+=`
|
|
66
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length)}else if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
67
|
-
`)?``:`
|
|
68
|
-
`)+i.raw,n.text+=`
|
|
69
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,bR(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(`)`);try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,bR(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if((o=this.tokenizer.escape(e))||(o=this.tokenizer.tag(e))||(o=this.tokenizer.link(e))){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if((o=this.tokenizer.emStrong(e,n,i))||(o=this.tokenizer.codespan(e))||(o=this.tokenizer.br(e))||(o=this.tokenizer.del(e,n,i))||(o=this.tokenizer.autolink(e))||!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},OR=class{options;parser;constructor(e){this.options=e||GI}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(XI.notSpaceStart)?.[0],i=e?e.replace(XI.endingNewline,``)+`
|
|
70
|
-
`:``;return r?`<pre><code class="language-`+mR(r)+`">`+(n?i:mR(i,!0))+`</code></pre>
|
|
71
|
-
`:`<pre><code>`+(n?i:mR(i,!0))+`</code></pre>
|
|
72
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
73
|
-
${this.parser.parse(e)}</blockquote>
|
|
74
|
-
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
75
|
-
`}hr(e){return`<hr>
|
|
76
|
-
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
77
|
-
`+r+`</`+i+`>
|
|
78
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
79
|
-
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
80
|
-
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
81
|
-
<thead>
|
|
82
|
-
`+t+`</thead>
|
|
83
|
-
`+r+`</table>
|
|
84
|
-
`}tablerow({text:e}){return`<tr>
|
|
85
|
-
${e}</tr>
|
|
86
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
87
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${mR(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?mR(n,!0):this.parser.parseInline(r),o=gR(e);if(o===null)return a;e=mR(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+mR(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=gR(e);if(i===null)return mR(n);e=i;let a=`<img src="${mR(e)}" alt="${mR(n)}"`;return t&&(a+=` title="${mR(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:mR(e.text)}},kR=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},AR=class e{options;renderer;textRenderer;constructor(e){this.options=e||GI,this.options.renderer=this.options.renderer||new OR,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kR}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},jR=class{options;block;constructor(e){this.options=e||GI}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?DR.lex:DR.lexInline}provideParser(e=this.block){return e?AR.parse:AR.parseInline}},MR=new class{defaults=WI();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=AR;Renderer=OR;TextRenderer=kR;Lexer=DR;Tokenizer=ER;Hooks=jR;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new OR(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ER(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new jR;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=jR.passThroughHooks.has(n)?e=>{if(this.defaults.async&&jR.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return DR.lex(e,t??this.defaults)}parser(e,t){return AR.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?DR.lex:DR.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?AR.parse:AR.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?DR.lex:DR.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?AR.parse:AR.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
88
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+mR(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function NR(e,t){return MR.parse(e,t)}NR.options=NR.setOptions=function(e){return MR.setOptions(e),NR.defaults=MR.defaults,KI(NR.defaults),NR},NR.getDefaults=WI,NR.defaults=GI;function PR(...e){return MR.use(...e),NR.defaults=MR.defaults,KI(NR.defaults),NR}NR.use=PR,NR.walkTokens=function(e,t){return MR.walkTokens(e,t)},NR.parseInline=MR.parseInline,NR.Parser=AR,NR.parser=AR.parse,NR.Renderer=OR,NR.TextRenderer=kR,NR.Lexer=DR,NR.lexer=DR.lex,NR.Tokenizer=ER,NR.Hooks=jR,NR.parse=NR,NR.options,NR.setOptions,NR.walkTokens,NR.parseInline,AR.parse,DR.lex;var FR=l(o(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=new RegExp(y(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],(e[0]===`(`||/^\(\?[<']/.test(e[0]))&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,ee=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},j={begin:`\\\\[\\s\\S]`,relevance:0},M={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[j]},N={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[j]},te={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ne=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},re=ne(`//`,`$`),ie=ne(`/\\*`,`\\*/`),ae=ne(`#`,`$`),P=Object.freeze({__proto__:null,APOS_STRING_MODE:M,BACKSLASH_ESCAPE:j,BINARY_NUMBER_MODE:{scope:`number`,begin:k,relevance:0},BINARY_NUMBER_RE:k,COMMENT:ne,C_BLOCK_COMMENT_MODE:ie,C_LINE_COMMENT_MODE:re,C_NUMBER_MODE:{scope:`number`,begin:O,relevance:0},C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:ae,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:{begin:`\\.\\s*[a-zA-Z_]\\w*`,relevance:0},NUMBER_MODE:{scope:`number`,begin:D,relevance:0},NUMBER_RE:D,PHRASAL_WORDS_MODE:te,QUOTE_STRING_MODE:N,REGEXP_MODE:{scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[j,{begin:/\[/,end:/\]/,relevance:0,contains:[j]}]},RE_STARTERS_RE:A,SHEBANG:ee,TITLE_MODE:{scope:`title`,begin:T,relevance:0},UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:{scope:`title`,begin:E,relevance:0}});function oe(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function se(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function ce(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=oe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function le(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function ue(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function de(e,t){e.relevance===void 0&&(e.relevance=1)}var fe=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},pe=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],F=`keyword`;function I(e,t,n=F){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,I(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,me(n[0],n[1])]})}}function me(e,t){return t?Number(t):+!he(e)}function he(e){return pe.includes(e.toLowerCase())}var ge={},_e=e=>{console.error(e)},ve=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ye=(e,t)=>{ge[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ge[`${e}/${t}`]=!0)},be=Error();function xe(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function Se(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw _e(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),be;if(typeof e.beginScope!=`object`||e.beginScope===null)throw _e(`beginScope must be object`),be;xe(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function Ce(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw _e(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),be;if(typeof e.endScope!=`object`||e.endScope===null)throw _e(`endScope must be object`),be;xe(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function we(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Te(e){we(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),Se(e),Ce(e)}function Ee(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(C(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[se,ue,Te,fe].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[ce,le,de].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=I(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Oe(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function De(e){return e?e.endsWithParent||De(e.starts):!1}function Oe(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:De(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var ke=`11.12.0`,Ae=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},je=i,Me=a,Ne=Symbol(`nomatch`),Pe=7,Fe=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=M(n[1]);return t||(ve(s.replace(`{}`,n[1])),ve(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||M(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(ye(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),ye(`10.7.0`,`Please use highlight(code, options) instead.
|
|
89
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};ae(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,ae(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!A.keywords){j.addText(N);return}let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(N),n=``;for(;t;){n+=N.substring(e,t.index);let r=D.case_insensitive?t[0].toLowerCase():t[0],i=u(A,r);if(i){let[e,a]=i;if(j.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=Pe&&(te+=a),e.startsWith(`_`))n+=t[0];else{let n=D.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(N)}n+=N.substring(e),j.addText(n)}function f(){if(N===``)return;let e=null;if(typeof A.subLanguage==`string`){if(!t[A.subLanguage]){j.addText(N);return}e=v(A.subLanguage,N,!0,ee[A.subLanguage]),ee[A.subLanguage]=e._top}else e=S(N,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(te+=e.relevance),j.__addSublanguage(e._emitter,e.language)}function p(){A.subLanguage==null?d():f(),N=``}function m(e,t){e!==``&&(j.startScope(t),j.addText(e),j.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=D.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(N=i,d(),N=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&j.openNode(D.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(N,D.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),N=``):e.beginScope._multi&&(h(e.beginScope,t),N=``)),A=Object.create(e,{parent:{value:A}}),A}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return A.matcher.regexIndex===0?(N+=e[0],1):(ie=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?N+=t:(n.excludeBegin&&(N+=t),p(),!n.returnBegin&&!n.excludeBegin&&(N=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(A,e,r);if(!i)return Ne;let a=A;A.endScope&&A.endScope._wrap?(p(),m(t,A.endScope._wrap)):A.endScope&&A.endScope._multi?(p(),h(A.endScope,e)):a.skip?N+=t:(a.returnEnd||a.excludeEnd||(N+=t),p(),a.excludeEnd&&(N=t));do A.scope&&j.closeNode(),!A.skip&&!A.subLanguage&&(te+=A.relevance),A=A.parent;while(A!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function w(){let e=[];for(let t=A;t!==D;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>j.openNode(e))}let T={};function E(t,r){let a=r&&r[0];if(N+=t,a==null)return p(),0;if(T.type===`begin`&&r.type===`end`&&T.index===r.index&&a===``){if(N+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=T.rule,t}return 1}if(T=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(A.scope||`<unnamed>`)+`"`);throw e.mode=A,e}if(r.type===`end`){let e=C(r);if(e!==Ne)return e}if(r.type===`illegal`&&a===``)return r.index===n.length||(N+=`
|
|
90
|
-
`),1;if(re>1e5&&re>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return N+=a,a.length}let D=M(e);if(!D)throw _e(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let O=Ee(D),k=``,A=a||O,ee={},j=new l.__emitter(l);w();let N=``,te=0,ne=0,re=0,ie=!1;try{if(D.__emitTokens)D.__emitTokens(n,j);else{for(A.matcher.considerAll();;){re++,ie?ie=!1:A.matcher.considerAll(),A.matcher.lastIndex=ne;let e=A.matcher.exec(n);if(!e)break;let t=E(n.substring(ne,e.index),e);ne=e.index+t}E(n.substring(ne))}return j.finalize(),k=j.toHTML(),{language:e,value:k,relevance:te,illegal:!1,_emitter:j,_top:A}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:je(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:ne,context:n.slice(ne-100,ne+100),mode:t.mode,resultSoFar:k},_emitter:j};if(o)return{language:e,value:je(n),illegal:!1,relevance:0,errorRaised:t,_emitter:j,_top:A};throw t}}function b(e){let t={value:je(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(M).filter(te).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(M(e.language).supersetOf===t.language)return 1;if(M(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(ae(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Ae(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),ae(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Me(l,e)}let E=()=>{k(),ye(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){k(),ye(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let O=!1;function k(){function e(){k()}document.readyState===`loading`?(O||window.addEventListener(`DOMContentLoaded`,e,!1),O=!0):document.querySelectorAll(l.cssSelector).forEach(w)}function A(n,r){let i=null;try{i=r(e)}catch(e){if(_e(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)_e(e);else throw e;i=c}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&N(i.aliases,{languageName:n})}function ee(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function j(){return Object.keys(t)}function M(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function N(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function te(e){let t=M(e);return t&&!t.disableAutodetect}function ne(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function re(e){ne(e),a.push(e)}function ie(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function ae(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function oe(e){return ye(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),ye(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:k,highlightElement:w,highlightBlock:oe,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:A,unregisterLanguage:ee,listLanguages:j,getLanguage:M,registerAliases:N,autoDetection:te,inherit:Me,addPlugin:re,removePlugin:ie}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=ke,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in P)typeof P[e]==`object`&&n(P[e]);return Object.assign(e,P),e},Ie=Fe({});Ie.newInstance=()=>Fe({}),t.exports=Ie,Ie.HighlightJS=Ie,Ie.default=Ie}))()).default;function IR(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(${[`fish`,`bash`,`zsh`,`sh`,`csh`,`ksh`,`tcsh`,`dash`,`scsh`].join(`|`)})`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function LR(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}var RR=`[A-Za-z$_][0-9A-Za-z$_]*`,zR=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),BR=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],VR=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),HR=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],UR=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],WR=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`self`,`global`],GR=[].concat(UR,VR,HR);function KR(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=RR,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:RR,keyword:zR,literal:BR,built_in:GR,"variable.language":WR},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...VR,...HR]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...UR,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},ee=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,j={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(ee)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},j,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:ee,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}var qR={scope:`number`,match:`([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity`,relevance:0};function JR(e){let t={className:`attr`,begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`,`json5`],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,qR,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}function YR(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={match:/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,r,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function XR(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.lazy.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.aiter.all.anext.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozendict.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.sentinel.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}var ZR=`[A-Za-z$_][0-9A-Za-z$_]*`,QR=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),$R=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],ez=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),tz=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],nz=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],rz=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`self`,`global`],iz=[].concat(nz,ez,tz);function az(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=ZR,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:ZR,keyword:QR,literal:$R,built_in:iz,"variable.language":rz},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...ez,...tz]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...nz,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},ee=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,j={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(ee)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},j,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:ee,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function oz(e){let t=e.regex,n=az(e),r=ZR,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:ZR,keyword:QR.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:$R,built_in:iz.concat(i),"variable.language":rz},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function sz(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}FR.registerLanguage(`bash`,IR),FR.registerLanguage(`diff`,LR),FR.registerLanguage(`javascript`,KR),FR.registerLanguage(`json`,JR),FR.registerLanguage(`markdown`,YR),FR.registerLanguage(`python`,XR),FR.registerLanguage(`typescript`,oz),FR.registerLanguage(`yaml`,sz);var cz={shell:`bash`};function lz(e){if(e===void 0)return!1;let t=cz[e.trim().toLowerCase()]??e.trim().toLowerCase();return t!==``&&FR.getLanguage(t)!==void 0}function uz(e,t){let n=t===void 0?``:cz[t.trim().toLowerCase()]??t.trim().toLowerCase();if(n!==``&&FR.getLanguage(n)!==void 0)try{return FR.highlight(e,{language:n}).value}catch{}return dz(e)}function dz(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`)}NR.use({renderer:{code({text:e,lang:t}){return`<pre><code class="${lz(t)?`hljs language-${t??``}`:`hljs`}">${uz(e,t)}</code></pre>`}}});function fz({text:e}){let t=(0,f.useMemo)(()=>{let t=NR.parse(e,{async:!1,gfm:!0,breaks:!0});return UI.sanitize(t,{USE_PROFILES:{html:!0}})},[e]);return(0,R.jsx)(`div`,{className:`md`,dangerouslySetInnerHTML:{__html:t}})}function pz({invocation:e}){let[t,n]=(0,f.useState)(!1);return(0,R.jsxs)(`div`,{className:`overflow-hidden rounded-card border border-sakura-200 bg-surface text-left shadow-soft`,children:[(0,R.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),"aria-expanded":t,className:`focus-neko flex w-full items-center gap-2 px-3 py-2`,children:[(0,R.jsx)(`span`,{className:`text-sakura-500`,children:(0,R.jsx)(JP,{name:`sparkles`,size:14})}),(0,R.jsxs)(`span`,{className:`shrink-0 font-mono text-sm font-semibold text-sakura-800`,children:[`skill:`,e.name]}),(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-ink-600`,title:e.location,children:e.location}),(0,R.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 text-ink-400`,children:t?`▾`:`▸`})]}),t&&(0,R.jsx)(`div`,{className:`border-t border-sakura-100 px-3 py-2`,children:(0,R.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap rounded-lg bg-ink-50 p-2 font-mono text-xs text-ink-700`,children:e.body.trim()})})]})}function mz({text:e}){let[t,n]=(0,f.useState)(!1);return e.trim()===``?null:(0,R.jsxs)(`div`,{className:`rounded-xl border border-dashed border-sakura-300 bg-sakura-50/70`,children:[(0,R.jsxs)(`button`,{type:`button`,onClick:()=>{n(!t)},className:`focus-neko flex w-full items-center gap-1.5 px-3 py-1.5 text-left text-xs text-ink-600 italic`,children:[(0,R.jsx)(`span`,{"aria-hidden":!0,children:t?`▾`:`▸`}),`思考过程…`]}),t&&(0,R.jsx)(`div`,{className:`px-3 pb-2 text-sm whitespace-pre-wrap text-ink-600 italic`,children:e})]})}var hz={pending:{label:`待执行`,icon:`clock`,spin:!1,className:`border-ink-200 bg-ink-100 text-ink-600`},running:{label:`运行中`,icon:`spinner`,spin:!0,className:`border-tianyi-300 bg-tianyi-100 text-tianyi-900`},doneOk:{label:`完成`,icon:`check`,spin:!1,className:`border-ink-200 bg-ink-50 text-ink-600`},doneError:{label:`失败`,icon:`close`,spin:!1,className:`border-2 border-sakura-500 bg-sakura-100 text-sakura-900 font-semibold`}};function gz(e){let[t,n]=(0,f.useState)(!1),r=e.phase===`done`?e.isError?hz.doneError:hz.doneOk:hz[e.phase],i=e.phase===`done`&&e.durationMs!==void 0&&e.durationMs!==null?` · ${(e.durationMs/1e3).toFixed(1)}s`:``,a=e.detail!==null||e.output!=null||e.result!=null||e.note!=null;return(0,R.jsxs)(`div`,{className:`overflow-hidden rounded-card border border-tianyi-200 bg-surface shadow-soft`,children:[(0,R.jsxs)(`button`,{type:`button`,onClick:()=>{a&&n(!t)},className:`focus-neko flex w-full items-center gap-2 px-3 py-2 text-left`,children:[(0,R.jsx)(`span`,{className:`text-tianyi-500`,children:(0,R.jsx)(JP,{name:`bolt`,size:14})}),(0,R.jsx)(`span`,{className:`font-mono text-sm font-semibold text-tianyi-800`,children:e.name}),(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-ink-600`,children:e.summary}),(0,R.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium ${r.className}`,children:[(0,R.jsx)(JP,{name:r.icon,size:12,className:r.spin?`animate-spin`:void 0}),r.label,i]}),a&&(0,R.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 text-ink-400`,children:t?`▾`:`▸`})]}),t&&(0,R.jsxs)(`div`,{className:`space-y-2 border-t border-tianyi-100 px-3 py-2`,children:[e.detail!==null&&(0,R.jsx)(`pre`,{className:`max-h-48 overflow-auto rounded-lg bg-ink-50 p-2 font-mono text-xs text-ink-700`,children:e.detail}),e.output!=null&&e.output!==``&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`mb-1 text-xs font-medium text-tianyi-700`,children:`输出`}),(0,R.jsx)(`pre`,{className:`max-h-48 overflow-auto rounded-lg bg-tianyi-50 p-2 font-mono text-xs text-ink-700`,children:e.output})]}),e.result!=null&&e.result!==``&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`mb-1 text-xs font-medium ${e.isError?`text-sakura-800`:`text-ink-600`}`,children:e.isError?`错误输出`:`结果`}),(0,R.jsx)(`pre`,{className:`max-h-48 overflow-auto rounded-lg p-2 font-mono text-xs ${e.isError?`bg-sakura-50 text-sakura-900`:`bg-ink-50 text-ink-700`}`,children:e.result})]}),e.note!=null&&(0,R.jsx)(`div`,{className:`text-xs italic text-ink-500`,children:e.note})]})]})}var _z=48;function vz(){let e=`var(--color-sakura-200)`,t=`var(--color-sakura-300)`,n=`var(--color-tianyi-800)`;return(0,R.jsxs)(`svg`,{width:`132`,height:`112`,viewBox:`0 0 132 112`,fill:`none`,"aria-hidden":`true`,children:[(0,R.jsx)(`title`,{children:`neko 小猫`}),(0,R.jsx)(`path`,{d:`M30 46 L24 14 L54 30 Z`,fill:e,stroke:t,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,R.jsx)(`path`,{d:`M102 46 L108 14 L78 30 Z`,fill:e,stroke:t,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,R.jsx)(`path`,{d:`M32 39 L29 23 L46 32 Z`,fill:t,opacity:`0.55`}),(0,R.jsx)(`path`,{d:`M100 39 L103 23 L86 32 Z`,fill:t,opacity:`0.55`}),(0,R.jsx)(`ellipse`,{cx:`66`,cy:`66`,rx:`44`,ry:`38`,fill:`var(--color-surface)`,stroke:e,strokeWidth:`2.5`}),(0,R.jsx)(`circle`,{cx:`50`,cy:`62`,r:`5`,fill:n}),(0,R.jsx)(`circle`,{cx:`82`,cy:`62`,r:`5`,fill:n}),(0,R.jsx)(`circle`,{cx:`51.8`,cy:`60`,r:`1.6`,fill:`var(--color-surface)`}),(0,R.jsx)(`circle`,{cx:`83.8`,cy:`60`,r:`1.6`,fill:`var(--color-surface)`}),(0,R.jsx)(`ellipse`,{cx:`40`,cy:`74`,rx:`6.5`,ry:`3.6`,fill:t,opacity:`0.65`}),(0,R.jsx)(`ellipse`,{cx:`92`,cy:`74`,rx:`6.5`,ry:`3.6`,fill:t,opacity:`0.65`}),(0,R.jsx)(`path`,{d:`M62 71 q4 4.5 4 1 q0 -3.5 4 -1`,stroke:`var(--color-sakura-800)`,strokeWidth:`2`,fill:`none`,strokeLinecap:`round`}),(0,R.jsx)(`path`,{d:`M18 64 L32 66 M19 72 L32 70`,stroke:e,strokeWidth:`2`,strokeLinecap:`round`}),(0,R.jsx)(`path`,{d:`M114 64 L100 66 M113 72 L100 70`,stroke:e,strokeWidth:`2`,strokeLinecap:`round`})]})}function yz({text:e,images:t}){let n=fF(e);return n===null?(0,R.jsx)(`div`,{className:`chat-row anim-user flex justify-end`,children:(0,R.jsxs)(`div`,{className:`bubble-user chat-bubble px-4 py-2.5 whitespace-pre-wrap`,children:[e,t&&(0,R.jsx)(mF,{images:t})]})}):(0,R.jsx)(`div`,{className:`chat-row anim-user flex justify-end`,children:(0,R.jsxs)(`div`,{className:`chat-bubble flex min-w-0 flex-col items-stretch gap-1.5`,children:[(0,R.jsx)(pz,{invocation:n}),n.args!==``&&(0,R.jsx)(`div`,{className:`bubble-user px-4 py-2.5 whitespace-pre-wrap`,children:n.args})]})})}function bz({thinking:e,text:t}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(mz,{text:e}),t.trim()!==``&&(0,R.jsx)(fz,{text:t})]})}function xz({item:e}){return e.text.trim()===``&&e.thinking.trim()===``&&e.note===null?null:(0,R.jsx)(`div`,{className:`chat-row anim-other flex justify-start`,children:(0,R.jsxs)(`div`,{className:`bubble-assistant space-y-1.5 px-4 py-2.5`,children:[(0,R.jsx)(bz,{thinking:e.thinking,text:e.text}),e.note!==null&&(0,R.jsxs)(`div`,{className:`text-xs text-sakura-800 italic`,children:[`⚠ `,e.note]})]})})}function Sz({text:e}){return(0,R.jsx)(`div`,{className:`chat-row anim-other flex justify-center`,children:(0,R.jsx)(`span`,{className:`rounded-full bg-ink-100 px-3 py-1 text-xs text-ink-600`,children:e})})}function Cz({item:e}){return(0,R.jsxs)(`div`,{className:`chat-row anim-other`,children:[(0,R.jsx)(gz,{name:e.name,summary:e.summary,detail:e.detail,phase:e.phase,isError:e.isError,output:e.output,result:e.result,durationMs:e.durationMs,note:e.note}),e.images&&(0,R.jsx)(mF,{images:e.images})]})}function wz({streaming:e,busy:t}){let n=e.text.trim()!==``||e.thinking.trim()!==``;return(0,R.jsxs)(R.Fragment,{children:[n&&(0,R.jsx)(`div`,{className:`chat-row stream-block flex justify-start`,children:(0,R.jsxs)(`div`,{className:`bubble-assistant space-y-1.5 px-4 py-2.5`,children:[(0,R.jsx)(bz,{thinking:e.thinking,text:e.text}),t&&(0,R.jsx)(`span`,{className:`stream-caret`,"aria-hidden":!0})]})}),e.toolCalls.map(e=>(0,R.jsx)(`div`,{className:`chat-row anim-other`,children:(0,R.jsx)(gz,{name:e.name,summary:e.summary,detail:e.detail,phase:e.phase,output:e.output})},`st${e.callId}`))]})}function Tz({view:e,busy:t}){let n=(0,f.useRef)(null),r=(0,f.useRef)(!0),[i,a]=(0,f.useState)(!1),o=e?.items??[],s=e?.streaming??null,c=e=>{let t=n.current;t!==null&&t.scrollTo({top:t.scrollHeight,behavior:e?`smooth`:`auto`})};return(0,f.useEffect)(()=>{if(!r.current)return;let e=n.current;e!==null&&e.scrollTo({top:e.scrollHeight})}),(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,R.jsx)(`div`,{ref:n,onScroll:()=>{let e=n.current;if(e===null)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<_z;r.current=t,a(!t)},className:`min-h-0 flex-1 overflow-y-auto`,children:(0,R.jsxs)(`div`,{className:`chat-column flex flex-col gap-3 px-4 py-5`,children:[o.length===0&&s===null&&(0,R.jsxs)(`div`,{className:`mt-[14vh] flex flex-col items-center gap-4 text-center`,children:[(0,R.jsx)(`div`,{className:`welcome-cat`,children:(0,R.jsx)(vz,{})}),(0,R.jsxs)(`div`,{className:`text-4xl font-extrabold tracking-tight`,children:[(0,R.jsx)(`span`,{className:`logo-gradient`,children:`neko`}),(0,R.jsx)(`span`,{className:`text-tianyi-600`,children:`.`}),(0,R.jsx)(`span`,{className:`logo-gradient`,children:`harness`})]}),(0,R.jsx)(`p`,{className:`max-w-sm text-sm text-ink-600`,children:`输入消息开始吧 ✦`})]}),o.map(e=>{switch(e.type){case`user`:return(0,R.jsx)(yz,{text:e.text,images:e.images},e.key);case`assistant`:return(0,R.jsx)(xz,{item:e},e.key);case`tool`:return(0,R.jsx)(Cz,{item:e},e.key);case`system`:return(0,R.jsx)(Sz,{text:e.text},e.key);default:return null}}),s!==null&&(0,R.jsx)(wz,{streaming:s,busy:t})]})}),i&&(0,R.jsx)(`div`,{className:`discrete-in flex shrink-0 justify-center border-t border-sakura-100 bg-base/70 py-1.5`,children:(0,R.jsx)(`button`,{type:`button`,onClick:()=>{r.current=!0,a(!1),c(!0)},className:`focus-neko rounded-full border border-sakura-300 bg-surface px-3.5 py-1 text-xs font-medium text-sakura-800 hover:bg-sakura-50`,children:`回到底部 ↓`})})]})}var Ez=Date.now(),Dz=new Set,Oz,kz=()=>{Ez=Date.now();for(let e of Dz)e()},Az=e=>(Dz.add(e),Dz.size===1&&(kz(),Oz=setInterval(kz,6e4),window.addEventListener(`focus`,kz)),()=>{Dz.delete(e),Dz.size||(clearInterval(Oz),window.removeEventListener(`focus`,kz))}),jz=()=>(0,f.useSyncExternalStore)(Az,()=>Ez);function Mz(e){let t=/^([A-Za-z]:)[\\/]/.exec(e)?.[1];if(t!==void 0){let n=`${t}\\`,r=e.slice(n.length).split(/[\\/]+/).filter(Boolean);return{root:`/`,rootLabel:`此电脑`,crumbs:[{label:t,path:n},...r.map((e,t)=>({label:e,path:n+r.slice(0,t+1).join(`\\`)}))]}}let n=e.split(`/`).filter(Boolean);return{root:`/`,rootLabel:`/`,crumbs:n.map((e,t)=>({label:e,path:`/${n.slice(0,t+1).join(`/`)}`}))}}function Nz({initialPath:e,onClose:t}){let[n,r]=(0,f.useState)(e),[i,a]=(0,f.useState)(e),[o,s]=(0,f.useState)(``),[c,l]=(0,f.useState)(!1),[u,d]=(0,f.useState)(null),[p,m]=(0,f.useState)(!0),[h,g]=(0,f.useState)(!1),[_,v]=(0,f.useState)(``),[y,b]=(0,f.useState)(0),x=(0,f.useRef)(0),S=(0,f.useRef)(null),C=(0,f.useRef)(!1);(0,f.useEffect)(()=>{let e=++x.current;return m(!0),v(``),d(null),Sj.browse({path:n,query:o,showHidden:c}).then(t=>{e===x.current&&(d(t),a(e=>e===n?t.path:e),m(!1))},t=>{e===x.current&&(v(String(t)),m(!1))}),()=>{++x.current}},[n,o,c,y]);let w=e=>{S.current?.focus(),r(e),a(e),s(``),b(e=>e+1)},T=async()=>{if(!u?.next||p)return;let e=++x.current;m(!0),v(``);try{let t=await Sj.browse({path:n,query:o,showHidden:c,cursor:u.next});e===x.current&&d({...t,entries:[...u.entries,...t.entries]})}catch(t){e===x.current&&v(String(t))}finally{e===x.current&&m(!1)}},E=async()=>{if(!(!u||p||C.current)){C.current=!0,g(!0),v(``);try{await Sj.addWorkspace(u.path),t()}catch(e){v(String(e))}finally{C.current=!1,g(!1)}}},{root:D,rootLabel:O,crumbs:k}=Mz(u?.path??n);return(0,R.jsxs)(QP,{title:`添加工作区`,onClose:t,locked:h,children:[(0,R.jsxs)(`div`,{className:`picker-controls`,children:[(0,R.jsx)(`p`,{className:`text-ink-500`,children:`选择 Harness 所在电脑上的文件夹`}),(0,R.jsxs)(`nav`,{className:`breadcrumbs`,"aria-label":`目录路径`,children:[(0,R.jsx)(`button`,{type:`button`,disabled:h,onClick:()=>w(D),children:O}),k.map(e=>(0,R.jsxs)(`button`,{type:`button`,disabled:h,onClick:()=>w(e.path),children:[e.label,` /`]},e.path))]}),(0,R.jsxs)(`form`,{className:`path-form`,onSubmit:e=>{e.preventDefault(),w(i)},children:[(0,R.jsx)(`input`,{ref:S,"aria-label":`完整目录路径`,value:i,disabled:h,onChange:e=>a(e.target.value)}),(0,R.jsx)(`button`,{className:`btn-outline`,type:`submit`,disabled:h,children:`前往`})]}),(0,R.jsxs)(`div`,{className:`filter-row`,children:[(0,R.jsx)(`input`,{"aria-label":`筛选文件夹`,placeholder:`筛选文件夹…`,value:o,disabled:h,onChange:e=>s(e.target.value)}),(0,R.jsxs)(`label`,{children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:c,disabled:h,onChange:e=>l(e.target.checked)}),`隐藏目录`]})]})]}),(0,R.jsxs)(`fieldset`,{className:`folder-list`,"aria-label":`文件夹列表`,"aria-busy":p,onKeyDown:e=>{if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let t=[...e.currentTarget.querySelectorAll(`button:not(:disabled)`)];t[(t.indexOf(document.activeElement)+(e.key===`ArrowDown`?1:-1)+t.length)%t.length]?.focus()},children:[_&&(0,R.jsxs)(`div`,{role:`alert`,className:`error-text`,children:[_,(0,R.jsx)(`button`,{type:`button`,className:`btn-outline`,disabled:h,onClick:()=>b(e=>e+1),children:`重试`})]}),u?.parent&&(0,R.jsxs)(`button`,{type:`button`,className:`chrome-row`,disabled:h||p,onClick:()=>w(u.parent),children:[(0,R.jsx)(JP,{name:`up`}),`上级目录`]}),u?.entries.map(e=>(0,R.jsxs)(`button`,{type:`button`,className:`chrome-row`,disabled:h||p||!!e.error,title:e.error??e.path,onClick:()=>w(e.path),children:[(0,R.jsx)(JP,{name:`folder`}),(0,R.jsx)(`span`,{className:`truncate min-w-0`,children:e.name}),e.error&&(0,R.jsx)(`span`,{className:`text-ink-500`,children:`不可访问`})]},e.path)),p&&(0,R.jsx)(`output`,{className:`empty-text`,children:`正在读取目录…`}),!p&&u?.entries.length===0&&(0,R.jsx)(`p`,{className:`empty-text`,children:`没有匹配的子文件夹,可选择当前目录`}),u?.next&&(0,R.jsx)(`button`,{type:`button`,className:`btn-outline`,disabled:p||h,onClick:()=>void T(),children:`加载更多`})]}),(0,R.jsxs)(`div`,{className:`picker-footer`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`strong`,{children:eF(u?.path??n)}),(0,R.jsx)(`p`,{className:`path-text`,children:u?.path??n})]}),(0,R.jsxs)(`div`,{className:`actions`,children:[(0,R.jsx)(`button`,{type:`button`,className:`btn-outline`,disabled:h,onClick:t,children:`取消`}),(0,R.jsx)(`button`,{type:`button`,className:`btn-primary px-3 py-1.5`,disabled:!u||p||h||!!_,onClick:()=>void E(),children:h?`正在添加…`:`选择文件夹`})]})]})]})}function Pz({open:e,onClose:t}){let n=hj(),r=jz(),i=YP(),[a,o]=(0,f.useState)(null),s=n.sessions.find(e=>e.id===a?.id),[c,l]=(0,f.useState)(!1),[u,d]=(0,f.useState)(null),[p,m]=(0,f.useState)(``),[h,g]=(0,f.useState)(``),_=n.phase!==`ready`||n.operating,v=cj(n.sessions,n.workspaceRoot).filter(e=>XA(e,h)),y=e=>{e.then(()=>{i&&t()}).catch(wj)};if(!e)return null;let b=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`sidebar-top`,children:[(0,R.jsxs)(`div`,{className:`workspace-heading`,children:[(0,R.jsxs)(`button`,{type:`button`,className:`workspace-trigger`,"aria-label":`切换工作区`,"aria-expanded":a!==null&&!a.id,disabled:_,onClick:e=>o({anchor:e.currentTarget}),children:[(0,R.jsx)(`span`,{className:`workspace-mark`,children:(0,R.jsx)(JP,{name:`folder`})}),(0,R.jsx)(`span`,{className:`truncate min-w-0`,children:eF(n.workspaceRoot)||`工作区`}),(0,R.jsx)(JP,{name:`chevron`})]}),!i&&(0,R.jsx)(`button`,{type:`button`,className:`icon-btn`,"aria-label":`收起侧栏`,title:`收起侧栏`,onClick:t,children:(0,R.jsx)(JP,{name:`panel`})})]}),(0,R.jsxs)(`button`,{type:`button`,className:`chrome-row font-medium`,disabled:_,onClick:()=>y(Sj.createSession()),children:[(0,R.jsx)(JP,{name:`plus`}),`新建会话`]}),(0,R.jsxs)(`div`,{className:`search-box`,children:[(0,R.jsx)(JP,{name:`search`}),(0,R.jsx)(`input`,{"aria-label":`搜索当前工作区会话`,placeholder:`搜索会话…`,value:h,onChange:e=>g(e.target.value)})]})]}),(0,R.jsxs)(`div`,{className:`section-label`,children:[`会话 `,(0,R.jsx)(`span`,{children:v.length})]}),(0,R.jsxs)(`div`,{className:`session-scroll`,children:[(0,R.jsx)(`ul`,{className:`session-list`,children:v.map(e=>(0,R.jsxs)(`li`,{className:`session-row ${e.id===n.currentSessionId?`is-active`:``}`,children:[(0,R.jsxs)(`button`,{type:`button`,className:`chrome-row session-select`,disabled:_,"aria-current":e.id===n.currentSessionId?`page`:void 0,"aria-describedby":`session-tip-${e.id}`,onClick:()=>y(Sj.selectSession(e.id)),children:[(0,R.jsx)(JP,{name:`chat`}),(0,R.jsxs)(`span`,{className:`session-copy`,children:[(0,R.jsx)(`span`,{className:`truncate min-w-0`,children:KA(e,`新会话`)}),(0,R.jsxs)(`span`,{className:`session-meta`,children:[(0,R.jsx)(`time`,{dateTime:new Date(qA(e)).toISOString(),children:ZA(qA(e),r,`zh`)}),e.status===`running`?` · 运行中`:e.status===`error`?` · 出错`:``]}),(0,R.jsxs)(`span`,{className:`session-tooltip`,role:`tooltip`,id:`session-tip-${e.id}`,children:[KA(e,`新会话`),(0,R.jsx)(`br`,{}),new Date(qA(e)).toLocaleString(`zh-CN`)]})]})]}),(0,R.jsx)(`button`,{type:`button`,className:`icon-btn row-more`,disabled:_,"aria-label":`${KA(e,`新会话`)}的操作`,title:`会话操作`,onClick:t=>o({anchor:t.currentTarget,id:e.id}),children:(0,R.jsx)(JP,{name:`more`})})]},e.id))}),v.length===0&&(0,R.jsx)(`div`,{className:`empty-text`,children:n.phase===`ready`?h?`没有匹配的会话`:`此工作区暂无会话`:`等待网关连接…`})]}),(0,R.jsxs)(`div`,{className:`sidebar-bottom`,children:[(0,R.jsx)(`span`,{className:`path-text`,title:n.workspaceRoot,children:n.workspaceRoot}),(0,R.jsxs)(Pr,{to:`/settings`,className:`chrome-row`,children:[(0,R.jsx)(JP,{name:`settings`}),`设置`]})]})]});return(0,R.jsxs)(R.Fragment,{children:[i?(0,R.jsx)(QP,{title:`工作区与会话`,drawer:!0,onClose:t,children:b}):(0,R.jsx)(`aside`,{className:`chrome sidebar`,"aria-label":`工作区与会话`,children:b}),a&&(0,R.jsx)($P,{anchor:a.anchor,label:a.id?`会话操作`:`选择工作区`,onClose:()=>o(null),children:a.id?(0,R.jsxs)(R.Fragment,{children:[s&&(0,R.jsxs)(`div`,{className:`session-details`,children:[(0,R.jsx)(`strong`,{children:KA(s,`新会话`)}),(0,R.jsx)(`small`,{children:new Date(qA(s)).toLocaleString(`zh-CN`)})]}),(0,R.jsxs)(`button`,{type:`button`,className:`chrome-row`,onClick:()=>{d(a.id),m(``),o(null)},children:[(0,R.jsx)(JP,{name:`archive`}),`归档会话`]})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`section-label`,children:`工作区`}),(0,R.jsx)(`div`,{className:`workspace-options`,children:n.workspaces.map(e=>(0,R.jsxs)(`button`,{type:`button`,className:`workspace-option ${e.path===n.workspaceRoot?`is-active`:``}`,title:e.path,onClick:()=>{o(null),g(``),y(Sj.selectWorkspace(e.path))},children:[(0,R.jsx)(JP,{name:`folder`}),(0,R.jsxs)(`span`,{children:[(0,R.jsx)(`strong`,{children:eF(e.path)}),(0,R.jsx)(`small`,{children:e.path})]}),e.path===n.workspaceRoot&&(0,R.jsx)(`span`,{role:`img`,"aria-label":`当前工作区`,children:`✓`})]},e.path))}),(0,R.jsxs)(`button`,{type:`button`,className:`chrome-row add-workspace`,onClick:()=>{o(null),l(!0)},children:[(0,R.jsx)(JP,{name:`plus`}),`添加工作区`]})]})}),c&&(0,R.jsx)(Nz,{initialPath:n.workspaceRoot,onClose:()=>l(!1)}),u&&(0,R.jsx)(QP,{title:`归档会话`,locked:n.operating,onClose:()=>d(null),children:(0,R.jsxs)(`div`,{className:`confirm-body`,children:[(0,R.jsxs)(`p`,{children:[`归档“`,KA(n.sessions.find(e=>e.id===u)??{title:``,firstPromptPreview:``},`新会话`),`”?会话将从列表中隐藏,工作区和文件仍会保留。`]}),p&&(0,R.jsx)(`p`,{role:`alert`,className:`error-text`,children:p}),(0,R.jsxs)(`div`,{className:`actions`,children:[(0,R.jsx)(`button`,{type:`button`,className:`btn-outline`,disabled:n.operating,onClick:()=>d(null),children:`取消`}),(0,R.jsx)(`button`,{type:`button`,className:`btn-primary`,disabled:n.operating,onClick:()=>{Sj.archiveSession(u).then(()=>d(null)).catch(e=>m(String(e)))},children:`确认归档`})]})]})})]})}var Fz={ready:`已连接`,connecting:`连接中…`,reconnecting:`重连中…`,error:`连接失败`};function Iz(e){let{workspaceRoot:t,currentSessionId:n,operating:r,sessions:i}=hj(),a=i.find(e=>e.id===n);return(0,R.jsxs)(`header`,{className:`chrome topbar`,children:[(0,R.jsx)(`button`,{type:`button`,className:`icon-btn`,"aria-label":`切换侧栏`,title:`切换侧栏`,"aria-expanded":e.sidebarOpen,onClick:e.onToggleSessions,children:(0,R.jsx)(JP,{name:`panel`})}),(0,R.jsxs)(`span`,{className:`topbar-path`,title:t,children:[(0,R.jsx)(JP,{name:`folder`}),(0,R.jsx)(`span`,{className:`truncate min-w-0`,children:eF(t)||`工作区`})]}),(0,R.jsx)(`span`,{className:`text-ink-500`,children:`/`}),(0,R.jsx)(`span`,{className:`truncate min-w-0`,title:a?KA(a,`新会话`):void 0,children:a?KA(a,`新会话`):`新会话`}),(0,R.jsx)(`output`,{className:`conn-status ${e.conn===`ready`?`is-connected`:e.conn===`error`?`is-error`:``}`,children:r?`切换中…`:Fz[e.conn]})]})}function Lz(){let{view:e,phase:t,notice:n,operating:r,workspaceRoot:i,currentSessionId:a}=hj(),o=YP(),[s,c]=(0,f.useState)(()=>!window.matchMedia(qP).matches);(0,f.useEffect)(()=>{c(!o)},[o]);let l=e?.busy??!1,u=e?.status??null;return(0,R.jsxs)(`div`,{className:`flex h-dvh`,children:[(0,R.jsx)(`a`,{href:`#main-content`,className:`skip-link`,children:`跳到主内容`}),(0,R.jsx)(Pz,{open:s,onClose:()=>c(!1)}),(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,R.jsx)(Iz,{sidebarOpen:s,conn:t,onToggleSessions:()=>c(!s)}),n!==null&&(0,R.jsx)(`div`,{className:`discrete-in border-b px-4 py-1.5 text-center text-xs ${n.level===`error`?`border-sakura-300 bg-sakura-100 text-sakura-900`:`border-tianyi-200 bg-tianyi-50 text-tianyi-900`}`,role:`alert`,children:n.text}),(0,R.jsxs)(`main`,{id:`main-content`,tabIndex:-1,className:`flex min-h-0 flex-1 flex-col focus:outline-none`,children:[!a&&t===`ready`&&!r?(0,R.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,R.jsx)(`h1`,{className:`text-xl font-semibold text-ink-900`,children:eF(i)}),(0,R.jsx)(`p`,{className:`text-sm text-ink-600`,children:`在这个工作区开始新的会话`}),(0,R.jsx)(`button`,{type:`button`,className:`btn-primary focus-neko rounded-xl px-4 py-2`,onClick:()=>{Sj.createSession().catch(wj)},children:`新建会话`})]}):(0,R.jsx)(Tz,{view:e,busy:l}),(0,R.jsx)(cF,{disabled:t!==`ready`||r,busy:l,status:u})]})]})]})}var Rz=[{id:`deepseek`,envVar:`DEEPSEEK_API_KEY`,signupUrl:`https://platform.deepseek.com/api_keys`,keyless:!1},{id:`tavily`,envVar:`TAVILY_API_KEY`,signupUrl:`https://app.tavily.com`,keyless:!0}],zz=[{key:`credentials`,label:`密钥`,icon:`key`,to:`/settings`},{key:`market`,label:`技能市场`,icon:`store`,to:`/skills`}];function Bz({active:e,children:t}){return(0,R.jsxs)(`div`,{className:`flex min-h-dvh flex-col bg-base sm:flex-row`,children:[(0,R.jsxs)(`nav`,{"aria-label":`设置菜单`,className:`flex shrink-0 items-center gap-1 overflow-x-auto border-b border-sakura-100 px-4 py-2.5 sm:w-48 sm:flex-col sm:items-stretch sm:gap-1 sm:border-r sm:border-b-0 sm:px-3 sm:py-5`,children:[(0,R.jsx)(Pr,{to:`/`,className:`focus-neko mr-2 inline-flex shrink-0 items-center rounded-lg px-2 py-1.5 text-sm text-sakura-700 sm:mr-0 sm:mb-3`,children:`← 返回聊天`}),(0,R.jsx)(`span`,{className:`hidden px-2 pb-1 text-xs font-medium text-ink-400 sm:block`,children:`设置`}),zz.map(t=>(0,R.jsxs)(Pr,{to:t.to,"aria-current":e===t.key?`page`:void 0,className:`focus-neko inline-flex shrink-0 items-center gap-2 rounded-xl px-3 py-2 text-sm ${e===t.key?`bg-sakura-100 font-semibold text-sakura-800`:`text-ink-600 hover:bg-ink-100`}`,children:[(0,R.jsx)(JP,{name:t.icon,size:15}),t.label]},t.key))]}),(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:t})]})}var Vz={saved:`使用已保存密钥`,environment:`使用环境变量`,runtime:`使用运行时配置`,keyless:`keyless(限流)`,none:`尚未配置`},Hz={deepseek:`DeepSeek`,tavily:`Tavily`};function Uz(e){let{spec:t,status:n,ready:r}=e,i=Hz[t.id]??t.id,[a,o]=(0,f.useState)(``),[s,c]=(0,f.useState)(!1),l=(0,f.useRef)(!1),[u,d]=(0,f.useState)(``);async function p(e){if(!l.current){l.current=!0,c(!0),d(``);try{e?await Sj.removeCredential(t.id):await Sj.saveCredential(t.id,a),o(``),d(e?`已移除保存的密钥`:`已保存,下次请求生效`)}catch{d(`操作失败,请检查连接后重试。`)}finally{l.current=!1,c(!1)}}}let m=s||!r||!n;return(0,R.jsxs)(`section`,{className:`rounded-2xl border border-sakura-200 bg-surface p-5 shadow-soft`,children:[(0,R.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-2`,children:[(0,R.jsx)(`h2`,{className:`text-base font-bold text-ink-900`,children:i}),(0,R.jsx)(`span`,{className:`rounded-full bg-tianyi-50 px-3 py-1 text-xs text-tianyi-800`,children:n?Vz[n.source]:`读取中…`})]}),(0,R.jsxs)(`p`,{className:`mb-3 text-xs text-ink-500`,children:[`环境变量:`,n?n.environmentConfigured?`已配置`:`未配置`:`读取中…`,t.keyless?` · 未配置时以 keyless 限流模式运行`:``]}),(0,R.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),p(!1)},children:[(0,R.jsxs)(`label`,{className:`sr-only`,htmlFor:`${t.id}-key`,children:[i,` API Key`]}),(0,R.jsx)(`input`,{id:`${t.id}-key`,type:`password`,autoComplete:`off`,spellCheck:!1,value:a,maxLength:4096,disabled:m,onChange:e=>o(e.target.value),placeholder:n?.savedConfigured?`输入新密钥以替换`:`粘贴你的 API Key`,className:`focus-neko w-full min-w-0 rounded-xl border border-sakura-200 bg-base px-3 py-2.5 text-sm`}),(0,R.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-3`,children:[(0,R.jsx)(`button`,{type:`submit`,disabled:m||!a.trim(),className:`focus-neko rounded-full bg-sakura-100 px-4 py-1.5 text-sm font-semibold text-sakura-800 disabled:opacity-50`,children:s?`处理中…`:`保存密钥`}),n?.savedConfigured&&(0,R.jsx)(`button`,{type:`button`,disabled:m,onClick:()=>void p(!0),className:`focus-neko rounded-full px-3 py-1.5 text-sm text-ink-500 disabled:opacity-50`,children:`移除已保存密钥`}),(0,R.jsxs)(`a`,{href:t.signupUrl,target:`_blank`,rel:`noreferrer`,className:`focus-neko ml-auto inline-block rounded text-xs text-sakura-700`,children:[`获取 `,i,` API Key ↗`]})]})]}),(0,R.jsx)(`output`,{className:`mt-2 block min-h-4 text-xs text-tianyi-800`,children:u})]})}function Wz(){let{credentials:e,phase:t}=hj(),n=t===`ready`&&e!==null;return(0,R.jsxs)(Bz,{active:`credentials`,children:[(0,R.jsxs)(`div`,{className:`mx-auto w-full max-w-5xl px-5 pt-5 pb-2`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,R.jsx)(`h1`,{className:`text-xl font-bold text-ink-900`,children:`密钥`}),(0,R.jsx)(`span`,{className:`ml-auto text-xs text-ink-500`,children:t===`ready`?`已连接`:`连接中…`})]}),(0,R.jsx)(`p`,{className:`mt-1 text-sm text-ink-500`,children:`管理 API Key,保存值优先于环境变量,所有工作区共用。`})]}),(0,R.jsx)(`main`,{className:`mx-auto w-full max-w-5xl px-5 pb-6`,children:(0,R.jsx)(`div`,{className:`flex max-w-2xl flex-col gap-4`,children:Rz.map(t=>(0,R.jsx)(Uz,{spec:t,status:e?.statuses[t.id],ready:n},t.id))})})]})}var Gz={documents:`文档处理`,development:`开发工作流`,frontend:`前端 / UI`,research:`研究检索`,skills:`技能生态`,automation:`自动化`,database:`数据库`,writing:`写作`,uncategorized:`未分类`},Kz=e=>e>=1048576?`${(e/1024/1024).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`,qz=e=>e===``?``:e.slice(0,10),Jz=e=>{let t=e instanceof Error?e.message:String(e);return/^\[([a-z_]+)\]/.exec(t)?.[1]??null};function Yz(e,t){let n=new Map;for(let r of e){let e=t===`category`?Gz[r.category]??r.category:r.source,i=n.get(e)??[];i.push(r),n.set(e,i)}return[...n.entries()].sort((e,t)=>t[1].length-e[1].length||e[0].localeCompare(t[0]))}function Xz({skill:e}){return(0,R.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs`,children:[e.installed.project&&(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-sakura-100 px-2 py-0.5 text-sakura-800`,children:[(0,R.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full bg-sakura-500`}),`项目级`,e.activeLevel===`project`?`·生效`:``]}),e.installed.user&&(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-sakura-100 px-2 py-0.5 text-sakura-800`,children:[(0,R.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full bg-sakura-500`}),`用户级`,e.activeLevel===`user`?`·生效`:``]}),e.installed.builtin&&(0,R.jsx)(`span`,{className:`rounded-full bg-ink-100 px-2 py-0.5 text-ink-600`,children:`内置`})]})}function Zz({confirm:e,onClose:t}){let[n,r]=(0,f.useState)(!1);return(0,R.jsx)(Qz,{children:(0,R.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,children:[(0,R.jsx)(`button`,{type:`button`,"aria-label":`取消`,onClick:t,className:`absolute inset-0 bg-ink-900/20`}),(0,R.jsxs)(`div`,{role:`alertdialog`,"aria-modal":`true`,"aria-label":e.title,className:`relative w-full max-w-sm rounded-card border border-sakura-200 bg-surface p-5 shadow-lift`,children:[(0,R.jsx)(`h3`,{className:`text-base font-bold text-ink-900`,children:e.title}),(0,R.jsx)(`p`,{className:`mt-2 text-sm text-ink-600`,children:e.body}),(0,R.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:t,className:`focus-neko rounded-full px-4 py-1.5 text-sm text-ink-500`,children:`取消`}),(0,R.jsx)(`button`,{type:`button`,disabled:n,className:`focus-neko rounded-full px-4 py-1.5 text-sm font-semibold disabled:opacity-50 ${e.danger?`bg-sakura-100 text-sakura-800`:`bg-tianyi-100 text-tianyi-800`}`,onClick:()=>{r(!0),e.action().finally(()=>{r(!1),t()})},children:n?`处理中…`:e.confirmLabel})]})]})]})})}function Qz({children:e}){return(0,gN.createPortal)(e,document.body)}function $z({name:e,onClose:t,onChanged:n}){let[r,i]=(0,f.useState)(null),[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)(`about`),[l,u]=(0,f.useState)(null),[d,p]=(0,f.useState)(null),[m,h]=(0,f.useState)(null),[g,_]=(0,f.useState)(``),[v,y]=(0,f.useState)(null);(0,f.useEffect)(()=>{let t=!1;return i(null),o(null),u(null),c(`about`),_(``),Sj.marketDetail(e).then(e=>{t||i(e)}).catch(e=>{t||o(e instanceof Error?e.message:String(e))}),()=>{t=!0}},[e]),(0,f.useEffect)(()=>{if(s!==`preview`||l!==null||d!==null)return;let t=!1;return Sj.marketPreview(e).then(e=>{t||u(e)}).catch(e=>{t||p(e instanceof Error?e.message:String(e))}),()=>{t=!0}},[s,e,l,d]);let b=async(t,r)=>{h(t),_(``);try{let a=await Sj.marketInstall(e,t,r);_(a.shadowedBy===`project`?`已安装到用户级,但项目级同名技能优先,此安装暂不生效。下次发送消息时生效。`:`安装完成,下次发送消息时生效。`),n();let o=await Sj.marketDetail(e);i(o)}catch(n){Jz(n)===`skill_exists`&&!r?y({title:`覆盖已安装技能`,body:`${t===`user`?`用户级`:`项目级`}已存在 ${e}。以市场版本覆盖?本地改动将丢失。`,confirmLabel:`覆盖安装`,action:()=>b(t,!0)}):_(`操作失败:${n instanceof Error?n.message:String(n)}`)}finally{h(null)}},x=t=>{if(r===null)return;let n=t===`user`?r.installed.user:r.installed.project,i=t===`user`&&r.installed.project;n?y({title:`覆盖已安装技能`,body:`${t===`user`?`用户级`:`项目级`}已存在 ${e}。以市场版本 ${r.version} 覆盖?本地改动将丢失。`,confirmLabel:`覆盖安装`,action:()=>b(t,!0)}):i?y({title:`安装后暂不生效`,body:`项目级已存在同名 ${e},项目级优先。仍要安装到用户级吗?`,confirmLabel:`仍安装`,action:()=>b(t,!1)}):b(t,!1)},S=t=>{y({title:`卸载技能`,body:`删除${t===`user`?`用户级`:`项目级`}的 ${e}?此操作不可撤销。`,confirmLabel:`卸载`,danger:!0,action:async()=>{h(t),_(``);try{await Sj.marketUninstall(e,t),_(`已卸载,下次发送消息时生效。`),n(),i(await Sj.marketDetail(e))}catch(e){_(`操作失败:${e instanceof Error?e.message:String(e)}`)}finally{h(null)}}})};return(0,R.jsxs)(Qz,{children:[(0,R.jsx)(`button`,{type:`button`,"aria-label":`关闭详情`,onClick:t,className:`fixed inset-0 z-40 bg-ink-900/10`}),(0,R.jsxs)(`aside`,{role:`dialog`,"aria-label":`技能详情 ${e}`,className:`fixed inset-0 z-50 flex flex-col bg-base sm:inset-y-0 sm:left-auto sm:right-0 sm:w-[26rem] sm:border-l sm:border-sakura-200 sm:shadow-lift`,children:[(0,R.jsxs)(`header`,{className:`flex items-center justify-between gap-2 border-b border-sakura-100 px-4 py-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`text-sakura-500`,children:(0,R.jsx)(JP,{name:`sparkles`,size:16})}),(0,R.jsx)(`h2`,{className:`truncate text-lg font-bold text-ink-900`,children:e}),r&&(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-ink-400`,children:r.version})]}),(0,R.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`关闭详情`,className:`focus-neko rounded-lg p-1 text-ink-500 hover:bg-ink-100`,children:(0,R.jsx)(JP,{name:`close`,size:16})})]}),(0,R.jsx)(`div`,{className:`flex gap-1 border-b border-sakura-100 px-4 py-2`,children:[`about`,`preview`].map(e=>(0,R.jsx)(`button`,{type:`button`,onClick:()=>c(e),className:`focus-neko rounded-full px-3 py-1 text-sm ${s===e?`bg-tianyi-100 font-semibold text-tianyi-800`:`text-ink-500`}`,children:e===`about`?`说明`:`预览`},e))}),(0,R.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-3`,children:[a!==null&&(0,R.jsxs)(`p`,{className:`text-sm text-sakura-800`,children:[`加载失败:`,a]}),r===null&&a===null&&(0,R.jsx)(`p`,{className:`text-sm text-ink-500`,children:`加载中…`}),r!==null&&s===`about`&&(0,R.jsxs)(`div`,{className:`space-y-3`,children:[(0,R.jsx)(`p`,{className:`text-sm text-ink-700`,children:r.description}),(0,R.jsx)(`dl`,{className:`space-y-1.5 text-xs text-ink-600`,children:[[`分类`,Gz[r.category]??r.category],[`来源`,r.source],[`大小`,Kz(r.sizeBytes)],[`SHA-256`,`${r.sha256.slice(0,12)}…`],[`上传于`,qz(r.uploadedAt)],...r.license===``?[]:[[`许可证`,r.license]]].map(([e,t])=>(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(`dt`,{className:`w-14 shrink-0 text-ink-400`,children:e}),(0,R.jsx)(`dd`,{className:`min-w-0 font-mono`,children:t})]},e))}),(0,R.jsxs)(`div`,{className:`rounded-xl bg-ink-50 px-3 py-2 text-xs text-ink-600`,children:[(0,R.jsx)(Xz,{skill:r}),!r.installed.project&&!r.installed.user&&!r.installed.builtin&&`尚未安装`]})]}),r!==null&&s===`preview`&&(0,R.jsxs)(`div`,{children:[l===null&&d===null&&(0,R.jsx)(`p`,{className:`text-sm text-ink-500`,children:`下载并解开预览…`}),d!==null&&(0,R.jsxs)(`p`,{className:`text-sm text-sakura-800`,children:[`预览失败:`,d]}),l!==null&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(fz,{text:l.body}),(0,R.jsx)(`h3`,{className:`mb-1 mt-4 text-xs font-medium text-ink-400`,children:`包内文件`}),(0,R.jsx)(`ul`,{className:`space-y-0.5 font-mono text-xs text-ink-600`,children:l.files.map(e=>(0,R.jsx)(`li`,{children:e},e))})]})]})]}),r!==null&&(0,R.jsxs)(`footer`,{className:`space-y-2 border-t border-sakura-100 px-4 py-3`,children:[g!==``&&(0,R.jsx)(`output`,{className:`block text-xs text-tianyi-800`,children:g}),r.installed.builtin&&!r.installed.user&&!r.installed.project?(0,R.jsx)(`p`,{className:`text-xs text-ink-500`,children:`内置技能随 neko 分发,无需安装,也不支持卸载。`}):(0,R.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:[`user`,`project`].map(e=>{let t=e===`user`?r.installed.user:r.installed.project,n=e===`user`?`用户级`:`项目级`;return t?(0,R.jsxs)(`button`,{type:`button`,disabled:m!==null,onClick:()=>S(e),className:`focus-neko inline-flex items-center gap-1.5 rounded-full border border-ink-200 px-3 py-1.5 text-sm text-ink-600 disabled:opacity-50`,children:[(0,R.jsx)(JP,{name:`trash`,size:14}),m===e?`处理中…`:`卸载${n}`]},e):(0,R.jsxs)(`button`,{type:`button`,disabled:m!==null,onClick:()=>x(e),className:`focus-neko inline-flex items-center gap-1.5 rounded-full bg-tianyi-100 px-3 py-1.5 text-sm font-semibold text-tianyi-800 disabled:opacity-50`,children:[(0,R.jsx)(JP,{name:`download`,size:14}),m===e?`安装中…`:`安装到${n}`]},e)})})]})]}),v&&(0,R.jsx)(Zz,{confirm:v,onClose:()=>y(null)})]})}function eB(){let{phase:e}=hj(),[t,n]=(0,f.useState)([]),[r,i]=(0,f.useState)(!0),[a,o]=(0,f.useState)(null),[s,c]=(0,f.useState)(``),[l,u]=(0,f.useState)(`category`),[d,p]=(0,f.useState)(null),m=(0,f.useRef)(0),h=()=>{let e=++m.current;i(!0),o(null),Sj.marketList().then(t=>{e===m.current&&n(t)}).catch(t=>{e===m.current&&o(t instanceof Error?t.message:String(t))}).finally(()=>{e===m.current&&i(!1)})};(0,f.useEffect)(()=>{e===`ready`&&h()},[e]);let g=(0,f.useMemo)(()=>{let e=s.trim().toLowerCase();return e===``?t:t.filter(t=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e))},[t,s]),_=(0,f.useMemo)(()=>Yz(g,l),[g,l]);return(0,R.jsxs)(Bz,{active:`market`,children:[(0,R.jsx)(`div`,{className:`mx-auto w-full max-w-5xl px-5 pt-5 pb-2`,children:(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,R.jsx)(`h1`,{className:`text-xl font-bold text-ink-900`,children:`技能市场`}),(0,R.jsxs)(`div`,{className:`ml-auto flex flex-wrap items-center gap-2`,children:[(0,R.jsx)(`div`,{className:`flex rounded-full border border-sakura-200 p-0.5 text-xs`,children:[`category`,`source`].map(e=>(0,R.jsx)(`button`,{type:`button`,onClick:()=>u(e),className:`focus-neko rounded-full px-3 py-1 ${l===e?`bg-sakura-100 font-semibold text-sakura-800`:`text-ink-500`}`,children:e===`category`?`按分类`:`按来源`},e))}),(0,R.jsxs)(`label`,{className:`relative`,children:[(0,R.jsx)(`span`,{className:`sr-only`,children:`搜索技能`}),(0,R.jsx)(`span`,{className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-ink-400`,children:(0,R.jsx)(JP,{name:`search`,size:14})}),(0,R.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),placeholder:`搜索技能…`,className:`focus-neko w-44 rounded-full border border-sakura-200 bg-surface py-1.5 pl-8 pr-3 text-sm`})]})]})]})}),(0,R.jsxs)(`main`,{className:`mx-auto w-full max-w-5xl flex-1 px-5 pb-6`,children:[r&&(0,R.jsx)(`p`,{className:`py-16 text-center text-sm text-ink-500`,children:e===`ready`?`加载市场目录…`:`等待网关连接…`}),a!==null&&(0,R.jsxs)(`div`,{className:`mx-auto max-w-md rounded-card border border-sakura-200 bg-surface p-6 text-center shadow-soft`,children:[(0,R.jsx)(`p`,{className:`text-sm text-ink-700`,children:`市场目录加载失败,请检查网络后重试。`}),(0,R.jsx)(`p`,{className:`mt-1 break-all font-mono text-xs text-ink-400`,children:a}),(0,R.jsx)(`button`,{type:`button`,onClick:h,className:`focus-neko mt-4 rounded-full bg-sakura-100 px-4 py-1.5 text-sm font-semibold text-sakura-800`,children:`重试`})]}),!r&&a===null&&g.length===0&&(0,R.jsx)(`p`,{className:`py-16 text-center text-sm text-ink-500`,children:"没有匹配的技能。反复出现的需求可以用 `/skill:skill-creator` 自己造一个。"}),_.map(([e,t])=>(0,R.jsxs)(`section`,{className:`mb-7`,children:[(0,R.jsxs)(`h2`,{className:`mb-2.5 flex items-baseline gap-2 text-lg font-bold text-ink-900`,children:[e,(0,R.jsx)(`span`,{className:`text-xs font-normal text-ink-400`,children:t.length})]}),(0,R.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:t.map(e=>(0,R.jsxs)(`button`,{type:`button`,onClick:()=>p(e.name),className:`focus-neko rounded-2xl border border-sakura-200 bg-surface p-4 text-left shadow-soft transition-shadow hover:shadow-lift`,children:[(0,R.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-2`,children:[(0,R.jsx)(`span`,{className:`truncate text-base font-bold text-ink-900`,children:e.name}),(0,R.jsx)(Xz,{skill:e})]}),(0,R.jsx)(`p`,{className:`mb-2.5 line-clamp-2 min-h-10 text-sm text-ink-500`,children:e.description}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-ink-400`,children:[(0,R.jsx)(`span`,{className:`rounded-full bg-tianyi-50 px-2 py-0.5 text-tianyi-800`,children:e.source}),(0,R.jsx)(`span`,{className:`font-mono`,children:e.version}),(0,R.jsx)(`span`,{children:Kz(e.sizeBytes)})]})]},e.name))})]},e))]}),d!==null&&(0,R.jsx)($z,{name:d,onClose:()=>p(null),onChanged:()=>h()})]})}var tB=zr({component:()=>(0,R.jsx)(Yr,{})}),nB=Lr({getParentRoute:()=>tB,path:`/`,component:Lz}),rB=Lr({getParentRoute:()=>tB,path:`/settings`,component:Wz}),iB=Lr({getParentRoute:()=>tB,path:`/skills`,component:eB}),aB=ti({routeTree:tB.addChildren([nB,rB,iB])});bj();var oB=document.getElementById(`root`);oB!==null&&(0,ui.createRoot)(oB).render((0,R.jsx)(f.StrictMode,{children:(0,R.jsx)(ii,{router:aB})}));
|