larness 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +6 -5
  2. package/app.js +22 -105
  3. package/apps/server/dist/{address-BDs0FfMq.js → address-D0ZG5qR4.js} +5 -2
  4. package/apps/server/dist/args-CrKTPT06.js +92 -0
  5. package/apps/server/dist/cli.js +340 -0
  6. package/apps/server/dist/{client-D88ULjn9.js → client-D_Ni3Zpx.js} +21 -1
  7. package/apps/server/dist/code-B2JBoV4x.js +24 -0
  8. package/apps/server/dist/{doctor-dwTQiTef.js → doctor-CE6cONuz.js} +3 -2
  9. package/apps/server/dist/doctor-sPRlI92N.js +1 -0
  10. package/apps/server/dist/doctor.js +1 -1
  11. package/apps/server/dist/index.js +704 -118
  12. package/apps/server/dist/{paths-DUfwiH2X.js → inspect-XgAc84F9.js} +106 -87
  13. package/apps/server/dist/lifecycle-C3KV3-Ax.js +263 -0
  14. package/apps/server/dist/log-files-CFOaEy6O.js +26 -0
  15. package/apps/server/dist/{managed-Br7VqQiP.js → managed-Cw3MVilO.js} +221 -71
  16. package/apps/server/dist/paths-BhVn34MT.js +77 -0
  17. package/apps/server/dist/{status-D2oSIMoj.js → status-CV_zWfs6.js} +16 -3
  18. package/apps/server/dist/status.js +37 -9
  19. package/apps/server/dist/supervisor-IYDKL4iU.js +297 -0
  20. package/apps/server/dist/tui.js +167 -333
  21. package/apps/server/dist/version-ui_X8H2k.js +13 -0
  22. package/apps/server/drizzle/0001_auth.sql +109 -109
  23. package/apps/server/drizzle/0002_projects.sql +12 -12
  24. package/apps/server/drizzle/0003_workspace.sql +80 -80
  25. package/apps/server/drizzle/0004_models.sql +30 -30
  26. package/apps/server/drizzle/0005_resources.sql +54 -54
  27. package/apps/server/drizzle/0006_commands.sql +23 -23
  28. package/apps/server/drizzle/0007_terminals.sql +41 -41
  29. package/apps/server/drizzle/0008_resource_actions.sql +23 -23
  30. package/apps/server/drizzle/0010_services.sql +31 -31
  31. package/apps/web/dist/assets/{FileEditor-CxzD-z_w.js → FileEditor-DnQa6Owc.js} +1 -1
  32. package/apps/web/dist/assets/{FileViewer-4LwgwN4s.js → FileViewer-DKlF-CWF.js} +1 -1
  33. package/apps/web/dist/assets/{cssMode-BfW9rKao.js → cssMode-C9KmpsHc.js} +1 -1
  34. package/apps/web/dist/assets/{editor.api-D0PbFQmb.js → editor.api-BwfHyHQ6.js} +1 -1
  35. package/apps/web/dist/assets/{freemarker2-CUmmnP_9.js → freemarker2-D41RlIQ5.js} +1 -1
  36. package/apps/web/dist/assets/{handlebars-CV0ntFU6.js → handlebars-D-7R6ic0.js} +1 -1
  37. package/apps/web/dist/assets/{html-lbv15ZCZ.js → html-CUME4rt-.js} +1 -1
  38. package/apps/web/dist/assets/{htmlMode-2S1Ml4u-.js → htmlMode-8w7WLhnL.js} +1 -1
  39. package/apps/web/dist/assets/{index-Bu4wSG15.js → index-BOS3UrP1.js} +2 -2
  40. package/apps/web/dist/assets/{javascript-s1wW-h_2.js → javascript-_3pdDG34.js} +1 -1
  41. package/apps/web/dist/assets/{jsonMode-Di8Ytqtu.js → jsonMode-DiqocFCf.js} +1 -1
  42. package/apps/web/dist/assets/{liquid-CR28rx5y.js → liquid-j0FoiTXN.js} +1 -1
  43. package/apps/web/dist/assets/{lspLanguageFeatures-uPJRSuKu.js → lspLanguageFeatures-Zj7K2sG4.js} +1 -1
  44. package/apps/web/dist/assets/main-DZIruO5x.js +157 -0
  45. package/apps/web/dist/assets/main-gq3n_vn8.css +1 -0
  46. package/apps/web/dist/assets/{mdx-B_RQg_ko.js → mdx-CGQ8Cw6J.js} +1 -1
  47. package/apps/web/dist/assets/{monaco-BHRE2AKp.js → monaco-CyMA3azg.js} +3 -3
  48. package/apps/web/dist/assets/{python-DxrD-zEd.js → python-BtY34Z9A.js} +1 -1
  49. package/apps/web/dist/assets/{razor-BGSx-heg.js → razor-CzYHpLv5.js} +1 -1
  50. package/apps/web/dist/assets/{tsMode-CkPGnA4g.js → tsMode-GZx3VEv9.js} +1 -1
  51. package/apps/web/dist/assets/{typescript-oJa8RtP0.js → typescript-CAfvuTDQ.js} +1 -1
  52. package/apps/web/dist/assets/{workers-BmwP04Ml.js → workers-C5BOxOmH.js} +1 -1
  53. package/apps/web/dist/assets/{xml-NoacuPD-.js → xml-BGX4mtH7.js} +1 -1
  54. package/apps/web/dist/assets/{yaml-PU4CKcMI.js → yaml-B2AgBtJB.js} +1 -1
  55. package/apps/web/dist/favicon.svg +4 -4
  56. package/apps/web/dist/index.html +1 -1
  57. package/docs/README.md +8 -1
  58. package/docs/guides/install.md +23 -7
  59. package/package.json +3 -1
  60. package/apps/server/dist/lock-DyEoZgG_.js +0 -101
  61. package/apps/web/dist/assets/main-KzEpvsAJ.js +0 -157
  62. package/apps/web/dist/assets/main-ptChOROf.css +0 -1
@@ -0,0 +1,157 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FileViewer-DKlF-CWF.js","assets/monaco-CyMA3azg.js","assets/editor.api-BwfHyHQ6.js","assets/index-BOS3UrP1.js","assets/editor-B8GMDV7_.css","assets/monaco-n7clI0si.css","assets/FileEditor-DnQa6Owc.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./index-BOS3UrP1.js";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(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 I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function te(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ne(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else te(ne.bind(null,e))}var re={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(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=re,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=ne,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:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=te,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),f=s(((e,t)=>{t.exports=d()})),p=s((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})),m=s(((e,t)=>{t.exports=p()})),h=u(f(),1),g=m(),_=`larness.theme`,v=(0,h.createContext)(null);function y(e,t){return e===`system`?t?`dark`:`light`:e}function b(){try{let e=localStorage.getItem(_);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`light`}function x({children:e}){let[t,n]=(0,h.useState)(b),[r,i]=(0,h.useState)(()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches);(0,h.useEffect)(()=>{let e=window.matchMedia(`(prefers-color-scheme: dark)`);i(e.matches);let t=e=>i(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let a=y(t,r);(0,h.useEffect)(()=>{document.documentElement.dataset.theme=a,document.documentElement.style.colorScheme=a;try{localStorage.setItem(_,t)}catch{}},[a,t]);let o=(0,h.useCallback)(e=>n(e),[]),s=(0,h.useMemo)(()=>({theme:t,resolved:a,setTheme:o}),[t,a,o]);return(0,g.jsx)(v.Provider,{value:s,children:e})}function S(){let e=(0,h.useContext)(v);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}function C(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=C(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function w(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=C(e))&&(r&&(r+=` `),r+=t);return r}var T=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},E=(e,t)=>({classGroupId:e,validator:t}),D=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),O=`-`,k=[],A=`arbitrary..`,j=e=>{let t=P(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return N(e);let n=e.split(O);return M(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?T(i,t):t:i||k}return n[e]||k}}},M=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=M(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(O):e.slice(t).join(O),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},N=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?A+r:void 0})(),P=e=>{let{theme:t,classGroups:n}=e;return ee(n,t)},ee=(e,t)=>{let n=D();for(let r in e){let i=e[r];F(i,n,r,t)}return n},F=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];I(i,t,n,r)}},I=(e,t,n,r)=>{typeof e==`string`?te(e,t,n):typeof e==`function`?ne(e,t,n,r):re(e,t,n,r)},te=(e,t,n)=>{let r=e===``?t:ie(t,e);r.classGroupId=n},ne=(e,t,n,r)=>{ae(e)?F(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(E(n,e)))},re=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];F(o,ie(t,a),n,r)}},ie=(e,t)=>{let n=e,r=t.split(O),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=D(),n.nextPart.set(t,i)),n=i}return n},ae=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,oe=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},se=`!`,ce=`:`,le=[],ue=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),de=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ce){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(se)?(c=s.slice(0,-1),l=!0):s.startsWith(se)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ue(t,l,c,u)};if(t){let e=t+ce,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ue(le,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},L=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},fe=e=>({cache:oe(e.cacheSize),parseClassName:de(e),sortModifiers:L(e),postfixLookupClassGroupIds:pe(e),...j(e)}),pe=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},me=/\s+/,he=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(me),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+se:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},ge=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=_e(n))&&(i&&(i+=` `),i+=r);return i},_e=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=_e(e[r]))&&(n&&(n+=` `),n+=t);return n},ve=(e,...t)=>{let n,r,i,a,o=o=>(n=fe(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=he(e,n);return i(e,a),a};return a=o,(...e)=>a(ge(...e))},ye=[],be=e=>{let t=t=>t[e]||ye;return t.isThemeGetter=!0,t.themeKey=e,t},xe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Se=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ce=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,we=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Te=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,De=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Oe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ke=e=>Ce.test(e),Ae=e=>!!e&&!Number.isNaN(Number(e)),je=e=>!!e&&Number.isInteger(Number(e)),Me=e=>e.endsWith(`%`)&&Ae(e.slice(0,-1)),Ne=e=>we.test(e),Pe=()=>!0,Fe=e=>Te.test(e)&&!Ee.test(e),Ie=()=>!1,Le=e=>De.test(e),Re=e=>Oe.test(e),ze=e=>!R(e)&&!z(e),Be=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Ve=e=>nt(e,ot,Ie),R=e=>xe.test(e),He=e=>nt(e,st,Fe),Ue=e=>nt(e,ct,Ae),We=e=>nt(e,ut,Pe),Ge=e=>nt(e,lt,Ie),Ke=e=>nt(e,it,Ie),qe=e=>nt(e,at,Re),Je=e=>nt(e,dt,Le),z=e=>Se.test(e),Ye=e=>rt(e,st),Xe=e=>rt(e,lt),Ze=e=>rt(e,it),Qe=e=>rt(e,ot),$e=e=>rt(e,at),et=e=>rt(e,dt,!0),tt=e=>rt(e,ut,!0),nt=(e,t,n)=>{let r=xe.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rt=(e,t,n=!1)=>{let r=Se.exec(e);return r?r[1]?t(r[1]):n:!1},it=e=>e===`position`||e===`percentage`,at=e=>e===`image`||e===`url`,ot=e=>e===`length`||e===`size`||e===`bg-size`,st=e=>e===`length`,ct=e=>e===`number`,lt=e=>e===`family-name`,ut=e=>e===`number`||e===`weight`,dt=e=>e===`shadow`,ft=ve(()=>{let e=be(`color`),t=be(`font`),n=be(`text`),r=be(`font-weight`),i=be(`tracking`),a=be(`leading`),o=be(`breakpoint`),s=be(`container`),c=be(`spacing`),l=be(`radius`),u=be(`shadow`),d=be(`inset-shadow`),f=be(`text-shadow`),p=be(`drop-shadow`),m=be(`blur`),h=be(`perspective`),g=be(`aspect`),_=be(`ease`),v=be(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),z,R],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[z,R,c],T=()=>[ke,`full`,`auto`,...w()],E=()=>[je,`none`,`subgrid`,z,R],D=()=>[`auto`,{span:[`full`,je,z,R]},je,z,R],O=()=>[je,`auto`,z,R],k=()=>[`auto`,`min`,`max`,`fr`,z,R],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ke,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,ke,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[ke,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,z,R],I=()=>[...b(),Ze,Ke,{position:[z,R]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,Qe,Ve,{size:[z,R]}],re=()=>[Me,Ye,He],ie=()=>[``,`none`,`full`,l,z,R],ae=()=>[``,Ae,Ye,He],oe=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[Ae,Me,Ze,Ke],le=()=>[``,`none`,m,z,R],ue=()=>[`none`,Ae,z,R],de=()=>[`none`,Ae,z,R],L=()=>[Ae,z,R],fe=()=>[ke,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ne],breakpoint:[Ne],color:[Pe],container:[Ne],"drop-shadow":[Ne],ease:[`in`,`out`,`in-out`],font:[ze],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ne],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ne],shadow:[Ne],spacing:[`px`,Ae],text:[Ne],"text-shadow":[Ne],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ke,R,z,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,z,R]}],"container-named":[Be],columns:[{columns:[Ae,`auto`,R,z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[je,`auto`,z,R]}],basis:[{basis:[ke,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Ae,ke,`auto`,`initial`,`none`,R]}],grow:[{grow:[``,Ae,z,R]}],shrink:[{shrink:[``,Ae,z,R]}],order:[{order:[je,`first`,`last`,`none`,z,R]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,Ye,He]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,tt,We]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Me,R]}],"font-family":[{font:[Xe,Ge,t]}],"font-features":[{"font-features":[R]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,z,R]}],"line-clamp":[{"line-clamp":[Ae,`none`,z,Ue]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,z,R]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,z,R]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[Ae,`from-font`,`auto`,z,He]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Ae,`auto`,z,R]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[je,z,R]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,z,R]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,z,R]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},je,z,R],radial:[``,z,R],conic:[``,je,z,R]},$e,qe]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Ae,z,R]}],"outline-w":[{outline:[``,Ae,Ye,He]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`inner`,`none`,u,et,Je]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,et,Je]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:ae()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Ae,He]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,et,Je]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Ae,z,R]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[z,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,z,R]}],filter:[{filter:[``,`none`,z,R]}],blur:[{blur:le()}],brightness:[{brightness:[Ae,z,R]}],contrast:[{contrast:[Ae,z,R]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,et,Je]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,Ae,z,R]}],"hue-rotate":[{"hue-rotate":[Ae,z,R]}],invert:[{invert:[``,Ae,z,R]}],saturate:[{saturate:[Ae,z,R]}],sepia:[{sepia:[``,Ae,z,R]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,z,R]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,z,R]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,z,R]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Ae,z,R]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,z,R]}],"backdrop-invert":[{"backdrop-invert":[``,Ae,z,R]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,z,R]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,z,R]}],"backdrop-sepia":[{"backdrop-sepia":[``,Ae,z,R]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,z,R]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Ae,`initial`,z,R]}],ease:[{ease:[`linear`,`initial`,_,z,R]}],delay:[{delay:[Ae,z,R]}],animate:[{animate:[`none`,v,z,R]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,z,R]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:L()}],"skew-x":[{"skew-x":L()}],"skew-y":[{"skew-y":L()}],transform:[{transform:[z,R,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":[`translate-none`],zoom:[{zoom:[je,z,R]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,z,R]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,z,R]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[Ae,Ye,He,Ue]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function B(...e){return ft(w(e))}var pt={primary:`bg-accent text-white shadow-[0_1px_2px_rgba(0,0,0,.12)] hover:brightness-110 active:brightness-95`,secondary:`border border-line bg-surface text-ink shadow-[0_1px_1px_rgba(0,0,0,.03)] hover:bg-surface-2`,ghost:`text-ink-2 hover:bg-black/[.045] hover:text-ink dark:hover:bg-white/[.06]`,soft:`bg-accent-soft text-accent hover:bg-accent/20`,danger:`bg-danger text-white shadow-[0_1px_2px_rgba(0,0,0,.12)] hover:brightness-110 active:brightness-95`},mt={sm:`h-7 gap-1.5 rounded-lg px-2.5 text-[12px]`,md:`h-8 gap-2 rounded-[9px] px-3 text-[12.5px]`};function V({variant:e=`secondary`,size:t=`md`,leading:n,className:r,children:i,type:a=`button`,...o}){return(0,g.jsxs)(`button`,{type:a,className:B(`inline-flex select-none items-center justify-center whitespace-nowrap font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 focus-visible:ring-offset-1 focus-visible:ring-offset-canvas`,`disabled:pointer-events-none disabled:opacity-45`,pt[e],mt[t],r),...o,children:[n,i]})}var ht=Object.defineProperty,gt=(e,t)=>ht(e,`name`,{value:t,configurable:!0}),_t=!!(typeof window<`u`&&window.document&&window.document.createElement);function vt(e,t,{checkForDefaultPrevented:n=!0}={}){return gt(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}gt(vt,`composeEventHandlers`);function yt(e){if(!_t)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}gt(yt,`getOwnerWindow`);function bt(e){if(!_t)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}gt(bt,`getOwnerDocument`);function xt(e,t=!1){let{activeElement:n}=bt(e);if(!n?.nodeName)return null;if(St(n)&&n.contentDocument)return xt(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=bt(n).getElementById(e);if(t)return t}}return n}gt(xt,`getActiveElement`);function St(e){return e.tagName===`IFRAME`}gt(St,`isFrame`);var Ct=Object.defineProperty,wt=(e,t)=>Ct(e,`name`,{value:t,configurable:!0});function Tt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}wt(Tt,`setRef`);function Et(...e){return t=>{let n=!1,r=e.map(e=>{let r=Tt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Tt(e[t],null)}}}}wt(Et,`composeRefs`);function Dt(...e){return h.useCallback(Et(...e),e)}wt(Dt,`useComposedRefs`);var Ot=Object.defineProperty,kt=(e,t)=>Ot(e,`name`,{value:t,configurable:!0});function At(e,t){let n=h.createContext(t);n.displayName=e+`Context`;let r=kt(e=>{let{children:t,...r}=e,i=h.useMemo(()=>r,Object.values(r));return(0,g.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=h.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return kt(i,`useContext`),[r,i]}kt(At,`createContext`);function jt(e,t=[]){let n=[];function r(t,r){let i=h.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=kt(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=h.useMemo(()=>o,Object.values(o));return(0,g.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=h.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return kt(s,`useContext`),[o,s]}kt(r,`createContext`);let i=kt(()=>{let t=n.map(e=>h.createContext(e));return kt(function(n){let r=n?.[e]||t;return h.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Mt(i,...t)]}kt(jt,`createContextScope`);function Mt(...e){let t=e[0];if(e.length===1)return t;let n=kt(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return kt(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}kt(Mt,`composeContextScopes`);var Nt=globalThis?.document?h.useLayoutEffect:()=>{},Pt=Object.defineProperty,Ft=(e,t)=>Pt(e,`name`,{value:t,configurable:!0}),It=h.useId||(()=>void 0),Lt=0;function Rt(e){let[t,n]=h.useState(It());return Nt(()=>{e||n(e=>e??String(Lt++))},[e]),e||(t?`radix-${t}`:``)}Ft(Rt,`useId`);var zt=Object.defineProperty,Bt=(e,t)=>zt(e,`name`,{value:t,configurable:!0}),Vt=h.useEffectEvent,Ht=h.useInsertionEffect;function Ut(e){if(typeof Vt==`function`)return Vt(e);let t=h.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Ht==`function`?Ht(()=>{t.current=e}):Nt(()=>{t.current=e}),h.useMemo(()=>((...e)=>t.current?.(...e)),[])}Bt(Ut,`useEffectEvent`);var Wt=Object.defineProperty,Gt=(e,t)=>Wt(e,`name`,{value:t,configurable:!0}),Kt=h.useInsertionEffect||Nt;function qt({prop:e,defaultProp:t,onChange:n=Gt(()=>{},`onChange`),caller:r}){let[i,a,o]=Jt({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,h.useCallback(t=>{if(s){let n=Yt(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Gt(qt,`useControllableState`);function Jt({defaultProp:e,onChange:t}){let[n,r]=h.useState(e),i=h.useRef(n),a=h.useRef(t);return Kt(()=>{a.current=t},[t]),h.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Gt(Jt,`useUncontrolledState`);function Yt(e){return typeof e==`function`}Gt(Yt,`isFunction`);var Xt=Symbol(`RADIX:SYNC_STATE`);function Zt(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Ut(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=h.useReducer((t,n)=>{if(n.type===Xt)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=h.useRef(p);h.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let g=h.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return h.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Xt,state:i})},[i,d.state,c]),[g,f]}Gt(Zt,`useControllableStateReducer`);var Qt=s((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),$t=s(((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=Qt()})),en=u($t(),1),tn=Object.defineProperty,nn=(e,t)=>tn(e,`name`,{value:t,configurable:!0});function rn(e){let t=h.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=mn(r),h.Children.forEach(r,e=>{if(un(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;fn(n)&&typeof vn==`function`;)n=vn(n._payload);a=sn(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=h.cloneElement(a,void 0,s):!o&&h.Children.count(r)===1&&h.isValidElement(r)&&(a=r);let c=a?ln(a):void 0,l=Dt(n,c);if(!a){if(r||r===0)throw Error(o?_n(e):gn(e));return r}let u=cn(i,a.props??{});return a.type!==h.Fragment&&(u.ref=n?l:c),h.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}nn(rn,`createSlot`);var an=Symbol.for(`radix.slottable`);function on(e){let t=nn(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=an,t}nn(on,`createSlottable`);var sn=nn((e,t)=>`child`in e.props?h.isValidElement(t)?h.cloneElement(t,void 0,e.props.children(t.props.children)):null:h.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function cn(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=hn(a,i))}return{...e,...n}}nn(cn,`mergeProps`);function ln(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}nn(ln,`getElementRef`);function un(e){return h.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===an}nn(un,`isSlottable`);var dn=Symbol.for(`react.lazy`);function fn(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===dn&&`_payload`in e&&pn(e._payload)}nn(fn,`isLazyComponent`);function pn(e){return typeof e==`object`&&!!e&&`then`in e}nn(pn,`isPromiseLike`);function mn(e){let t=e;for(;fn(t)&&typeof vn==`function`;)t=vn(t._payload);return t}nn(mn,`useUnwrappedLazy`);function hn(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}nn(hn,`concatAriaDescribedby`);var gn=nn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),_n=nn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),vn=h.use,yn=Object.defineProperty,bn=(e,t)=>yn(e,`name`,{value:t,configurable:!0}),xn=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=rn(`Primitive.${t}`),r=h.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,g.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Sn(e,t){e&&en.flushSync(()=>e.dispatchEvent(t))}bn(Sn,`dispatchDiscreteCustomEvent`);var Cn=Object.defineProperty,wn=(e,t)=>Cn(e,`name`,{value:t,configurable:!0}),Tn=h.useInsertionEffect;function En(e){let t=h.useRef(e);return typeof Tn==`function`?Tn(()=>{t.current=e}):Nt(()=>{t.current=e}),h.useMemo(()=>((...e)=>t.current?.(...e)),[])}wn(En,`useCallbackRef`);var Dn=Object.defineProperty,On=(e,t)=>Dn(e,`name`,{value:t,configurable:!0}),kn=`dismissableLayer.update`,An=`dismissableLayer.pointerDownOutside`,jn=`dismissableLayer.focusOutside`,Mn,Nn=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Pn=h.forwardRef(On(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=h.useContext(Nn),[d,f]=h.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=h.useState({}),_=Dt(t,f),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=d?v.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=h.useRef(!1),T=Ln(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:h.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return C&&!t},[u.branches,C])}),E=Rn(e=>{if(r&&w.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),D=d?x===v.length-1:!1,O=En(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return h.useEffect(()=>{if(D)return p.addEventListener(`keydown`,O,{capture:!0}),()=>p.removeEventListener(`keydown`,O,{capture:!0})},[p,D,O]),h.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Mn=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),zn(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Mn))}},[d,p,n,u]),h.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),zn())},[d,u]),h.useEffect(()=>{let e=On(()=>m({}),`handleUpdate`);return document.addEventListener(kn,e),()=>document.removeEventListener(kn,e)},[]),(0,g.jsx)(xn.div,{...l,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:vt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:vt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:vt(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`));function Fn(){let e=h.useContext(Nn),[t,n]=h.useState(null);return h.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}On(Fn,`useDismissableLayerSurface`);var In=On(()=>!0,`IS_TRUE`);function Ln(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=In}=t,s=En(e),c=h.useRef(!1),l=h.useRef(!1),u=h.useRef(new Map),d=h.useRef(()=>{});return h.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}On(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}On(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}On(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}On(p,`handleInteractionBubble`);let m=On(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Bn(An,s,p,{discrete:!0})};if(On(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:On(()=>c.current=!0,`onPointerDownCapture`)}}On(Ln,`usePointerDownOutside`);function Rn(e,t=globalThis?.document){let n=En(e),r=h.useRef(!1);return h.useEffect(()=>{let e=On(e=>{e.target&&!r.current&&Bn(jn,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:On(()=>r.current=!0,`onFocusCapture`),onBlurCapture:On(()=>r.current=!1,`onBlurCapture`)}}On(Rn,`useFocusOutside`);function zn(){let e=new CustomEvent(kn);document.dispatchEvent(e)}On(zn,`dispatchUpdate`);function Bn(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Sn(i,a):i.dispatchEvent(a)}On(Bn,`handleAndDispatchCustomEvent`);var Vn=Object.defineProperty,Hn=(e,t)=>Vn(e,`name`,{value:t,configurable:!0}),Un=`focusScope.autoFocusOnMount`,Wn=`focusScope.autoFocusOnUnmount`,Gn={bubbles:!1,cancelable:!0},Kn=h.forwardRef(Hn(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=h.useState(null),u=En(a),d=En(o),f=h.useRef(null),p=Dt(t,l),m=h.useRef(i);h.useEffect(()=>{m.current=i});let _=h.useCallback(e=>e?c?.contains(e)?!0:!!m.current?.some(t=>t.contains(e)):!1,[c]),v=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let e=function(e){if(v.paused||!c)return;let t=e.target;_(t)?f.current=t:rr(f.current,{select:!0})},t=function(e){if(v.paused||!c)return;let t=e.relatedTarget;t!==null&&(_(t)||rr(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&rr(c)};Hn(e,`handleFocusIn`),Hn(t,`handleFocusOut`),Hn(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,v.paused,_]),h.useEffect(()=>{if(c){ir.add(v);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(Un,Gn);c.addEventListener(Un,u),c.dispatchEvent(t),t.defaultPrevented||(Zn(sr($n(c)),{select:!0}),document.activeElement===e&&rr(c))}return()=>{c.removeEventListener(Un,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(Wn,Gn);c.addEventListener(Wn,d),c.dispatchEvent(r),r.defaultPrevented||rr(e??t.body,{select:!0}),c.removeEventListener(Wn,d),ir.remove(v)},0)}}},[c,u,d,v]);let y=h.useCallback(e=>{if(!n&&!r||v.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Qn(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&rr(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&rr(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,v.paused]);return(0,g.jsx)(xn.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})},`FocusScope`)),qn=h.createContext(null);function Jn({registry:e,children:t}){return e?(0,g.jsx)(qn.Provider,{value:e,children:t}):t}Hn(Jn,`FocusScopeBranchProvider`);function Yn(){let[e,t]=h.useState([]);return{nodes:e,registry:h.useMemo(()=>({add:Hn(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:Hn(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}Hn(Yn,`useFocusScopeBranchRegistry`);function Xn(e){let t=h.useContext(qn);h.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}Hn(Xn,`useFocusScopeBranch`);function Zn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(rr(r,{select:t}),document.activeElement!==n)return}Hn(Zn,`focusFirst`);function Qn(e){let t=$n(e);return[er(t,e),er(t.reverse(),e)]}Hn(Qn,`getTabbableEdges`);function $n(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Hn(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Hn($n,`getTabbableCandidates`);function er(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):tr(r,{upTo:t})))return r}Hn(er,`findVisible`);function tr(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Hn(tr,`isHidden`);function nr(e){return e.tagName===`INPUT`&&typeof e.select==`function`}Hn(nr,`isSelectableInput`);function rr(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&nr(e)&&t&&e.select()}}Hn(rr,`focus`);var ir=ar();function ar(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=or(e,t),e.unshift(t)},remove(t){e=or(e,t),e[0]?.resume()}}}Hn(ar,`createFocusScopesStack`);function or(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Hn(or,`arrayRemove`);function sr(e){return e.filter(e=>e.tagName!==`A`)}Hn(sr,`removeLinks`);var cr=Object.defineProperty,lr=h.forwardRef(((e,t)=>cr(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=h.useState(!1);Nt(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?en.createPortal((0,g.jsx)(xn.div,{...r,ref:t}),o):null},`Portal`)),ur=Object.defineProperty,dr=(e,t)=>ur(e,`name`,{value:t,configurable:!0});function fr(e,t){return h.useReducer((e,n)=>t[e][n]??e,e)}dr(fr,`useStateMachine`);var pr=dr(e=>{let{present:t,children:n}=e,r=mr(t),i=typeof n==`function`?n({present:r.isPresent}):h.Children.only(n),a=gr(r.ref,vr(i));return typeof n==`function`||r.isPresent?h.cloneElement(i,{ref:a}):null},`Presence`);function mr(e){let[t,n]=h.useState(),r=h.useRef(null),i=h.useRef(e),a=h.useRef(`none`),o=h.useRef(void 0),[s,c]=fr(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return h.useEffect(()=>{s===`mounted`?(a.current=o.current??_r(r.current),o.current=void 0):a.current=`none`},[s]),Nt(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=_r(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Nt(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=dr(a=>{let o=_r(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=dr(e=>{e.target===t&&(a.current=_r(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:h.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=_r(t)}else r.current=null;n(e)},[])}}dr(mr,`usePresence`);function hr(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}dr(hr,`setRef`);function gr(...e){let t=h.useRef(e);return t.current=e,h.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=hr(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():hr(n[e],null)}}},[])}dr(gr,`useStableComposedRefs`);function _r(e){return e?.animationName||`none`}dr(_r,`getAnimationName`);function vr(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}dr(vr,`getElementRef`);var yr=Object.defineProperty,br=(e,t)=>yr(e,`name`,{value:t,configurable:!0}),xr=0,Sr=null;function Cr(e){return wr(),e.children}br(Cr,`FocusGuards`);function wr(){h.useEffect(()=>{Sr||={start:Tr(),end:Tr()};let{start:e,end:t}=Sr;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),xr++,()=>{xr===1&&(Sr?.start.remove(),Sr?.end.remove(),Sr=null),xr=Math.max(0,xr-1)}},[])}br(wr,`useFocusGuards`);function Tr(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}br(Tr,`createFocusGuard`);var Er=function(){return Er=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Er.apply(this,arguments)};function Dr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Or(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var kr=`right-scroll-bar-position`,Ar=`width-before-scroll-bar`,jr=`with-scroll-bars-hidden`,Mr=`--removed-body-scroll-bar-size`;function Nr(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Pr(e,t){var n=(0,h.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Fr=typeof window<`u`?h.useLayoutEffect:h.useEffect,Ir=new WeakMap;function Lr(e,t){var n=Pr(t||null,function(t){return e.forEach(function(e){return Nr(e,t)})});return Fr(function(){var t=Ir.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Nr(e,null)}),i.forEach(function(e){r.has(e)||Nr(e,a)})}Ir.set(n,e)},[e]),n}function Rr(e){return e}function zr(e,t){t===void 0&&(t=Rr);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Br(e){e===void 0&&(e={});var t=zr(null);return t.options=Er({async:!0,ssr:!1},e),t}var Vr=function(e){var t=e.sideCar,n=Dr(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return h.createElement(r,Er({},n))};Vr.isSideCarExport=!0;function Hr(e,t){return e.useMedium(t),Vr}var Ur=Br(),Wr=function(){},Gr=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:Wr,onWheelCapture:Wr,onTouchMoveCapture:Wr}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Dr(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Lr([n,t]),w=Er(Er({},x),i);return h.createElement(h.Fragment,null,u&&h.createElement(S,{sideCar:Ur,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?h.cloneElement(h.Children.only(s),Er(Er({},w),{ref:C})):h.createElement(y,Er({},w,{className:c,ref:C}),s))});Gr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Gr.classNames={fullWidth:Ar,zeroRight:kr};var Kr=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function qr(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Kr();return t&&e.setAttribute(`nonce`,t),e}function Jr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Yr(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Xr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=qr())&&(Jr(t,n),Yr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Zr=function(){var e=Xr();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Qr=function(){var e=Zr();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},$r={left:0,top:0,right:0,gap:0},ei=function(e){return parseInt(e||``,10)||0},ti=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[ei(n),ei(r),ei(i)]},ni=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return $r;var t=ti(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ri=Qr(),ii=`data-scroll-locked`,ai=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
3
+ .${jr} {
4
+ overflow: hidden ${r};
5
+ padding-right: ${s}px ${r};
6
+ }
7
+ body[${ii}] {
8
+ overflow: hidden ${r};
9
+ overscroll-behavior: contain;
10
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
11
+ padding-left: ${i}px;
12
+ padding-top: ${a}px;
13
+ padding-right: ${o}px;
14
+ margin-left:0;
15
+ margin-top:0;
16
+ margin-right: ${s}px ${r};
17
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
18
+ }
19
+
20
+ .${kr} {
21
+ right: ${s}px ${r};
22
+ }
23
+
24
+ .${Ar} {
25
+ margin-right: ${s}px ${r};
26
+ }
27
+
28
+ .${kr} .${kr} {
29
+ right: 0 ${r};
30
+ }
31
+
32
+ .${Ar} .${Ar} {
33
+ margin-right: 0 ${r};
34
+ }
35
+
36
+ body[${ii}] {
37
+ ${Mr}: ${s}px;
38
+ }
39
+ `},oi=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},si=function(){h.useEffect(function(){return document.body.setAttribute(ii,(oi()+1).toString()),function(){var e=oi()-1;e<=0?document.body.removeAttribute(ii):document.body.setAttribute(ii,e.toString())}},[])},ci=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;si();var a=h.useMemo(function(){return ni(i)},[i]);return h.createElement(ri,{styles:ai(a,!t,i,n?``:`!important`)})},li=!1;if(typeof window<`u`)try{var ui=Object.defineProperty({},"passive",{get:function(){return li=!0,!0}});window.addEventListener(`test`,ui,ui),window.removeEventListener(`test`,ui,ui)}catch{li=!1}var di=li?{passive:!1}:!1,fi=function(e){return e.tagName===`TEXTAREA`},pi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!fi(e)&&n[t]===`visible`)},mi=function(e){return pi(e,`overflowY`)},hi=function(e){return pi(e,`overflowX`)},gi=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),yi(e,r)){var i=bi(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},_i=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},vi=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},yi=function(e,t){return e===`v`?mi(t):hi(t)},bi=function(e,t){return e===`v`?_i(t):vi(t)},xi=function(e,t){return e===`h`&&t===`rtl`?-1:1},Si=function(e,t,n,r,i){var a=xi(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=bi(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&yi(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ci=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wi=function(e){return[e.deltaX,e.deltaY]},Ti=function(e){return e&&`current`in e?e.current:e},Ei=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Di=function(e){return`
40
+ .block-interactivity-${e} {pointer-events: none;}
41
+ .allow-interactivity-${e} {pointer-events: all;}
42
+ `},Oi=0,ki=[];function Ai(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),i=h.useState(Oi++)[0],a=h.useState(Qr)[0],o=h.useRef(e);h.useEffect(function(){o.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Or([e.lockRef.current],(e.shards||[]).map(Ti),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=h.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ci(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=gi(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=gi(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Si(h,t,e,h===`h`?s:c,!0)},[]),c=h.useCallback(function(e){var n=e;if(ki.length&&ki[ki.length-1]===a){var r=`deltaY`in n?wi(n):Ci(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ei(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(Ti).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=h.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ji(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=h.useCallback(function(e){n.current=Ci(e),r.current=void 0},[]),d=h.useCallback(function(t){l(t.type,wi(t),t.target,s(t,e.lockRef.current))},[]),f=h.useCallback(function(t){l(t.type,Ci(t),t.target,s(t,e.lockRef.current))},[]);h.useEffect(function(){return ki.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,di),document.addEventListener(`touchmove`,c,di),document.addEventListener(`touchstart`,u,di),function(){ki=ki.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,di),document.removeEventListener(`touchmove`,c,di),document.removeEventListener(`touchstart`,u,di)}},[]);var p=e.removeScrollBar,m=e.inert;return h.createElement(h.Fragment,null,m?h.createElement(a,{styles:Di(i)}):null,p?h.createElement(ci,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ji(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Mi=Hr(Ur,Ai),Ni=h.forwardRef(function(e,t){return h.createElement(Gr,Er({},e,{ref:t,sideCar:Mi}))});Ni.classNames=Gr.classNames;var Pi=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Fi=new WeakMap,Ii=new WeakMap,Li={},Ri=0,zi=function(e){return e&&(e.host||zi(e.parentNode))},Bi=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=zi(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Vi=function(e,t,n,r){var i=Bi(t,Array.isArray(e)?e:[e]);Li[n]||(Li[n]=new WeakMap);var a=Li[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Fi.get(e)||0)+1,l=(a.get(e)||0)+1;Fi.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ii.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ri++,function(){o.forEach(function(e){var t=Fi.get(e)-1,i=a.get(e)-1;Fi.set(e,t),a.set(e,i),t||(Ii.has(e)||e.removeAttribute(r),Ii.delete(e)),i||e.removeAttribute(n)}),Ri--,Ri||(Fi=new WeakMap,Fi=new WeakMap,Ii=new WeakMap,Li={})}},Hi=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Pi(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Vi(r,i,n,`aria-hidden`)):function(){return null}},Ui=Object.defineProperty,Wi=(e,t)=>Ui(e,`name`,{value:t,configurable:!0}),Gi=`Dialog`,[Ki,qi]=jt(Gi),[Ji,Yi]=Ki(Gi),Xi=Wi(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=h.useRef(null),c=h.useRef(null),{nodes:l,registry:u}=Yn(),[d,f]=qt({prop:r,defaultProp:i??!1,onChange:a,caller:Gi}),[p,m]=h.useState(0),[_,v]=h.useState(0);return(0,g.jsx)(Ji,{scope:t,triggerRef:s,contentRef:c,contentId:Rt(),titleId:Rt(),descriptionId:Rt(),titlePresent:p>0,descriptionPresent:_>0,setTitleCount:m,setDescriptionCount:v,open:d,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(e=>!e),[f]),modal:o,branchNodes:l,branchRegistry:u,children:n})},`Dialog`),Zi=`DialogPortal`,[Qi,$i]=Ki(Zi,{forceMount:void 0}),ea=Wi(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Yi(Zi,t);return(0,g.jsx)(Qi,{scope:t,forceMount:n,children:h.Children.map(r,e=>(0,g.jsx)(pr,{present:n||a.open,children:(0,g.jsx)(lr,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),ta=`DialogOverlay`,na=h.forwardRef(Wi(function(e,t){let n=$i(ta,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Yi(ta,e.__scopeDialog);return a.modal?(0,g.jsx)(pr,{present:r||a.open,children:(0,g.jsx)(ia,{...i,ref:t})}):null},`DialogOverlay`)),ra=rn(`DialogOverlay.RemoveScroll`),ia=h.forwardRef(Wi(function(e,t){let{__scopeDialog:n,...r}=e,i=Yi(ta,n),a=Dt(t,Fn());return(0,g.jsx)(Ni,{as:ra,allowPinchZoom:!0,shards:h.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,g.jsx)(xn.div,{"data-state":ha(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),aa=`DialogContent`,oa=h.forwardRef(Wi(function(e,t){let n=$i(aa,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Yi(aa,e.__scopeDialog);return(0,g.jsx)(pr,{present:r||a.open,children:a.modal?(0,g.jsx)(sa,{...i,ref:t}):(0,g.jsx)(ca,{...i,ref:t})})},`DialogContent`)),sa=h.forwardRef(Wi(function(e,t){let n=Yi(aa,e.__scopeDialog),r=h.useRef(null),i=Dt(t,n.contentRef,r);return h.useEffect(()=>{let e=r.current;if(e)return Hi(e)},[]),(0,g.jsx)(la,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:vt(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:vt(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:vt(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),ca=h.forwardRef(Wi(function(e,t){let n=Yi(aa,e.__scopeDialog),r=h.useRef(!1),i=h.useRef(!1);return(0,g.jsx)(la,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),la=h.forwardRef(Wi(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=Yi(aa,n);return wr(),(0,g.jsx)(Jn,{registry:l.branchRegistry,children:(0,g.jsx)(Kn,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,g.jsx)(Pn,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?ma(o,l.descriptionId):o,"data-state":ha(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),ua=h.forwardRef(Wi(function(e,t){let{__scopeDialog:n,...r}=e,i=Yi(`DialogTitle`,n),{setTitleCount:a}=i;return Nt(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,g.jsx)(xn.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),da=h.forwardRef(Wi(function(e,t){let{__scopeDialog:n,...r}=e,i=Yi(`DialogDescription`,n),{setDescriptionCount:a}=i;return Nt(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,g.jsx)(xn.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),fa=`DialogClose`,pa=h.forwardRef(Wi(function(e,t){let{__scopeDialog:n,...r}=e,i=Yi(fa,n);return(0,g.jsx)(xn.button,{type:`button`,...r,ref:t,onClick:vt(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function ma(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Wi(ma,`concatAriaDescribedby`);function ha(e){return e?`open`:`closed`}Wi(ha,`getState`);var ga=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function _a(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:ga(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var va=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},ya=e=>{let t=va(e);return t.charAt(0).toUpperCase()+t.slice(1)},ba=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),xa={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Sa(e){return e!=null}function Ca(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??xa.width,a=e.size??e.height??xa.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?ba(...c):ba(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??xa[`stroke-width`])*Number(e.size??e.width??xa.width)/Number(t.size??t.width??xa.width):t.strokeWidth??xa[`stroke-width`];return[`svg`,{...Object.entries(xa).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Sa(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Sa(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Sa(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function wa(e,t={}){return Ca(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Ta=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ea=(0,h.createContext)({}),Da=()=>(0,h.useContext)(Ea),Oa=(0,h.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=Da()??{},b=!!c||Ta(d),[x,S,C=[]]=wa(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:ba(y,s),hasA11yProp:b,attributes:d});return(0,h.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,h.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function H(e,t=[],n=[]){let r=typeof e==`string`?_a(e,t,n):e,i=(0,h.forwardRef)(({className:e,...t},n)=>(0,h.createElement)(Oa,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=ya(r.name)),i}var ka={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};ka.node;var Aa=H(ka),ja={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};ja.node;var Ma=H(ja),Na={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};Na.node;var Pa=H(Na),Fa={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};Fa.node;var Ia=H(Fa),La={name:`arrow-up-right`,size:24,node:[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]};La.node;var Ra=H(La),za={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};za.node;var Ba=H(za),Va={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};Va.node;var Ha=H(Va),Ua={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4`,key:`5nuw1p`}],[`path`,{d:`M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294`,key:`18ldcf`}],[`path`,{d:`M17.996 5.125a4 4 0 012.526 5.77`,key:`1sdu8q`}],[`path`,{d:`M18 18a4 4 0 002-7.465`,key:`7xqqvr`}],[`path`,{d:`M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517`,key:`t46ysz`}],[`path`,{d:`M6 18a4 4 0 01-2-7.465`,key:`1y2m15`}],[`path`,{d:`M6.004 5.125a4 4 0 00-2.526 5.77`,key:`3cw1ss`}]]};Ua.node;var Wa=H(Ua),Ga={name:`bug`,size:24,node:[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]};Ga.node;var Ka=H(Ga),qa={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};qa.node;var Ja=H(qa),Ya={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Ya.node;var Xa=H(Ya),Za={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};Za.node;var Qa=H(Za),$a={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};$a.node;var eo=H($a),to={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};to.node;var no=H(to),ro={name:`chevrons-down-up`,size:24,node:[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]};ro.node;var io=H(ro),ao={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};ao.node;var oo=H(ao),so={name:`circle-exclamation-point`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`,`circle-alert`]};so.node;var co=H(so),lo={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};lo.node;var uo=H(lo),fo={name:`clock-3`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]};fo.node;var po=H(fo),mo={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};mo.node;var ho=H(mo),go={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};go.node;var _o=H(go),vo={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};vo.node;var yo=H(vo),bo={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};bo.node;var xo=H(bo),So={name:`earth`,size:24,node:[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],aliases:[`globe-2`]};So.node;var Co=H(So),wo={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};wo.node;var To=H(wo),Eo={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Eo.node;var Do=H(Eo),Oo={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Oo.node;var ko=H(Oo),Ao={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Ao.node;var jo=H(Ao),Mo={name:`file-code-corner`,size:24,node:[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],aliases:[`file-code-2`]};Mo.node;var No=H(Mo),Po={name:`file-plus-corner`,size:24,node:[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]],aliases:[`file-plus-2`]};Po.node;var Fo=H(Po),Io={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Io.node;var Lo=H(Io),Ro={name:`files`,size:24,node:[[`path`,{d:`M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`,key:`14sh0y`}],[`path`,{d:`M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z`,key:`1970lx`}],[`path`,{d:`M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1`,key:`l4dndm`}]]};Ro.node;var zo=H(Ro),Bo={name:`folder-plus`,size:24,node:[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};Bo.node;var Vo=H(Bo),Ho={name:`folder-search`,size:24,node:[[`path`,{d:`M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1`,key:`1bw5m7`}],[`path`,{d:`m21 21-1.9-1.9`,key:`1g2n9r`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}]]};Ho.node;var Uo=H(Ho),Wo={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};Wo.node;var Go=H(Wo),Ko={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};Ko.node;var qo=H(Ko),Jo={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};Jo.node,H(Jo);var Yo={name:`git-compare`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]};Yo.node;var Xo=H(Yo),Zo={name:`git-pull-request`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]};Zo.node,H(Zo);var Qo={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};Qo.node;var $o=H(Qo),es={name:`hard-drive`,size:24,node:[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]};es.node;var ts=H(es),ns={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};ns.node;var rs=H(ns),is={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};is.node;var as=H(is),os={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};os.node;var ss=H(os),cs={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};cs.node;var ls=H(cs),us={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};us.node;var ds=H(us),fs={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};fs.node;var ps=H(fs),ms={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};ms.node;var hs=H(ms),gs={name:`memory-stick`,size:24,node:[[`path`,{d:`M12 12v-2`,key:`fwoke6`}],[`path`,{d:`M12 18v-2`,key:`qj6yno`}],[`path`,{d:`M16 12v-2`,key:`heuere`}],[`path`,{d:`M16 18v-2`,key:`s1ct0w`}],[`path`,{d:`M2 11h1.5`,key:`15p63e`}],[`path`,{d:`M20 18v-2`,key:`12ehxp`}],[`path`,{d:`M20.5 11H22`,key:`khsy7a`}],[`path`,{d:`M4 18v-2`,key:`1c3oqr`}],[`path`,{d:`M8 12v-2`,key:`1mwtfd`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`rect`,{x:`2`,y:`6`,width:`20`,height:`10`,rx:`2`,key:`1qcswk`}]]};gs.node;var _s=H(gs),vs={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};vs.node;var ys=H(vs),bs={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};bs.node;var xs=H(bs),Ss={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};Ss.node;var Cs=H(Ss),ws={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};ws.node;var Ts=H(ws),Es={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};Es.node;var Ds=H(Es),Os={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]};Os.node;var ks=H(Os),As={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};As.node;var js=H(As),Ms={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Ms.node;var Ns=H(Ms),Ps={name:`pin-off`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]};Ps.node;var Fs=H(Ps),Is={name:`pin`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]};Is.node;var Ls=H(Is),Rs={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};Rs.node;var zs=H(Rs),Bs={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Bs.node;var Vs=H(Bs),Hs={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};Hs.node;var Us=H(Hs),Ws={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};Ws.node;var Gs=H(Ws),Ks={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};Ks.node;var qs=H(Ks),Js={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};Js.node;var Ys=H(Js),Xs={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Xs.node;var Zs=H(Xs),Qs={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};Qs.node;var $s=H(Qs),ec={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};ec.node;var tc=H(ec),nc={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};nc.node;var rc=H(nc),ic={name:`shield-exclamation-point`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]],aliases:[`shield-alert`]};ic.node;var ac=H(ic),oc={name:`shield`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]};oc.node;var sc=H(oc),cc={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};cc.node;var lc=H(cc),uc={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};uc.node;var dc=H(uc),fc={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};fc.node;var pc=H(fc),mc={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};mc.node;var hc=H(mc),gc={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};gc.node;var _c=H(gc),vc={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};vc.node;var yc=H(vc),bc={name:`triangle-exclamation-point`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`,`triangle-alert`]};bc.node;var xc=H(bc),Sc={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};Sc.node;var Cc=H(Sc),wc={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};wc.node,H(wc);var Tc={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};Tc.node;var Ec=H(Tc),Dc={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Dc.node;var Oc=H(Dc),kc={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};kc.node;var Ac=H(kc),jc={success:oo,info:ss,error:co},Mc={success:`text-success`,info:`text-accent`,error:`text-danger`},Nc=`pointer-events-none fixed inset-x-0 top-14 z-[360] flex flex-col items-center gap-2 px-4`,Pc=`data-larness-toast-layer`,Fc=null;function Ic(){let e=Lc();return e.className=Nc,e}function Lc(){if(Fc?.isConnected)return Fc;let e=document.querySelector(`[${Pc}]`);if(e)return Fc=e,e;let t=document.createElement(`div`);return t.setAttribute(Pc,``),document.body.append(t),Fc=t,t}var Rc=(0,h.createContext)(null);function zc({children:e}){let[t,n]=(0,h.useState)(null);return(0,g.jsxs)(Rc.Provider,{value:t,children:[(0,g.jsx)(`div`,{ref:n,"data-larness-toast-host":``,className:Nc}),e]})}function Bc(e){let t=(0,h.useContext)(Rc);if(!e.message)return null;let n=(0,g.jsx)(Vc,{...e,message:e.message},e.message);return typeof document>`u`?n:(0,en.createPortal)(n,t??Ic())}function Vc({message:e,tone:t=`success`,durationMs:n,retry:r,onDismiss:i}){let a=(0,h.useRef)(i);a.current=i;let[o,s]=(0,h.useState)(!1),c=n??(t===`error`?0:3200);if((0,h.useEffect)(()=>{if(c<=0)return;let e=window.setTimeout(()=>{s(!0),a.current?.()},c);return()=>window.clearTimeout(e)},[c]),o)return null;let l=jc[t],u=c<=0;return(0,g.jsxs)(`div`,{role:t===`error`?`alert`:`status`,"aria-live":t===`error`?`assertive`:`polite`,className:B(`toast-slide-in pointer-events-none flex w-max max-w-[min(28rem,100%)]`,`items-center gap-2 rounded-xl border bg-surface px-3 py-2 text-[12px] leading-5 text-ink shadow-[var(--shadow-pop)]`,t===`error`?`border-danger/30`:`border-line`),children:[(0,g.jsx)(l,{size:13,"aria-hidden":`true`,className:B(`shrink-0`,Mc[t])}),(0,g.jsx)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:e}),r?(0,g.jsx)(V,{size:`sm`,variant:`secondary`,className:`pointer-events-auto shrink-0`,onClick:r.run,children:r.label}):null,u?(0,g.jsx)(V,{size:`sm`,variant:`ghost`,className:`pointer-events-auto shrink-0`,"aria-label":t===`error`?`关闭错误消息`:`关闭提示`,onClick:()=>{s(!0),i?.()},children:`关闭`}):null]})}var Hc=Xi,Uc=pa,Wc=(0,h.forwardRef)(({className:e,overlayClassName:t,children:n,...r},i)=>(0,g.jsxs)(ea,{children:[(0,g.jsx)(na,{className:B(`fixed inset-0 z-[300] bg-black/20 backdrop-blur-[2px]`,t)}),(0,g.jsx)(oa,{ref:i,className:B(`fixed inset-0 z-[301] m-auto h-fit w-[min(560px,calc(100vw-40px))]`,`rounded-2xl border border-line bg-surface p-5 text-ink shadow-[var(--shadow-pop)] outline-none`,e),...r,children:(0,g.jsx)(zc,{children:n})})]}));Wc.displayName=`DialogContent`;function Gc({className:e,...t}){return(0,g.jsx)(ua,{className:B(`text-[15px] font-semibold tracking-[-.01em]`,e),...t})}function Kc({className:e,...t}){return(0,g.jsx)(da,{className:B(`mt-1 text-[12px] leading-5 text-ink-2`,e),...t})}function qc({message:e,onDismiss:t,retry:n}){return(0,g.jsx)(Bc,{message:e??null,tone:`error`,retry:n,onDismiss:t})}function Jc({open:e,title:t,description:n,confirmLabel:r,pendingLabel:i=`处理中…`,danger:a=!1,pending:o=!1,confirmDisabled:s=!1,error:c,onDismissError:l,onCancel:u,onConfirm:d,children:f,className:p,overlayClassName:m}){let _=(0,h.useRef)(null);return(0,g.jsx)(Hc,{open:e,onOpenChange:e=>{!e&&!o&&u()},children:(0,g.jsxs)(Wc,{className:B(`w-[min(420px,calc(100vw-40px))] space-y-3 pointer-events-auto`,p),overlayClassName:m,onOpenAutoFocus:e=>{e.preventDefault(),_.current?.focus()},onEscapeKeyDown:e=>{o&&e.preventDefault()},onPointerDownOutside:e=>{o&&e.preventDefault()},children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(Gc,{children:t}),(0,g.jsx)(Kc,{children:n})]}),f,(0,g.jsx)(qc,{message:c,onDismiss:l}),(0,g.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2 pt-1`,children:[(0,g.jsx)(V,{ref:_,variant:`secondary`,disabled:o,onClick:u,children:`取消`}),(0,g.jsx)(V,{variant:a?`danger`:`primary`,disabled:o||s,onClick:d,children:o?i:r})]})]})})}var Yc,Xc=Object.defineProperty,Zc=(e,t)=>Xc(e,`name`,{value:t,configurable:!0});function Qc(e){let t=e+`CollectionProvider`,[n,r]=jt(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Zc(e=>{let{scope:t,children:n}=e,r=h.useRef(null),a=h.useRef(new Map).current;return(0,g.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=rn(s),l=h.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Dt(t,a(s,n).collectionRef);return(0,g.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=rn(u),p=h.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=h.useRef(null),s=Dt(t,o),c=a(u,n);return h.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,g.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return h.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Zc(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}Zc(Qc,`createCollection`);var $c=new WeakMap,el=(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],$c.set(this,!0)}set(e,t){return $c.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=rl(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=tl(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=tl(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return tl(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}static#t=Yc=()=>(Zc(this,`OrderedDict`),this)},Yc());function tl(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=nl(e,t);return n===-1?void 0:e[n]}Zc(tl,`at`);function nl(e,t){let n=e.length,r=rl(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Zc(nl,`toSafeIndex`);function rl(e){return e!==e||e===0?0:Math.trunc(e)}Zc(rl,`toSafeInteger`);function il(e){let t=e+`CollectionProvider`,[n,r]=jt(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let c=Zc(({state:e,...t})=>e?(0,g.jsx)(u,{...t,state:e}):(0,g.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=Zc(e=>{let t=y();return(0,g.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=e+`CollectionInit`;let u=Zc(e=>{let{scope:t,children:n,state:r}=e,a=h.useRef(null),[s,c]=h.useState(null),l=Dt(a,c),[u,d]=r,f=h.useRef(new el),p=h.useCallback(()=>{let e=f.current;return sl(e)||e.sort(cl),e},[]);return h.useEffect(()=>{if(!s)return;let e=ll(()=>{d(e=>{let t=e.toSorted(cl);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,g.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:p,setCollection:d,registryRef:f,children:(0,g.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);u.displayName=e+`CollectionProviderImpl`;let d=e+`CollectionSlot`,f=rn(d),p=h.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Dt(t,a(d,n).collectionElementRef);return(0,g.jsx)(f,{ref:i,children:r})});p.displayName=d;let m=e+`CollectionItemSlot`,_=rn(m),v=h.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=h.useRef(null),{setCollection:s,registryRef:c}=a(m,n),l=h.useRef(i);al(l.current,i)||(l.current=i);let u=l.current,d=Dt(t,h.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),o);Nt(()=>{let e=o.current,t=c.current;e&&t.has(e)&&t.set(e,{...u,element:e})},[u,c]);let f=h.useRef(null);return h.useEffect(()=>{let e=o.current,t=f.current;((t?.element??null)!==e||e&&t?.itemData!==u)&&(f.current=e?{element:e,itemData:u}:null,s(n=>{let r=new el(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(cl)}))}),h.useEffect(()=>()=>{let e=f.current;f.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new el(t);return n.delete(e.element),n})},[s]),(0,g.jsx)(_,{"data-radix-collection-item":``,ref:d,children:r})});v.displayName=m;function y(){return h.useState(new el)}Zc(y,`useInitCollection`);function b(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}Zc(b,`useCollection`);function x(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return Zc(x,`useGetCollection`),[{Provider:c,Slot:p,ItemSlot:v},{createCollectionScope:r,useCollection:b,useGetCollection:x,useInitCollection:y}]}Zc(il,`createCollection`);function al(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Zc(al,`shallowEqual`);function ol(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Zc(ol,`isElementPreceding`);function sl(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}Zc(sl,`isInDocumentOrder`);function cl(e,t){return!e[1].element||!t[1].element?0:ol(e[1].element,t[1].element)?-1:1}Zc(cl,`sortByDocumentPosition`);function ll(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Zc(ll,`getChildListObserver`);var ul=Object.defineProperty,dl=(e,t)=>ul(e,`name`,{value:t,configurable:!0}),fl={LTR:`ltr`,RTL:`rtl`},pl=h.createContext(void 0);function ml(e){let t=h.useContext(pl);return e||t||fl.LTR}dl(ml,`useDirection`);var hl=[`top`,`right`,`bottom`,`left`],gl=Math.min,_l=Math.max,vl=Math.round,yl=Math.floor,bl=e=>({x:e,y:e}),xl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Sl(e,t,n){return _l(e,gl(t,n))}function Cl(e,t){return typeof e==`function`?e(t):e}function wl(e){return e.split(`-`)[0]}function Tl(e){return e.split(`-`)[1]}function El(e){return e===`x`?`y`:`x`}function Dl(e){return e===`y`?`height`:`width`}function Ol(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function kl(e){return El(Ol(e))}function Al(e,t,n){n===void 0&&(n=!1);let r=Tl(e),i=kl(e),a=Dl(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=zl(o)),[o,zl(o)]}function jl(e){let t=zl(e);return[Ml(e),t,Ml(t)]}function Ml(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Nl=[`left`,`right`],Pl=[`right`,`left`],Fl=[`top`,`bottom`],Il=[`bottom`,`top`];function Ll(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Pl:Nl:t?Nl:Pl;case`left`:case`right`:return t?Fl:Il;default:return[]}}function Rl(e,t,n,r){let i=Tl(e),a=Ll(wl(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ml)))),a}function zl(e){let t=wl(e);return xl[t]+e.slice(t.length)}function Bl(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Vl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Bl(e)}function Hl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ul(e,t,n){let{reference:r,floating:i}=e,a=Ol(t),o=kl(t),s=Dl(o),c=wl(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=Tl(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Wl(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}=Cl(t,e),p=Vl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Hl(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=Hl(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 Gl=50,Kl=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Wl},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ul(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<Gl&&(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}=Ul(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ql=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Cl(e,t)||{};if(l==null)return{};let d=Vl(u),f={x:n,y:r},p=kl(i),m=Dl(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=gl(d[_],T),D=gl(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Sl(E,k,O),j=!c.arrow&&Tl(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Jl=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}=Cl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=wl(r),_=Ol(o),v=wl(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[zl(o)]:jl(o)),x=p!==`none`;!d&&x&&b.push(...Rl(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=Al(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`||_===Ol(t)||T.every(e=>Ol(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=Ol(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Yl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Xl(e){return hl.some(t=>e[t]>=0)}var Zl=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Cl(e,t);switch(i){case`referenceHidden`:{let e=Yl(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Xl(e)}}}case`escaped`:{let e=Yl(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Xl(e)}}}default:return{}}}}},Ql=new Set([`left`,`top`]);async function $l(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=wl(n),s=Tl(n),c=Ol(n)===`y`,l=Ql.has(o)?-1:1,u=a&&c?-1:1,d=Cl(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 eu=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 $l(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}}}}},tu=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}=Cl(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ol(i),p=El(f),m=u[p],h=u[f],g=(e,t)=>Sl(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}}}}}},nu=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Cl(e,t),u={x:n,y:r},d=Ol(i),f=El(d),p=u[f],m=u[d],h=Cl(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ql.has(wl(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ru=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}=Cl(e,t),c=await i.detectOverflow(t,s),l=wl(n),u=Tl(n),d=Ol(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=gl(p-c[m],g),y=gl(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*_l(c.left,c.right):S=p-2*_l(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 iu(){return typeof window<`u`}function au(e){return cu(e)?(e.nodeName||``).toLowerCase():`#document`}function ou(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function su(e){return((cu(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function cu(e){return iu()?e instanceof Node||e instanceof ou(e).Node:!1}function lu(e){return iu()?e instanceof Element||e instanceof ou(e).Element:!1}function uu(e){return iu()?e instanceof HTMLElement||e instanceof ou(e).HTMLElement:!1}function du(e){return!iu()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ou(e).ShadowRoot}function fu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Cu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function pu(e){return/^(table|td|th)$/.test(au(e))}function mu(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var hu=/transform|translate|scale|rotate|perspective|filter/,gu=/paint|layout|strict|content/,_u=e=>!!e&&e!==`none`,vu;function yu(e){let t=lu(e)?Cu(e):e;return _u(t.transform)||_u(t.translate)||_u(t.scale)||_u(t.rotate)||_u(t.perspective)||!xu()&&(_u(t.backdropFilter)||_u(t.filter))||hu.test(t.willChange||``)||gu.test(t.contain||``)}function bu(e){let t=Tu(e);for(;uu(t)&&!Su(t);){if(yu(t))return t;if(mu(t))return null;t=Tu(t)}return null}function xu(){return vu??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),vu}function Su(e){return/^(html|body|#document)$/.test(au(e))}function Cu(e){return ou(e).getComputedStyle(e)}function wu(e){return lu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tu(e){if(au(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||du(e)&&e.host||su(e);return du(t)?t.host:t}function Eu(e){let t=Tu(e);return Su(t)?(e.ownerDocument||e).body:uu(t)&&fu(t)?t:Eu(t)}function Du(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Eu(e),i=r===e.ownerDocument?.body,a=ou(r);if(i){let e=Ou(a);return t.concat(a,a.visualViewport||[],fu(r)?r:[],e&&n?Du(e):[])}return t.concat(r,Du(r,[],n))}function Ou(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ku(e){let t=Cu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=uu(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=vl(n)!==a||vl(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Au(e){return lu(e)?e:e.contextElement}function ju(e){let t=Au(e);if(!uu(t))return bl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ku(t),o=(a?vl(n.width):n.width)/r,s=(a?vl(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Mu=bl(0);function Nu(e){let t=ou(e);return!xu()||!t.visualViewport?Mu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pu(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ou(e)}function Fu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Au(e),o=bl(1);t&&(r?lu(r)&&(o=ju(r)):o=ju(e));let s=Pu(a,n,r)?Nu(a):bl(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=ou(a),t=lu(r)?ou(r):r,n=e,i=Ou(n);for(;i&&t!==n;){let e=ju(i),t=i.getBoundingClientRect(),r=Cu(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=ou(i),i=Ou(n)}}return Hl({width:u,height:d,x:c,y:l})}function Iu(e,t){let n=wu(e).scrollLeft;return t?t.left+n:Fu(su(e)).left+n}function Lu(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Iu(e,n),y:n.top+t.scrollTop}}function Ru(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=su(r),s=t?mu(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=bl(1),u=bl(0),d=uu(r);if((d||!a)&&((au(r)!==`body`||fu(o))&&(c=wu(r)),d)){let e=Fu(r);l=ju(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Lu(o,c):bl(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 zu(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Bu(e){let t=wu(e),n=e.ownerDocument.body,r=_l(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=_l(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Iu(e),o=-t.scrollTop;return Cu(n).direction===`rtl`&&(a+=_l(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Vu=25;function Hu(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=ou(e),a=su(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!xu()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Iu(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<=Vu&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Uu(e,t){let n=Fu(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ju(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Wu(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Hu(e,n,t);else if(t===`document`)r=Bu(su(e));else if(lu(t))r=Uu(t,n);else{let n=Nu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Hl(r)}function Gu(e,t){let n=t.get(e);if(n)return n;let r=Du(e,[],!1).filter(e=>lu(e)&&au(e)!==`body`),i=null,a=Cu(e).position===`fixed`,o=a?Tu(e):e;for(;lu(o)&&!Su(o);){let e=Cu(o),t=yu(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Tu(o)}return t.set(e,r),r}function Ku(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?mu(t)?[]:Gu(t,this._c):[].concat(n),r],o=Wu(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=Wu(t,a[e],i);s=_l(n.top,s),c=gl(n.right,c),l=gl(n.bottom,l),u=_l(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function qu(e){let{width:t,height:n}=ku(e);return{width:t,height:n}}function Ju(e,t,n){let r=uu(t),i=su(t),a=n===`fixed`,o=Fu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=bl(0);if((r||!a)&&((au(t)!==`body`||fu(i))&&(s=wu(t)),r)){let e=Fu(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Iu(i));let l=i&&!r&&!a?Lu(i,s):bl(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 Yu(e){return Cu(e).position===`static`}function Xu(e,t){if(!uu(e)||Cu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return su(e)===n&&(n=n.ownerDocument.body),n}function Zu(e,t){let n=ou(e);if(mu(e))return n;if(!uu(e)){let t=Tu(e);for(;t&&!Su(t);){if(lu(t)&&!Yu(t))return t;t=Tu(t)}return n}let r=Xu(e,t);for(;r&&pu(r)&&Yu(r);)r=Xu(r,t);return r&&Su(r)&&Yu(r)&&!yu(r)?n:r||bu(e)||n}var Qu=async function(e){let t=this.getOffsetParent||Zu,n=this.getDimensions,r=await n(e.floating);return{reference:Ju(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $u(e){return Cu(e).direction===`rtl`}var ed={convertOffsetParentRelativeRectToViewportRelativeRect:Ru,getDocumentElement:su,getClippingRect:Ku,getOffsetParent:Zu,getElementRects:Qu,getClientRects:zu,getDimensions:qu,getScale:ju,isElement:lu,isRTL:$u};function td(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nd(e,t,n){let r=null,i,a=su(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=yl(d),h=yl(a.clientWidth-(u+f)),g=yl(a.clientHeight-(d+p)),_=yl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:_l(0,gl(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!td(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=ou(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function rd(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=Au(e),u=i||a?[...l?Du(l):[],...t?Du(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?nd(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?Fu(e):null;c&&g();function g(){let t=Fu(e);h&&!td(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 id=eu,ad=tu,od=Jl,sd=ru,cd=Zl,ld=ql,ud=nu,dd=(e,t,n)=>{let r=new Map,i=n??{},a={...ed,...i.platform,_c:r};return Kl(e,t,{...i,platform:a})},fd=typeof document<`u`?h.useLayoutEffect:function(){};function pd(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(!pd(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)&&!pd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function md(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hd(e,t){let n=md(e);return Math.round(t*n)/n}function gd(e){let t=h.useRef(e);return fd(()=>{t.current=e}),t}function _d(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]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=h.useState(r);pd(f,r)||p(r);let[m,g]=h.useState(null),[_,v]=h.useState(null),y=h.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=h.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||_,C=h.useRef(null),w=h.useRef(null),T=h.useRef(u),E=c!=null,D=gd(c),O=gd(i),k=gd(l),A=h.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),dd(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!pd(T.current,t)&&(T.current=t,en.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);fd(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=h.useRef(!1);fd(()=>(j.current=!0,()=>{j.current=!1}),[]),fd(()=>{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 M=h.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=h.useMemo(()=>({reference:x,floating:S}),[x,S]),P=h.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=hd(N.floating,u.x),r=hd(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...md(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var vd=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ld({element:r.current,padding:i}).fn(n):r?ld({element:r,padding:i}).fn(n):{}}}},yd=(e,t)=>{let n=id(e);return{name:n.name,fn:n.fn,options:[e,t]}},bd=(e,t)=>{let n=ad(e);return{name:n.name,fn:n.fn,options:[e,t]}},xd=(e,t)=>({fn:ud(e).fn,options:[e,t]}),Sd=(e,t)=>{let n=od(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cd=(e,t)=>{let n=sd(e);return{name:n.name,fn:n.fn,options:[e,t]}},wd=(e,t)=>{let n=cd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Td=(e,t)=>{let n=vd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ed=Object.defineProperty,Dd=h.forwardRef(((e,t)=>Ed(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,g.jsx)(xn.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,g.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),Od=Object.defineProperty,kd=(e,t)=>Od(e,`name`,{value:t,configurable:!0});function Ad(e){let[t,n]=h.useState(void 0);return Nt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}kd(Ad,`useSize`);var jd=Object.defineProperty,Md=(e,t)=>jd(e,`name`,{value:t,configurable:!0}),Nd={Partial:`partial`,Always:`always`},Pd={Optimized:`optimized`,Always:`always`},Fd=`Popper`,[Id,Ld]=jt(Fd),[Rd,zd]=Id(Fd),Bd=Md(e=>{let{__scopePopper:t,children:n}=e,[r,i]=h.useState(null),[a,o]=h.useState(void 0);return(0,g.jsx)(Rd,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Vd=`PopperAnchor`,Hd=h.forwardRef(Md(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=zd(Vd,n),o=h.useRef(null),s=a.onAnchorChange,c=Dt(t,h.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=h.useRef(null);h.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Qd(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,g.jsx)(xn.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),Ud=`PopperContent`,[Wd,Gd]=Id(Ud),Kd=h.forwardRef(Md(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=Nd.Partial,hideWhenDetached:f=!1,updatePositionStrategy:p=Pd.Optimized,onPlaced:m,..._}=e,v=zd(Ud,n),[y,b]=h.useState(null),x=Dt(t,b),[S,C]=h.useState(null),w=Ad(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(Xd),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:ee,middlewareData:F}=_d({strategy:`fixed`,placement:D,whileElementsMounted:Md((...e)=>rd(...e,{animationFrame:p===Pd.Always}),`whileElementsMounted`),elements:{reference:v.anchor},middleware:[yd({mainAxis:i+E,alignmentAxis:o}),c&&bd({mainAxis:!0,crossAxis:!1,...d===Nd.Partial?{limiter:xd()}:{},...j}),c&&Sd({...j}),Cd({...j,apply:Md(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),S&&Td({element:S,padding:s}),Zd({arrowWidth:T,arrowHeight:E}),f&&wd(A?{strategy:`referenceHidden`,...j}:{strategy:`referenceHidden`,padding:j.padding,altBoundary:j.altBoundary})]}),I=v.setPlacementState;Nt(()=>(I(P),()=>{I(void 0)}),[P,I]);let[te,ne]=Qd(P),re=En(m);Nt(()=>{ee&&re?.()},[ee,re]);let ie=F.arrow?.x,ae=F.arrow?.y,oe=F.arrow?.centerOffset!==0,[se,ce]=h.useState();return Nt(()=>{y&&ce(window.getComputedStyle(y).zIndex)},[y]),(0,g.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:ee?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:se,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,g.jsx)(Wd,{scope:n,placedSide:te,placedAlign:ne,onArrowChange:C,arrowX:ie,arrowY:ae,shouldHideArrow:oe,children:(0,g.jsx)(xn.div,{"data-side":te,"data-align":ne,..._,ref:x,style:{..._.style,animation:ee?_.style?.animation:`none`}})})})},`PopperContent`)),qd=`PopperArrow`,Jd={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Yd=h.forwardRef(Md(function(e,t){let{__scopePopper:n,...r}=e,i=Gd(qd,n),a=Jd[i.placedSide];return(0,g.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,g.jsx)(Dd,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function Xd(e){return e!==null}Md(Xd,`isNotNull`);var Zd=Md(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Qd(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Qd(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Md(Qd,`getSideAndAlignFromPlacement`);var $d=Object.defineProperty,ef=(e,t)=>$d(e,`name`,{value:t,configurable:!0}),tf=!1;function nf(){let[e,t]=h.useState(tf);return h.useEffect(()=>{tf||(tf=!0,t(!0))},[]),e}ef(nf,`useIsHydrated`);var rf=h.useSyncExternalStore;function af(){return()=>{}}ef(af,`subscribe`);function of(){return rf(af,()=>!0,()=>!1)}ef(of,`useIsHydratedModern`);var sf=typeof rf==`function`?of:nf,cf=Object.defineProperty,lf=(e,t)=>cf(e,`name`,{value:t,configurable:!0}),uf=`rovingFocusGroup.onEntryFocus`,df={bubbles:!1,cancelable:!0},ff=`RovingFocusGroup`,[pf,mf,hf]=Qc(ff),[gf,_f]=jt(ff,[hf]),vf={Vertical:`vertical`,Horizontal:`horizontal`},yf={LTR:`ltr`,RTL:`rtl`},[bf,xf]=gf(ff),Sf=h.forwardRef(lf(function(e,t){return(0,g.jsx)(pf.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(pf.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(Cf,{...e,ref:t})})})},`RovingFocusGroup`)),Cf=h.forwardRef(lf(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=h.useRef(null),p=Dt(t,f),m=ml(a),[_,v]=qt({prop:o,defaultProp:s??null,onChange:c,caller:ff}),[y,b]=h.useState(!1),x=En(l),S=mf(n),C=h.useRef(!1),[w,T]=h.useState(0);return h.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(uf,x),()=>e.removeEventListener(uf,x)},[x]),(0,g.jsx)(bf,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:_,onItemFocus:h.useCallback(e=>v(e),[v]),onItemShiftTab:h.useCallback(()=>b(!0),[]),onFocusableItemAdd:h.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:h.useCallback(()=>T(e=>e-1),[]),children:(0,g.jsx)(xn.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:vt(e.onMouseDown,()=>{C.current=!0}),onFocus:vt(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(uf,df);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);kf([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),u)}}C.current=!1}),onBlur:vt(e.onBlur,()=>b(!1))})})},`RovingFocusGroupImpl`)),wf=`RovingFocusGroupItem`,Tf=h.forwardRef(lf(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Rt(),l=a||c,u=xf(wf,n),d=u.currentTabStopId===l,f=mf(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:_}=u,v=sf();return Nt(()=>{if(v&&r)return p(),()=>m()},[v,r,p,m]),h.useEffect(()=>{if(!v&&r)return p(),()=>m()},[v,r,p,m]),(0,g.jsx)(pf.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,g.jsx)(xn.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:vt(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:vt(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:vt(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Of(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Af(n,r+1):n.slice(r+1)}setTimeout(()=>kf(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:_!=null}):o})})},`RovingFocusGroupItem`)),Ef={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Df(e,t){return t===yf.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}lf(Df,`getDirectionAwareKey`);function Of(e,t,n){let r=Df(e.key,n);if(!(t===vf.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===vf.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ef[r]}lf(Of,`getFocusIntent`);function kf(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}lf(kf,`focusFirst`);function Af(e,t){return e.map((n,r)=>e[(t+r)%e.length])}lf(Af,`wrapArray`);var jf=Object.defineProperty,Mf=(e,t)=>jf(e,`name`,{value:t,configurable:!0}),Nf=[`Enter`,` `],Pf=[`ArrowDown`,`PageUp`,`Home`],Ff=[`ArrowUp`,`PageDown`,`End`],If=[...Pf,...Ff];[...Nf],[...Nf];var Lf=`Menu`,[Rf,zf,Bf]=Qc(Lf),[Vf,Hf]=jt(Lf,[Bf,Ld,_f]),Uf=Ld(),Wf=_f(),[Gf,Kf]=Vf(Lf),[qf,Jf]=Vf(Lf),Yf=Mf(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Uf(t),[c,l]=h.useState(null),u=h.useRef(!1),d=En(a),f=ml(i);return h.useEffect(()=>{let e=Mf(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Mf(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),h.useEffect(()=>{if(!n)return;let e=Mf(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,g.jsx)(Bd,{...s,children:(0,g.jsx)(Gf,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,g.jsx)(qf,{scope:t,onClose:h.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Xf=h.forwardRef(Mf(function(e,t){let{__scopeMenu:n,...r}=e,i=Uf(n);return(0,g.jsx)(Hd,{...i,...r,ref:t})},`MenuAnchor`)),Zf=`MenuPortal`,[Qf,$f]=Vf(Zf,{forceMount:void 0}),ep=Mf(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Kf(Zf,t);return(0,g.jsx)(Qf,{scope:t,forceMount:n,children:(0,g.jsx)(pr,{present:n||a.open,children:(0,g.jsx)(lr,{asChild:!0,container:i,children:r})})})},`MenuPortal`),tp=`MenuContent`,[np,rp]=Vf(tp),ip=h.forwardRef(Mf(function(e,t){let n=$f(tp,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Kf(tp,e.__scopeMenu),o=Jf(tp,e.__scopeMenu);return(0,g.jsx)(Rf.Provider,{scope:e.__scopeMenu,children:(0,g.jsx)(pr,{present:r||a.open,children:(0,g.jsx)(Rf.Slot,{scope:e.__scopeMenu,children:o.modal?(0,g.jsx)(ap,{...i,ref:t}):(0,g.jsx)(op,{...i,ref:t})})})})},`MenuContent`)),ap=h.forwardRef(Mf(function(e,t){let n=Kf(tp,e.__scopeMenu),r=h.useRef(null),i=Dt(t,r);return h.useEffect(()=>{let e=r.current;if(e)return Hi(e)},[]),(0,g.jsx)(cp,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:vt(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),op=h.forwardRef(Mf(function(e,t){let n=Kf(tp,e.__scopeMenu);return(0,g.jsx)(cp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),sp=rn(`MenuContent.ScrollLock`),cp=h.forwardRef(Mf(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,..._}=e,v=Kf(tp,n),y=Jf(tp,n),b=Uf(n),x=Wf(n),S=zf(n),[C,w]=h.useState(null),T=h.useRef(null),[E,D]=h.useState(null);Xn(E);let{nodes:O,registry:k}=Yn(),A=!!(i||m),j=Dt(t,T,v.onContentChange,D),M=h.useRef(0),N=h.useRef(``),P=h.useRef(0),ee=h.useRef(null),F=h.useRef(`right`),I=h.useRef(0),te=h.useMemo(()=>m?[T,...O.map(e=>({current:e}))]:[],[T,O,m]),ne=m?Ni:h.Fragment,re=m?{as:sp,allowPinchZoom:!0,shards:te}:void 0,ie=Mf(e=>{let t=N.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Mp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){N.current=e,window.clearTimeout(M.current),e!==``&&(M.current=window.setTimeout(()=>s(``),1e3))}Mf(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);h.useEffect(()=>()=>window.clearTimeout(M.current),[]),wr();let ae=h.useCallback(e=>F.current===ee.current?.side&&Pp(e,ee.current?.area),[]);return(0,g.jsx)(np,{scope:n,searchRef:N,onItemEnter:h.useCallback(e=>{ae(e)&&e.preventDefault()},[ae]),onItemLeave:h.useCallback(e=>{ae(e)||(T.current?.focus(),w(null))},[ae]),onTriggerLeave:h.useCallback(e=>{ae(e)&&e.preventDefault()},[ae]),pointerGraceTimerRef:P,onPointerGraceIntentChange:h.useCallback(e=>{ee.current=e},[]),children:(0,g.jsx)(Jn,{registry:A?k:null,children:(0,g.jsx)(ne,{...re,children:(0,g.jsx)(Kn,{asChild:!0,trapped:i,branches:O,onMountAutoFocus:vt(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,g.jsx)(Pn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,g.jsx)(Sf,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:vt(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,g.jsx)(Kd,{role:`menu`,"aria-orientation":`vertical`,"data-state":Dp(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:j,style:{outline:`none`,..._.style},onKeyDown:vt(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ie(e.key));let i=T.current;if(e.target!==i||!If.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);Ff.includes(e.key)&&a.reverse(),Ap(a)}),onBlur:vt(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(M.current),N.current=``)}),onPointerMove:vt(e.onPointerMove,Fp(e=>{let t=e.target,n=I.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>I.current?`right`:`left`;F.current=t,I.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),lp=h.forwardRef(Mf(function(e,t){let{__scopeMenu:n,...r}=e;return(0,g.jsx)(xn.div,{role:`group`,...r,ref:t})},`MenuGroup`)),up=h.forwardRef(Mf(function(e,t){let{__scopeMenu:n,...r}=e;return(0,g.jsx)(xn.div,{...r,ref:t})},`MenuLabel`)),dp=`MenuItem`,fp=`menu.itemSelect`,pp=h.forwardRef(Mf(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=h.useRef(null),o=Jf(dp,e.__scopeMenu),s=rp(dp,e.__scopeMenu),c=Dt(t,a),l=h.useRef(!1),u=Mf(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(fp,{bubbles:!0,cancelable:!0});e.addEventListener(fp,e=>r?.(e),{once:!0}),Sn(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,g.jsx)(mp,{...i,ref:c,disabled:n,onClick:vt(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:vt(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:vt(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&Nf.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),mp=h.forwardRef(Mf(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=rp(dp,n),s=Wf(n),c=h.useRef(null),l=Dt(t,c),[u,d]=h.useState(!1),[f,p]=h.useState(``);return h.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,g.jsx)(Rf.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,g.jsx)(Tf,{asChild:!0,...s,focusable:!r,children:(0,g.jsx)(xn.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:vt(e.onPointerMove,Fp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:vt(e.onPointerLeave,Fp(e=>o.onItemLeave(e))),onFocus:vt(e.onFocus,()=>d(!0)),onBlur:vt(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[hp,gp]=Vf(`MenuRadioGroup`,{value:void 0,onValueChange:Mf(()=>{},`onValueChange`)}),_p=h.forwardRef(Mf(function(e,t){let{value:n,onValueChange:r,...i}=e,a=En(r);return(0,g.jsx)(hp,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,g.jsx)(lp,{...i,ref:t})})},`MenuRadioGroup`)),vp=`MenuRadioItem`,yp=h.forwardRef(Mf(function(e,t){let{value:n,...r}=e,i=gp(vp,e.__scopeMenu),a=n===i.value;return(0,g.jsx)(xp,{scope:e.__scopeMenu,checked:a,children:(0,g.jsx)(pp,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":kp(a),onSelect:vt(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),bp=`MenuItemIndicator`,[xp,Sp]=Vf(bp,{checked:!1}),Cp=h.forwardRef(Mf(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=Sp(bp,n);return(0,g.jsx)(pr,{present:r||Op(a.checked)||a.checked===!0,children:(0,g.jsx)(xn.span,{...i,ref:t,"data-state":kp(a.checked)})})},`MenuItemIndicator`)),wp=h.forwardRef(Mf(function(e,t){let{__scopeMenu:n,...r}=e;return(0,g.jsx)(xn.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[Tp,Ep]=Vf(`MenuSub`);function Dp(e){return e?`open`:`closed`}Mf(Dp,`getOpenState`);function Op(e){return e===`indeterminate`}Mf(Op,`isIndeterminate`);function kp(e){return Op(e)?`indeterminate`:e?`checked`:`unchecked`}Mf(kp,`getCheckedState`);function Ap(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Mf(Ap,`focusFirst`);function jp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Mf(jp,`wrapArray`);function Mp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=jp(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Mf(Mp,`getNextMatch`);function Np(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Mf(Np,`isPointInPolygon`);function Pp(e,t){return t?Np({x:e.clientX,y:e.clientY},t):!1}Mf(Pp,`isPointerInGraceArea`);function Fp(e){return t=>t.pointerType===`mouse`?e(t):void 0}Mf(Fp,`whenMouse`);var Ip=Object.defineProperty,Lp=(e,t)=>Ip(e,`name`,{value:t,configurable:!0}),Rp=`DropdownMenu`,[zp,Bp]=jt(Rp,[Hf]),Vp=Hf(),[Hp,Up]=zp(Rp),Wp=Lp(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Vp(t),l=h.useRef(null),[u,d]=qt({prop:i,defaultProp:a??!1,onChange:o,caller:Rp});return(0,g.jsx)(Hp,{scope:t,triggerId:Rt(),triggerRef:l,contentId:Rt(),open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,g.jsx)(Yf,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),Gp=`DropdownMenuTrigger`,Kp=h.forwardRef(Lp(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Up(Gp,n),o=Vp(n),s=Dt(t,a.triggerRef);return(0,g.jsx)(Xf,{asChild:!0,...o,children:(0,g.jsx)(xn.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:vt(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:vt(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),qp=Lp(e=>{let{__scopeDropdownMenu:t,...n}=e,r=Vp(t);return(0,g.jsx)(ep,{...r,...n})},`DropdownMenuPortal`),Jp=`DropdownMenuContent`,Yp=h.forwardRef(Lp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Up(Jp,n),a=Vp(n),o=h.useRef(!1);return(0,g.jsx)(ip,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:vt(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:vt(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Xp=h.forwardRef(Lp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Vp(n);return(0,g.jsx)(up,{...i,...r,ref:t})},`DropdownMenuLabel`)),Zp=h.forwardRef(Lp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Vp(n);return(0,g.jsx)(pp,{...i,...r,ref:t})},`DropdownMenuItem`)),Qp=h.forwardRef(Lp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Vp(n);return(0,g.jsx)(_p,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),$p=h.forwardRef(Lp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Vp(n);return(0,g.jsx)(yp,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),em=h.forwardRef(Lp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Vp(n);return(0,g.jsx)(Cp,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),tm=h.forwardRef(Lp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Vp(n);return(0,g.jsx)(wp,{...i,...r,ref:t})},`DropdownMenuSeparator`)),nm=Wp,rm=Kp,im=Qp,am=(0,h.forwardRef)(({className:e,sideOffset:t=6,align:n=`end`,...r},i)=>(0,g.jsx)(qp,{children:(0,g.jsx)(Yp,{ref:i,sideOffset:t,align:n,className:B(`z-[200] min-w-[190px] rounded-xl border border-line bg-surface/95 p-1.5 text-ink shadow-[var(--shadow-pop)] backdrop-blur-xl`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,e),...r})}));am.displayName=`DropdownMenuContent`;function om({className:e,children:t}){return(0,g.jsx)(Xp,{className:B(`px-2.5 pb-1 pt-1.5 text-[10.5px] font-semibold text-ink-3`,e),children:t})}var sm=(0,h.forwardRef)(({className:e,inset:t,...n},r)=>(0,g.jsx)(Zp,{ref:r,className:B(`relative flex cursor-default select-none items-center gap-2 rounded-lg px-2.5 py-1.5 text-[12px] text-ink-2 outline-none transition-colors`,`data-[highlighted]:bg-black/[.05] data-[highlighted]:text-ink dark:data-[highlighted]:bg-white/[.07]`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-45`,t&&`pl-8`,e),...n}));sm.displayName=`DropdownMenuItem`;var cm=(0,h.forwardRef)(({className:e,children:t,...n},r)=>(0,g.jsxs)($p,{ref:r,className:B(`relative flex cursor-default select-none items-center gap-2 rounded-lg py-1.5 pl-2.5 pr-8 text-[12px] text-ink-2 outline-none transition-colors`,`data-[highlighted]:bg-black/[.05] data-[highlighted]:text-ink dark:data-[highlighted]:bg-white/[.07]`,e),...n,children:[t,(0,g.jsx)(em,{className:`absolute right-2`,children:(0,g.jsx)(`span`,{className:`block h-1.5 w-1.5 rounded-full bg-accent`})})]}));cm.displayName=`DropdownMenuRadioItem`;var lm=(0,h.forwardRef)(({className:e,...t},n)=>(0,g.jsx)(tm,{ref:n,className:B(`my-1 h-px bg-line`,e),...t}));lm.displayName=`DropdownMenuSeparator`;var um=`w-full rounded-lg border border-line bg-surface-2 px-2.5 text-[12px] font-normal text-ink transition-colors focus-visible:border-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/25 disabled:opacity-45`,dm=`min-w-0 placeholder:text-ink-3`;function fm({className:e,variant:t=`field`,...n}){return(0,g.jsx)(`input`,{className:B(dm,t===`field`&&[um,`h-8`],e),...n})}function pm({className:e,variant:t=`field`,...n}){return(0,g.jsx)(`textarea`,{className:B(dm,t===`field`&&[um,`py-1.5`],e),...n})}function mm({className:e,...t}){return(0,g.jsx)(`input`,{...t,type:`checkbox`,className:B(`size-4 shrink-0 appearance-none rounded border border-line bg-surface outline-none checked:border-accent checked:bg-accent checked:after:mx-auto checked:after:block checked:after:h-2.5 checked:after:w-1.5 checked:after:rotate-45 checked:after:border-b-2 checked:after:border-r-2 checked:after:border-white focus-visible:ring-2 focus-visible:ring-accent/50 disabled:opacity-45`,e)})}function hm({label:e,showLabel:t,value:n,options:r,onValueChange:i,placeholder:a=`请选择`,disabled:o,className:s}){let c=(0,h.useId)(),l=r.find(e=>e.value===n),u=(0,g.jsxs)(nm,{modal:!1,children:[(0,g.jsxs)(rm,{"aria-label":e,"aria-describedby":c,disabled:o||r.length===0,className:B(um,`flex h-8 items-center justify-between gap-2 text-left enabled:hover:border-accent/50`,s),children:[(0,g.jsx)(`span`,{id:c,className:B(`truncate`,!l&&`text-ink-3`),children:l?.label??a}),(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`-mt-1 size-1.5 shrink-0 rotate-45 border-b border-r`})]}),(0,g.jsx)(am,{align:`start`,sideOffset:4,className:`z-[350] max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[var(--radix-dropdown-menu-trigger-width)] max-w-[var(--radix-dropdown-menu-content-available-width)] overflow-auto`,children:(0,g.jsx)(im,{value:n,onValueChange:e=>{let t=r.find(t=>t.value===e);t&&i(t.value)},children:r.map(e=>(0,g.jsx)(cm,{value:e.value,children:(0,g.jsx)(`span`,{className:`min-w-0 break-all`,children:e.label})},e.value))})})]});return t?(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`p`,{className:`mb-1 text-xs`,children:e}),u]}):u}var gm=(0,h.forwardRef)(function({label:e,active:t=!1,tone:n=`default`,className:r,children:i,type:a=`button`,...o},s){return(0,g.jsx)(`button`,{ref:s,type:a,"aria-label":e,title:e,"aria-pressed":t||void 0,className:B(`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,`disabled:pointer-events-none disabled:opacity-40`,t?`bg-accent-soft text-accent`:`text-ink-2 hover:bg-black/[.05] hover:text-ink dark:hover:bg-white/[.07]`,n===`danger`&&`hover:bg-danger/10 hover:text-danger`,r),...o,children:i})});function _m({children:e,className:t}){return(0,g.jsx)(`kbd`,{className:B(`inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-[5px] border border-line bg-surface-2 px-1 font-sans text-[10px] font-medium text-ink-3`,t),children:e})}var vm=Object.defineProperty,ym=(e,t)=>vm(e,`name`,{value:t,configurable:!0}),bm={Automatic:`automatic`,Manual:`manual`},xm=`Tabs`,[Sm,Cm]=jt(xm,[_f]),wm=_f(),[Tm,Em]=Sm(xm),Dm=h.forwardRef(ym(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=bm.Automatic,...l}=e,u=ml(s),[d,f]=qt({prop:r,onChange:i,defaultProp:a??``,caller:xm});return(0,g.jsx)(Tm,{scope:n,baseId:Rt(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,g.jsx)(xn.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Om=`TabsList`,km=h.forwardRef(ym(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=Em(Om,n),o=wm(n);return(0,g.jsx)(Sf,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,g.jsx)(xn.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),Am=`TabsTrigger`,jm=h.forwardRef(ym(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Em(Am,n),s=wm(n),c=Mm(o.baseId,r),l=Nm(o.baseId,r),u=r===o.value;return(0,g.jsx)(Tf,{asChild:!0,...s,focusable:!i,active:u,children:(0,g.jsx)(xn.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:vt(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?(e.currentTarget.focus(),o.onValueChange(r)):e.preventDefault()}),onKeyDown:vt(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:vt(e.onFocus,()=>{let e=o.activationMode!==bm.Manual;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`));function Mm(e,t){return`${e}-trigger-${t}`}ym(Mm,`makeTriggerId`);function Nm(e,t){return`${e}-content-${t}`}ym(Nm,`makeContentId`);var Pm=Dm;function Fm({className:e,children:t,...n}){let r=(0,h.useRef)(null),[i,a]=(0,h.useState)({left:0,width:0,visible:!1});return(0,h.useEffect)(()=>{let e=r.current;if(!e||typeof ResizeObserver>`u`)return;let t=()=>{let t=e.querySelector(`[data-state='active']`);if(!t){a(e=>e.visible?{...e,visible:!1}:e);return}let n={left:t.offsetLeft,width:t.offsetWidth,visible:!0};a(e=>e.visible&&e.left===n.left&&e.width===n.width?e:n)};t();let n=new ResizeObserver(t);n.observe(e);for(let t of Array.from(e.children))n.observe(t);let i=new MutationObserver(t);return i.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-state`]}),()=>{n.disconnect(),i.disconnect()}},[]),(0,g.jsxs)(km,{ref:r,className:B(`relative inline-flex items-center gap-0.5 rounded-[9px] bg-surface-3 p-0.5`,e),...n,children:[(0,g.jsx)(`span`,{"aria-hidden":!0,className:B(`pointer-events-none absolute inset-y-0.5 left-0 rounded-[7px] bg-surface shadow-sm ring-1 ring-inset ring-line-strong/40`,`transition-[transform,width,opacity] duration-300 ease-[cubic-bezier(0.34,1.3,0.44,1)] motion-reduce:transition-none`,i.visible?`opacity-100`:`scale-[0.96] opacity-0`),style:{width:i.width,transform:`translate3d(${i.left}px,0,0)`}}),t]})}function Im({className:e,...t}){return(0,g.jsx)(jm,{className:B(`relative inline-flex h-6 items-center rounded-[7px] px-2 text-[11.5px] font-medium text-ink-2 outline-none transition-colors`,`data-[state=active]:text-ink`,e),...t})}var Lm=Object.defineProperty,Rm=(e,t)=>Lm(e,`name`,{value:t,configurable:!0}),zm=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Bm=h.forwardRef(Rm(function(e,t){return(0,g.jsx)(xn.span,{...e,ref:t,style:{...zm,...e.style}})},`VisuallyHidden`)),Vm=Object.defineProperty,Hm=(e,t)=>Vm(e,`name`,{value:t,configurable:!0}),[Um,Wm]=jt(`Tooltip`,[Ld]),Gm=Ld(),Km=`TooltipProvider`,qm=700,Jm=`tooltip.open`,[Ym,Xm]=Um(Km),Zm=Hm(e=>{let{__scopeTooltip:t,delayDuration:n=qm,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=h.useRef(!0),s=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,g.jsx)(Ym,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:h.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:h.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:h.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),Qm=`Tooltip`,[$m,eh]=Um(Qm),th=Hm(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Xm(Qm,e.__scopeTooltip),l=Gm(t),[u,d]=h.useState(null),[f,p]=h.useState(void 0),m=Rt(),_=h.useRef(0),v=o??c.disableHoverableContent,y=s??c.delayDuration,b=h.useRef(!1),[x,S]=qt({prop:r,defaultProp:i??!1,onChange:Hm(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Jm))):c.onClose(),a?.(e)},`onChange`),caller:Qm}),C=h.useMemo(()=>x?b.current?`delayed-open`:`instant-open`:`closed`,[x]),w=h.useCallback(()=>{window.clearTimeout(_.current),_.current=0,b.current=!1,S(!0)},[S]),T=h.useCallback(()=>{window.clearTimeout(_.current),_.current=0,S(!1)},[S]),E=h.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{b.current=!0,S(!0),_.current=0},y)},[y,S]);h.useEffect(()=>()=>{_.current&&=(window.clearTimeout(_.current),0)},[]);let D=f??m;return(0,g.jsx)(Bd,{...l,children:(0,g.jsx)($m,{scope:t,contentId:D,setContentId:p,open:x,stateAttribute:C,trigger:u,onTriggerChange:d,onTriggerEnter:h.useCallback(()=>{c.isOpenDelayedRef.current?E():w()},[c.isOpenDelayedRef,E,w]),onTriggerLeave:h.useCallback(()=>{v?T():(window.clearTimeout(_.current),_.current=0)},[T,v]),onOpen:w,onClose:T,disableHoverableContent:v,children:n})})},`Tooltip`),nh=`TooltipTrigger`,rh=h.forwardRef(Hm(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=eh(nh,n),o=Xm(nh,n),s=Gm(n),c=Dt(t,h.useRef(null),a.onTriggerChange),l=h.useRef(!1),u=h.useRef(!1),d=h.useCallback(()=>l.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,g.jsx)(Hd,{asChild:!0,...s,children:(0,g.jsx)(xn.button,{"aria-describedby":a.open?bh(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:vt(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:vt(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:vt(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:vt(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:vt(e.onBlur,a.onClose),onClick:vt(e.onClick,a.onClose)})})},`TooltipTrigger`)),ih=`TooltipPortal`,[ah,oh]=Um(ih,{forceMount:void 0}),sh=Hm(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=eh(ih,t);return(0,g.jsx)(ah,{scope:t,forceMount:n,children:(0,g.jsx)(pr,{present:n||a.open,children:(0,g.jsx)(lr,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),ch=`TooltipContent`,lh=h.forwardRef(Hm(function(e,t){let n=oh(ch,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=eh(ch,e.__scopeTooltip);return(0,g.jsx)(pr,{present:r||o.open,children:o.disableHoverableContent?(0,g.jsx)(fh,{side:i,...a,ref:t}):(0,g.jsx)(uh,{side:i,...a,ref:t})})},`TooltipContent`)),uh=h.forwardRef(Hm(function(e,t){let n=eh(ch,e.__scopeTooltip),r=Xm(ch,e.__scopeTooltip),i=h.useRef(null),a=Dt(t,i),[o,s]=h.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=h.useCallback(()=>{s(null),d(!1)},[d]),p=h.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=hh(r,mh(r,n.getBoundingClientRect())),a=gh(t.getBoundingClientRect()),o=vh([...i,...a]);s(o),d(!0)},[d]);return h.useEffect(()=>()=>f(),[f]),h.useEffect(()=>{if(c&&u){let e=Hm(e=>p(e,u),`handleTriggerLeave`),t=Hm(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),h.useEffect(()=>{if(o){let e=Hm(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!_h(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,g.jsx)(fh,{...e,ref:a})},`TooltipContentHoverable`)),dh=on(`TooltipContent`),fh=h.forwardRef(Hm(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=eh(ch,n),u=Gm(n),{onClose:d}=l,[f,p]=h.useState(null),m=Dt(t,p);Xn(f),h.useEffect(()=>(document.addEventListener(Jm,d),()=>document.removeEventListener(Jm,d)),[d]),h.useEffect(()=>{if(l.trigger){let e=Hm(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:_}=l;return Nt(()=>(_(a),()=>{_(void 0)}),[a,_]),(0,g.jsx)(Pn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,g.jsxs)(Kd,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:m,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,g.jsx)(dh,{children:r}),i?(0,g.jsx)(Bm,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),ph=h.forwardRef(Hm(function(e,t){let{__scopeTooltip:n,...r}=e,i=Gm(n);return(0,g.jsx)(Yd,{...i,...r,ref:t})},`TooltipArrow`));function mh(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}Hm(mh,`getExitSideFromRect`);function hh(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}Hm(hh,`getPaddedExitPoints`);function gh(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}Hm(gh,`getPointsFromRect`);function _h(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Hm(_h,`isPointInPolygon`);function vh(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),yh(t)}Hm(vh,`getHull`);function yh(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Hm(yh,`getHullPresorted`);function bh(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Hm(bh,`concatAriaDescribedby`);var xh=Zm;function Sh({label:e,children:t,side:n=`bottom`,className:r}){return(0,g.jsxs)(th,{children:[(0,g.jsx)(rh,{asChild:!0,children:t}),(0,g.jsx)(sh,{children:(0,g.jsxs)(lh,{side:n,sideOffset:6,className:B(`z-[200] select-none rounded-md bg-[#1d1d1f] px-2 py-1 text-[11px] font-medium text-white shadow-lg`,`data-[state=delayed-open]:animate-in dark:bg-[#f5f5f7] dark:text-[#1d1d1f]`,r),children:[e,(0,g.jsx)(ph,{className:`fill-[#1d1d1f] dark:fill-[#f5f5f7]`})]})})]})}var Ch=h.createContext(void 0),wh=e=>{let t=h.useContext(Ch);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Th=({client:e,children:t})=>(h.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,g.jsx)(Ch.Provider,{value:e,children:t})),Eh={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Dh=new class{#e=Eh;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Oh(e){setTimeout(e,0)}var kh=typeof window>`u`||`Deno`in globalThis;function Ah(){}function jh(e,t){return typeof e==`function`?e(t):e}function Mh(e){return typeof e==`number`&&e>=0&&e!==1/0}function Nh(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ph(e,t){return typeof e==`function`?e(t):e}function Fh(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Lh(o,t.options))return!1}else if(!zh(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ih(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Rh(t.options.mutationKey)!==Rh(a))return!1}else if(!zh(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Lh(e,t){return(t?.queryKeyHashFn||Rh)(e)}function Rh(e){return JSON.stringify(e,(e,t)=>Wh(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function zh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!zh(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!zh(e[r],t[r]))return!1;return!0}return!1}var Bh=Object.prototype.hasOwnProperty;function Vh(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Uh(e)&&Uh(t);if(!r&&!(Wh(e)&&Wh(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Bh.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Vh(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Hh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!Bh.call(t,n)||e[n]!==t[n])return!1;return!0}function Uh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Wh(e){if(!Gh(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!Gh(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function Gh(e){return Object.prototype.toString.call(e)===`[object Object]`}function Kh(e){return new Promise(t=>{Dh.setTimeout(t,e)})}function qh(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Vh(e,t)}function Jh(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(-n):r}function Yh(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,n):r}var Xh=Symbol();function Zh(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Xh?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Qh(e,t){return typeof e==`function`?e(...t):!!e}var $h=Symbol();function eg(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[$h]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var tg=()=>kh,ng=()=>tg(),rg=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ig=new class extends rg{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ag=Oh;function og(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ag,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var sg=og(),cg=new class extends rg{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function lg(e){return Math.min(1e3*2**e,3e4)}function ug(e){return(e??`online`)!==`online`||cg.isOnline()}var dg=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function fg(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(Ah);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new dg(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>ig.isFocused()&&(e.networkMode===`always`||cg.isOnline())&&e.canRun(),p=()=>ug(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(ng()?0:3),a=e.retryDelay??lg,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Kh(o).then(()=>c()||f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var pg=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Mh(this.gcTime)&&(this.#e=Dh.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ng()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Dh.clearTimeout(this.#e),this.#e=void 0)}};function mg(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{eg(e,()=>t.signal,()=>n=!0,l[$h])},d=Zh(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options,c=i?Yh:Jh;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?gg:hg,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:hg(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function hg(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function gg(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function _g(e,t){return t?hg(e,t)!=null:!1}function vg(e,t){return!t||!e.getPreviousPageParam?!1:gg(e,t)!=null}var yg=class extends pg{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Sg(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Sg(this.options);e.data!==void 0&&(this.setState(xg(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=qh(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Ah).catch(Ah):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ph(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Xh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>Ph(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Nh(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[$h]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=Zh(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?mg(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=fg({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof dg&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof dg){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...bg(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...xg(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),sg.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function bg(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ug(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function xg(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Sg(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Cg=class extends rg{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Tg(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Eg(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Eg(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Ph(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Hh(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Dg(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Ph(this.options.enabled,this.#t)!==Ph(t.enabled,this.#t)||Ph(this.options.staleTime,this.#t)!==Ph(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Ph(this.options.enabled,this.#t)!==Ph(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Hh(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Ah)),t}#h(e){return!ng()&&Ph(this.options.enabled,this.#t)!==!1&&Mh(e)}#g(){this.#b();let e=Ph(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Nh(this.#r.dataUpdatedAt,e)+1;this.#u=Dh.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Ph(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=Dh.setInterval(()=>{(this.options.refetchIntervalInBackground||ig.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(Dh.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(Dh.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Tg(e,t),o=i&&Dg(e,n,t,r);(a||o)&&(l={...l,...bg(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=qh(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=qh(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=i?.error===f?i.errorUpdatedAt:Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Og(e,t),refetch:this.refetch,isEnabled:Ph(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Hh(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();sg.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function wg(e,t){return Ph(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Ph(t.retryOnMount,e)!==!1)}function Tg(e,t){return wg(e,t)||e.state.data!==void 0&&Eg(e,t,t.refetchOnMount)}function Eg(e,t,n){if(Ph(t.enabled,e)!==!1&&Ph(t.staleTime,e)!==`static`){let r=Ph(n,e);return r===`always`||r!==!1&&Og(e,t)}return!1}function Dg(e,t,n,r){return(e!==t||Ph(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Og(e,n)}function Og(e,t){return Ph(t.enabled,e)!==!1&&e.isStaleByTime(Ph(t.staleTime,e))}var kg=class extends Cg{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:_g(t,n.data),hasPreviousPage:vg(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Ag=class extends pg{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||jg(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=fg({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),sg.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function jg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Mg=class extends rg{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Ag({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ng(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ng(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ng(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Ng(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){sg.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Ih(t,e))}findAll(e={}){return this.getAll().filter(t=>Ih(e,t))}notify(e){sg.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return sg.batch(()=>Promise.all(e.map(e=>e.continue().catch(Ah))))}};function Ng(e){return e.options.scope?.id}var Pg=class extends rg{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Hh(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Rh(t.mutationKey)!==Rh(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??jg();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){sg.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Fg=class extends rg{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Lh(r,t),a=this.get(i);return a||(a=new yg({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){sg.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Fh(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Fh(e,t)):t}notify(e){sg.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){sg.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){sg.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},eee=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Fg,this.#t=e.mutationCache||new Mg,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=ig.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=cg.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ph(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=jh(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return sg.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;sg.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return sg.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=sg.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Ah).catch(Ah)}invalidateQueries(e,t={}){return sg.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=sg.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n),r=e.state.fetchStatus===`paused`;return(!n.throwOnError||r)&&(t=t.catch(Ah)),r?Promise.resolve():t}));return Promise.all(r).then(Ah)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(Ph(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Ph(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ah).catch(Ah)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ah).catch(Ah)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return cg.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Rh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{zh(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Rh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{zh(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Lh(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Xh&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ig=h.createContext(!1),Lg=()=>h.useContext(Ig);Ig.Provider;function Rg(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zg=h.createContext(Rg()),Bg=()=>h.useContext(zg),Vg=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?Qh(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Hg=e=>{h.useEffect(()=>{e.clearReset()},[e])},Ug=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Qh(n,[e.error,r])),Wg=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Gg=(e,t)=>e?.suspense&&t.isPending,Kg=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qg(e,t,n){let r=Lg(),i=Bg(),a=wh(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Wg(o),Vg(o,i,s),Hg(i);let[l]=h.useState(()=>new t(a,o)),u=l.getOptimisticResult(o);h.useEffect(()=>{l.setOptions(o)},[o,l]);let d=!r&&c;if(h.useSyncExternalStore(h.useCallback(e=>{let t=d?l.subscribe(sg.batchCalls(e)):Ah;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),Gg(o,u))throw Kg(o,l,i);if(Ug({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Jg(e,t){return qg(e,Cg,t)}function Yg(e,t){let n=wh(t);return Zg({filters:{...e,status:`pending`}},n).length}function Xg(){let e;return(t,n)=>{let r=[],i;return()=>{let a=t.findAll(n.filters),o=a.flatMap(e=>[e,e.state]);return(!i||o.length!==r.length||o.some((e,t)=>!Object.is(e,r[t])))&&(r=o,i=Vh(e,a.map(e=>n.select?n.select(e):e.state)),e=i),i}}}function Zg(e={},t){let n=wh(t).getMutationCache(),[r]=h.useState(()=>Xg()),i=r(n,e);return h.useSyncExternalStore(h.useCallback(e=>n.subscribe(sg.batchCalls(e)),[n]),i,i)}function Qg(e,t){let n=wh(t),[r]=h.useState(()=>new Pg(n,e));h.useEffect(()=>{r.setOptions(e)},[r,e]);let i=h.useSyncExternalStore(h.useCallback(e=>r.subscribe(sg.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=h.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(Ah)},[r]);if(i.error&&Qh(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function $g(e,t){return qg(e,kg,t)}var e_=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),t_=s(((e,t)=>{t.exports=e_()})),n_=s((e=>{var t=t_(),n=f(),r=$t();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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(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`),j=Symbol.for(`react.profiler`),M=Symbol.for(`react.consumer`),N=Symbol.for(`react.context`),P=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),F=Symbol.for(`react.suspense_list`),I=Symbol.for(`react.memo`),te=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),re=Symbol.for(`react.legacy_hidden`),ie=Symbol.for(`react.memo_cache_sentinel`),ae=Symbol.for(`react.view_transition`),oe=Symbol.for(`react.recoverable`),se=Symbol.iterator;function ce(e){return typeof e!=`object`||!e?null:(e=se&&e[se]||e[`@@iterator`],typeof e==`function`?e:null)}var le=Symbol.for(`react.client.reference`);function ue(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case j:return`Profiler`;case A:return`StrictMode`;case ee:return`Suspense`;case F:return`SuspenseList`;case ne:return`Activity`;case ae:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case N:return e.displayName||`Context`;case M:return(e._context.displayName||`Context`)+`.Consumer`;case P:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case I:return t=e.displayName||null,t===null?ue(e.type)||`Memo`:t;case te:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var de=Array.isArray,L=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},me=[],he=-1;function ge(e){return{current:e}}function _e(e){0>he||(e.current=me[he],me[he]=null,he--)}function ve(e,t){he++,me[he]=e.current,e.current=t}var ye=ge(null),be=ge(null),xe=ge(null),Se=ge(null);function Ce(e,t){switch(ve(xe,t),ve(be,e),ve(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=bp(t),e=xp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ye),ve(ye,e)}function we(){_e(ye),_e(be),_e(xe)}function Te(e){var t=e.memoizedState;t!==null&&(_h._currentValue=t.memoizedState,ve(Se,e)),t=ye.current;var n=xp(t,e.type);t!==n&&(ve(be,e),ve(ye,n))}function Ee(e){be.current===e&&(_e(ye),_e(be)),Se.current===e&&(_e(Se),_h._currentValue=pe)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1<e.stack.indexOf(`
43
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
44
+ `+De+e+Oe}var Ae=!1;function je(e,t){if(!e||Ae)return``;Ae=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
45
+ `),l=s.split(`
46
+ `);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=`
47
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ke(`Activity`);case 30:return ke(`ViewTransition`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=Me(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
48
+ Error generating stack: `+e.message+`
49
+ `+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,R=t.unstable_UserBlockingPriority,He=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,We=t.unstable_IdlePriority,Ge=t.log,Ke=t.unstable_setDisableYieldValue,qe=null,Je=null;function z(e){if(typeof Ge==`function`&&Ke(e),Je&&typeof Je.setStrictMode==`function`)try{Je.setStrictMode(qe,e)}catch{}}var Ye=Math.clz32?Math.clz32:Qe,Xe=Math.log,Ze=Math.LN2;function Qe(e){return e>>>=0,e===0?32:31-(Xe(e)/Ze|0)|0}var $e=256,et=262144,tt=4194304;function nt(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 rt(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=nt(n))):i=nt(o):i=nt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=nt(n))):i=nt(o)):i=nt(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 it(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function at(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-Ye(n),i=1<<r;t|=e[r],n&=~i}return t}function ot(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 st(){var e=tt;return tt<<=1,!(tt&62914560)&&(tt=4194304),e}function ct(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function lt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ut(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-Ye(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&&dt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function dt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ye(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ft(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ye(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function B(e,t){var n=t&-t;return n=n&42?1:pt(n),(n&(e.suspendedLanes|t))===0?n:0}function pt(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 mt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function V(){var e=fe.p;return e===0?(e=window.event,e===void 0?32:Nh(e.type)):e}function ht(e,t){var n=fe.p;try{return fe.p=e,t()}finally{fe.p=n}}var gt=Math.random().toString(36).slice(2),_t=`__reactFiber$`+gt,vt=`__reactProps$`+gt,yt=`__reactContainer$`+gt,bt=`__reactEvents$`+gt,xt=`__reactListeners$`+gt,St=`__reactHandles$`+gt,Ct=`__reactResources$`+gt,wt=`__reactMarker$`+gt,Tt=`__reactLoad$`+gt;function Et(e){delete e[_t],delete e[vt],delete e[xt],delete e[St]}function Dt(e){var t;if(t=e[_t])return t;for(var n=e.parentNode;n;){if(t=n[yt]||n[_t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sm(e);e!==null;){if(n=e[_t])return n;e=Sm(e)}return t}e=n,n=e.parentNode}return null}function Ot(e){if(e=e[_t]||e[yt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function kt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function At(e){var t=e[Ct];return t||=e[Ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function jt(e){e[wt]=!0}function Mt(e){e[Tt]=void 0}var Nt=new Set,Pt={};function Ft(e,t){It(e,t),It(e+`Capture`,t)}function It(e,t){for(Pt[e]=t,e=0;e<t.length;e++)Nt.add(t[e])}var Lt=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]*$`),Rt={},zt={};function Bt(e){return Pe.call(zt,e)?!0:Pe.call(Rt,e)?!1:Lt.test(e)?zt[e]=!0:(Rt[e]=!0,!1)}var Vt=!1;function Ht(){var e=Vt;return Vt=!1,e}function Ut(e,t,n){if(Bt(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 Wt(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 Gt(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 Kt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function qt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Jt(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 Yt(e){if(!e._valueTracker){var t=qt(e)?`checked`:`value`;e._valueTracker=Jt(e,t,``+e[t])}}function Xt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=qt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var Zt=/[\n"\\]/g;function Qt(e){return e.replace(Zt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function en(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=``+Kt(t)):e.value!==``+Kt(t)&&(e.value=``+Kt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):nn(e,Kt(n)):o===`number`&&e.value==t?nn(e,Kt(e.value)):nn(e,Kt(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=``+Kt(s):e.removeAttribute(`name`)}function tn(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)){Yt(e);return}n=n==null?``:``+Kt(n),t=t==null?n:``+Kt(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),Yt(e)}function nn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function rn(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=``+Kt(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 an(e,t,n){t!=null&&(t=``+Kt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Kt(n)}function on(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(de(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Kt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Yt(e)}function sn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cn=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 ln(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||cn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function un(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]=``,Vt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(ln(e,a,r),Vt=!0)}else for(var o in t)t.hasOwnProperty(o)&&ln(e,o,t[o])}function dn(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 fn=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`]]),pn=/^[\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 mn(e){return pn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function hn(){}var gn=null;function _n(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vn=null,yn=null;function bn(e){var t=Ot(e);if(t&&(e=t.stateNode)){var n=e[vt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(en(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="`+Qt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[vt]||null;if(!a)throw Error(i(90));en(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&&Xt(r)}break a;case`textarea`:an(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&rn(e,!!n.multiple,t,!1)}}}var xn=!1;function Sn(e,t,n){if(xn)return e(t,n);xn=!0;try{return e(t)}finally{if(xn=!1,(vn!==null||yn!==null)&&(Kd(),vn&&(t=vn,e=yn,yn=vn=null,bn(t),e)))for(t=0;t<e.length;t++)bn(e[t])}}function Cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[vt]||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 wn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Tn=!1;if(wn)try{var En={};Object.defineProperty(En,"passive",{get:function(){Tn=!0}}),window.addEventListener(`test`,En,En),window.removeEventListener(`test`,En,En)}catch{Tn=!1}var Dn=null,On=null,kn=null;function An(){if(kn)return kn;var e,t=On,n=t.length,r,i=`value`in Dn?Dn.value:Dn.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 kn=i.slice(e,1<r?1-r:void 0)}function jn(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 Mn(){return!0}function Nn(){return!1}function Pn(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)?Mn:Nn,this.isPropagationStopped=Nn,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=Mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Mn)},persist:function(){},isPersistent:Mn}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},In=Pn(Fn),Ln=T({},Fn,{view:0,detail:0}),Rn=Pn(Ln),zn,Bn,Vn,Hn=T({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$n,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!==Vn&&(Vn&&e.type===`mousemove`?(zn=e.screenX-Vn.screenX,Bn=e.screenY-Vn.screenY):Bn=zn=0,Vn=e),zn)},movementY:function(e){return`movementY`in e?e.movementY:Bn}}),Un=Pn(Hn),Wn=Pn(T({},Hn,{dataTransfer:0})),Gn=Pn(T({},Ln,{relatedTarget:0})),Kn=Pn(T({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0})),qn=Pn(T({},Fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Jn=Pn(T({},Fn,{data:0})),Yn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Xn={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`},Zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zn[e])?!!t[e]:!1}function $n(){return Qn}var er=Pn(T({},Ln,{key:function(e){if(e.key){var t=Yn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=jn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Xn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$n,charCode:function(e){return e.type===`keypress`?jn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?jn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),tr=Pn(T({},Hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),nr=Pn(T({},Fn,{submitter:0})),rr=Pn(T({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$n})),ir=Pn(T({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ar=Pn(T({},Hn,{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})),or=Pn(T({},Fn,{newState:0,oldState:0,source:0})),sr=[9,13,27,32],cr=wn&&`CompositionEvent`in window,lr=null;wn&&`documentMode`in document&&(lr=document.documentMode);var ur=wn&&`TextEvent`in window&&!lr,dr=wn&&(!cr||lr&&8<lr&&11>=lr),fr=` `,pr=!1;function mr(e,t){switch(e){case`keyup`:return sr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function hr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var gr=!1;function _r(e,t){switch(e){case`compositionend`:return hr(t);case`keypress`:return t.which===32?(pr=!0,fr):null;case`textInput`:return e=t.data,e===fr&&pr?null:e;default:return null}}function vr(e,t){if(gr)return e===`compositionend`||!cr&&mr(e,t)?(e=An(),kn=On=Dn=null,gr=!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 dr&&t.locale!==`ko`?null:t.data;default:return null}}var yr={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 br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!yr[e.type]:t===`textarea`}function xr(e,t,n,r){vn?yn?yn.push(r):yn=[r]:vn=r,t=rp(t,`onChange`),0<t.length&&(n=new In(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Sr=null,Cr=null;function wr(e){Yf(e,0)}function Tr(e){if(Xt(kt(e)))return e}function Er(e,t){if(e===`change`)return t}var Dr=!1;if(wn){var Or;if(wn){var kr=`oninput`in document;if(!kr){var Ar=document.createElement(`div`);Ar.setAttribute(`oninput`,`return;`),kr=typeof Ar.oninput==`function`}Or=kr}else Or=!1;Dr=Or&&(!document.documentMode||9<document.documentMode)}function jr(){Sr&&(Sr.detachEvent(`onpropertychange`,Mr),Cr=Sr=null)}function Mr(e){if(e.propertyName===`value`&&Tr(Cr)){var t=[];xr(t,Cr,e,_n(e)),Sn(wr,t)}}function Nr(e,t,n){e===`focusin`?(jr(),Sr=t,Cr=n,Sr.attachEvent(`onpropertychange`,Mr)):e===`focusout`&&jr()}function Pr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Tr(Cr)}function Fr(e,t){if(e===`click`)return Tr(t)}function Ir(e,t){if(e===`input`||e===`change`)return Tr(t)}function Lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Rr=typeof Object.is==`function`?Object.is:Lr;function zr(e,t){if(Rr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Pe.call(t,i)||!Rr(e[i],t[i]))return!1}return!0}function Br(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 Vr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hr(e,t){var n=Vr(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=Vr(n)}}function Ur(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ur(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Br(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=Br(e.document)}return t}function Gr(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 Kr=wn&&`documentMode`in document&&11>=document.documentMode,qr=null,Jr=null,Yr=null,Xr=!1;function Zr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xr||qr==null||qr!==Br(r)||(r=qr,`selectionStart`in r&&Gr(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}),Yr&&zr(Yr,r)||(Yr=r,r=rp(Jr,`onSelect`),0<r.length&&(t=new In(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=qr)))}function Qr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var $r={animationend:Qr(`Animation`,`AnimationEnd`),animationiteration:Qr(`Animation`,`AnimationIteration`),animationstart:Qr(`Animation`,`AnimationStart`),transitionrun:Qr(`Transition`,`TransitionRun`),transitionstart:Qr(`Transition`,`TransitionStart`),transitioncancel:Qr(`Transition`,`TransitionCancel`),transitionend:Qr(`Transition`,`TransitionEnd`)},ei={},ti={};wn&&(ti=document.createElement(`div`).style,`AnimationEvent`in window||(delete $r.animationend.animation,delete $r.animationiteration.animation,delete $r.animationstart.animation),`TransitionEvent`in window||delete $r.transitionend.transition);function ni(e){if(ei[e])return ei[e];if(!$r[e])return e;var t=$r[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ti)return ei[e]=t[n];return e}var ri=ni(`animationend`),ii=ni(`animationiteration`),ai=ni(`animationstart`),oi=ni(`transitionrun`),si=ni(`transitionstart`),ci=ni(`transitioncancel`),li=ni(`transitionend`),ui=new Map,di=`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(` `);di.push(`scrollEnd`);function fi(e,t){ui.set(e,t),Ft(t,[e])}var pi=0;function mi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Dd.identifierPrefix;var n=pi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function hi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Fd;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 gi(e,t){return e=hi(e),t=hi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var _i=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)},vi=[],yi=0,bi=0;function xi(){for(var e=yi,t=bi=yi=0;t<e;){var n=vi[t];vi[t++]=null;var r=vi[t];vi[t++]=null;var i=vi[t];vi[t++]=null;var a=vi[t];if(vi[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&&Ti(n,i,a)}}function Si(e,t,n,r){vi[yi++]=e,vi[yi++]=t,vi[yi++]=n,vi[yi++]=r,bi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ci(e,t,n,r){return Si(e,t,n,r),Ei(e)}function wi(e,t){return Si(e,null,null,t),Ei(e)}function Ti(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-Ye(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ei(e){if(50<Id)throw Id=0,Ld=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Di={};function Oi(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 ki(e,t,n,r){return new Oi(e,t,n,r)}function Ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ji(e,t){var n=e.alternate;return n===null?(n=ki(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 Mi(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 Ni(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ai(r)&&(s=1);else if(typeof r==`string`)s=rh(e,n,ye.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ne:return e=ki(31,n,t,a),e.elementType=ne,e.lanes=o,e;case k:return Pi(n.children,a,o,t);case A:s=8,a|=24;break;case j:return e=ki(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case ee:return e=ki(13,n,t,a),e.elementType=ee,e.lanes=o,e;case F:return e=ki(19,n,t,a),e.elementType=F,e.lanes=o,e;case re:case ae:return e=a|32,e=ki(30,n,t,e),e.elementType=ae,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case N:s=10;break a;case M:s=9;break a;case P:s=11;break a;case I:s=14;break a;case te:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ki(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Pi(e,t,n,r){return e=ki(7,e,r,t),e.lanes=n,e}function Fi(e,t,n){return e=ki(6,e,null,t),e.lanes=n,e}function Ii(e){var t=ki(18,null,null,0);return t.stateNode=e,t}function Li(e,t,n){return t=ki(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ri=new WeakMap;function zi(e,t){if(typeof e==`object`&&e){var n=Ri.get(e);return n===void 0?(t={value:e,source:t,stack:Ne(t)},Ri.set(e,t),t):n}return{value:e,source:t,stack:Ne(t)}}var Bi=[],Vi=0,Hi=null,Ui=0,Wi=[],Gi=0,Ki=null,qi=1,Ji=``;function Yi(e,t){Bi[Vi++]=Ui,Bi[Vi++]=Hi,Hi=e,Ui=t}function Xi(e,t,n){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,Ki=e;var r=qi;e=Ji;var i=32-Ye(r)-1;r&=~(1<<i),n+=1;var a=32-Ye(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,qi=1<<32-Ye(t)+i|n<<i|r,Ji=a+e}else qi=1<<a|n<<i|r,Ji=e}function Zi(e){e.return!==null&&(Yi(e,1),Xi(e,1,0))}function Qi(e){for(;e===Hi;)Hi=Bi[--Vi],Bi[Vi]=null,Ui=Bi[--Vi],Bi[Vi]=null;for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,Ji=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null}function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,qi=t.id,Ji=t.overflow,Ki=e}var ea=null,ta=null,na=!1,ra=null,ia=!1,aa=Error(i(519));function oa(e){throw fa(zi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),aa}function sa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[_t]=e,t[vt]=r,n){case`dialog`:Xf(`cancel`,t),Xf(`close`,t);break;case`iframe`:case`object`:case`embed`:Xf(`load`,t);break;case`video`:case`audio`:for(n=0;n<qf.length;n++)Xf(qf[n],t);break;case`source`:Xf(`error`,t);break;case`img`:case`image`:case`link`:Xf(`error`,t),Xf(`load`,t);break;case`details`:Xf(`toggle`,t);break;case`input`:Xf(`invalid`,t),tn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Xf(`invalid`,t);break;case`textarea`:Xf(`invalid`,t),on(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||lp(t.textContent,n)?(r.popover!=null&&(Xf(`beforetoggle`,t),Xf(`toggle`,t)),r.onScroll!=null&&Xf(`scroll`,t),r.onScrollEnd!=null&&Xf(`scrollend`,t),r.onClick!=null&&(t.onclick=hn),t=!0):t=!1,t||oa(e,!0)}function ca(e){for(ea=e.return;ea;)switch(ea.tag){case 5:case 31:case 13:ia=!1;return;case 27:case 3:ia=!0;return;default:ea=ea.return}}function la(e){if(e!==ea)return!1;if(!na)return ca(e),na=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Cp(e.type,e.memoizedProps)),n=!n),n&&ta&&oa(e),ca(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=xm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=xm(e)}else t===27?(t=ta,Mp(e.type)?(e=bm,bm=null,ta=e):ta=t):ta=ea?ym(e.stateNode.nextSibling):null;return!0}function ua(){ta=ea=null,na=!1}function da(){var e=ra;return e!==null&&(yd===null?yd=e:yd.push.apply(yd,e),ra=null),e}function fa(e){ra===null?ra=[e]:ra.push(e)}var pa=ge(null),ma=null,ha=null;function ga(e,t,n){ve(pa,t._currentValue),t._currentValue=n}function _a(e){e._currentValue=pa.current,_e(pa)}function va(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 ya(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),va(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),va(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),va(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 ba(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;Rr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[_h]:e.push(_h))}a=a.return}return e!==null&&ya(t,e,n,r),t.flags|=262144,e!==null}function xa(e){for(e=e.firstContext;e!==null;){if(!Rr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sa(e){ma=e,ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ca(e){return Ta(ma,e)}function wa(e,t){return ma===null&&Sa(e),Ta(e,t)}function Ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ha===null){if(e===null)throw Error(i(308));ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ha=ha.next=t;return n}var Ea=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()})}},Da=t.unstable_scheduleCallback,Oa=t.unstable_NormalPriority,H={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ka(){return{controller:new Ea,data:new Map,refCount:0}}function Aa(e){e.refCount--,e.refCount===0&&Da(Oa,function(){e.controller.abort()})}function ja(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 Ma=null;function Na(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Pa=null,Fa=0,Ia=0,La=null;function Ra(e,t){if(Pa===null){var n=Pa=[];Fa=0,Ia=Hf(),La={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Fa++,t.then(za,za),t}function za(){if(--Fa===0&&(Ma=null,Pa!==null)){La!==null&&(La.status=`fulfilled`);var e=Pa;Pa=null,Ia=0,La=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ba(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 Va=L.S;L.S=function(e,t){if(Sd=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Ra(e,t),Ma!==null)for(var n=Of;n!==null;)ja(n,Ma),n=n.next;if(n=e.types,n!==null){for(var r=Of;r!==null;)ja(r,n),r=r.next;if(Ia!==0){r=Ma,r===null&&(r=Ma=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Va!==null&&Va(e,t)};var Ha=ge(null);function Ua(){var e=Ha.current;return e===null?rd.pooledCache:e}function Wa(e,t){t===null?ve(Ha,Ha.current):ve(Ha,t.pool)}function Ga(){var e=Ua();return e===null?null:{parent:H._currentValue,pool:e}}var Ka=Error(i(460)),qa=Error(i(474)),Ja=Error(i(542)),Ya={then:function(){}};function Xa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Za(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(hn,hn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,to(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(hn,hn);else{if(e=rd,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,to(e),e}throw $a=t,Ka}}function Qa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?($a=e,Ka):e}}var $a=null;function eo(){if($a===null)throw Error(i(459));var e=$a;return $a=null,e}function to(e){if(e===Ka||e===Ja)throw Error(i(483))}var no=null,ro=0;function io(e){var t=ro;return ro+=1,no===null&&(no=[]),Za(no,e,t)}function ao(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function oo(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 so(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=ji(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=Fi(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),ao(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===te&&Qa(i)===t.type)?(t=a(t,n.props),ao(t,n),t.return=e,t):(t=Ni(n.type,n.key,n.props,null,e.mode,r),ao(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=Li(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=Pi(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=Fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Ni(t.type,t.key,t.props,null,e.mode,n),ao(n,t),n.return=e,n;case O:return t=Li(t,e.mode,n),t.return=e,t;case te:return t=Qa(t),f(e,t,n)}if(de(t)||ce(t))return t=Pi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,io(t),n);if(t.$$typeof===N)return f(e,wa(e,t),n);oo(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 te:return n=Qa(n),p(e,t,n,r)}if(de(n)||ce(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,io(n),r);if(n.$$typeof===N)return p(e,t,wa(e,n),r);oo(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 te:return r=Qa(r),m(e,t,n,r,i)}if(de(r)||ce(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,io(r),i);if(r.$$typeof===N)return m(e,t,n,wa(t,r),i);oo(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),na&&Yi(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 na&&Yi(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)}),na&&Yi(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),na&&Yi(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 na&&Yi(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)}),na&&Yi(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),ao(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===te&&Qa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ao(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Pi(o.props.children,e.mode,c,o.key),ao(c,o),c.return=e,e=c):(c=Ni(o.type,o.key,o.props,null,e.mode,c),ao(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=Li(o,e.mode,c),c.return=e,e=c}return s(e);case te:return o=Qa(o),_(e,r,o,c)}if(de(o))return h(e,r,o,c);if(ce(o)){if(l=ce(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,io(o),c);if(o.$$typeof===N)return _(e,r,wa(e,o),c);oo(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=Fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ro=0;var i=_(e,t,n,r);return no=null,i}catch(t){if(t===Ka||t===Ja)throw t;var a=ki(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var co=so(!0),lo=so(!1),uo=!1;function fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function po(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 mo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,nd&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ei(e),Ti(e,null,n),t}return Si(e,r,t,n),Ei(e)}function go(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,ft(e,n)}}function _o(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 vo=!1;function yo(){if(vo){var e=La;if(e!==null)throw e}}function bo(e,t,n,r){vo=!1;var i=e.updateQueue;uo=!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?(ad&f)===f:(r&f)===f){f!==0&&f===Ia&&(vo=!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:uo=!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),pd|=o,e.lanes=o,e.memoizedState=d}}function xo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function So(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)xo(n[e],t)}var Co=ge(null),wo=ge(0);function To(e,t){e=dd,ve(wo,e),ve(Co,t),dd=e|t.baseLanes}function Eo(){ve(wo,dd),ve(Co,Co.current)}function Do(){dd=wo.current,_e(Co),_e(wo)}var Oo=ge(null),ko=null;function Ao(e){var t=e.alternate;ve(Fo,Fo.current&1),ve(Oo,e),ko===null&&(t===null||Co.current!==null||t.memoizedState!==null)&&(ko=e)}function jo(e){ve(Fo,Fo.current),ve(Oo,e),ko===null&&(ko=e)}function Mo(e){e.tag===22?(ve(Fo,Fo.current),ve(Oo,e),ko===null&&(ko=e)):No()}function No(){ve(Fo,Fo.current),ve(Oo,Oo.current)}function Po(e){_e(Oo),ko===e&&(ko=null),_e(Fo)}var Fo=ge(0);function Io(e,t){ve(Oo,Oo.current),ve(Fo,t)}function Lo(e){_e(Fo),_e(Oo),ko===e&&(ko=null)}function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||gm(n)||_m(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zo=0,Bo=null,Vo=null,Ho=null,Uo=!1,Wo=!1,Go=!1,Ko=0,qo=0,Jo=null,Yo=0;function Xo(){throw Error(i(321))}function Zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rr(e[n],t[n]))return!1;return!0}function Qo(e,t,n,r,i,a){return zo=a,Bo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?hc:gc,Go=!1,a=n(r,i),Go=!1,Wo&&(a=es(t,n,r,i)),$o(e),a}function $o(e){L.H=mc;var t=Vo!==null&&Vo.next!==null;if(zo=0,Ho=Vo=Bo=null,Uo=!1,qo=0,Jo=null,t)throw Error(i(300));e===null||Nc||(e=e.dependencies,e!==null&&xa(e)&&(Nc=!0))}function es(e,t,n,r){Bo=e;var a=0;do{if(Wo&&(Jo=null),qo=0,Wo=!1,25<=a)throw Error(i(301));if(a+=1,Ho=Vo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}L.H=_c,o=t(n,r)}while(Wo);return o}function ts(){var e=L.H,t=e.useState()[0];return t=typeof t.then==`function`?cs(t):t,e=e.useState()[0],(Vo===null?null:Vo.memoizedState)!==e&&(Bo.flags|=1024),t}function ns(){var e=Ko!==0;return Ko=0,e}function rs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function is(e){if(Uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Uo=!1}zo=0,Ho=Vo=Bo=null,Wo=!1,qo=Ko=0,Jo=null}function as(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?Bo.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function os(){if(Vo===null){var e=Bo.alternate;e=e===null?null:e.memoizedState}else e=Vo.next;var t=Ho===null?Bo.memoizedState:Ho.next;if(t!==null)Ho=t,Vo=e;else{if(e===null)throw Bo.alternate===null?Error(i(467)):Error(i(310));Vo=e,e={memoizedState:Vo.memoizedState,baseState:Vo.baseState,baseQueue:Vo.baseQueue,queue:Vo.queue,next:null},Ho===null?Bo.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cs(e){var t=qo;return qo+=1,Jo===null&&(Jo=[]),e=Za(Jo,e,t),t=Bo,(Ho===null?t.memoizedState:Ho.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?hc:gc),e}function ls(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return cs(e);if(e.$$typeof===oe)return;if(e.$$typeof===N)return Ca(e)}throw Error(i(438,String(e)))}function us(e){var t=null,n=Bo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Bo.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=ss(),Bo.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]=ie;return t.index++,n}function ds(e,t){return typeof t==`function`?t(e):t}function fs(e){return ps(os(),Vo,e)}function ps(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(zo&f)===f:(ad&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===Ia&&(d=!0);else if((zo&p)===p){u=u.next,p===Ia&&(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,Bo.lanes|=p,pd|=p;f=u.action,Go&&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,Bo.lanes|=f,pd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Rr(o,e.memoizedState)&&(Nc=!0,d&&(n=La,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 ms(e){var t=os(),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);Rr(o,t.memoizedState)||(Nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function hs(e,t,n){var r=Bo,a=os(),o=na;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Rr((Vo||a).memoizedState,n);if(s&&(a.memoizedState=n,Nc=!0),a=a.queue,Bs(vs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ho!==null&&!!(Ho.memoizedState.tag&1),Fs(e?9:8,{destroy:void 0},_s.bind(null,r,a,n,t),null),e){if(r.flags|=2048,rd===null)throw Error(i(349));o||zo&127||gs(r,t,n)}return n}function gs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Bo.updateQueue,t===null?(t=ss(),Bo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _s(e,t,n,r){t.value=n,t.getSnapshot=r,ys(t)&&bs(e)}function vs(e,t,n){return n(function(){ys(t)&&bs(e)})}function ys(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rr(e,n)}catch{return!0}}function bs(e){var t=wi(e,2);t!==null&&Vd(t,e,2)}function xs(e){var t=as();if(typeof e==`function`){var n=e;if(e=n(),Go){z(!0);try{n()}finally{z(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:e},t}function Ss(e,t,n,r){return e.baseState=n,ps(e,Vo,typeof r==`function`?r:ds)}function Cs(e,t,n,r,a){if(dc(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)}};L.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ws(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ws(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=L.T,o={};o.types=a===null?null:a.types,L.T=o;try{var s=n(i,r),c=L.S;c!==null&&c(o,s),Ts(e,t,s)}catch(n){Ds(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),L.T=a}}else try{a=n(i,r),Ts(e,t,a)}catch(n){Ds(e,t,n)}}function Ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Es(e,t,n)},function(n){return Ds(e,t,n)}):Es(e,t,n)}function Es(e,t,n){t.status=`fulfilled`,t.value=n,Os(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ws(e,n)))}function Ds(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Os(t),t=t.next;while(t!==r)}e.action=null}function Os(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ks(e,t){return t}function As(e,t){if(na){var n=rd.formState;if(n!==null){a:{var r=Bo;if(na){if(ta){b:{for(var i=ta,a=ia;i.nodeType!==8;)if(!a||(i=ym(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ta=ym(i.nextSibling),r=i.data===`F!`;break a}}oa(r)}r=!1}r&&(t=n[0])}}return n=as(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:t},n.queue=r,n=cc.bind(null,Bo,r),r.dispatch=n,r=xs(!1),a=uc.bind(null,Bo,!1,r.queue),r=as(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Cs.bind(null,Bo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function js(e){return Ms(os(),Vo,e)}function Ms(e,t,n){if(t=ps(e,t,ks)[0],e=fs(ds)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=cs(t)}catch(e){throw e===Ka?Ja:e}else r=t;t=os();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Bo.flags|=2048,Fs(9,{destroy:void 0},Ns.bind(null,i,n),null)),[r,a,e]}function Ns(e,t){e.action=t}function Ps(e){var t=os(),n=Vo;if(n!==null)return Ms(t,n,e);os(),t=t.memoizedState,n=os();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Fs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Bo.updateQueue,t===null&&(t=ss(),Bo.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 Is(){return os().memoizedState}function Ls(e,t,n,r){var i=as();Bo.flags|=e,i.memoizedState=Fs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Rs(e,t,n,r){var i=os();r=r===void 0?null:r;var a=i.memoizedState.inst;Vo!==null&&r!==null&&Zo(r,Vo.memoizedState.deps)?i.memoizedState=Fs(t,a,n,r):(Bo.flags|=e,i.memoizedState=Fs(1|t,a,n,r))}function zs(e,t){Ls(8390656,8,e,t)}function Bs(e,t){Rs(2048,8,e,t)}function Vs(e){Bo.flags|=4;var t=Bo.updateQueue;if(t===null)t=ss(),Bo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Hs(e){var t=os().memoizedState;return Vs({ref:t,nextImpl:e}),function(){if(nd&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Us(e,t){return Rs(4,2,e,t)}function Ws(e,t){return Rs(4,4,e,t)}function Gs(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 Ks(e,t,n){n=n==null?null:n.concat([e]),Rs(4,4,Gs.bind(null,t,e),n)}function qs(){}function Js(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Zo(t,r[1]))return r[0];if(r=e(),Go){z(!0);try{e()}finally{z(!1)}}return n.memoizedState=[r,t],r}function Xs(e,t,n){return n===void 0||zo&1073741824&&!(ad&261930)?e.memoizedState=t:(e.memoizedState=n,e=zd(),Bo.lanes|=e,pd|=e,n)}function Zs(e,t,n,r){return Rr(n,t)?n:Co.current===null?!(zo&106)||zo&1073741824&&!(ad&261930)?(Nc=!0,e.memoizedState=n):(e=zd(),Bo.lanes|=e,pd|=e,t):(e=Xs(e,n,r),Rr(e,t)||(Nc=!0),e)}function Qs(e,t,n,r,i){var a=fe.p;fe.p=a!==0&&8>a?a:8;var o=L.T,s={};s.types=o===null?null:o.types,L.T=s,uc(e,!1,t,n);try{var c=i(),l=L.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?lc(e,t,Ba(c,r),Rd(e)):lc(e,t,r,Rd(e))}catch(n){lc(e,t,{then:function(){},status:`rejected`,reason:n},Rd())}finally{fe.p=a,o!==null&&s.types!==null&&(o.types=s.types),L.T=o}}function $s(){}function ec(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=tc(e).queue;Qs(e,a,t,pe,n===null?$s:function(){return nc(e),n(r)})}function tc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nc(e){var t=tc(e);t.next===null&&(t=e.alternate.memoizedState),lc(e,t.next.queue,{},Rd())}function rc(){return Ca(_h)}function ic(){return os().memoizedState}function ac(){return os().memoizedState}function oc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Rd();e=mo(n);var r=ho(t,e,n);r!==null&&(Vd(r,t,n),go(r,t,n)),t={cache:ka()},e.payload=t;return}t=t.return}}function sc(e,t,n){var r=Rd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e)?fc(t,n):(n=Ci(e,t,n,r),n!==null&&(Vd(n,e,r),pc(n,t,r)))}function cc(e,t,n){lc(e,t,n,Rd())}function lc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(dc(e))fc(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,Rr(s,o))return Si(e,t,i,0),rd===null&&xi(),!1}catch{}if(n=Ci(e,t,i,r),n!==null)return Vd(n,e,r),pc(n,t,r),!0}return!1}function uc(e,t,n,r){if(r={lane:2,revertLane:Hf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},dc(e)){if(t)throw Error(i(479))}else t=Ci(e,n,r,2),t!==null&&Vd(t,e,2)}function dc(e){var t=e.alternate;return e===Bo||t!==null&&t===Bo}function fc(e,t){Wo=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ft(e,n)}}var mc={readContext:Ca,use:ls,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo,useEffectEvent:Xo},hc={readContext:Ca,use:ls,useCallback:function(e,t){return as().memoizedState=[e,t===void 0?null:t],e},useContext:Ca,useEffect:zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ls(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var n=as();t=t===void 0?null:t;var r=e();if(Go){z(!0);try{e()}finally{z(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=as();if(n!==void 0){var i=n(t);if(Go){z(!0);try{n(t)}finally{z(!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=sc.bind(null,Bo,e),[r.memoizedState,e]},useRef:function(e){var t=as();return e={current:e},t.memoizedState=e},useState:function(e){e=xs(e);var t=e.queue,n=cc.bind(null,Bo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qs,useDeferredValue:function(e,t){return Xs(as(),e,t)},useTransition:function(){var e=xs(!1);return e=Qs.bind(null,Bo,e.queue,!0,!1),as().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Bo,a=as();if(na){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),rd===null)throw Error(i(349));ad&127||gs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,zs(vs.bind(null,r,o,e),[e]),r.flags|=2048,Fs(9,{destroy:void 0},_s.bind(null,r,o,n,t),null),n},useId:function(){var e=as(),t=rd.identifierPrefix;if(na){var n=Ji,r=qi;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ko++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:rc,useFormState:As,useActionState:As,useOptimistic:function(e){var t=as();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=uc.bind(null,Bo,!0,n),n.dispatch=t,[e,t]},useMemoCache:us,useCacheRefresh:function(){return as().memoizedState=oc.bind(null,Bo)},useEffectEvent:function(e){var t=as(),n={impl:e};return t.memoizedState=n,function(){if(nd&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},gc={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:fs,useRef:Is,useState:function(){return fs(ds)},useDebugValue:qs,useDeferredValue:function(e,t){return Zs(os(),Vo.memoizedState,e,t)},useTransition:function(){var e=fs(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:js,useActionState:js,useOptimistic:function(e,t){return Ss(os(),Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs},_c={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:ms,useRef:Is,useState:function(){return ms(ds)},useDebugValue:qs,useDeferredValue:function(e,t){var n=os();return Vo===null?Xs(n,e,t):Zs(n,Vo.memoizedState,e,t)},useTransition:function(){var e=ms(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){var n=os();return Vo===null?(n.baseState=e,[e,n.queue.dispatch]):Ss(n,Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs};function vc(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 yc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rd(),i=mo(r);i.payload=t,n!=null&&(i.callback=n),t=ho(e,i,r),t!==null&&(Vd(t,e,r),go(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rd(),i=mo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ho(e,i,r),t!==null&&(Vd(t,e,r),go(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rd(),r=mo(n);r.tag=2,t!=null&&(r.callback=t),t=ho(e,r,n),t!==null&&(Vd(t,e,n),go(t,e,n))}};function bc(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?!zr(n,r)||!zr(i,a):!0}function xc(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&&yc.enqueueReplaceState(t,t.state,null)}function Sc(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 Cc(e){_i(e)}function wc(e){console.error(e)}function Tc(e){_i(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(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 Oc(e,t,n){return n=mo(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=mo(e),e.tag=3,e}function Ac(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(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(Td===null?Td=new Set([this]):Td.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ba(t,n,a,!0),n=Oo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return ko===null?$d():n.alternate===null&&fd===0&&(fd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ya?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Sf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ya?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)),Sf(e,r,a)),!1}throw Error(i(435,n.tag))}return Sf(e,r,a),$d(),!1}if(na)return t=Oo.current,t===null?(r!==aa&&(t=Error(i(423),{cause:r}),fa(zi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=zi(r,n),a=Oc(e.stateNode,r,a),_o(e,a),fd!==4&&(fd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==aa&&(e=Error(i(422),{cause:r}),fa(zi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=zi(o,n),vd===null?vd=[o]:vd.push(o),fd!==4&&(fd=2),t===null)return!0;r=zi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,r,e),_o(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`&&(Td===null||!Td.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=kc(a),Ac(a,e,n,r),_o(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(i(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?lo(t,null,n,r):co(t,e.child,n,r)}function Fc(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 Sa(t),r=Qo(e,t,n,o,a,i),s=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(na&&s&&Zi(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Ni(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?zr:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=ji(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(zr(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(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 Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wa(t,a===null?null:a.cachePool),a===null?Eo():To(t,a),Mo(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Wa(t,null),Eo(),No()):(Wa(t,a.cachePool),To(t,a),No(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Ua();return a=a===null?null:{parent:H._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Wa(t,null),Eo(),Mo(t),e!==null&&ba(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return co(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Po(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(na){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(jo(t),(e=ta)?(e=hm(e,ia),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw oa(t);return t.lanes=536870912,null}return Vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(jo(t),a){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Nc||ba(e,t,n,!1),a=(n&e.childLanes)!==0,Nc||a){if(Co.current===null){if(r=rd,r!==null&&(s=B(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,wi(e,s),Vd(r,e,s),Mc;$d()}t=Hc(e,t,n)}else e=o.treeContext,ta=ym(s.nextSibling),ea=t,na=!0,ra=null,ia=!1,e!==null&&$i(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=ji(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(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 Gc(e,t,n,r,i){return Sa(t),n=Qo(e,t,n,r,void 0,i),r=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(na&&r&&Zi(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Sa(t),t.updateQueue=null,n=es(t,r,n,i),$o(e),r=ns(),e!==null&&!Nc?(rs(e,t,a),ll(e,t,a)):(na&&r&&Zi(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Sa(t),t.stateNode===null){var a=Di,o=n.contextType;typeof o==`object`&&o&&(a=Ca(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},fo(t),o=n.contextType,a.context=typeof o==`object`&&o?Ca(o):Di,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(vc(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&&yc.enqueueReplaceState(a,a.state,null),bo(t,r,a,i),yo(),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=Sc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Di,typeof u==`object`&&u&&(o=Ca(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)&&xc(t,a,r,o),uo=!1;var f=t.memoizedState;a.state=f,bo(t,r,a,i),yo(),l=t.memoizedState,s||f!==l||uo?(typeof d==`function`&&(vc(t,n,d,r),l=t.memoizedState),(c=uo||bc(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,po(e,t),o=t.memoizedProps,u=Sc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Di,typeof l==`object`&&l&&(c=Ca(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)&&xc(t,a,r,c),uo=!1,f=t.memoizedState,a.state=f,bo(t,r,a,i),yo();var p=t.memoizedState;o!==d||f!==p||uo||e!==null&&e.dependencies!==null&&xa(e.dependencies)?(typeof s==`function`&&(vc(t,n,s,r),p=t.memoizedState),(u=uo||bc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&xa(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,Wc(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=co(t,e.child,null,i),t.child=co(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return ua(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:Ga()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=gd),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Fo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(na){if(i?Ao(t):No(),(e=ta)?(e=hm(e,ia),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw oa(t);return t.lanes=_m(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(No(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Pi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(Ao(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(No(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=ji(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Pi(i,a,n,null),i.flags|=2):i=ji(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=Ga():(s=H._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(Ao(t),n=e.child,e=n.sibling,n=ji(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 $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=ki(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return co(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Ao(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(No(),o=a.fallback,s=t.mode,a=el({mode:`visible`,children:a.children},s),o=Pi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,co(t,e.child,null,c),a=t.child,a.memoizedState=Xc(c),a.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,a)):(No(),t.child=e.child,t.flags|=128,null);if(Ao(t),_m(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,fa({value:a,source:null,stack:null})),tl(e,t,c)}if(Nc||ba(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(Co.current!==null)return tl(e,t,c);if(r=rd,r!==null&&(a=B(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,wi(e,a),Vd(r,e,a),Mc;return gm(o)||$d(),tl(e,t,c)}return gm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ta=ym(o.nextSibling),ea=t,na=!0,ra=null,ia=!1,e!==null&&$i(t,e),t=$c(t,a.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),va(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Ro(n)===null&&(t=e),e=e.sibling}return t}function al(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 ol(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 sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Fo.current;if(t.flags&128)return Io(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Io(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=na?Ui:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(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=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(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&&Ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return ga(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ba(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=ji(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ji(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&xa(e)))}function dl(e,t,n){switch(t.tag){case 3:Ce(t,t.stateNode.containerInfo),ga(t,H,e.memoizedState.cache),ua();break;case 27:case 5:Te(t);break;case 4:Ce(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,jo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Ao(t),t.flags|=128,null;r=ba(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(Ao(t),e=ll(e,t,n),e===null?null:e.sibling)}Ao(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ba(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Io(t,Fo.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:ga(t,H,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,na&&t.flags&1048576&&Xi(t,Ui,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Qa(t.elementType),t.type=e,typeof e==`function`)Ai(e)?(r=Sc(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===P){t.tag=11,t=Fc(null,t,e,r,n);break a}if(a===I){t.tag=14,t=Ic(null,t,e,r,n);break a}if(a===N){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=ue(e)||e,Error(i(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Sc(r,t.pendingProps),qc(e,t,r,a,n);case 3:a:{if(Ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,po(e,t),bo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ga(t,H,r),r!==o.cache&&ya(t,[H],n,!0),yo(),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=Jc(e,t,r,n);break a}if(r!==a){a=zi(Error(i(424)),t),fa(a),t=Jc(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(ta=ym(e.firstChild),ea=t,na=!0,ra=null,ia=!0,n=lo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ua(),r===a){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Um(t.type,null,t.pendingProps,null))?t.memoizedState=n:na||(t.stateNode=Sp(t.type,t.pendingProps,xe.current,t)):t.memoizedState=Um(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Te(t),e===null&&na&&(r=t.stateNode=Tm(t.type,t.pendingProps,xe.current),ea=t,ia=!0,a=ta,Mp(t.type)?(bm=a,ta=ym(r.firstChild)):ta=a),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&na&&((a=r=ta)&&(r=pm(r,t.type,t.pendingProps,ia),r===null?a=!1:(t.stateNode=r,ea=t,ta=ym(r.firstChild),ia=!1,a=!0)),a||oa(t)),Te(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Cp(a,o)?r=null:s!==null&&Cp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Qo(e,t,ts,null,null,n),_h._currentValue=a),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&na&&((e=n=ta)&&(n=mm(n,t.pendingProps,ia),n===null?e=!1:(t.stateNode=n,ea=t,ta=null,e=!0)),e||oa(t)),null;case 13:return Qc(e,t,n);case 4:return Ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=co(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Sa(t),a=Ca(a),r=r(a),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Sa(t),r=Ca(H),e===null?(a=Ua(),a===null&&(a=rd,o=ka(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},fo(t),ga(t,H,a)):((e.lanes&n)!==0&&(po(e,t),bo(t,null,null,n),yo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ga(t,H,r),r!==a.cache&&ya(t,[H],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ga(t,H,r))),Pc(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:na&&Zi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?ih(t,r):ih(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(Xd())e.flags|=8192;else throw $a=Ya,qa}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ah(t)){if(Xd())e.flags|=8192;else throw $a=Ya,qa}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:st(),e.lanes|=t,_d|=t)}function _l(e,t){if(!na)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 vl(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 yl(e,t,n){var r=t.pendingProps;switch(Qi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vl(t),null;case 1:return vl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),_a(H),we(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(la(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,da())),vl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(pl(t),o===null?(vl(t),ml(t,a,null,r,n)):(vl(t),hl(t,o))):o?o===e.memoizedState?(vl(t),t.flags&=-16777217):(pl(t),vl(t),hl(t,o)):(e=e.memoizedProps,e!==r&&pl(t),vl(t),ml(t,a,e,r,n)),null;case 27:if(Ee(t),n=xe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}e=ye.current,la(t)?sa(t,e):(e=Tm(a,r,n),t.stateNode=e,pl(t))}return vl(t),t.subtreeFlags&=-33554433,null;case 5:if(Ee(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}if(o=ye.current,la(t))sa(t,o);else{var s=yp(xe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[_t]=t,o[vt]=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(fp(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&&pl(t)}}return vl(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,la(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ea,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[_t]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||lp(e.nodeValue,n)),e||oa(t,!0)}else e=yp(e).createTextNode(r),e[_t]=t,t.stateNode=e}return vl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=la(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[_t]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),e=!1}else n=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Po(t),t):(Po(t),null);if(t.flags&128)throw Error(i(558))}return vl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=la(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[_t]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),a=!1}else a=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Po(t),t):(Po(t),null)}return Po(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),gl(t,t.updateQueue),vl(t),null);case 4:return we(),e===null&&$f(t.stateNode.containerInfo),t.flags|=67108864,vl(t),null;case 10:return _a(t.type),vl(t),null;case 19:if(Lo(t),r=t.memoizedState,r===null)return vl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)_l(r,!1);else{if(fd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ro(e),o!==null){for(t.flags|=128,_l(r,!1),e=o.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Mi(n,e),n=n.sibling;return Io(t,Fo.current&1|2),na&&Yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>Cd&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!na)return vl(t),null}else 2*ze()-r.renderingStartTime>Cd&&n!==536870912&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,o=Fo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||na?Io(t,o):(n=o,ve(Oo,t),ve(Fo,n),ko===null&&(ko=t)),na&&Yi(t,r.treeForkCount),e}return vl(t),null;case 22:case 23:return Po(t),Do(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),n=t.updateQueue,n!==null&&gl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&_e(Ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),_a(H),vl(t),null;case 25:return null;case 30:return t.flags|=33554432,vl(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch(Qi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _a(H),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Po(t),t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return we(),null;case 10:return _a(t.type),null;case 22:case 23:return Po(t),Do(),e!==null&&_e(Ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _a(H),null;case 25:return null;default:return null}}function xl(e,t){switch(Qi(t),t.tag){case 3:_a(H),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&Po(t);break;case 13:Po(t);break;case 19:Lo(t);break;case 10:_a(t.type);break;case 22:case 23:Po(t),Do(),e!==null&&_e(Ha);break;case 24:_a(H)}}function Sl(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){xf(t,t.return,e)}}function Cl(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){xf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){xf(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{So(t,n)}catch(t){xf(e,e.return,t)}}}function Tl(e,t,n){n.props=Sc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){xf(e,t,n)}}function El(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=mi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Wp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Gp(e);p(e.child,!1,cm,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){xf(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){xf(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){xf(e,t,n)}else n.current=null}}function Ol(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++)um(e.stateNode,t[n])}function kl(e){for(var t=e.return;t!==null&&(Ml(t)&&um(e.stateNode,t.stateNode),!jl(t));)t=t.return}function Al(e){for(var t=e.return;t!==null&&(Ml(t)&&dm(e.stateNode,t.stateNode),!jl(t));)t=t.return}function jl(e){return e.tag===5||e.tag===3||e.tag===27}function Ml(e){return e&&e.tag===7&&e.stateNode!==null}function Nl(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){xf(e,e.return,t)}}function Pl(e,t,n){try{var r=e.stateNode;mp(r,e.type,n,t),r[vt]=t}catch(t){xf(e,e.return,t)}}function Fl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mp(e.type)||e.tag===4}function Il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Fl(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&&Mp(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 Ll(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=hn)),Ol(e,r),Vt=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Mp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Ol(e,r),Vt=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Mp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Rl(e,t,n,r),e=e.sibling;e!==null;)Rl(e,t,n,r),e=e.sibling}function zl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);fp(t,r,n),t[_t]=e,t[vt]=n}catch(t){xf(e,e.return,t)}}var Bl=!1,Vl=null;function Hl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Bl=!0)}var Ul=null;function Wl(){var e=Ul;return Ul=null,e}var Gl=0;function Kl(e,t,n,r,i){return Gl=0,ql(e.child,t,n,r,i)}function ql(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Rp(o);r.push(s),s.view&&(a=!0)}else a||Rp(o).view&&(a=!0);Bl=!0,Fp(o,Gl===0?t:t+`_`+Gl,n),Gl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||ql(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Jl(e,t){for(;e!==null;)e.tag===5?Ip(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Jl(e.child,t),e=e.sibling}function Yl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Yl(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=gi(t.default,t.share),t!==`none`&&(Kl(e,n,t,null,!1)||Jl(e.child,!1))}e=e.sibling}}function Xl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=mi(r,n),a=gi(r.default,n.paired?r.share:r.enter);a===`none`?Yl(e):Kl(e,i,a,null,!1)?(Yl(e),n.paired||t||Bd(e,r.onEnter)):Jl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e,t),e=e.sibling;else Yl(e)}function Zl(e){if(Vl!==null&&Vl.size!==0){var t=Vl;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=gi(n.default,n.share);if(a!==`none`&&(Kl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Bd(e,n.onShare)):Jl(e.child,!1)),t.delete(r),t.size===0)break}}}Zl(e)}e=e.sibling}}}function Ql(e){if(e.tag===30){var t=e.memoizedProps,n=mi(t,e.stateNode),r=Vl===null?void 0:Vl.get(n),i=gi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Kl(e,n,i,null,!1)?r===void 0?Bd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Vl.delete(n),Bd(e,t.onShare)):Jl(e.child,!1)),Vl!==null&&Zl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e),e=e.sibling;else Vl!==null&&Zl(e)}function $l(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=mi(t,e.stateNode);t=gi(t.default,t.update),e.flags&=-5,t!==`none`&&Kl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&$l(e);e=e.sibling}}function eu(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,Jl(e.child,!1))}eu(e)}e=e.sibling}}function tu(e){if(e.tag===30)e.stateNode.paired=null,Jl(e.child,!1),eu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e),e=e.sibling;else eu(e)}function nu(e){for(e=e.child;e!==null;)e.tag===30?Jl(e.child,!1):e.subtreeFlags&33554432&&nu(e),e=e.sibling}function ru(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Gl<a.length){var l=a[Gl],u=Rp(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&&Fp(c,Gl===0?n:n+`_`+Gl,i),s&&e.flags&4||(Ul===null&&(Ul=[]),Ul.push(c,Gl===0?r:r+`_`+Gl,t.memoizedProps)),Gl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ru(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function iu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=mi(n,r),a=gi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(zp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Gl=0,i=ru(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Bd(e,n.onUpdate))}else e.subtreeFlags&33554432&&iu(e,t);e=e.sibling}}var au=!1,ou=!1,su=!1,cu=!1,lu=typeof WeakSet==`function`?WeakSet:Set,uu=null,du=!1,fu=!1,pu=!1,mu=!1;function hu(e,t,n){if(e=e.containerInfo,_p=Eh,e=Wr(e),Gr(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(vp={focusedElem:e,selectionRange:r},Eh=!1,n=(n&335544064)===n,uu=t,t=n?9270:1024;uu!==null;){if(e=uu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Ql(r[a]);if(e.alternate===null&&e.flags&2)n&&Hl(e),gu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Ql(r),gu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Hl(e),gu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,uu=r):(n&&$l(e),gu(n))}}Vl=null}function gu(e){for(;uu!==null;){var t=uu,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=Sc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){xf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)fm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:fm(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=mi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=gi(a.default,a.update),a!==`none`&&Kl(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,uu=r;break}uu=t.return}}function _u(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Lu(e,n),r&4&&Sl(5,n);break;case 1:if(Lu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){xf(n,n.return,e)}else{var i=Sc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){xf(n,n.return,e)}}}r&64&&wl(n),r&512&&El(n,n.return);break;case 3:if(Lu(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{So(e,t)}catch(e){xf(n,n.return,e)}}break;case 27:t===null&&r&4&&zl(n);case 26:case 5:Lu(e,n),t===null&&r&4&&Nl(n),r&512&&El(n,n.return);break;case 12:Lu(e,n);break;case 31:Lu(e,n),r&4&&Eu(e,n);break;case 13:Lu(e,n),r&4&&Du(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Tf.bind(null,n),vm(e,n))));break;case 22:if(r=n.memoizedState!==null||au,!r){var a=t!==null&&t.memoizedState!==null||ou;t=au,i=ou,au=r,(ou=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),zu(e,n,r)):Lu(e,n),au=t,ou=i}break;case 30:Lu(e,n),r&512&&El(n,n.return);break;case 7:r&512&&El(n,n.return);default:Lu(e,n)}}function vu(e,t){for(e=e.child;e!==null;)yu(e,t),e=e.sibling}function yu(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){xf(e,e.return,t)}bu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Vt=!0}catch(t){xf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Pp(s,!0):Pp(e.stateNode,!1)}catch(t){xf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&vu(e,t);break;default:vu(e,t)}}function bu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:yu(n,r);break a;case 22:n.memoizedState===null&&bu(n,r);break a;default:bu(n,r)}}e=e.sibling}}function xu(e){var t=e.alternate;t!==null&&(e.alternate=null,xu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Et(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 Su=null,Cu=!1;function wu(e,t,n){for(n=n.child;n!==null;)Tu(e,t,n),n=n.sibling}function Tu(e,t,n){if(Je&&typeof Je.onCommitFiberUnmount==`function`)try{Je.onCommitFiberUnmount(qe,n)}catch{}switch(n.tag){case 26:ou||Dl(n,t),wu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!ou&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ou||Dl(n,t),Al(n);var r=Su,i=Cu;Mp(n.type)&&(Su=n.stateNode,Cu=!1),wu(e,t,n),Em(n.stateNode,n.type,n.memoizedProps),Su=r,Cu=i;break;case 5:ou||Dl(n,t),Al(n);case 6:if(n.tag===6&&Al(n),r=Su,i=Cu,Su=null,wu(e,t,n),Su=r,Cu=i,Su!==null){if(Cu)try{(Su.nodeType===9?Su.body:Su.nodeName===`HTML`?Su.ownerDocument.body:Su).removeChild(n.stateNode),Vt=!0}catch(e){xf(n,t,e)}else try{Su.removeChild(n.stateNode),Vt=!0}catch(e){xf(n,t,e)}}break;case 18:Su!==null&&(Cu?(e=Su,Np(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Qh(e)):Np(Su,n.stateNode));break;case 4:r=Su,i=Cu,Su=n.stateNode.containerInfo,Cu=!0,wu(e,t,n),Su=r,Cu=i;break;case 0:case 11:case 14:case 15:Cl(2,n,t),ou||Cl(4,n,t),wu(e,t,n);break;case 1:ou||(Dl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Tl(n,t,r)),wu(e,t,n);break;case 21:wu(e,t,n);break;case 22:ou=(r=ou)||n.memoizedState!==null,wu(e,t,n),ou=r;break;case 30:Dl(n,t),wu(e,t,n);break;case 7:ou||Dl(n,t),wu(e,t,n);break;default:wu(e,t,n)}}function Eu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qh(e)}catch(e){xf(t,t.return,e)}}}function Du(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){xf(t,t.return,e)}}function Ou(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new lu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new lu),t;default:throw Error(i(435,e.tag))}}function ku(e,t){var n=Ou(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ef.bind(null,e,t);t.then(r,r)}})}function Au(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(Mp(l.type)){Su=l.stateNode,Cu=!1;break a}break;case 5:Su=l.stateNode,Cu=!1;break a;case 3:case 4:Su=l.stateNode.containerInfo,Cu=!0;break a}l=l.return}if(Su===null)throw Error(i(160));Tu(s,c,o),Su=null,Cu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Mu(t,e,n),t=t.sibling}var ju=null;function Mu(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}Au(t,e,n),Nu(e),a&4&&(Cl(3,e,e.return),Sl(3,e),Cl(5,e,e.return));break;case 1:Au(t,e,n),Nu(e),a&512&&(ou||r===null||Dl(r,r.return)),a&64&&au&&(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=ju,Au(t,e,n),Nu(e),a&512&&(ou||r===null||Dl(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(au)e.stateNode=Sp(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[wt]||r[_t]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),fp(r,t,n),r[_t]=e,jt(r),t=r;break a;case`link`:if(o=th(`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),fp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=th(`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),fp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[_t]=e,jt(r),t=r}e.stateNode=t}}else au||nh(o,e.type,e.stateNode)}else e.stateNode=Xm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||ou||t.parentNode.removeChild(t)):a.count--,n===null?au||nh(o,e.type,e.stateNode):Xm(o,n,e.memoizedProps))}break;case 27:Au(t,e,n),Nu(e),a&512&&(ou||r===null||Dl(r,r.return)),r!==null&&a&4&&Pl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=su,su=!1,Au(t,e,n),su=o,Nu(e),a&512&&(ou||r===null||Dl(r,r.return)),e.flags&32){t=e.stateNode;try{sn(t,``),Vt=!0}catch(t){xf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Pl(e,t,r===null?t:r.memoizedProps)),a&1024&&(cu=!0);break;case 6:if(Au(t,e,n),Nu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Vt=!0}catch(t){xf(e,e.return,t)}}break;case 3:if(Vt=!1,eh=null,o=ju,ju=Am(t.containerInfo),Au(t,e,n),ju=o,Nu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Qh(t.containerInfo)}catch(t){xf(e,e.return,t)}cu&&(cu=!1,Pu(e)),Vt=!1;break;case 4:a=su,su=au,r=Ht(),o=ju,ju=Am(e.stateNode.containerInfo),Au(t,e,n),Nu(e),ju=o,Vt&&fu&&(pu=!0),Vt=r,su=a;break;case 12:Au(t,e,n),Nu(e);break;case 31:Au(t,e,n),Nu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 13:Au(t,e,n),Nu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(xd=ze()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=au,l=ou,u=su;au=c||o,su=u||o,ou=l||s,Au(t,e,n),ou=l,su=u,au=c,Nu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||au||ou||(t=s||ou,n=au,r=ou,au=o||au,ou=t,Ru(e,2),au=n,ou=r),!o&&su||vu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,ku(e,n))));break;case 19:Au(t,e,n),Nu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 30:a&512&&(ou||r===null||Dl(r,r.return)),a=Ht(),o=fu,s=(n&335544064)===n,c=e.memoizedProps,fu=s&&gi(c.default,c.update)!==`none`,Au(t,e,n),Nu(e),s&&r!==null&&Vt&&(e.flags|=4),fu=o,Vt=a;break;case 21:break;case 7:a&512&&(ou||r===null||Dl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Au(t,e,n),Nu(e)}}function Nu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Fl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ml(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(jl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Rl(e,Il(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(sn(l,``),n.flags&=-33),Rl(e,Il(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Ll(e,Il(e),u,s);break;default:throw Error(i(161))}}catch(t){xf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Eh=!0,t.reset(),Eh=!1),e=e.sibling}}function Fu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Iu(t,e),t=t.sibling;else iu(t,!1)}function Iu(e,t){var n=e.alternate;if(n===null)Xl(e,!1);else switch(e.tag){case 3:if(mu=du=!1,Wl(),Fu(t,e),!du&&!pu){if(e=Ul,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ip(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`})),mu=!0}Ul=null;break;case 5:Fu(t,e);break;case 4:r=du,du=!1,Fu(t,e),du&&(pu=!0),du=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Fu(t,e):Xl(e,!1));break;case 30:r=du,i=Wl(),du=!1,Fu(t,e),du&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=mi(a,o),o=mi(n.memoizedProps,o);var s=gi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Gl=0,t=ru(e,n,t,o,s,a,!0),Gl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Bd(e,e.memoizedProps.onUpdate),Ul=i):i!==null&&(i.push.apply(i,Ul),Ul=i),du=e.flags&32?!0:r;break;default:Fu(t,e)}}function Lu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_u(e,t.alternate,t),t=t.sibling}function Ru(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Cl(4,n,n.return),Ru(n,r);break;case 1:Dl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Tl(n,n.return,i),Ru(n,r);break;case 27:r&2&&Em(n.stateNode,n.type,n.memoizedProps);case 5:Dl(n,n.return),n.tag!==5&&n.tag!==27||Al(n),Ru(n,r);break;case 6:Al(n);break;case 26:Dl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||ou||i.parentNode.removeChild(i),Ru(n,r);break;case 22:n.memoizedState===null&&Ru(n,r);break;case 30:Dl(n,n.return),Ru(n,r);break;case 7:Dl(n,n.return);default:Ru(n,r)}e=e.sibling}}function zu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:zu(i,a,n),Sl(4,a);break;case 1:if(zu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){xf(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++)xo(l[i],c)}catch(e){xf(r,r.return,e)}}s&&o&64&&wl(a),El(a,a.return);break;case 27:n&2&&zl(a);case 5:a.tag!==5&&a.tag!==27||kl(a),zu(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 6:kl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||au||nh(Am(c.ownerDocument),a.type,c),zu(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 12:zu(i,a,n);break;case 31:zu(i,a,n),s&&o&4&&Eu(i,a);break;case 13:zu(i,a,n),s&&o&4&&Du(i,a);break;case 22:a.memoizedState===null&&zu(i,a,n),El(a,a.return);break;case 30:zu(i,a,n),El(a,a.return);break;case 7:El(a,a.return);default:zu(i,a,n)}t=t.sibling}}function Bu(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&&Aa(n))}function Vu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Aa(e))}function Hu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Uu(e,t,n,r),t=t.sibling;else i&&nu(t)}function Uu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&tu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Hu(e,t,n,r),a&2048&&Sl(9,t);break;case 1:Hu(e,t,n,r);break;case 3:Hu(e,t,n,r),i&&mu&&(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&&Aa(a)));break;case 12:if(a&2048){Hu(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){xf(t,t.return,e)}}else Hu(e,t,n,r);break;case 31:Hu(e,t,n,r);break;case 13:Hu(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&&tu(t),o._visibility&2?Hu(e,t,n,r):(o._visibility|=2,Wu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&tu(s),o._visibility&2?Hu(e,t,n,r):Gu(e,t)),a&2048&&Bu(s,t);break;case 24:Hu(e,t,n,r),a&2048&&Vu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Jl(a.child,!0),Jl(t.child,!0))),Hu(e,t,n,r);break;default:Hu(e,t,n,r)}}function Wu(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:Wu(a,o,s,c,i),Sl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Wu(a,o,s,c,i)):u._visibility&2?Wu(a,o,s,c,i):Gu(a,o),i&&l&2048&&Bu(o.alternate,o);break;case 24:Wu(a,o,s,c,i),i&&l&2048&&Vu(o.alternate,o);break;default:Wu(a,o,s,c,i)}t=t.sibling}}function Gu(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:Gu(n,r),i&2048&&Bu(r.alternate,r);break;case 24:Gu(n,r),i&2048&&Vu(r.alternate,r);break;default:Gu(n,r)}t=t.sibling}}var Ku=8192;function qu(e,t,n){if(e.subtreeFlags&Ku)for(e=e.child;e!==null;)Ju(e,t,n),e=e.sibling}function Ju(e,t,n){switch(e.tag){case 26:qu(e,t,n),e.flags&Ku&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&sh(n,e)):ch(n,ju,e.memoizedState,e.memoizedProps));break;case 5:qu(e,t,n),e.flags&Ku&&(e=e.stateNode,(t&335544128)===t&&sh(n,e));break;case 3:case 4:var r=ju;ju=Am(e.stateNode.containerInfo),qu(e,t,n),ju=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ku,Ku=16777216,qu(e,t,n),Ku=r):qu(e,t,n));break;case 30:if((e.flags&Ku)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Vl===null&&(Vl=new Map),Vl.set(r,i)}qu(e,t,n);break;default:qu(e,t,n)}}function Yu(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 Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];uu=r,$u(r,e)}Yu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zu(e),e=e.sibling}function Zu(e){switch(e.tag){case 0:case 11:case 15:Xu(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:Xu(e);break;case 12:Xu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qu(e)):Xu(e);break;default:Xu(e)}}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];uu=r,$u(r,e)}Yu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),Qu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Qu(t));break;default:Qu(t)}e=e.sibling}}function $u(e,t){for(;uu!==null;){var n=uu;switch(n.tag){case 0:case 11:case 15:Cl(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:Aa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,uu=r;else a:for(n=e;uu!==null;){r=uu;var i=r.sibling,a=r.return;if(xu(r),r===n){uu=null;break a}if(i!==null){i.return=a,uu=i;break a}uu=a}}}var ed={getCacheForType:function(e){var t=Ca(H),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ca(H).controller.signal}},td=typeof WeakMap==`function`?WeakMap:Map,nd=0,rd=null,id=null,ad=0,od=0,sd=null,cd=!1,ld=!1,ud=!1,dd=0,fd=0,pd=0,md=0,hd=0,gd=0,_d=0,vd=null,yd=null,bd=!1,xd=0,Sd=0,Cd=1/0,wd=null,Td=null,Ed=0,Dd=null,Od=null,kd=0,Ad=0,jd=null,Md=null,Nd=null,Pd=null,Fd=null,Id=0,Ld=null;function Rd(){return nd&2&&ad!==0?ad&-ad:L.T===null?V():Hf()}function zd(){if(gd===0){if(!(ad&536870912)||na){var e=et;et<<=1,!(et&3932160)&&(et=262144),gd=e}else gd=536870912}return e=Oo.current,e!==null&&(e.flags|=32),gd}function Bd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Wp(mi(e.memoizedProps,n))),Pd===null&&(Pd=[]),Pd.push(t.bind(null,r))}}function Vd(e,t,n){(e===rd&&(od===2||od===9)||e.cancelPendingCommit!==null)&&(Jd(e,0),Gd(e,ad,gd,!1)),lt(e,n),nd&2&&e===rd||(e===rd&&(!(nd&2)&&(md|=n),fd===4&&Gd(e,ad,gd,!1)),Pf(e))}function Hd(e,t,n){if(nd&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||it(e,t),a=r?nf(e,t):ef(e,t,!0),o=r;do{if(a===0){ld&&!r&&Gd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Wd(n))a=ef(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=vd;var l=c.current.memoizedState.isDehydrated;if(l&&(Jd(c,s).flags|=256),s=ef(c,s,!1),s!==2&&s!==6){if(ud&&!l){c.errorRecoveryDisabledLanes|=o,md|=o,a=4;break a}o=yd,yd=a,o!==null&&(yd===null?yd=o:yd.push.apply(yd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Jd(e,0),Gd(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:Gd(r,t,gd,!cd);break a;case 2:yd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=xd+300-ze(),10<a)){if(Gd(r,t,gd,!cd),rt(r,0,!0)!==0)break a;kd=t,r.timeoutHandle=Ep(Ud.bind(null,r,n,yd,wd,bd,t,gd,md,_d,cd,o,`Throttled`,-0,0),a);break a}Ud(r,n,yd,wd,bd,t,gd,md,_d,cd,o,null,-0,0)}break}}while(1);Pf(e)}function Ud(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:hn},Vl=null,Ju(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=fh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?xd-ze():(a&4194048)===a?Sd-ze():0,m=uh(d,m),m!==null)?(kd=a,e.cancelPendingCommit=m(uf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Gd(e,a,o,!l)):uf(e,t,a,n,r,i,o,s,c,l,u,d)}function Wd(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(!Rr(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 Gd(e,t,n,r){t=at(e,t),t&=~hd,t&=~md,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ye(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&dt(e,n,t)}function Kd(){return nd&6?!0:(Ff(0,!1),!1)}function qd(){if(id!==null){if(od===0)var e=id.return;else e=id,ha=ma=null,is(e),no=null,ro=0,e=id;for(;e!==null;)xl(e.alternate,e),e=e.return;id=null}}function Jd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Dp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),kd=0,qd(),rd=e,id=n=ji(e.current,null),ad=t,od=0,sd=null,cd=!1,ld=it(e,t),ud=!1,_d=gd=hd=md=pd=fd=0,yd=vd=null,bd=!1,dd=at(e,t),xi(),n}function Yd(e,t){Bo=null,L.H=mc,t===Ka||t===Ja?(t=eo(),od=3):t===qa?(t=eo(),od=4):od=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,sd=t,id===null&&(fd=1,Ec(e,zi(t,e.current)))}function Xd(){var e=Oo.current;return e===null?!0:(ad&4194048)===ad?ko===null:(ad&62914560)===ad||ad&536870912?e===ko:!1}function Zd(){var e=L.H;return L.H=mc,e===null?mc:e}function Qd(){var e=L.A;return L.A=ed,e}function $d(){fd=4,cd||(ad&4194048)!==ad&&Oo.current!==null||(ld=!0),!(pd&134217727)&&!(md&134217727)||rd===null||Gd(rd,ad,gd,!1)}function ef(e,t,n){var r=nd;nd|=2;var i=Zd(),a=Qd();(rd!==e||ad!==t)&&(wd=null,Jd(e,t)),t=!1;var o=fd;a:do try{if(od!==0&&id!==null){var s=id,c=sd;switch(od){case 8:qd(),o=6;break a;case 3:case 2:case 9:case 6:Oo.current===null&&(t=!0);var l=od;if(od=0,sd=null,sf(e,s,c,l),n&&ld){o=0;break a}break;default:l=od,od=0,sd=null,sf(e,s,c,l)}}tf(),o=fd;break}catch(t){Yd(e,t)}while(1);return t&&e.shellSuspendCounter++,ha=ma=null,nd=r,L.H=i,L.A=a,id===null&&(rd=null,ad=0,xi()),o}function tf(){for(;id!==null;)af(id)}function nf(e,t){var n=nd;nd|=2;var r=Zd(),a=Qd();rd!==e||ad!==t?(wd=null,Cd=ze()+500,Jd(e,t)):ld=it(e,t);a:do try{if(od!==0&&id!==null){t=id;var o=sd;b:switch(od){case 1:od=0,sd=null,sf(e,t,o,1);break;case 2:case 9:if(Xa(o)){od=0,sd=null,of(t);break}t=function(){od!==2&&od!==9||rd!==e||(od=7),Pf(e)},o.then(t,t);break a;case 3:od=7;break a;case 4:od=5;break a;case 7:Xa(o)?(od=0,sd=null,of(t)):(od=0,sd=null,sf(e,t,o,7));break;case 5:var s=null;switch(id.tag){case 26:s=id.memoizedState;case 5:case 27:var c=id;if(s?ah(s):c.stateNode.complete){od=0,sd=null;var l=c.sibling;if(l!==null)id=l;else{var u=c.return;u===null?id=null:(id=u,cf(u))}break b}}od=0,sd=null,sf(e,t,o,5);break;case 6:od=0,sd=null,sf(e,t,o,6);break;case 8:qd(),fd=6;break a;default:throw Error(i(462))}}rf();break}catch(t){Yd(e,t)}while(1);return ha=ma=null,L.H=r,L.A=a,nd=n,id===null?(rd=null,ad=0,xi(),fd):0}function rf(){for(;id!==null&&!Le();)af(id)}function af(e){var t=fl(e.alternate,e,dd);e.memoizedProps=e.pendingProps,t===null?cf(e):id=t}function of(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,ad);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,ad);break;case 5:is(t);var r=t;r===ea&&(na?(ca(r),r.tag===5&&r.stateNode!=null&&(ta=r.stateNode)):(ca(r),na=!0));default:xl(n,t),t=id=Mi(t,dd),t=fl(n,t,dd)}e.memoizedProps=e.pendingProps,t===null?cf(e):id=t}function sf(e,t,n,r){ha=ma=null,is(t),no=null,ro=0;var i=t.return;try{if(jc(e,i,t,n,ad)){fd=1,Ec(e,zi(n,e.current)),id=null;return}}catch(t){if(i!==null)throw id=i,t;fd=1,Ec(e,zi(n,e.current)),id=null;return}t.flags&32768?(na||r===1?e=!0:ld||ad&536870912?e=!1:(cd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),lf(t,e)):cf(t)}function cf(e){var t=e;do{if(t.flags&32768){lf(t,cd);return}e=t.return;var n=yl(t.alternate,t,dd);if(n!==null){id=n;return}if(t=t.sibling,t!==null){id=t;return}id=t=e}while(t!==null);fd===0&&(fd=5)}function lf(e,t){do{var n=bl(e.alternate,e);if(n!==null){n.flags&=32767,id=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){id=e;return}id=e=n}while(e!==null);fd=6,id=null}function uf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do vf();while(Ed!==0);if(nd&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===rd&&(id=rd=null,ad=0),Od=t,Dd=e,kd=n,jd=a,Md=r,df(e,t,n,s,c,l,f)}}function df(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Ad=s,s|=bi,ut(e,n,s,r,i,a),Pd=null,(n&335544064)===n?(Fd=Na(e),r=10262):(Fd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Df(He,function(){return yf(),null})):(e.callbackNode=null,e.callbackPriority=0),Bl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=L.T,L.T=null,i=fe.p,fe.p=2,a=nd,nd|=4;try{hu(e,t,n)}finally{nd=a,fe.p=i,L.T=r}}Ed=1,Bl?Nd=Hp(o,e.containerInfo,Fd,mf,hf,pf,gf,yf,ff,null,null):(mf(),hf(),gf())}function ff(e){if(Ed!==0){var t=Dd.onRecoverableError;t(e,{componentStack:null})}}function pf(){Ed===3&&(Ed=0,Iu(Od,Dd),Ed=4)}function mf(){if(Ed===1){Ed=0;var e=Dd,t=Od,n=kd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=L.T,L.T=null;var i=fe.p;fe.p=2;var a=nd;nd|=4;try{fu=pu=!1,Mu(t,e,n),n=vp;var o=Wr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ur(s.ownerDocument.documentElement,s)){if(c!==null&&Gr(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 _=Hr(s,h),v=Hr(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}}Eh=!!_p,vp=_p=null}finally{nd=a,fe.p=i,L.T=r}}e.current=t,Ed=2}}function hf(){if(Ed===2){Ed=0;var e=Dd,t=Od,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=L.T,L.T=null;var r=fe.p;fe.p=2;var i=nd;nd|=4;try{_u(e,t.alternate,t)}finally{nd=i,fe.p=r,L.T=n}}Ed=3}}function gf(){if(Ed===4||Ed===3){Ed=0;var e=Nd;Nd=null,Re();var t=Dd,n=Od,r=kd,i=Md,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Ed=5:(Ed=0,Od=Dd=null,_f(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Td=null),mt(r),n=n.stateNode,Je&&typeof Je.onCommitFiberRoot==`function`)try{Je.onCommitFiberRoot(qe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=L.T,a=fe.p,fe.p=2,L.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{L.T=n,fe.p=a}}if(i=Pd,o=Fd,Fd=null,i!==null&&(Pd=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);kd&3&&vf(),Pf(t),a=t.pendingLanes,r&261930&&a&42?t===Ld?Id++:(Id=0,Ld=t):(Id=0,Ld=null),Ff(0,!1)}}function _f(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Aa(t)))}function vf(){return Nd!==null&&(Nd.skipTransition(),Nd=null),mf(),hf(),gf(),yf()}function yf(){if(Ed!==5)return!1;var e=Dd,t=Ad;Ad=0;var n=mt(kd),r=L.T,a=fe.p;try{fe.p=32>n?32:n,L.T=null,n=jd,jd=null;var o=Dd,s=kd;if(Ed=0,Od=Dd=null,kd=0,nd&6)throw Error(i(331));var c=nd;if(nd|=4,Zu(o.current),Uu(o,o.current,s,n),nd=c,Ff(0,!1),Je&&typeof Je.onPostCommitFiberRoot==`function`)try{Je.onPostCommitFiberRoot(qe,o)}catch{}return!0}finally{fe.p=a,L.T=r,_f(e,t)}}function bf(e,t,n){t=zi(n,t),t=Oc(e.stateNode,t,2),e=ho(e,t,2),e!==null&&(lt(e,2),Pf(e))}function xf(e,t,n){if(e.tag===3)bf(e,e,n);else for(;t!==null;){if(t.tag===3){bf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Td===null||!Td.has(r))){e=zi(n,e),n=kc(2),r=ho(t,n,2),r!==null&&(Ac(n,r,t,e),lt(r,2),Pf(r));break}}t=t.return}}function Sf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new td;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)||(ud=!0,i.add(n),e=Cf.bind(null,e,t,n),t.then(e,e))}function Cf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,rd===e&&(ad&n)===n&&(fd===4||fd===3&&(ad&62914560)===ad&&300>ze()-xd?nd&2?hd|=n:Jd(e,0):hd|=n,_d===ad&&(_d=0)),Pf(e)}function wf(e,t){t===0&&(t=st()),e=wi(e,t),e!==null&&(lt(e,t),Pf(e))}function Tf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wf(e,n)}function Ef(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),wf(e,n)}function Df(e,t){return Fe(e,t)}var Of=null,kf=null,Af=!1,jf=!1,Mf=!1,Nf=0;function Pf(e){e!==kf&&e.next===null&&(kf===null?Of=kf=e:kf=kf.next=e),jf=!0,Af||(Af=!0,Vf())}function Ff(e,t){if(!Mf&&jf){Mf=!0;do for(var n=!1,r=Of;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-Ye(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Bf(r,a))}else a=ad,a=rt(r,r===rd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||it(r,a)||(n=!0,Bf(r,a))}r=r.next}while(n);Mf=!1}}function If(){Lf()}function Lf(){jf=Af=!1;var e=0;Nf!==0&&Tp()&&(e=Nf);for(var t=ze(),n=null,r=Of;r!==null;){var i=r.next,a=Rf(r,t);a===0?(r.next=null,n===null?Of=i:n.next=i,i===null&&(kf=n)):(n=r,(e!==0||a&3)&&(jf=!0)),r=i}Ed!==0&&Ed!==5||Ff(e,!1),Nf!==0&&(Nf=0)}function Rf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ye(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ot(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=rd,n=ad,n=rt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(od===2||od===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||it(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),mt(n)){case 2:case 8:n=R;break;case 32:n=He;break;case 268435456:n=We;break;default:n=He}return r=zf.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function zf(e,t){if(Ed!==0&&Ed!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(vf()&&e.callbackNode!==n)return null;var r=ad;return r=rt(e,e===rd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Hd(e,r,t),Rf(e,ze()),e.callbackNode!=null&&e.callbackNode===n?zf.bind(null,e):null)}function Bf(e,t){if(vf())return null;Hd(e,t,!0)}function Vf(){Ap(function(){nd&6?Fe(Ve,If):Lf()})}function Hf(){if(Nf===0){var e=Ia;e===0&&(e=$e,$e<<=1,!($e&261888)&&($e=256)),Nf=e}return Nf}function Uf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:mn(e)}function Wf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Uf((i[vt]||null).action),o=r.submitter;o&&(t=(t=o[vt]||null)?Uf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new In(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Nf!==0){var e=new FormData(i,o);ec(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ec(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Gf=0;Gf<di.length;Gf++){var Kf=di[Gf];fi(Kf.toLowerCase(),`on`+(Kf[0].toUpperCase()+Kf.slice(1)))}fi(ri,`onAnimationEnd`),fi(ii,`onAnimationIteration`),fi(ai,`onAnimationStart`),fi(`dblclick`,`onDoubleClick`),fi(`focusin`,`onFocus`),fi(`focusout`,`onBlur`),fi(oi,`onTransitionRun`),fi(si,`onTransitionStart`),fi(ci,`onTransitionCancel`),fi(li,`onTransitionEnd`),It(`onMouseEnter`,[`mouseout`,`mouseover`]),It(`onMouseLeave`,[`mouseout`,`mouseover`]),It(`onPointerEnter`,[`pointerout`,`pointerover`]),It(`onPointerLeave`,[`pointerout`,`pointerover`]),Ft(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ft(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ft(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ft(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var qf=`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(` `),Jf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(qf));function Yf(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){_i(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){_i(e)}i.currentTarget=null,a=c}}}}function Xf(e,t){var n=t[bt];n===void 0&&(n=t[bt]=new Set);var r=e+`__bubble`;n.has(r)||(ep(t,e,2,!1),n.add(r))}function Zf(e,t,n){var r=0;t&&(r|=4),ep(n,e,r,t)}var Qf=`_reactListening`+Math.random().toString(36).slice(2);function $f(e){if(!e[Qf]){e[Qf]=!0,Nt.forEach(function(t){t!==`selectionchange`&&(Jf.has(t)||Zf(t,!1,e),Zf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qf]||(t[Qf]=!0,Zf(`selectionchange`,!1,t))}}function ep(e,t,n,r){switch(Nh(t)){case 2:var i=Dh;break;case 8:i=Oh;break;default:i=kh}n=i.bind(null,t,n,e),i=void 0,!Tn||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 tp(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=Dt(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}Sn(function(){var r=a,i=_n(n),s=[];a:{var c=ui.get(e);if(c!==void 0){var l=In,u=e;switch(e){case`keypress`:if(jn(n)===0)break a;case`keydown`:case`keyup`:l=er;break;case`focusin`:u=`focus`,l=Gn;break;case`focusout`:u=`blur`,l=Gn;break;case`beforeblur`:case`afterblur`:l=Gn;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=Un;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=rr;break;case ri:case ii:case ai:l=Kn;break;case li:l=ir;break;case`scroll`:case`scrollend`:l=Rn;break;case`wheel`:l=ar;break;case`copy`:case`cut`:case`paste`:l=qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=tr;break;case`submit`:l=nr;break;case`toggle`:case`beforetoggle`:l=or}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=Cn(m,p),g!=null&&d.push(np(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!==gn&&(u=n.relatedTarget||n.fromElement)&&(Dt(u)||u[yt]))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?Dt(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=Un,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=tr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:kt(c),h=l==null?u:kt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Dt(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,ip):null,c!==null&&ap(s,u,c,d,!1),l!==null&&f!==null&&ap(s,f,l,d,!0)))}a:{if(c=r?kt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Er;else if(br(c)){if(Dr)_=Ir;else{_=Pr;var v=Nr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&dn(r.elementType)&&(_=Er):_=Fr;if(_&&=_(e,r)){xr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?kt(r):window,e){case`focusin`:(br(v)||v.contentEditable===`true`)&&(qr=v,Jr=r,Yr=null);break;case`focusout`:Yr=Jr=qr=null;break;case`mousedown`:Xr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Xr=!1,Zr(s,n,i);break;case`selectionchange`:if(Kr)break;case`keydown`:case`keyup`:Zr(s,n,i)}var y;if(cr)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 gr?mr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(dr&&n.locale!==`ko`&&(gr||b!==`onCompositionStart`?b===`onCompositionEnd`&&gr&&(y=An()):(Dn=i,On=`value`in Dn?Dn.value:Dn.textContent,gr=!0)),v=rp(r,b),0<v.length&&(b=new Jn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=hr(n),y!==null&&(b.data=y)))),(y=ur?_r(e,n):vr(e,n))&&(b=rp(r,`onBeforeInput`),0<b.length&&(v=new Jn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Wf(s,e,r,n,i)}Yf(s,t)})}function np(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rp(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=Cn(e,n),i!=null&&r.unshift(np(e,i,a)),i=Cn(e,t),i!=null&&r.push(np(e,i,a))),e.tag===3)return r;e=e.return}return[]}function ip(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ap(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=Cn(n,a),l!=null&&o.unshift(np(n,l,c))):i||(l=Cn(n,a),l!=null&&o.push(np(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var op=/\r\n?/g,sp=/\u0000|\uFFFD/g;function cp(e){return(typeof e==`string`?e:``+e).replace(op,`
50
+ `).replace(sp,``)}function lp(e,t){return t=cp(t),cp(e)===t}function up(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||sn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&sn(e,``+r);else return;break;case`className`:Wt(e,`class`,r);break;case`tabIndex`:Wt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Wt(e,n,r);break;case`style`:un(e,r,o);return;case`data`:if(t!==`object`){Wt(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=mn(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`&&up(e,t,`name`,a.name,a,null),up(e,t,`formEncType`,a.formEncType,a,null),up(e,t,`formMethod`,a.formMethod,a,null),up(e,t,`formTarget`,a.formTarget,a,null)):(up(e,t,`encType`,a.encType,a,null),up(e,t,`method`,a.method,a,null),up(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=mn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=hn);return;case`onScroll`:r!=null&&Xf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Xf(`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=mn(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`:Xf(`beforetoggle`,e),Xf(`toggle`,e),Ut(e,`popover`,r);break;case`xlinkActuate`:Gt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Gt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Gt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Gt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Gt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Gt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Gt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Gt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Gt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ut(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=fn.get(n)||n,Ut(e,n,r);else return}Vt=!0}function dp(e,t,n,r,a,o){switch(n){case`style`:un(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`)sn(e,r);else if(typeof r==`number`||typeof r==`bigint`)sn(e,``+r);else return;break;case`onScroll`:r!=null&&Xf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Xf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=hn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Pt.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[vt]||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}Vt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ut(e,n,r)}return}Vt=!0}function fp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Xf(`error`,e),Xf(`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:up(e,t,o,s,n,null)}}a&&up(e,t,`srcSet`,n.srcSet,n,null),r&&up(e,t,`src`,n.src,n,null);return;case`input`:Xf(`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:up(e,t,r,d,n,null)}}tn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Xf(`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:up(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&rn(e,!!r,n,!0):rn(e,!!r,t,!1);return;case`textarea`:for(s in Xf(`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:up(e,t,s,c,n,null)}on(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:up(e,t,l,r,n,null)}return;case`dialog`:Xf(`beforetoggle`,e),Xf(`toggle`,e),Xf(`cancel`,e),Xf(`close`,e);break;case`iframe`:case`object`:Xf(`load`,e);break;case`video`:case`audio`:for(r=0;r<qf.length;r++)Xf(qf[r],e);break;case`image`:Xf(`error`,e),Xf(`load`,e);break;case`details`:Xf(`toggle`,e);break;case`embed`:case`source`:case`link`:Xf(`error`,e),Xf(`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:up(e,t,u,r,n,null)}return;default:if(dn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&dp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&up(e,t,c,r,n,null))}var pp={};function mp(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)||up(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&&(Vt=!0),o=m;break;case`name`:m!==f&&(Vt=!0),a=m;break;case`checked`:m!==f&&(Vt=!0),u=m;break;case`defaultChecked`:m!==f&&(Vt=!0),d=m;break;case`value`:m!==f&&(Vt=!0),s=m;break;case`defaultValue`:m!==f&&(Vt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&up(e,t,p,m,r,f)}}en(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)||up(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&&(Vt=!0),p=o;break;case`defaultValue`:o!==l&&(Vt=!0),c=o;break;case`multiple`:o!==l&&(Vt=!0),s=o;default:o!==l&&up(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?rn(e,!!n,n?[]:``,!1):rn(e,!!n,t,!0)):rn(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:up(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&&(Vt=!0),p=a;break;case`defaultValue`:a!==o&&(Vt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&up(e,t,s,a,r,o)}an(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:up(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&&(Vt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:up(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)&&up(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:up(e,t,u,p,r,m)}return;default:if(dn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&dp(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||dp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&up(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||up(e,t,f,p,r,m)}function hp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function gp(){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&&hp(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&&hp(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 _p=null,vp=null;function yp(e){return e.nodeType===9?e:e.ownerDocument}function bp(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 xp(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 Sp(e,t,n,r){return n=yp(n).createElement(e),n[_t]=r,n[vt]=t,fp(n,e,t),jt(n),n}function Cp(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 wp=null;function Tp(){var e=window.event;return e&&e.type===`popstate`?e!==wp&&(wp=e,!0):(wp=null,!1)}var Ep=typeof setTimeout==`function`?setTimeout:void 0,Dp=typeof clearTimeout==`function`?clearTimeout:void 0,Op=typeof Promise==`function`?Promise:void 0,kp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Ep,Ap=typeof queueMicrotask==`function`?queueMicrotask:Op===void 0?Ep:function(e){return Op.resolve(null).then(e).catch(jp)};function jp(e){setTimeout(function(){throw e})}function Mp(e){return e===`head`}function Np(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`)Dm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Dm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[wt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Dm(e.ownerDocument.body)}n=i}while(n);Qh(t)}function Pp(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 Fp(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 Ip(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 Lp(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 Rp(e){return Lp(e.getBoundingClientRect(),getComputedStyle(e),e)}function zp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Lp(t,n,e)}function Bp(e){return e.documentElement.clientHeight}function Vp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Hp(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`&&(Bp(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+=oh(f),u>lh){s.length=o;break}f=new Promise(Vp.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 Up(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Up.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Up.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},Up.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Wp(e){return{name:e,group:new Up(`group`,e),imagePair:new Up(`image-pair`,e),old:new Up(`old`,e),new:new Up(`new`,e)}}function Gp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Gp.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(Xp(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=Jp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Kp,e,s,r)}this._eventListeners=a}};function Kp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Gp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Xp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Jp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,qp,e,n,i),r.splice(t,1),a!==null&&a()}};function qp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Jp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Yp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Xp(e,t,n,r){if(e.length===0)return-1;r=Yp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Yp(a.optionsOrUseCapture)===r)return i}return-1}Gp.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,Jp(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,Jp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Gp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Zp,e,void 0,void 0)};function Zp(e,t){return e.tag!==6&&(e=v(e),Cm(e,t))}Gp.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&&!Zp(t[n],e);n--);};function Qp(e,t){return t.push(e),!1}Gp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=yp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,$p,e,void 0,void 0))};function $p(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Gp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,em,e,void 0,void 0)};function em(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}Gp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,tm,e,void 0,void 0);for(var n=t=0;n<nm.length;n++){var r=nm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):nm[t++]=r}nm.length=t}};function tm(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var nm=[],rm=!1;function im(e,t,n){nm.push({fragmentInstance:e,observer:t,instance:n}),rm||(rm=!0,wm(function(){rm=!1;var e=nm;nm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Gp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,am,e,void 0,void 0),e};function am(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}Gp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Gp.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||om(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function om(e,t,n,r,i){var a=Dt(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 sm(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)}Gp.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),sm(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),sm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function cm(e,t){return e=v(e),lm(e,t),!1}function lm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function um(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,Jp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<nm.length;i++){var a=nm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(nm[r++]=a)}nm.length=r,n.observe(e)}),lm(e,t))}function dm(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,Jp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?im(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function fm(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`:fm(n),Et(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function pm(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[wt])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=ym(e.nextSibling),e===null)break}return null}function mm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=ym(e.nextSibling),e===null))return null;return e}function hm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=ym(e.nextSibling),e===null))return null;return e}function gm(e){return e.data===`$?`||e.data===`$~`}function _m(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function vm(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 ym(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 bm=null;function xm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return ym(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Sm(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 Cm(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 wm(e){kp(function(){kp(function(t){return e(t)})})}function Tm(e,t,n){switch(t=yp(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 Em(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&up(e,t,r,null,pp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===hn&&(e.onclick=null),Et(e)}function Dm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Et(e)}var Om=new Map,km=new Set;function Am(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 jm=fe.d;fe.d={f:Mm,r:Nm,D:Im,C:Lm,L:Rm,m:zm,X:Vm,S:Bm,M:Hm};function Mm(){var e=jm.f(),t=Kd();return e||t}function Nm(e){var t=Ot(e);t!==null&&t.tag===5&&t.type===`form`?nc(t):jm.r(e)}var Pm=typeof document>`u`?null:document;function Fm(e,t,n){var r=Pm;if(r&&typeof t==`string`&&t){var i=Qt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),km.has(i)||(km.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),fp(t,`link`,e),jt(t),r.head.appendChild(t)))}}function Im(e){jm.D(e),Fm(`dns-prefetch`,e,null)}function Lm(e,t){jm.C(e,t),Fm(`preconnect`,e,t)}function Rm(e,t,n){jm.L(e,t,n);var r=Pm;if(r&&e&&t){var i=`link[rel="preload"][as="`+Qt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Qt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Qt(n.imageSizes)+`"]`)):i+=`[href="`+Qt(e)+`"]`;var a=i;switch(t){case`style`:a=Wm(e);break;case`script`:a=Jm(e)}if(!(Om.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Om.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gm(a))||t===`script`&&r.querySelector(Ym(a))))){var o=r.createElement(`link`);fp(o,`link`,e),t===`style`&&(o[Tt]=!0,o.onload=o.onerror=function(){Mt(o)}),jt(o),r.head.appendChild(o)}}}function zm(e,t){jm.m(e,t);var n=Pm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Qt(r)+`"][href="`+Qt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jm(e)}if(!Om.has(a)&&(e=T({rel:`modulepreload`,href:e},t),Om.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ym(a)))return}r=n.createElement(`link`),fp(r,`link`,e),jt(r),n.head.appendChild(r)}}}function Bm(e,t,n){jm.S(e,t,n);var r=Pm;if(r&&e){var i=At(r).hoistableStyles,a=Wm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Om.get(a))&&Qm(e,n);var c=o=r.createElement(`link`);jt(c),fp(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,Zm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vm(e,t){jm.X(e,t);var n=Pm;if(n&&e){var r=At(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=T({src:e,async:!0},t),(t=Om.get(i))&&$m(e,t),a=n.createElement(`script`),jt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hm(e,t){jm.M(e,t);var n=Pm;if(n&&e){var r=At(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=Om.get(i))&&$m(e,t),a=n.createElement(`script`),jt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Um(e,t,n,r){var a=(a=xe.current)?Am(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=Wm(n.href),t=At(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=Wm(n.href);var o=At(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(Gm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Om.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},Om.set(e,o)),qm(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=Jm(n),t=At(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 Wm(e){return`href="`+Qt(e)+`"`}function Gm(e){return`link[rel="stylesheet"][`+e+`]`}function Km(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function qm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Tt]){r.loading=1;return}}else t=e.createElement(`link`),t[Tt]=!0,t.onload=t.onerror=Mt.bind(null,t),fp(t,`link`,n),jt(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 Jm(e){return`[src="`+Qt(e)+`"]`}function Ym(e){return`script[async]`+e}function Xm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Qt(n.href)+`"]`);if(r)return t.instance=r,jt(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`),jt(r),fp(r,`style`,a),Zm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wm(n.href);var o=e.querySelector(Gm(a));if(o)return t.state.loading|=4,t.instance=o,jt(o),o;r=Km(n),(a=Om.get(a))&&Qm(r,a),o=(e.ownerDocument||e).createElement(`link`),jt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),fp(o,`link`,r),t.state.loading|=4,Zm(o,n.precedence,e),t.instance=o;case`script`:return o=Jm(n.src),(a=e.querySelector(Ym(o)))?(t.instance=a,jt(a),a):(r=n,(a=Om.get(o))&&(r=T({},n),$m(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),jt(a),fp(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,Zm(r,n.precedence,e));return t.instance}function Zm(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 $m(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var eh=null;function th(e,t,n){if(eh===null){var r=new Map,i=eh=new Map;i.set(n,r)}else i=eh,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[wt]||a[_t]||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 nh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rh(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 ih(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function ah(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function oh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function sh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=oh(t),e.suspenseyImages.push(t)),e=ph.bind(e),t.decode().then(e,e))}function ch(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=Wm(r.href),a=t.querySelector(Gm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=fh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,jt(a);return}a=t.ownerDocument||t,r=Km(r),(i=Om.get(i))&&Qm(r,i),a=a.createElement(`link`),jt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),fp(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=fh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var lh=0;function uh(e,t){return e.stylesheets&&e.count===0&&hh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&hh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&lh===0&&(lh=62500*gp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>lh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function dh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)hh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function fh(){this.count--,dh(this)}function ph(){this.imgCount--,dh(this)}var mh=null;function hh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mh=new Map,t.forEach(gh,e),mh=null,fh.call(e))}function gh(e,t){if(!(t.state.loading&4)){var n=mh.get(e);if(n)var r=n.get(null);else{n=new Map,mh.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=fh.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 _h={$$typeof:N,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function vh(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=ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ct(0),this.hiddenUpdates=ct(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 yh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new vh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ki(3,null,null,t),e.current=a,a.stateNode=e,t=ka(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},fo(a),e}function bh(e){return e?(e=Di,e):Di}function xh(e,t,n,r,i,a){i=bh(i),r.context===null?r.context=i:r.pendingContext=i,r=mo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=ho(e,r,t),n!==null&&(Vd(n,e,t),go(n,e,t))}function Sh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ch(e,t){Sh(e,t),(e=e.alternate)&&Sh(e,t)}function wh(e){if(e.tag===13||e.tag===31){var t=wi(e,67108864);t!==null&&Vd(t,e,67108864),Ch(e,67108864)}}function Th(e){if(e.tag===13||e.tag===31){var t=Rd();t=pt(t);var n=wi(e,t);n!==null&&Vd(n,e,t),Ch(e,t)}}var Eh=!0;function Dh(e,t,n,r){var i=L.T;L.T=null;var a=fe.p;try{fe.p=2,kh(e,t,n,r)}finally{fe.p=a,L.T=i}}function Oh(e,t,n,r){var i=L.T;L.T=null;var a=fe.p;try{fe.p=8,kh(e,t,n,r)}finally{fe.p=a,L.T=i}}function kh(e,t,n,r){if(Eh){var i=Ah(r);if(i===null)tp(e,t,r,jh,n),Hh(e,r);else if(Wh(i,e,t,n,r))r.stopPropagation();else if(Hh(e,r),t&4&&-1<Vh.indexOf(e)){for(;i!==null;){var a=Ot(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=nt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ye(o);s.entanglements[1]|=c,o&=~c}Pf(a),!(nd&6)&&(Cd=ze()+500,Ff(0,!1))}}break;case 31:case 13:s=wi(a,2),s!==null&&Vd(s,a,2),Kd(),Ch(a,2)}if(a=Ah(r),a===null&&tp(e,t,r,jh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else tp(e,t,r,null,n)}}function Ah(e){return e=_n(e),Mh(e)}var jh=null;function Mh(e){if(jh=null,e=Dt(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 jh=e,null}function Nh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case R:return 8;case He:case Ue:return 32;case We:return 268435456;default:return 32}default:return 32}}var Ph=!1,Fh=null,Ih=null,Lh=null,Rh=new Map,zh=new Map,Bh=[],Vh=`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 Hh(e,t){switch(e){case`focusin`:case`focusout`:Fh=null;break;case`dragenter`:case`dragleave`:Ih=null;break;case`mouseover`:case`mouseout`:Lh=null;break;case`pointerover`:case`pointerout`:Rh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:zh.delete(t.pointerId)}}function Uh(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=Ot(t),t!==null&&wh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Wh(e,t,n,r,i){switch(t){case`focusin`:return Fh=Uh(Fh,e,t,n,r,i),!0;case`dragenter`:return Ih=Uh(Ih,e,t,n,r,i),!0;case`mouseover`:return Lh=Uh(Lh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Rh.set(a,Uh(Rh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,zh.set(a,Uh(zh.get(a)||null,e,t,n,r,i)),!0}return!1}function Gh(e){var t=Dt(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,ht(e.priority,function(){Th(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ht(e.priority,function(){Th(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 Kh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ah(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);gn=r,n.target.dispatchEvent(r),gn=null}else return t=Ot(n),t!==null&&wh(t),e.blockedOn=n,!1;t.shift()}return!0}function qh(e,t,n){Kh(e)&&n.delete(t)}function Jh(){Ph=!1,Fh!==null&&Kh(Fh)&&(Fh=null),Ih!==null&&Kh(Ih)&&(Ih=null),Lh!==null&&Kh(Lh)&&(Lh=null),Rh.forEach(qh),zh.forEach(qh)}function Yh(e,n){e.blockedOn===n&&(e.blockedOn=null,Ph||(Ph=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Jh)))}var Xh=null;function Zh(e){Xh!==e&&(Xh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Xh===e&&(Xh=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(Mh(r||n)===null)continue;break}var a=Ot(n);a!==null&&(e.splice(t,3),t-=3,ec(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Qh(e){function t(t){return Yh(t,e)}Fh!==null&&Yh(Fh,e),Ih!==null&&Yh(Ih,e),Lh!==null&&Yh(Lh,e),Rh.forEach(t),zh.forEach(t);for(var n=0;n<Bh.length;n++){var r=Bh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Bh.length&&(n=Bh[0],n.blockedOn===null);)Gh(n),n.blockedOn===null&&Bh.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[vt]||null;if(typeof a==`function`)o||Zh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[vt]||null)s=o.formAction;else if(Mh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Zh(n)}}}function $h(){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 eg(e){this._internalRoot=e}tg.prototype.render=eg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;xh(n,Rd(),e,t,null,null)},tg.prototype.unmount=eg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xh(e.current,2,null,e,null,null),Kd(),t[yt]=null}};function tg(e){this._internalRoot=e}tg.prototype.unstable_scheduleHydration=function(e){if(e){var t=V();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Bh.length&&t!==0&&t<Bh[n].priority;n++);Bh.splice(n,0,e),n===0&&Gh(e)}};var ng=n.version;if(ng!==`19.3.1`)throw Error(i(527,ng,`19.3.1`));fe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var rg={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:L,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var ig=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ig.isDisabled&&ig.supportsFiber)try{qe=ig.inject(rg),Je=ig}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Cc,s=wc,c=Tc;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=yh(e,1,!1,null,null,n,r,null,o,s,c,$h),e[yt]=t.current,$f(e),new eg(t)}})),r_=s(((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=n_()})),i_=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,a_=/^[\\/]{2}/;function o_(e,t){return t+e.replace(/\\/g,`/`)}var s_=`popstate`;function c_(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function l_(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return m_(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:h_(t)}return __(t,n,null,e)}function u_(e,t){if(e===!1||e==null)throw Error(t)}function d_(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function f_(){return Math.random().toString(36).substring(2,10)}function p_(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function m_(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?g_(t):t,state:n,key:t&&t.key||r||f_(),mask:i}}function h_({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function g_(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function __(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=c_(e)?e:m_(h.location,e,t);n&&n(r,e),l=u()+1;let d=p_(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=c_(e)?e:m_(h.location,e,t);n&&n(r,e),l=u();let i=p_(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return v_(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(s_,d),c=e,()=>{i.removeEventListener(s_,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function v_(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),u_(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:h_(t);return i=i.replace(/ $/,`%20`),!n&&a_.test(i)&&(i=r+i),new URL(i,r)}function y_(e,t,n=`/`){return b_(e,t,n,!1)}function b_(e,t,n,r,i){let a=R_((typeof t==`string`?g_(t):t).pathname||`/`,n);if(a==null)return null;let o=i??x_(e),s=null,c=L_(a);for(let e=0;s==null&&e<o.length;++e)s=N_(o[e],c,r);return s}function x_(e){let t=S_(e);return tee(t),t}function S_(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;u_(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=K_([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(u_(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),S_(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:j_(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=I_(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of C_(e.path))a(e,t,!0,n)}),t}function C_(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=C_(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function tee(e){e.sort((e,t)=>e.score===t.score?M_(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var nee=/^:[\w-]+$/,ree=/^:[\w-]+/,w_=3.5,T_=3,E_=2,D_=1,O_=10,k_=-2,A_=e=>e===`*`;function j_(e,t){let n=e.split(`/`),r=n.length;return n.some(A_)&&(r+=k_),t&&(r+=E_),n.filter(e=>!A_(e)).reduce((e,t)=>e+(nee.test(t)?T_:ree.test(t)?w_:t===``?D_:O_),r)}function M_(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function N_(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?F_(u,l,s.matcher,s.compiledParams):P_(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=P_({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:K_([a,d.pathname]),pathnameBase:J_(K_([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=K_([a,d.pathnameBase]))}return o}function P_(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=I_(e.path,e.caseSensitive,e.end);return F_(e,t,n,r)}function F_(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=q_(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=q_(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function I_(e,t=!1,n=!0){d_(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/((?:[^/?()[\]*^\\]|\\.)+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function L_(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return d_(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function R_(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function z_(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?g_(e):e,a;return n?(n=G_(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?B_(n.substring(1),`/`):B_(n,t)):a=t,{pathname:a,search:Y_(r),hash:X_(i)}}function B_(e,t){let n=q_(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function V_(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function H_(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function U_(e){let t=H_(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function W_(e,t,n,r=!1){let i;typeof e==`string`?i=g_(e):(i={...e},u_(!i.pathname||!i.pathname.includes(`?`),V_(`?`,`pathname`,`search`,i)),u_(!i.pathname||!i.pathname.includes(`#`),V_(`#`,`pathname`,`hash`,i)),u_(!i.search||!i.search.includes(`#`),V_(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=z_(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var G_=e=>e.replace(/[\\/]{2,}/g,`/`),K_=e=>G_(e.join(`/`));function q_(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var J_=e=>q_(e).replace(/^\/*/,`/`),Y_=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,X_=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Z_=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Q_(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function $_(e){return K_(e.map(e=>e.route.path).filter(Boolean))||`/`}var ev=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function tv(e,t){let n=e;if(typeof n!=`string`||!i_.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(ev)try{let e=new URL(window.location.href),r=a_.test(n)?new URL(o_(n,e.protocol)):new URL(n),a=R_(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{d_(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var nv=new URL(`http://localhost`);function rv(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),nv)}catch{return nv}}function iv(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function av(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function ov(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!iv(i,n),s=!iv(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!av(e,i)||!iv(i,a)))throw Error(`External navigation is not allowed`)}var sv=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(sv);var cv=[`GET`,...sv];new Set(cv);var lv=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function uv(e){try{return lv.includes(new URL(e).protocol)}catch{return!1}}var dv=h.createContext(null);dv.displayName=`DataRouter`;var fv=h.createContext(null);fv.displayName=`DataRouterState`;var pv=h.createContext(null);pv.displayName=`DataRouterData`;var mv=h.createContext(null);mv.displayName=`DataRouterNavigation`;var hv=h.createContext(!1);function gv(){return h.useContext(hv)}var _v=h.createContext({isTransitioning:!1});_v.displayName=`ViewTransition`;var vv=h.createContext(null);vv.displayName=`Fetchers`;var yv=h.createContext(null);yv.displayName=`Await`;var bv=h.createContext(null);bv.displayName=`Navigation`;var xv=h.createContext(null);xv.displayName=`Location`;var Sv=h.createContext({outlet:null,matches:[],isDataRoute:!1});Sv.displayName=`Route`;var Cv=h.createContext(!1);Cv.displayName=`IsDataRoute`;var wv=h.createContext(void 0);wv.displayName=`RouteId`;var Tv=h.createContext(null);Tv.displayName=`RouteError`;var Ev=`REACT_ROUTER_ERROR`,Dv=`REDIRECT`,Ov=`ROUTE_ERROR_RESPONSE`;function kv(e){if(e.startsWith(`${Ev}:${Dv}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Av(e){if(e.startsWith(`${Ev}:${Ov}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Z_(t.status,t.statusText,t.data)}catch{}}function jv(e,{relative:t}={}){u_(Mv(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=h.useContext(bv),{hash:i,pathname:a,search:o}=Lv(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:K_([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Mv(){return h.useContext(xv)!=null}function Nv(){return u_(Mv(),`useLocation() may be used only in the context of a <Router> component.`),h.useContext(xv).location}var Pv=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Fv(){return h.useContext(Cv)?oee():Iv()}function Iv(){u_(Mv(),`useNavigate() may be used only in the context of a <Router> component.`);let e=h.useContext(dv),{basename:t,navigator:n}=h.useContext(bv),{matches:r}=h.useContext(Sv),{pathname:i}=Nv(),a=JSON.stringify(U_(r)),o=h.useRef(!1);return h.useLayoutEffect(()=>{o.current=!0}),h.useCallback((r,s={})=>{if(d_(o.current,Pv),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=W_(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:K_([t,c.pathname])),ov(typeof r==`string`?r:h_(r),n.createHref(c),rv(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}h.createContext(null);function Lv(e,{relative:t}={}){let{matches:n}=h.useContext(Sv),{pathname:r}=Nv(),i=JSON.stringify(U_(n));return h.useMemo(()=>W_(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Rv(e,t){return zv(e,t)}function zv(e,t,n){u_(Mv(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=h.useContext(bv),{matches:i}=h.useContext(Sv),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=Nv(),l;if(t){let e=typeof t==`string`?g_(t):t;u_(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):y_(e,{pathname:d});let p=Kv(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:K_([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:K_([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?h.createElement(xv.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function Bv(){let e=aee(),t=Q_(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return h.createElement(h.Fragment,null,h.createElement(`h2`,null,`Unexpected Application Error!`),h.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?h.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Vv=h.createElement(Bv,null),Hv=class extends h.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=hv;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Av(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:h.createElement(Sv.Provider,{value:this.props.routeContext},h.createElement(Cv.Provider,{value:this.props.routeContext.isDataRoute},h.createElement(wv.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},h.createElement(Tv.Provider,{value:e,children:this.props.component}))));return this.context?h.createElement(Wv,{error:e},t):t}},Uv=new WeakMap;function Wv({children:e,error:t}){let{basename:n,navigator:r}=h.useContext(bv);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=kv(t.digest);if(e){let i=Uv.get(t);if(i)throw i;let a=tv(e.location,n),o=a.absoluteURL||a.to;if(ov(e.location,o,rv(r),`allow-explicit`),uv(o))throw Error(`Invalid redirect location`);if(ev&&!Uv.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Uv.set(t,n),n}}return h.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Gv({routeContext:e,match:t,children:n}){let r=h.useContext(dv);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(Sv.Provider,{value:e},h.createElement(Cv.Provider,{value:e.isDataRoute},h.createElement(wv.Provider,{value:t.route.id},n)))}function Kv(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);u_(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:$_(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Vv,o&&(s<0&&c===0?(see(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?f:d?p:n.route.Component?h.createElement(n.route.Component,null):n.route.element?n.route.element:e,h.createElement(Gv,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?h.createElement(Hv,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):g()},null)}function qv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jv(e){let t=h.useContext(dv);return u_(t,qv(e)),t}function iee(e){let t=h.useContext(fv);return u_(t,qv(e)),t}function Yv(e){let t=h.useContext(pv);return u_(t,qv(e)),t}function Xv(e){let t=h.useContext(wv);return u_(t,`${e} can only be used on routes that contain a unique "id"`),t}function aee(){let e=h.useContext(Tv),t=Yv(`useRouteError`),n=Xv(`useRouteError`);return e===void 0?t.errors?.[n]:e}function oee(){let{router:e}=Jv(`useNavigate`),t=Xv(`useNavigate`),n=h.useRef(!1);return h.useLayoutEffect(()=>{n.current=!0}),h.useCallback(async(r,i={})=>{d_(n.current,Pv),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Zv={};function see(e,t,n){!t&&!Zv[e]&&(Zv[e]=!0,d_(!1,n))}function cee(e,t){if(e===!1||e==null)throw Error(t)}function Qv(e,t,n){let r=typeof e==`string`?new URL(e,n??(typeof window>`u`?`server://singlefetch/`:window.location.origin)):new URL(e);return n&&r.origin!==n&&(r=new URL(r.pathname+r.search+r.hash,n)),r.pathname.endsWith(`/`)?r.pathname=`${r.pathname}_.${t}`:r.pathname=`${r.pathname}.${t}`,r}async function lee(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function uee(e){return e!=null&&typeof e.page==`string`}function dee(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function fee(e,t,n){return ry((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await lee(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(dee).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function $v(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function ey(e,t,{includeHydrateFallback:n}={}){return ty(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function ty(e){return[...new Set(e)]}function ny(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ry(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!uee(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(ny(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var iy=h.createContext(void 0);iy.displayName=`FrameworkContext`;function ay(){let e=h.useContext(iy);return cee(e,`You must render this element inside a <HydratedRouter> element`),e}function oy(e,t){let n=h.useContext(iy),[r,i]=h.useState(!1),[a,o]=h.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=h.useRef(null);h.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),h.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:sy(s,p),onBlur:sy(c,m),onMouseEnter:sy(l,p),onMouseLeave:sy(u,m),onTouchStart:sy(d,p)}]:[a,f,{}]:[!1,f,{}]}function sy(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function cy({page:e,...t}){let n=gv(),{nonce:r}=ay(),{router:i}=Jv(`PrefetchPageLinks`),a=h.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?h.createElement(uy,{page:e,matches:a,...t}):h.createElement(dy,{page:e,matches:a,...t})):null}function ly(e){let{manifest:t,routeModules:n}=ay(),[r,i]=h.useState([]);return h.useEffect(()=>{let r=!1;return fee(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function uy({page:e,matches:t,...n}){let r=Nv(),{unstable_apiServerOrigin:i}=ay(),a=h.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Qv(e,`rsc`,i),a=!1,o=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?a=!0:o.push(e.route.id);return a&&o.length>0&&n.searchParams.set(`_routes`,o.join(`,`)),[i?n.toString():n.pathname+n.search]},[e,r,t,i]);return h.createElement(h.Fragment,null,a.map(e=>h.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function dy({page:e,matches:t,...n}){let r=Nv(),{manifest:i,routeModules:a,unstable_apiServerOrigin:o}=ay(),{matches:s}=iee(`PrefetchPageLinks`),{loaderData:c}=Yv(`PrefetchPageLinks`),l=h.useMemo(()=>$v(e,t,s,i,r,`data`),[e,t,s,i,r]),u=h.useMemo(()=>$v(e,t,s,i,r,`assets`),[e,t,s,i,r]),d=h.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!l.some(t=>t.route.id===e.route.id)&&e.route.id in c&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let u=Qv(e,`data`,o);return s&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[o?u.toString():u.pathname+u.search]},[c,r,i,l,t,e,a,o]),f=h.useMemo(()=>ey(u,i),[u,i]),p=ly(u);return h.createElement(h.Fragment,null,d.map(e=>h.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),f.map(e=>h.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),p.map(({key:e,link:t})=>h.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function fy(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}h.memo(py);function py({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=h.useContext(dv);u_(a,`You must render this element inside a <DataRouterContext.Provider> element`);let o=h.useContext(iy)?.routeDiscoveryRuntime;return h.useEffect(()=>{n.initialized&&o?.markReady()},[n.initialized,o]),zv(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function my({to:e,replace:t,state:n,relative:r}){u_(Mv(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=h.useContext(bv);d_(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=h.useContext(Sv),{pathname:s}=Nv(),c=Fv(),l=W_(e,U_(o),s,r===`path`);ov(typeof e==`string`?e:h_(e),a.createHref(l),rv(a),`reject`);let u=JSON.stringify(l);return h.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function hy(e){u_(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function gy({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){u_(!Mv(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=h.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=g_(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,g=h.useMemo(()=>{let e=R_(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return d_(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:h.createElement(bv.Provider,{value:c},h.createElement(xv.Provider,{children:t,value:g}))}function _y({children:e,location:t}){return Rv(vy(e),t)}h.Component;function vy(e,t=[]){let n=[];return h.Children.forEach(e,(e,r)=>{if(!h.isValidElement(e))return;let i=[...t,r];if(e.type===h.Fragment){n.push.apply(n,vy(e.props.children,i));return}u_(e.type===hy,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;u_(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=vy(a.children,i)),n.push(o)}),n}var yy=`application/x-www-form-urlencoded`;function by(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function xy(e){return by(e)&&e.tagName.toLowerCase()===`button`}function Sy(e){return by(e)&&e.tagName.toLowerCase()===`form`}function Cy(e){return by(e)&&e.tagName.toLowerCase()===`input`}function wy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ty(e,t){return e.button===0&&(!t||t===`_self`)&&!wy(e)}function Ey(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Dy(e,t){let n=Ey(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Oy=null;function ky(){if(Oy===null)try{new FormData(document.createElement(`form`),0),Oy=!1}catch{Oy=!0}return Oy}var Ay=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function jy(e){return e!=null&&!Ay.has(e)?(d_(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${yy}"`),null):e}function My(e,t){let n,r,i,a,o;if(Sy(e)){let o=e.getAttribute(`action`);r=o?R_(o,t):null,n=e.getAttribute(`method`)||`get`,i=jy(e.getAttribute(`enctype`))||yy,a=new FormData(e)}else if(xy(e)||Cy(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?R_(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=jy(e.getAttribute(`formenctype`))||jy(o.getAttribute(`enctype`))||yy,a=new FormData(o,e),!ky()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(by(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=yy,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var Ny=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Ny&&(window.__reactRouterVersion=`8`)}catch{}function Py({basename:e,children:t,useTransitions:n,window:r}){let i=h.useRef(null);i.current??=l_({window:r,v5Compat:!0});let a=i.current,[o,s]=h.useState({action:a.action,location:a.location}),c=h.useCallback(e=>{n===!1?s(e):h.startTransition(()=>s(e))},[n]);return h.useLayoutEffect(()=>a.listen(c),[a,c]),h.createElement(gy,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var Fy=h.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:g,navigator:_,useTransitions:v}=h.useContext(bv),y=typeof l==`string`&&i_.test(l),b=tv(l,g);l=b.to;let x=jv(l,{relative:r}),S=Nv(),C=null;if(o){let e=W_(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:K_([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=oy(n,p),D=Ry(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=h.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:fy(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?h.createElement(h.Fragment,null,A,h.createElement(cy,{page:x})):A});Fy.displayName=`Link`;var Iy=h.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Lv(a,{relative:c.relative}),d=Nv(),f=h.useContext(mv),{navigator:p,basename:m}=h.useContext(bv),g=f!=null&&Wy(u)&&o===!0,_=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f?.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&m&&(y=R_(y,m)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(b)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return h.createElement(Fy,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Iy.displayName=`NavLink`;var Ly=h.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:g}=h.useContext(bv),_=Hy(),v=Uy(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&i_.test(s);return h.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});g&&n!==!1?h.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Ly.displayName=`Form`;function Ry(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Fv(),d=Nv(),f=Lv(e,{relative:o});return h.useCallback(p=>{if(Ty(p,t)){p.preventDefault();let t=n===void 0?h_(d)===h_(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?h.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function zy(e){d_(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=h.useRef(Ey(e)),n=h.useRef(!1),r=Nv(),i=h.useMemo(()=>Dy(r.search,n.current?null:t.current),[r.search]),a=Fv();return[i,h.useCallback((e,t)=>{let r=Ey(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var By=0,Vy=()=>`__${String(++By)}__`;function Hy(){let{router:e}=Jv(`useSubmit`),{basename:t}=h.useContext(bv),n=Xv(`useSubmit`),r=e.fetch,i=e.navigate;return h.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=My(e,t);a.navigate===!1?await r(a.fetcherKey||Vy(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Uy(e,{relative:t}={}){let{basename:n}=h.useContext(bv),r=h.useContext(Sv);u_(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Lv(e||`.`,{relative:t})},o=Nv();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:K_([n,a.pathname])),h_(a)}function Wy(e,{relative:t}={}){let n=h.useContext(_v);u_(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Jv(`useViewTransitionState`),i=Lv(e,{relative:t});if(!n.isTransitioning)return!1;let a=R_(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=R_(n.nextLocation.pathname,r)||n.nextLocation.pathname;return P_(i.pathname,o)!=null||P_(i.pathname,a)!=null}var Gy=r_(),Ky=160,qy=200,Jy=`cubic-bezier(0.32, 0, 0.8, 1)`,Yy=`cubic-bezier(0.25, 0.65, 0.35, 1)`,Xy=40,Zy=({collapsed:e,width:t,side:n=`left`,children:r,className:i})=>{let a=(0,h.useRef)(e),[o,s]=(0,h.useState)(!1);(0,h.useLayoutEffect)(()=>{if(a.current===e)return;a.current=e,s(!0);let t=e?Ky:qy,n=window.setTimeout(()=>s(!1),t+20);return()=>window.clearTimeout(n)},[e]);let c=`${Math.max(t,0)}px`,l=o?e?`width ${Ky}ms ${Jy}, visibility 0s linear ${Ky}ms`:`width ${qy}ms ${Yy}, visibility 0s linear 0s`:void 0,u=o?e?`opacity 120ms ease-in ${Xy}ms`:`opacity ${qy}ms ${Yy}`:void 0,d={minWidth:0,width:e?0:c,overflow:`hidden`,visibility:e?`hidden`:`visible`,transition:l},f={width:c,opacity:+!e,transition:u};return(0,g.jsx)(`div`,{"aria-hidden":e||void 0,inert:e,className:`${n===`right`?`justify-end`:``} motion-reduce:transition-none! ${i??``}`,style:d,children:(0,g.jsx)(`div`,{className:`flex min-h-0 shrink-0 motion-reduce:transition-none!`,style:f,children:r})})},Qy=[`pdf`,`docx`,`pptx`,`xlsx`],$y=[`png`,`jpg`,`jpeg`,`webp`],eb=`txt.md.markdown.rst.log.csv.tsv.html.htm.xml.svg.css.scss.sass.less.vue.svelte.astro.json.jsonc.json5.yaml.yml.toml.ini.conf.cfg.properties.gradle.lock.ts.tsx.mts.cts.js.jsx.mjs.cjs.py.rb.go.rs.java.kt.kts.c.h.cc.cpp.cxx.hpp.cs.php.swift.scala.lua.pl.r.dart.ex.exs.erl.clj.hs.zig.sol.sql.graphql.gql.proto.sh.bash.zsh.ps1`.split(`.`),tb=[`dockerfile`,`makefile`,`rakefile`,`gemfile`,`procfile`,`brewfile`,`justfile`,`license`,`readme`,`changelog`,`.gitignore`,`.gitattributes`,`.dockerignore`,`.editorconfig`,`.nvmrc`,`.node-version`,`.python-version`,`.prettierrc`,`.eslintrc`,`.babelrc`,`.env.example`,`.env.sample`,`.env.template`],nb=new Set([`.env`,`.npmrc`,`.netrc`,`.git-credentials`,`.htpasswd`,`id_rsa`,`id_dsa`,`id_ecdsa`,`id_ed25519`,`credentials`]),rb=new Set([`pem`,`key`,`p12`,`pfx`,`jks`,`keystore`,`ppk`,`asc`,`gpg`,`kdbx`]),ib=/^\.env(\..+)?$/,ab=[`text/plain`,`text/markdown`,`text/csv`,`text/html`];function ob(e){return ab.includes(e)}function sb(e){return(e.replaceAll(`\\`,`/`).split(`/`).at(-1)??``).toLowerCase()}function cb(e){let t=sb(e),n=t.lastIndexOf(`.`);return n<=0||n===t.length-1?``:t.slice(n+1)}function lb(e){let t=sb(e);if(nb.has(t))return!0;let n=ib.exec(t);if(n!==null){let e=n[1]??``;return e!==`.example`&&e!==`.sample`&&e!==`.template`}return rb.has(cb(t))}var ub=new Set([...Qy,...$y,...eb]),db=new Set(tb);function fb(e){let t=sb(e);return db.has(t)?!0:ub.has(cb(t))}var pb=[...ub].sort().map(e=>`.${e}`).join(`,`),mb=20971520;function hb(e,t,n=mb){return lb(e)?`secret`:t>n?`size`:fb(e)?null:`type`}function gb(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function _b(e,t=`|`){return e.map(e=>Ub(e)).join(t)}function vb(e,t){return typeof t==`bigint`?t.toString():t}var yb=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function bb(e){return new yb(e)}function xb(e){return e==null}function Sb(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Cb(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function wb(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Tb(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function Eb(e){return Tb(e._zod.def)??e._zod.def.shape}function Db(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return wb(this,t,e),e},enumerable:!0,configurable:!0})}function Ob(e,t,n){t in e?wb(e,t,n):e[t]=n}function kb(e,t,n,r){let i=Eb(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Db(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Ob(e,a,r?r(n.value,a):n.value))}}function Ab(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Db(e,n,()=>t[n]):Ob(e,n,r.value))}}function jb(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Mb(e){return JSON.stringify(e)}function Nb(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Pb=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Fb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ib=bb(()=>{if(Nx.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Lb(e){if(Fb(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Fb(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Rb(e){return Lb(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var zb=new Set([`string`,`number`,`symbol`]);function Bb(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Vb(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Hb(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Ub(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Wb(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Gb={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Kb={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function qb(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return kb(i,e,Jb(e,t)),Vb(e,jb(n,{shape:i,checks:[]}))}function Jb(e,t){let n=Eb(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Yb(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Jb(e,t)),a={};return kb(a,e,Reflect.ownKeys(Eb(e)).filter(e=>!i.has(e))),Vb(e,jb(n,{shape:a,checks:[]}))}function Xb(e,t){if(!Lb(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=Eb(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Vb(e,jb(e._zod.def,{shape:Zb(e,t)}))}function Zb(e,t){let n={};return kb(n,e,Reflect.ownKeys(Eb(e))),Ab(n,t),n}function Qb(e,t){if(!Lb(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Vb(e,jb(e._zod.def,{shape:Zb(e,t)}))}function $b(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return kb(n,e,Reflect.ownKeys(Eb(e))),kb(n,t,Reflect.ownKeys(Eb(t))),Vb(e,jb(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ex(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Jb(t,n)):void 0,o={};return kb(o,t,Reflect.ownKeys(Eb(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),Vb(t,jb(t._zod.def,{shape:o,checks:[]}))}function tx(e,t,n){let r=n?new Set(Jb(t,n)):void 0,i={};return kb(i,t,Reflect.ownKeys(Eb(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),Vb(t,jb(t._zod.def,{shape:i}))}function nx(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function rx(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ix(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ax(e){return typeof e==`string`?e:e?.message}function ox(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function sx(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function cx(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:ax(e.inst?._zod.def?.error?.(e))??ax(a?.(e))??ax(t?.error?.(e))??ax(n.customError?.(e))??ax(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var lx=/[\uD800-\uDBFF]/;function ux(e){let t=e.length;if(!lx.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function dx(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function fx(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function px(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function mx(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):vx(e,n,r.value)}}function hx(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function gx(e,t,n){return hx(e,t,n,!1)}function _x(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return hx(this,n,r(this))},set(e){hx(this,n,e)}})}return t}function vx(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:hx(this,t,n.bind(this))},set(e){hx(this,t,e)}})}function yx(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var bx,xx=!1,Sx={configurable:!0,get(){xx=!0}};function Cx(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&bx!==e._zod?bx=void 0:(bx=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Sx);let e=xx;xx=!1;try{let r=n(this);return xx?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),xx||=e,r}catch(n){throw delete this[t],xx||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function wx(e,t,n,r){let i=yx(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Tx=`~constantCatch`;function Ex(e){let t=()=>e;return t[Tx]=!0,t}var Dx,Ox={value:void 0,enumerable:!1},kx=`captureStackTrace`in Error?Error:null;function Ax(e){let t=kx;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return kx=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function U(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Ox.value=new a(r);try{Object.defineProperty(n,"_zod",Ox)}finally{Ox.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),mx(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Ax(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var jx=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Mx=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Dx=globalThis).__zod_globalConfig??(Dx.__zod_globalConfig={});var Nx=globalThis.__zod_globalConfig;function Px(e){return e&&Object.assign(Nx,e),Nx}function Fx(){let e=this._zod;return e.message??=JSON.stringify(e.def,vb,2),e.message}function Ix(e){this._zod.message=e}var Lx={get:Fx,set:Ix,enumerable:!0,configurable:!0},Rx={value:void 0,enumerable:!1},zx=new WeakSet([Object.prototype,Error.prototype]),Bx=U(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Rx.value=t,Object.defineProperty(e,"issues",Rx),Rx.value=void 0,Object.defineProperty(e,"message",Lx);let n=Object.getPrototypeOf(e);zx.has(n)||(zx.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function Vx(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Hx(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Vx(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Ux(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Wx(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Gx=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new jx;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>cx(e,o,Px())));throw Pb(n,a?.callee??t),n}return s.value};return t},Kx=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>cx(e,o,Px())));throw Pb(n,a?.callee??t),n}return s.value};return t},qx=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new jx;return a.issues.length?Jx(e,a.issues,i):{success:!0,data:a.value}};function Jx(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>cx(e,n,Px()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Yx=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Jx(e,a.issues,i):{success:!0,data:a.value}},Xx=Symbol.for(`zod.compile.invalid`),Zx=Symbol.for(`zod.compile.fallback`),Qx=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Xx)return!0;if(r.definite===!0&&n===void 0)return!1}return $x(e,t,n)});function $x(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Zx]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new jx;return a.issues.length===0}var eS=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},tS=e=>{let t=Gx(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Wx(n,a))};return n},nS=e=>{let t=Gx(e),n=(e,r,i,a)=>t(e,r,i,Wx(n,a));return n},rS=e=>{let t=Kx(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Wx(n,a))};return n},iS=e=>{let t=Kx(e),n=async(e,r,i,a)=>await t(e,r,i,Wx(n,a));return n},aS=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return qx(e)(t,n,i)},oS=e=>(t,n,r)=>qx(e)(t,n,r),sS=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Yx(e)(t,n,i)},cS=e=>async(t,n,r)=>Yx(e)(t,n,r),lS=/^[cC][0-9a-z]{6,}$/,uS=/^[0-9a-z]+$/,dS=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,fS=/^[0-9a-vA-V]{20}$/,pS=/^[A-Za-z0-9]{27}$/,mS=/^[a-zA-Z0-9_-]{21}$/;function hS(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var gS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_S=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,vS=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,yS=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bS=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function xS(){return new RegExp(bS,`u`)}var SS=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,wS=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,TS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ES=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,DS=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,OS=/^https?$/,kS=/^\+[1-9]\d{6,14}$/,AS=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function jS(e){return RegExp(`^${e}$`)}var MS=jS(AS);function NS(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function PS(e){return RegExp(`^${NS(e)}$`)}function FS(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${NS({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${NS({precision:e.precision})}`:n;return RegExp(`^${AS}T(?:${r})$`)}var pee=/^[\s\S]{0,}$/,mee=/^-?\d+(?:\.\d+)?$/,hee=/^(?:true|false)$/i,gee=/^[^A-Z]*$/,_ee=/^[^a-z]*$/,IS=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),LS=e=>{let t=e.value;return!xb(t)&&t.length!==void 0},RS={number:`number`,bigint:`bigint`,object:`date`},zS=U(`$ZodCheckLessThan`,(e,t)=>{IS.init(e,t);let n=RS[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:RS[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),BS=U(`$ZodCheckGreaterThan`,(e,t)=>{IS.init(e,t);let n=RS[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:RS[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vee=U(`$ZodCheckMultipleOf`,(e,t)=>{IS.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Cb(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),yee=U(`$ZodCheckNumberFormat`,(e,t)=>{IS.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Gb[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),bee=U(`$ZodCheckMaxLength`,(e,t)=>{var n;IS.init(e,t),(n=e._zod.def).when??(n.when=LS),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?ux(r):i)<=t.maximum)return;let a=dx(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xee=U(`$ZodCheckMinLength`,(e,t)=>{var n;IS.init(e,t),(n=e._zod.def).when??(n.when=LS),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?ux(r):i)>=t.minimum)return;let a=dx(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),See=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;IS.init(e,t),(n=e._zod.def).when??(n.when=LS),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?ux(r):i;if(a===t.length)return;let o=dx(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),VS=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;IS.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Cee=U(`$ZodCheckRegex`,(e,t)=>{VS.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),wee=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=gee,VS.init(e,t)}),Tee=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=_ee,VS.init(e,t)}),Eee=U(`$ZodCheckIncludes`,(e,t)=>{IS.init(e,t);let n=Bb(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Dee=U(`$ZodCheckStartsWith`,(e,t)=>{IS.init(e,t);let n=RegExp(`^${Bb(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Oee=U(`$ZodCheckEndsWith`,(e,t)=>{IS.init(e,t);let n=RegExp(`.*${Bb(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),kee=U(`$ZodCheckOverwrite`,(e,t)=>{IS.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Aee=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
51
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
52
+ `)}\n};`)(...Object.values(this.closed))}},jee={major:4,minor:6,patch:7},HS=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jee;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=nx(t),a;for(let o of n){if(o._zod.def.when){if(rx(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new jx;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(sx(t.issues,n,e),i||=nx(t,n))});else{if(t.issues.length===n)continue;sx(t.issues,n,e),i||=nx(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(nx(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new jx;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new jx;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return gx(this,`~standard`,WS(this))},set"~standard"(e){hx(this,`~standard`,e)}}),US=(e,t)=>e.issues.length?{issues:e.issues.map(e=>cx(e,t,Px()))}:{value:e.value};async function Mee(e,t){let n={async:!0};return US(await e._zod.run({value:t,issues:[]},n),n)}function WS(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return US(r,n)}catch{}return Mee(e,t)},vendor:`zod`,version:1}}var GS=U(`$ZodString`,(e,t)=>{HS.init(e,t),e._zod.pattern=t.pattern??pee,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),KS=U(`$ZodStringFormat`,(e,t)=>{VS.init(e,t),GS.init(e,t)}),Nee=U(`$ZodGUID`,(e,t)=>{t.pattern??=_S,KS.init(e,t)}),Pee=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=vS(e)}else t.pattern??=vS();KS.init(e,t)}),Fee=U(`$ZodEmail`,(e,t)=>{t.pattern??=yS,KS.init(e,t)});function qS(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Iee(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?qS(e)||2:Lee(e,t)}function Lee(e,t){if(!t.normalize&&t.protocol?.source===OS.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Ree=/[\t\n\r]/g;function JS(e){return e.replace(Ree,``)}function zee(e,t){return t.lastIndex=0,t.test(e.hostname)}function Bee(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Vee=U(`$ZodURL`,(e,t)=>{KS.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Iee(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=JS(r);return}t.hostname&&!zee(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Bee(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:JS(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Hee=U(`$ZodEmoji`,(e,t)=>{t.pattern??=xS(),KS.init(e,t)}),Uee=U(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?mS:hS(t.length),KS.init(e,t)}),Wee=U(`$ZodCUID`,(e,t)=>{t.pattern??=lS,KS.init(e,t)}),Gee=U(`$ZodCUID2`,(e,t)=>{t.pattern??=uS,KS.init(e,t)}),YS=U(`$ZodULID`,(e,t)=>{t.pattern??=dS,KS.init(e,t)}),XS=U(`$ZodXID`,(e,t)=>{t.pattern??=fS,KS.init(e,t)}),ZS=U(`$ZodKSUID`,(e,t)=>{t.pattern??=pS,KS.init(e,t)}),QS=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=FS(t),KS.init(e,t)}),$S=U(`$ZodISODate`,(e,t)=>{t.pattern??=MS,KS.init(e,t)}),eC=U(`$ZodISOTime`,(e,t)=>{t.pattern??=PS(t),KS.init(e,t)}),tC=U(`$ZodISODuration`,(e,t)=>{t.pattern??=gS,KS.init(e,t)}),nC=U(`$ZodIPv4`,(e,t)=>{t.pattern??=SS,KS.init(e,t)}),rC=/^[0-9a-fA-F:.]+$/;function iC(e){return rC.test(e)?qS(`http://[${e}]`):!1}var aC=U(`$ZodIPv6`,(e,t)=>{t.pattern??=CS,KS.init(e,t),e._zod.check=n=>{iC(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),oC=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=wS,KS.init(e,t)});function sC(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:iC(n)}var cC=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=TS,KS.init(e,t),e._zod.check=n=>{sC(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function lC(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var uC=/^[0-9a-zA-Z+/]*={0,2}$/,dC=U(`$ZodBase64`,(e,t)=>{t.pattern??=uC,KS.init(e,t),e._zod.check=n=>{lC(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),fC=/^[A-Za-z0-9_-]*$/;function pC(e){if(!fC.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return lC(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var mC=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=fC,KS.init(e,t),e._zod.check=n=>{pC(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),hC=U(`$ZodE164`,(e,t)=>{t.pattern??=kS,KS.init(e,t)});function gC(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var _C=U(`$ZodJWT`,(e,t)=>{KS.init(e,t),e._zod.check=n=>{gC(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),vC=U(`$ZodNumber`,(e,t)=>{HS.init(e,t),e._zod.pattern=mee,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),yC=U(`$ZodNumberFormat`,(e,t)=>{yee.init(e,t),vC.init(e,t)}),bC=U(`$ZodBoolean`,(e,t)=>{HS.init(e,t),e._zod.pattern=hee,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),xC=U(`$ZodUnknown`,(e,t)=>{HS.init(e,t),e._zod.parse=e=>e}),SC=U(`$ZodNever`,(e,t)=>{HS.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function CC(e,t){let n=ox(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of ox(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,sx(n.issues,t,e),n}}return i(n,a)}}var wC=e=>Array.isArray(e)?e.length:-1;function TC(e,t,n){e.issues.length&&t.issues.push(...ix(n,e.issues)),t.value[n]=e.value}var EC=U(`$ZodArray`,(e,t)=>{HS.init(e,t);let n=Nx.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>TC(t,r,e)));else if(TC(c,r,e),s&&c.issues.length!==0&&nx(c))break}return o.length?Promise.all(o).then(()=>r):r},CC(e,wC)});function DC(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...ix(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var OC=[];function kC(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:OC,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Wb(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function AC(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(nx(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>DC(e,n,i,t,d,f))):DC(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var jC=U(`$ZodObject`,(e,t)=>{HS.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=bb(()=>kC(t));Cx(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||wb(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Fb,o=t.catchall,s,c=Nx.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(nx(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>DC(n,t,e,r,a,o))):DC(s,t,e,r,a,o)}return o?AC(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),MC=U(`$ZodObjectJIT`,(e,t)=>{jC.init(e,t);let n=e._zod.parse,r=bb(()=>kC(t)),i=Nx.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Aee([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
53
+ let ${e}_ab = false;
54
+ for (let i = 0; i < ${e}.issues.length; i++) {
55
+ const iss = ${e}.issues[i];
56
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
57
+ payload.issues.push(iss);
58
+ if (iss.continue !== true) ${e}_ab = true;
59
+ }
60
+ if (${e}_ab && ctx && ctx.abortEarly) {
61
+ payload.value = newResult;
62
+ return payload;
63
+ }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Mb(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
64
+ const ${n}_present = ${i};
65
+ if (!${n}.issues.length || ${n}_present) {
66
+ if (${n}.issues.length) {${c(n,r)}
67
+ }
68
+
69
+ if (${e}) {
70
+ newResult[${r}] = ${n}.value;
71
+ }
72
+ }
73
+
74
+ `)}else f?(o.write(`
75
+ if (${n}.issues.length) {${c(n,r)}
76
+ }
77
+ `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
78
+ if (${n}.value !== undefined || ${i}) {
79
+ newResult[${r}] = ${n}.value;
80
+ }
81
+ `)):o.write(`
82
+ const ${n}_present = ${i};
83
+ if (${n}.issues.length) {${c(n,r)}
84
+ }
85
+ if (!${n}_present && !${n}.issues.length) {
86
+ payload.issues.push({
87
+ code: "invalid_type",
88
+ expected: "nonoptional",
89
+ input: undefined,
90
+ path: [${r}]
91
+ });
92
+ if (ctx && ctx.abortEarly) {
93
+ payload.value = newResult;
94
+ return payload;
95
+ }
96
+ }
97
+
98
+ if (${n}_present) {
99
+ newResult[${r}] = ${n}.value;
100
+ }
101
+
102
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Fb,c=!Nx.jitless,l=c&&Ib.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?AC([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function NC(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!nx(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>cx(e,r,Px())))}),t)}var PC=U(`$ZodUnion`,(e,t)=>{HS.init(e,t),Cx(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),Cx(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),Cx(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),Cx(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Sb(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>NC(t,r,e,i)):NC(o,r,e,i)}});function FC(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var IC=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,PC.init(e,t);let n=e._zod.parse;Cx(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||wb(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=Tb(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=bb(()=>FC(t));e._zod.parse=(i,a)=>{let o=i.value;if(!Fb(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),LC=U(`$ZodIntersection`,(e,t)=>{HS.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>zC(e,t,n)):zC(e,i,a)}});function RC(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Lb(e)&&Lb(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=RC(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=RC(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function zC(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=RC(t.value,n.value);if(!c.valid){if(nx(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var BC=U(`$ZodEnum`,(e,t)=>{HS.init(e,t);let n=gb(t.entries),r=new Set(n);e._zod.values=r,Cx(e,`pattern`,e=>{let t=gb(e.def.entries).filter(e=>zb.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Bb(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),VC=U(`$ZodLiteral`,(e,t)=>{HS.init(e,t);let n=new Set(t.values);e._zod.values=n,Cx(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Bb(e):e?Bb(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),HC=U(`$ZodTransform`,(e,t)=>{HS.init(e,t),e._zod.optin=`optional`,Nx.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Mx(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new jx;return n.value=i,n}});function UC(e,t){return e.value=t.issues.length?void 0:t.value,e}var WC=U(`$ZodOptional`,(e,t)=>{HS.init(e,t),Cx(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,Cx(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),Cx(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Sb(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>UC(e,t)):UC(e,r)}return t.innerType._zod.run(e,n)}}),GC=U(`$ZodExactOptional`,(e,t)=>{WC.init(e,t),Cx(e,`values`,e=>e.def.innerType._zod.values),Cx(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),KC=U(`$ZodNullable`,(e,t)=>{HS.init(e,t),Cx(e,`optin`,e=>e.def.innerType._zod.optin),Cx(e,`optout`,e=>e.def.innerType._zod.optout),Cx(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Sb(t.source)}|null)$`):void 0}),Cx(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),qC=U(`$ZodDefault`,(e,t)=>{HS.init(e,t),e._zod.optin=`defaulted`,Cx(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>JC(e,t)):JC(r,t)}});function JC(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var YC=U(`$ZodPrefault`,(e,t)=>{HS.init(e,t),e._zod.optin=`defaulted`,Cx(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),XC=U(`$ZodNonOptional`,(e,t)=>{HS.init(e,t),Cx(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>ZC(t,e)):ZC(i,e)}});function ZC(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function QC(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>cx(e,r,Px()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var $C=U(`$ZodCatch`,(e,t)=>{HS.init(e,t),Cx(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),Cx(e,`optout`,e=>e.def.innerType._zod.optout),Cx(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>QC(e,r,t,n)):QC(e,r,t,n)}}),ew=U(`$ZodPipe`,(e,t)=>{HS.init(e,t),Cx(e,`values`,e=>e.def.in._zod.values),Cx(e,`optin`,e=>e.def.in._zod.optin),Cx(e,`optout`,e=>e.def.out._zod.optout),Cx(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>tw(e,t.in,n)):tw(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>tw(e,t.out,n)):tw(r,t.out,n)}});function tw(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var nw=U(`$ZodReadonly`,(e,t)=>{HS.init(e,t),Cx(e,`propValues`,e=>e.def.innerType._zod.propValues),Cx(e,`values`,e=>e.def.innerType._zod.values),Cx(e,`optin`,e=>e.def.innerType?._zod?.optin),Cx(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(rw):rw(r)}});function rw(e){return e.memo||(e.value=Object.freeze(e.value)),e}var iw=U(`$ZodCustom`,(e,t)=>{IS.init(e,t),HS.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>aw(t,n,r,e));aw(i,n,r,e)}});function aw(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(px(e))}}var ow=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},sw=`~memo`,cw=[];function lw(e){return typeof e==`object`&&!!e}function uw(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var dw=new WeakMap,fw=0,pw=1,mw=2;function hw(e,t,n){let r=dw.get(e);if(r!==void 0)return r?mw:fw;if(t.has(e))return mw;t.add(e);let i=fw,a=e=>{if(i!==mw&&e?._zod){let r=hw(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=fw;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?pw:o.value?._zod?hw(o.value,t,n):fw;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=Tb(c);s(e?o(e,!0):pw),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?hw(r,t,!1):pw);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),gw(e,i)}function gw(e,t){return t!==pw&&dw.set(e,t===mw),t}function _w(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var vw,yw=[],bw={alloc(e,t,n){let r=vw;if(!r)return n;vw=void 0;let i={value:n,issues:null};return r.set(t.value,i),yw.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Sw(n,e.value))throw new ow;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=hw(e,new Set,!1);if(i===fw)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===mw||r?n=!0:r=!0}let l=s.value;if(!lw(l))return t(s,c);let u=c[sw];u||(u={buckets:new WeakMap,backEdges:void 0},c[sw]=u);let d;i===c?d=a:(d=_w(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...uw(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;vw=d;let p=yw.length,m=t(s,c);vw=void 0;let h=yw.length>p?yw.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?uw(e.issues):cw),e)):(h&&(h.issues=m.issues.length?uw(m.issues):cw),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function xw(){return bw}function Sw(e,t){let n=e[sw]?.backEdges;return n!==void 0&&lw(t)&&n.has(t)}var Cw=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(fx(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Ub(e.values[0])}`:`Invalid option: expected one of ${_b(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${_b(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function ww(){return{localeError:Cw()}}var Tw,Ew=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Dw(){return new Ew}(Tw=globalThis).__zod_globalRegistry??(Tw.__zod_globalRegistry=Dw());var Ow=globalThis.__zod_globalRegistry;function kw(e){return e.checks&&=[...e.checks],e}function Aw(e,t){return new e(kw({type:`string`,...Hb(t)}))}function jw(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Hb(t)})}function Mw(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Hb(t)})}function Nw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Hb(t)})}function Pw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Hb(t)})}function Fw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Hb(t)})}function Iw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Hb(t)})}function Lw(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Hb(t)})}function Rw(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Hb(t)})}function zw(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Hb(t)})}function Bw(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Hb(t)})}function Vw(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Hb(t)})}function Hw(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Hb(t)})}function Uw(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Hb(t)})}function Ww(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Hb(t)})}function Gw(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Hb(t)})}function Kw(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Hb(t)})}function qw(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Hb(t)})}function Jw(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Hb(t)})}function Yw(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Hb(t)})}function Xw(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Hb(t)})}function Zw(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Hb(t)})}function Qw(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Hb(t)})}function $w(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Hb(t)})}function eT(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Hb(t)})}function tT(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Hb(t)})}function nT(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Hb(t)})}function rT(e,t){return new e(kw({type:`number`,checks:[],...Hb(t)}))}function iT(e,t){return new e(kw({type:`number`,coerce:!0,checks:[],...Hb(t)}))}function aT(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Hb(t)})}function oT(e,t){return new e({type:`boolean`,...Hb(t)})}function sT(e){return new e({type:`unknown`})}function cT(e,t){return new e({type:`never`,...Hb(t)})}function lT(e,t){return new zS({check:`less_than`,...Hb(t),value:e,inclusive:!1})}function uT(e,t){return new zS({check:`less_than`,...Hb(t),value:e,inclusive:!0})}function dT(e,t){return new BS({check:`greater_than`,...Hb(t),value:e,inclusive:!1})}function fT(e,t){return new BS({check:`greater_than`,...Hb(t),value:e,inclusive:!0})}function pT(e,t){return new vee({check:`multiple_of`,...Hb(t),value:e})}function mT(e,t){return new bee({check:`max_length`,...Hb(t),maximum:e})}function hT(e,t){return new xee({check:`min_length`,...Hb(t),minimum:e})}function gT(e,t){return new See({check:`length_equals`,...Hb(t),length:e})}function _T(e,t){return new Cee({check:`string_format`,format:`regex`,...Hb(t),pattern:e})}function vT(e){return new wee({check:`string_format`,format:`lowercase`,...Hb(e)})}function yT(e){return new Tee({check:`string_format`,format:`uppercase`,...Hb(e)})}function bT(e,t){return new Eee({check:`string_format`,format:`includes`,...Hb(t),includes:e})}function xT(e,t){return new Dee({check:`string_format`,format:`starts_with`,...Hb(t),prefix:e})}function ST(e,t){return new Oee({check:`string_format`,format:`ends_with`,...Hb(t),suffix:e})}function CT(e){return new kee({check:`overwrite`,tx:e})}function wT(e){return CT(t=>t.normalize(e))}function TT(){return CT(e=>e.trim())}function ET(){return CT(e=>e.toLowerCase())}function DT(){return CT(e=>e.toUpperCase())}function OT(){return CT(e=>Nb(e))}function kT(e,t,n){return new e({type:`array`,element:t,...Hb(n)})}function AT(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Hb(n)})}function jT(e,t){let n=MT(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(px(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(px(r))}},e(t.value,t)),t);return n}function MT(e,t){let n=new IS({check:`custom`,...Hb(t)});return n._zod.check=e,n}function NT(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&wb(e,t,n[t]);return e}function PT(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Ow,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function FT(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function IT(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,IT(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&NT(o.schema,c),t.io===`input`&&KT(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function LT(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function RT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${LT(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+LT(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
103
+
104
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function zT(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;zT(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var BT=new Set([`type`,`properties`,`required`,`additionalProperties`]),VT=[`oneOf`,`anyOf`];function HT(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function UT(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!BT.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??HT(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}wb(n,r,e.length===1?e[0]:UT(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=HT(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function WT(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of BT)if(t in e)return;let n=t.filter(e=>VT.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=UT(t);else{let e=n[0],i=VT.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>UT([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,NT(e,r))}function GT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):NT(i,s),NT(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())zT(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])WT(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}NT(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,wb(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:JT(t,`input`,e.processors),output:JT(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function KT(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return KT(r.element,n);if(r.type===`set`)return KT(r.valueType,n);if(r.type===`lazy`)return KT(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return KT(r.innerType,n);if(r.type===`intersection`)return KT(r.left,n)||KT(r.right,n);if(r.type===`record`||r.type===`map`)return KT(r.keyType,n)||KT(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:KT(r.in,n)||KT(r.out,n);if(r.type===`object`){for(let e in r.shape)if(KT(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(KT(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(KT(e,n))return!0;return!!(r.rest&&KT(r.rest,n))}return!1}var qT=(e,t={})=>n=>{let r=PT({...n,processors:t});return IT(e,r),RT(r,e),GT(r,e)},JT=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=PT({...i??{},target:a,io:t,processors:n});return IT(e,o),RT(o,e),GT(o,e)},YT=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},XT=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},ZT=(e,t)=>{YT(e,`minimum`,t),XT(e,`maximum`,t)},QT=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},$T=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},eE=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},tE=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},nE=(e,t)=>YT(e,`minimum`,t.minimum),rE=(e,t)=>XT(e,`maximum`,t.maximum),iE=e=>(t,n)=>{tE(t,n.format);let[r,i]=e[n.format];YT(t,`minimum`,r),XT(t,`maximum`,i)},aE={greater_than:(e,t)=>YT(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>XT(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>QT(e,t.value),number_format:iE(Gb),bigint_format:iE(Kb),min_length:nE,max_length:rE,length_equals:(e,t)=>ZT(e,t.length),min_size:nE,max_size:rE,size_equals:(e,t)=>ZT(e,t.size),string_format:(e,t)=>{tE(e,t.format),t.pattern&&$T(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>eE(e,t.mime)};function oE(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)aE[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&YT(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&YT(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&XT(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&XT(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&QT(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&eE(t,i.mime);for(let e of i.patterns??[])$T(t,e);return t}var sE={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},cE=new Map([[uC,ES],[fC,DS]]),lE=e=>cE.get(e)??e,uE=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=oE(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=sE[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(lE);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},dE=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=oE(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):FT(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},fE=(e,t,n,r)=>{n.type=`boolean`},pE=(e,t,n,r)=>{n.not={}},mE=(e,t,n,r)=>{let i=e._zod.def,a=gb(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},hE=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(FT(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(FT(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},gE=(e,t,n,r)=>{FT(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},_E=(e,t,n,r)=>{FT(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},vE=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=oE(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=IT(a.element,t,{...r,path:[...r.path,`items`]})};function yE(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?yE(t.out):t.type===`catch`?yE(t.innerType):e._zod.optin}var bE=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&FT(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)wb(i.properties,e,IT(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?yE(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=IT(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},xE=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>IT(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},SE=(e,t,n,r)=>{let i=e._zod.def,a=IT(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=IT(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},CE=(e,t,n,r)=>{let i=e._zod.def,a=IT(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},wE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},TE=Symbol();function EE(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(FT(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),TE):JSON.parse(o)}var DE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=EE(i.defaultValue,e,t,n,r);o!==TE&&(n.default=o)},OE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=EE(i.defaultValue,e,t,n,r);o!==TE&&(n._prefault=o)},kE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{FT(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},AE=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;IT(o,t,r);let s=t.seen.get(e);s.ref=o},jE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ME=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},NE=new WeakSet([Object.prototype,Error.prototype]);function PE(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var FE=U(`ZodError`,(e,t)=>{Bx.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);NE.has(n)||(NE.add(n),PE(n,`format`,e=>t=>Ux(e,t)),PE(n,`flatten`,e=>t=>Hx(e,t)),PE(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,vb,2)}),PE(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,vb,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),IE=Gx(FE),LE=Kx(FE),RE=qx(FE),zE=Yx(FE),BE=tS(FE),VE=nS(FE),HE=rS(FE),UE=iS(FE),WE=aS(FE),GE=oS(FE),KE=sS(FE),qE=cS(FE);function JE(){Nx.localeError||Px(ww())}function YE(){Nx.memoizer||Px({memoizer:xw()})}var XE=U(`ZodType`,(e,t)=>(JE(),HS.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(jb(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Vb(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(fO(e,t))},superRefine(e,t){return this.check(pO(e,t))},overwrite(e){return this.check(CT(e))},optional(){return JD(this)},exactOptional(){return XD(this)},nullable(){return QD(this)},nullish(){return JD(QD(this))},nonoptional(e){return iO(this,e)},array(){return PD(this)},or(e){return RD([this,e])},and(e){return HD(this,e)},transform(e){return cO(this,KD(e))},default(e){return eO(this,e)},prefault(e){return nO(this,e)},catch(e){return oO(this,e)},pipe(e){return cO(this,e)},readonly(){return uO(this)},describe(e){let t=this.clone();return Ow.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ow.get(this);let t=this.clone();return Ow.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return gx(this,`~standard`,{...WS(this),jsonSchema:{input:JT(this,`input`),output:JT(this,`output`)}})},set"~standard"(e){hx(this,`~standard`,e)},parse:function e(t,n){return IE(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await LE(this,t,n,{callee:e})},safeParse(e,t){return RE(this,e,t)},async safeParseAsync(e,t){return zE(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){hx(this,`spa`,e)},validate(e,t){return Qx(this,e,t)},validateAsync(e,t){return eS(this,e,t)},encode:function e(t,n){return BE(this,t,n,{callee:e})},decode:function e(t,n){return VE(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await HE(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await UE(this,t,n,{callee:e})},safeEncode(e,t){return WE(this,e,t)},safeDecode(e,t){return GE(this,e,t)},async safeEncodeAsync(e,t){return KE(this,e,t)},async safeDecodeAsync(e,t){return qE(this,e,t)},toJSONSchema(e){return qT(this,{})(e)},get description(){return Ow.get(this)?.description},get _def(){return this._zod.def}}),ZE=U(`_ZodString`,(e,t)=>{GS.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uE(e,t,n,r)},_x({format:e=>oE(e).format??null,minLength:e=>oE(e).minimum??null,maxLength:e=>oE(e).maximum??null},{regex(...e){return this.check(_T(...e))},includes(...e){return this.check(bT(...e))},startsWith(...e){return this.check(xT(...e))},endsWith(...e){return this.check(ST(...e))},min(...e){return this.check(hT(...e))},max(...e){return this.check(mT(...e))},length(...e){return this.check(gT(...e))},nonempty(...e){return this.check(hT(1,...e))},lowercase(e){return this.check(vT(e))},uppercase(e){return this.check(yT(e))},trim(){return this.check(TT())},normalize(...e){return this.check(wT(...e))},toLowerCase(){return this.check(ET())},toUpperCase(){return this.check(DT())},slugify(){return this.check(OT())}})),QE=U(`ZodString`,(e,t)=>{GS.init(e,t),ZE.init(e,t)},{email(e){return this.check(jw(iD,e))},url(e){return this.check(Lw(cD,e))},jwt(e){return this.check(Qw(CD,e))},emoji(e){return this.check(Rw(lD,e))},guid(e){return this.check(Mw(aD,e))},uuid(e){return this.check(Nw(oD,e))},uuidv4(e){return this.check(Pw(oD,e))},uuidv6(e){return this.check(Fw(oD,e))},uuidv7(e){return this.check(Iw(oD,e))},nanoid(e){return this.check(zw(uD,e))},cuid(e){return this.check(Bw(dD,e))},cuid2(e){return this.check(Vw(fD,e))},ulid(e){return this.check(Hw(pD,e))},base64(e){return this.check(Yw(bD,e))},base64url(e){return this.check(Xw(xD,e))},xid(e){return this.check(Uw(mD,e))},ksuid(e){return this.check(Ww(hD,e))},ipv4(e){return this.check(Gw(gD,e))},ipv6(e){return this.check(Kw(_D,e))},cidrv4(e){return this.check(qw(vD,e))},cidrv6(e){return this.check(Jw(yD,e))},e164(e){return this.check(Zw(SD,e))},datetime(e){return this.check($w(eD,e))},date(e){return this.check(eT(tD,e))},time(e){return this.check(tT(nD,e))},duration(e){return this.check(nT(rD,e))}});function W(e){return Aw(QE,e)}var $E=U(`ZodStringFormat`,(e,t)=>{KS.init(e,t),ZE.init(e,t)}),eD=U(`ZodISODateTime`,(e,t)=>{QS.init(e,t),$E.init(e,t)}),tD=U(`ZodISODate`,(e,t)=>{$S.init(e,t),$E.init(e,t)}),nD=U(`ZodISOTime`,(e,t)=>{eC.init(e,t),$E.init(e,t)}),rD=U(`ZodISODuration`,(e,t)=>{tC.init(e,t),$E.init(e,t)}),iD=U(`ZodEmail`,(e,t)=>{Fee.init(e,t),$E.init(e,t)}),aD=U(`ZodGUID`,(e,t)=>{Nee.init(e,t),$E.init(e,t)}),oD=U(`ZodUUID`,(e,t)=>{Pee.init(e,t),$E.init(e,t)});function sD(e){return Nw(oD,e)}var cD=U(`ZodURL`,(e,t)=>{Vee.init(e,t),$E.init(e,t)}),lD=U(`ZodEmoji`,(e,t)=>{Hee.init(e,t),$E.init(e,t)}),uD=U(`ZodNanoID`,(e,t)=>{Uee.init(e,t),$E.init(e,t)}),dD=U(`ZodCUID`,(e,t)=>{Wee.init(e,t),$E.init(e,t)}),fD=U(`ZodCUID2`,(e,t)=>{Gee.init(e,t),$E.init(e,t)}),pD=U(`ZodULID`,(e,t)=>{YS.init(e,t),$E.init(e,t)}),mD=U(`ZodXID`,(e,t)=>{XS.init(e,t),$E.init(e,t)}),hD=U(`ZodKSUID`,(e,t)=>{ZS.init(e,t),$E.init(e,t)}),gD=U(`ZodIPv4`,(e,t)=>{nC.init(e,t),$E.init(e,t)}),_D=U(`ZodIPv6`,(e,t)=>{aC.init(e,t),$E.init(e,t)}),vD=U(`ZodCIDRv4`,(e,t)=>{oC.init(e,t),$E.init(e,t)}),yD=U(`ZodCIDRv6`,(e,t)=>{cC.init(e,t),$E.init(e,t)}),bD=U(`ZodBase64`,(e,t)=>{dC.init(e,t),$E.init(e,t)}),xD=U(`ZodBase64URL`,(e,t)=>{mC.init(e,t),$E.init(e,t)}),SD=U(`ZodE164`,(e,t)=>{hC.init(e,t),$E.init(e,t)}),CD=U(`ZodJWT`,(e,t)=>{_C.init(e,t),$E.init(e,t)}),wD=U(`ZodNumber`,(e,t)=>{vC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dE(e,t,n,r),e.isFinite=!0},_x({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=oE(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=oE(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=oE(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>oE(e).format??null},{gt(e,t){return this.check(dT(e,t))},gte(e,t){return this.check(fT(e,t))},min(e,t){return this.check(fT(e,t))},lt(e,t){return this.check(lT(e,t))},lte(e,t){return this.check(uT(e,t))},max(e,t){return this.check(uT(e,t))},int(e){return this.check(ED(e))},safe(e){return this.check(ED(e))},positive(e){return this.check(dT(0,e))},nonnegative(e){return this.check(fT(0,e))},negative(e){return this.check(lT(0,e))},nonpositive(e){return this.check(uT(0,e))},multipleOf(e,t){return this.check(pT(e,t))},step(e,t){return this.check(pT(e,t))},finite(){return this}}));function G(e){return rT(wD,e)}var TD=U(`ZodNumberFormat`,(e,t)=>{yC.init(e,t),wD.init(e,t)});function ED(e){return aT(TD,e)}var DD=U(`ZodBoolean`,(e,t)=>{bC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fE(e,t,n,r)});function OD(e){return oT(DD,e)}var kD=U(`ZodUnknown`,(e,t)=>{xC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function AD(){return sT(kD)}var jD=U(`ZodNever`,(e,t)=>{SC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pE(e,t,n,r)});function MD(e){return cT(jD,e)}var ND=U(`ZodArray`,(e,t)=>{YE(),EC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vE(e,t,n,r),e.element=t.element},{min(e,t){return this.check(hT(e,t))},nonempty(e){return this.check(hT(1,e))},max(e,t){return this.check(mT(e,t))},length(e,t){return this.check(gT(e,t))},unwrap(){return this.element}});function PD(e,t){return kT(ND,e,t)}var FD=U(`ZodObject`,(e,t)=>{YE(),MC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bE(e,t,n,r),wx(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return q(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(jb(this._zod.def,{catchall:e}))},passthrough(){return this.clone(jb(this._zod.def,{catchall:AD()}))},loose(){return this.clone(jb(this._zod.def,{catchall:AD()}))},strict(){return this.clone(jb(this._zod.def,{catchall:MD()}))},strip(){return this.clone(jb(this._zod.def,{catchall:void 0}))},extend(e){return Xb(this,e)},safeExtend(e){return Qb(this,e)},merge(e){return $b(this,e)},pick(e){return qb(this,e)},omit(e){return Yb(this,e)},partial(...e){return ex(qD,this,e[0])},exactPartial(...e){return ex(YD,this,e[0],`exactPartial`)},required(...e){return tx(rO,this,e[0])}});function K(e,t){return new FD({type:`object`,shape:e??{},...Hb(t)})}function ID(e,t){return new FD({type:`object`,shape:e,catchall:MD(),...Hb(t)})}var LD=U(`ZodUnion`,(e,t)=>{PC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xE(e,t,n,r),e.options=t.options});function RD(e,t){return new LD({type:`union`,options:e,...Hb(t)})}var zD=U(`ZodDiscriminatedUnion`,(e,t)=>{LD.init(e,t),IC.init(e,t)});function BD(e,t,n){return new zD({type:`union`,options:t,discriminator:e,...Hb(n)})}var VD=U(`ZodIntersection`,(e,t)=>{LC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SE(e,t,n,r)});function HD(e,t){return new VD({type:`intersection`,left:e,right:t})}var UD=U(`ZodEnum`,(e,t)=>{BC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mE(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new UD({...t,checks:[],...Hb(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new UD({...t,checks:[],...Hb(r),entries:i})}});function q(e,t){return new UD({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Hb(t)})}var WD=U(`ZodLiteral`,(e,t)=>{VC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hE(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function J(e,t){return new WD({type:`literal`,values:Array.isArray(e)?e:[e],...Hb(t)})}var GD=U(`ZodTransform`,(e,t)=>{YE(),HC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_E(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Mx(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(px(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(px(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function KD(e){return new GD({type:`transform`,transform:e})}var qD=U(`ZodOptional`,(e,t)=>{WC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ME(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function JD(e){return new qD({type:`optional`,innerType:e})}var YD=U(`ZodExactOptional`,(e,t)=>{GC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ME(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function XD(e){return new YD({type:`optional`,innerType:e})}var ZD=U(`ZodNullable`,(e,t)=>{KC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function QD(e){return new ZD({type:`nullable`,innerType:e})}var $D=U(`ZodDefault`,(e,t)=>{qC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function eO(e,t){return new $D({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Rb(t)}})}var tO=U(`ZodPrefault`,(e,t)=>{YC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nO(e,t){return new tO({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Rb(t)}})}var rO=U(`ZodNonOptional`,(e,t)=>{XC.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iO(e,t){return new rO({type:`nonoptional`,innerType:e,...Hb(t)})}var aO=U(`ZodCatch`,(e,t)=>{$C.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function oO(e,t){return new aO({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Ex(t)})}var sO=U(`ZodPipe`,(e,t)=>{ew.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AE(e,t,n,r),e.in=t.in,e.out=t.out});function cO(e,t){return new sO({type:`pipe`,in:e,out:t})}var lO=U(`ZodReadonly`,(e,t)=>{nw.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uO(e){return new lO({type:`readonly`,innerType:e})}var dO=U(`ZodCustom`,(e,t)=>{iw.init(e,t),XE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gE(e,t,n,r)});function fO(e,t={}){return AT(dO,e,t)}function pO(e,t){return jT(e,t)}function mO(e){return iT(wD,e)}var hO=q([`project`,`default`,`session`]),gO=W().min(1).max(128),_O=RD([K({workspace:J(`default`)}).strict(),K({projectId:gO}).strict(),K({sessionId:gO}).strict()]),vO=W().min(1).max(4096).refine(e=>{let t=e.replaceAll(`\\`,`/`);return!t.startsWith(`/`)&&!t.includes(`\0`)&&t.split(`/`).every(e=>e!==`..`&&!e.includes(`:`))},`Expected a relative path inside the authorized root`).transform(e=>e.replaceAll(`\\`,`/`)),yO=W().regex(/^[a-f0-9]{64}$/);K({scope:_O,path:vO,content:W().max(1048576),expectedVersion:yO}).strict(),RD([K({workspace:J(`default`),path:vO,version:yO.optional()}).strict(),K({projectId:gO,path:vO,version:yO.optional()}).strict(),K({sessionId:gO,path:vO,version:yO.optional()}).strict()]),K({path:vO.default(`.`),limit:mO().int().min(1).max(200).default(50),cursor:W().min(1).max(2048).optional()}).strict();var bO=K({path:W(),realPath:W(),content:W(),version:yO,size:G().int().nonnegative(),encoding:J(`utf-8`)}),xO=bO.omit({content:!0,encoding:!0}).extend({previousVersion:yO}),SO=K({path:W(),name:W(),type:q([`file`,`directory`]),size:G().int().nonnegative().optional(),entryVersion:yO.optional()}),CO=K({items:PD(SO),nextCursor:W().nullable(),revision:yO}),wO=K({kind:J(`file`),scope:_O,path:vO,version:yO.optional()}).strict();K({q:W().trim().min(1).max(128)}).strict();var TO=K({items:PD(SO.pick({path:!0,name:!0})).max(60),partial:OD()}),EO={scope:_O,path:vO};BD(`action`,[K({...EO,action:J(`createFile`)}).strict(),K({...EO,action:J(`createDirectory`)}).strict(),K({...EO,action:q([`deleteFile`,`deleteDirectory`]),confirmed:J(!0),expectedVersion:yO}).strict(),K({...EO,action:q([`move`,`moveDirectory`]),destination:vO,expectedVersion:yO}).strict()]);var DO=K({path:vO,realPath:W(),previousPath:vO.optional(),previousRealPath:W().optional()}),OO=18e5,kO=3e5,AO=K({executable:W().min(1).max(4096).refine(e=>!e.includes(`\0`)),args:PD(W().max(8192).refine(e=>!e.includes(`\0`))).max(256).default([]),cwd:vO.default(`.`),timeoutMs:G().int().min(1).max(OO).default(kO)}).strict(),jO=AO.refine(e=>e.args.reduce((e,t)=>e+t.length,e.executable.length)<=65536),MO=K({command:W().min(1).max(65536).refine(e=>!e.includes(`\0`)),cwd:vO.default(`.`),timeoutMs:G().int().min(1).max(OO).default(kO)}).strict();BD(`mode`,[AO.extend({mode:J(`exec`)}),MO.extend({mode:J(`shell`)})]).superRefine((e,t)=>{e.mode===`exec`&&e.args.reduce((e,t)=>e+t.length,e.executable.length)>65536&&t.addIssue({code:`custom`,message:`command arguments exceed the 64 KiB limit`})});var NO=q([`CREATED`,`RUNNING`,`CANCELLING`,`COMPLETED`,`FAILED`,`CANCELLED`,`TIMED_OUT`,`INTERRUPTED`]);K({after:mO().int().min(0).max(2**53-1).default(0),limit:mO().int().min(1).max(500).default(100)}).strict();var PO=K({cursor:G().int().positive(),data:W().max(16384).refine(e=>new TextEncoder().encode(e).byteLength<=16384),channel:q([`stdout`,`stderr`]),timestamp:G().int()}).strict(),FO=K({status:NO,exitCode:G().int().nullable(),reasonCode:W().nullable(),truncated:OD(),startedAt:G().nullable(),endedAt:G().nullable()});K({}).strict();var IO=W().regex(/^cmd_[a-f0-9-]{36}$/);K({topic:J(`command`),resourceId:IO,after:G().int().min(0).max(2**53-1).default(0)}).strict();var LO=K({kind:J(`event`),protocolVersion:J(1),topic:J(`command`),eventId:W(),streamId:IO,resourceId:IO,sequence:G().int().nonnegative(),timestamp:G(),type:J(`command.status`),payload:FO}),RO=K({id:IO,scope:K({projectId:W()}).strict().or(K({sessionId:W()}).strict()),status:NO,exitCode:G().nullable(),reasonCode:W().nullable(),truncated:OD(),startedAt:G().nullable(),endedAt:G().nullable(),currentSequence:G().int().nonnegative()}),zO=K({chunks:PD(PO).max(500),oldestCursor:G().int().positive(),nextCursor:G().int().nonnegative(),truncated:OD(),resyncRequired:OD()}),BO=PO.extend({kind:J(`command.output`),resourceId:IO}).strict(),VO=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`],HO=[`stable`,`beta`],UO=q(VO),WO=q(HO);function GO(e){let t;try{t=new URL(e)}catch{return!1}return(t.protocol===`http:`||t.protocol===`https:`)&&t.username===``&&t.password===``&&t.pathname===`/`&&t.search===``&&t.hash===``}var KO=W().max(2048).refine(GO,`must be an http(s) origin without path, query or credentials`),qO=ID({host:W().min(1).max(255),port:ED().min(1).max(65535),publicUrl:KO.nullable(),trustedProxies:PD(W().min(1)).max(64)}),JO=ID({sessionTtlMinutes:ED().min(1).max(43200),idleTtlMinutes:ED().min(1).max(43200),requireHttpsForRemote:OD()}),YO=ID({rpId:W().min(1).max(253),rpName:W().min(1).max(128),origin:KO}),XO=ID({level:UO,retentionDays:ED().min(1).max(3650)}),ZO=ID({channel:WO,autoCheck:OD(),autoInstall:OD()}),QO=ID({enabled:OD().default(!0),port:G().int().min(1).max(65535).default(3211)}),$O=QO.parse({}),ek=ID({events:G().int().min(1).max(3650).default(90),turns:G().int().min(1).max(3650).default(180),summaries:G().int().min(1).max(3650).default(90)}),tk=ID({enabled:OD().default(!1),deleteSessions:OD().default(!1),keepPinned:OD().default(!0),retentionDays:ek.default({events:90,turns:180,summaries:90}),maxBytes:G().int().min(0).default(0)}),nk=tk.parse({}),rk=ID({memory:ID({enabled:OD().default(!0)}).default({enabled:!0})}),ik=ID({mode:q([`off`,`auto-local`,`vision`]).default(`auto-local`),maxPagesPerTurn:G().int().min(1).max(200).default(20),visionConnectionId:W().min(1).max(128).nullable().default(null)}),ak=ID({enabled:OD().default(!0),maxFileBytes:G().int().min(1).max(104857600).default(20971520),maxFilesPerTurn:G().int().min(1).max(32).default(8),maxFilesPerSession:G().int().min(1).max(2e3).default(200),maxExtractedChars:G().int().min(1e3).max(2e6).default(2e5),maxPdfPages:G().int().min(1).max(5e3).default(400),inlineTokensPerFile:G().int().min(256).max(128e3).default(8e3),inlineContextRatio:G().min(.01).max(.8).default(.15),extractionTimeoutMs:G().int().min(1e3).max(6e5).default(6e4),ocr:ik.default({mode:`auto-local`,maxPagesPerTurn:20,visionConnectionId:null})}),ok=ak.parse({}),sk=rk.parse({});ID({version:J(1),server:qO,auth:JO,webauthn:YO,logging:XO,updates:ZO,preview:QO.default($O),cleanup:tk.default(nk),agent:rk.default(sk),attachments:ak.default(ok)}),K({action:q([`start`,`stop`,`restart`]),expectedPm2Name:W().min(1).max(256),requestKey:W().min(1).max(256),confirmed:J(!0)}).strict();var ck=`[0-9a-f-]{36}`,lk=W().regex(RegExp(`^tgt_${ck}$`)),uk=W().regex(RegExp(`^bld_${ck}$`)),dk=W().regex(RegExp(`^art_${ck}$`)),fk=W().regex(RegExp(`^plan_${ck}$`)),pk=W().trim().min(1).max(80).regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/,`must be a simple service name`),mk=W().trim().min(1).max(64).regex(/^[A-Za-z0-9][A-Za-z0-9._+-]*$/,`must be a simple version label`);function hk(e){for(let t of e){let e=t.codePointAt(0)??0;if(e<=31||e===127)return!0}return!1}var gk=e=>!hk(e);function _k(e,t){return!e||e.length>1024||hk(e)||e.includes(`\\`)?!1:e===`.`?t:e.startsWith(`/`)||/^[A-Za-z]:/.test(e)?!1:e.split(`/`).every(e=>e.length>0&&e!==`.`&&e!==`..`)}var vk=W().min(1).max(1024).refine(e=>_k(e,!0),`must be a relative path inside the project`),yk=W().min(1).max(1024).refine(e=>_k(e,!1),`must be a relative directory inside the project`),bk=W().min(1).max(1024).refine(e=>e.startsWith(`/`)&&!e.includes(`..`)&&!hk(e),`must be an absolute HTTP path without traversal`),xk=PD(W().min(1).max(4096).refine(gk,`must not contain control characters`)).min(1).max(64),Sk=ID({command:xk,cwd:vk.default(`.`),outputDir:yk,timeoutMs:ED().min(1e3).max(OO).default(6e5)}),Ck=ID({command:xk,cwd:vk.default(`.`)}),wk=ID({path:bk,port:ED().min(1024).max(65535),timeoutMs:ED().min(1e3).max(3e5).default(6e4),intervalMs:ED().min(100).max(1e4).default(500)}),Tk=ID({version:mk,build:Sk,start:Ck,health:wk,recovery:ID({strategy:q([`restart`,`none`]),maxAttempts:ED().min(0).max(10).default(3)})});RD([ID({targetId:lk}),ID({name:pk})]);var Ek=ID({branch:W().max(255).nullable(),commit:W().max(128).nullable(),dirty:OD().nullable()});K({id:lk,projectId:W().min(1).max(128),name:pk,currentArtifactId:dk.nullable(),currentVersion:mk.nullable(),createdAt:ED(),updatedAt:ED()});var Dk=q([`RUNNING`,`SUCCEEDED`,`FAILED`,`CANCELLED`]);K({id:uk,targetId:lk,projectId:W().min(1).max(128),status:Dk,spec:Tk,specHash:W().regex(/^[a-f0-9]{64}$/),reasonCode:W().max(64).nullable(),logRef:W().min(1).max(1024),startedAt:ED().nullable(),endedAt:ED().nullable(),createdAt:ED()}),K({id:dk,buildId:uk,targetId:lk,projectId:W().min(1).max(128),version:mk,artifactHash:W().regex(/^[a-f0-9]{64}$/),sizeBytes:ED().nonnegative(),fileCount:ED().nonnegative(),source:Ek,createdAt:ED()});var Ok=q([`READY`,`WAITING_APPROVAL`,`AUTHORIZED`,`APPLYING`,`HEALTH_CHECK`,`SUCCEEDED`,`FAILED`,`CANCELLED`,`EXPIRED`,`INVALIDATED`,`UNKNOWN`]),kk=ID({strategy:q([`restart`,`none`]),maxAttempts:ED().min(0).max(10),previousArtifactAvailable:OD(),databaseRollback:J(`unsupported`)}),Ak=ID({scope:J(`single-service`),firstDeploy:OD(),restartRequired:J(!0),downtime:J(`brief`),replacesVersion:mk.nullable(),replacesArtifact:dk.nullable()}),jk=ID({version:J(1),targetId:lk,projectId:W().min(1).max(128),artifactId:dk,artifactHash:W().regex(/^[a-f0-9]{64}$/),artifactVersion:mk,previousArtifactId:dk.nullable(),previousVersion:mk.nullable(),specHash:W().regex(/^[a-f0-9]{64}$/),source:Ek,health:wk,recovery:kk,impact:Ak,expiresAt:ED().positive()});K({id:fk,targetId:lk,projectId:W().min(1).max(128),artifactId:dk,previousArtifactId:dk.nullable(),previousVersion:mk.nullable(),version:mk,status:Ok,plan:jk,planHash:W().regex(/^[a-f0-9]{64}$/),expiresAt:ED(),requestedBy:W().min(1).max(128),createdAt:ED()});var Mk=W().regex(RegExp(`^dauth_${ck}$`)),Nk=W().regex(RegExp(`^dapv_${ck}$`)),Pk=q([`apply`,`start`,`stop`,`restart`,`recover`]),Fk=q([`standard`,`strict`,`readonly`,`autonomous`]),Ik=ID({type:q([`human`,`agent`]),id:W().min(1).max(128)});ID({domain:J(`service-ops`),projectId:W().min(1).max(128),targetId:lk,action:Pk.default(`apply`),policy:Fk,policySnapshotId:W().min(1).max(128),actor:Ik,clientSessionId:W().min(1).max(128).nullable().default(null),sessionId:W().min(1).max(128).nullable().default(null),turnId:W().min(1).max(128).nullable().default(null)});var Lk=ID({domain:J(`service-ops`),projectId:W().min(1).max(128),targetId:lk,planId:fk,action:Pk,planHash:W().regex(/^[a-f0-9]{64}$/),artifactHash:W().regex(/^[a-f0-9]{64}$/)}),Rk=q([`PENDING`,`AUTHORIZED`,`DENIED`,`EXPIRED`,`REVOKED`,`CONSUMED`,`INVALIDATED`]),zk=q([`PENDING`,`APPROVED`,`DENIED`,`EXPIRED`,`REVOKED`]);K({id:Mk,planId:fk,targetId:lk,projectId:W().min(1).max(128),action:Pk,actorType:q([`human`,`agent`]),actorId:W().min(1).max(128),clientSessionId:W().min(1).max(128).nullable(),sessionId:W().min(1).max(128).nullable(),turnId:W().min(1).max(128).nullable(),policy:Fk,policySnapshotId:W().min(1).max(128),status:Rk,planHash:W().regex(/^[a-f0-9]{64}$/),artifactHash:W().regex(/^[a-f0-9]{64}$/),scope:Lk,scopeHash:W().regex(/^[a-f0-9]{64}$/),approvalId:Nk.nullable(),expiresAt:ED(),decidedAt:ED().nullable(),consumedAt:ED().nullable(),reasonCode:W().max(64).nullable(),createdAt:ED()}),K({id:Nk,authorizationId:Mk,planId:fk,targetId:lk,projectId:W().min(1).max(128),status:zk,planHash:W().regex(/^[a-f0-9]{64}$/),artifactHash:W().regex(/^[a-f0-9]{64}$/),requestedBy:W().min(1).max(128),decidedBy:W().min(1).max(128).nullable(),expiresAt:ED(),decidedAt:ED().nullable(),createdAt:ED()});var Bk=W().regex(RegExp(`^dep_${ck}$`)),Vk=q([`running`,`stopped`]),Hk=q([`stopped`,`starting`,`running`,`unhealthy`,`stopping`,`failed`,`unknown`]),Uk=K({targetId:lk,projectId:W().min(1).max(128),name:pk,pm2Name:W().min(1).max(256),namespace:W().min(1).max(64),namespaceMismatch:OD(),projectName:W().nullable(),source:q([`pm2-cli`,`deployment`]),version:mk.nullable(),artifactHash:W().regex(/^[a-f0-9]{64}$/).nullable(),desiredState:Vk,observedState:Hk,pid:ED().positive().nullable(),lastHealthAt:ED().nullable(),reasonCode:W().max(64).nullable(),updatedAt:ED()}),Wk=K({pm2Home:W().min(1).max(4096).optional(),items:PD(Uk),unassociated:PD(K({pm2Name:W(),reason:W()}))}),Gk=q([`APPLYING`,`HEALTH_CHECK`,`SUCCEEDED`,`FAILED`,`UNKNOWN`]);K({id:Bk,targetId:lk,planId:fk,authorizationId:Mk,artifactId:dk,previousArtifactId:dk.nullable(),previousVersion:mk.nullable(),version:mk,status:Gk,planHash:W().regex(/^[a-f0-9]{64}$/),artifactHash:W().regex(/^[a-f0-9]{64}$/),reasonCode:W().max(64).nullable(),startedAt:ED(),endedAt:ED().nullable(),createdAt:ED()}),K({topic:J(`service-ops`),resourceId:lk,after:ED().min(0).max(2**53-1).default(0)}).strict(),K({observedState:Hk,desiredState:Vk,version:mk.nullable(),artifactHash:W().regex(/^[a-f0-9]{64}$/).nullable(),pid:ED().positive().nullable(),deploymentId:Bk.nullable(),reasonCode:W().max(64).nullable()});var Kk=W().regex(RegExp(`^sauth_${ck}$`)),qk=q([`start`,`stop`,`restart`,`recover`]),Jk=q([`PENDING`,`AUTHORIZED`,`DENIED`,`EXPIRED`,`REVOKED`,`CONSUMED`]);ID({domain:J(`service-ops`),projectId:W().min(1).max(128),targetId:lk,action:qk,artifactHash:W().regex(/^[a-f0-9]{64}$/),version:mk}),K({id:Kk,targetId:lk,projectId:W().min(1).max(128),action:qk,actorType:q([`human`,`agent`]),actorId:W().min(1).max(128),clientSessionId:W().min(1).max(128).nullable(),sessionId:W().min(1).max(128).nullable(),turnId:W().min(1).max(128).nullable(),policy:Fk,policySnapshotId:W().min(1).max(128),status:Jk,artifactHash:W().regex(/^[a-f0-9]{64}$/),version:mk,scopeHash:W().regex(/^[a-f0-9]{64}$/),expiresAt:ED(),decidedAt:ED().nullable(),decidedBy:W().min(1).max(128).nullable(),consumedAt:ED().nullable(),reasonCode:W().max(64).nullable(),createdAt:ED()}),ID({version:J(1),artifactId:dk,targetId:lk,hash:W().regex(/^[a-f0-9]{64}$/),files:PD(ID({path:W().min(1).max(1024),size:ED().nonnegative(),hash:W().regex(/^[a-f0-9]{64}$/)}))}),K({available:OD(),nodeExecutable:W(),entry:W().nullable(),version:W().nullable(),home:W(),namespace:J(`larness`),serviceNamePattern:J(`larness:<projectId>:<serviceKey>`),project:K({id:W(),name:W(),root:W(),releaseRoot:W()}).nullable(),unassociatedServices:PD(K({pm2Name:W(),reason:W()})).optional(),services:PD(K({projectId:W(),projectName:W(),name:W(),pm2Name:W(),observedState:Hk,pid:ED().nullable(),updatedAt:ED()}))});var Yk=OD().default(!1),Xk=`workspace.sessions.changed`,Zk=`workspace.jobs.changed`,Qk=`memory.changed`,$k=BD(`kind`,[K({kind:J(`subscribed`),subscription:K({topic:J(`system`),resourceId:J(`system`)})}),K({kind:J(Xk)})]),eA=K({kind:J(Zk)}),tA=K({kind:J(Qk),scope:q([`project`,`global`]),projectId:W().optional(),memoryId:W(),action:q([`learned`,`updated`,`reviewed`,`forgotten`,`evicted`,`restored`,`purged`]),status:q([`active`,`review`,`rejected`,`superseded`,`expired`,`evicted`])}),nA=[`duration`,`tokens`,`context`,`steps`,`tool_calls`],rA=PD(K({path:W().min(1),changeType:q([`created`,`modified`]),version:W().min(1),existed:OD(),category:q([`deliverable`,`process`])})),iA=W().min(1).max(4096).refine(e=>!e.includes(`\0`),`Git path cannot contain NUL`),aA=W().min(1).max(255).refine(e=>!e.includes(`\0`)&&!e.startsWith(`-`),`Invalid branch name`),oA=W().regex(/^[a-f0-9]{64}$/),sA=PD(iA).min(1).max(200);RD([K({action:J(`add`),paths:sA}).strict(),K({action:J(`unstage`),paths:sA}).strict(),K({action:q([`stageFiles`,`unstageFiles`]),paths:sA,expectedSnapshot:oA}).strict(),K({action:J(`discard`),path:iA,confirmed:J(!0)}).strict(),K({action:J(`commit`),message:W().min(1).max(4e3)}).strict(),K({action:J(`createBranch`),name:aA}).strict(),K({action:J(`switchBranch`),name:aA}).strict(),K({action:J(`pull`)}).strict(),K({action:J(`push`)}).strict()]),K({action:q([`pull`,`push`]),expectedSnapshot:oA,requestId:sD()}).strict(),K({decision:q([`approve`,`reject`])}).strict(),K({path:W().min(1).max(4096),staged:q([`true`,`false`]).default(`false`)}).strict(),K({limit:mO().int().min(1).max(100).default(50),cursor:mO().int().nonnegative().default(0)}).strict(),K({limit:mO().int().min(1).max(200).default(100),cursor:mO().int().nonnegative().default(0)}).strict(),q([`script`,`agent`]);var cA=q([`skip`,`run_once`]),lA=q([`readonly`,`autonomous`]);q([`scheduled`,`manual`,`catch_up`]),q([`queued`,`running`,`succeeded`,`failed`,`timed_out`,`cancelled`,`interrupted`,`skipped`]),q([`JOB_SCRIPT_FAILED`,`JOB_TIMEOUT`,`JOB_RUN_CANCELLED`,`JOB_AGENT_FAILED`,`JOB_AGENT_INCOMPLETE`,`JOB_INTERRUPTED`,`JOB_OVERLAP`]);var uA=W().min(9).max(128).refine(e=>e.trim().split(/\s+/).length===5,`Cron 必须是 5 字段`),dA=W().min(1).max(64),fA=BD(`type`,[K({type:J(`cron`),expression:uA,timezone:dA}).strict(),K({type:J(`interval`),seconds:G().int().min(60).max(604800),timezone:dA}).strict()]),pA={name:W().trim().min(1).max(80),projectId:W().min(1).max(128).nullable(),schedule:fA,enabled:OD().default(!0),timeoutSeconds:G().int().min(60).max(3600).default(600),missedPolicy:cA.default(`skip`)};BD(`kind`,[K({...pA,kind:J(`script`),script:K({source:W().min(1).max(65536)}).strict()}).strict(),K({...pA,kind:J(`agent`),agent:K({prompt:W().trim().min(1).max(10240),model:W().min(1).max(128).nullable().optional(),credentialProfileId:W().min(1).max(128).nullable().optional(),thinking:W().min(1).max(32).nullable().optional(),approvalPolicy:lA.default(`readonly`)}).strict()}).strict()]),K({name:W().trim().min(1).max(80).optional(),enabled:OD().optional(),schedule:fA.optional(),timeoutSeconds:G().int().min(60).max(3600).optional(),missedPolicy:cA.optional(),script:K({source:W().min(1).max(65536)}).strict().optional(),agent:K({prompt:W().trim().min(1).max(10240).optional(),model:W().min(1).max(128).nullable().optional(),credentialProfileId:W().min(1).max(128).nullable().optional(),thinking:W().min(1).max(32).nullable().optional(),approvalPolicy:lA.optional()}).strict().optional()}).strict();var mA=[`project`,`global`],hA=[`fact`,`command`,`gotcha`,`decision`,`preference`],gA=[`active`,`review`,`rejected`,`superseded`,`expired`,`evicted`],_A=[`user_statement`,`command_succeeded`,`file_observed`,`failure_then_success`,`agent_inference`],vA=q(mA),yA=q(hA),bA=q(gA),xA=q(_A),SA=W().regex(/^[a-z0-9][a-z0-9._-]{2,79}$/,`key must be a lowercase slug`),CA=W().trim().min(1).max(120),wA=W().trim().min(1).max(4e3);K({scope:vA,kind:yA,key:SA,title:CA,body:wA,evidence:K({kind:xA,turnId:W().min(1).max(128),eventSeq:G().int().positive(),quote:W().min(1).max(2e3).optional()}).strict(),confidence:G().min(0).max(1).optional()}).strict(),K({scope:vA,kind:yA,key:SA,title:CA,body:wA,evidence:K({kind:xA,quote:W().min(1).max(2e3).optional()}).strict(),confidence:G().min(0).max(1).optional()}).strict(),K({keys:PD(SA).min(1).max(5).optional(),query:W().min(1).max(200).optional(),limit:G().int().min(1).max(5).optional()}).strict(),K({id:W(),scope:vA,projectId:W().nullable(),kind:yA,key:W(),title:W(),body:W(),status:bA,confidence:G(),evidenceKind:xA,sourceTurnId:W().nullable(),sourceEventSeq:G().nullable(),createdBy:q([`agent`,`user`]),useCount:G(),lastUsedAt:G().nullable(),lastConfirmedAt:G().nullable(),correctionCount:G(),pinned:OD(),bytes:G(),verifiedAt:G().nullable(),expiresAt:G().nullable(),createdAt:G(),updatedAt:G(),stale:OD(),revisionCount:G()});var TA=K({activeBytes:G(),totalBytes:G(),activeCount:G()});K({scope:vA,projectId:W().nullable(),activeBytes:G(),totalBytes:G(),activeCount:G(),reviewCount:G(),evictedCount:G(),limits:TA});var EA=q([`learned`,`updated`,`reviewed`,`forgotten`,`evicted`,`restored`,`purged`]);K({scope:vA,projectId:W().optional(),memoryId:W(),action:EA,status:bA});var DA=K({id:W().min(1).max(80),title:W().trim().min(1).max(200),detail:W().max(500).optional(),status:q([`pending`,`running`,`done`,`failed`])}).strict(),OA=K({title:W().trim().min(1).max(200),steps:PD(DA).min(1).max(12)}).strict().superRefine((e,t)=>{new Set(e.steps.map(e=>e.id)).size!==e.steps.length&&t.addIssue({code:`custom`,message:`Step IDs must be unique`}),e.steps.filter(e=>e.status===`running`).length>1&&t.addIssue({code:`custom`,message:`Only one step can be running`})}).safeExtend({id:W().min(1),kind:J(`plan`),createdAt:G().int().nonnegative(),turnId:W().optional()}),kA=W().regex(/^prc_[a-f0-9-]{36}$/),AA=q([`STARTING`,`RUNNING`,`STOPPING`,`EXITED`,`STOPPED`,`FAILED`]),jA=W().max(8192).refine(e=>!e.includes(`\0`));K({executable:W().min(1).max(4096).refine(e=>!e.includes(`\0`)),args:PD(jA).max(256).default([]),cwd:vO.default(`.`),name:W().min(1).max(80).optional(),port:G().int().min(1).max(65535).optional(),healthPath:W().min(1).max(2048).optional()}).strict().refine(e=>e.args.reduce((e,t)=>e+t.length,e.executable.length)<=65536),K({after:mO().int().min(0).max(2**53-1).default(0),limit:mO().int().min(1).max(500).default(100)}).strict();var MA=K({cursor:G().int().positive(),data:W().max(16384).refine(e=>new TextEncoder().encode(e).byteLength<=16384),channel:q([`stdout`,`stderr`]),timestamp:G().int()}).strict(),NA=K({id:kA,projectId:W().nullable(),sessionId:W(),name:W().nullable(),status:AA,executable:W(),cwd:W(),pid:G().int().nullable(),exitCode:G().int().nullable(),reasonCode:W().nullable(),startedAt:G().int().nullable(),endedAt:G().int().nullable(),port:G().int().min(1).max(65535).nullable(),healthPath:W().nullable(),previewEligible:OD(),outputCursor:G().int().nonnegative(),truncated:OD()}).strict();K({chunks:PD(MA).max(500),oldestCursor:G().int().positive(),nextCursor:G().int().nonnegative(),truncated:OD(),resyncRequired:OD()}).strict();var PA=W().regex(/^term_[a-f0-9-]{36}$/);K({title:W().min(1).max(80).refine(e=>[...e].every(e=>{let t=e.codePointAt(0)??0;return t>=32&&(t<127||t>159)})).transform(e=>e.trim()).pipe(W().min(1))}).strict();var FA=W().regex(/^[a-zA-Z0-9_-]{1,64}$/),IA=q([`CREATED`,`RUNNING`,`STOPPING`,`EXITED`,`TERMINATED`,`INTERRUPTED`]);K({scope:_O.optional(),cwd:vO.default(`.`),sourceSessionId:W().min(1).max(128).optional(),riskAcknowledged:J(!0)}).strict(),K({role:FA,executable:W(),args:PD(W()),cwd:vO.default(`.`).describe(`Project-relative working directory. Defaults to the project root (.). Use the package directory for a direct package command.`)}).strict().superRefine((e,t)=>{jO.safeParse(e&&{executable:e.executable,args:e.args,cwd:e.cwd}).success||t.addIssue({code:`custom`,message:`Invalid program parameters`})}),K({terminalId:PA,after:G().int().nonnegative().max(2**53-1).default(0),limit:G().int().min(1).max(500).default(100)}).strict(),K({terminalId:PA}).strict();var LA=K({kind:J(`terminal`),projectId:W().min(1),terminalId:PA,role:FA.nullable()}).strict(),RA=RD([wO,LA,K({kind:J(`preview`),projectId:W().min(1).max(128),serviceId:W().regex(/^svc_[a-f0-9-]{36}$/),path:W().min(1).max(2048),name:W().min(1).max(128).optional()}).strict()]);K({connectionId:W().uuid()}).strict(),K({terminalId:PA}).strict(),K({terminalId:PA,leaseGeneration:G().int().positive(),inputSequence:G().int().positive().max(2**53-1),data:W().min(1).max(8192).refine(e=>new TextEncoder().encode(e).length<=8192)}).strict(),K({terminalId:PA,leaseGeneration:G().int().positive()}).strict(),K({terminalId:PA,leaseGeneration:G().int().positive()}).strict(),K({action:q([`acquire`,`renew`,`release`]),connectionId:W().uuid(),leaseGeneration:G().int().positive().optional()}).strict(),K({connectionId:W().uuid(),leaseGeneration:G().int().positive(),cols:G().int().min(2).max(500),rows:G().int().min(1).max(300)}).strict(),K({type:J(`terminal.input`),terminalId:PA,leaseGeneration:G().int().positive(),inputSequence:G().int().positive().max(2**53-1),data:W().max(8192).refine(e=>new TextEncoder().encode(e).length<=8192)}).strict(),K({topic:J(`terminal`),resourceId:PA,after:G().int().nonnegative().max(2**53-1).default(0)}).strict();var zA=K({cursor:G().int().positive(),data:W().max(16384).refine(e=>new TextEncoder().encode(e).length<=16384),timestamp:G().int()}).strict(),BA=zA.extend({kind:J(`terminal.output`),resourceId:PA}).strict(),VA=K({ownerType:q([`human`,`agent`]),ownerClientSessionId:W(),ownerConnectionId:W().nullable(),ownerTurnId:W().nullable(),ownerExecutionId:W().nullable(),generation:G().int().positive(),expiresAt:G().int()}),HA=K({status:IA,exitCode:G().int().nullable(),reasonCode:W().nullable(),lease:VA.nullable()}),UA=K({kind:J(`event`),protocolVersion:J(1),topic:J(`terminal`),eventId:W(),streamId:PA,resourceId:PA,sequence:G().int().positive(),timestamp:G(),type:q([`terminal.created`,`terminal.status`,`terminal.exit`,`terminal.lease`]),payload:HA}),WA=K({writeBlocked:OD(),id:PA,projectId:W().nullable(),workspaceSessionId:W().nullable(),sourceSessionId:W().nullable(),cwd:W(),shell:W(),mode:q([`shell`,`dev`]),role:W().nullable(),title:W().nullable().default(null),status:IA,exitCode:G().nullable(),reasonCode:W().nullable(),currentSequence:G().int(),lease:VA.nullable()}),GA=K({chunks:PD(zA).max(500),nextCursor:G().int(),oldestCursor:G().int(),truncated:OD(),resyncRequired:OD()}),KA=K({kind:J(`subscribed`),connectionId:W().uuid(),subscription:K({topic:J(`terminal`),resourceId:W()})}),qA=K({kind:J(`terminal.input.ack`),inputSequence:G().int(),accepted:OD()}),JA=K({kind:J(`error`),code:W()}),YA=K({items:PD(WA),nextCursor:PA.nullable()}),XA=W().regex(/^svc_[a-f0-9-]{36}$/),ZA=q([`REGISTERING`,`STARTING`,`RUNNING`,`UNKNOWN`,`UNREGISTERED`]),QA=J(`temporary`),$A=K({host:q([`127.0.0.1`,`::1`]),port:G().int().min(1).max(65535),protocol:J(`http`)}).strict(),ej=K({kind:QA.describe(`temporary development preview only; registration does not create a persistent PM2 service`),terminalId:PA.describe(`Managed terminal owning the real listening process; not a PM2 targetId or pm2Name`),name:W().trim().min(1).max(80),endpoint:$A.describe(`Use the terminal listener's port and a loopback host value. The backend discovers the actual bind address, including wildcard listeners.`)}).strict();K({items:PD(K({id:XA,projectId:W().min(1).max(128),sourceSessionId:W().min(1).max(128).nullable(),name:W().min(1).max(80),kind:QA,status:ZA,terminalId:PA,terminalExecutionId:W().min(1).max(128),endpointGeneration:G().int().nonnegative(),endpoint:$A,previewEligible:OD(),reasonCode:W().nullable(),createdAt:G().int(),updatedAt:G().int(),endedAt:G().int().nullable()})),nextCursor:W().nullable()}),K({id:W().min(1).max(128),projectId:W().min(1).max(128),kind:J(`service.register`),risk:J(`L2`),status:q([`PREPARED`,`WAITING_APPROVAL`,`APPROVED`,`RUNNING`,`COMPLETED`,`FAILED`,`REJECTED`,`EXPIRED`,`INTERRUPTED`]),params:ej,paramsHash:W(),snapshotVersion:W(),requestedBy:W(),decidedBy:W().nullable(),expiresAt:G().int(),decidedAt:G().int().nullable(),startedAt:G().int().nullable(),endedAt:G().int().nullable(),result:AD(),createdAt:G().int()});var tj=K({status:ZA,terminalId:PA,terminalExecutionId:W().min(1).max(128),endpointGeneration:G().int().nonnegative(),reasonCode:W().nullable()});K({topic:J(`service`),resourceId:XA,after:G().int().min(0).max(2**53-1).default(0)}).strict();var nj=W().regex(/^(?:(?:project|session):[a-zA-Z0-9_-]{1,128}|workspace:default)$/),rj=W().regex(/^file:(?:(?:project|session):[a-zA-Z0-9_-]{1,128}|workspace:default)$/);K({topic:J(`file`),resourceId:nj,paths:PD(vO).min(1).max(128).default([`.`]),after:G().int().min(0).max(2**53-1).default(0)}).strict(),K({streamId:RD([rj,IO,PA,XA,W().regex(/^ops:tgt_[0-9a-f-]{36}$/)]),after:mO().int().min(0).max(2**53-1).default(0),limit:mO().int().min(1).max(500).default(100)}).strict();var ij=K({path:vO,version:yO.optional(),changeType:q([`created`,`modified`,`deleted`])}),aj=K({reasonCode:q([`WATCH_UNAVAILABLE`,`WATCH_LIMIT`,`SCAN_LIMIT`,`QUEUE_OVERFLOW`,`ROOT_UNAVAILABLE`,`DIRECTORY_REPLACED`,`RECOVERED`,`SCAN_FAILED`])}),oj=K({kind:J(`event`),protocolVersion:J(1),topic:J(`file`),eventId:W(),streamId:rj,sequence:G().int().nonnegative(),timestamp:G()}),sj=RD([oj.extend({type:J(`file.changed`),payload:ij}),oj.extend({type:J(`file.resync.required`),payload:aj})]),cj=K({items:PD(RD([sj,LO,UA,RD([K({kind:J(`event`),protocolVersion:J(1),topic:J(`service`),eventId:W(),streamId:XA,sequence:G().int().nonnegative(),timestamp:G(),projectId:W().optional()}).extend({type:q([`service.registered`,`service.status`,`service.unregistered`]),payload:tj})])])),currentSequence:G().int().nonnegative(),resyncRequired:OD()}),lj=K({kind:J(`subscribed`),subscription:K({topic:J(`file`),resourceId:nj}),currentSequence:G().int().nonnegative(),resyncRequired:OD(),partial:OD()}),uj=K({kind:J(`error`),code:W(),message:W()}),dj=class extends Error{status;code;details;constructor(e,t,n,r){super(n),this.name=`ApiError`,this.status=e,this.code=t,this.details=r}};function fj(e,t){if(!(e instanceof dj))return t;switch(e.code){case`RESOURCE_LOCKED`:return`项目正在写入,请稍后重试。`;case`GIT_CONFLICT`:return`仓库或工作区状态已变化,请刷新后重试。`;case`GIT_UNAVAILABLE`:return`Git 暂不可用,请检查主机上的 Git 和当前仓库。`;case`GIT_AUTH_REQUIRED`:return`远端认证失败,请检查运行 Larness 的主机上的 Git 凭据。`;case`APPROVAL_INVALID`:return`操作已过期或未获批准,请重新发起。`;case`FORBIDDEN`:case`UNAUTHORIZED`:return`当前操作没有权限。`;case`VALIDATION_ERROR`:return`输入无效,请核对后重试。`;default:return t}}var pj=null;function mj(e){pj=e}var hj=``;async function Y(e,t={}){let n={accept:`application/json`,...t.headers};t.body!==void 0&&(n[`content-type`]=`application/json`),t.csrf&&(n[`x-csrf-token`]=pj??``);let r=await fetch(`${hj}${e}`,{method:t.method??`GET`,credentials:`same-origin`,signal:t.signal,headers:n,body:t.body===void 0?void 0:JSON.stringify(t.body)}),i=await r.text(),a;if(i.length>0)try{a=JSON.parse(i)}catch{a=void 0}if(!r.ok){let t=a?.error,n=t?.code??`INTERNAL`,i=t?.message??`Request failed with ${r.status}`;throw r.status===401&&e!==`/api/auth/session`&&window.dispatchEvent(new Event(`larness:unauthenticated`)),new dj(r.status,n,i,t?.details)}return a}async function gj(e){return Y(`/api/fs/directories${e===void 0?``:`?path=${encodeURIComponent(e)}`}`)}async function _j(){return(await Y(`/api/projects`)).projects}async function vj(e){return Y(`/api/projects`,{method:`POST`,body:e,csrf:!0})}async function yj(e){await Y(`/api/projects/order`,{method:`PUT`,body:{projectIds:e},csrf:!0})}async function bj(e){await Y(`/api/projects/${encodeURIComponent(e)}`,{method:`DELETE`,csrf:!0})}async function xj(e){return Y(`/api/projects/${encodeURIComponent(e)}`)}async function Sj(e,t){await Y(`/api/projects/${encodeURIComponent(e)}`,{method:`PATCH`,body:t,csrf:!0})}async function Cj(){return(await Y(`/api/models`)).models}async function wj(){return Y(`/api/models/catalog`)}async function Tj(e){await Y(`/api/models/default`,{method:`PUT`,body:e,csrf:!0})}async function Ej(e){await Y(`/api/models/catalog/visibility`,{method:`PATCH`,body:e,csrf:!0})}async function Dj(e={}){return Y(`/api/models/catalog/refresh`,{method:`POST`,body:e,csrf:!0})}async function Oj(){return(await Y(`/api/models/presets`)).presets}async function kj(e,t,n){await Y(`/api/models/catalog/overrides`,{method:n===null?`DELETE`:`PUT`,body:{credentialProfileId:e,modelId:t,...n===null?{}:{override:n}},csrf:!0})}async function Aj(e,t){await Y(`/api/credentials/${encodeURIComponent(e)}/test`,{method:`POST`,body:{model:t},csrf:!0})}async function jj(){return(await Y(`/api/credentials`)).credentials}async function Mj(e){return Y(`/api/credentials`,{method:`POST`,body:e,csrf:!0})}async function Nj(e,t){await Y(`/api/credentials/${encodeURIComponent(e)}`,{method:`PATCH`,body:t,csrf:!0})}async function Pj(e){await Y(`/api/credentials/${encodeURIComponent(e)}`,{method:`DELETE`,csrf:!0})}async function Fj(){return(await Y(`/api/sessions?limit=100`)).sessions}async function Ij(e){return Y(`/api/sessions`,{method:`POST`,body:e,csrf:!0})}async function Lj(e){return Y(`/api/sessions/${encodeURIComponent(e)}/usage`)}async function Rj(e){return Y(`/api/sessions/${encodeURIComponent(e)}`)}async function zj(e,t){return Y(`/api/sessions/${encodeURIComponent(e)}`,{method:`PATCH`,body:t,csrf:!0})}async function Bj(){return Y(`/api/web-search/settings`)}async function Vj(e){return Y(`/api/web-search/connections`,{method:`POST`,body:e,csrf:!0})}async function Hj(e,t){return Y(`/api/web-search/connections/${encodeURIComponent(e)}`,{method:`PATCH`,body:t,csrf:!0})}async function Uj(e){await Y(`/api/web-search/connections/${encodeURIComponent(e)}`,{method:`DELETE`,csrf:!0})}async function Wj(e){return Y(`/api/web-search/connections/${encodeURIComponent(e)}/test`,{method:`POST`,csrf:!0})}async function Gj(e){return Y(`/api/web-search/settings`,{method:`PUT`,body:e,csrf:!0})}async function Kj(e){await Y(`/api/sessions/${encodeURIComponent(e)}`,{method:`DELETE`,csrf:!0})}function qj(e,t){return`/api/sessions/${encodeURIComponent(e)}/attachments/${encodeURIComponent(t)}`}function Jj(e,t){return`/api/sessions/${encodeURIComponent(e)}/attachments/${encodeURIComponent(t)}`}function Yj(e,t){return`${Jj(e,t)}/artifact`}async function Xj(e,t){let n=await new Promise((e,n)=>{let r=new FileReader;r.onerror=()=>n(Error(`读取附件失败`)),r.onload=()=>typeof r.result==`string`?e(r.result.slice(r.result.indexOf(`,`)+1)):n(Error(`读取附件失败`)),r.readAsDataURL(t)});return Y(`/api/sessions/${encodeURIComponent(e)}/attachments`,{method:`POST`,csrf:!0,body:{filename:t.name,...t.type?{mime:t.type}:{},data:n}})}async function Zj(e,t){return(await Y(`/api/sessions/${encodeURIComponent(e)}/attachments/${encodeURIComponent(t)}/transcribe`,{method:`POST`,csrf:!0,body:{}})).attachment}async function Qj(e,t){let n=[];for(let r of t){let t=await Xj(e,r);n.push({attachment:t.attachment,file:r})}return n}async function $j(e,t){return Y(Yj(e,t))}async function eM(e,t,n={}){let r=new URLSearchParams;n.line!==void 0&&r.set(`line`,String(n.line)),n.maxChars!==void 0&&r.set(`maxChars`,String(n.maxChars));let i=r.toString();return Y(`${Jj(e,t)}/source${i.length>0?`?${i}`:``}`)}async function tM(e,t,n){return Y(`/api/sessions/${encodeURIComponent(e)}/turns`,{method:`POST`,body:t,csrf:!0,headers:{"idempotency-key":n}})}async function nM(e){return Y(`/api/turns/${encodeURIComponent(e)}/cancel`,{method:`POST`,body:{},csrf:!0})}async function rM(e){return Y(`/api/turns/${encodeURIComponent(e)}/resume`,{method:`POST`,body:{},csrf:!0})}async function iM(e,t=0,n=200,r){return Y(`/api/sessions/${encodeURIComponent(e)}/events?after=${t}&limit=${n}`,r===void 0?{}:{signal:r})}async function aM(e,t=0,n=200){let r=[],i=t;for(;;){let t=typeof AbortSignal.timeout==`function`?AbortSignal.timeout(15e3):void 0,a=await iM(e,i,n,t);if(r.push(...a.items),i=a.nextSeq,!a.hasMore)return r}}async function Kee(e,t){await Y(`/api/approvals/${encodeURIComponent(e)}`,{method:`POST`,body:{decision:t},csrf:!0})}function qee(e){let t=[`#0A84FF`,`#FF9F0A`,`#30D158`,`#BF5AF2`,`#64D2FF`],n=Array.from(e.id).reduce((e,t)=>e+t.charCodeAt(0),0);return{id:e.id,kind:e.kind,name:e.name,rootPath:e.realPath,branch:null,git:e.gitDetected,runningTerminals:e.runningTerminals??0,accent:t[n%t.length]??t[0]}}function Jee(e){return{id:e.id,label:e.label,provider:e.provider===`openai-compatible`?`openai-compatible`:`deepseek`,model:e.model,detail:`${Math.round(e.capabilities.maxContextTokens/1e3)}K 上下文 · 工具调用`,maxContextTokens:e.capabilities.maxContextTokens}}function Yee(e){return{workspaceKind:hO.parse(e.workspaceKind??(e.projectId?`project`:`session`)),workspacePath:e.workspacePath,id:e.id,projectId:e.projectId,title:e.title,status:Yk.parse(e.hasActiveTurn)?`running`:`idle`,updatedAt:e.updatedAt}}var oM=Date.now(),sM=e=>e*6e4,Xee=[{id:`prj_larness`,name:`larness-web`,rootPath:`/Users/bulv/Desktop/Larness`,branch:`feat/agent-runtime`,git:!0,accent:`#0A84FF`,runningTerminals:1},{id:`prj_docs`,name:`docs-site`,rootPath:`/Users/bulv/Desktop/docs-site`,branch:null,git:!1,accent:`#FF9F0A`,runningTerminals:1}],Zee=[{id:`ses_1`,projectId:`prj_larness`,title:`实现 Agent 工具调用审批`,status:`idle`,updatedAt:oM-sM(2)},{id:`ses_2`,projectId:`prj_larness`,title:`修复终端重连时的 Tab 状态`,status:`idle`,updatedAt:oM-sM(48)},{id:`ses_3`,projectId:`prj_docs`,title:`整理文档站首页导航`,status:`idle`,updatedAt:oM-sM(95)},{id:`ses_4`,projectId:null,title:`调研 DeepSeek 流式工具调用`,status:`idle`,updatedAt:oM-sM(26)},{id:`ses_5`,projectId:null,title:`整理本周部署记录`,status:`idle`,updatedAt:oM-sM(180)}],Qee=[{id:`mdl_deepseek_chat`,label:`DeepSeek V3.2`,provider:`deepseek`,model:`deepseek-chat`,detail:`128K 上下文 · 工具调用`,maxContextTokens:128e3},{id:`mdl_deepseek_reasoner`,label:`DeepSeek R1`,provider:`deepseek`,model:`deepseek-reasoner`,detail:`推理模式 · 64K 上下文`,maxContextTokens:64e3},{id:`mdl_glm`,label:`GLM-4.6`,provider:`glm`,model:`glm-4.6`,detail:`200K 上下文 · 工具调用`,maxContextTokens:2e5}],$ee=[{id:`svc_web_dev`,projectId:`prj_larness`,name:`web-dev`,port:5173,status:`running`,runtime:`native`,kind:`development`,pid:48213,uptime:`2h 14m`},{id:`svc_api_dev`,projectId:`prj_larness`,name:`api-dev`,port:3001,status:`running`,runtime:`native`,kind:`development`,pid:48277,uptime:`1h 52m`},{id:`svc_web_prod`,projectId:`prj_larness`,name:`web-prod`,port:8080,status:`stopped`,runtime:`pm2`,kind:`production`},{id:`svc_docs_dev`,projectId:`prj_docs`,name:`docs-dev`,port:4321,status:`running`,runtime:`native`,kind:`development`,pid:48311,uptime:`38m`}],ete=[{id:`ter_1`,projectId:`prj_larness`,title:`pnpm dev`,cwd:`/Users/bulv/Desktop/Larness`,port:5173,status:`running`},{id:`ter_2`,projectId:null,title:`zsh`,cwd:`~`,status:`running`},{id:`ter_3`,projectId:`prj_docs`,title:`pnpm docs:dev`,cwd:`/Users/bulv/Desktop/docs-site`,port:4321,status:`running`}],tte=[{path:`apps/web/src/app/AppShell.tsx`,status:`modified`,staged:!1,additions:42,deletions:8},{path:`apps/web/src/features/chat/Composer.tsx`,status:`modified`,staged:!1,additions:18,deletions:3},{path:`packages/shared/src/events.ts`,status:`modified`,staged:!0,additions:9,deletions:0},{path:`docs/architecture/overview.md`,status:`modified`,staged:!0,additions:6,deletions:1},{path:`apps/web/src/components/windows/WindowLayer.tsx`,status:`added`,staged:!1,additions:74,deletions:0}],nte={cpuPercent:38,memoryUsedBytes:9.6*1024**3,memoryTotalBytes:16*1024**3,diskUsedBytes:284*1024**3,diskTotalBytes:460*1024**3,sampledAt:oM},rte=[{id:`msg_u_1`,kind:`message`,role:`user`,text:`把首页改成三栏工作台,然后构建并部署到生产服务。`,createdAt:oM-sM(6)},{id:`msg_a_1`,kind:`message`,role:`assistant`,text:`我先检查项目结构、构建脚本和现有端口,再把首页替换为三栏布局。构建完成后会给出部署计划,等你确认后才会切换生产服务。`,createdAt:oM-sM(5)},{id:`plan_1`,kind:`plan`,title:`执行计划`,createdAt:oM-sM(5),steps:[{id:`step_1`,title:`检查项目结构与构建脚本`,status:`done`},{id:`step_2`,title:`实现三栏工作台与窗口层`,status:`done`,detail:`12 个文件`},{id:`step_3`,title:`构建 web 并验证产物`,status:`done`},{id:`step_4`,title:`部署 web-prod 到 8080`,status:`pending`,detail:`等待你的批准`}]},{id:`tool_1`,kind:`tool`,name:`read_file`,summary:`读取 package.json 与 vite.config.ts`,args:`{ "paths": ["package.json", "apps/web/vite.config.ts"] }`,status:`done`,output:`2 个文件 · 1.8 KB · 发现 build / preview 脚本`,durationMs:84,createdAt:oM-sM(5)},{id:`tool_2`,kind:`tool`,name:`run_command`,summary:`pnpm --filter @larness/web build`,args:`{ "command": "pnpm --filter @larness/web build", "cwd": "." }`,status:`done`,output:`vite v7.1.7 building for production…
105
+ ✓ 1842 modules transformed
106
+ dist/assets/index-8f2a1c.js 412.8 kB │ gzip: 126.4 kB
107
+ ✓ built in 3.42s`,durationMs:3421,createdAt:oM-sM(4)},{id:`appr_1`,kind:`approval`,serviceName:`web-prod`,port:8080,version:`c0f3a2d · build 2026-10-31 20:44`,impact:`替换当前停止中的生产服务;健康检查通过后写入部署记录。`,status:`pending`,createdAt:oM-sM(3)}],ite={projects:Xee,sessions:Zee,models:Qee,host:nte,services:$ee,terminals:ete,gitChanges:tte},cM=new eee({defaultOptions:{queries:{staleTime:1/0,refetchOnWindowFocus:!1,retry:!1}}}),lM={projects:[],sessions:[],models:[],host:{cpuPercent:0,memoryUsedBytes:0,memoryTotalBytes:0,diskUsedBytes:0,diskTotalBytes:0,sampledAt:0},services:[],terminals:[],gitChanges:[]};async function ate(){let[e,t,n]=await Promise.all([_j(),Fj(),Cj()]);return{...lM,projects:e.map(qee),sessions:t.map(Yee),models:n.map(Jee)}}function uM(){let e=Jg({queryKey:[`workspace`],queryFn:ate,enabled:!0,staleTime:0,refetchInterval:1e4}),t=e.data??lM;return{...e,data:t,isPending:e.isPending}}function ote(){let e=Jg({queryKey:[`model-catalog`],queryFn:wj,enabled:!0,staleTime:0,retry:!1});return{catalog:e.data,isPending:e.isPending,error:e.error,refetch:e.refetch}}var dM=e=>[`session-detail`,e],fM=e=>[`session-usage`,e],pM=e=>[`save-session-settings`,e],mM=[`project-approval-policy`],ste=e=>[...mM,e??`prj_default`];function cte(e){return Jg({queryKey:ste(e),queryFn:()=>xj(e??`prj_default`),enabled:e!==void 0,staleTime:0}).data?.settings.defaultApprovalPolicyId??`standard`}function lte(e){return Jg({queryKey:fM(e),queryFn:()=>Lj(e??``),enabled:e!==null,staleTime:0,retry:2,retryDelay:e=>Math.min(1e3*2**e,5e3),refetchOnWindowFocus:!0,refetchOnReconnect:!0,refetchInterval:e=>e.state.data===void 0&&5e3}).data??null}var hM=[`web-search-settings`],ute={activeConnectionId:null,maxResults:5,maxSearchesPerTurn:6,maxFetchesPerTurn:4,connections:[]};function gM(){let e=Jg({queryKey:hM,queryFn:Bj,enabled:!0,staleTime:0,retry:!1});return{data:e.data??ute,isPending:e.isPending,error:e.error,refetch:e.refetch}}function dte(e){return Jg({queryKey:dM(e),queryFn:()=>Rj(e??``),enabled:e!==null,staleTime:0,retry:2,retryDelay:e=>Math.min(1e3*2**e,5e3)}).data??null}var _M=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},fte=(e=>e?_M(e):_M),pte=e=>e;function mte(e,t=pte){let n=h.useSyncExternalStore(e.subscribe,h.useCallback(()=>t(e.getState()),[e,t]),()=>t(e.getInitialState()));return h.useDebugValue(n),n}var vM=e=>{let t=fte(e),n=e=>mte(t,e);return Object.assign(n,t),n},yM=(e=>e?vM(e):vM);function hte(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return bM(i)?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var bM=e=>typeof e?.then==`function`,gte=e=>({then(t){return t?xM(t)(e):this}}),xM=e=>t=>{try{let n=e(t);return bM(n)?n:gte(n)}catch(e){return{then(t,n){return n?xM(n)(e):this}}}},SM=(e,t)=>(n,r,i)=>{let a={storage:hte(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(...e)=>(f(...e),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return xM(u.getItem.bind(u))(a.name).then(e=>{if(e){if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return bM(t)?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state]}return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).then(()=>void 0,n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{++s,u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>{try{return Promise.resolve(h())}catch(e){return Promise.reject(e)}},hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},CM=yM(e=>({drafts:{},saving:{},monitoring:{},closeRequest:null,edit:(t,n,r)=>e(e=>({drafts:{...e.drafts,[t]:{text:n,baseVersion:r}}})),discard:t=>e(e=>{let n={...e.drafts};return delete n[t],{drafts:n}})})),wM=new Map;function TM(e){wM.get(e)?.cancel(),wM.delete(e)}function _te(e,t){if(wM.has(e))return;let n=document.querySelector(`[data-window-frame="${CSS.escape(e)}"]`),r=document.querySelector(`[aria-label="项目窗口"]`);if(!n?.animate||!r||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches){t();return}let i=n.getBoundingClientRect(),a=r.getBoundingClientRect(),o=getComputedStyle(n).transform,s=o&&o!==`none`?`${o} `:``,c=n.animate([{transform:`${s}translate(0, 0) scale(1)`,opacity:1,pointerEvents:`none`},{transform:`${s}translate(${a.x+a.width/2-i.x-i.width/2}px, ${a.y+a.height/2-i.y-i.height/2}px) scale(.08)`,opacity:0,pointerEvents:`none`}],{duration:200,easing:`cubic-bezier(.4,0,.2,1)`,fill:`forwards`});wM.set(e,c),c.finished.then(()=>{wM.get(e)===c&&t()}).catch(()=>{}).finally(()=>{wM.get(e)===c&&wM.delete(e),c.cancel()})}function EM(e,t){return t.mode===`all`?!0:t.mode===`global`?e.projectId===null:e.projectId===t.projectId}function DM(e,t){return e.filter(e=>EM(e,t))}function OM(e,t){if(e[0]?.kind===`terminal`){let n=e.filter(e=>e.resourceId!==`terminal:empty`);return n.find(e=>e.id===t)??n.at(-1)??e[0]}return e.find(e=>e.id===t)??e[0]}function kM(e,t){let n=e.length;for(let r=e.length-1;r>=0;--r)if(e[r]?.projectId===t.projectId){n=r+1;break}let r=[...e];return r.splice(n,0,t),r}var AM=8,vte={files:{width:760,height:520},terminal:{width:680,height:420},services:{width:620,height:460},browser:{width:760,height:540},"git-diff":{width:720,height:480}};function jM(e,t){let n=Math.max(420,Math.min(e.width,Math.max(420,t.width-16))),r=Math.max(280,Math.min(e.height,Math.max(280,t.height-16))),i=Math.max(AM,t.width-n-AM),a=Math.max(AM,t.height-r-AM);return{width:n,height:r,x:Math.min(Math.max(AM,e.x),i),y:Math.min(Math.max(AM,e.y),a)}}function yte(e,t,n){let r=vte[e],i=Math.min(r.width,n.width-16),a=Math.min(r.height,n.height-16),o=t%5*28;return jM({width:i,height:a,x:Math.max(AM,n.width-i-56-o),y:Math.max(AM,32+o)},n)}function MM(e,t=null){return e?`project:${e}`:t?`session:${t}`:`global`}function NM(e){let t=e.tabs[0];return MM(t?.projectId??null,t?.sourceSessionId??null)}function PM(){return{width:window.innerWidth,height:Math.max(480,window.innerHeight-48)}}function FM(e,t){return{...e,width:e.width-t}}function IM(e){return`${e}_${crypto.randomUUID()}`}function LM(e){return e.reduce((e,t)=>Math.max(e,t.z),0)}function RM(e){return!e||e===`header`?`global`:e}function bte(e,t){return!e||e===`header`?null:t?{mode:`project`,projectId:t}:{mode:`global`}}var xte=new Set([`ter_1`,`svc_web_dev`,`browser_preview`]);function Ste(e){return e.projectId===`prj_larness`||xte.has(e.resourceId)||e.kind===`services`&&e.resourceId.startsWith(`svc_`)||e.kind===`browser`&&e.browser===void 0||e.kind===`files`&&e.file===void 0||e.kind===`git-diff`&&e.git===void 0}function Cte(e,t){let n=e??{};if(!Array.isArray(n.windows))return e;let r=Date.now(),i=0,a=n.windows.flatMap(e=>{let t=e.tabs.filter(e=>!Ste(e)).map(e=>({...e,viewKey:e.viewKey??(e.kind===`files`&&e.file?`file:${e.resourceId}`:e.kind===`git-diff`&&e.git?`diff:${e.projectId}:${e.git.path}`:e.kind===`browser`&&e.browser?`browser:${e.browser.serviceId}:${e.browser.path}`:`${e.kind}:${e.resourceId}`),createdAt:e.createdAt??r+i++}));if(!t.length)return[];let n=new Map;for(let e of t){let t=`${e.kind}:${MM(e.projectId,e.sourceSessionId)}`;n.set(t,[...n.get(t)??[],e])}return[...n.values()].map((t,n)=>({...e,id:n===0?e.id:`${e.id}:scope:${n}`,tabs:t,filter:{mode:`all`},activeTabId:OM(t,e.activeTabId)?.id??null}))});return{windows:a,focusedId:a.some(e=>e.id===n.focusedId)?n.focusedId??null:a.at(-1)?.id??null,zCounter:n.zCounter??10,lastFilters:n.lastFilters??{}}}var zM=yM()(SM((e,t)=>({closeRequest:null,windows:[],focusedId:null,zCounter:10,lastFilters:{},open:({kind:n,resourceId:r,title:i,projectId:a=null,sessionId:o=null,source:s=`header`,file:c,preview:l=!1,treeWidth:u,git:d,browser:f,activate:p=!0})=>{let m=t(),h=n===`files`&&c?`file:${r}`:n===`git-diff`&&d?`diff:${a}:${d.path}`:n===`browser`&&f?`browser:${f.serviceId}:${f.path}`:`${n}:${r}`,g=MM(a,o),_=m.windows.find(e=>NM(e)===g&&e.tabs.some(e=>e.viewKey?e.viewKey===h:e.kind===n&&e.resourceId===r)),v=Math.max(m.zCounter+1,LM(m.windows)+1),y=bte(s,a);if(_){p&&TM(_.id);let i=_.tabs.find(e=>e.viewKey?e.viewKey===h:e.kind===n&&e.resourceId===r),g=i&&(c||d||f)?{...i,...c?{file:c,preview:l&&i.preview===!0}:{},...d?{git:d}:{},...f?{browser:f}:{},projectId:a,sourceSessionId:o,originType:RM(s)}:void 0,b=g&&i?i.projectId===a?_.tabs.map(e=>e.id===i.id?g:e):kM(_.tabs.filter(e=>e.id!==i.id),g):_.tabs,x=i?EM(i,_.filter):!1,S=p?y??(x?_.filter:{mode:`all`}):x?_.filter:{mode:`all`};e({windows:m.windows.map(e=>e.id===_.id?{...e,...p?{minimized:!1,activeTabId:i?.id??e.activeTabId,z:v}:{},filter:S,tabs:b}:e),...p?{focusedId:_.id}:{},zCounter:p?v:m.zCounter,lastFilters:{...m.lastFilters,[n]:S}}),i&&u&&t().fitFileWindowBesideTree(i.id,u);return}let b={id:IM(`tab`),kind:n,resourceId:r,viewKey:h,createdAt:Date.now(),title:i,projectId:a,sourceSessionId:o,originType:RM(s),...c?{file:c,preview:l}:{},...d?{git:d}:{},...f?{browser:f}:{}},x=m.windows.find(e=>NM(e)===g&&e.tabs.some(e=>e.kind===n));if(x){p&&TM(x.id);let r=x.tabs;if(b.preview){let{drafts:e,saving:t}=CM.getState();r=r.flatMap(n=>n.preview?e[n.resourceId]||t[n.resourceId]?[{...n,preview:!1}]:[]:[n])}r=kM(r,b);let i=y??x.filter;EM(b,i)||(i={mode:`all`}),e({windows:m.windows.map(e=>e.id===x.id?{...e,tabs:r,...p?{activeTabId:b.id,minimized:!1,z:v}:{},filter:i}:e),...p?{focusedId:x.id}:{},zCounter:p?v:m.zCounter,lastFilters:{...m.lastFilters,[n]:i}}),u&&t().fitFileWindowBesideTree(b.id,u);return}let S=y??m.lastFilters[n]??{mode:`all`};EM(b,S)||(S={mode:`all`});let C=PM(),w=yte(n,m.windows.length,n===`files`&&u?FM(C,u):C),T={id:IM(`win`),tabs:[b],activeTabId:p?b.id:null,filter:S,...w,z:v,minimized:!p,maximized:!1,pinned:!1,restore:null};e({windows:[...m.windows,T],...p?{focusedId:T.id}:{},zCounter:v,lastFilters:{...m.lastFilters,[n]:S}})},focus:n=>{TM(n);let r=t(),i=r.windows.find(e=>e.id===n);if(!i)return;let a=OM(DM(i.tabs,i.filter),i.activeTabId)?.id??null;if(r.focusedId===n&&!i.minimized&&a===i.activeTabId)return;let o=Math.max(r.zCounter+1,LM(r.windows)+1);e({windows:r.windows.map(e=>e.id===n?{...e,activeTabId:a,minimized:!1,z:o}:e),focusedId:n,zCounter:o})},close:n=>{let r=t().windows.find(e=>e.id===n);r&&(r.tabs.some(e=>[`files`,`git-diff`,`browser`].includes(e.kind))?e({closeRequest:{windowId:n,tabIds:r.tabs.map(e=>e.id)}}):t().hide(n))},hide:n=>{_te(n,()=>{let r=t();e({windows:r.windows.map(e=>e.id===n?{...e,minimized:!0}:e),focusedId:r.focusedId===n?r.windows.find(e=>e.id!==n&&!e.minimized)?.id??null:r.focusedId})})},hideScope:e=>{let{windows:n,hide:r}=t();for(let t of n)!t.minimized&&!t.pinned&&NM(t)===e&&r(t.id)},restore:e=>{t().focus(e)},toggleMaximize:n=>{e({windows:t().windows.map(e=>e.id===n?{...e,maximized:!e.maximized,restore:e.maximized?null:{x:e.x,y:e.y,width:e.width,height:e.height}}:e)})},togglePin:n=>{let r=t(),i=Math.max(r.zCounter+1,LM(r.windows)+1);e({windows:r.windows.map(e=>e.id===n?{...e,pinned:!e.pinned,z:i}:e),zCounter:i,focusedId:n})},setActiveTab:(n,r)=>{e({windows:t().windows.map(e=>e.id===n?{...e,activeTabId:r}:e)})},keepFileTab:n=>{let{windows:r}=t(),i=r.find(e=>e.tabs.some(e=>e.id===n&&e.preview));i&&e({windows:r.map(e=>e.id===i.id?{...e,tabs:e.tabs.map(e=>e.id===n?{...e,preview:!1}:e)}:e)})},fitFileWindowBesideTree:(n,r)=>{let{windows:i}=t(),a=FM(PM(),r),o=i.find(e=>e.tabs.some(e=>e.id===n&&e.file));!o||!o.maximized&&o.x+o.width<=a.width||e({windows:i.map(e=>e.id===o.id?{...o,...jM(o,a),maximized:!1,restore:null}:e)})},closeTab:(n,r)=>{let i=t(),a=i.windows.find(e=>e.id===n);if(!a)return;if(a.tabs.length<=1){e({windows:i.windows.filter(e=>e.id!==n),focusedId:null});return}let o=a.tabs.filter(e=>e.id!==r),s=OM(DM(o,a.filter),a.activeTabId)?.id??null;e({windows:i.windows.map(e=>e.id===n?{...e,tabs:o,activeTabId:s}:e)})},setBounds:(n,r)=>{e({windows:t().windows.map(e=>e.id===n?{...e,...jM(r,PM())}:e)})},setFilter:(n,r)=>{let i=t(),a=i.windows.find(e=>e.id===n);if(!a)return;let o=OM(DM(a.tabs,r),a.activeTabId)?.id??null;e({windows:i.windows.map(e=>e.id===n?{...e,filter:r,activeTabId:o}:e),lastFilters:{...i.lastFilters,[a.tabs[0]?.kind??`terminal`]:r}})}}),{name:`larness.windows.v2`,version:4,migrate:Cte,partialize:e=>({windows:e.windows,focusedId:e.focusedId,zCounter:e.zCounter,lastFilters:e.lastFilters})}));function BM(e){return`projectId`in e?`project:${e.projectId}`:`sessionId`in e?`session:${e.sessionId}`:`workspace:default`}function VM(e,t){return[`files`,BM(e),`content`,t]}async function HM(e,t){return bO.parse(await Y(`/api/files?${new URLSearchParams({...e,path:t})}`))}async function wte(e,t,n,r){return xO.parse(await Y(`/api/files`,{method:`PUT`,csrf:!0,headers:{"Idempotency-Key":crypto.randomUUID()},body:{scope:e,path:t,content:n,expectedVersion:r}}))}function UM(e){let[t,n]=BM(e).split(`:`);return`/api/${t===`project`?`projects`:t===`session`?`sessions`:`workspaces`}/${encodeURIComponent(n)}/files`}async function WM(e,t,n){let r=new URLSearchParams({path:t,...n?{cursor:n}:{}});return CO.parse(await Y(`${UM(e)}?${r}`))}async function Tte(e,t,n){return TO.parse(await Y(`${UM(e)}/search?${new URLSearchParams({q:t})}`,{signal:n}))}async function Ete(e,t){return DO.parse(await Y(`/api/files/actions`,{method:`POST`,csrf:!0,headers:{"Idempotency-Key":t},body:e}))}function GM(e){if(e instanceof dj){if([`FILE_NOT_EDITABLE`,`PAYLOAD_TOO_LARGE`].includes(e.code))return`不支持编辑:仅支持 512 KiB 以内的普通 UTF-8 文本。`;if(e.code===`CONFLICT`)return`名称已存在或路径已变化,请核对后重试。`;if(e.code===`VALIDATION_ERROR`)return`请使用有效的文件名和工作区内路径。`;if(e.code===`VERSION_CONFLICT`)return`磁盘文件已变化,草稿已保留。`;if(e.code===`RESOURCE_LOCKED`)return`项目正在写入,请稍后重试;草稿已保留。`;if([`NOT_FOUND`,`FORBIDDEN`,`PATH_OUTSIDE_PROJECT`].includes(e.code))return`文件不可用或已失去访问权限;本地草稿已保留。`}return`文件操作失败,请刷新后重试;本地草稿已保留。`}async function KM(e,t,n,{preview:r=!1,signal:i,treeWidth:a}={}){let o=await cM.fetchQuery({queryKey:VM(e,t),queryFn:()=>HM(e,t),staleTime:0});return i?.aborted||zM.getState().open({kind:`files`,preview:r,treeWidth:a,resourceId:o.realPath,title:o.path.split(`/`).at(-1)??o.path,projectId:`projectId`in e?e.projectId:null,sessionId:`sessionId`in e?e.sessionId:null,source:n,file:{scope:e,path:o.path}}),o}var qM=new Map;function JM(e){let t=qM.get(e.resourceId);if(t)return t;let n=CM.getState().drafts[e.resourceId],r=e.file;if(!n||!r)return Promise.resolve();CM.setState(t=>({saving:{...t.saving,[e.resourceId]:!0}}));let i=(async()=>{try{let t=await wte(r.scope,r.path,n.text,n.baseVersion);cM.setQueryData(VM(r.scope,r.path),{...t,content:n.text,encoding:`utf-8`});let i=CM.getState().drafts[e.resourceId];i===n?CM.getState().discard(e.resourceId):i&&CM.getState().edit(e.resourceId,i.text,t.version)}finally{CM.setState(t=>({saving:{...t.saving,[e.resourceId]:!1}})),qM.delete(e.resourceId),cM.invalidateQueries({queryKey:VM(r.scope,r.path)})}})();return qM.set(e.resourceId,i),i}function YM(e,t){let n=t.previousRealPath,r=t.previousPath;if(!n||!r)return;let i=BM(e),a=zM.getState().windows,o=e=>e.resourceId===n&&e.file&&BM(e.file.scope)===i;if(!a.some(e=>e.tabs.some(o)))return;let s=t.realPath,c=CM.getState(),l=c.drafts[n];l&&c.drafts[s]||(l&&(c.edit(s,l.text,l.baseVersion),a.some(e=>e.tabs.some(e=>e.resourceId===n&&!o(e)))||c.discard(n)),zM.setState({windows:a.map(n=>{let r=n.tabs.find(o);if(!r)return n;let i=n.tabs.filter(e=>e.id===r.id||e.resourceId!==s);return{...n,activeTabId:i.some(e=>e.id===n.activeTabId)?n.activeTabId:r.id,tabs:i.map(n=>n.id===r.id?{...n,resourceId:s,viewKey:`file:${s}`,title:t.path.split(`/`).at(-1)??t.path,file:{scope:e,path:t.path},preview:!1}:n)}})}))}function Dte(e,t){let{previousPath:n,previousRealPath:r}=t;if(!n||!r)return;let i=r.replaceAll(`\\`,`/`),a=t.realPath.includes(`\\`)?`\\`:`/`,o=zM.getState().windows.flatMap(e=>e.tabs);for(let r of o){if(!r.file||BM(r.file.scope)!==BM(e)||!r.file.path.startsWith(`${n}/`)||!r.resourceId.replaceAll(`\\`,`/`).startsWith(`${i}/`))continue;let o=r.file.path.slice(n.length+1);YM(e,{path:`${t.path}/${o}`,realPath:`${t.realPath}${a}${o.replaceAll(`/`,a)}`,previousPath:r.file.path,previousRealPath:r.resourceId})}}function Ote({children:e,rename:t,copy:n,chat:r,move:i,remove:a,createFile:o,createDirectory:s}){let[c,l]=(0,h.useState)(null),[u,d]=(0,h.useState)(!1),f=(e,t)=>{l({x:e,y:t}),d(!0)};return(0,g.jsxs)(g.Fragment,{children:[(0,h.cloneElement)(e,{onContextMenu:e=>{e.preventDefault(),e.currentTarget.focus({preventScroll:!0}),f(e.clientX,e.clientY)},onKeyDown:e=>{if(e.key!==`ContextMenu`&&!(e.shiftKey&&e.key===`F10`))return;let t=e.currentTarget.getBoundingClientRect();e.preventDefault(),f(t.left,t.bottom)}}),(0,g.jsxs)(nm,{open:u,onOpenChange:d,modal:!1,children:[(0,g.jsx)(rm,{asChild:!0,children:(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none fixed size-px`,style:{left:c?.x,top:c?.y}})}),(0,g.jsxs)(am,{align:`start`,sideOffset:0,onCloseAutoFocus:e=>e.preventDefault(),children:[(0,g.jsx)(sm,{onSelect:n,children:`复制相对路径`}),(0,g.jsx)(sm,{onSelect:r,children:`发送到聊天框`}),(0,g.jsx)(lm,{}),o?(0,g.jsx)(sm,{onSelect:o,children:`新建文件`}):null,s?(0,g.jsx)(sm,{onSelect:s,children:`新建文件夹`}):null,o||s?(0,g.jsx)(lm,{}):null,t?(0,g.jsx)(sm,{onSelect:t,children:`重命名`}):null,i?(0,g.jsx)(sm,{onSelect:i,children:`移动`}):null,a?(0,g.jsx)(sm,{onSelect:a,className:`text-danger`,children:`删除…`}):null]})]})]})}function XM({label:e,initial:t,kind:n,busy:r,submit:i,cancel:a}){let[o,s]=(0,h.useState)(t),c=n===`directory`?Go:Fo,l=()=>{if(r)return;let e=o.trim();!e||o===t?a():i(e)};return(0,g.jsxs)(`form`,{className:`flex h-[26px] min-w-0 items-center gap-1.5 pr-1`,onSubmit:e=>{e.preventDefault(),l()},children:[(0,g.jsx)(`span`,{className:`w-[11px]`}),(0,g.jsx)(c,{size:14,className:`shrink-0 text-ink-3`}),(0,g.jsx)(fm,{ref:e=>{e&&e.focus()},variant:`bare`,className:`h-6 w-full rounded-sm border border-accent/45 bg-surface px-1.5 text-[11px] text-ink outline-none`,"aria-label":e,placeholder:e,value:o,maxLength:255,readOnly:r,onChange:e=>s(e.target.value),onBlur:l,onKeyDown:e=>{e.key===`Escape`&&!r&&(e.stopPropagation(),a())}})]})}function kte({scope:e,source:t,directorySource:n=!1,busy:r,error:i,move:a,close:o}){let[s,c]=(0,h.useState)(`.`),l=$g({queryKey:[`files`,BM(e),`directory`,s],initialPageParam:void 0,queryFn:({pageParam:t})=>WM(e,s,t),getNextPageParam:e=>e.nextCursor??void 0,retry:!1});return(0,g.jsx)(Hc,{open:!0,onOpenChange:e=>{!e&&!r&&o()},children:(0,g.jsxs)(Wc,{className:`space-y-3`,children:[(0,g.jsx)(Gc,{children:n?`移动目录`:`移动文件`}),(0,g.jsx)(Kc,{className:`break-all`,children:t}),(0,g.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs`,children:[(0,g.jsx)(`span`,{className:`truncate`,children:s===`.`?`工作区根目录`:s}),s===`.`?null:(0,g.jsx)(V,{type:`button`,variant:`secondary`,disabled:r,onClick:()=>c(s.split(`/`).slice(0,-1).join(`/`)||`.`),children:`返回上级`})]}),(0,g.jsxs)(`div`,{className:`max-h-[40vh] overflow-auto`,children:[l.data?.pages.flatMap(e=>e.items).filter(e=>e.type===`directory`&&(!n||e.path!==t)).map(e=>(0,g.jsxs)(`button`,{type:`button`,disabled:r,onClick:()=>c(e.path),className:`flex w-full items-center gap-2 rounded p-2 text-left text-xs hover:bg-surface-2`,children:[(0,g.jsx)(Go,{size:14,className:`text-warning`}),e.name]},e.path)),l.hasNextPage?(0,g.jsx)(`button`,{type:`button`,disabled:r||l.isFetchingNextPage,className:`p-2 text-xs text-accent`,onClick:()=>void l.fetchNextPage(),children:`加载更多`}):null]}),l.isPending?(0,g.jsx)(`p`,{role:`status`,className:`text-xs`,children:`正在读取目录…`}):null,(0,g.jsx)(qc,{message:i??(l.isError?GM(l.error):null),retry:l.isError?{label:`重试`,run:()=>void l.refetch()}:void 0}),(0,g.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,g.jsx)(V,{type:`button`,variant:`secondary`,disabled:r,onClick:o,children:`取消`}),(0,g.jsx)(V,{type:`button`,disabled:r||!l.isSuccess||t.split(`/`).slice(0,-1).join(`/`)===(s===`.`?``:s),onClick:()=>a(s),children:r?`正在移动…`:`移到这里`})]})]})})}function Ate({path:e,directory:t,busy:n,error:r,stale:i,remove:a,close:o}){return(0,g.jsx)(Jc,{open:!0,title:t?`删除目录`:`删除文件`,description:(0,g.jsxs)(g.Fragment,{children:[`将永久删除 `,(0,g.jsx)(`span`,{className:`break-all font-mono text-ink`,children:e}),t?` 及其下的所有文件和子目录,包括隐藏文件和忽略项。`:`。`]}),confirmLabel:`确认删除`,pendingLabel:`正在删除…`,danger:!0,pending:n,confirmDisabled:i,error:r,onConfirm:a,onCancel:o})}var jte=`/assets/3d-GvfzDZ80.svg`,Mte=`/assets/abap-zcHrj5Xb.svg`,Nte=`/assets/abc-BQOYa5wK.svg`,Pte=`/assets/actionscript-1utLHLAz.svg`,Fte=`/assets/ada-Cy6ba0Qq.svg`,Ite=`/assets/adobe-illustrator-sWEEUrcs.svg`,Lte=`/assets/adobe-illustrator_light-D2DPvhMa.svg`,Rte=`/assets/adobe-photoshop-C9zHvesC.svg`,zte=`/assets/adobe-photoshop_light-NN072IT9.svg`,Bte=`/assets/adobe-swc-LNQHFox2.svg`,Vte=`/assets/adonis-DhCi1CYk.svg`,Hte=`/assets/advpl-include.clone-VnvrVExx.svg`,Ute=`/assets/advpl-ptm.clone-CYO0PaUz.svg`,Wte=`/assets/advpl-tlpp.clone-DfmYKqy_.svg`,Gte=`/assets/advpl-Bp9JCc1p.svg`,Kte=`/assets/agent-BxOtSm05.svg`,qte=`/assets/ahk2.clone-B37eSFwd.svg`,Jte=`/assets/amplify-DRZRkWT8.svg`,Yte=`/assets/android-CpjzHt5t.svg`,Xte=`/assets/angular-component.clone-DPfQ4F6H.svg`,Zte=`/assets/angular-directive.clone-mvknCQzz.svg`,Qte=`/assets/angular-guard.clone-4k8JYMtP.svg`,$te=`/assets/angular-interceptor.clone-D8NJcCc2.svg`,ene=`/assets/angular-pipe.clone-Ci6wBNx-.svg`,tne=`/assets/angular-guard.clone-4k8JYMtP.svg`,nne=`/assets/angular-service.clone-DCol0S-k.svg`,rne=`/assets/angular-DFUdV-A_.svg`,ine=`/assets/antlr-CZ6ONsGE.svg`,ane=`/assets/apiblueprint-BiEj4kUZ.svg`,one=`/assets/apollo-B7lxyZr2.svg`,sne=`/assets/applescript-C5GvYDyf.svg`,cne=`/assets/apps-script-Be0-6z7A.svg`,lne=`/assets/appveyor-Cs4ENZv5.svg`,une=`/assets/appwrite-BUKExqzc.svg`,dne=`/assets/architecture-B6M6RHiH.svg`,fne=`/assets/arduino-CbQWXj_a.svg`,pne=`/assets/asciidoc-B22TwDpY.svg`,mne=`/assets/assembly-Bet93dzY.svg`,hne=`/assets/astro-config-DdwU1MRK.svg`,gne=`/assets/astro-BUUa0maZ.svg`,_ne=`/assets/astyle-BRf7s52j.svg`,vne=`/assets/audio-Bywf1Co-.svg`,yne=`/assets/aurelia-tU1uCks4.svg`,bne=`/assets/authors-BdJurtAa.svg`,xne=`/assets/auto-DVjjVkxv.svg`,Sne=`/assets/auto_light-D1xqv5Lr.svg`,Cne=`/assets/autohotkey-ByBHDxk_.svg`,wne=`/assets/autoit-JVlbsvw0.svg`,Tne=`/assets/azure-pipelines-B9Fm_WoB.svg`,Ene=`/assets/azure-CYStDhcY.svg`,Dne=`/assets/babel-CfbwjPI_.svg`,One=`/assets/ballerina-WYd0LP1Y.svg`,kne=`/assets/bashly-hook-9Mv8LRrF.svg`,Ane=`/assets/bashly-settings.clone-DfYFKY3x.svg`,jne=`/assets/bashly-settings_light.clone-CMEpG_2X.svg`,Mne=`/assets/bashly-strings.clone-NTfg7QoB.svg`,Nne=`/assets/bashly-strings_light.clone-Q97hcxOA.svg`,Pne=`/assets/bashly-DHSkixAO.svg`,Fne=`/assets/bazel-B1jD6CCP.svg`,Ine=`/assets/bbx-H7h3lOC1.svg`,Lne=`/assets/beancount-X9cePwfk.svg`,Rne=`/assets/bench-js-AfVYS5Q-.svg`,zne=`/assets/bench-jsx-CYYSNEDq.svg`,Bne=`/assets/bench-ts-J3RbQZA1.svg`,Vne=`/assets/bibliography-Cfqz-V_v.svg`,Hne=`/assets/bibtex-style-Bga8_ko3.svg`,Une=`/assets/bicep-BArUVCZd.svg`,Wne=`/assets/biome-C4m9PMtY.svg`,Gne=`/assets/bitbucket-DQMkNffy.svg`,Kne=`/assets/bithound-vUP4w_31.svg`,qne=`/assets/blender-CUL5vLUh.svg`,Jne=`/assets/blink-BI7IXV1Z.svg`,Yne=`/assets/blink_light-COZodupG.svg`,Xne=`/assets/blitz-Dm9VjppV.svg`,Zne=`/assets/bower-LboQHWQ3.svg`,Qne=`/assets/brainfuck-RilAqwD6.svg`,ZM=`/assets/browserlist-CuPoqIMP.svg`,QM=`/assets/browserlist_light-BYnXyEhm.svg`,$M=`/assets/bruno-DSx1B-A_.svg`,eN=`/assets/buck-Cc_ZWrU4.svg`,tN=`/assets/bucklescript--vVE5GB7.svg`,nN=`/assets/buildkite-BK4a2dN6.svg`,rN=`/assets/bun-DsZhmzEY.svg`,iN=`/assets/bun_light-BfmVf7QK.svg`,aN=`/assets/c-DSMamfmd.svg`,oN=`/assets/c3-busjNPxF.svg`,sN=`/assets/cabal-CXQaD4_8.svg`,cN=`/assets/caddy-C-yl9ops.svg`,lN=`/assets/cadence-BnzFLh7c.svg`,uN=`/assets/cairo-BQe5JbWT.svg`,dN=`/assets/cake-CIWNoe3H.svg`,fN=`/assets/capacitor-BVrtN6NN.svg`,pN=`/assets/capnp-DOYFucQK.svg`,mN=`/assets/cbx-izdt45Dy.svg`,hN=`/assets/cds-DrciT9mt.svg`,gN=`/assets/certificate-Itcn-kkw.svg`,_N=`/assets/changelog-DQV91D4J.svg`,vN=`/assets/chess-CaTYZWGa.svg`,yN=`/assets/chess_light-c5ZDShuN.svg`,bN=`/assets/chromatic-DJlR9Ku7.svg`,xN=`/assets/chrome-C0OlHOjg.svg`,SN=`/assets/circleci-9ttw_4fs.svg`,CN=`/assets/circleci_light-DmqaKCg8.svg`,wN=`/assets/citation-o698k82_.svg`,TN=`/assets/clangd-DcGtRW6m.svg`,EN=`/assets/claude-3t_S_T_H.svg`,DN=`/assets/cline-DvmTAOWh.svg`,ON=`/assets/clojure-B26qS46w.svg`,kN=`/assets/cloudfoundry-Izs71g2t.svg`,AN=`/assets/cmake-BQaPjfyp.svg`,jN=`/assets/coala-BnxMg8iZ.svg`,MN=`/assets/cobol-BU0pDfAq.svg`,NN=`/assets/coconut-DzmjzewY.svg`,PN=`/assets/code-climate-HCb00Ja6.svg`,FN=`/assets/code-climate_light-Cs-8tGCu.svg`,IN=`/assets/codecov-Ca2J08eE.svg`,LN=`/assets/codeowners-D6jwx6Op.svg`,RN=`/assets/coderabbit-ai-h2jUCqTF.svg`,zN=`/assets/coffee-Cx6lN0Om.svg`,BN=`/assets/coldfusion-C_cwuVYt.svg`,VN=`/assets/coloredpetrinets-Bg0ddM0g.svg`,HN=`/assets/command-yx0gkfNg.svg`,UN=`/assets/commitizen-Bwv88Q2Q.svg`,WN=`/assets/commitlint-BJT3ucOp.svg`,GN=`/assets/concourse-Bt-txRgW.svg`,KN=`/assets/conduct-BkB2tjgj.svg`,qN=`/assets/console-D3K9rxA0.svg`,JN=`/assets/container.clone-C7n8A5bJ.svg`,YN=`/assets/contentlayer-CNxQL_iE.svg`,XN=`/assets/context-DC2VDLch.svg`,ZN=`/assets/contributing-SBExBaCT.svg`,QN=`/assets/controller-DcERpd5w.svg`,$N=`/assets/copilot-B1KwNGRZ.svg`,eP=`/assets/copilot_light-CmeNXrTH.svg`,tP=`/assets/cpp-INM4-kSs.svg`,nP=`/assets/craco-BITlkIvR.svg`,rP=`/assets/credits-CODi5TMI.svg`,iP=`/assets/crystal-Dybl_hLt.svg`,aP=`/assets/crystal_light-DxCgyvBp.svg`,oP=`/assets/csharp-CsWYnqLf.svg`,sP=`/assets/css-map-DBk294NY.svg`,cP=`/assets/css-BSpPuOMr.svg`,lP=`/assets/cucumber-U4p68nZM.svg`,uP=`/assets/cuda-DIAU-Jy3.svg`,dP=`/assets/cue-QgLqfqqY.svg`,fP=`/assets/cursor-B-BDgFTJ.svg`,pP=`/assets/cursor_light-DKdMqmNV.svg`,mP=`/assets/cypress-CizKTegg.svg`,hP=`/assets/d-CIX_k_QG.svg`,gP=`/assets/dart-kd3Gtzqg.svg`,_P=`/assets/dart_generated-upPvSvAz.svg`,vP=`/assets/database-Cj22jZTN.svg`,yP=`/assets/deepsource-myAQMb8d.svg`,bP=`/assets/denizenscript-Dq20OGy5.svg`,xP=`/assets/deno-Am9P1Un1.svg`,SP=`/assets/deno_light-DzGu3TJc.svg`,CP=`/assets/dependabot-H7cYtumZ.svg`,wP=`/assets/dependencies-update-6pgY4zuh.svg`,TP=`/assets/dhall-CMnKxu8w.svg`,EP=`/assets/diff-C38PglOG.svg`,DP=`/assets/dinophp-CQDCxPta.svg`,OP=`/assets/disc-KZKi35ao.svg`,kP=`/assets/django-D268AtI7.svg`,AP=`/assets/dll-BmYiFphX.svg`,jP=`/assets/docker-DmVDHlbn.svg`,MP=`/assets/doctex-installer-CPTZeVG3.svg`,NP=`/assets/dtx.clone-Cf6sF7jX.svg`,PP=`/assets/document-DC-WjD_F.svg`,FP=`/assets/dotjs-DxEvU_mX.svg`,IP=`/assets/drawio-Cu5s_OgJ.svg`,LP=`/assets/drizzle-eXiHlDHl.svg`,RP=`/assets/drone-D_TtVcGJ.svg`,zP=`/assets/drone_light-imSRJubx.svg`,BP=`/assets/dtx.clone-Cf6sF7jX.svg`,VP=`/assets/duc-CUOCvpwA.svg`,HP=`/assets/dune-Rds4OSEO.svg`,UP=`/assets/edge-DH0n9HNR.svg`,WP=`/assets/editorconfig-pGlPAdhs.svg`,GP=`/assets/ejs-PPg4ia-7.svg`,KP=`/assets/elixir-swoXiCa5.svg`,qP=`/assets/elm-g-RQYjU8.svg`,JP=`/assets/email-1Xost_qI.svg`,YP=`/assets/ember-C7i_u_jE.svg`,XP=`/assets/epub-DFF4Z1V9.svg`,ZP=`/assets/erlang-CFKD46V5.svg`,QP=`/assets/esbuild-CzRALyPJ.svg`,$P=`/assets/eslint-DzpFfw-i.svg`,eF=`/assets/excalidraw--0i0jDmr.svg`,tF=`/assets/exe-GVF74Ms1.svg`,nF=`/assets/expo-rCfxWUHV.svg`,rF=`/assets/expo_light-CwV0t5dx.svg`,iF=`/assets/fastlane-DGsHDqZX.svg`,aF=`/assets/favicon-5k2L6pP5.svg`,oF=`/assets/figma-DHcjhqjj.svg`,sF=`/assets/file-AwgZ2m-g.svg`,cF=`/assets/firebase-Ieh3jMjN.svg`,lF=`/assets/flash-CCqQbNv3.svg`,uF=`/assets/flow-jUk71z2d.svg`,dF=`/assets/font-BRNRC2Ch.svg`,fF=`/assets/forth-BMmAQzOL.svg`,pF=`/assets/fortran-CP3ZdKVq.svg`,mF=`/assets/foxpro-Btdm5--r.svg`,hF=`/assets/freemarker-C2zKExfM.svg`,gF=`/assets/fsharp-Dt-hMgUp.svg`,_F=`/assets/fusebox-4t4chN0t.svg`,vF=`/assets/gamemaker-ejiPZUyu.svg`,yF=`/assets/garden-Ct0NSbAt.svg`,bF=`/assets/gatsby-D0X_jL99.svg`,xF=`/assets/gcp-BoxSRAp-.svg`,SF=`/assets/gemfile-BBynEIXH.svg`,CF=`/assets/gemini-ai-D36EEHpv.svg`,wF=`/assets/gemini-C_j63xZO.svg`,TF=`/assets/git-83tqA80G.svg`,EF=`/assets/github-actions-workflow-yImQwRPL.svg`,DF=`/assets/github-sponsors-DwCJgaHA.svg`,OF=`/assets/gitlab-D2FKBwiq.svg`,kF=`/assets/gitpod-mtqf6Ecw.svg`,AF=`/assets/gleam-D7UD7NFY.svg`,jF=`/assets/gnuplot-aGEJkf0a.svg`,MF=`/assets/go-mod-BhkxLSQa.svg`,NF=`/assets/go-B7ZFxYI_.svg`,PF=`/assets/go_gopher-DmSScfWc.svg`,FF=`/assets/godot-assets-6DPGcv2N.svg`,IF=`/assets/godot-CUksvswh.svg`,LF=`/assets/google-D3OIi7l4.svg`,RF=`/assets/gradle-O_eVyvNV.svg`,zF=`/assets/grafana-alloy-DGp7099H.svg`,BF=`/assets/grain-BRDkpR8A.svg`,VF=`/assets/graphcool-UtN7aM38.svg`,HF=`/assets/graphql-BKt2gD_N.svg`,UF=`/assets/gridsome-DYSDoPsY.svg`,WF=`/assets/groovy-BXzGpjj1.svg`,GF=`/assets/grunt-C7Ff529N.svg`,KF=`/assets/gulp-BUcnj4ZL.svg`,qF=`/assets/h-BHMofc-S.svg`,JF=`/assets/hack-B-fBDX3-.svg`,YF=`/assets/hadolint-BLryDzgC.svg`,XF=`/assets/haml-qwcGuZOZ.svg`,ZF=`/assets/handlebars-C6Xcc0pI.svg`,QF=`/assets/happo-D49Gsgbo.svg`,$F=`/assets/hardhat-Ih6P7lBu.svg`,eI=`/assets/harmonix-DjGjAP7t.svg`,tI=`/assets/haskell-CRLyx32i.svg`,nI=`/assets/haxe-DRvJirO-.svg`,rI=`/assets/hcl-c8lmfyJf.svg`,iI=`/assets/hcl_light-BTVhx5-w.svg`,aI=`/assets/helm-Db4yKtJs.svg`,oI=`/assets/heroku-6mfFb-7E.svg`,sI=`/assets/hex-DmlOiWGa.svg`,cI=`/assets/hip-DFonLtt3.svg`,lI=`/assets/histoire-BSU5EQCa.svg`,uI=`/assets/hjson-CFnkC9Gu.svg`,dI=`/assets/horusec-TbQZoanp.svg`,fI=`/assets/hosts-kLU--r6p.svg`,pI=`/assets/hosts_light-C64Kv9no.svg`,mI=`/assets/hpp-1fokgAwc.svg`,hI=`/assets/html-C5jflT5q.svg`,gI=`/assets/http-DnKvXzc1.svg`,_I=`/assets/huff-BVp7HOAO.svg`,vI=`/assets/huff_light-BhG_WTHG.svg`,yI=`/assets/hurl-CyXQlwmP.svg`,bI=`/assets/husky-k4XnpPb_.svg`,xI=`/assets/i18n-YJc8oEuZ.svg`,SI=`/assets/idris-C6pFOd_c.svg`,CI=`/assets/ifanr-cloud-d4oHE7rG.svg`,wI=`/assets/image-BvX5VAOD.svg`,TI=`/assets/imba-eU8sKYuZ.svg`,EI=`/assets/installation-BVbhEX8L.svg`,DI=`/assets/instructions.clone-BjasTeTu.svg`,OI=`/assets/ionic-WTmyiwWc.svg`,kI=`/assets/istanbul-B1VcxSwO.svg`,AI=`/assets/jar-DFsnj_df.svg`,jI=`/assets/java-BoeaJ1Gf.svg`,MI=`/assets/javaclass-BcpaDqY_.svg`,NI=`/assets/javascript-map-CFPgv8cs.svg`,PI=`/assets/javascript-DN_vk0so.svg`,FI=`/assets/jenkins-DVxqAfpp.svg`,II=`/assets/jest-BcvUOTaR.svg`,LI=`/assets/jinja-BDgDDhqR.svg`,RI=`/assets/jinja_light-Bt4m_wZ-.svg`,zI=`/assets/jsconfig-B9QwyVdg.svg`,BI=`/assets/json-CtNz2G1q.svg`,VI=`/assets/json_schema-50SzRsOA.svg`,HI=`/assets/jsr-BLZDOtFt.svg`,UI=`/assets/jsr_light-DPGIWN4w.svg`,WI=`/assets/julia-DJIRuqFZ.svg`,GI=`/assets/jupyter-CF7u6bs_.svg`,KI=`/assets/just-lzoLa4H7.svg`,qI=`/assets/karma-CKzsw2-4.svg`,JI=`/assets/kcl-DYUj_9Dm.svg`,YI=`/assets/key-COm7LFld.svg`,XI=`/assets/keystatic-rXBOaTfT.svg`,ZI=`/assets/kivy-hIfJ-3zX.svg`,QI=`/assets/kl-C4nSbMcJ.svg`,$I=`/assets/knip-G-lQCcx8.svg`,eL=`/assets/kotlin-CNvEmvgH.svg`,tL=`/assets/kubernetes-CMVVqFJu.svg`,nL=`/assets/kusto-BJgG2m3a.svg`,rL=`/assets/label-CWDM-Nld.svg`,iL=`/assets/laravel-CJtnT1s-.svg`,aL=`/assets/latex-class.clone-BhHYrwLh.svg`,oL=`/assets/sty.clone-Cujqq-bP.svg`,sL=`/assets/latex.clone-CninqgRM.svg`,cL=`/assets/latexmk-D3AyqLpT.svg`,lL=`/assets/lbx-luhlNMZV.svg`,uL=`/assets/lean-LfI6mpgn.svg`,dL=`/assets/lefthook-CqXdjHx5.svg`,fL=`/assets/lerna-DGUDz_cE.svg`,pL=`/assets/less-DgAaLSXO.svg`,mL=`/assets/liara-s-sMrdWA.svg`,hL=`/assets/lib-BSLl2hIz.svg`,gL=`/assets/license-xAqV9Xi9.svg`,_L=`/assets/lighthouse-D02dHZMM.svg`,vL=`/assets/lilypond-B3CP0Q9x.svg`,yL=`/assets/lintstaged-C51rin-y.svg`,bL=`/assets/liquid-CoCfs_Yj.svg`,xL=`/assets/lisp-CSjgnaXF.svg`,SL=`/assets/livescript-BoJSFi3a.svg`,CL=`/assets/lock-CXdZHto3.svg`,wL=`/assets/log-PUd3bLPV.svg`,TL=`/assets/lolcode-C8EcpPZs.svg`,EL=`/assets/lottie-DdYYxJQL.svg`,DL=`/assets/lua-DGjzYnY0.svg`,OL=`/assets/luau-Bv7BN-Iy.svg`,kL=`/assets/lynx-BBmImVQc.svg`,AL=`/assets/lyric-Dphp5I7f.svg`,jL=`/assets/macaulay2-DC43Xv5F.svg`,ML=`/assets/makefile-B4F0WZrz.svg`,NL=`/assets/markdoc-config-3pNUCrL7.svg`,PL=`/assets/markdoc-DhOGSiVa.svg`,FL=`/assets/markdown-CpukAbx0.svg`,IL=`/assets/markdownlint-Ch5JxnYU.svg`,LL=`/assets/markojs-C_I16WqH.svg`,RL=`/assets/mathematica-CJxyc50p.svg`,zL=`/assets/matlab-DnkzKNhI.svg`,BL=`/assets/maven-Cp_nbRKZ.svg`,VL=`/assets/mdsvex-E4r19TyL.svg`,HL=`/assets/mdx-BtBWUBcH.svg`,UL=`/assets/mercurial-Bej1B86N.svg`,WL=`/assets/merlin-CuMEHxoj.svg`,GL=`/assets/mermaid-DLsddOB2.svg`,KL=`/assets/meson-DRhlgjJC.svg`,qL=`/assets/metro-BzJRuvE6.svg`,JL=`/assets/minecraft-fabric-rYp7PYPW.svg`,YL=`/assets/minecraft-B-o488a_.svg`,XL=`/assets/mint-BcmbYsz6.svg`,ZL=`/assets/mist.clone-DL10PFcI.svg`,QL=`/assets/mjml-CtvXcvzm.svg`,$L=`/assets/mocha-VS0yU83W.svg`,eR=`/assets/modernizr-BQd9jxJP.svg`,tR=`/assets/mojo-BMCeLwSe.svg`,nR=`/assets/moon-WFHPC1JR.svg`,rR=`/assets/moonscript-DR4gdqiC.svg`,iR=`/assets/mrpack-DcBar9lx.svg`,aR=`/assets/mxml-7PX7Komx.svg`,oR=`/assets/nano-staged-BMsUW7Cb.svg`,sR=`/assets/nano-staged_light-BfGLfkH7.svg`,cR=`/assets/ndst-CdJFXo_n.svg`,lR=`/assets/nest-controller.clone-7nwmjdBF.svg`,uR=`/assets/nest-decorator.clone-CBMMACYR.svg`,dR=`/assets/nest-filter.clone-Cacnm0Wm.svg`,fR=`/assets/nest-gateway.clone-B18-aejb.svg`,pR=`/assets/nest-guard.clone-M_fiqCaC.svg`,mR=`/assets/nest-interceptor.clone-BflnCxWo.svg`,hR=`/assets/nest-middleware.clone-BUbGiX3x.svg`,gR=`/assets/nest-module.clone-Vsu9ICcI.svg`,_R=`/assets/nest-pipe.clone-C748ipHJ.svg`,vR=`/assets/nest-resolver.clone-BLuU-dIF.svg`,yR=`/assets/nest-service.clone-Dm68BmqF.svg`,bR=`/assets/nest-CPqvKoYS.svg`,xR=`/assets/netlify-_7KOAkD-.svg`,SR=`/assets/netlify_light-DPXJPD2K.svg`,CR=`/assets/next-CCXOG12z.svg`,wR=`/assets/next_light-COM1_zpx.svg`,TR=`/assets/nextflow-C9Ctlyg1.svg`,ER=`/assets/nginx-OUvapv2h.svg`,DR=`/assets/ngrx-actions-DD4Cp7cj.svg`,OR=`/assets/ngrx-effects-ewPTGjfj.svg`,kR=`/assets/ngrx-entity-Ck0gY2-5.svg`,AR=`/assets/ngrx-reducer-DG8TYnZA.svg`,jR=`/assets/ngrx-selectors-C7stCz81.svg`,MR=`/assets/ngrx-state-B-WK3oew.svg`,NR=`/assets/nim-DAERcoNn.svg`,PR=`/assets/nix-B4Y-u9vY.svg`,FR=`/assets/nodejs-Ftt-223_.svg`,IR=`/assets/nodejs_alt-BVdVtgyN.svg`,LR=`/assets/nodemon-h64ocqpb.svg`,RR=`/assets/npm-B9KN-Ntj.svg`,zR=`/assets/nuget-NH90BmqI.svg`,BR=`/assets/nunjucks-t2nAimXd.svg`,VR=`/assets/nuxt-CPbvhIgt.svg`,HR=`/assets/nx-EK_WNDNV.svg`,UR=`/assets/objective-c-D9CspH-N.svg`,WR=`/assets/objective-cpp-DUObGPHd.svg`,GR=`/assets/ocaml-nynLDQtu.svg`,KR=`/assets/odin-0ANKKdWy.svg`,qR=`/assets/onnx-LOzSMtGs.svg`,JR=`/assets/opa-BdkqTXNT.svg`,YR=`/assets/opam-JIDUixFe.svg`,XR=`/assets/openapi-Bmb3LvaR.svg`,ZR=`/assets/openapi_light-M7Flwgb0.svg`,QR=`/assets/opencode-BHa_lWVF.svg`,$R=`/assets/opencode_light-1WfIvPPU.svg`,ez=`/assets/opentofu-Bg2cGXvq.svg`,tz=`/assets/opentofu_light-Dcgr5Lg_.svg`,nz=`/assets/otne-sbWZ5nOK.svg`,rz=`/assets/oxc-B93MLZjn.svg`,iz=`/assets/packship-BwshS3ck.svg`,az=`/assets/palette-DSMdeYgY.svg`,oz=`/assets/panda-CIYZTHE4.svg`,sz=`/assets/parcel-C6vwjAsm.svg`,cz=`/assets/pascal-CvGWfjv2.svg`,lz=`/assets/pawn-BS1CqHEF.svg`,uz=`/assets/payload-DnHpsSkV.svg`,dz=`/assets/payload_light-ClSj5gY0.svg`,fz=`/assets/pdf-FSVsLfd_.svg`,pz=`/assets/pdm-BL2Z_Xyb.svg`,mz=`/assets/peg-CSjGGAfF.svg`,hz=`/assets/percy-CmTXqY9k.svg`,gz=`/assets/perl-BrETzhnK.svg`,_z=`/assets/php-cs-fixer-B91UIEkw.svg`,vz=`/assets/php-Di6_0azE.svg`,yz=`/assets/php_elephant-C7HPmtvE.svg`,bz=`/assets/php_elephant_pink-De2PfWh0.svg`,xz=`/assets/phpstan-B6XmboNy.svg`,Sz=`/assets/phpunit-CQMlZ9qI.svg`,Cz=`/assets/pinejs-Bkt6T9Ju.svg`,wz=`/assets/pipeline-CpSrXJTF.svg`,Tz=`/assets/pkl-vAv-q5Xo.svg`,Ez=`/assets/plastic-BPoXwN5v.svg`,Dz=`/assets/playwright-CZDGDv97.svg`,Oz=`/assets/plop-W11ZnJ0J.svg`,kz=`/assets/pm2-ecosystem-C3A6uMzh.svg`,Az=`/assets/pnpm-yTf4SVeA.svg`,jz=`/assets/pnpm_light-DpaB6grN.svg`,Mz=`/assets/poetry-BzkVVJUz.svg`,Nz=`/assets/postcss-nFnRZwev.svg`,Pz=`/assets/posthtml-CseEoKin.svg`,Fz=`/assets/powerpoint-B9_xf1B4.svg`,Iz=`/assets/powershell-C6NGchuF.svg`,Lz=`/assets/pre-commit-BSTONpj6.svg`,Rz=`/assets/prettier-CblUXfdG.svg`,zz=`/assets/prisma-CqGoYTXg.svg`,Bz=`/assets/processing-BxhqhkO7.svg`,Vz=`/assets/prolog-ERHATOz6.svg`,Hz=`/assets/prompt-CRtaY-vl.svg`,Uz=`/assets/proto-BKheaoud.svg`,Wz=`/assets/protractor-Biy3qAIN.svg`,Gz=`/assets/pug-BIbhOJge.svg`,Kz=`/assets/puppet-zaZRHErA.svg`,qz=`/assets/puppeteer-DEba_DZG.svg`,Jz=`/assets/purescript-Cuz-x90n.svg`,Yz=`/assets/python-misc-BbpyPaM-.svg`,Xz=`/assets/python-B51K8IGV.svg`,Zz=`/assets/pytorch-Cn8bH_sd.svg`,Qz=`/assets/qsharp-C_kSW5Ab.svg`,$z=`/assets/quarto-rQmTlqz3.svg`,eB=`/assets/quasar-LM89YPuZ.svg`,tB=`/assets/quokka-Xv0MtYYB.svg`,nB=`/assets/qwik-KZjX0BVb.svg`,rB=`/assets/r-DgBVcMP_.svg`,iB=`/assets/racket-CMbJyNha.svg`,aB=`/assets/raml-C-qEzwsG.svg`,oB=`/assets/razor-CUVD-QLE.svg`,sB=`/assets/rbxmk-BsXG_IOL.svg`,cB=`/assets/rc-z_4QSbxF.svg`,lB=`/assets/react-DVwDfBp3.svg`,uB=`/assets/react_ts-_1j79TVC.svg`,dB=`/assets/readme-CRQaYHSO.svg`,fB=`/assets/reason-korllTtu.svg`,pB=`/assets/red-DTtxFQDO.svg`,mB=`/assets/redux-action-Cke8cYw-.svg`,hB=`/assets/redux-reducer-FoNH6lOj.svg`,gB=`/assets/redux-selector-B5jgC3IP.svg`,_B=`/assets/redux-store-DzLqp-yq.svg`,vB=`/assets/regedit-DLAjE0ih.svg`,yB=`/assets/remark-CWTU59CW.svg`,bB=`/assets/remix-DI6vrrHY.svg`,xB=`/assets/remix_light-COv4KSh3.svg`,SB=`/assets/renovate-COrNPmCW.svg`,CB=`/assets/replit-DXy3-whC.svg`,wB=`/assets/rescript-interface-Dslk_4sh.svg`,TB=`/assets/rescript-CqBh5fPE.svg`,EB=`/assets/restql-BN8DNxn7.svg`,DB=`/assets/riot-9zacm7BW.svg`,OB=`/assets/roadmap-C5LFZKe0.svg`,kB=`/assets/roblox-BF0l82yD.svg`,AB=`/assets/robot-DnWiYtgc.svg`,jB=`/assets/robots-a3009G78.svg`,MB=`/assets/rocket-CzehGL9J.svg`,NB=`/assets/rojo-K5BAThMH.svg`,PB=`/assets/rolldown-CCHKjFzw.svg`,FB=`/assets/rollup-1MedXjdi.svg`,IB=`/assets/rome-BSbWRa52.svg`,LB=`/assets/routing-IVwG3_tz.svg`,RB=`/assets/rspec-Rqv36fnX.svg`,zB=`/assets/rstack-IiLpkzX3.svg`,BB=`/assets/rubocop-W3fJz17I.svg`,VB=`/assets/rubocop_light-BdWvyfnM.svg`,HB=`/assets/ruby-BHFOa6L9.svg`,UB=`/assets/ruff-kgacv5ZG.svg`,WB=`/assets/rust-DMNQdMcG.svg`,GB=`/assets/salesforce-4bgftkqW.svg`,KB=`/assets/salt-Cft8i9zp.svg`,qB=`/assets/san-BMnlrhAs.svg`,JB=`/assets/sas-DPJZAFgR.svg`,YB=`/assets/sass-9oWjJ7Kf.svg`,XB=`/assets/sbt-DbLKkm1J.svg`,ZB=`/assets/scala-aE0d5Kis.svg`,QB=`/assets/scheme-DkihYuFg.svg`,$B=`/assets/scons-DJV5WTmD.svg`,eV=`/assets/scons_light-B2fnP4_Y.svg`,tV=`/assets/screwdriver-CkvzdfmG.svg`,nV=`/assets/search-CbC3iLj3.svg`,rV=`/assets/semantic-release-Dogu_C5z.svg`,iV=`/assets/semantic-release_light-DIhnbFjn.svg`,aV=`/assets/semgrep-CPQALOgS.svg`,oV=`/assets/sentry-D58FJxx5.svg`,sV=`/assets/sequelize-C6Ymalea.svg`,cV=`/assets/serverless-QZsOIF8r.svg`,lV=`/assets/settings-DyEElZBl.svg`,uV=`/assets/shader-Bjv2Zv8K.svg`,dV=`/assets/shellcheck-DTR1RnoY.svg`,fV=`/assets/shellcheck_light-_r9G9oAI.svg`,pV=`/assets/silverstripe-DKiZV7X8.svg`,mV=`/assets/simulink-BTi39qTY.svg`,hV=`/assets/siyuan-C2kqb6ZD.svg`,gV=`/assets/sketch-C6MPNaDh.svg`,_V=`/assets/skill-CsTNG9dd.svg`,vV=`/assets/slim-ssC5V7EC.svg`,yV=`/assets/slint-DtJLD6Qi.svg`,bV=`/assets/slug-Br_1B1yc.svg`,xV=`/assets/smarty-D2LJyf79.svg`,SV=`/assets/sml-Bzffk1I4.svg`,CV=`/assets/snakemake-DCI9pat0.svg`,wV=`/assets/snapcraft-DclrZPKf.svg`,TV=`/assets/snowpack-B1HubwQS.svg`,EV=`/assets/snowpack_light-B9Juodm3.svg`,DV=`/assets/snyk-CeYeWfpE.svg`,OV=`/assets/solidity-L_2RId-b.svg`,kV=`/assets/sonarcloud-DqPW4NMu.svg`,AV=`/assets/spwn-DM6k0jd3.svg`,jV=`/assets/stackblitz-DwxhpZZc.svg`,MV=`/assets/stan-DiuxlWb_.svg`,NV=`/assets/steadybit-Zo5mnlIQ.svg`,PV=`/assets/stencil-BOIrAb_N.svg`,FV=`/assets/stitches-DuwUNwW8.svg`,IV=`/assets/stitches_light-DhBTATZE.svg`,LV=`/assets/storybook-8hLJJ690.svg`,RV=`/assets/stryker-bt6-O_CV.svg`,zV=`/assets/sty.clone-Cujqq-bP.svg`,BV=`/assets/stylable-ClIXN3nh.svg`,VV=`/assets/stylelint-BrpBoVMQ.svg`,HV=`/assets/stylelint_light-DaHsuq7L.svg`,UV=`/assets/stylus-CN5LY1pd.svg`,WV=`/assets/sublime-CZapD7oK.svg`,GV=`/assets/subtitles-DXAS4J7N.svg`,KV=`/assets/supabase-Di69_Gxl.svg`,qV=`/assets/svelte-BzdjuKpL.svg`,JV=`/assets/svelte_js.clone-BEEZUpfk.svg`,YV=`/assets/svelte_ts.clone-Bz-pUeer.svg`,XV=`/assets/svg-BGAtL3nZ.svg`,ZV=`/assets/svgo-DPr1Dvia.svg`,QV=`/assets/svgr-Cmwlz1vj.svg`,$V=`/assets/swagger-WMZaykFY.svg`,eH=`/assets/sway-CVDhegDt.svg`,tH=`/assets/swc-B2z4JPFI.svg`,nH=`/assets/swift-C0ltu3i6.svg`,rH=`/assets/syncpack-ZPDNt6i7.svg`,iH=`/assets/systemd-BXI9UdZI.svg`,aH=`/assets/systemd_light-BFjsWtQs.svg`,oH=`/assets/table-D7AWR19h.svg`,sH=`/assets/tailwindcss-E29z3cu4.svg`,cH=`/assets/tape.clone-D_2sWxeq.svg`,lH=`/assets/taskfile-dSD9YrzU.svg`,uH=`/assets/tauri-Dq0-hcjj.svg`,dH=`/assets/taze-Cta2ozO5.svg`,fH=`/assets/tcl-zFapWKQk.svg`,pH=`/assets/teal-BSRSg4xl.svg`,mH=`/assets/templ-BrX7gPqB.svg`,hH=`/assets/template-DZ-sDdmY.svg`,gH=`/assets/terraform-BlPcYaG6.svg`,_H=`/assets/test-js-OwrXCHKi.svg`,vH=`/assets/test-jsx-B8K3rlw-.svg`,yH=`/assets/test-ts-Uf59rGo6.svg`,bH=`/assets/tex-Hzjkwjtg.svg`,xH=`/assets/textlint-DfUvfvO4.svg`,SH=`/assets/tilt-LjNxWg-6.svg`,CH=`/assets/tldraw-3Kby2Vlr.svg`,wH=`/assets/tldraw_light-TCjCffr-.svg`,TH=`/assets/tobi-DVIcB8M9.svg`,EH=`/assets/tobimake-kl8Hqi8N.svg`,DH=`/assets/toc-DYpUhZld.svg`,OH=`/assets/todo-gzOFSJ-g.svg`,kH=`/assets/toml-ZLHWK_sx.svg`,AH=`/assets/toml_light-OBSBqMGq.svg`,jH=`/assets/toon-CQzjjnPj.svg`,MH=`/assets/travis-CAxkeomb.svg`,NH=`/assets/tree-CIalc_dQ.svg`,PH=`/assets/trigger-B4wseTIv.svg`,FH=`/assets/tsconfig-Bjf4jQfg.svg`,IH=`/assets/tsdoc-BpNgHDO4.svg`,LH=`/assets/tsdown-BkZbYvkN.svg`,RH=`/assets/tsil-Bkt1hdJ_.svg`,zH=`/assets/tune-9adzML3q.svg`,BH=`/assets/turborepo-DNORwR5D.svg`,VH=`/assets/turborepo_light-D3ZWPpDE.svg`,HH=`/assets/twig-CqyC89_c.svg`,UH=`/assets/twine-zZzwaKaF.svg`,WH=`/assets/typedoc-Db5-Fjwt.svg`,GH=`/assets/typescript-def-DriBH7_f.svg`,KH=`/assets/typescript-D_U-p-G1.svg`,qH=`/assets/typst-CoAhtl4c.svg`,JH=`/assets/uiua-B7OLi-gm.svg`,YH=`/assets/umi-CYgldeZU.svg`,XH=`/assets/uml-W9x7FuXD.svg`,ZH=`/assets/uml_light-pZRShlLJ.svg`,QH=`/assets/unity-BNzPrpqd.svg`,$H=`/assets/unlicense-Cju0tTjp.svg`,eU=`/assets/unocss-DVQ-RdpC.svg`,tU=`/assets/url-DaITLCEd.svg`,nU=`/assets/uv-F8wIEKlh.svg`,rU=`/assets/vagrant-BP3EYUgn.svg`,iU=`/assets/vala-D9t6dJt6.svg`,aU=`/assets/vanilla-extract-75PewYHq.svg`,oU=`/assets/varnish-C4kR7D6O.svg`,sU=`/assets/vedic-CQZw4l0x.svg`,cU=`/assets/velite-Be8mHui6.svg`,lU=`/assets/velocity-C1gK7bMI.svg`,uU=`/assets/vercel-7qFLBAX3.svg`,dU=`/assets/vercel_light-N8AQQPHB.svg`,fU=`/assets/verdaccio-CCNTjZIL.svg`,pU=`/assets/verified-SvGAS5or.svg`,mU=`/assets/verilog-CkzCTd_s.svg`,hU=`/assets/verse-K-ZkvxZV.svg`,gU=`/assets/verse_light-CLscIU_r.svg`,_U=`/assets/vfl-D9qLlJt-.svg`,vU=`/assets/video-B_X_LvvN.svg`,yU=`/assets/vim-Dls2bNAn.svg`,bU=`/assets/virtual-D1EhHTfe.svg`,xU=`/assets/visualstudio-2wBP4zqg.svg`,SU=`/assets/vite-DRU0wIJ-.svg`,CU=`/assets/vitest-BArfhq13.svg`,wU=`/assets/vlang-o3PzMBkk.svg`,TU=`/assets/vscode-BvZO6gHV.svg`,EU=`/assets/vue-config-DnesLCi2.svg`,DU=`/assets/vue-DJBoCu9j.svg`,OU=`/assets/vuex-store-CC7Qmm5u.svg`,kU=`/assets/wakatime-Dye6fNMc.svg`,AU=`/assets/wakatime_light-CYZx-6N2.svg`,jU=`/assets/wallaby-CCUOfHFd.svg`,MU=`/assets/wally-CqJM8T3g.svg`,NU=`/assets/warp-CgIW2eQH.svg`,PU=`/assets/warp_light-CjTppUCb.svg`,FU=`/assets/watchman-H_cM_bwG.svg`,IU=`/assets/webassembly-BMgXNvua.svg`,LU=`/assets/webhint-DxoGuy63.svg`,RU=`/assets/webpack-BMke-Ny3.svg`,zU=`/assets/wepy-BgP-Furc.svg`,BU=`/assets/werf-D13MHWtz.svg`,VU=`/assets/windicss-DYoZFE3g.svg`,HU=`/assets/wolframlanguage-C5GdlbiJ.svg`,UU=`/assets/word-CFvm8uAr.svg`,WU=`/assets/wrangler-D_cfQmo-.svg`,GU=`/assets/wxt-Bsz7D6e7.svg`,KU=`/assets/xaml-Wh7EHkVc.svg`,qU=`/assets/xmake-Cq_S7JW7.svg`,JU=`/assets/xml-C-Q_MfUP.svg`,YU=`/assets/yaml-BZ3ilcHv.svg`,XU=`/assets/yang-BnZZVyDi.svg`,ZU=`/assets/yarn--gleSda9.svg`,QU=`/assets/zeabur-DDm7jWc3.svg`,$U=`/assets/zeabur_light-E7ma-0y_.svg`,eW=`/assets/zig-CwGkQIG3.svg`,tW=`/assets/zip-Dw2p3C1u.svg`,nW=`/assets/zizmor-CVHX2g5g.svg`,rW=JSON.parse(`{"git":{"iconPath":"./../icons/git.svg"},"github-actions-workflow":{"iconPath":"./../icons/github-actions-workflow.svg"},"yaml":{"iconPath":"./../icons/yaml.svg"},"xml":{"iconPath":"./../icons/xml.svg"},"matlab":{"iconPath":"./../icons/matlab.svg"},"settings":{"iconPath":"./../icons/settings.svg"},"toml":{"iconPath":"./../icons/toml.svg"},"toml_light":{"iconPath":"./../icons/toml_light.svg"},"diff":{"iconPath":"./../icons/diff.svg"},"json":{"iconPath":"./../icons/json.svg"},"blink":{"iconPath":"./../icons/blink.svg"},"java":{"iconPath":"./../icons/java.svg"},"razor":{"iconPath":"./../icons/razor.svg"},"python":{"iconPath":"./../icons/python.svg"},"mojo":{"iconPath":"./../icons/mojo.svg"},"javascript":{"iconPath":"./../icons/javascript.svg"},"typescript":{"iconPath":"./../icons/typescript.svg"},"scala":{"iconPath":"./../icons/scala.svg"},"handlebars":{"iconPath":"./../icons/handlebars.svg"},"perl":{"iconPath":"./../icons/perl.svg"},"haxe":{"iconPath":"./../icons/haxe.svg"},"puppet":{"iconPath":"./../icons/puppet.svg"},"elixir":{"iconPath":"./../icons/elixir.svg"},"livescript":{"iconPath":"./../icons/livescript.svg"},"erlang":{"iconPath":"./../icons/erlang.svg"},"twig":{"iconPath":"./../icons/twig.svg"},"julia":{"iconPath":"./../icons/julia.svg"},"elm":{"iconPath":"./../icons/elm.svg"},"purescript":{"iconPath":"./../icons/purescript.svg"},"stylus":{"iconPath":"./../icons/stylus.svg"},"nunjucks":{"iconPath":"./../icons/nunjucks.svg"},"pug":{"iconPath":"./../icons/pug.svg"},"robot":{"iconPath":"./../icons/robot.svg"},"sass":{"iconPath":"./../icons/sass.svg"},"less":{"iconPath":"./../icons/less.svg"},"css":{"iconPath":"./../icons/css.svg"},"visualstudio":{"iconPath":"./../icons/visualstudio.svg"},"angular":{"iconPath":"./../icons/angular.svg"},"graphql":{"iconPath":"./../icons/graphql.svg"},"solidity":{"iconPath":"./../icons/solidity.svg"},"autoit":{"iconPath":"./../icons/autoit.svg"},"haml":{"iconPath":"./../icons/haml.svg"},"yang":{"iconPath":"./../icons/yang.svg"},"terraform":{"iconPath":"./../icons/terraform.svg"},"opentofu":{"iconPath":"./../icons/opentofu.svg"},"applescript":{"iconPath":"./../icons/applescript.svg"},"cake":{"iconPath":"./../icons/cake.svg"},"cucumber":{"iconPath":"./../icons/cucumber.svg"},"nim":{"iconPath":"./../icons/nim.svg"},"apiblueprint":{"iconPath":"./../icons/apiblueprint.svg"},"riot":{"iconPath":"./../icons/riot.svg"},"postcss":{"iconPath":"./../icons/postcss.svg"},"coldfusion":{"iconPath":"./../icons/coldfusion.svg"},"haskell":{"iconPath":"./../icons/haskell.svg"},"dhall":{"iconPath":"./../icons/dhall.svg"},"cabal":{"iconPath":"./../icons/cabal.svg"},"nix":{"iconPath":"./../icons/nix.svg"},"ruby":{"iconPath":"./../icons/ruby.svg"},"slim":{"iconPath":"./../icons/slim.svg"},"php":{"iconPath":"./../icons/php.svg"},"php_elephant":{"iconPath":"./../icons/php_elephant.svg"},"php_elephant_pink":{"iconPath":"./../icons/php_elephant_pink.svg"},"hack":{"iconPath":"./../icons/hack.svg"},"react":{"iconPath":"./../icons/react.svg"},"mjml":{"iconPath":"./../icons/mjml.svg"},"processing":{"iconPath":"./../icons/processing.svg"},"hcl":{"iconPath":"./../icons/hcl.svg"},"go":{"iconPath":"./../icons/go.svg"},"go_gopher":{"iconPath":"./../icons/go_gopher.svg"},"nodejs_alt":{"iconPath":"./../icons/nodejs_alt.svg"},"django":{"iconPath":"./../icons/django.svg"},"html":{"iconPath":"./../icons/html.svg"},"godot":{"iconPath":"./../icons/godot.svg"},"godot-assets":{"iconPath":"./../icons/godot-assets.svg"},"vim":{"iconPath":"./../icons/vim.svg"},"silverstripe":{"iconPath":"./../icons/silverstripe.svg"},"prolog":{"iconPath":"./../icons/prolog.svg"},"pawn":{"iconPath":"./../icons/pawn.svg"},"reason":{"iconPath":"./../icons/reason.svg"},"sml":{"iconPath":"./../icons/sml.svg"},"tex":{"iconPath":"./../icons/tex.svg"},"latex":{"iconPath":"./../icons/latex.clone.svg"},"latex-class":{"iconPath":"./../icons/latex-class.clone.svg"},"latex-package":{"iconPath":"./../icons/latex-package.clone.svg"},"context":{"iconPath":"./../icons/context.svg"},"doctex":{"iconPath":"./../icons/doctex.clone.svg"},"doctex-installer":{"iconPath":"./../icons/doctex-installer.svg"},"bibliography":{"iconPath":"./../icons/bibliography.svg"},"bibtex-style":{"iconPath":"./../icons/bibtex-style.svg"},"salesforce":{"iconPath":"./../icons/salesforce.svg"},"sas":{"iconPath":"./../icons/sas.svg"},"docker":{"iconPath":"./../icons/docker.svg"},"table":{"iconPath":"./../icons/table.svg"},"csharp":{"iconPath":"./../icons/csharp.svg"},"console":{"iconPath":"./../icons/console.svg"},"c":{"iconPath":"./../icons/c.svg"},"cpp":{"iconPath":"./../icons/cpp.svg"},"objective-c":{"iconPath":"./../icons/objective-c.svg"},"objective-cpp":{"iconPath":"./../icons/objective-cpp.svg"},"c3":{"iconPath":"./../icons/c3.svg"},"coffee":{"iconPath":"./../icons/coffee.svg"},"fsharp":{"iconPath":"./../icons/fsharp.svg"},"editorconfig":{"iconPath":"./../icons/editorconfig.svg"},"clojure":{"iconPath":"./../icons/clojure.svg"},"groovy":{"iconPath":"./../icons/groovy.svg"},"markdoc":{"iconPath":"./../icons/markdoc.svg"},"markdown":{"iconPath":"./../icons/markdown.svg"},"jinja":{"iconPath":"./../icons/jinja.svg"},"proto":{"iconPath":"./../icons/proto.svg"},"python-misc":{"iconPath":"./../icons/python-misc.svg"},"vue":{"iconPath":"./../icons/vue.svg"},"lua":{"iconPath":"./../icons/lua.svg"},"log":{"iconPath":"./../icons/log.svg"},"jupyter":{"iconPath":"./../icons/jupyter.svg"},"document":{"iconPath":"./../icons/document.svg"},"pdf":{"iconPath":"./../icons/pdf.svg"},"powershell":{"iconPath":"./../icons/powershell.svg"},"r":{"iconPath":"./../icons/r.svg"},"rust":{"iconPath":"./../icons/rust.svg"},"database":{"iconPath":"./../icons/database.svg"},"kusto":{"iconPath":"./../icons/kusto.svg"},"lock":{"iconPath":"./../icons/lock.svg"},"svg":{"iconPath":"./../icons/svg.svg"},"swift":{"iconPath":"./../icons/swift.svg"},"react_ts":{"iconPath":"./../icons/react_ts.svg"},"search":{"iconPath":"./../icons/search.svg"},"minecraft":{"iconPath":"./../icons/minecraft.svg"},"rescript":{"iconPath":"./../icons/rescript.svg"},"otne":{"iconPath":"./../icons/otne.svg"},"twine":{"iconPath":"./../icons/twine.svg"},"grain":{"iconPath":"./../icons/grain.svg"},"lolcode":{"iconPath":"./../icons/lolcode.svg"},"idris":{"iconPath":"./../icons/idris.svg"},"chess":{"iconPath":"./../icons/chess.svg"},"gemini":{"iconPath":"./../icons/gemini.svg"},"vlang":{"iconPath":"./../icons/vlang.svg"},"wolframlanguage":{"iconPath":"./../icons/wolframlanguage.svg"},"shader":{"iconPath":"./../icons/shader.svg"},"tree":{"iconPath":"./../icons/tree.svg"},"svelte":{"iconPath":"./../icons/svelte.svg"},"dart":{"iconPath":"./../icons/dart.svg"},"cadence":{"iconPath":"./../icons/cadence.svg"},"stylable":{"iconPath":"./../icons/stylable.svg"},"hjson":{"iconPath":"./../icons/hjson.svg"},"huff":{"iconPath":"./../icons/huff.svg"},"cds":{"iconPath":"./../icons/cds.svg"},"concourse":{"iconPath":"./../icons/concourse.svg"},"systemd":{"iconPath":"./../icons/systemd.svg"},"systemd_light":{"iconPath":"./../icons/systemd_light.svg"},"slint":{"iconPath":"./../icons/slint.svg"},"luau":{"iconPath":"./../icons/luau.svg"},"hosts":{"iconPath":"./../icons/hosts.svg"},"beancount":{"iconPath":"./../icons/beancount.svg"},"ahk2":{"iconPath":"./../icons/ahk2.clone.svg"},"gnuplot":{"iconPath":"./../icons/gnuplot.svg"},"helm":{"iconPath":"./../icons/helm.svg"},"nginx":{"iconPath":"./../icons/nginx.svg"},"cue":{"iconPath":"./../icons/cue.svg"},"lean":{"iconPath":"./../icons/lean.svg"},"skill":{"iconPath":"./../icons/skill.svg"},"instructions":{"iconPath":"./../icons/instructions.clone.svg"},"blink_light":{"iconPath":"./../icons/blink_light.svg"},"just":{"iconPath":"./../icons/just.svg"},"json_schema":{"iconPath":"./../icons/json_schema.svg"},"jinja_light":{"iconPath":"./../icons/jinja_light.svg"},"prompt":{"iconPath":"./../icons/prompt.svg"},"playwright":{"iconPath":"./../icons/playwright.svg"},"sublime":{"iconPath":"./../icons/sublime.svg"},"simulink":{"iconPath":"./../icons/simulink.svg"},"quarto":{"iconPath":"./../icons/quarto.svg"},"toon":{"iconPath":"./../icons/toon.svg"},"image":{"iconPath":"./../icons/image.svg"},"palette":{"iconPath":"./../icons/palette.svg"},"rocket":{"iconPath":"./../icons/rocket.svg"},"routing":{"iconPath":"./../icons/routing.svg"},"redux-action":{"iconPath":"./../icons/redux-action.svg"},"redux-reducer":{"iconPath":"./../icons/redux-reducer.svg"},"redux-selector":{"iconPath":"./../icons/redux-selector.svg"},"redux-store":{"iconPath":"./../icons/redux-store.svg"},"typescript-def":{"iconPath":"./../icons/typescript-def.svg"},"typedoc":{"iconPath":"./../icons/typedoc.svg"},"markdoc-config":{"iconPath":"./../icons/markdoc-config.svg"},"markojs":{"iconPath":"./../icons/markojs.svg"},"astro":{"iconPath":"./../icons/astro.svg"},"astro-config":{"iconPath":"./../icons/astro-config.svg"},"vscode":{"iconPath":"./../icons/vscode.svg"},"varnish":{"iconPath":"./../icons/varnish.svg"},"qsharp":{"iconPath":"./../icons/qsharp.svg"},"zip":{"iconPath":"./../icons/zip.svg"},"vala":{"iconPath":"./../icons/vala.svg"},"zig":{"iconPath":"./../icons/zig.svg"},"exe":{"iconPath":"./../icons/exe.svg"},"hex":{"iconPath":"./../icons/hex.svg"},"jar":{"iconPath":"./../icons/jar.svg"},"javaclass":{"iconPath":"./../icons/javaclass.svg"},"h":{"iconPath":"./../icons/h.svg"},"hip":{"iconPath":"./../icons/hip.svg"},"hpp":{"iconPath":"./../icons/hpp.svg"},"rc":{"iconPath":"./../icons/rc.svg"},"go-mod":{"iconPath":"./../icons/go-mod.svg"},"ruff":{"iconPath":"./../icons/ruff.svg"},"uv":{"iconPath":"./../icons/uv.svg"},"scons":{"iconPath":"./../icons/scons.svg"},"scons_light":{"iconPath":"./../icons/scons_light.svg"},"url":{"iconPath":"./../icons/url.svg"},"excalidraw":{"iconPath":"./../icons/excalidraw.svg"},"gradle":{"iconPath":"./../icons/gradle.svg"},"word":{"iconPath":"./../icons/word.svg"},"certificate":{"iconPath":"./../icons/certificate.svg"},"license":{"iconPath":"./../icons/license.svg"},"unlicense":{"iconPath":"./../icons/unlicense.svg"},"key":{"iconPath":"./../icons/key.svg"},"keystatic":{"iconPath":"./../icons/keystatic.svg"},"font":{"iconPath":"./../icons/font.svg"},"lib":{"iconPath":"./../icons/lib.svg"},"dll":{"iconPath":"./../icons/dll.svg"},"gemfile":{"iconPath":"./../icons/gemfile.svg"},"rubocop":{"iconPath":"./../icons/rubocop.svg"},"rubocop_light":{"iconPath":"./../icons/rubocop_light.svg"},"rspec":{"iconPath":"./../icons/rspec.svg"},"arduino":{"iconPath":"./../icons/arduino.svg"},"sty":{"iconPath":"./../icons/sty.clone.svg"},"dtx":{"iconPath":"./../icons/dtx.clone.svg"},"bbx":{"iconPath":"./../icons/bbx.svg"},"cbx":{"iconPath":"./../icons/cbx.svg"},"lbx":{"iconPath":"./../icons/lbx.svg"},"latexmk":{"iconPath":"./../icons/latexmk.svg"},"powerpoint":{"iconPath":"./../icons/powerpoint.svg"},"video":{"iconPath":"./../icons/video.svg"},"virtual":{"iconPath":"./../icons/virtual.svg"},"vedic":{"iconPath":"./../icons/vedic.svg"},"email":{"iconPath":"./../icons/email.svg"},"audio":{"iconPath":"./../icons/audio.svg"},"lyric":{"iconPath":"./../icons/lyric.svg"},"raml":{"iconPath":"./../icons/raml.svg"},"xaml":{"iconPath":"./../icons/xaml.svg"},"happo":{"iconPath":"./../icons/happo.svg"},"chromatic":{"iconPath":"./../icons/chromatic.svg"},"kotlin":{"iconPath":"./../icons/kotlin.svg"},"mist":{"iconPath":"./../icons/mist.clone.svg"},"nextflow":{"iconPath":"./../icons/nextflow.svg"},"dart_generated":{"iconPath":"./../icons/dart_generated.svg"},"actionscript":{"iconPath":"./../icons/actionscript.svg"},"mxml":{"iconPath":"./../icons/mxml.svg"},"autohotkey":{"iconPath":"./../icons/autohotkey.svg"},"flash":{"iconPath":"./../icons/flash.svg"},"adobe-swc":{"iconPath":"./../icons/adobe-swc.svg"},"swc":{"iconPath":"./../icons/swc.svg"},"cmake":{"iconPath":"./../icons/cmake.svg"},"assembly":{"iconPath":"./../icons/assembly.svg"},"semgrep":{"iconPath":"./../icons/semgrep.svg"},"vue-config":{"iconPath":"./../icons/vue-config.svg"},"vuex-store":{"iconPath":"./../icons/vuex-store.svg"},"nuxt":{"iconPath":"./../icons/nuxt.svg"},"harmonix":{"iconPath":"./../icons/harmonix.svg"},"ocaml":{"iconPath":"./../icons/ocaml.svg"},"odin":{"iconPath":"./../icons/odin.svg"},"onnx":{"iconPath":"./../icons/onnx.svg"},"javascript-map":{"iconPath":"./../icons/javascript-map.svg"},"css-map":{"iconPath":"./../icons/css-map.svg"},"test-ts":{"iconPath":"./../icons/test-ts.svg"},"test-jsx":{"iconPath":"./../icons/test-jsx.svg"},"test-js":{"iconPath":"./../icons/test-js.svg"},"angular-component":{"iconPath":"./../icons/angular-component.clone.svg"},"angular-guard":{"iconPath":"./../icons/angular-guard.clone.svg"},"angular-service":{"iconPath":"./../icons/angular-service.clone.svg"},"angular-pipe":{"iconPath":"./../icons/angular-pipe.clone.svg"},"angular-directive":{"iconPath":"./../icons/angular-directive.clone.svg"},"angular-resolver":{"iconPath":"./../icons/angular-resolver.clone.svg"},"angular-interceptor":{"iconPath":"./../icons/angular-interceptor.clone.svg"},"smarty":{"iconPath":"./../icons/smarty.svg"},"bucklescript":{"iconPath":"./../icons/bucklescript.svg"},"merlin":{"iconPath":"./../icons/merlin.svg"},"verilog":{"iconPath":"./../icons/verilog.svg"},"mathematica":{"iconPath":"./../icons/mathematica.svg"},"vercel":{"iconPath":"./../icons/vercel.svg"},"vercel_light":{"iconPath":"./../icons/vercel_light.svg"},"liara":{"iconPath":"./../icons/liara.svg"},"verdaccio":{"iconPath":"./../icons/verdaccio.svg"},"payload":{"iconPath":"./../icons/payload.svg"},"payload_light":{"iconPath":"./../icons/payload_light.svg"},"next":{"iconPath":"./../icons/next.svg"},"next_light":{"iconPath":"./../icons/next_light.svg"},"remark":{"iconPath":"./../icons/remark.svg"},"remix":{"iconPath":"./../icons/remix.svg"},"remix_light":{"iconPath":"./../icons/remix_light.svg"},"opentofu_light":{"iconPath":"./../icons/opentofu_light.svg"},"laravel":{"iconPath":"./../icons/laravel.svg"},"vfl":{"iconPath":"./../icons/vfl.svg"},"kl":{"iconPath":"./../icons/kl.svg"},"posthtml":{"iconPath":"./../icons/posthtml.svg"},"todo":{"iconPath":"./../icons/todo.svg"},"http":{"iconPath":"./../icons/http.svg"},"restql":{"iconPath":"./../icons/restql.svg"},"kivy":{"iconPath":"./../icons/kivy.svg"},"graphcool":{"iconPath":"./../icons/graphcool.svg"},"sbt":{"iconPath":"./../icons/sbt.svg"},"webpack":{"iconPath":"./../icons/webpack.svg"},"rstack":{"iconPath":"./../icons/rstack.svg"},"lynx":{"iconPath":"./../icons/lynx.svg"},"ionic":{"iconPath":"./../icons/ionic.svg"},"gulp":{"iconPath":"./../icons/gulp.svg"},"nodejs":{"iconPath":"./../icons/nodejs.svg"},"npm":{"iconPath":"./../icons/npm.svg"},"yarn":{"iconPath":"./../icons/yarn.svg"},"android":{"iconPath":"./../icons/android.svg"},"tune":{"iconPath":"./../icons/tune.svg"},"turborepo":{"iconPath":"./../icons/turborepo.svg"},"turborepo_light":{"iconPath":"./../icons/turborepo_light.svg"},"babel":{"iconPath":"./../icons/babel.svg"},"blitz":{"iconPath":"./../icons/blitz.svg"},"contributing":{"iconPath":"./../icons/contributing.svg"},"readme":{"iconPath":"./../icons/readme.svg"},"changelog":{"iconPath":"./../icons/changelog.svg"},"architecture":{"iconPath":"./../icons/architecture.svg"},"credits":{"iconPath":"./../icons/credits.svg"},"authors":{"iconPath":"./../icons/authors.svg"},"flow":{"iconPath":"./../icons/flow.svg"},"favicon":{"iconPath":"./../icons/favicon.svg"},"karma":{"iconPath":"./../icons/karma.svg"},"bithound":{"iconPath":"./../icons/bithound.svg"},"svgo":{"iconPath":"./../icons/svgo.svg"},"appveyor":{"iconPath":"./../icons/appveyor.svg"},"travis":{"iconPath":"./../icons/travis.svg"},"codecov":{"iconPath":"./../icons/codecov.svg"},"sonarcloud":{"iconPath":"./../icons/sonarcloud.svg"},"protractor":{"iconPath":"./../icons/protractor.svg"},"fusebox":{"iconPath":"./../icons/fusebox.svg"},"heroku":{"iconPath":"./../icons/heroku.svg"},"gitlab":{"iconPath":"./../icons/gitlab.svg"},"bower":{"iconPath":"./../icons/bower.svg"},"eslint":{"iconPath":"./../icons/eslint.svg"},"conduct":{"iconPath":"./../icons/conduct.svg"},"watchman":{"iconPath":"./../icons/watchman.svg"},"aurelia":{"iconPath":"./../icons/aurelia.svg"},"auto":{"iconPath":"./../icons/auto.svg"},"auto_light":{"iconPath":"./../icons/auto_light.svg"},"mocha":{"iconPath":"./../icons/mocha.svg"},"jenkins":{"iconPath":"./../icons/jenkins.svg"},"firebase":{"iconPath":"./../icons/firebase.svg"},"figma":{"iconPath":"./../icons/figma.svg"},"rollup":{"iconPath":"./../icons/rollup.svg"},"huff_light":{"iconPath":"./../icons/huff_light.svg"},"hardhat":{"iconPath":"./../icons/hardhat.svg"},"stylelint":{"iconPath":"./../icons/stylelint.svg"},"stylelint_light":{"iconPath":"./../icons/stylelint_light.svg"},"code-climate":{"iconPath":"./../icons/code-climate.svg"},"code-climate_light":{"iconPath":"./../icons/code-climate_light.svg"},"prettier":{"iconPath":"./../icons/prettier.svg"},"renovate":{"iconPath":"./../icons/renovate.svg"},"apollo":{"iconPath":"./../icons/apollo.svg"},"nodemon":{"iconPath":"./../icons/nodemon.svg"},"ngrx-reducer":{"iconPath":"./../icons/ngrx-reducer.svg"},"ngrx-state":{"iconPath":"./../icons/ngrx-state.svg"},"ngrx-actions":{"iconPath":"./../icons/ngrx-actions.svg"},"ngrx-effects":{"iconPath":"./../icons/ngrx-effects.svg"},"ngrx-entity":{"iconPath":"./../icons/ngrx-entity.svg"},"ngrx-selectors":{"iconPath":"./../icons/ngrx-selectors.svg"},"webhint":{"iconPath":"./../icons/webhint.svg"},"browserlist":{"iconPath":"./../icons/browserlist.svg"},"browserlist_light":{"iconPath":"./../icons/browserlist_light.svg"},"crystal":{"iconPath":"./../icons/crystal.svg"},"crystal_light":{"iconPath":"./../icons/crystal_light.svg"},"snyk":{"iconPath":"./../icons/snyk.svg"},"drone":{"iconPath":"./../icons/drone.svg"},"drone_light":{"iconPath":"./../icons/drone_light.svg"},"cuda":{"iconPath":"./../icons/cuda.svg"},"opencode":{"iconPath":"./../icons/opencode.svg"},"opencode_light":{"iconPath":"./../icons/opencode_light.svg"},"dotjs":{"iconPath":"./../icons/dotjs.svg"},"ejs":{"iconPath":"./../icons/ejs.svg"},"sequelize":{"iconPath":"./../icons/sequelize.svg"},"gatsby":{"iconPath":"./../icons/gatsby.svg"},"wakatime":{"iconPath":"./../icons/wakatime.svg"},"wakatime_light":{"iconPath":"./../icons/wakatime_light.svg"},"circleci":{"iconPath":"./../icons/circleci.svg"},"circleci_light":{"iconPath":"./../icons/circleci_light.svg"},"cloudfoundry":{"iconPath":"./../icons/cloudfoundry.svg"},"grunt":{"iconPath":"./../icons/grunt.svg"},"jest":{"iconPath":"./../icons/jest.svg"},"storybook":{"iconPath":"./../icons/storybook.svg"},"wepy":{"iconPath":"./../icons/wepy.svg"},"fastlane":{"iconPath":"./../icons/fastlane.svg"},"hcl_light":{"iconPath":"./../icons/hcl_light.svg"},"san":{"iconPath":"./../icons/san.svg"},"quokka":{"iconPath":"./../icons/quokka.svg"},"wallaby":{"iconPath":"./../icons/wallaby.svg"},"stencil":{"iconPath":"./../icons/stencil.svg"},"red":{"iconPath":"./../icons/red.svg"},"makefile":{"iconPath":"./../icons/makefile.svg"},"foxpro":{"iconPath":"./../icons/foxpro.svg"},"i18n":{"iconPath":"./../icons/i18n.svg"},"webassembly":{"iconPath":"./../icons/webassembly.svg"},"semantic-release":{"iconPath":"./../icons/semantic-release.svg"},"semantic-release_light":{"iconPath":"./../icons/semantic-release_light.svg"},"bitbucket":{"iconPath":"./../icons/bitbucket.svg"},"d":{"iconPath":"./../icons/d.svg"},"mdx":{"iconPath":"./../icons/mdx.svg"},"mdsvex":{"iconPath":"./../icons/mdsvex.svg"},"ballerina":{"iconPath":"./../icons/ballerina.svg"},"racket":{"iconPath":"./../icons/racket.svg"},"bazel":{"iconPath":"./../icons/bazel.svg"},"mint":{"iconPath":"./../icons/mint.svg"},"velocity":{"iconPath":"./../icons/velocity.svg"},"azure-pipelines":{"iconPath":"./../icons/azure-pipelines.svg"},"azure":{"iconPath":"./../icons/azure.svg"},"vagrant":{"iconPath":"./../icons/vagrant.svg"},"prisma":{"iconPath":"./../icons/prisma.svg"},"abc":{"iconPath":"./../icons/abc.svg"},"asciidoc":{"iconPath":"./../icons/asciidoc.svg"},"istanbul":{"iconPath":"./../icons/istanbul.svg"},"edge":{"iconPath":"./../icons/edge.svg"},"scheme":{"iconPath":"./../icons/scheme.svg"},"lisp":{"iconPath":"./../icons/lisp.svg"},"tailwindcss":{"iconPath":"./../icons/tailwindcss.svg"},"3d":{"iconPath":"./../icons/3d.svg"},"buildkite":{"iconPath":"./../icons/buildkite.svg"},"netlify":{"iconPath":"./../icons/netlify.svg"},"netlify_light":{"iconPath":"./../icons/netlify_light.svg"},"adobe-illustrator":{"iconPath":"./../icons/adobe-illustrator.svg"},"adobe-illustrator_light":{"iconPath":"./../icons/adobe-illustrator_light.svg"},"adobe-photoshop":{"iconPath":"./../icons/adobe-photoshop.svg"},"adobe-photoshop_light":{"iconPath":"./../icons/adobe-photoshop_light.svg"},"svelte_js":{"iconPath":"./../icons/svelte_js.clone.svg"},"svelte_ts":{"iconPath":"./../icons/svelte_ts.clone.svg"},"nest":{"iconPath":"./../icons/nest.svg"},"nest-controller":{"iconPath":"./../icons/nest-controller.clone.svg"},"nest-middleware":{"iconPath":"./../icons/nest-middleware.clone.svg"},"nest-module":{"iconPath":"./../icons/nest-module.clone.svg"},"nest-service":{"iconPath":"./../icons/nest-service.clone.svg"},"nest-decorator":{"iconPath":"./../icons/nest-decorator.clone.svg"},"nest-pipe":{"iconPath":"./../icons/nest-pipe.clone.svg"},"nest-filter":{"iconPath":"./../icons/nest-filter.clone.svg"},"nest-gateway":{"iconPath":"./../icons/nest-gateway.clone.svg"},"nest-guard":{"iconPath":"./../icons/nest-guard.clone.svg"},"nest-resolver":{"iconPath":"./../icons/nest-resolver.clone.svg"},"nest-interceptor":{"iconPath":"./../icons/nest-interceptor.clone.svg"},"moon":{"iconPath":"./../icons/moon.svg"},"moonscript":{"iconPath":"./../icons/moonscript.svg"},"percy":{"iconPath":"./../icons/percy.svg"},"gitpod":{"iconPath":"./../icons/gitpod.svg"},"stackblitz":{"iconPath":"./../icons/stackblitz.svg"},"advpl":{"iconPath":"./../icons/advpl.svg"},"advpl-ptm":{"iconPath":"./../icons/advpl-ptm.clone.svg"},"advpl-tlpp":{"iconPath":"./../icons/advpl-tlpp.clone.svg"},"advpl-include":{"iconPath":"./../icons/advpl-include.clone.svg"},"codeowners":{"iconPath":"./../icons/codeowners.svg"},"gcp":{"iconPath":"./../icons/gcp.svg"},"amplify":{"iconPath":"./../icons/amplify.svg"},"disc":{"iconPath":"./../icons/disc.svg"},"fortran":{"iconPath":"./../icons/fortran.svg"},"tcl":{"iconPath":"./../icons/tcl.svg"},"liquid":{"iconPath":"./../icons/liquid.svg"},"husky":{"iconPath":"./../icons/husky.svg"},"coconut":{"iconPath":"./../icons/coconut.svg"},"tilt":{"iconPath":"./../icons/tilt.svg"},"capacitor":{"iconPath":"./../icons/capacitor.svg"},"sketch":{"iconPath":"./../icons/sketch.svg"},"adonis":{"iconPath":"./../icons/adonis.svg"},"forth":{"iconPath":"./../icons/forth.svg"},"uml":{"iconPath":"./../icons/uml.svg"},"uml_light":{"iconPath":"./../icons/uml_light.svg"},"meson":{"iconPath":"./../icons/meson.svg"},"commitizen":{"iconPath":"./../icons/commitizen.svg"},"commitlint":{"iconPath":"./../icons/commitlint.svg"},"buck":{"iconPath":"./../icons/buck.svg"},"nx":{"iconPath":"./../icons/nx.svg"},"opam":{"iconPath":"./../icons/opam.svg"},"dune":{"iconPath":"./../icons/dune.svg"},"imba":{"iconPath":"./../icons/imba.svg"},"drawio":{"iconPath":"./../icons/drawio.svg"},"pascal":{"iconPath":"./../icons/pascal.svg"},"unity":{"iconPath":"./../icons/unity.svg"},"roadmap":{"iconPath":"./../icons/roadmap.svg"},"nuget":{"iconPath":"./../icons/nuget.svg"},"command":{"iconPath":"./../icons/command.svg"},"stryker":{"iconPath":"./../icons/stryker.svg"},"denizenscript":{"iconPath":"./../icons/denizenscript.svg"},"modernizr":{"iconPath":"./../icons/modernizr.svg"},"slug":{"iconPath":"./../icons/slug.svg"},"stitches":{"iconPath":"./../icons/stitches.svg"},"stitches_light":{"iconPath":"./../icons/stitches_light.svg"},"replit":{"iconPath":"./../icons/replit.svg"},"rescript-interface":{"iconPath":"./../icons/rescript-interface.svg"},"duc":{"iconPath":"./../icons/duc.svg"},"snowpack":{"iconPath":"./../icons/snowpack.svg"},"snowpack_light":{"iconPath":"./../icons/snowpack_light.svg"},"brainfuck":{"iconPath":"./../icons/brainfuck.svg"},"bicep":{"iconPath":"./../icons/bicep.svg"},"cobol":{"iconPath":"./../icons/cobol.svg"},"quasar":{"iconPath":"./../icons/quasar.svg"},"dependabot":{"iconPath":"./../icons/dependabot.svg"},"pipeline":{"iconPath":"./../icons/pipeline.svg"},"vite":{"iconPath":"./../icons/vite.svg"},"vitest":{"iconPath":"./../icons/vitest.svg"},"velite":{"iconPath":"./../icons/velite.svg"},"rolldown":{"iconPath":"./../icons/rolldown.svg"},"opa":{"iconPath":"./../icons/opa.svg"},"lerna":{"iconPath":"./../icons/lerna.svg"},"windicss":{"iconPath":"./../icons/windicss.svg"},"textlint":{"iconPath":"./../icons/textlint.svg"},"lilypond":{"iconPath":"./../icons/lilypond.svg"},"chess_light":{"iconPath":"./../icons/chess_light.svg"},"sentry":{"iconPath":"./../icons/sentry.svg"},"contentlayer":{"iconPath":"./../icons/contentlayer.svg"},"phpunit":{"iconPath":"./../icons/phpunit.svg"},"php-cs-fixer":{"iconPath":"./../icons/php-cs-fixer.svg"},"robots":{"iconPath":"./../icons/robots.svg"},"tsconfig":{"iconPath":"./../icons/tsconfig.svg"},"tauri":{"iconPath":"./../icons/tauri.svg"},"jsconfig":{"iconPath":"./../icons/jsconfig.svg"},"maven":{"iconPath":"./../icons/maven.svg"},"ada":{"iconPath":"./../icons/ada.svg"},"serverless":{"iconPath":"./../icons/serverless.svg"},"supabase":{"iconPath":"./../icons/supabase.svg"},"ember":{"iconPath":"./../icons/ember.svg"},"horusec":{"iconPath":"./../icons/horusec.svg"},"poetry":{"iconPath":"./../icons/poetry.svg"},"pdm":{"iconPath":"./../icons/pdm.svg"},"coala":{"iconPath":"./../icons/coala.svg"},"parcel":{"iconPath":"./../icons/parcel.svg"},"dinophp":{"iconPath":"./../icons/dinophp.svg"},"teal":{"iconPath":"./../icons/teal.svg"},"template":{"iconPath":"./../icons/template.svg"},"astyle":{"iconPath":"./../icons/astyle.svg"},"lighthouse":{"iconPath":"./../icons/lighthouse.svg"},"svgr":{"iconPath":"./../icons/svgr.svg"},"rome":{"iconPath":"./../icons/rome.svg"},"cypress":{"iconPath":"./../icons/cypress.svg"},"siyuan":{"iconPath":"./../icons/siyuan.svg"},"ndst":{"iconPath":"./../icons/ndst.svg"},"plop":{"iconPath":"./../icons/plop.svg"},"tobi":{"iconPath":"./../icons/tobi.svg"},"tobimake":{"iconPath":"./../icons/tobimake.svg"},"gleam":{"iconPath":"./../icons/gleam.svg"},"pnpm":{"iconPath":"./../icons/pnpm.svg"},"pnpm_light":{"iconPath":"./../icons/pnpm_light.svg"},"gridsome":{"iconPath":"./../icons/gridsome.svg"},"steadybit":{"iconPath":"./../icons/steadybit.svg"},"capnp":{"iconPath":"./../icons/capnp.svg"},"caddy":{"iconPath":"./../icons/caddy.svg"},"openapi":{"iconPath":"./../icons/openapi.svg"},"openapi_light":{"iconPath":"./../icons/openapi_light.svg"},"swagger":{"iconPath":"./../icons/swagger.svg"},"bun":{"iconPath":"./../icons/bun.svg"},"bun_light":{"iconPath":"./../icons/bun_light.svg"},"antlr":{"iconPath":"./../icons/antlr.svg"},"pinejs":{"iconPath":"./../icons/pinejs.svg"},"nano-staged":{"iconPath":"./../icons/nano-staged.svg"},"nano-staged_light":{"iconPath":"./../icons/nano-staged_light.svg"},"knip":{"iconPath":"./../icons/knip.svg"},"taskfile":{"iconPath":"./../icons/taskfile.svg"},"craco":{"iconPath":"./../icons/craco.svg"},"gamemaker":{"iconPath":"./../icons/gamemaker.svg"},"tldraw":{"iconPath":"./../icons/tldraw.svg"},"tldraw_light":{"iconPath":"./../icons/tldraw_light.svg"},"mercurial":{"iconPath":"./../icons/mercurial.svg"},"deno":{"iconPath":"./../icons/deno.svg"},"deno_light":{"iconPath":"./../icons/deno_light.svg"},"plastic":{"iconPath":"./../icons/plastic.svg"},"typst":{"iconPath":"./../icons/typst.svg"},"unocss":{"iconPath":"./../icons/unocss.svg"},"ifanr-cloud":{"iconPath":"./../icons/ifanr-cloud.svg"},"qwik":{"iconPath":"./../icons/qwik.svg"},"mermaid":{"iconPath":"./../icons/mermaid.svg"},"syncpack":{"iconPath":"./../icons/syncpack.svg"},"werf":{"iconPath":"./../icons/werf.svg"},"roblox":{"iconPath":"./../icons/roblox.svg"},"rojo":{"iconPath":"./../icons/rojo.svg"},"wally":{"iconPath":"./../icons/wally.svg"},"rbxmk":{"iconPath":"./../icons/rbxmk.svg"},"panda":{"iconPath":"./../icons/panda.svg"},"biome":{"iconPath":"./../icons/biome.svg"},"esbuild":{"iconPath":"./../icons/esbuild.svg"},"spwn":{"iconPath":"./../icons/spwn.svg"},"templ":{"iconPath":"./../icons/templ.svg"},"chrome":{"iconPath":"./../icons/chrome.svg"},"stan":{"iconPath":"./../icons/stan.svg"},"abap":{"iconPath":"./../icons/abap.svg"},"drizzle":{"iconPath":"./../icons/drizzle.svg"},"lottie":{"iconPath":"./../icons/lottie.svg"},"puppeteer":{"iconPath":"./../icons/puppeteer.svg"},"apps-script":{"iconPath":"./../icons/apps-script.svg"},"garden":{"iconPath":"./../icons/garden.svg"},"pkl":{"iconPath":"./../icons/pkl.svg"},"kubernetes":{"iconPath":"./../icons/kubernetes.svg"},"phpstan":{"iconPath":"./../icons/phpstan.svg"},"screwdriver":{"iconPath":"./../icons/screwdriver.svg"},"snapcraft":{"iconPath":"./../icons/snapcraft.svg"},"container":{"iconPath":"./../icons/container.clone.svg"},"kcl":{"iconPath":"./../icons/kcl.svg"},"verified":{"iconPath":"./../icons/verified.svg"},"bruno":{"iconPath":"./../icons/bruno.svg"},"cairo":{"iconPath":"./../icons/cairo.svg"},"grafana-alloy":{"iconPath":"./../icons/grafana-alloy.svg"},"clangd":{"iconPath":"./../icons/clangd.svg"},"freemarker":{"iconPath":"./../icons/freemarker.svg"},"markdownlint":{"iconPath":"./../icons/markdownlint.svg"},"tsil":{"iconPath":"./../icons/tsil.svg"},"trigger":{"iconPath":"./../icons/trigger.svg"},"deepsource":{"iconPath":"./../icons/deepsource.svg"},"tape":{"iconPath":"./../icons/tape.clone.svg"},"hurl":{"iconPath":"./../icons/hurl.svg"},"jsr":{"iconPath":"./../icons/jsr.svg"},"jsr_light":{"iconPath":"./../icons/jsr_light.svg"},"coderabbit-ai":{"iconPath":"./../icons/coderabbit-ai.svg"},"gemini-ai":{"iconPath":"./../icons/gemini-ai.svg"},"taze":{"iconPath":"./../icons/taze.svg"},"wxt":{"iconPath":"./../icons/wxt.svg"},"verse":{"iconPath":"./../icons/verse.svg"},"verse_light":{"iconPath":"./../icons/verse_light.svg"},"sway":{"iconPath":"./../icons/sway.svg"},"lefthook":{"iconPath":"./../icons/lefthook.svg"},"label":{"iconPath":"./../icons/label.svg"},"zeabur":{"iconPath":"./../icons/zeabur.svg"},"zeabur_light":{"iconPath":"./../icons/zeabur_light.svg"},"copilot":{"iconPath":"./../icons/copilot.svg"},"copilot_light":{"iconPath":"./../icons/copilot_light.svg"},"bench-ts":{"iconPath":"./../icons/bench-ts.svg"},"bench-jsx":{"iconPath":"./../icons/bench-jsx.svg"},"bench-js":{"iconPath":"./../icons/bench-js.svg"},"pre-commit":{"iconPath":"./../icons/pre-commit.svg"},"controller":{"iconPath":"./../icons/controller.svg"},"dependencies-update":{"iconPath":"./../icons/dependencies-update.svg"},"lintstaged":{"iconPath":"./../icons/lintstaged.svg"},"histoire":{"iconPath":"./../icons/histoire.svg"},"installation":{"iconPath":"./../icons/installation.svg"},"github-sponsors":{"iconPath":"./../icons/github-sponsors.svg"},"minecraft-fabric":{"iconPath":"./../icons/minecraft-fabric.svg"},"umi":{"iconPath":"./../icons/umi.svg"},"pm2-ecosystem":{"iconPath":"./../icons/pm2-ecosystem.svg"},"hosts_light":{"iconPath":"./../icons/hosts_light.svg"},"citation":{"iconPath":"./../icons/citation.svg"},"xmake":{"iconPath":"./../icons/xmake.svg"},"subtitles":{"iconPath":"./../icons/subtitles.svg"},"wrangler":{"iconPath":"./../icons/wrangler.svg"},"epub":{"iconPath":"./../icons/epub.svg"},"regedit":{"iconPath":"./../icons/regedit.svg"},"cline":{"iconPath":"./../icons/cline.svg"},"packship":{"iconPath":"./../icons/packship.svg"},"snakemake":{"iconPath":"./../icons/snakemake.svg"},"hadolint":{"iconPath":"./../icons/hadolint.svg"},"coloredpetrinets":{"iconPath":"./../icons/coloredpetrinets.svg"},"pytorch":{"iconPath":"./../icons/pytorch.svg"},"blender":{"iconPath":"./../icons/blender.svg"},"tsdoc":{"iconPath":"./../icons/tsdoc.svg"},"oxc":{"iconPath":"./../icons/oxc.svg"},"vanilla-extract":{"iconPath":"./../icons/vanilla-extract.svg"},"claude":{"iconPath":"./../icons/claude.svg"},"cursor":{"iconPath":"./../icons/cursor.svg"},"cursor_light":{"iconPath":"./../icons/cursor_light.svg"},"metro":{"iconPath":"./../icons/metro.svg"},"bashly":{"iconPath":"./../icons/bashly.svg"},"bashly-settings":{"iconPath":"./../icons/bashly-settings.clone.svg"},"bashly-settings_light":{"iconPath":"./../icons/bashly-settings_light.clone.svg"},"bashly-hook":{"iconPath":"./../icons/bashly-hook.svg"},"bashly-strings":{"iconPath":"./../icons/bashly-strings.clone.svg"},"bashly-strings_light":{"iconPath":"./../icons/bashly-strings_light.clone.svg"},"google":{"iconPath":"./../icons/google.svg"},"toc":{"iconPath":"./../icons/toc.svg"},"shellcheck":{"iconPath":"./../icons/shellcheck.svg"},"shellcheck_light":{"iconPath":"./../icons/shellcheck_light.svg"},"salt":{"iconPath":"./../icons/salt.svg"},"warp":{"iconPath":"./../icons/warp.svg"},"warp_light":{"iconPath":"./../icons/warp_light.svg"},"macaulay2":{"iconPath":"./../icons/macaulay2.svg"},"uiua":{"iconPath":"./../icons/uiua.svg"},"tsdown":{"iconPath":"./../icons/tsdown.svg"},"appwrite":{"iconPath":"./../icons/appwrite.svg"},"expo":{"iconPath":"./../icons/expo.svg"},"expo_light":{"iconPath":"./../icons/expo_light.svg"},"agent":{"iconPath":"./../icons/agent.svg"},"mrpack":{"iconPath":"./../icons/mrpack.svg"},"zizmor":{"iconPath":"./../icons/zizmor.svg"},"peg":{"iconPath":"./../icons/peg.svg"},"file":{"iconPath":"./../icons/file.svg"},"folder-rust":{"iconPath":"./../icons/folder-rust.svg"},"folder-rust-open":{"iconPath":"./../icons/folder-rust-open.svg"},"folder-robot":{"iconPath":"./../icons/folder-robot.svg"},"folder-robot-open":{"iconPath":"./../icons/folder-robot-open.svg"},"folder-src":{"iconPath":"./../icons/folder-src.svg"},"folder-src-open":{"iconPath":"./../icons/folder-src-open.svg"},"folder-dist":{"iconPath":"./../icons/folder-dist.svg"},"folder-dist-open":{"iconPath":"./../icons/folder-dist-open.svg"},"folder-css":{"iconPath":"./../icons/folder-css.svg"},"folder-css-open":{"iconPath":"./../icons/folder-css-open.svg"},"folder-sass":{"iconPath":"./../icons/folder-sass.svg"},"folder-sass-open":{"iconPath":"./../icons/folder-sass-open.svg"},"folder-television":{"iconPath":"./../icons/folder-television.svg"},"folder-television-open":{"iconPath":"./../icons/folder-television-open.svg"},"folder-desktop":{"iconPath":"./../icons/folder-desktop.svg"},"folder-desktop-open":{"iconPath":"./../icons/folder-desktop-open.svg"},"folder-bluetooth":{"iconPath":"./../icons/folder-bluetooth.svg"},"folder-bluetooth-open":{"iconPath":"./../icons/folder-bluetooth-open.svg"},"folder-console":{"iconPath":"./../icons/folder-console.svg"},"folder-console-open":{"iconPath":"./../icons/folder-console-open.svg"},"folder-images":{"iconPath":"./../icons/folder-images.svg"},"folder-images-open":{"iconPath":"./../icons/folder-images-open.svg"},"folder-scripts":{"iconPath":"./../icons/folder-scripts.svg"},"folder-scripts-open":{"iconPath":"./../icons/folder-scripts-open.svg"},"folder-node":{"iconPath":"./../icons/folder-node.svg"},"folder-node-open":{"iconPath":"./../icons/folder-node-open.svg"},"folder-javascript":{"iconPath":"./../icons/folder-javascript.svg"},"folder-javascript-open":{"iconPath":"./../icons/folder-javascript-open.svg"},"folder-json":{"iconPath":"./../icons/folder-json.svg"},"folder-json-open":{"iconPath":"./../icons/folder-json-open.svg"},"folder-font":{"iconPath":"./../icons/folder-font.svg"},"folder-font-open":{"iconPath":"./../icons/folder-font-open.svg"},"folder-bower":{"iconPath":"./../icons/folder-bower.svg"},"folder-bower-open":{"iconPath":"./../icons/folder-bower-open.svg"},"folder-test":{"iconPath":"./../icons/folder-test.svg"},"folder-test-open":{"iconPath":"./../icons/folder-test-open.svg"},"folder-directive":{"iconPath":"./../icons/folder-directive.svg"},"folder-directive-open":{"iconPath":"./../icons/folder-directive-open.svg"},"folder-jinja":{"iconPath":"./../icons/folder-jinja.svg"},"folder-jinja-open":{"iconPath":"./../icons/folder-jinja-open.svg"},"folder-jinja_light":{"iconPath":"./../icons/folder-jinja_light.svg"},"folder-jinja-open_light":{"iconPath":"./../icons/folder-jinja-open_light.svg"},"folder-markdown":{"iconPath":"./../icons/folder-markdown.svg"},"folder-markdown-open":{"iconPath":"./../icons/folder-markdown-open.svg"},"folder-pdm":{"iconPath":"./../icons/folder-pdm.svg"},"folder-pdm-open":{"iconPath":"./../icons/folder-pdm-open.svg"},"folder-php":{"iconPath":"./../icons/folder-php.svg"},"folder-php-open":{"iconPath":"./../icons/folder-php-open.svg"},"folder-phpmailer":{"iconPath":"./../icons/folder-phpmailer.svg"},"folder-phpmailer-open":{"iconPath":"./../icons/folder-phpmailer-open.svg"},"folder-sublime":{"iconPath":"./../icons/folder-sublime.svg"},"folder-sublime-open":{"iconPath":"./../icons/folder-sublime-open.svg"},"folder-docs":{"iconPath":"./../icons/folder-docs.svg"},"folder-docs-open":{"iconPath":"./../icons/folder-docs-open.svg"},"folder-gh-workflows":{"iconPath":"./../icons/folder-gh-workflows.svg"},"folder-gh-workflows-open":{"iconPath":"./../icons/folder-gh-workflows-open.svg"},"folder-gitea-workflows":{"iconPath":"./../icons/folder-gitea-workflows.clone.svg"},"folder-gitea-workflows-open":{"iconPath":"./../icons/folder-gitea-workflows-open.clone.svg"},"folder-git":{"iconPath":"./../icons/folder-git.svg"},"folder-git-open":{"iconPath":"./../icons/folder-git-open.svg"},"folder-github":{"iconPath":"./../icons/folder-github.svg"},"folder-github-open":{"iconPath":"./../icons/folder-github-open.svg"},"folder-gitea":{"iconPath":"./../icons/folder-gitea.svg"},"folder-gitea-open":{"iconPath":"./../icons/folder-gitea-open.svg"},"folder-gitlab":{"iconPath":"./../icons/folder-gitlab.svg"},"folder-gitlab-open":{"iconPath":"./../icons/folder-gitlab-open.svg"},"folder-forgejo":{"iconPath":"./../icons/folder-forgejo.svg"},"folder-forgejo-open":{"iconPath":"./../icons/folder-forgejo-open.svg"},"folder-vscode":{"iconPath":"./../icons/folder-vscode.svg"},"folder-vscode-open":{"iconPath":"./../icons/folder-vscode-open.svg"},"folder-views":{"iconPath":"./../icons/folder-views.svg"},"folder-views-open":{"iconPath":"./../icons/folder-views-open.svg"},"folder-vue":{"iconPath":"./../icons/folder-vue.svg"},"folder-vue-open":{"iconPath":"./../icons/folder-vue-open.svg"},"folder-vuepress":{"iconPath":"./../icons/folder-vuepress.svg"},"folder-vuepress-open":{"iconPath":"./../icons/folder-vuepress-open.svg"},"folder-expo":{"iconPath":"./../icons/folder-expo.svg"},"folder-expo-open":{"iconPath":"./../icons/folder-expo-open.svg"},"folder-config":{"iconPath":"./../icons/folder-config.svg"},"folder-config-open":{"iconPath":"./../icons/folder-config-open.svg"},"folder-i18n":{"iconPath":"./../icons/folder-i18n.svg"},"folder-i18n-open":{"iconPath":"./../icons/folder-i18n-open.svg"},"folder-components":{"iconPath":"./../icons/folder-components.svg"},"folder-components-open":{"iconPath":"./../icons/folder-components-open.svg"},"folder-verdaccio":{"iconPath":"./../icons/folder-verdaccio.svg"},"folder-verdaccio-open":{"iconPath":"./../icons/folder-verdaccio-open.svg"},"folder-aurelia":{"iconPath":"./../icons/folder-aurelia.svg"},"folder-aurelia-open":{"iconPath":"./../icons/folder-aurelia-open.svg"},"folder-resource":{"iconPath":"./../icons/folder-resource.svg"},"folder-resource-open":{"iconPath":"./../icons/folder-resource-open.svg"},"folder-lib":{"iconPath":"./../icons/folder-lib.svg"},"folder-lib-open":{"iconPath":"./../icons/folder-lib-open.svg"},"folder-theme":{"iconPath":"./../icons/folder-theme.svg"},"folder-theme-open":{"iconPath":"./../icons/folder-theme-open.svg"},"folder-webpack":{"iconPath":"./../icons/folder-webpack.svg"},"folder-webpack-open":{"iconPath":"./../icons/folder-webpack-open.svg"},"folder-global":{"iconPath":"./../icons/folder-global.svg"},"folder-global-open":{"iconPath":"./../icons/folder-global-open.svg"},"folder-public":{"iconPath":"./../icons/folder-public.svg"},"folder-public-open":{"iconPath":"./../icons/folder-public-open.svg"},"folder-include":{"iconPath":"./../icons/folder-include.svg"},"folder-include-open":{"iconPath":"./../icons/folder-include-open.svg"},"folder-docker":{"iconPath":"./../icons/folder-docker.svg"},"folder-docker-open":{"iconPath":"./../icons/folder-docker-open.svg"},"folder-nginx":{"iconPath":"./../icons/folder-nginx.svg"},"folder-nginx-open":{"iconPath":"./../icons/folder-nginx-open.svg"},"folder-ngrx-store":{"iconPath":"./../icons/folder-ngrx-store.svg"},"folder-ngrx-store-open":{"iconPath":"./../icons/folder-ngrx-store-open.svg"},"folder-ngrx-effects":{"iconPath":"./../icons/folder-ngrx-effects.clone.svg"},"folder-ngrx-effects-open":{"iconPath":"./../icons/folder-ngrx-effects-open.clone.svg"},"folder-ngrx-state":{"iconPath":"./../icons/folder-ngrx-state.clone.svg"},"folder-ngrx-state-open":{"iconPath":"./../icons/folder-ngrx-state-open.clone.svg"},"folder-ngrx-reducer":{"iconPath":"./../icons/folder-ngrx-reducer.clone.svg"},"folder-ngrx-reducer-open":{"iconPath":"./../icons/folder-ngrx-reducer-open.clone.svg"},"folder-ngrx-actions":{"iconPath":"./../icons/folder-ngrx-actions.clone.svg"},"folder-ngrx-actions-open":{"iconPath":"./../icons/folder-ngrx-actions-open.clone.svg"},"folder-ngrx-entities":{"iconPath":"./../icons/folder-ngrx-entities.clone.svg"},"folder-ngrx-entities-open":{"iconPath":"./../icons/folder-ngrx-entities-open.clone.svg"},"folder-ngrx-selectors":{"iconPath":"./../icons/folder-ngrx-selectors.clone.svg"},"folder-ngrx-selectors-open":{"iconPath":"./../icons/folder-ngrx-selectors-open.clone.svg"},"folder-redux-reducer":{"iconPath":"./../icons/folder-redux-reducer.svg"},"folder-redux-reducer-open":{"iconPath":"./../icons/folder-redux-reducer-open.svg"},"folder-redux-actions":{"iconPath":"./../icons/folder-redux-actions.clone.svg"},"folder-redux-actions-open":{"iconPath":"./../icons/folder-redux-actions-open.clone.svg"},"folder-redux-toolkit":{"iconPath":"./../icons/folder-redux-toolkit.clone.svg"},"folder-redux-toolkit-open":{"iconPath":"./../icons/folder-redux-toolkit-open.clone.svg"},"folder-redux-selector":{"iconPath":"./../icons/folder-redux-selector.clone.svg"},"folder-redux-selector-open":{"iconPath":"./../icons/folder-redux-selector-open.clone.svg"},"folder-redux-store":{"iconPath":"./../icons/folder-redux-store.clone.svg"},"folder-redux-store-open":{"iconPath":"./../icons/folder-redux-store-open.clone.svg"},"folder-react-components":{"iconPath":"./../icons/folder-react-components.svg"},"folder-react-components-open":{"iconPath":"./../icons/folder-react-components-open.svg"},"folder-astro":{"iconPath":"./../icons/folder-astro.svg"},"folder-astro-open":{"iconPath":"./../icons/folder-astro-open.svg"},"folder-database":{"iconPath":"./../icons/folder-database.svg"},"folder-database-open":{"iconPath":"./../icons/folder-database-open.svg"},"folder-migrations":{"iconPath":"./../icons/folder-migrations.svg"},"folder-migrations-open":{"iconPath":"./../icons/folder-migrations-open.svg"},"folder-log":{"iconPath":"./../icons/folder-log.svg"},"folder-log-open":{"iconPath":"./../icons/folder-log-open.svg"},"folder-target":{"iconPath":"./../icons/folder-target.svg"},"folder-target-open":{"iconPath":"./../icons/folder-target-open.svg"},"folder-temp":{"iconPath":"./../icons/folder-temp.svg"},"folder-temp-open":{"iconPath":"./../icons/folder-temp-open.svg"},"folder-aws":{"iconPath":"./../icons/folder-aws.svg"},"folder-aws-open":{"iconPath":"./../icons/folder-aws-open.svg"},"folder-audio":{"iconPath":"./../icons/folder-audio.svg"},"folder-audio-open":{"iconPath":"./../icons/folder-audio-open.svg"},"folder-video":{"iconPath":"./../icons/folder-video.svg"},"folder-video-open":{"iconPath":"./../icons/folder-video-open.svg"},"folder-kubernetes":{"iconPath":"./../icons/folder-kubernetes.svg"},"folder-kubernetes-open":{"iconPath":"./../icons/folder-kubernetes-open.svg"},"folder-import":{"iconPath":"./../icons/folder-import.svg"},"folder-import-open":{"iconPath":"./../icons/folder-import-open.svg"},"folder-export":{"iconPath":"./../icons/folder-export.svg"},"folder-export-open":{"iconPath":"./../icons/folder-export-open.svg"},"folder-wakatime":{"iconPath":"./../icons/folder-wakatime.svg"},"folder-wakatime-open":{"iconPath":"./../icons/folder-wakatime-open.svg"},"folder-circleci":{"iconPath":"./../icons/folder-circleci.svg"},"folder-circleci-open":{"iconPath":"./../icons/folder-circleci-open.svg"},"folder-wordpress":{"iconPath":"./../icons/folder-wordpress.svg"},"folder-wordpress-open":{"iconPath":"./../icons/folder-wordpress-open.svg"},"folder-gradle":{"iconPath":"./../icons/folder-gradle.svg"},"folder-gradle-open":{"iconPath":"./../icons/folder-gradle-open.svg"},"folder-coverage":{"iconPath":"./../icons/folder-coverage.svg"},"folder-coverage-open":{"iconPath":"./../icons/folder-coverage-open.svg"},"folder-class":{"iconPath":"./../icons/folder-class.svg"},"folder-class-open":{"iconPath":"./../icons/folder-class-open.svg"},"folder-other":{"iconPath":"./../icons/folder-other.svg"},"folder-other-open":{"iconPath":"./../icons/folder-other-open.svg"},"folder-lua":{"iconPath":"./../icons/folder-lua.svg"},"folder-lua-open":{"iconPath":"./../icons/folder-lua-open.svg"},"folder-turborepo":{"iconPath":"./../icons/folder-turborepo.svg"},"folder-turborepo-open":{"iconPath":"./../icons/folder-turborepo-open.svg"},"folder-typescript":{"iconPath":"./../icons/folder-typescript.svg"},"folder-typescript-open":{"iconPath":"./../icons/folder-typescript-open.svg"},"folder-graphql":{"iconPath":"./../icons/folder-graphql.svg"},"folder-graphql-open":{"iconPath":"./../icons/folder-graphql-open.svg"},"folder-routes":{"iconPath":"./../icons/folder-routes.svg"},"folder-routes-open":{"iconPath":"./../icons/folder-routes-open.svg"},"folder-ci":{"iconPath":"./../icons/folder-ci.svg"},"folder-ci-open":{"iconPath":"./../icons/folder-ci-open.svg"},"folder-eslint":{"iconPath":"./../icons/folder-eslint.svg"},"folder-eslint-open":{"iconPath":"./../icons/folder-eslint-open.svg"},"folder-benchmark":{"iconPath":"./../icons/folder-benchmark.svg"},"folder-benchmark-open":{"iconPath":"./../icons/folder-benchmark-open.svg"},"folder-messages":{"iconPath":"./../icons/folder-messages.svg"},"folder-messages-open":{"iconPath":"./../icons/folder-messages-open.svg"},"folder-less":{"iconPath":"./../icons/folder-less.svg"},"folder-less-open":{"iconPath":"./../icons/folder-less-open.svg"},"folder-gulp":{"iconPath":"./../icons/folder-gulp.svg"},"folder-gulp-open":{"iconPath":"./../icons/folder-gulp-open.svg"},"folder-python":{"iconPath":"./../icons/folder-python.svg"},"folder-python-open":{"iconPath":"./../icons/folder-python-open.svg"},"folder-r":{"iconPath":"./../icons/folder-r.svg"},"folder-r-open":{"iconPath":"./../icons/folder-r-open.svg"},"folder-sandbox":{"iconPath":"./../icons/folder-sandbox.svg"},"folder-sandbox-open":{"iconPath":"./../icons/folder-sandbox-open.svg"},"folder-scons":{"iconPath":"./../icons/folder-scons.svg"},"folder-scons-open":{"iconPath":"./../icons/folder-scons-open.svg"},"folder-mojo":{"iconPath":"./../icons/folder-mojo.svg"},"folder-mojo-open":{"iconPath":"./../icons/folder-mojo-open.svg"},"folder-moon":{"iconPath":"./../icons/folder-moon.svg"},"folder-moon-open":{"iconPath":"./../icons/folder-moon-open.svg"},"folder-debug":{"iconPath":"./../icons/folder-debug.svg"},"folder-debug-open":{"iconPath":"./../icons/folder-debug-open.svg"},"folder-fastlane":{"iconPath":"./../icons/folder-fastlane.svg"},"folder-fastlane-open":{"iconPath":"./../icons/folder-fastlane-open.svg"},"folder-plugin":{"iconPath":"./../icons/folder-plugin.svg"},"folder-plugin-open":{"iconPath":"./../icons/folder-plugin-open.svg"},"folder-middleware":{"iconPath":"./../icons/folder-middleware.svg"},"folder-middleware-open":{"iconPath":"./../icons/folder-middleware-open.svg"},"folder-controller":{"iconPath":"./../icons/folder-controller.svg"},"folder-controller-open":{"iconPath":"./../icons/folder-controller-open.svg"},"folder-ansible":{"iconPath":"./../icons/folder-ansible.svg"},"folder-ansible-open":{"iconPath":"./../icons/folder-ansible-open.svg"},"folder-server":{"iconPath":"./../icons/folder-server.svg"},"folder-server-open":{"iconPath":"./../icons/folder-server-open.svg"},"folder-client":{"iconPath":"./../icons/folder-client.svg"},"folder-client-open":{"iconPath":"./../icons/folder-client-open.svg"},"folder-tasks":{"iconPath":"./../icons/folder-tasks.svg"},"folder-tasks-open":{"iconPath":"./../icons/folder-tasks-open.svg"},"folder-android":{"iconPath":"./../icons/folder-android.svg"},"folder-android-open":{"iconPath":"./../icons/folder-android-open.svg"},"folder-ios":{"iconPath":"./../icons/folder-ios.svg"},"folder-ios-open":{"iconPath":"./../icons/folder-ios-open.svg"},"folder-ui":{"iconPath":"./../icons/folder-ui.svg"},"folder-ui-open":{"iconPath":"./../icons/folder-ui-open.svg"},"folder-upload":{"iconPath":"./../icons/folder-upload.svg"},"folder-upload-open":{"iconPath":"./../icons/folder-upload-open.svg"},"folder-download":{"iconPath":"./../icons/folder-download.svg"},"folder-download-open":{"iconPath":"./../icons/folder-download-open.svg"},"folder-tools":{"iconPath":"./../icons/folder-tools.svg"},"folder-tools-open":{"iconPath":"./../icons/folder-tools-open.svg"},"folder-helper":{"iconPath":"./../icons/folder-helper.svg"},"folder-helper-open":{"iconPath":"./../icons/folder-helper-open.svg"},"folder-serverless":{"iconPath":"./../icons/folder-serverless.svg"},"folder-serverless-open":{"iconPath":"./../icons/folder-serverless-open.svg"},"folder-api":{"iconPath":"./../icons/folder-api.svg"},"folder-api-open":{"iconPath":"./../icons/folder-api-open.svg"},"folder-app":{"iconPath":"./../icons/folder-app.svg"},"folder-app-open":{"iconPath":"./../icons/folder-app-open.svg"},"folder-apollo":{"iconPath":"./../icons/folder-apollo.svg"},"folder-apollo-open":{"iconPath":"./../icons/folder-apollo-open.svg"},"folder-archive":{"iconPath":"./../icons/folder-archive.svg"},"folder-archive-open":{"iconPath":"./../icons/folder-archive-open.svg"},"folder-backup":{"iconPath":"./../icons/folder-backup.svg"},"folder-backup-open":{"iconPath":"./../icons/folder-backup-open.svg"},"folder-batch":{"iconPath":"./../icons/folder-batch.svg"},"folder-batch-open":{"iconPath":"./../icons/folder-batch-open.svg"},"folder-buildkite":{"iconPath":"./../icons/folder-buildkite.svg"},"folder-buildkite-open":{"iconPath":"./../icons/folder-buildkite-open.svg"},"folder-cluster":{"iconPath":"./../icons/folder-cluster.svg"},"folder-cluster-open":{"iconPath":"./../icons/folder-cluster-open.svg"},"folder-command":{"iconPath":"./../icons/folder-command.svg"},"folder-command-open":{"iconPath":"./../icons/folder-command-open.svg"},"folder-constant":{"iconPath":"./../icons/folder-constant.svg"},"folder-constant-open":{"iconPath":"./../icons/folder-constant-open.svg"},"folder-container":{"iconPath":"./../icons/folder-container.svg"},"folder-container-open":{"iconPath":"./../icons/folder-container-open.svg"},"folder-content":{"iconPath":"./../icons/folder-content.svg"},"folder-content-open":{"iconPath":"./../icons/folder-content-open.svg"},"folder-context":{"iconPath":"./../icons/folder-context.svg"},"folder-context-open":{"iconPath":"./../icons/folder-context-open.svg"},"folder-core":{"iconPath":"./../icons/folder-core.svg"},"folder-core-open":{"iconPath":"./../icons/folder-core-open.svg"},"folder-delta":{"iconPath":"./../icons/folder-delta.svg"},"folder-delta-open":{"iconPath":"./../icons/folder-delta-open.svg"},"folder-dump":{"iconPath":"./../icons/folder-dump.svg"},"folder-dump-open":{"iconPath":"./../icons/folder-dump-open.svg"},"folder-examples":{"iconPath":"./../icons/folder-examples.svg"},"folder-examples-open":{"iconPath":"./../icons/folder-examples-open.svg"},"folder-environment":{"iconPath":"./../icons/folder-environment.svg"},"folder-environment-open":{"iconPath":"./../icons/folder-environment-open.svg"},"folder-functions":{"iconPath":"./../icons/folder-functions.svg"},"folder-functions-open":{"iconPath":"./../icons/folder-functions-open.svg"},"folder-generator":{"iconPath":"./../icons/folder-generator.svg"},"folder-generator-open":{"iconPath":"./../icons/folder-generator-open.svg"},"folder-hook":{"iconPath":"./../icons/folder-hook.svg"},"folder-hook-open":{"iconPath":"./../icons/folder-hook-open.svg"},"folder-trigger":{"iconPath":"./../icons/folder-trigger.svg"},"folder-trigger-open":{"iconPath":"./../icons/folder-trigger-open.svg"},"folder-job":{"iconPath":"./../icons/folder-job.svg"},"folder-job-open":{"iconPath":"./../icons/folder-job-open.svg"},"folder-keys":{"iconPath":"./../icons/folder-keys.svg"},"folder-keys-open":{"iconPath":"./../icons/folder-keys-open.svg"},"folder-layout":{"iconPath":"./../icons/folder-layout.svg"},"folder-layout-open":{"iconPath":"./../icons/folder-layout-open.svg"},"folder-mail":{"iconPath":"./../icons/folder-mail.svg"},"folder-mail-open":{"iconPath":"./../icons/folder-mail-open.svg"},"folder-mappings":{"iconPath":"./../icons/folder-mappings.svg"},"folder-mappings-open":{"iconPath":"./../icons/folder-mappings-open.svg"},"folder-meta":{"iconPath":"./../icons/folder-meta.svg"},"folder-meta-open":{"iconPath":"./../icons/folder-meta-open.svg"},"folder-changesets":{"iconPath":"./../icons/folder-changesets.svg"},"folder-changesets-open":{"iconPath":"./../icons/folder-changesets-open.svg"},"folder-packages":{"iconPath":"./../icons/folder-packages.svg"},"folder-packages-open":{"iconPath":"./../icons/folder-packages-open.svg"},"folder-shared":{"iconPath":"./../icons/folder-shared.svg"},"folder-shared-open":{"iconPath":"./../icons/folder-shared-open.svg"},"folder-shader":{"iconPath":"./../icons/folder-shader.svg"},"folder-shader-open":{"iconPath":"./../icons/folder-shader-open.svg"},"folder-stack":{"iconPath":"./../icons/folder-stack.svg"},"folder-stack-open":{"iconPath":"./../icons/folder-stack-open.svg"},"folder-template":{"iconPath":"./../icons/folder-template.svg"},"folder-template-open":{"iconPath":"./../icons/folder-template-open.svg"},"folder-utils":{"iconPath":"./../icons/folder-utils.svg"},"folder-utils-open":{"iconPath":"./../icons/folder-utils-open.svg"},"folder-supabase":{"iconPath":"./../icons/folder-supabase.svg"},"folder-supabase-open":{"iconPath":"./../icons/folder-supabase-open.svg"},"folder-private":{"iconPath":"./../icons/folder-private.svg"},"folder-private-open":{"iconPath":"./../icons/folder-private-open.svg"},"folder-linux":{"iconPath":"./../icons/folder-linux.svg"},"folder-linux-open":{"iconPath":"./../icons/folder-linux-open.svg"},"folder-windows":{"iconPath":"./../icons/folder-windows.svg"},"folder-windows-open":{"iconPath":"./../icons/folder-windows-open.svg"},"folder-macos":{"iconPath":"./../icons/folder-macos.svg"},"folder-macos-open":{"iconPath":"./../icons/folder-macos-open.svg"},"folder-error":{"iconPath":"./../icons/folder-error.svg"},"folder-error-open":{"iconPath":"./../icons/folder-error-open.svg"},"folder-event":{"iconPath":"./../icons/folder-event.svg"},"folder-event-open":{"iconPath":"./../icons/folder-event-open.svg"},"folder-secure":{"iconPath":"./../icons/folder-secure.svg"},"folder-secure-open":{"iconPath":"./../icons/folder-secure-open.svg"},"folder-custom":{"iconPath":"./../icons/folder-custom.svg"},"folder-custom-open":{"iconPath":"./../icons/folder-custom-open.svg"},"folder-mock":{"iconPath":"./../icons/folder-mock.svg"},"folder-mock-open":{"iconPath":"./../icons/folder-mock-open.svg"},"folder-syntax":{"iconPath":"./../icons/folder-syntax.svg"},"folder-syntax-open":{"iconPath":"./../icons/folder-syntax-open.svg"},"folder-vm":{"iconPath":"./../icons/folder-vm.svg"},"folder-vm-open":{"iconPath":"./../icons/folder-vm-open.svg"},"folder-stylus":{"iconPath":"./../icons/folder-stylus.svg"},"folder-stylus-open":{"iconPath":"./../icons/folder-stylus-open.svg"},"folder-flow":{"iconPath":"./../icons/folder-flow.svg"},"folder-flow-open":{"iconPath":"./../icons/folder-flow-open.svg"},"folder-rules":{"iconPath":"./../icons/folder-rules.svg"},"folder-rules-open":{"iconPath":"./../icons/folder-rules-open.svg"},"folder-review":{"iconPath":"./../icons/folder-review.svg"},"folder-review-open":{"iconPath":"./../icons/folder-review-open.svg"},"folder-animation":{"iconPath":"./../icons/folder-animation.svg"},"folder-animation-open":{"iconPath":"./../icons/folder-animation-open.svg"},"folder-guard":{"iconPath":"./../icons/folder-guard.svg"},"folder-guard-open":{"iconPath":"./../icons/folder-guard-open.svg"},"folder-prisma":{"iconPath":"./../icons/folder-prisma.svg"},"folder-prisma-open":{"iconPath":"./../icons/folder-prisma-open.svg"},"folder-pipe":{"iconPath":"./../icons/folder-pipe.svg"},"folder-pipe-open":{"iconPath":"./../icons/folder-pipe-open.svg"},"folder-interceptor":{"iconPath":"./../icons/folder-interceptor.svg"},"folder-interceptor-open":{"iconPath":"./../icons/folder-interceptor-open.svg"},"folder-svg":{"iconPath":"./../icons/folder-svg.svg"},"folder-svg-open":{"iconPath":"./../icons/folder-svg-open.svg"},"folder-vuex-store":{"iconPath":"./../icons/folder-vuex-store.svg"},"folder-vuex-store-open":{"iconPath":"./../icons/folder-vuex-store-open.svg"},"folder-nuxt":{"iconPath":"./../icons/folder-nuxt.svg"},"folder-nuxt-open":{"iconPath":"./../icons/folder-nuxt-open.svg"},"folder-vue-directives":{"iconPath":"./../icons/folder-vue-directives.svg"},"folder-vue-directives-open":{"iconPath":"./../icons/folder-vue-directives-open.svg"},"folder-terraform":{"iconPath":"./../icons/folder-terraform.svg"},"folder-terraform-open":{"iconPath":"./../icons/folder-terraform-open.svg"},"folder-mobile":{"iconPath":"./../icons/folder-mobile.svg"},"folder-mobile-open":{"iconPath":"./../icons/folder-mobile-open.svg"},"folder-stencil":{"iconPath":"./../icons/folder-stencil.svg"},"folder-stencil-open":{"iconPath":"./../icons/folder-stencil-open.svg"},"folder-firebase":{"iconPath":"./../icons/folder-firebase.svg"},"folder-firebase-open":{"iconPath":"./../icons/folder-firebase-open.svg"},"folder-firestore":{"iconPath":"./../icons/folder-firestore.svg"},"folder-firestore-open":{"iconPath":"./../icons/folder-firestore-open.svg"},"folder-cloud-functions":{"iconPath":"./../icons/folder-cloud-functions.svg"},"folder-cloud-functions-open":{"iconPath":"./../icons/folder-cloud-functions-open.svg"},"folder-svelte":{"iconPath":"./../icons/folder-svelte.svg"},"folder-svelte-open":{"iconPath":"./../icons/folder-svelte-open.svg"},"folder-update":{"iconPath":"./../icons/folder-update.svg"},"folder-update-open":{"iconPath":"./../icons/folder-update-open.svg"},"folder-intellij":{"iconPath":"./../icons/folder-intellij.svg"},"folder-intellij-open":{"iconPath":"./../icons/folder-intellij-open.svg"},"folder-intellij_light":{"iconPath":"./../icons/folder-intellij_light.svg"},"folder-intellij-open_light":{"iconPath":"./../icons/folder-intellij-open_light.svg"},"folder-azure-pipelines":{"iconPath":"./../icons/folder-azure-pipelines.svg"},"folder-azure-pipelines-open":{"iconPath":"./../icons/folder-azure-pipelines-open.svg"},"folder-mjml":{"iconPath":"./../icons/folder-mjml.svg"},"folder-mjml-open":{"iconPath":"./../icons/folder-mjml-open.svg"},"folder-admin":{"iconPath":"./../icons/folder-admin.svg"},"folder-admin-open":{"iconPath":"./../icons/folder-admin-open.svg"},"folder-jupyter":{"iconPath":"./../icons/folder-jupyter.svg"},"folder-jupyter-open":{"iconPath":"./../icons/folder-jupyter-open.svg"},"folder-scala":{"iconPath":"./../icons/folder-scala.svg"},"folder-scala-open":{"iconPath":"./../icons/folder-scala-open.svg"},"folder-connection":{"iconPath":"./../icons/folder-connection.svg"},"folder-connection-open":{"iconPath":"./../icons/folder-connection-open.svg"},"folder-quasar":{"iconPath":"./../icons/folder-quasar.svg"},"folder-quasar-open":{"iconPath":"./../icons/folder-quasar-open.svg"},"folder-next":{"iconPath":"./../icons/folder-next.svg"},"folder-next-open":{"iconPath":"./../icons/folder-next-open.svg"},"folder-dal":{"iconPath":"./../icons/folder-dal.svg"},"folder-dal-open":{"iconPath":"./../icons/folder-dal-open.svg"},"folder-cobol":{"iconPath":"./../icons/folder-cobol.svg"},"folder-cobol-open":{"iconPath":"./../icons/folder-cobol-open.svg"},"folder-yarn":{"iconPath":"./../icons/folder-yarn.svg"},"folder-yarn-open":{"iconPath":"./../icons/folder-yarn-open.svg"},"folder-husky":{"iconPath":"./../icons/folder-husky.svg"},"folder-husky-open":{"iconPath":"./../icons/folder-husky-open.svg"},"folder-storybook":{"iconPath":"./../icons/folder-storybook.svg"},"folder-storybook-open":{"iconPath":"./../icons/folder-storybook-open.svg"},"folder-base":{"iconPath":"./../icons/folder-base.svg"},"folder-base-open":{"iconPath":"./../icons/folder-base-open.svg"},"folder-cart":{"iconPath":"./../icons/folder-cart.svg"},"folder-cart-open":{"iconPath":"./../icons/folder-cart-open.svg"},"folder-home":{"iconPath":"./../icons/folder-home.svg"},"folder-home-open":{"iconPath":"./../icons/folder-home-open.svg"},"folder-project":{"iconPath":"./../icons/folder-project.svg"},"folder-project-open":{"iconPath":"./../icons/folder-project-open.svg"},"folder-prompts":{"iconPath":"./../icons/folder-prompts.svg"},"folder-prompts-open":{"iconPath":"./../icons/folder-prompts-open.svg"},"folder-interface":{"iconPath":"./../icons/folder-interface.svg"},"folder-interface-open":{"iconPath":"./../icons/folder-interface-open.svg"},"folder-netlify":{"iconPath":"./../icons/folder-netlify.svg"},"folder-netlify-open":{"iconPath":"./../icons/folder-netlify-open.svg"},"folder-enum":{"iconPath":"./../icons/folder-enum.svg"},"folder-enum-open":{"iconPath":"./../icons/folder-enum-open.svg"},"folder-contract":{"iconPath":"./../icons/folder-contract.svg"},"folder-contract-open":{"iconPath":"./../icons/folder-contract-open.svg"},"folder-helm":{"iconPath":"./../icons/folder-helm.svg"},"folder-helm-open":{"iconPath":"./../icons/folder-helm-open.svg"},"folder-queue":{"iconPath":"./../icons/folder-queue.svg"},"folder-queue-open":{"iconPath":"./../icons/folder-queue-open.svg"},"folder-vercel":{"iconPath":"./../icons/folder-vercel.svg"},"folder-vercel-open":{"iconPath":"./../icons/folder-vercel-open.svg"},"folder-cypress":{"iconPath":"./../icons/folder-cypress.svg"},"folder-cypress-open":{"iconPath":"./../icons/folder-cypress-open.svg"},"folder-decorators":{"iconPath":"./../icons/folder-decorators.svg"},"folder-decorators-open":{"iconPath":"./../icons/folder-decorators-open.svg"},"folder-java":{"iconPath":"./../icons/folder-java.svg"},"folder-java-open":{"iconPath":"./../icons/folder-java-open.svg"},"folder-resolver":{"iconPath":"./../icons/folder-resolver.svg"},"folder-resolver-open":{"iconPath":"./../icons/folder-resolver-open.svg"},"folder-angular":{"iconPath":"./../icons/folder-angular.svg"},"folder-angular-open":{"iconPath":"./../icons/folder-angular-open.svg"},"folder-unity":{"iconPath":"./../icons/folder-unity.svg"},"folder-unity-open":{"iconPath":"./../icons/folder-unity-open.svg"},"folder-pdf":{"iconPath":"./../icons/folder-pdf.svg"},"folder-pdf-open":{"iconPath":"./../icons/folder-pdf-open.svg"},"folder-proto":{"iconPath":"./../icons/folder-proto.svg"},"folder-proto-open":{"iconPath":"./../icons/folder-proto-open.svg"},"folder-plastic":{"iconPath":"./../icons/folder-plastic.svg"},"folder-plastic-open":{"iconPath":"./../icons/folder-plastic-open.svg"},"folder-gamemaker":{"iconPath":"./../icons/folder-gamemaker.svg"},"folder-gamemaker-open":{"iconPath":"./../icons/folder-gamemaker-open.svg"},"folder-mercurial":{"iconPath":"./../icons/folder-mercurial.svg"},"folder-mercurial-open":{"iconPath":"./../icons/folder-mercurial-open.svg"},"folder-godot":{"iconPath":"./../icons/folder-godot.svg"},"folder-godot-open":{"iconPath":"./../icons/folder-godot-open.svg"},"folder-lottie":{"iconPath":"./../icons/folder-lottie.svg"},"folder-lottie-open":{"iconPath":"./../icons/folder-lottie-open.svg"},"folder-taskfile":{"iconPath":"./../icons/folder-taskfile.svg"},"folder-taskfile-open":{"iconPath":"./../icons/folder-taskfile-open.svg"},"folder-drizzle":{"iconPath":"./../icons/folder-drizzle.svg"},"folder-drizzle-open":{"iconPath":"./../icons/folder-drizzle-open.svg"},"folder-cloudflare":{"iconPath":"./../icons/folder-cloudflare.svg"},"folder-cloudflare-open":{"iconPath":"./../icons/folder-cloudflare-open.svg"},"folder-seeders":{"iconPath":"./../icons/folder-seeders.svg"},"folder-seeders-open":{"iconPath":"./../icons/folder-seeders-open.svg"},"folder-store":{"iconPath":"./../icons/folder-store.svg"},"folder-store-open":{"iconPath":"./../icons/folder-store-open.svg"},"folder-bicep":{"iconPath":"./../icons/folder-bicep.svg"},"folder-bicep-open":{"iconPath":"./../icons/folder-bicep-open.svg"},"folder-snapcraft":{"iconPath":"./../icons/folder-snapcraft.svg"},"folder-snapcraft-open":{"iconPath":"./../icons/folder-snapcraft-open.svg"},"folder-development":{"iconPath":"./../icons/folder-development.clone.svg"},"folder-development-open":{"iconPath":"./../icons/folder-development-open.clone.svg"},"folder-flutter":{"iconPath":"./../icons/folder-flutter.svg"},"folder-flutter-open":{"iconPath":"./../icons/folder-flutter-open.svg"},"folder-snippet":{"iconPath":"./../icons/folder-snippet.svg"},"folder-snippet-open":{"iconPath":"./../icons/folder-snippet-open.svg"},"folder-element":{"iconPath":"./../icons/folder-element.svg"},"folder-element-open":{"iconPath":"./../icons/folder-element-open.svg"},"folder-src-tauri":{"iconPath":"./../icons/folder-src-tauri.svg"},"folder-src-tauri-open":{"iconPath":"./../icons/folder-src-tauri-open.svg"},"folder-favicon":{"iconPath":"./../icons/folder-favicon.svg"},"folder-favicon-open":{"iconPath":"./../icons/folder-favicon-open.svg"},"folder-features":{"iconPath":"./../icons/folder-features.svg"},"folder-features-open":{"iconPath":"./../icons/folder-features-open.svg"},"folder-lefthook":{"iconPath":"./../icons/folder-lefthook.svg"},"folder-lefthook-open":{"iconPath":"./../icons/folder-lefthook-open.svg"},"folder-bloc":{"iconPath":"./../icons/folder-bloc.svg"},"folder-bloc-open":{"iconPath":"./../icons/folder-bloc-open.svg"},"folder-powershell":{"iconPath":"./../icons/folder-powershell.svg"},"folder-powershell-open":{"iconPath":"./../icons/folder-powershell-open.svg"},"folder-repository":{"iconPath":"./../icons/folder-repository.svg"},"folder-repository-open":{"iconPath":"./../icons/folder-repository-open.svg"},"folder-luau":{"iconPath":"./../icons/folder-luau.svg"},"folder-luau-open":{"iconPath":"./../icons/folder-luau-open.svg"},"folder-obsidian":{"iconPath":"./../icons/folder-obsidian.svg"},"folder-obsidian-open":{"iconPath":"./../icons/folder-obsidian-open.svg"},"folder-trash":{"iconPath":"./../icons/folder-trash.svg"},"folder-trash-open":{"iconPath":"./../icons/folder-trash-open.svg"},"folder-cline":{"iconPath":"./../icons/folder-cline.svg"},"folder-cline-open":{"iconPath":"./../icons/folder-cline-open.svg"},"folder-liquibase":{"iconPath":"./../icons/folder-liquibase.svg"},"folder-liquibase-open":{"iconPath":"./../icons/folder-liquibase-open.svg"},"folder-dart":{"iconPath":"./../icons/folder-dart.svg"},"folder-dart-open":{"iconPath":"./../icons/folder-dart-open.svg"},"folder-zeabur":{"iconPath":"./../icons/folder-zeabur.svg"},"folder-zeabur-open":{"iconPath":"./../icons/folder-zeabur-open.svg"},"folder-kusto":{"iconPath":"./../icons/folder-kusto.svg"},"folder-kusto-open":{"iconPath":"./../icons/folder-kusto-open.svg"},"folder-policy":{"iconPath":"./../icons/folder-policy.svg"},"folder-policy-open":{"iconPath":"./../icons/folder-policy-open.svg"},"folder-attachment":{"iconPath":"./../icons/folder-attachment.svg"},"folder-attachment-open":{"iconPath":"./../icons/folder-attachment-open.svg"},"folder-bibliography":{"iconPath":"./../icons/folder-bibliography.svg"},"folder-bibliography-open":{"iconPath":"./../icons/folder-bibliography-open.svg"},"folder-link":{"iconPath":"./../icons/folder-link.svg"},"folder-link-open":{"iconPath":"./../icons/folder-link-open.svg"},"folder-pytorch":{"iconPath":"./../icons/folder-pytorch.svg"},"folder-pytorch-open":{"iconPath":"./../icons/folder-pytorch-open.svg"},"folder-blender":{"iconPath":"./../icons/folder-blender.svg"},"folder-blender-open":{"iconPath":"./../icons/folder-blender-open.svg"},"folder-atom":{"iconPath":"./../icons/folder-atom.svg"},"folder-atom-open":{"iconPath":"./../icons/folder-atom-open.svg"},"folder-molecule":{"iconPath":"./../icons/folder-molecule.svg"},"folder-molecule-open":{"iconPath":"./../icons/folder-molecule-open.svg"},"folder-organism":{"iconPath":"./../icons/folder-organism.svg"},"folder-organism-open":{"iconPath":"./../icons/folder-organism-open.svg"},"folder-claude":{"iconPath":"./../icons/folder-claude.svg"},"folder-claude-open":{"iconPath":"./../icons/folder-claude-open.svg"},"folder-cursor":{"iconPath":"./../icons/folder-cursor.svg"},"folder-cursor-open":{"iconPath":"./../icons/folder-cursor-open.svg"},"folder-cursor_light":{"iconPath":"./../icons/folder-cursor_light.svg"},"folder-cursor-open_light":{"iconPath":"./../icons/folder-cursor-open_light.svg"},"folder-gemini-ai":{"iconPath":"./../icons/folder-gemini-ai.svg"},"folder-gemini-ai-open":{"iconPath":"./../icons/folder-gemini-ai-open.svg"},"folder-opencode":{"iconPath":"./../icons/folder-opencode.svg"},"folder-opencode-open":{"iconPath":"./../icons/folder-opencode-open.svg"},"folder-input":{"iconPath":"./../icons/folder-input.svg"},"folder-input-open":{"iconPath":"./../icons/folder-input-open.svg"},"folder-salt":{"iconPath":"./../icons/folder-salt.svg"},"folder-salt-open":{"iconPath":"./../icons/folder-salt-open.svg"},"folder-simulations":{"iconPath":"./../icons/folder-simulations.svg"},"folder-simulations-open":{"iconPath":"./../icons/folder-simulations-open.svg"},"folder-metro":{"iconPath":"./../icons/folder-metro.svg"},"folder-metro-open":{"iconPath":"./../icons/folder-metro-open.svg"},"folder-filter":{"iconPath":"./../icons/folder-filter.svg"},"folder-filter-open":{"iconPath":"./../icons/folder-filter-open.svg"},"folder-toc":{"iconPath":"./../icons/folder-toc.svg"},"folder-toc-open":{"iconPath":"./../icons/folder-toc-open.svg"},"folder-cue":{"iconPath":"./../icons/folder-cue.svg"},"folder-cue-open":{"iconPath":"./../icons/folder-cue-open.svg"},"folder-license":{"iconPath":"./../icons/folder-license.svg"},"folder-license-open":{"iconPath":"./../icons/folder-license-open.svg"},"folder-form":{"iconPath":"./../icons/folder-form.svg"},"folder-form-open":{"iconPath":"./../icons/folder-form-open.svg"},"folder-deprecated":{"iconPath":"./../icons/folder-deprecated.clone.svg"},"folder-deprecated-open":{"iconPath":"./../icons/folder-deprecated-open.clone.svg"},"folder-scrap":{"iconPath":"./../icons/folder-scrap.clone.svg"},"folder-scrap-open":{"iconPath":"./../icons/folder-scrap-open.clone.svg"},"folder-postman":{"iconPath":"./../icons/folder-postman.svg"},"folder-postman-open":{"iconPath":"./../icons/folder-postman-open.svg"},"folder-skills":{"iconPath":"./../icons/folder-skills.svg"},"folder-skills-open":{"iconPath":"./../icons/folder-skills-open.svg"},"folder-instructions":{"iconPath":"./../icons/folder-instructions.clone.svg"},"folder-instructions-open":{"iconPath":"./../icons/folder-instructions-open.clone.svg"},"folder-zed":{"iconPath":"./../icons/folder-zed.svg"},"folder-zed-open":{"iconPath":"./../icons/folder-zed-open.svg"},"folder-appwrite":{"iconPath":"./../icons/folder-appwrite.svg"},"folder-appwrite-open":{"iconPath":"./../icons/folder-appwrite-open.svg"},"folder-assembly":{"iconPath":"./../icons/folder-assembly.svg"},"folder-assembly-open":{"iconPath":"./../icons/folder-assembly-open.svg"},"folder-go":{"iconPath":"./../icons/folder-go.svg"},"folder-go-open":{"iconPath":"./../icons/folder-go-open.svg"},"folder-eas":{"iconPath":"./../icons/folder-eas.clone.svg"},"folder-eas-open":{"iconPath":"./../icons/folder-eas-open.clone.svg"},"folder-kotlin":{"iconPath":"./../icons/folder-kotlin.svg"},"folder-kotlin-open":{"iconPath":"./../icons/folder-kotlin-open.svg"},"folder-redis":{"iconPath":"./../icons/folder-redis.clone.svg"},"folder-redis-open":{"iconPath":"./../icons/folder-redis-open.clone.svg"},"folder":{"iconPath":"./../icons/folder.svg"},"folder-open":{"iconPath":"./../icons/folder-open.svg"},"folder-root":{"iconPath":"./../icons/folder-root.svg"},"folder-root-open":{"iconPath":"./../icons/folder-root-open.svg"}}`),iW=JSON.parse(`{"60":"slint","htm":"html","xhtml":"html","html_vm":"html","asp":"html","html":"html","aspx":"html","jshtm":"html","rhtml":"html","shtml":"html","volt":"html","xht":"html","jade":"pug","pug":"pug","md":"markdown","markdown":"markdown","rst":"markdown","copilotmd":"markdown","litcoffee":"markdown","markdn":"markdown","mdown":"markdown","mdtext":"markdown","mdtxt":"markdown","mdwn":"markdown","mkd":"markdown","mkdn":"markdown","ronn":"markdown","workbook":"markdown","blink":"blink","css":"css","scss":"sass","sass":"sass","less":"less","json":"json","jsonc":"json","tsbuildinfo":"json","json5":"json","jsonl":"json","ndjson":"json","geojson":"json","har":"json","jsonld":"json","webmanifest":"json","ts.map":"json","schema.json":"json_schema","hjson":"hjson","jinja":"jinja","jinja2":"jinja","j2":"jinja","jinja-html":"jinja","proto":"proto","prompt.md":"prompt","prompts.md":"prompt","sublime-project":"sublime","sublime-workspace":"sublime","slx":"simulink","qmd":"quarto","tw":"twine","twee":"twine","yml.dist":"yaml","yaml.dist":"yaml","YAML-tmLanguage":"yaml","yaml":"yaml","yml":"yaml","cff":"yaml","eyaml":"yaml","eyml":"yaml","winget":"yaml","yaml-tmpreferences":"yaml","yaml-tmtheme":"yaml","xml":"xml","plist":"xml","xsd":"xml","dtd":"xml","xsl":"xml","xslt":"xml","resx":"xml","iml":"xml","xquery":"xml","tmLanguage":"xml","manifest":"xml","project":"xml","xml.dist":"xml","xml.dist.sample":"xml","dmn":"xml","jrxml":"xml","xmp":"xml","ascx":"xml","atom":"xml","axaml":"xml","axml":"xml","bpmn":"xml","csl":"xml","csproj.user":"xml","dita":"xml","ditamap":"xml","dtml":"xml","ent":"xml","fxml":"xml","isml":"xml","jmx":"xml","launch":"xml","menu":"xml","opml":"xml","owl":"xml","proj":"xml","publishsettings":"xml","pubxml":"xml","pubxml.user":"xml","rdf":"xml","rng":"xml","rss":"xml","shproj":"xml","storyboard":"xml","targets":"xml","tld":"xml","tmx":"xml","vbproj":"xml","vbproj.user":"xml","wsdl":"xml","wxi":"xml","wxl":"xml","wxs":"xml","xbl":"xml","xib":"xml","xliff":"xml","xoml":"xml","xpdl":"xml","xul":"xml","toml":"toml","tosd":"toml","toon":"toon","png":"image","jpeg":"image","jpg":"image","gif":"image","ico":"image","tif":"image","tiff":"image","ami":"image","apx":"image","avif":"image","bmp":"image","bpg":"image","brk":"image","cur":"image","dds":"image","exr":"image","fpx":"image","gbr":"image","img":"image","jbig2":"image","jb2":"image","jng":"image","jxl":"image","jxr":"image","pgf":"image","pic":"image","raw":"image","webp":"image","eps":"image","afphoto":"image","ase":"image","aseprite":"image","clip":"image","cpt":"image","heif":"image","heic":"image","kra":"image","mdp":"image","ora":"image","pdn":"image","reb":"image","sai":"image","tga":"image","xcf":"image","jfif":"image","ppm":"image","pbm":"image","pgm":"image","pnm":"image","icns":"image","3fr":"image","ari":"image","arw":"image","bay":"image","braw":"image","crw":"image","cr2":"image","cr3":"image","cap":"image","data":"image","dcs":"image","dcr":"image","dng":"image","drf":"image","eip":"image","erf":"image","fff":"image","gpr":"image","iiq":"image","k25":"image","kdc":"image","mdc":"image","mef":"image","mos":"image","mrw":"image","nef":"image","nrw":"image","obm":"image","orf":"image","pef":"image","ptx":"image","pxn":"image","r3d":"image","raf":"image","rwl":"image","rw2":"image","rwz":"image","sr2":"image","srf":"image","srw":"image","x3f":"image","ktx":"image","ktx2":"image","pal":"palette","gpl":"palette","act":"palette","esx":"javascript","mjs":"javascript","js":"javascript","cjs":"javascript","es6":"javascript","pac":"javascript","jsx":"react","tsx":"react_ts","routing.ts":"routing","routing.tsx":"routing","routing.js":"routing","routing.jsx":"routing","route.ts":"routing","route.tsx":"routing","route.js":"routing","route.jsx":"routing","routes.ts":"routing","routes.tsx":"routing","routes.js":"routing","routes.jsx":"routing","ini":"settings","dlc":"settings","config":"settings","conf":"settings","properties":"settings","prop":"settings","settings":"settings","option":"settings","props":"settings","prefs":"settings","sln.dotsettings":"settings","sln.dotsettings.user":"settings","cfg":"settings","cnf":"settings","tool-versions":"settings","directory":"settings","mak":"settings","npmrc":"settings","repo":"settings","ts":"typescript","cts":"typescript","mts":"typescript","d.ts":"typescript-def","d.cts":"typescript-def","d.mts":"typescript-def","d.ets":"typescript-def","mdoc":"markdoc","markdoc":"markdoc","markdoc.md":"markdoc","marko":"markojs","astro":"astro","pdf":"pdf","xlsx":"table","xlsm":"table","xls":"table","csv":"table","tsv":"table","psv":"table","ods":"table","vscodeignore":"vscode","vsixmanifest":"vscode","vsix":"vscode","code-workplace":"vscode","code-workspace":"vscode","code-profile":"vscode","code-snippets":"vscode","csproj":"visualstudio","ruleset":"visualstudio","sln":"visualstudio","slnf":"visualstudio","slnx":"visualstudio","suo":"visualstudio","vb":"visualstudio","vbs":"visualstudio","vcxitems":"visualstudio","vcxitems.filters":"visualstudio","vcxproj":"visualstudio","vcxproj.filters":"visualstudio","wixproj":"visualstudio","bas":"visualstudio","vba":"visualstudio","vcl":"varnish","pdb":"database","sql":"database","pks":"database","pkb":"database","accdb":"database","mdb":"database","sqlite":"database","sqlite3":"database","pgsql":"database","postgres":"database","plpgsql":"database","psql":"database","db":"database","db3":"database","dblite":"database","dblite3":"database","debugsymbols":"database","odb":"database","accde":"database","adp":"database","bak":"database","bdb":"database","dbf":"database","fdb":"database","feather":"database","gdb":"database","ibd":"database","mdf":"database","mde":"database","myd":"database","myi":"database","ndf":"database","orc":"database","parquet":"database","sdf":"database","ldf":"database","frm":"database","kdbx":"database","dsql":"database","kql":"kusto","cs":"csharp","csx":"csharp","csharp":"csharp","qs":"qsharp","zip":"zip","z":"zip","tar":"zip","gz":"zip","xz":"zip","lz":"zip","liz":"zip","lzma":"zip","lzma2":"zip","lz4":"zip","lz5":"zip","lzh":"zip","lha":"zip","br":"zip","bz2":"zip","bzip2":"zip","gzip":"zip","brotli":"zip","7z":"zip","001":"zip","rar":"zip","far":"zip","tz":"zip","taz":"zip","tlz":"zip","txz":"zip","tgz":"zip","tpz":"zip","tbz":"zip","tbz2":"zip","zst":"zip","zstd":"zip","tzst":"zip","tzstd":"zip","cab":"zip","cpio":"zip","rpm":"zip","deb":"zip","arj":"zip","wim":"zip","swm":"zip","esd":"zip","fat":"zip","xar":"zip","ntfs":"zip","hfs":"zip","squashfs":"zip","apfs":"zip","vala":"vala","zig":"zig","zon":"zig","exe":"exe","msi":"exe","dat":"hex","bin":"hex","hex":"hex","java":"java","jsp":"java","jav":"java","jar":"jar","class":"javaclass","c3":"c3","c":"c","i":"c","mi":"c","h":"h","hip":"hip","cc":"cpp","cpp":"cpp","cxx":"cpp","c++":"cpp","cp":"cpp","mii":"cpp","ii":"cpp","cppm":"cpp","c++m":"cpp","ccm":"cpp","cxxm":"cpp","h.in":"cpp","hpp.in":"cpp","ipp":"cpp","ixx":"cpp","tpp":"cpp","txx":"cpp","hh":"hpp","hpp":"hpp","hxx":"hpp","h++":"hpp","hp":"hpp","tcc":"hpp","inl":"hpp","m":"objective-c","mm":"objective-cpp","rc":"rc","go":"go","py":"python","cpy":"python","gyp":"python","gypi":"python","ipy":"python","pyi":"python","pyt":"python","pyw":"python","rpy":"python","pyc":"python-misc","whl":"python-misc","egg":"python-misc","url":"url","sh":"console","ksh":"console","csh":"console","tcsh":"console","zsh":"console","bash":"console","bat":"console","cmd":"console","awk":"console","fish":"console","exp":"console","nu":"console","xsh":"console","bash_aliases":"console","bash_login":"console","bash_logout":"console","bash_profile":"console","bashrc":"console","cshrc":"console","ebuild":"console","eclass":"console","profile":"console","tcshrc":"console","xprofile":"console","xsession":"console","xsessionrc":"console","yash_profile":"console","yashrc":"console","zlogin":"console","zlogout":"console","zprofile":"console","zsh-theme":"console","zshenv":"console","zshrc":"console","ps1":"powershell","psm1":"powershell","psd1":"powershell","ps1xml":"powershell","psc1":"powershell","pssc":"powershell","psrc":"powershell","excalidraw":"excalidraw","excalidraw.json":"excalidraw","excalidraw.svg":"excalidraw","excalidraw.png":"excalidraw","gradle":"gradle","doc":"word","docx":"word","rtf":"word","odt":"word","cer":"certificate","cert":"certificate","crt":"certificate","pub":"key","key":"key","pem":"key","asc":"key","gpg":"key","passwd":"key","shasum":"key","sha256":"key","sha256sum":"key","sha256sums":"key","secret":"key","woff":"font","woff2":"font","ttf":"font","eot":"font","suit":"font","otf":"font","bmap":"font","fnt":"font","odttf":"font","ttc":"font","font":"font","fonts":"font","sui":"font","ntf":"font","mrf":"font","lib":"lib","a":"lib","bib":"bibliography","bbl":"bibliography","bcf":"bibliography","blg":"bibliography","bst":"bibtex-style","dll":"dll","ilk":"dll","so":"dll","rb":"ruby","erb":"ruby","rbs":"ruby","gemspec":"ruby","podspec":"ruby","rake":"ruby","rbi":"ruby","rbx":"ruby","rjs":"ruby","ru":"ruby","fs":"fsharp","fsx":"fsharp","fsi":"fsharp","fsproj":"fsharp","fsscript":"fsharp","swift":"swift","xcplayground":"swift","swiftdeps":"swift","swiftdoc":"swift","swiftmodule":"swift","swiftsourceinfo":"swift","ino":"arduino","dockerignore":"docker","dockerfile":"docker","docker-compose.yml":"docker","docker-compose.yaml":"docker","containerignore":"docker","containerfile":"docker","compose.yaml":"docker","compose.yml":"docker","tex":"tex","ltx":"tex","cls":"tex","clo":"tex","latex":"tex","aux":"tex","tikz":"tex","synctex":"tex","synctex.gz":"tex","sty":"sty","ctx":"context","dtx":"dtx","ins":"doctex-installer","bbx":"bbx","cbx":"cbx","lbx":"lbx","pptx":"powerpoint","ppt":"powerpoint","pptm":"powerpoint","potx":"powerpoint","potm":"powerpoint","ppsx":"powerpoint","ppsm":"powerpoint","pps":"powerpoint","ppam":"powerpoint","ppa":"powerpoint","odp":"powerpoint","webm":"video","mkv":"video","flv":"video","vob":"video","ogv":"video","ogg":"video","gifv":"video","avi":"video","mov":"video","qt":"video","wmv":"video","yuv":"video","rm":"video","rmvb":"video","mp4":"video","m4v":"video","mpg":"video","mp2":"video","mpeg":"video","mpe":"video","mpv":"video","m2v":"video","vdi":"virtual","vbox":"virtual","vbox-prev":"virtual","ved":"vedic","veda":"vedic","vedic":"vedic","edb":"email","eml":"email","emlx":"email","ics":"email","mbox":"email","msg":"email","oft":"email","olm":"email","ost":"email","p7s":"email","pst":"email","rpmsg":"email","tnef":"email","8svx":"audio","aa":"audio","aac":"audio","aax":"audio","ac3":"audio","aif":"audio","aiff":"audio","alac":"audio","amr":"audio","ape":"audio","caf":"audio","cda":"audio","cdr":"audio","dss":"audio","ec3":"audio","efs":"audio","enc":"audio","flac":"audio","flp":"audio","gsm":"audio","it":"audio","m3u":"audio","m3u8":"audio","m4a":"audio","m4b":"audio","m4p":"audio","m4r":"audio","mid":"audio","mka":"audio","mmf":"audio","mod":"audio","mp3":"audio","mpc":"audio","mscz":"audio","mtm":"audio","mui":"audio","musx":"audio","mxl":"audio","nsa":"audio","opus":"audio","pkf":"audio","qcp":"audio","ra":"audio","rf64":"audio","rip":"audio","sdt":"audio","sesx":"audio","sf2":"audio","stap":"audio","tg":"audio","voc":"audio","vqf":"audio","wav":"audio","weba":"audio","wfp":"audio","wma":"audio","wpl":"audio","wproj":"audio","wv":"audio","coffee":"coffee","cson":"coffee","iced":"coffee","txt":"document","lrc":"lyric","graphql":"graphql","gql":"graphql","rs":"rust","ron":"rust","raml":"raml","xaml":"xaml","hs":"haskell","lhs":"haskell","kt":"kotlin","kts":"kotlin","mist.js":"mist","mist.ts":"mist","mist.jsx":"mist","mist.tsx":"mist","otne":"otne","patch":"git","diff":"diff","rej":"diff","lua":"lua","clj":"clojure","cljs":"clojure","cljc":"clojure","cljx":"clojure","clojure":"clojure","edn":"clojure","groovy":"groovy","gvy":"groovy","nf":"nextflow","r":"r","rmd":"r","rhistory":"r","rprofile":"r","rt":"r","dart":"dart","freezed.dart":"dart_generated","g.dart":"dart_generated","as":"actionscript","mxml":"mxml","ahk":"autohotkey","swf":"flash","swc":"adobe-swc","swcrc":"swc","cmake":"cmake","asm":"assembly","a51":"assembly","inc":"assembly","nasm":"assembly","s":"assembly","ms":"assembly","agc":"assembly","ags":"assembly","aea":"assembly","argus":"assembly","mitigus":"assembly","binsource":"assembly","vue":"vue","ml":"ocaml","mli":"ocaml","cmx":"ocaml","odin":"odin","onnx":"onnx","js.map":"javascript-map","mjs.map":"javascript-map","cjs.map":"javascript-map","css.map":"css-map","lock":"lock","hbs":"handlebars","mustache":"handlebars","handlebars":"handlebars","hjs":"handlebars","pm":"perl","raku":"perl","pod":"perl","psgi":"perl","t":"perl","hx":"haxe","spec.ts":"test-ts","spec.cts":"test-ts","spec.mts":"test-ts","cy.ts":"test-ts","e2e-spec.ts":"test-ts","e2e-spec.cts":"test-ts","e2e-spec.mts":"test-ts","test.ts":"test-ts","test.cts":"test-ts","test.mts":"test-ts","ts.snap":"test-ts","cts.snap":"test-ts","mts.snap":"test-ts","spec-d.ts":"test-ts","test-d.ts":"test-ts","spec.tsx":"test-jsx","test.tsx":"test-jsx","tsx.snap":"test-jsx","spec.jsx":"test-jsx","test.jsx":"test-jsx","jsx.snap":"test-jsx","cy.jsx":"test-jsx","cy.tsx":"test-jsx","spec-d.tsx":"test-jsx","test-d.tsx":"test-jsx","spec.js":"test-js","spec.cjs":"test-js","spec.mjs":"test-js","e2e-spec.js":"test-js","e2e-spec.cjs":"test-js","e2e-spec.mjs":"test-js","test.js":"test-js","test.cjs":"test-js","test.mjs":"test-js","js.snap":"test-js","cjs.snap":"test-js","mjs.snap":"test-js","cy.js":"test-js","module.ts":"angular","module.js":"angular","ng-template":"angular","component.ts":"angular-component","component.js":"angular-component","guard.ts":"angular-guard","guard.js":"angular-guard","service.ts":"angular-service","service.js":"angular-service","pipe.ts":"angular-pipe","pipe.js":"angular-pipe","filter.js":"angular-pipe","directive.ts":"angular-directive","directive.js":"angular-directive","resolver.ts":"angular-resolver","resolver.js":"angular-resolver","interceptor.ts":"angular-interceptor","interceptor.js":"angular-interceptor","pp":"puppet","ex":"elixir","exs":"elixir","eex":"elixir","leex":"elixir","heex":"elixir","ls":"livescript","erl":"erlang","twig":"twig","jl":"julia","elm":"elm","pure":"purescript","purs":"purescript","tpl":"smarty","styl":"stylus","re":"reason","rei":"reason","cmj":"bucklescript","merlin":"merlin","vhd":"verilog","vhdx":"verilog","sv":"verilog","svh":"verilog","vhdl":"verilog","nb":"mathematica","wl":"wolframlanguage","wls":"wolframlanguage","njk":"nunjucks","nunjucks":"nunjucks","robot":"robot","sol":"solidity","au3":"autoit","haml":"haml","yang":"yang","mjml":"mjml","tf":"terraform","tf.json":"terraform","tfvars":"terraform","tfstate":"terraform","tfbackend":"terraform","terraformignore":"terraform","tofu":"opentofu","blade.php":"laravel","inky.php":"laravel","applescript":"applescript","ipa":"applescript","cake":"cake","feature":"cucumber","features":"cucumber","nim":"nim","nimble":"nim","apib":"apiblueprint","apiblueprint":"apiblueprint","riot":"riot","tag":"riot","vfl":"vfl","kl":"kl","pcss":"postcss","sss":"postcss","todo":"todo","cfml":"coldfusion","cfc":"coldfusion","lucee":"coldfusion","cfm":"coldfusion","cabal":"cabal","nix":"nix","slim":"slim","http":"http","rest":"http","rql":"restql","restql":"restql","kv":"kivy","graphcool":"graphcool","sbt":"sbt","apk":"android","smali":"android","dex":"android","env":"tune","gitlab-ci.yml":"gitlab","jenkinsfile":"jenkins","jenkins":"jenkins","fig":"figma","huff":"huff","cr":"crystal","ecr":"crystal","drone.yml":"drone","cu":"cuda","cuh":"cuda","log":"log","def":"dotjs","dot":"dotjs","jst":"dotjs","ejs":"ejs",".wakatime-project":"wakatime","pde":"processing","stories.js":"storybook","stories.jsx":"storybook","stories.mdx":"storybook","story.js":"storybook","story.jsx":"storybook","stories.ts":"storybook","stories.tsx":"storybook","story.ts":"storybook","story.tsx":"storybook","stories.svelte":"storybook","story.mdx":"storybook","stories.vue":"storybook","wpy":"wepy","hcl":"hcl","san":"san","quokka.js":"quokka","quokka.ts":"quokka","quokka.jsx":"quokka","quokka.tsx":"quokka","djt":"django","red":"red","mk":"makefile","fxp":"foxpro","prg":"foxpro","pot":"i18n","po":"i18n","mo":"i18n","lang":"i18n","xlf":"i18n","wat":"webassembly","wasm":"webassembly","ipynb":"jupyter","d":"d","mdx":"mdx","svx":"mdsvex","bal":"ballerina","balx":"ballerina","rkt":"racket","bzl":"bazel","bazel":"bazel","mint":"mint","vm":"velocity","fhtml":"velocity","vtl":"velocity","gd":"godot","godot":"godot-assets","tres":"godot-assets","tscn":"godot-assets","gdns":"godot-assets","gdnlib":"godot-assets","gdshader":"godot-assets","gdshaderinc":"godot-assets","gdextension":"godot-assets","azure-pipelines.yml":"azure-pipelines","azure-pipelines.yaml":"azure-pipelines","azure-pipelines-main.yml":"azure-pipelines","azure-pipelines-main.yaml":"azure-pipelines","azcli":"azure","vagrantfile":"vagrant","prisma":"prisma","cshtml":"razor","vbhtml":"razor","razor":"razor","abc":"abc","ad":"asciidoc","adoc":"asciidoc","asciidoc":"asciidoc","edge":"edge","ss":"scheme","scm":"scheme","lisp":"lisp","lsp":"lisp","cl":"lisp","fast":"lisp","stl":"3d","stp":"3d","step":"3d","ste":"3d","obj":"3d","o":"3d","ac":"3d","dwg":"3d","dxf":"3d","fbx":"3d","mesh":"3d","3dm":"3d","3mf":"3d","catpart":"3d","catproduct":"3d","f3d":"3d","iam":"3d","ige":"3d","iges":"3d","igs":"3d","ipt":"3d","jt":"3d","mqo":"3d","pmd":"3d","pmx":"3d","prt":"3d","sab":"3d","sat":"3d","skp":"3d","sldasm":"3d","slddrw":"3d","sldprt":"3d","smb":"3d","smt":"3d","vac":"3d","vdp":"3d","vox":"3d","gltf":"3d","glb":"3d","3ds":"3d","dae":"3d","ply":"3d","wrl":"3d","usd":"3d","usdz":"3d","wire":"3d","x_b":"3d","x_t":"3d","123dx":"3d","svg":"svg","ai":"adobe-illustrator","ait":"adobe-illustrator","psd":"adobe-photoshop","psb":"adobe-photoshop","psdt":"adobe-photoshop","svelte":"svelte","svelte.js":"svelte_js","svelte.ts":"svelte_ts","vimrc":"vim","gvimrc":"vim","exrc":"vim","vim":"vim","viminfo":"vim","moon":"moonscript","prw":"advpl","prx":"advpl","ptm":"advpl-ptm","tlpp":"advpl-tlpp","ch":"advpl-include","iso":"disc","vmdk":"disc","hdd":"disc","qcow":"disc","qcow2":"disc","qed":"disc","dmg":"disc","f":"fortran","f77":"fortran","f90":"fortran","f95":"fortran","f03":"fortran","f08":"fortran","tcl":"tcl","do":"tcl","liquid":"liquid","p":"prolog","pro":"prolog","pl":"prolog","coco":"coconut","sketch":"sketch","pwn":"pawn","amx":"pawn","4th":"forth","fth":"forth","frt":"forth","iuml":"uml","pu":"uml","puml":"uml","plantuml":"uml","wsd":"uml","wrap":"meson","dhall":"dhall","dhallb":"dhall","sml":"sml","mlton":"sml","mlb":"sml","sig":"sml","fun":"sml","cm":"sml","lex":"sml","use":"sml","grm":"sml","opam":"opam","imba":"imba","drawio":"drawio","dio":"drawio","pas":"pascal","unity":"unity","unitypackage":"unity","sas":"sas","sas7bdat":"sas","sashdat":"sas","astore":"sas","ast":"sas","sast":"sas","nupkg":"nuget","nuspec":"nuget","command":"command","dsc":"denizenscript","code-search":"search","nginx":"nginx","nginxconf":"nginx","nginxconfig":"nginx","mcfunction":"minecraft","mcmeta":"minecraft","mcr":"minecraft","mca":"minecraft","mcgame":"minecraft","mclevel":"minecraft","mcworld":"minecraft","mine":"minecraft","mus":"minecraft","mcstructure":"minecraft","mcpack":"minecraft","mcaddon":"minecraft","mctemplate":"minecraft","mcproject":"minecraft","res":"rescript","resi":"rescript-interface","duc":"duc","b":"brainfuck","bf":"brainfuck","bicep":"bicep","cob":"cobol","cbl":"cobol","gr":"grain","lol":"lolcode","idr":"idris","ibc":"idris","pipeline":"pipeline","rego":"opa","windi":"windicss","scala":"scala","sc":"scala","ly":"lilypond","v":"vlang","pgn":"chess","fen":"chess","gmi":"gemini","gemini":"gemini","php":"php","php4":"php","php5":"php","phtml":"php","ctp":"php","tsconfig.json":"tsconfig","tauri":"tauri","jsconfig.json":"jsconfig","ada":"ada","adb":"ada","ads":"ada","ali":"ada","horusec-config.json":"horusec","pdm.lock":"pdm","pdm.toml":"pdm","coarc":"coala","coafile":"coala","bubble":"dinophp","html.bubble":"dinophp","php.bubble":"dinophp","tl":"teal","template":"template","glsl":"shader","vert":"shader","tesc":"shader","tese":"shader","geom":"shader","frag":"shader","comp":"shader","rgen":"shader","rint":"shader","rahit":"shader","rchit":"shader","rmiss":"shader","rcall":"shader","vert.glsl":"shader","tesc.glsl":"shader","tese.glsl":"shader","geom.glsl":"shader","frag.glsl":"shader","comp.glsl":"shader","rgen.glsl":"shader","rint.glsl":"shader","rahit.glsl":"shader","rchit.glsl":"shader","rmiss.glsl":"shader","rcall.glsl":"shader","vertex.glsl":"shader","geometry.glsl":"shader","fragment.glsl":"shader","compute.glsl":"shader","ts.glsl":"shader","gs.glsl":"shader","vs.glsl":"shader","fs.glsl":"shader","shader":"shader","vertexshader":"shader","fragmentshader":"shader","geometryshader":"shader","computeshader":"shader","hlsl":"shader","pixel.hlsl":"shader","geometry.hlsl":"shader","compute.hlsl":"shader","tessellation.hlsl":"shader","px.hlsl":"shader","geom.hlsl":"shader","comp.hlsl":"shader","tess.hlsl":"shader","wgsl":"shader","spv":"shader","slang":"shader","cginc":"shader","compute":"shader","fx":"shader","fxh":"shader","hlsli":"shader","psh":"shader","vsh":"shader","sy":"siyuan","ndst.yml":"ndst","ndst.yaml":"ndst","ndst.json":"ndst","tobi":"tobi","gleam":"gleam","steadybit.yml":"steadybit","steadybit.yaml":"steadybit","capnp":"capnp","tree":"tree","cdc":"cadence","openapi.json":"openapi","openapi.yml":"openapi","openapi.yaml":"openapi","swagger.json":"swagger","swagger.yml":"swagger","swagger.yaml":"swagger","g4":"antlr","st.css":"stylable","pine":"pinejs","taskfile.yml":"taskfile","taskfile.yaml":"taskfile","gml":"gamemaker","yy":"gamemaker","yyp":"gamemaker","yyz":"gamemaker","tldr":"tldraw","typ":"typst","mmd":"mermaid","mermaid":"mermaid","mojo":"mojo","🔥":"mojo","rbxl":"roblox","rbxlx":"roblox","rbxm":"roblox","rbxmx":"roblox","luau":"luau","rbxmk.lua":"rbxmk","rbxmk.luau":"rbxmk","spwn":"spwn","templ":"templ","crx":"chrome","stan":"stan","abap":"abap","acds":"abap","asddls":"abap","lottie":"lottie","gs":"apps-script","garden.yml":"garden","garden.yaml":"garden","pkl":"pkl","k":"kcl","sigstore.json":"verified","bru":"bruno","cairo":"cairo","alloy":"grafana-alloy","ftl":"freemarker","ц":"tsil","tape":"tape","hurl":"hurl","cds":"cds","slint":"slint","verse":"verse","sw":"sway","zeabur":"zeabur","bench.ts":"bench-ts","bench.cts":"bench-ts","bench.mts":"bench-ts","bench.jsx":"bench-jsx","bench.tsx":"bench-jsx","bench.js":"bench-js","bench.cjs":"bench-js","bench.mjs":"bench-js","controller.js":"controller","controller.ts":"controller",".ncurc.json":"dependencies-update",".ncurc.yml":"dependencies-update",".ncurc.js":"dependencies-update","srt":"subtitles","ssa":"subtitles","ttml":"subtitles","sbv":"subtitles","dfxp":"subtitles","vtt":"subtitles","sub":"subtitles","ass":"subtitles","beancount":"beancount","bean":"beancount","epub":"epub","reg":"regedit","gnu":"gnuplot","gnuplot":"gnuplot","gp":"gnuplot","gpi":"gnuplot","plt":"gnuplot","plot":"gnuplot","smk":"snakemake","snakemake":"snakemake","cpn":"coloredpetrinets","pnml":"coloredpetrinets","pt":"pytorch","pth":"pytorch","pwf":"pytorch","blend":"blender","blend1":"blender","blend2":"blender","css.ts":"vanilla-extract","css.js":"vanilla-extract","css.cjs":"vanilla-extract","css.mjs":"vanilla-extract","css.tsx":"vanilla-extract","css.jsx":"vanilla-extract","toc":"toc","cue":"cue","lean":"lean","sls":"salt","m2":"macaulay2","ua":"uiua","skill.md":"skill","skills.md":"skill","instructions.md":"instructions","instruction.md":"instructions","mrpack":"mrpack","peg":"peg","cleanpeg":"peg","pegjs":"peg","pest":"peg","gram":"peg"}`),aW=JSON.parse(`{".pug-lintrc":"pug",".pug-lintrc.js":"pug",".pug-lintrc.json":"pug","justfile":"just",".justfile":"just",".jscsrc":"json",".jshintrc":"json","composer.lock":"json",".jsbeautifyrc":"json",".esformatter":"json","cdp.pid":"json",".whitesource":"json","playwright.config.js":"playwright","playwright.config.cjs":"playwright","playwright.config.mjs":"playwright","playwright.config.ts":"playwright","playwright.config.cts":"playwright","playwright.config.mts":"playwright","playwright.config.base.js":"playwright","playwright.config.base.cjs":"playwright","playwright.config.base.mjs":"playwright","playwright.config.base.ts":"playwright","playwright.config.base.cts":"playwright","playwright.config.base.mts":"playwright","playwright-ct.config.js":"playwright","playwright-ct.config.cjs":"playwright","playwright-ct.config.mjs":"playwright","playwright-ct.config.ts":"playwright","playwright-ct.config.cts":"playwright","playwright-ct.config.mts":"playwright",".htaccess":"xml","jakefile":"javascript",".release-it.json":"rocket",".release-it.ts":"rocket",".release-it.js":"rocket",".release-it.cjs":"rocket",".release-it.yaml":"rocket",".release-it.yml":"rocket",".release-it.toml":"rocket","release.toml":"rocket","release-plz.toml":"rocket",".release-plz.toml":"rocket","router.js":"routing","router.jsx":"routing","router.ts":"routing","router.tsx":"routing","route.js":"routing","route.jsx":"routing","route.ts":"routing","route.tsx":"routing","routes.js":"routing","routes.jsx":"routing","routes.ts":"routing","routes.tsx":"routing",".jshintignore":"settings",".buildignore":"settings",".mrconfig":"settings",".yardopts":"settings","manifest.mf":"settings",".clang-format":"settings",".clang-format-ignore":"settings",".clang-tidy":"settings",".conf":"settings","compile_flags.txt":"settings","typedoc.js":"typedoc","typedoc.json":"typedoc","markdoc.config.js":"markdoc-config","markdoc.config.mjs":"markdoc-config","markdoc.config.cjs":"markdoc-config","markdoc.config.ts":"markdoc-config","markdoc.config.mts":"markdoc-config","markdoc.config.cts":"markdoc-config","astro.config.js":"astro-config","astro.config.mjs":"astro-config","astro.config.cjs":"astro-config","astro.config.ts":"astro-config","astro.config.cts":"astro-config","astro.config.mts":"astro-config",".vsconfig":"visualstudio","go.mod":"go-mod","go.sum":"go-mod","go.work":"go-mod","go.work.sum":"go-mod","requirements.txt":"python-misc","pipfile":"python-misc",".python-version":"python-misc","manifest.in":"python-misc","pylintrc":"python-misc",".pylintrc":"python-misc","pyproject.toml":"python-misc","py.typed":"python-misc",".coveragerc":"python-misc",".coverage":"python-misc",".scrapy":"python-misc","celerybeat-schedule":"python-misc","celerybeat.pid":"python-misc","ruff.toml":"ruff",".ruff.toml":"ruff","uv.toml":"uv",".uv.toml":"uv","uv.lock":"uv","sconstruct":"scons","sconscript":"scons","scsub":"scons","commit-msg":"console","pre-commit":"console","pre-push":"console","post-merge":"console",".envrc":"console",".hushlogin":"console","APKBUILD":"console","PKGBUILD":"console","bashrc_Apple_Terminal":"console","zlogin":"console","zlogout":"console","zprofile":"console","zshenv":"console","zshrc":"console","zshrc_Apple_Terminal":"console","excalidraw":"excalidraw","excalidraw.json":"excalidraw","excalidraw.svg":"excalidraw","excalidraw.png":"excalidraw","gradle.properties":"gradle","gradlew":"gradle","gradle-wrapper.properties":"gradle","gradlew.bat":"gradle","copying":"license","copying.md":"license","copying.rst":"license","copying.txt":"license","copyright":"license","copyright.md":"license","copyright.rst":"license","copyright.txt":"license","license":"license","license-agpl":"license","license-apache":"license","license-bsd":"license","license-mit":"license","license-gpl":"license","license-lgpl":"license","license.md":"license","license.rst":"license","license.txt":"license","licence":"license","licence-agpl":"license","licence-apache":"license","licence-bsd":"license","licence-mit":"license","licence-gpl":"license","licence-lgpl":"license","licence.md":"license","licence.rst":"license","licence.txt":"license","unlicense":"unlicense","unlicense.txt":"unlicense",".htpasswd":"key","sha256sums":"key",".secrets":"key","keystatic.config.tsx":"keystatic","keystatic.config.ts":"keystatic","keystatic.config.jsx":"keystatic","keystatic.config.js":"keystatic",".ruby-version":"ruby","appraisals":"ruby","berksfile":"ruby","berksfile.lock":"ruby","brewfile":"ruby","capfile":"ruby","cheffile":"ruby","dangerfile":"ruby","deliverfile":"ruby","guardfile":"ruby","gymfile":"ruby","hobofile":"ruby","matchfile":"ruby","podfile":"ruby","puppetfile":"ruby","rakefile":"ruby","rantfile":"ruby","scanfile":"ruby","snapfile":"ruby","thorfile":"ruby","gemfile":"gemfile",".rubocop.yml":"rubocop",".rubocop-todo.yml":"rubocop",".rubocop_todo.yml":"rubocop",".rspec":"rspec",".swift-format":"swift",".swift-version":"swift",".swiftformat":"swift",".xcode-version":"swift","dockerfile":"docker","dockerfile.prod":"docker","dockerfile.production":"docker","dockerfile.alpha":"docker","dockerfile.beta":"docker","dockerfile.stage":"docker","dockerfile.staging":"docker","dockerfile.dev":"docker","dockerfile.development":"docker","dockerfile.local":"docker","dockerfile.test":"docker","dockerfile.testing":"docker","dockerfile.ci":"docker","dockerfile.web":"docker","dockerfile.windows":"docker","dockerfile.worker":"docker","docker-compose.yml":"docker","docker-compose.override.yml":"docker","docker-compose.prod.yml":"docker","docker-compose.production.yml":"docker","docker-compose.alpha.yml":"docker","docker-compose.beta.yml":"docker","docker-compose.stage.yml":"docker","docker-compose.staging.yml":"docker","docker-compose.dev.yml":"docker","docker-compose.development.yml":"docker","docker-compose.local.yml":"docker","docker-compose.test.yml":"docker","docker-compose.testing.yml":"docker","docker-compose.ci.yml":"docker","docker-compose.web.yml":"docker","docker-compose.worker.yml":"docker","docker-compose.yaml":"docker","docker-compose.override.yaml":"docker","docker-compose.prod.yaml":"docker","docker-compose.production.yaml":"docker","docker-compose.alpha.yaml":"docker","docker-compose.beta.yaml":"docker","docker-compose.stage.yaml":"docker","docker-compose.staging.yaml":"docker","docker-compose.dev.yaml":"docker","docker-compose.development.yaml":"docker","docker-compose.local.yaml":"docker","docker-compose.test.yaml":"docker","docker-compose.testing.yaml":"docker","docker-compose.ci.yaml":"docker","docker-compose.web.yaml":"docker","docker-compose.worker.yaml":"docker","containerfile":"docker","containerfile.prod":"docker","containerfile.production":"docker","containerfile.alpha":"docker","containerfile.beta":"docker","containerfile.stage":"docker","containerfile.staging":"docker","containerfile.dev":"docker","containerfile.development":"docker","containerfile.local":"docker","containerfile.test":"docker","containerfile.testing":"docker","containerfile.ci":"docker","containerfile.web":"docker","containerfile.worker":"docker","compose.yaml":"docker","compose.override.yaml":"docker","compose.prod.yaml":"docker","compose.production.yaml":"docker","compose.alpha.yaml":"docker","compose.beta.yaml":"docker","compose.stage.yaml":"docker","compose.staging.yaml":"docker","compose.dev.yaml":"docker","compose.development.yaml":"docker","compose.local.yaml":"docker","compose.test.yaml":"docker","compose.testing.yaml":"docker","compose.ci.yaml":"docker","compose.web.yaml":"docker","compose.worker.yaml":"docker","compose.yml":"docker","compose.override.yml":"docker","compose.prod.yml":"docker","compose.production.yml":"docker","compose.alpha.yml":"docker","compose.beta.yml":"docker","compose.stage.yml":"docker","compose.staging.yml":"docker","compose.dev.yml":"docker","compose.development.yml":"docker","compose.local.yml":"docker","compose.test.yml":"docker","compose.testing.yml":"docker","compose.ci.yml":"docker","compose.web.yml":"docker","compose.worker.yml":"docker",".latexmkrc":"latexmk","latexmkrc":"latexmk",".mailmap":"email",".graphqlrc":"graphql",".graphqlrc.json":"graphql",".graphqlrc.jsonc":"graphql",".graphqlrc.json5":"graphql",".graphqlrc.yaml":"graphql",".graphqlrc.yml":"graphql",".graphqlrc.toml":"graphql",".graphqlrc.js":"graphql",".graphqlrc.mjs":"graphql",".graphqlrc.cjs":"graphql",".graphqlrc.ts":"graphql",".graphqlrc.mts":"graphql",".graphqlrc.cts":"graphql",".config/graphqlrc":"graphql",".config/graphqlrc.json":"graphql",".config/graphqlrc.jsonc":"graphql",".config/graphqlrc.json5":"graphql",".config/graphqlrc.yaml":"graphql",".config/graphqlrc.yml":"graphql",".config/graphqlrc.toml":"graphql",".config/graphqlrc.js":"graphql",".config/graphqlrc.mjs":"graphql",".config/graphqlrc.cjs":"graphql",".config/graphqlrc.ts":"graphql",".config/graphqlrc.mts":"graphql",".config/graphqlrc.cts":"graphql","graphql.config.json":"graphql","graphql.config.jsonc":"graphql","graphql.config.json5":"graphql","graphql.config.yaml":"graphql","graphql.config.yml":"graphql","graphql.config.toml":"graphql","graphql.config.js":"graphql","graphql.config.mjs":"graphql","graphql.config.cjs":"graphql","graphql.config.ts":"graphql","graphql.config.mts":"graphql","graphql.config.cts":"graphql",".graphqlconfig":"graphql","XamlStyler.json":"xaml",".happo.js":"happo",".happo.mjs":"happo",".happo.cjs":"happo","chromatic.config.json":"chromatic",".git":"git",".gitignore":"git",".gitmessage":"git",".gitignore-global":"git",".gitignore_global":"git",".gitattributes":"git",".gitattributes-global":"git",".gitattributes_global":"git",".gitconfig":"git",".gitmodules":"git",".gitkeep":"git",".keep":"git",".gitpreserve":"git",".gitinclude":"git",".git-blame-ignore":"git",".git-blame-ignore-revs":"git",".git-for-windows-updater":"git","git-history":"git","COMMIT_EDITMSG":"git","MERGE_MSG":"git","git-rebase-todo":"git",".luacheckrc":"lua",".Rhistory":"r",".pubignore":"dart","cmakelists.txt":"cmake","cmakecache.txt":"cmake","CMakePresets.json":"cmake","semgrep.yml":"semgrep",".semgrepignore":"semgrep","vue.config.js":"vue-config","vue.config.cjs":"vue-config","vue.config.mjs":"vue-config","vue.config.ts":"vue-config","vetur.config.js":"vue-config","vetur.config.ts":"vue-config","volar.config.js":"vue-config",".vuerc":"vue-config","nuxt.config.js":"nuxt","nuxt.config.ts":"nuxt",".nuxtignore":"nuxt",".nuxtrc":"nuxt","harmonix.config.js":"harmonix","harmonix.config.ts":"harmonix","security.md":"lock","security.txt":"lock","security":"lock","angular-cli.json":"angular",".angular-cli.json":"angular","angular.json":"angular","ng-package.json":"angular",".mjmlconfig":"mjml","vercel.json":"vercel","vercel.ts":"vercel",".vercelignore":"vercel","now.json":"vercel",".nowignore":"vercel","liara.json":"liara",".liaraignore":"liara","verdaccio.yml":"verdaccio","payload.config.js":"payload","payload.config.mjs":"payload","payload.config.ts":"payload","payload.config.mts":"payload","next.config.js":"next","next.config.mjs":"next","next.config.ts":"next","next.config.mts":"next",".remarkrc":"remark",".remarkrc.cjs":"remark",".remarkrc.js":"remark",".remarkrc.json":"remark",".remarkrc.mjs":"remark",".remarkrc.yaml":"remark",".remarkrc.yml":"remark",".remarkignore":"remark","remix.config.js":"remix","remix.config.ts":"remix","artisan":"laravel",".vfl":"vfl",".kl":"kl",".postcssrc":"postcss",".postcssrc.json":"postcss",".postcssrc.jsonc":"postcss",".postcssrc.json5":"postcss",".postcssrc.yaml":"postcss",".postcssrc.yml":"postcss",".postcssrc.toml":"postcss",".postcssrc.js":"postcss",".postcssrc.mjs":"postcss",".postcssrc.cjs":"postcss",".postcssrc.ts":"postcss",".postcssrc.mts":"postcss",".postcssrc.cts":"postcss",".config/postcssrc":"postcss",".config/postcssrc.json":"postcss",".config/postcssrc.jsonc":"postcss",".config/postcssrc.json5":"postcss",".config/postcssrc.yaml":"postcss",".config/postcssrc.yml":"postcss",".config/postcssrc.toml":"postcss",".config/postcssrc.js":"postcss",".config/postcssrc.mjs":"postcss",".config/postcssrc.cjs":"postcss",".config/postcssrc.ts":"postcss",".config/postcssrc.mts":"postcss",".config/postcssrc.cts":"postcss","postcss.config.json":"postcss","postcss.config.jsonc":"postcss","postcss.config.json5":"postcss","postcss.config.yaml":"postcss","postcss.config.yml":"postcss","postcss.config.toml":"postcss","postcss.config.js":"postcss","postcss.config.mjs":"postcss","postcss.config.cjs":"postcss","postcss.config.ts":"postcss","postcss.config.mts":"postcss","postcss.config.cts":"postcss",".posthtmlrc":"posthtml",".posthtmlrc.json":"posthtml",".posthtmlrc.jsonc":"posthtml",".posthtmlrc.json5":"posthtml",".posthtmlrc.yaml":"posthtml",".posthtmlrc.yml":"posthtml",".posthtmlrc.toml":"posthtml",".posthtmlrc.js":"posthtml",".posthtmlrc.mjs":"posthtml",".posthtmlrc.cjs":"posthtml",".posthtmlrc.ts":"posthtml",".posthtmlrc.mts":"posthtml",".posthtmlrc.cts":"posthtml",".config/posthtmlrc":"posthtml",".config/posthtmlrc.json":"posthtml",".config/posthtmlrc.jsonc":"posthtml",".config/posthtmlrc.json5":"posthtml",".config/posthtmlrc.yaml":"posthtml",".config/posthtmlrc.yml":"posthtml",".config/posthtmlrc.toml":"posthtml",".config/posthtmlrc.js":"posthtml",".config/posthtmlrc.mjs":"posthtml",".config/posthtmlrc.cjs":"posthtml",".config/posthtmlrc.ts":"posthtml",".config/posthtmlrc.mts":"posthtml",".config/posthtmlrc.cts":"posthtml","posthtml.config.json":"posthtml","posthtml.config.jsonc":"posthtml","posthtml.config.json5":"posthtml","posthtml.config.yaml":"posthtml","posthtml.config.yml":"posthtml","posthtml.config.toml":"posthtml","posthtml.config.js":"posthtml","posthtml.config.mjs":"posthtml","posthtml.config.cjs":"posthtml","posthtml.config.ts":"posthtml","posthtml.config.mts":"posthtml","posthtml.config.cts":"posthtml","todo.md":"todo","todos.md":"todo","cabal.project":"cabal","cabal.project.freeze":"cabal","cabal.project.local":"cabal","CNAME":"http","project.graphcool":"graphcool","webpack.base.js":"webpack","webpack.base.mjs":"webpack","webpack.base.cjs":"webpack","webpack.base.ts":"webpack","webpack.base.mts":"webpack","webpack.base.cts":"webpack","webpack.client.js":"webpack","webpack.client.mjs":"webpack","webpack.client.cjs":"webpack","webpack.client.ts":"webpack","webpack.client.mts":"webpack","webpack.client.cts":"webpack","webpack.common.js":"webpack","webpack.common.mjs":"webpack","webpack.common.cjs":"webpack","webpack.common.ts":"webpack","webpack.common.mts":"webpack","webpack.common.cts":"webpack","webpack.config.babel.js":"webpack","webpack.config.babel.mjs":"webpack","webpack.config.babel.cjs":"webpack","webpack.config.babel.ts":"webpack","webpack.config.babel.mts":"webpack","webpack.config.babel.cts":"webpack","webpack.config.base.babel.js":"webpack","webpack.config.base.babel.mjs":"webpack","webpack.config.base.babel.cjs":"webpack","webpack.config.base.babel.ts":"webpack","webpack.config.base.babel.mts":"webpack","webpack.config.base.babel.cts":"webpack","webpack.config.base.js":"webpack","webpack.config.base.mjs":"webpack","webpack.config.base.cjs":"webpack","webpack.config.base.ts":"webpack","webpack.config.base.mts":"webpack","webpack.config.base.cts":"webpack","webpack.config.client.js":"webpack","webpack.config.client.mjs":"webpack","webpack.config.client.cjs":"webpack","webpack.config.client.ts":"webpack","webpack.config.client.mts":"webpack","webpack.config.client.cts":"webpack","webpack.config.common.babel.js":"webpack","webpack.config.common.babel.mjs":"webpack","webpack.config.common.babel.cjs":"webpack","webpack.config.common.babel.ts":"webpack","webpack.config.common.babel.mts":"webpack","webpack.config.common.babel.cts":"webpack","webpack.config.common.js":"webpack","webpack.config.common.mjs":"webpack","webpack.config.common.cjs":"webpack","webpack.config.common.ts":"webpack","webpack.config.common.mts":"webpack","webpack.config.common.cts":"webpack","webpack.config.dev.babel.js":"webpack","webpack.config.dev.babel.mjs":"webpack","webpack.config.dev.babel.cjs":"webpack","webpack.config.dev.babel.ts":"webpack","webpack.config.dev.babel.mts":"webpack","webpack.config.dev.babel.cts":"webpack","webpack.config.dev.js":"webpack","webpack.config.dev.mjs":"webpack","webpack.config.dev.cjs":"webpack","webpack.config.dev.ts":"webpack","webpack.config.dev.mts":"webpack","webpack.config.dev.cts":"webpack","webpack.config.main.js":"webpack","webpack.config.main.mjs":"webpack","webpack.config.main.cjs":"webpack","webpack.config.main.ts":"webpack","webpack.config.main.mts":"webpack","webpack.config.main.cts":"webpack","webpack.config.prod.babel.js":"webpack","webpack.config.prod.babel.mjs":"webpack","webpack.config.prod.babel.cjs":"webpack","webpack.config.prod.babel.ts":"webpack","webpack.config.prod.babel.mts":"webpack","webpack.config.prod.babel.cts":"webpack","webpack.config.prod.js":"webpack","webpack.config.prod.mjs":"webpack","webpack.config.prod.cjs":"webpack","webpack.config.prod.ts":"webpack","webpack.config.prod.mts":"webpack","webpack.config.prod.cts":"webpack","webpack.config.production.babel.js":"webpack","webpack.config.production.babel.mjs":"webpack","webpack.config.production.babel.cjs":"webpack","webpack.config.production.babel.ts":"webpack","webpack.config.production.babel.mts":"webpack","webpack.config.production.babel.cts":"webpack","webpack.config.production.js":"webpack","webpack.config.production.mjs":"webpack","webpack.config.production.cjs":"webpack","webpack.config.production.ts":"webpack","webpack.config.production.mts":"webpack","webpack.config.production.cts":"webpack","webpack.config.renderer.js":"webpack","webpack.config.renderer.mjs":"webpack","webpack.config.renderer.cjs":"webpack","webpack.config.renderer.ts":"webpack","webpack.config.renderer.mts":"webpack","webpack.config.renderer.cts":"webpack","webpack.config.server.js":"webpack","webpack.config.server.mjs":"webpack","webpack.config.server.cjs":"webpack","webpack.config.server.ts":"webpack","webpack.config.server.mts":"webpack","webpack.config.server.cts":"webpack","webpack.config.staging.babel.js":"webpack","webpack.config.staging.babel.mjs":"webpack","webpack.config.staging.babel.cjs":"webpack","webpack.config.staging.babel.ts":"webpack","webpack.config.staging.babel.mts":"webpack","webpack.config.staging.babel.cts":"webpack","webpack.config.staging.js":"webpack","webpack.config.staging.mjs":"webpack","webpack.config.staging.cjs":"webpack","webpack.config.staging.ts":"webpack","webpack.config.staging.mts":"webpack","webpack.config.staging.cts":"webpack","webpack.config.test.js":"webpack","webpack.config.test.mjs":"webpack","webpack.config.test.cjs":"webpack","webpack.config.test.ts":"webpack","webpack.config.test.mts":"webpack","webpack.config.test.cts":"webpack","webpack.config.vendor.production.js":"webpack","webpack.config.vendor.production.mjs":"webpack","webpack.config.vendor.production.cjs":"webpack","webpack.config.vendor.production.ts":"webpack","webpack.config.vendor.production.mts":"webpack","webpack.config.vendor.production.cts":"webpack","webpack.config.vendor.js":"webpack","webpack.config.vendor.mjs":"webpack","webpack.config.vendor.cjs":"webpack","webpack.config.vendor.ts":"webpack","webpack.config.vendor.mts":"webpack","webpack.config.vendor.cts":"webpack","webpack.config.js":"webpack","webpack.config.mjs":"webpack","webpack.config.cjs":"webpack","webpack.config.ts":"webpack","webpack.config.mts":"webpack","webpack.config.cts":"webpack","webpack.dev.js":"webpack","webpack.dev.mjs":"webpack","webpack.dev.cjs":"webpack","webpack.dev.ts":"webpack","webpack.dev.mts":"webpack","webpack.dev.cts":"webpack","webpack.development.js":"webpack","webpack.development.mjs":"webpack","webpack.development.cjs":"webpack","webpack.development.ts":"webpack","webpack.development.mts":"webpack","webpack.development.cts":"webpack","webpack.dist.js":"webpack","webpack.dist.mjs":"webpack","webpack.dist.cjs":"webpack","webpack.dist.ts":"webpack","webpack.dist.mts":"webpack","webpack.dist.cts":"webpack","webpack.mix.js":"webpack","webpack.mix.mjs":"webpack","webpack.mix.cjs":"webpack","webpack.mix.ts":"webpack","webpack.mix.mts":"webpack","webpack.mix.cts":"webpack","webpack.prod.config.js":"webpack","webpack.prod.config.mjs":"webpack","webpack.prod.config.cjs":"webpack","webpack.prod.config.ts":"webpack","webpack.prod.config.mts":"webpack","webpack.prod.config.cts":"webpack","webpack.prod.js":"webpack","webpack.prod.mjs":"webpack","webpack.prod.cjs":"webpack","webpack.prod.ts":"webpack","webpack.prod.mts":"webpack","webpack.prod.cts":"webpack","webpack.production.js":"webpack","webpack.production.mjs":"webpack","webpack.production.cjs":"webpack","webpack.production.ts":"webpack","webpack.production.mts":"webpack","webpack.production.cts":"webpack","webpack.server.js":"webpack","webpack.server.mjs":"webpack","webpack.server.cjs":"webpack","webpack.server.ts":"webpack","webpack.server.mts":"webpack","webpack.server.cts":"webpack","webpack.test.js":"webpack","webpack.test.mjs":"webpack","webpack.test.cjs":"webpack","webpack.test.ts":"webpack","webpack.test.mts":"webpack","webpack.test.cts":"webpack","webpack.js":"webpack","webpack.mjs":"webpack","webpack.cjs":"webpack","webpack.ts":"webpack","webpack.mts":"webpack","webpack.cts":"webpack","webpackfile.js":"webpack","webpackfile.mjs":"webpack","webpackfile.cjs":"webpack","webpackfile.ts":"webpack","webpackfile.mts":"webpack","webpackfile.cts":"webpack","webpack.config.coffee":"webpack","rstack.config.js":"rstack","rstack.config.mjs":"rstack","rstack.config.cjs":"rstack","rstack.config.ts":"rstack","rstack.config.mts":"rstack","rstack.config.cts":"rstack","rspack.config.js":"rstack","rspack.config.mjs":"rstack","rspack.config.cjs":"rstack","rspack.config.ts":"rstack","rspack.config.mts":"rstack","rspack.config.cts":"rstack","rsbuild.config.js":"rstack","rsbuild.config.mjs":"rstack","rsbuild.config.cjs":"rstack","rsbuild.config.ts":"rstack","rsbuild.config.mts":"rstack","rsbuild.config.cts":"rstack","rslib.config.js":"rstack","rslib.config.mjs":"rstack","rslib.config.cjs":"rstack","rslib.config.ts":"rstack","rslib.config.mts":"rstack","rslib.config.cts":"rstack","rstest.config.js":"rstack","rstest.config.mjs":"rstack","rstest.config.cjs":"rstack","rstest.config.ts":"rstack","rstest.config.mts":"rstack","rstest.config.cts":"rstack","rspress.config.js":"rstack","rspress.config.mjs":"rstack","rspress.config.cjs":"rstack","rspress.config.ts":"rstack","rspress.config.mts":"rstack","rspress.config.cts":"rstack","rslint.config.js":"rstack","rslint.config.mjs":"rstack","rslint.config.cjs":"rstack","rslint.config.ts":"rstack","rslint.config.mts":"rstack","rslint.config.cts":"rstack","rslint.json":"rstack","rslint.jsonc":"rstack","lynx.config.js":"lynx","lynx.config.mjs":"lynx","lynx.config.cjs":"lynx","lynx.config.ts":"lynx","lynx.config.mts":"lynx","lynx.config.cts":"lynx","ionic.config.json":"ionic",".io-config.json":"ionic","gulpfile.js":"gulp","gulpfile.mjs":"gulp","gulpfile.ts":"gulp","gulpfile.cts":"gulp","gulpfile.mts":"gulp","gulpfile.babel.js":"gulp","gulpfile.cjs":"gulp","package.json":"nodejs","package-lock.json":"nodejs",".nvmrc":"nodejs",".esmrc":"nodejs",".node-version":"nodejs",".npmignore":"npm",".npmrc":"npm",".yarnrc":"yarn","yarn.lock":"yarn",".yarnclean":"yarn",".yarn-integrity":"yarn","yarn-error.log":"yarn",".yarnrc.yml":"yarn",".yarnrc.yaml":"yarn","androidmanifest.xml":"android",".env.defaults":"tune",".env.example":"tune",".env.sample":"tune",".env.template":"tune",".env.schema":"tune",".env.local":"tune",".env.dev":"tune",".env.development":"tune",".env.alpha":"tune",".env.e2e":"tune",".env.qa":"tune",".env.dist":"tune",".env.preprod":"tune",".env.prod":"tune",".env.production":"tune",".env.prod.example":"tune",".env.production.example":"tune",".env.stg":"tune",".env.stage":"tune",".env.staging":"tune",".env.preview":"tune",".env.test":"tune",".env.testing":"tune",".env.dev.local":"tune",".env.development.local":"tune",".env.qa.local":"tune",".env.prod.local":"tune",".env.production.local":"tune",".env.stg.local":"tune",".env.staging.local":"tune",".env.test.local":"tune",".env.uat":"tune",".vars":"tune",".dev.vars":"tune","turbo.json":"turborepo","turbo.jsonc":"turborepo",".babelrc":"babel",".babelrc.json":"babel",".babelrc.jsonc":"babel",".babelrc.json5":"babel",".babelrc.yaml":"babel",".babelrc.yml":"babel",".babelrc.toml":"babel",".babelrc.js":"babel",".babelrc.mjs":"babel",".babelrc.cjs":"babel",".babelrc.ts":"babel",".babelrc.mts":"babel",".babelrc.cts":"babel",".config/babelrc":"babel",".config/babelrc.json":"babel",".config/babelrc.jsonc":"babel",".config/babelrc.json5":"babel",".config/babelrc.yaml":"babel",".config/babelrc.yml":"babel",".config/babelrc.toml":"babel",".config/babelrc.js":"babel",".config/babelrc.mjs":"babel",".config/babelrc.cjs":"babel",".config/babelrc.ts":"babel",".config/babelrc.mts":"babel",".config/babelrc.cts":"babel","babel.config.json":"babel","babel.config.jsonc":"babel","babel.config.json5":"babel","babel.config.yaml":"babel","babel.config.yml":"babel","babel.config.toml":"babel","babel.config.js":"babel","babel.config.mjs":"babel","babel.config.cjs":"babel","babel.config.ts":"babel","babel.config.mts":"babel","babel.config.cts":"babel",".babel-plugin-macrosrc":"babel",".babel-plugin-macrosrc.json":"babel",".babel-plugin-macrosrc.jsonc":"babel",".babel-plugin-macrosrc.json5":"babel",".babel-plugin-macrosrc.yaml":"babel",".babel-plugin-macrosrc.yml":"babel",".babel-plugin-macrosrc.toml":"babel",".babel-plugin-macrosrc.js":"babel",".babel-plugin-macrosrc.mjs":"babel",".babel-plugin-macrosrc.cjs":"babel",".babel-plugin-macrosrc.ts":"babel",".babel-plugin-macrosrc.mts":"babel",".babel-plugin-macrosrc.cts":"babel",".config/babel-plugin-macrosrc":"babel",".config/babel-plugin-macrosrc.json":"babel",".config/babel-plugin-macrosrc.jsonc":"babel",".config/babel-plugin-macrosrc.json5":"babel",".config/babel-plugin-macrosrc.yaml":"babel",".config/babel-plugin-macrosrc.yml":"babel",".config/babel-plugin-macrosrc.toml":"babel",".config/babel-plugin-macrosrc.js":"babel",".config/babel-plugin-macrosrc.mjs":"babel",".config/babel-plugin-macrosrc.cjs":"babel",".config/babel-plugin-macrosrc.ts":"babel",".config/babel-plugin-macrosrc.mts":"babel",".config/babel-plugin-macrosrc.cts":"babel","babel-plugin-macros.config.json":"babel","babel-plugin-macros.config.jsonc":"babel","babel-plugin-macros.config.json5":"babel","babel-plugin-macros.config.yaml":"babel","babel-plugin-macros.config.yml":"babel","babel-plugin-macros.config.toml":"babel","babel-plugin-macros.config.js":"babel","babel-plugin-macros.config.mjs":"babel","babel-plugin-macros.config.cjs":"babel","babel-plugin-macros.config.ts":"babel","babel-plugin-macros.config.mts":"babel","babel-plugin-macros.config.cts":"babel","babel-transform.js":"babel","blitz.config.js":"blitz","blitz.config.ts":"blitz",".blitz.config.compiled.js":"blitz","contributing.md":"contributing","contributing.rst":"contributing","contributing.txt":"contributing","contributing":"contributing","readme.md":"readme","readme.rst":"readme","readme.txt":"readme","readme":"readme","changelog":"changelog","changelog.md":"changelog","changelog.rst":"changelog","changelog.txt":"changelog","changes":"changelog","changes.md":"changelog","changes.rst":"changelog","changes.txt":"changelog","architecture.md":"architecture","architecture.rst":"architecture","architecture.txt":"architecture","architecture":"architecture","credits.md":"credits","credits.rst":"credits","credits.txt":"credits","credits":"credits","authors.md":"authors","authors.rst":"authors","authors.txt":"authors","authors":"authors","contributors.md":"authors","contributors.rst":"authors","contributors.txt":"authors","contributors":"authors",".flowconfig":"flow","favicon.ico":"favicon","karma.conf.js":"karma","karma.conf.ts":"karma","karma.conf.coffee":"karma","karma.config.js":"karma","karma.config.ts":"karma","karma-main.js":"karma","karma-main.ts":"karma",".bithoundrc":"bithound","svgo.config.js":"svgo","svgo.config.cjs":"svgo","svgo.config.mjs":"svgo",".appveyor.yml":"appveyor","appveyor.yml":"appveyor",".travis.yml":"travis",".codecov.yml":"codecov","codecov.yml":"codecov",".codecov.yaml":"codecov","codecov.yaml":"codecov","sonar-project.properties":"sonarcloud",".sonarcloud.properties":"sonarcloud","sonarcloud.yaml":"sonarcloud","SonarQube.Analysis.xml":"sonarcloud","protractor.conf.js":"protractor","protractor.conf.ts":"protractor","protractor.conf.coffee":"protractor","protractor.config.js":"protractor","protractor.config.ts":"protractor","fuse.js":"fusebox","procfile":"heroku","procfile.windows":"heroku",".editorconfig":"editorconfig",".editorconfig-checker.json":"editorconfig",".ecrc":"editorconfig",".bowerrc":"bower","bower.json":"bower",".eslintrc":"eslint",".eslintrc.json":"eslint",".eslintrc.jsonc":"eslint",".eslintrc.json5":"eslint",".eslintrc.yaml":"eslint",".eslintrc.yml":"eslint",".eslintrc.toml":"eslint",".eslintrc.js":"eslint",".eslintrc.mjs":"eslint",".eslintrc.cjs":"eslint",".eslintrc.ts":"eslint",".eslintrc.mts":"eslint",".eslintrc.cts":"eslint",".config/eslintrc":"eslint",".config/eslintrc.json":"eslint",".config/eslintrc.jsonc":"eslint",".config/eslintrc.json5":"eslint",".config/eslintrc.yaml":"eslint",".config/eslintrc.yml":"eslint",".config/eslintrc.toml":"eslint",".config/eslintrc.js":"eslint",".config/eslintrc.mjs":"eslint",".config/eslintrc.cjs":"eslint",".config/eslintrc.ts":"eslint",".config/eslintrc.mts":"eslint",".config/eslintrc.cts":"eslint","eslint.config.json":"eslint","eslint.config.jsonc":"eslint","eslint.config.json5":"eslint","eslint.config.yaml":"eslint","eslint.config.yml":"eslint","eslint.config.toml":"eslint","eslint.config.js":"eslint","eslint.config.mjs":"eslint","eslint.config.cjs":"eslint","eslint.config.ts":"eslint","eslint.config.mts":"eslint","eslint.config.cts":"eslint",".eslintrc-md.js":"eslint",".eslintrc-jsdoc.js":"eslint",".eslintrc.base.json":"eslint",".eslintignore":"eslint",".eslintcache":"eslint","eslint-options.js":"eslint","code_of_conduct.md":"conduct","code_of_conduct.txt":"conduct","code_of_conduct":"conduct",".watchmanconfig":"watchman","aurelia.json":"aurelia",".autorc":"auto","auto.config.js":"auto","auto.config.ts":"auto","auto-config.json":"auto","auto-config.yaml":"auto","auto-config.yml":"auto","auto-config.ts":"auto","auto-config.js":"auto","mocha.opts":"mocha",".mocharc.yml":"mocha",".mocharc.yaml":"mocha",".mocharc.js":"mocha",".mocharc.cjs":"mocha",".mocharc.json":"mocha",".mocharc.jsonc":"mocha","jenkinsfile":"jenkins","firebase.config.js":"firebase","firebase.json":"firebase",".firebaserc":"firebase","firestore.rules":"firebase","firestore.indexes.json":"firebase","rollup.config.js":"rollup","rollup.config.mjs":"rollup","rollup.config.ts":"rollup","rollup-config.js":"rollup","rollup-config.mjs":"rollup","rollup-config.ts":"rollup","rollup.config.common.js":"rollup","rollup.config.common.mjs":"rollup","rollup.config.common.ts":"rollup","rollup.config.base.js":"rollup","rollup.config.base.mjs":"rollup","rollup.config.base.ts":"rollup","rollup.config.prod.js":"rollup","rollup.config.prod.mjs":"rollup","rollup.config.prod.ts":"rollup","rollup.config.dev.js":"rollup","rollup.config.dev.mjs":"rollup","rollup.config.dev.ts":"rollup","rollup.config.prod.vendor.js":"rollup","rollup.config.prod.vendor.mjs":"rollup","rollup.config.prod.vendor.ts":"rollup",".hhconfig":"hack","hardhat.config.js":"hardhat","hardhat.config.ts":"hardhat",".stylelintrc":"stylelint",".stylelintrc.json":"stylelint",".stylelintrc.jsonc":"stylelint",".stylelintrc.json5":"stylelint",".stylelintrc.yaml":"stylelint",".stylelintrc.yml":"stylelint",".stylelintrc.toml":"stylelint",".stylelintrc.js":"stylelint",".stylelintrc.mjs":"stylelint",".stylelintrc.cjs":"stylelint",".stylelintrc.ts":"stylelint",".stylelintrc.mts":"stylelint",".stylelintrc.cts":"stylelint",".config/stylelintrc":"stylelint",".config/stylelintrc.json":"stylelint",".config/stylelintrc.jsonc":"stylelint",".config/stylelintrc.json5":"stylelint",".config/stylelintrc.yaml":"stylelint",".config/stylelintrc.yml":"stylelint",".config/stylelintrc.toml":"stylelint",".config/stylelintrc.js":"stylelint",".config/stylelintrc.mjs":"stylelint",".config/stylelintrc.cjs":"stylelint",".config/stylelintrc.ts":"stylelint",".config/stylelintrc.mts":"stylelint",".config/stylelintrc.cts":"stylelint","stylelint.config.json":"stylelint","stylelint.config.jsonc":"stylelint","stylelint.config.json5":"stylelint","stylelint.config.yaml":"stylelint","stylelint.config.yml":"stylelint","stylelint.config.toml":"stylelint","stylelint.config.js":"stylelint","stylelint.config.mjs":"stylelint","stylelint.config.cjs":"stylelint","stylelint.config.ts":"stylelint","stylelint.config.mts":"stylelint","stylelint.config.cts":"stylelint",".stylelintignore":"stylelint",".stylelintcache":"stylelint",".codeclimate.yml":"code-climate",".prettierrc":"prettier",".prettierrc.json":"prettier",".prettierrc.jsonc":"prettier",".prettierrc.json5":"prettier",".prettierrc.yaml":"prettier",".prettierrc.yml":"prettier",".prettierrc.toml":"prettier",".prettierrc.js":"prettier",".prettierrc.mjs":"prettier",".prettierrc.cjs":"prettier",".prettierrc.ts":"prettier",".prettierrc.mts":"prettier",".prettierrc.cts":"prettier",".config/prettierrc":"prettier",".config/prettierrc.json":"prettier",".config/prettierrc.jsonc":"prettier",".config/prettierrc.json5":"prettier",".config/prettierrc.yaml":"prettier",".config/prettierrc.yml":"prettier",".config/prettierrc.toml":"prettier",".config/prettierrc.js":"prettier",".config/prettierrc.mjs":"prettier",".config/prettierrc.cjs":"prettier",".config/prettierrc.ts":"prettier",".config/prettierrc.mts":"prettier",".config/prettierrc.cts":"prettier","prettier.config.json":"prettier","prettier.config.jsonc":"prettier","prettier.config.json5":"prettier","prettier.config.yaml":"prettier","prettier.config.yml":"prettier","prettier.config.toml":"prettier","prettier.config.js":"prettier","prettier.config.mjs":"prettier","prettier.config.cjs":"prettier","prettier.config.ts":"prettier","prettier.config.mts":"prettier","prettier.config.cts":"prettier",".prettierignore":"prettier",".renovaterc":"renovate",".renovaterc.json":"renovate","renovate-config.json":"renovate","renovate.json":"renovate","renovate.json5":"renovate","apollo.config.js":"apollo","nodemon.json":"nodemon","nodemon-debug.json":"nodemon",".hintrc":"webhint","browserslist":"browserlist",".browserslistrc":"browserlist",".snyk":"snyk",".drone.yml":"drone","opencode.json":"opencode","opencode.jsonc":"opencode",".sequelizerc":"sequelize","gatsby-config.js":"gatsby","gatsby-config.mjs":"gatsby","gatsby-config.ts":"gatsby","gatsby-node.js":"gatsby","gatsby-node.mjs":"gatsby","gatsby-node.ts":"gatsby","gatsby-browser.js":"gatsby","gatsby-browser.tsx":"gatsby","gatsby-ssr.js":"gatsby","gatsby-ssr.tsx":"gatsby",".wakatime-project":"wakatime","circle.yml":"circleci",".cfignore":"cloudfoundry","gruntfile.js":"grunt","gruntfile.ts":"grunt","gruntfile.cjs":"grunt","gruntfile.cts":"grunt","gruntfile.coffee":"grunt","gruntfile.babel.js":"grunt","gruntfile.babel.ts":"grunt","gruntfile.babel.coffee":"grunt","jest.config.js":"jest","jest.config.cjs":"jest","jest.config.mjs":"jest","jest.config.ts":"jest","jest.config.cts":"jest","jest.config.mts":"jest","jest.config.json":"jest","jest.e2e.config.js":"jest","jest.e2e.config.cjs":"jest","jest.e2e.config.mjs":"jest","jest.e2e.config.ts":"jest","jest.e2e.config.cts":"jest","jest.e2e.config.mts":"jest","jest.e2e.config.json":"jest","jest.e2e.json":"jest","jest-unit.config.js":"jest","jest-e2e.config.js":"jest","jest-e2e.config.cjs":"jest","jest-e2e.config.mjs":"jest","jest-e2e.config.ts":"jest","jest-e2e.config.cts":"jest","jest-e2e.config.mts":"jest","jest-e2e.config.json":"jest","jest-e2e.json":"jest","jest-github-actions-reporter.js":"jest","jest.setup.js":"jest","jest.setup.ts":"jest","jest.json":"jest",".jestrc":"jest",".jestrc.js":"jest",".jestrc.json":"jest","jest.teardown.js":"jest","jest-preset.json":"jest","jest-preset.js":"jest","jest-preset.cjs":"jest","jest-preset.mjs":"jest","jest.preset.js":"jest","jest.preset.mjs":"jest","jest.preset.cjs":"jest","jest.preset.json":"jest","fastfile":"fastlane","appfile":"fastlane",".helmignore":"helm","wallaby.js":"wallaby","wallaby.conf.js":"wallaby","stencil.config.js":"stencil","stencil.config.ts":"stencil","makefile":"makefile","gnumakefile":"makefile","kbuild":"makefile",".releaserc":"semantic-release",".releaserc.json":"semantic-release",".releaserc.jsonc":"semantic-release",".releaserc.json5":"semantic-release",".releaserc.yaml":"semantic-release",".releaserc.yml":"semantic-release",".releaserc.toml":"semantic-release",".releaserc.js":"semantic-release",".releaserc.mjs":"semantic-release",".releaserc.cjs":"semantic-release",".releaserc.ts":"semantic-release",".releaserc.mts":"semantic-release",".releaserc.cts":"semantic-release",".config/releaserc":"semantic-release",".config/releaserc.json":"semantic-release",".config/releaserc.jsonc":"semantic-release",".config/releaserc.json5":"semantic-release",".config/releaserc.yaml":"semantic-release",".config/releaserc.yml":"semantic-release",".config/releaserc.toml":"semantic-release",".config/releaserc.js":"semantic-release",".config/releaserc.mjs":"semantic-release",".config/releaserc.cjs":"semantic-release",".config/releaserc.ts":"semantic-release",".config/releaserc.mts":"semantic-release",".config/releaserc.cts":"semantic-release","release.config.json":"semantic-release","release.config.jsonc":"semantic-release","release.config.json5":"semantic-release","release.config.yaml":"semantic-release","release.config.yml":"semantic-release","release.config.toml":"semantic-release","release.config.js":"semantic-release","release.config.mjs":"semantic-release","release.config.cjs":"semantic-release","release.config.ts":"semantic-release","release.config.mts":"semantic-release","release.config.cts":"semantic-release","bitbucket-pipelines.yaml":"bitbucket","bitbucket-pipelines.yml":"bitbucket",".bazelignore":"bazel",".bazelrc":"bazel",".bazelversion":"bazel",".gdignore":"godot-assets","._sc_":"godot-assets","_sc_":"godot-assets","azure-pipelines.yml":"azure-pipelines","azure-pipelines.yaml":"azure-pipelines","azure-pipelines-main.yml":"azure-pipelines","azure-pipelines-main.yaml":"azure-pipelines","vagrantfile":"vagrant","prisma7.config.js":"prisma","prisma7.config.mjs":"prisma","prisma7.config.cjs":"prisma","prisma7.config.ts":"prisma","prisma7.config.mts":"prisma","prisma7.config.cts":"prisma","prisma.config.js":"prisma","prisma.config.mjs":"prisma","prisma.config.cjs":"prisma","prisma.config.ts":"prisma","prisma.config.mts":"prisma","prisma.config.cts":"prisma","prisma.yml":"prisma",".nycrc":"istanbul",".nycrc.json":"istanbul",".nycrc.yaml":"istanbul",".nycrc.yml":"istanbul","nyc.config.js":"istanbul","nyc.config.cjs":"istanbul",".istanbul.yml":"istanbul","tailwind.js":"tailwindcss","tailwind.ts":"tailwindcss","tailwind.config.js":"tailwindcss","tailwind.config.cjs":"tailwindcss","tailwind.config.mjs":"tailwindcss","tailwind.config.ts":"tailwindcss","tailwind.config.cts":"tailwindcss","tailwind.config.mts":"tailwindcss","buildkite.yml":"buildkite","buildkite.yaml":"buildkite","netlify.json":"netlify","netlify.yml":"netlify","netlify.yaml":"netlify","netlify.toml":"netlify","svelte.config.js":"svelte","svelte.config.mjs":"svelte","svelte.config.cjs":"svelte","svelte.config.ts":"svelte","svelte.config.mts":"svelte","svelte.config.cts":"svelte","nest-cli.json":"nest",".nest-cli.json":"nest","nestconfig.json":"nest",".nestconfig.json":"nest","moon.yml":"moon",".percy.yml":"percy",".gitpod.yml":"gitpod",".stackblitzrc":"stackblitz","codeowners":"codeowners","OWNERS":"codeowners",".gcloudignore":"gcp","amplify.yml":"amplify",".huskyrc":"husky",".huskyrc.json":"husky",".huskyrc.jsonc":"husky",".huskyrc.json5":"husky",".huskyrc.yaml":"husky",".huskyrc.yml":"husky",".huskyrc.toml":"husky",".huskyrc.js":"husky",".huskyrc.mjs":"husky",".huskyrc.cjs":"husky",".huskyrc.ts":"husky",".huskyrc.mts":"husky",".huskyrc.cts":"husky",".config/huskyrc":"husky",".config/huskyrc.json":"husky",".config/huskyrc.jsonc":"husky",".config/huskyrc.json5":"husky",".config/huskyrc.yaml":"husky",".config/huskyrc.yml":"husky",".config/huskyrc.toml":"husky",".config/huskyrc.js":"husky",".config/huskyrc.mjs":"husky",".config/huskyrc.cjs":"husky",".config/huskyrc.ts":"husky",".config/huskyrc.mts":"husky",".config/huskyrc.cts":"husky","husky.config.json":"husky","husky.config.jsonc":"husky","husky.config.json5":"husky","husky.config.yaml":"husky","husky.config.yml":"husky","husky.config.toml":"husky","husky.config.js":"husky","husky.config.mjs":"husky","husky.config.cjs":"husky","husky.config.ts":"husky","husky.config.mts":"husky","husky.config.cts":"husky","tiltfile":"tilt","capacitor.config.json":"capacitor","capacitor.config.ts":"capacitor",".adonisrc.json":"adonis","ace":"adonis","meson.build":"meson","meson_options.txt":"meson","meson.options":"meson",".czrc":"commitizen",".cz.json":"commitizen",".cz.toml":"commitizen",".cz.yaml":"commitizen",".cz.yml":"commitizen","cz.json":"commitizen","cz.toml":"commitizen","cz.yaml":"commitizen","cz.yml":"commitizen",".commitlintrc":"commitlint",".commitlintrc.json":"commitlint",".commitlintrc.jsonc":"commitlint",".commitlintrc.json5":"commitlint",".commitlintrc.yaml":"commitlint",".commitlintrc.yml":"commitlint",".commitlintrc.toml":"commitlint",".commitlintrc.js":"commitlint",".commitlintrc.mjs":"commitlint",".commitlintrc.cjs":"commitlint",".commitlintrc.ts":"commitlint",".commitlintrc.mts":"commitlint",".commitlintrc.cts":"commitlint",".config/commitlintrc":"commitlint",".config/commitlintrc.json":"commitlint",".config/commitlintrc.jsonc":"commitlint",".config/commitlintrc.json5":"commitlint",".config/commitlintrc.yaml":"commitlint",".config/commitlintrc.yml":"commitlint",".config/commitlintrc.toml":"commitlint",".config/commitlintrc.js":"commitlint",".config/commitlintrc.mjs":"commitlint",".config/commitlintrc.cjs":"commitlint",".config/commitlintrc.ts":"commitlint",".config/commitlintrc.mts":"commitlint",".config/commitlintrc.cts":"commitlint","commitlint.config.json":"commitlint","commitlint.config.jsonc":"commitlint","commitlint.config.json5":"commitlint","commitlint.config.yaml":"commitlint","commitlint.config.yml":"commitlint","commitlint.config.toml":"commitlint","commitlint.config.js":"commitlint","commitlint.config.mjs":"commitlint","commitlint.config.cjs":"commitlint","commitlint.config.ts":"commitlint","commitlint.config.mts":"commitlint","commitlint.config.cts":"commitlint",".commitlint.yaml":"commitlint",".commitlint.yml":"commitlint",".buckconfig":"buck","nx.json":"nx",".nxignore":"nx","dune":"dune","dune-project":"dune","dune-workspace":"dune","dune-workspace.dev":"dune","roadmap.md":"roadmap","roadmap.txt":"roadmap","timeline.md":"roadmap","timeline.txt":"roadmap","milestones.md":"roadmap","milestones.txt":"roadmap","nuget.config":"nuget",".nuspec":"nuget","nuget.exe":"nuget","stryker.conf.json":"stryker","stryker.conf.js":"stryker","stryker.conf.cjs":"stryker","stryker.conf.mjs":"stryker",".stryker.conf.json":"stryker",".stryker.conf.js":"stryker",".stryker.conf.cjs":"stryker",".stryker.conf.mjs":"stryker","stryker.config.json":"stryker","stryker.config.js":"stryker","stryker.config.mjs":"stryker","stryker.config.cjs":"stryker",".stryker.config.json":"stryker",".stryker.config.js":"stryker",".stryker.config.mjs":"stryker",".stryker.config.cjs":"stryker",".modernizrrc":"modernizr",".modernizrrc.js":"modernizr",".modernizrrc.json":"modernizr",".slugignore":"slug","stitches.config.js":"stitches","stitches.config.ts":"stitches","nginx.conf":"nginx",".mcattributes":"minecraft",".mcdefinitions":"minecraft",".mcignore":"minecraft",".replit":"replit","duc.fbs":"duc","snowpack.config.js":"snowpack","snowpack.config.cjs":"snowpack","snowpack.config.mjs":"snowpack","snowpack.config.ts":"snowpack","snowpack.config.cts":"snowpack","snowpack.config.mts":"snowpack","snowpack.deps.json":"snowpack","snowpack.config.json":"snowpack","quasar.conf.js":"quasar","quasar.config.js":"quasar","quasar.conf.ts":"quasar","quasar.config.ts":"quasar","quasar.config.cjs":"quasar","dependabot.yml":"dependabot","dependabot.yaml":"dependabot","vite.config.js":"vite","vite.config.mjs":"vite","vite.config.cjs":"vite","vite.config.ts":"vite","vite.config.mts":"vite","vite.config.cts":"vite","vitest.workspace.js":"vitest","vitest.workspace.mjs":"vitest","vitest.workspace.cjs":"vitest","vitest.workspace.ts":"vitest","vitest.workspace.mts":"vitest","vitest.workspace.cts":"vitest","vitest.config.js":"vitest","vitest.config.mjs":"vitest","vitest.config.cjs":"vitest","vitest.config.ts":"vitest","vitest.config.mts":"vitest","vitest.config.cts":"vitest","vitest.unit.config.js":"vitest","vitest.unit.config.mjs":"vitest","vitest.unit.config.cjs":"vitest","vitest.unit.config.ts":"vitest","vitest.unit.config.mts":"vitest","vitest.unit.config.cts":"vitest","vitest.e2e.config.js":"vitest","vitest.e2e.config.mjs":"vitest","vitest.e2e.config.cjs":"vitest","vitest.e2e.config.ts":"vitest","vitest.e2e.config.mts":"vitest","vitest.e2e.config.cts":"vitest","velite.config.js":"velite","velite.config.mjs":"velite","velite.config.cjs":"velite","velite.config.ts":"velite","velite.config.mts":"velite","velite.config.cts":"velite","rolldown.config.js":"rolldown","rolldown.config.mjs":"rolldown","rolldown.config.cjs":"rolldown","rolldown.config.ts":"rolldown","rolldown.config.mts":"rolldown","rolldown.config.cts":"rolldown","lerna.json":"lerna","windi.config.js":"windicss","windi.config.cjs":"windicss","windi.config.ts":"windicss","windi.config.cts":"windicss","windi.config.json":"windicss",".textlintrc":"textlint",".textlintrc.js":"textlint",".textlintrc.cjs":"textlint",".textlintrc.json":"textlint",".textlintrc.yml":"textlint",".textlintrc.yaml":"textlint",".textlintignore":"textlint","vpkg.json":"vlang","v.mod":"vlang","sentry.client.config.js":"sentry","sentry.client.config.mjs":"sentry","sentry.client.config.cjs":"sentry","sentry.client.config.ts":"sentry","sentry.client.config.mts":"sentry","sentry.client.config.cts":"sentry","sentry.server.config.js":"sentry","sentry.server.config.mjs":"sentry","sentry.server.config.cjs":"sentry","sentry.server.config.ts":"sentry","sentry.server.config.mts":"sentry","sentry.server.config.cts":"sentry","sentry.edge.config.js":"sentry","sentry.edge.config.mjs":"sentry","sentry.edge.config.cjs":"sentry","sentry.edge.config.ts":"sentry","sentry.edge.config.mts":"sentry","sentry.edge.config.cts":"sentry",".sentryclirc":"sentry",".env.sentry-build-plugin":"sentry","contentlayer.config.js":"contentlayer","contentlayer.config.mjs":"contentlayer","contentlayer.config.cjs":"contentlayer","contentlayer.config.ts":"contentlayer","contentlayer.config.mts":"contentlayer","contentlayer.config.cts":"contentlayer",".phpunit.result.cache":"phpunit",".phpunit-watcher.yml":"phpunit","phpunit.xml":"phpunit","phpunit.xml.dist":"phpunit","phpunit-watcher.yml":"phpunit","phpunit-watcher.yml.dist":"phpunit",".php_cs":"php-cs-fixer",".php_cs.dist":"php-cs-fixer",".php_cs.php":"php-cs-fixer",".php_cs.dist.php":"php-cs-fixer",".php-cs-fixer.php":"php-cs-fixer",".php-cs-fixer.dist.php":"php-cs-fixer","robots.txt":"robots","tsconfig.json":"tsconfig","tsconfig.app.json":"tsconfig","tsconfig.editor.json":"tsconfig","tsconfig.spec.json":"tsconfig","tsconfig.base.json":"tsconfig","tsconfig.build.json":"tsconfig","tsconfig.eslint.json":"tsconfig","tsconfig.lib.json":"tsconfig","tsconfig.lib.prod.json":"tsconfig","tsconfig.node.json":"tsconfig","tsconfig.test.json":"tsconfig","tsconfig.e2e.json":"tsconfig","tsconfig.web.json":"tsconfig","tsconfig.webworker.json":"tsconfig","tsconfig.worker.json":"tsconfig","tsconfig.config.json":"tsconfig","tsconfig.vitest.json":"tsconfig","tsconfig.cjs.json":"tsconfig","tsconfig.esm.json":"tsconfig","tsconfig.mjs.json":"tsconfig","tsconfig.doc.json":"tsconfig","tsconfig.paths.json":"tsconfig","tsconfig.main.json":"tsconfig","tsconfig.renderer.json":"tsconfig","tsconfig.server.json":"tsconfig","tsconfig.client.json":"tsconfig","tsconfig.declaration.json":"tsconfig","tsconfig.dev.json":"tsconfig","tsconfig.prod.json":"tsconfig","tauri.conf.json":"tauri","tauri.config.json":"tauri","tauri.linux.conf.json":"tauri","tauri.windows.conf.json":"tauri","tauri.macos.conf.json":"tauri",".taurignore":"tauri","jsconfig.json":"jsconfig","maven.config":"maven","jvm.config":"maven","pom.xml":"maven","serverless.yml":"serverless","serverless.yaml":"serverless","serverless.json":"serverless","serverless.js":"serverless","serverless.ts":"serverless","supabase.js":"supabase","supabase.ts":"supabase","supabase.py":"supabase",".ember-cli":"ember",".ember-cli.js":"ember","ember-cli-builds.js":"ember","horusec-config.json":"horusec","poetry.lock":"poetry","pdm.lock":"pdm","pdm.toml":"pdm",".pdm-python":"pdm",".parcelrc":"parcel",".astylerc":"astyle",".lighthouserc.js":"lighthouse","lighthouserc.js":"lighthouse",".lighthouserc.cjs":"lighthouse","lighthouserc.cjs":"lighthouse",".lighthouserc.json":"lighthouse","lighthouserc.json":"lighthouse",".lighthouserc.yml":"lighthouse","lighthouserc.yml":"lighthouse",".lighthouserc.yaml":"lighthouse","lighthouserc.yaml":"lighthouse",".svgrrc":"svgr",".svgrrc.json":"svgr",".svgrrc.jsonc":"svgr",".svgrrc.json5":"svgr",".svgrrc.yaml":"svgr",".svgrrc.yml":"svgr",".svgrrc.toml":"svgr",".svgrrc.js":"svgr",".svgrrc.mjs":"svgr",".svgrrc.cjs":"svgr",".svgrrc.ts":"svgr",".svgrrc.mts":"svgr",".svgrrc.cts":"svgr",".config/svgrrc":"svgr",".config/svgrrc.json":"svgr",".config/svgrrc.jsonc":"svgr",".config/svgrrc.json5":"svgr",".config/svgrrc.yaml":"svgr",".config/svgrrc.yml":"svgr",".config/svgrrc.toml":"svgr",".config/svgrrc.js":"svgr",".config/svgrrc.mjs":"svgr",".config/svgrrc.cjs":"svgr",".config/svgrrc.ts":"svgr",".config/svgrrc.mts":"svgr",".config/svgrrc.cts":"svgr","svgr.config.json":"svgr","svgr.config.jsonc":"svgr","svgr.config.json5":"svgr","svgr.config.yaml":"svgr","svgr.config.yml":"svgr","svgr.config.toml":"svgr","svgr.config.js":"svgr","svgr.config.mjs":"svgr","svgr.config.cjs":"svgr","svgr.config.ts":"svgr","svgr.config.mts":"svgr","svgr.config.cts":"svgr","rome.json":"rome","cypress.config.js":"cypress","cypress.config.mjs":"cypress","cypress.config.cjs":"cypress","cypress.config.ts":"cypress","cypress.config.mts":"cypress","cypress.config.cts":"cypress","cypress.json":"cypress","cypress.env.json":"cypress","plopfile.js":"plop","plopfile.cjs":"plop","plopfile.mjs":"plop","plopfile.ts":"plop",".tobimake":"tobimake","gleam.toml":"gleam","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm",".pnpmfile.cjs":"pnpm","gridsome.config.js":"gridsome","gridsome.server.js":"gridsome",".steadybit.yml":"steadybit","steadybit.yml":"steadybit",".steadybit.yaml":"steadybit","steadybit.yaml":"steadybit","Caddyfile":"caddy","openapi.json":"openapi","openapi.yml":"openapi","openapi.yaml":"openapi","swagger.json":"swagger","swagger.yml":"swagger","swagger.yaml":"swagger","bun.lockb":"bun","bunfig.toml":"bun",".bun-version":"bun","bun.lock":"bun",".nano-staged.js":"nano-staged","nano-staged.js":"nano-staged",".nano-staged.cjs":"nano-staged","nano-staged.cjs":"nano-staged",".nano-staged.mjs":"nano-staged","nano-staged.mjs":"nano-staged",".nano-staged.json":"nano-staged","nano-staged.json":"nano-staged",".nanostagedrc":"nano-staged","knip.json":"knip","knip.jsonc":"knip",".knip.json":"knip",".knip.jsonc":"knip","knip.ts":"knip","knip.js":"knip","knip.config.ts":"knip","knip.config.js":"knip","taskfile.yml":"taskfile","taskfile.yaml":"taskfile","taskfile.dist.yml":"taskfile","taskfile.dist.yaml":"taskfile",".taskrc.yml":"taskfile",".taskrc.yaml":"taskfile",".cracorc":"craco",".cracorc.json":"craco",".cracorc.jsonc":"craco",".cracorc.json5":"craco",".cracorc.yaml":"craco",".cracorc.yml":"craco",".cracorc.toml":"craco",".cracorc.js":"craco",".cracorc.mjs":"craco",".cracorc.cjs":"craco",".cracorc.ts":"craco",".cracorc.mts":"craco",".cracorc.cts":"craco",".config/cracorc":"craco",".config/cracorc.json":"craco",".config/cracorc.jsonc":"craco",".config/cracorc.json5":"craco",".config/cracorc.yaml":"craco",".config/cracorc.yml":"craco",".config/cracorc.toml":"craco",".config/cracorc.js":"craco",".config/cracorc.mjs":"craco",".config/cracorc.cjs":"craco",".config/cracorc.ts":"craco",".config/cracorc.mts":"craco",".config/cracorc.cts":"craco","craco.config.json":"craco","craco.config.jsonc":"craco","craco.config.json5":"craco","craco.config.yaml":"craco","craco.config.yml":"craco","craco.config.toml":"craco","craco.config.js":"craco","craco.config.mjs":"craco","craco.config.cjs":"craco","craco.config.ts":"craco","craco.config.mts":"craco","craco.config.cts":"craco",".hg":"mercurial",".hgignore":"mercurial",".hgflow":"mercurial",".hgtags":"mercurial",".hgrc":"mercurial","hgrc":"mercurial","mercurial.ini":"mercurial","deno.json":"deno","deno.jsonc":"deno","deno.lock":"deno","plastic.branchexplorer":"plastic","plastic.selector":"plastic","plastic.wktree":"plastic","plastic.workspace":"plastic","plastic.workspaces":"plastic","typst.toml":"typst","uno.config.js":"unocss","uno.config.mjs":"unocss","uno.config.ts":"unocss","uno.config.mts":"unocss","unocss.config.js":"unocss","unocss.config.mjs":"unocss","unocss.config.ts":"unocss","unocss.config.mts":"unocss",".mincloudrc":"ifanr-cloud",".qa-mincloudrc":"ifanr-cloud","concourse.yml":"concourse",".syncpackrc":"syncpack",".syncpackrc.json":"syncpack",".syncpackrc.jsonc":"syncpack",".syncpackrc.json5":"syncpack",".syncpackrc.yaml":"syncpack",".syncpackrc.yml":"syncpack",".syncpackrc.toml":"syncpack",".syncpackrc.js":"syncpack",".syncpackrc.mjs":"syncpack",".syncpackrc.cjs":"syncpack",".syncpackrc.ts":"syncpack",".syncpackrc.mts":"syncpack",".syncpackrc.cts":"syncpack",".config/syncpackrc":"syncpack",".config/syncpackrc.json":"syncpack",".config/syncpackrc.jsonc":"syncpack",".config/syncpackrc.json5":"syncpack",".config/syncpackrc.yaml":"syncpack",".config/syncpackrc.yml":"syncpack",".config/syncpackrc.toml":"syncpack",".config/syncpackrc.js":"syncpack",".config/syncpackrc.mjs":"syncpack",".config/syncpackrc.cjs":"syncpack",".config/syncpackrc.ts":"syncpack",".config/syncpackrc.mts":"syncpack",".config/syncpackrc.cts":"syncpack","syncpack.config.json":"syncpack","syncpack.config.jsonc":"syncpack","syncpack.config.json5":"syncpack","syncpack.config.yaml":"syncpack","syncpack.config.yml":"syncpack","syncpack.config.toml":"syncpack","syncpack.config.js":"syncpack","syncpack.config.mjs":"syncpack","syncpack.config.cjs":"syncpack","syncpack.config.ts":"syncpack","syncpack.config.mts":"syncpack","syncpack.config.cts":"syncpack","werf.yaml":"werf","werf.yml":"werf","werf-giterminism.yaml":"werf","werf-giterminism.yml":"werf","werf-includes.lock":"werf","werf-includes.yaml":"werf","werf-includes.yml":"werf",".luaurc":"luau","wally.toml":"wally","panda.config.js":"panda","panda.config.mjs":"panda","panda.config.cjs":"panda","panda.config.ts":"panda","panda.config.mts":"panda","panda.config.cts":"panda","biome.json":"biome","biome.jsonc":"biome",".biome.json":"biome",".biome.jsonc":"biome","esbuild.js":"esbuild","esbuild.mjs":"esbuild","esbuild.cjs":"esbuild","esbuild.ts":"esbuild","esbuild.mts":"esbuild","esbuild.cts":"esbuild","esbuild.config.js":"esbuild","esbuild.config.mjs":"esbuild","esbuild.config.cjs":"esbuild","esbuild.config.ts":"esbuild","esbuild.config.mts":"esbuild","esbuild.config.cts":"esbuild","esbuild.dev.js":"esbuild","esbuild.dev.mjs":"esbuild","esbuild.dev.cjs":"esbuild","esbuild.dev.ts":"esbuild","esbuild.dev.mts":"esbuild","esbuild.dev.cts":"esbuild","esbuild.stage.js":"esbuild","esbuild.stage.mjs":"esbuild","esbuild.stage.cjs":"esbuild","esbuild.stage.ts":"esbuild","esbuild.stage.mts":"esbuild","esbuild.stage.cts":"esbuild","esbuild.prod.js":"esbuild","esbuild.prod.mjs":"esbuild","esbuild.prod.cjs":"esbuild","esbuild.prod.ts":"esbuild","esbuild.prod.mts":"esbuild","esbuild.prod.cts":"esbuild","esbuild.test.js":"esbuild","esbuild.test.mjs":"esbuild","esbuild.test.cjs":"esbuild","esbuild.test.ts":"esbuild","esbuild.test.mts":"esbuild","esbuild.test.cts":"esbuild","drizzle.config.ts":"drizzle","drizzle.config.dev.ts":"drizzle","drizzle.config.prod.ts":"drizzle","drizzle.config.js":"drizzle","drizzle.config.dev.js":"drizzle","drizzle.config.prod.js":"drizzle","drizzle.config.json":"drizzle","drizzle.config.dev.json":"drizzle","drizzle.config.prod.json":"drizzle",".puppeteerrc":"puppeteer",".puppeteerrc.json":"puppeteer",".puppeteerrc.jsonc":"puppeteer",".puppeteerrc.json5":"puppeteer",".puppeteerrc.yaml":"puppeteer",".puppeteerrc.yml":"puppeteer",".puppeteerrc.toml":"puppeteer",".puppeteerrc.js":"puppeteer",".puppeteerrc.mjs":"puppeteer",".puppeteerrc.cjs":"puppeteer",".puppeteerrc.ts":"puppeteer",".puppeteerrc.mts":"puppeteer",".puppeteerrc.cts":"puppeteer",".config/puppeteerrc":"puppeteer",".config/puppeteerrc.json":"puppeteer",".config/puppeteerrc.jsonc":"puppeteer",".config/puppeteerrc.json5":"puppeteer",".config/puppeteerrc.yaml":"puppeteer",".config/puppeteerrc.yml":"puppeteer",".config/puppeteerrc.toml":"puppeteer",".config/puppeteerrc.js":"puppeteer",".config/puppeteerrc.mjs":"puppeteer",".config/puppeteerrc.cjs":"puppeteer",".config/puppeteerrc.ts":"puppeteer",".config/puppeteerrc.mts":"puppeteer",".config/puppeteerrc.cts":"puppeteer","puppeteer.config.json":"puppeteer","puppeteer.config.jsonc":"puppeteer","puppeteer.config.json5":"puppeteer","puppeteer.config.yaml":"puppeteer","puppeteer.config.yml":"puppeteer","puppeteer.config.toml":"puppeteer","puppeteer.config.js":"puppeteer","puppeteer.config.mjs":"puppeteer","puppeteer.config.cjs":"puppeteer","puppeteer.config.ts":"puppeteer","puppeteer.config.mts":"puppeteer","puppeteer.config.cts":"puppeteer","garden.yml":"garden","garden.yaml":"garden","project.garden.yml":"garden","project.garden.yaml":"garden",".gardenignore":"garden","PklProject":"pkl","PklProject.deps.json":"pkl","k8s.yml":"kubernetes","k8s.yaml":"kubernetes","kubernetes.yml":"kubernetes","kubernetes.yaml":"kubernetes",".k8s.yml":"kubernetes",".k8s.yaml":"kubernetes","phpstan.neon":"phpstan","phpstan.neon.dist":"phpstan","phpstan.dist.neon":"phpstan","screwdriver.yaml":"screwdriver","screwdriver.yml":"screwdriver","snapcraft.yaml":"snapcraft","snapcraft.yml":"snapcraft",".devcontainer/devcontainer.json":"container",".devcontainer/devcontainer-lock.json":"container","kcl.mod":"kcl","kcl.yaml":"kcl","kcl.yml":"kcl",".clangd":"clangd",".markdownlint.json":"markdownlint",".markdownlint.jsonc":"markdownlint",".markdownlint.yaml":"markdownlint",".markdownlint.yml":"markdownlint",".markdownlint-cli2.jsonc":"markdownlint",".markdownlint-cli2.yaml":"markdownlint",".markdownlint-cli2.cjs":"markdownlint",".markdownlint-cli2.mjs":"markdownlint",".markdownlintignore":"markdownlint","trigger.config.js":"trigger","trigger.config.mjs":"trigger","trigger.config.cjs":"trigger","trigger.config.ts":"trigger","trigger.config.mts":"trigger","trigger.config.cts":"trigger",".deepsource.toml":"deepsource","jsr.json":"jsr","jsr.jsonc":"jsr",".coderabbit.yml":"coderabbit-ai",".coderabbit.yaml":"coderabbit-ai",".aiexclude":"gemini-ai","GEMINI.md":"gemini-ai","taze.config.js":"taze","taze.config.mjs":"taze","taze.config.cjs":"taze","taze.config.ts":"taze","taze.config.mts":"taze","taze.config.cts":"taze",".tazerc":"taze",".tazerc.json":"taze","wxt.config.js":"wxt","wxt.config.mjs":"wxt","wxt.config.cjs":"wxt","wxt.config.ts":"wxt","wxt.config.mts":"wxt","wxt.config.cts":"wxt",".lefthook-local.json":"lefthook",".lefthook-local.toml":"lefthook",".lefthook-local.yaml":"lefthook",".lefthook-local.yml":"lefthook",".lefthook.json":"lefthook",".lefthook.toml":"lefthook",".lefthook.yaml":"lefthook",".lefthook.yml":"lefthook",".lefthookrc":"lefthook","lefthook-local.json":"lefthook","lefthook-local.toml":"lefthook","lefthook-local.yaml":"lefthook","lefthook-local.yml":"lefthook","lefthook.json":"lefthook","lefthook.toml":"lefthook","lefthook.yaml":"lefthook","lefthook.yml":"lefthook","lefthookrc":"lefthook",".github/labeler.yml":"label",".github/labeler.yaml":"label","tags":"label","zeabur.json":"zeabur","zeabur.jsonc":"zeabur","zeabur.json5":"zeabur","zeabur.yaml":"zeabur","zeabur.yml":"zeabur","zeabur.toml":"zeabur","copilot-instructions.md":"copilot",".copilotignore":"copilot",".pre-commit-config.yaml":"pre-commit",".pre-commit-hooks.yaml":"pre-commit",".lintstagedrc":"lintstaged",".lintstagedrc.json":"lintstaged",".lintstagedrc.yaml":"lintstaged",".lintstagedrc.yml":"lintstaged",".lintstagedrc.mjs":"lintstaged",".lintstagedrc.cjs":"lintstaged","lint-staged.config.ts":"lintstaged","lint-staged.config.mjs":"lintstaged","lint-staged.config.cjs":"lintstaged","lint-staged.config.js":"lintstaged",".lintstagedrc.js":"lintstaged","histoire.config.js":"histoire","histoire.config.mjs":"histoire","histoire.config.cjs":"histoire","histoire.config.ts":"histoire","histoire.config.mts":"histoire","histoire.config.cts":"histoire",".histoire.js":"histoire",".histoire.mjs":"histoire",".histoire.cjs":"histoire",".histoire.ts":"histoire",".histoire.mts":"histoire",".histoire.cts":"histoire","install":"installation","installation":"installation",".github/FUNDING.yml":"github-sponsors","fabric.mod.json":"minecraft-fabric",".umirc.js":"umi",".umirc.mjs":"umi",".umirc.cjs":"umi",".umirc.ts":"umi",".umirc.mts":"umi",".umirc.cts":"umi","ecosystem.config.js":"pm2-ecosystem","ecosystem.config.mjs":"pm2-ecosystem","ecosystem.config.cjs":"pm2-ecosystem","ecosystem.config.ts":"pm2-ecosystem","ecosystem.config.mts":"pm2-ecosystem","ecosystem.config.cts":"pm2-ecosystem","hosts":"hosts","citation.cff":"citation","xmake.lua":"xmake","xmake":"xmake","wrangler.toml":"wrangler","wrangler.json":"wrangler","wrangler.jsonc":"wrangler",".clinerules":"cline",".packshiprc":"packship",".packshiprc.json":"packship",".packshiprc.js":"packship",".packshiprc.ts":"packship","packship.config.js":"packship","packship.config.ts":"packship","packship.config.mjs":"packship","packship.config.mts":"packship","packship.config.json":"packship","Snakefile":"snakemake",".hadolint.yaml":"hadolint",".hadolint.yml":"hadolint","hadolint.yaml":"hadolint","hadolint.yml":"hadolint","tsdoc.json":"tsdoc",".oxlintrc.json":"oxc",".oxlintrc.jsonc":"oxc",".oxfmtrc.json":"oxc",".oxfmtrc.jsonc":"oxc","oxlint.config.ts":"oxc","oxfmt.config.ts":"oxc","CLAUDE.md":"claude","CLAUDE.local.md":"claude",".cursorignore":"cursor",".cursorindexingignore":"cursor",".cursorrules":"cursor",".cursor":"cursor",".cursor.json":"cursor",".cursorrc":"cursor","metro.config.js":"metro","metro.config.cjs":"metro","metro.config.mjs":"metro","metro.config.json":"metro","metro.config.ts":"metro","metro.config.cts":"metro","metro.config.mts":"metro","src/bashly.yaml":"bashly","src/bashly.yml":"bashly","bashly-settings.yaml":"bashly-settings","bashly-settings.yml":"bashly-settings","src/bashly-strings.yaml":"bashly-strings","src/bashly-strings.yml":"bashly-strings","google-services.json":"google","GoogleService-Info.plist":"google",".shellcheckrc":"shellcheck","shellcheckrc":"shellcheck","warp.md":"warp","skill.md":"skill","instructions.md":"instructions","instruction.md":"instructions","tsdown.config.ts":"tsdown","tsdown.config.mts":"tsdown","tsdown.config.cts":"tsdown","tsdown.config.js":"tsdown","tsdown.config.mjs":"tsdown","tsdown.config.cjs":"tsdown","tsdown.config.json":"tsdown","tsdown.config":"tsdown","appwrite.json":"appwrite","appwrite.js":"appwrite","appwrite.ts":"appwrite","eas.json":"expo",".easignore":"expo","agents.md":"agent","zizmor.yml":"zizmor","zizmor.yaml":"zizmor"}`),oW={fileExtensions:{blink:`blink_light`,jinja:`jinja_light`,jinja2:`jinja_light`,j2:`jinja_light`,"jinja-html":`jinja_light`,toml:`toml_light`,tosd:`toml_light`,tofu:`opentofu_light`,huff:`huff_light`,cr:`crystal_light`,ecr:`crystal_light`,"drone.yml":`drone_light`,".wakatime-project":`wakatime_light`,hcl:`hcl_light`,ai:`adobe-illustrator_light`,ait:`adobe-illustrator_light`,psd:`adobe-photoshop_light`,psb:`adobe-photoshop_light`,psdt:`adobe-photoshop_light`,iuml:`uml_light`,pu:`uml_light`,puml:`uml_light`,plantuml:`uml_light`,wsd:`uml_light`,pgn:`chess_light`,fen:`chess_light`,"openapi.json":`openapi_light`,"openapi.yml":`openapi_light`,"openapi.yaml":`openapi_light`,tldr:`tldraw_light`,verse:`verse_light`,zeabur:`zeabur_light`},fileNames:{sconstruct:`scons_light`,sconscript:`scons_light`,scsub:`scons_light`,".rubocop.yml":`rubocop_light`,".rubocop-todo.yml":`rubocop_light`,".rubocop_todo.yml":`rubocop_light`,"vercel.json":`vercel_light`,"vercel.ts":`vercel_light`,".vercelignore":`vercel_light`,"now.json":`vercel_light`,".nowignore":`vercel_light`,"payload.config.js":`payload_light`,"payload.config.mjs":`payload_light`,"payload.config.ts":`payload_light`,"payload.config.mts":`payload_light`,"next.config.js":`next_light`,"next.config.mjs":`next_light`,"next.config.ts":`next_light`,"next.config.mts":`next_light`,"remix.config.js":`remix_light`,"remix.config.ts":`remix_light`,"turbo.json":`turborepo_light`,"turbo.jsonc":`turborepo_light`,".autorc":`auto_light`,"auto.config.js":`auto_light`,"auto.config.ts":`auto_light`,"auto-config.json":`auto_light`,"auto-config.yaml":`auto_light`,"auto-config.yml":`auto_light`,"auto-config.ts":`auto_light`,"auto-config.js":`auto_light`,".stylelintrc":`stylelint_light`,".stylelintrc.json":`stylelint_light`,".stylelintrc.jsonc":`stylelint_light`,".stylelintrc.json5":`stylelint_light`,".stylelintrc.yaml":`stylelint_light`,".stylelintrc.yml":`stylelint_light`,".stylelintrc.toml":`stylelint_light`,".stylelintrc.js":`stylelint_light`,".stylelintrc.mjs":`stylelint_light`,".stylelintrc.cjs":`stylelint_light`,".stylelintrc.ts":`stylelint_light`,".stylelintrc.mts":`stylelint_light`,".stylelintrc.cts":`stylelint_light`,".config/stylelintrc":`stylelint_light`,".config/stylelintrc.json":`stylelint_light`,".config/stylelintrc.jsonc":`stylelint_light`,".config/stylelintrc.json5":`stylelint_light`,".config/stylelintrc.yaml":`stylelint_light`,".config/stylelintrc.yml":`stylelint_light`,".config/stylelintrc.toml":`stylelint_light`,".config/stylelintrc.js":`stylelint_light`,".config/stylelintrc.mjs":`stylelint_light`,".config/stylelintrc.cjs":`stylelint_light`,".config/stylelintrc.ts":`stylelint_light`,".config/stylelintrc.mts":`stylelint_light`,".config/stylelintrc.cts":`stylelint_light`,"stylelint.config.json":`stylelint_light`,"stylelint.config.jsonc":`stylelint_light`,"stylelint.config.json5":`stylelint_light`,"stylelint.config.yaml":`stylelint_light`,"stylelint.config.yml":`stylelint_light`,"stylelint.config.toml":`stylelint_light`,"stylelint.config.js":`stylelint_light`,"stylelint.config.mjs":`stylelint_light`,"stylelint.config.cjs":`stylelint_light`,"stylelint.config.ts":`stylelint_light`,"stylelint.config.mts":`stylelint_light`,"stylelint.config.cts":`stylelint_light`,".stylelintignore":`stylelint_light`,".stylelintcache":`stylelint_light`,".codeclimate.yml":`code-climate_light`,browserslist:`browserlist_light`,".browserslistrc":`browserlist_light`,".drone.yml":`drone_light`,"opencode.json":`opencode_light`,"opencode.jsonc":`opencode_light`,".wakatime-project":`wakatime_light`,"circle.yml":`circleci_light`,".releaserc":`semantic-release_light`,".releaserc.json":`semantic-release_light`,".releaserc.jsonc":`semantic-release_light`,".releaserc.json5":`semantic-release_light`,".releaserc.yaml":`semantic-release_light`,".releaserc.yml":`semantic-release_light`,".releaserc.toml":`semantic-release_light`,".releaserc.js":`semantic-release_light`,".releaserc.mjs":`semantic-release_light`,".releaserc.cjs":`semantic-release_light`,".releaserc.ts":`semantic-release_light`,".releaserc.mts":`semantic-release_light`,".releaserc.cts":`semantic-release_light`,".config/releaserc":`semantic-release_light`,".config/releaserc.json":`semantic-release_light`,".config/releaserc.jsonc":`semantic-release_light`,".config/releaserc.json5":`semantic-release_light`,".config/releaserc.yaml":`semantic-release_light`,".config/releaserc.yml":`semantic-release_light`,".config/releaserc.toml":`semantic-release_light`,".config/releaserc.js":`semantic-release_light`,".config/releaserc.mjs":`semantic-release_light`,".config/releaserc.cjs":`semantic-release_light`,".config/releaserc.ts":`semantic-release_light`,".config/releaserc.mts":`semantic-release_light`,".config/releaserc.cts":`semantic-release_light`,"release.config.json":`semantic-release_light`,"release.config.jsonc":`semantic-release_light`,"release.config.json5":`semantic-release_light`,"release.config.yaml":`semantic-release_light`,"release.config.yml":`semantic-release_light`,"release.config.toml":`semantic-release_light`,"release.config.js":`semantic-release_light`,"release.config.mjs":`semantic-release_light`,"release.config.cjs":`semantic-release_light`,"release.config.ts":`semantic-release_light`,"release.config.mts":`semantic-release_light`,"release.config.cts":`semantic-release_light`,"netlify.json":`netlify_light`,"netlify.yml":`netlify_light`,"netlify.yaml":`netlify_light`,"netlify.toml":`netlify_light`,"stitches.config.js":`stitches_light`,"stitches.config.ts":`stitches_light`,"snowpack.config.js":`snowpack_light`,"snowpack.config.cjs":`snowpack_light`,"snowpack.config.mjs":`snowpack_light`,"snowpack.config.ts":`snowpack_light`,"snowpack.config.cts":`snowpack_light`,"snowpack.config.mts":`snowpack_light`,"snowpack.deps.json":`snowpack_light`,"snowpack.config.json":`snowpack_light`,"pnpm-lock.yaml":`pnpm_light`,"pnpm-workspace.yaml":`pnpm_light`,".pnpmfile.cjs":`pnpm_light`,"openapi.json":`openapi_light`,"openapi.yml":`openapi_light`,"openapi.yaml":`openapi_light`,"bun.lockb":`bun_light`,"bunfig.toml":`bun_light`,".bun-version":`bun_light`,"bun.lock":`bun_light`,".nano-staged.js":`nano-staged_light`,"nano-staged.js":`nano-staged_light`,".nano-staged.cjs":`nano-staged_light`,"nano-staged.cjs":`nano-staged_light`,".nano-staged.mjs":`nano-staged_light`,"nano-staged.mjs":`nano-staged_light`,".nano-staged.json":`nano-staged_light`,"nano-staged.json":`nano-staged_light`,".nanostagedrc":`nano-staged_light`,"deno.json":`deno_light`,"deno.jsonc":`deno_light`,"deno.lock":`deno_light`,"jsr.json":`jsr_light`,"jsr.jsonc":`jsr_light`,"zeabur.json":`zeabur_light`,"zeabur.jsonc":`zeabur_light`,"zeabur.json5":`zeabur_light`,"zeabur.yaml":`zeabur_light`,"zeabur.yml":`zeabur_light`,"zeabur.toml":`zeabur_light`,"copilot-instructions.md":`copilot_light`,".copilotignore":`copilot_light`,hosts:`hosts_light`,".cursorignore":`cursor_light`,".cursorindexingignore":`cursor_light`,".cursorrules":`cursor_light`,".cursor":`cursor_light`,".cursor.json":`cursor_light`,".cursorrc":`cursor_light`,"bashly-settings.yaml":`bashly-settings_light`,"bashly-settings.yml":`bashly-settings_light`,"src/bashly-strings.yaml":`bashly-strings_light`,"src/bashly-strings.yml":`bashly-strings_light`,".shellcheckrc":`shellcheck_light`,shellcheckrc:`shellcheck_light`,"warp.md":`warp_light`,"eas.json":`expo_light`,".easignore":`expo_light`},languageIds:{toml:`toml_light`,"systemd-conf":`systemd_light`,"systemd-unit-file":`systemd_light`},folderNames:{jinja:`folder-jinja_light`,".jinja":`folder-jinja_light`,_jinja:`folder-jinja_light`,"-jinja":`folder-jinja_light`,__jinja__:`folder-jinja_light`,jinja2:`folder-jinja_light`,".jinja2":`folder-jinja_light`,_jinja2:`folder-jinja_light`,"-jinja2":`folder-jinja_light`,__jinja2__:`folder-jinja_light`,j2:`folder-jinja_light`,".j2":`folder-jinja_light`,_j2:`folder-jinja_light`,"-j2":`folder-jinja_light`,__j2__:`folder-jinja_light`,idea:`folder-intellij_light`,".idea":`folder-intellij_light`,_idea:`folder-intellij_light`,"-idea":`folder-intellij_light`,__idea__:`folder-intellij_light`,cursor:`folder-cursor_light`,".cursor":`folder-cursor_light`,_cursor:`folder-cursor_light`,"-cursor":`folder-cursor_light`,__cursor__:`folder-cursor_light`},folderNamesExpanded:{jinja:`folder-jinja-open_light`,".jinja":`folder-jinja-open_light`,_jinja:`folder-jinja-open_light`,"-jinja":`folder-jinja-open_light`,__jinja__:`folder-jinja-open_light`,jinja2:`folder-jinja-open_light`,".jinja2":`folder-jinja-open_light`,_jinja2:`folder-jinja-open_light`,"-jinja2":`folder-jinja-open_light`,__jinja2__:`folder-jinja-open_light`,j2:`folder-jinja-open_light`,".j2":`folder-jinja-open_light`,_j2:`folder-jinja-open_light`,"-j2":`folder-jinja-open_light`,__j2__:`folder-jinja-open_light`,idea:`folder-intellij-open_light`,".idea":`folder-intellij-open_light`,_idea:`folder-intellij-open_light`,"-idea":`folder-intellij-open_light`,__idea__:`folder-intellij-open_light`,cursor:`folder-cursor-open_light`,".cursor":`folder-cursor-open_light`,_cursor:`folder-cursor-open_light`,"-cursor":`folder-cursor-open_light`,__cursor__:`folder-cursor-open_light`},rootFolderNames:{},rootFolderNamesExpanded:{}};function sW(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function cW(e,t){let n=e.replaceAll(`\\`,`/`).toLowerCase().split(`/`),r=n.at(-1)??``,i=t===`light`?oW.fileNames:{},a=t===`light`?oW.fileExtensions:{},o;for(let e=0;e<n.length&&!o;e++){let t=n.slice(e).join(`/`);o=sW(i,t)??sW(aW,t)}for(let e=r.indexOf(`.`);e!==-1&&!o;e=r.indexOf(`.`,e+1)){let t=r.slice(e+1);o=sW(a,t)??sW(iW,t)}return rW[o??`file`]?.iconPath.split(`/`).at(-1)??`file.svg`}var lW=Object.assign({"/node_modules/material-icon-theme/icons/3d.svg":jte,"/node_modules/material-icon-theme/icons/abap.svg":Mte,"/node_modules/material-icon-theme/icons/abc.svg":Nte,"/node_modules/material-icon-theme/icons/actionscript.svg":Pte,"/node_modules/material-icon-theme/icons/ada.svg":Fte,"/node_modules/material-icon-theme/icons/adobe-illustrator.svg":Ite,"/node_modules/material-icon-theme/icons/adobe-illustrator_light.svg":Lte,"/node_modules/material-icon-theme/icons/adobe-photoshop.svg":Rte,"/node_modules/material-icon-theme/icons/adobe-photoshop_light.svg":zte,"/node_modules/material-icon-theme/icons/adobe-swc.svg":Bte,"/node_modules/material-icon-theme/icons/adonis.svg":Vte,"/node_modules/material-icon-theme/icons/advpl-include.clone.svg":Hte,"/node_modules/material-icon-theme/icons/advpl-ptm.clone.svg":Ute,"/node_modules/material-icon-theme/icons/advpl-tlpp.clone.svg":Wte,"/node_modules/material-icon-theme/icons/advpl.svg":Gte,"/node_modules/material-icon-theme/icons/agent.svg":Kte,"/node_modules/material-icon-theme/icons/ahk2.clone.svg":qte,"/node_modules/material-icon-theme/icons/amplify.svg":Jte,"/node_modules/material-icon-theme/icons/android.svg":Yte,"/node_modules/material-icon-theme/icons/angular-component.clone.svg":Xte,"/node_modules/material-icon-theme/icons/angular-directive.clone.svg":Zte,"/node_modules/material-icon-theme/icons/angular-guard.clone.svg":Qte,"/node_modules/material-icon-theme/icons/angular-interceptor.clone.svg":$te,"/node_modules/material-icon-theme/icons/angular-pipe.clone.svg":ene,"/node_modules/material-icon-theme/icons/angular-resolver.clone.svg":tne,"/node_modules/material-icon-theme/icons/angular-service.clone.svg":nne,"/node_modules/material-icon-theme/icons/angular.svg":rne,"/node_modules/material-icon-theme/icons/antlr.svg":ine,"/node_modules/material-icon-theme/icons/apiblueprint.svg":ane,"/node_modules/material-icon-theme/icons/apollo.svg":one,"/node_modules/material-icon-theme/icons/applescript.svg":sne,"/node_modules/material-icon-theme/icons/apps-script.svg":cne,"/node_modules/material-icon-theme/icons/appveyor.svg":lne,"/node_modules/material-icon-theme/icons/appwrite.svg":une,"/node_modules/material-icon-theme/icons/architecture.svg":dne,"/node_modules/material-icon-theme/icons/arduino.svg":fne,"/node_modules/material-icon-theme/icons/asciidoc.svg":pne,"/node_modules/material-icon-theme/icons/assembly.svg":mne,"/node_modules/material-icon-theme/icons/astro-config.svg":hne,"/node_modules/material-icon-theme/icons/astro.svg":gne,"/node_modules/material-icon-theme/icons/astyle.svg":_ne,"/node_modules/material-icon-theme/icons/audio.svg":vne,"/node_modules/material-icon-theme/icons/aurelia.svg":yne,"/node_modules/material-icon-theme/icons/authors.svg":bne,"/node_modules/material-icon-theme/icons/auto.svg":xne,"/node_modules/material-icon-theme/icons/auto_light.svg":Sne,"/node_modules/material-icon-theme/icons/autohotkey.svg":Cne,"/node_modules/material-icon-theme/icons/autoit.svg":wne,"/node_modules/material-icon-theme/icons/azure-pipelines.svg":Tne,"/node_modules/material-icon-theme/icons/azure.svg":Ene,"/node_modules/material-icon-theme/icons/babel.svg":Dne,"/node_modules/material-icon-theme/icons/ballerina.svg":One,"/node_modules/material-icon-theme/icons/bashly-hook.svg":kne,"/node_modules/material-icon-theme/icons/bashly-settings.clone.svg":Ane,"/node_modules/material-icon-theme/icons/bashly-settings_light.clone.svg":jne,"/node_modules/material-icon-theme/icons/bashly-strings.clone.svg":Mne,"/node_modules/material-icon-theme/icons/bashly-strings_light.clone.svg":Nne,"/node_modules/material-icon-theme/icons/bashly.svg":Pne,"/node_modules/material-icon-theme/icons/bazel.svg":Fne,"/node_modules/material-icon-theme/icons/bbx.svg":Ine,"/node_modules/material-icon-theme/icons/beancount.svg":Lne,"/node_modules/material-icon-theme/icons/bench-js.svg":Rne,"/node_modules/material-icon-theme/icons/bench-jsx.svg":zne,"/node_modules/material-icon-theme/icons/bench-ts.svg":Bne,"/node_modules/material-icon-theme/icons/bibliography.svg":Vne,"/node_modules/material-icon-theme/icons/bibtex-style.svg":Hne,"/node_modules/material-icon-theme/icons/bicep.svg":Une,"/node_modules/material-icon-theme/icons/biome.svg":Wne,"/node_modules/material-icon-theme/icons/bitbucket.svg":Gne,"/node_modules/material-icon-theme/icons/bithound.svg":Kne,"/node_modules/material-icon-theme/icons/blender.svg":qne,"/node_modules/material-icon-theme/icons/blink.svg":Jne,"/node_modules/material-icon-theme/icons/blink_light.svg":Yne,"/node_modules/material-icon-theme/icons/blitz.svg":Xne,"/node_modules/material-icon-theme/icons/bower.svg":Zne,"/node_modules/material-icon-theme/icons/brainfuck.svg":Qne,"/node_modules/material-icon-theme/icons/browserlist.svg":ZM,"/node_modules/material-icon-theme/icons/browserlist_light.svg":QM,"/node_modules/material-icon-theme/icons/bruno.svg":$M,"/node_modules/material-icon-theme/icons/buck.svg":eN,"/node_modules/material-icon-theme/icons/bucklescript.svg":tN,"/node_modules/material-icon-theme/icons/buildkite.svg":nN,"/node_modules/material-icon-theme/icons/bun.svg":rN,"/node_modules/material-icon-theme/icons/bun_light.svg":iN,"/node_modules/material-icon-theme/icons/c.svg":aN,"/node_modules/material-icon-theme/icons/c3.svg":oN,"/node_modules/material-icon-theme/icons/cabal.svg":sN,"/node_modules/material-icon-theme/icons/caddy.svg":cN,"/node_modules/material-icon-theme/icons/cadence.svg":lN,"/node_modules/material-icon-theme/icons/cairo.svg":uN,"/node_modules/material-icon-theme/icons/cake.svg":dN,"/node_modules/material-icon-theme/icons/capacitor.svg":fN,"/node_modules/material-icon-theme/icons/capnp.svg":pN,"/node_modules/material-icon-theme/icons/cbx.svg":mN,"/node_modules/material-icon-theme/icons/cds.svg":hN,"/node_modules/material-icon-theme/icons/certificate.svg":gN,"/node_modules/material-icon-theme/icons/changelog.svg":_N,"/node_modules/material-icon-theme/icons/chess.svg":vN,"/node_modules/material-icon-theme/icons/chess_light.svg":yN,"/node_modules/material-icon-theme/icons/chromatic.svg":bN,"/node_modules/material-icon-theme/icons/chrome.svg":xN,"/node_modules/material-icon-theme/icons/circleci.svg":SN,"/node_modules/material-icon-theme/icons/circleci_light.svg":CN,"/node_modules/material-icon-theme/icons/citation.svg":wN,"/node_modules/material-icon-theme/icons/clangd.svg":TN,"/node_modules/material-icon-theme/icons/claude.svg":EN,"/node_modules/material-icon-theme/icons/cline.svg":DN,"/node_modules/material-icon-theme/icons/clojure.svg":ON,"/node_modules/material-icon-theme/icons/cloudfoundry.svg":kN,"/node_modules/material-icon-theme/icons/cmake.svg":AN,"/node_modules/material-icon-theme/icons/coala.svg":jN,"/node_modules/material-icon-theme/icons/cobol.svg":MN,"/node_modules/material-icon-theme/icons/coconut.svg":NN,"/node_modules/material-icon-theme/icons/code-climate.svg":PN,"/node_modules/material-icon-theme/icons/code-climate_light.svg":FN,"/node_modules/material-icon-theme/icons/codecov.svg":IN,"/node_modules/material-icon-theme/icons/codeowners.svg":LN,"/node_modules/material-icon-theme/icons/coderabbit-ai.svg":RN,"/node_modules/material-icon-theme/icons/coffee.svg":zN,"/node_modules/material-icon-theme/icons/coldfusion.svg":BN,"/node_modules/material-icon-theme/icons/coloredpetrinets.svg":VN,"/node_modules/material-icon-theme/icons/command.svg":HN,"/node_modules/material-icon-theme/icons/commitizen.svg":UN,"/node_modules/material-icon-theme/icons/commitlint.svg":WN,"/node_modules/material-icon-theme/icons/concourse.svg":GN,"/node_modules/material-icon-theme/icons/conduct.svg":KN,"/node_modules/material-icon-theme/icons/console.svg":qN,"/node_modules/material-icon-theme/icons/container.clone.svg":JN,"/node_modules/material-icon-theme/icons/contentlayer.svg":YN,"/node_modules/material-icon-theme/icons/context.svg":XN,"/node_modules/material-icon-theme/icons/contributing.svg":ZN,"/node_modules/material-icon-theme/icons/controller.svg":QN,"/node_modules/material-icon-theme/icons/copilot.svg":$N,"/node_modules/material-icon-theme/icons/copilot_light.svg":eP,"/node_modules/material-icon-theme/icons/cpp.svg":tP,"/node_modules/material-icon-theme/icons/craco.svg":nP,"/node_modules/material-icon-theme/icons/credits.svg":rP,"/node_modules/material-icon-theme/icons/crystal.svg":iP,"/node_modules/material-icon-theme/icons/crystal_light.svg":aP,"/node_modules/material-icon-theme/icons/csharp.svg":oP,"/node_modules/material-icon-theme/icons/css-map.svg":sP,"/node_modules/material-icon-theme/icons/css.svg":cP,"/node_modules/material-icon-theme/icons/cucumber.svg":lP,"/node_modules/material-icon-theme/icons/cuda.svg":uP,"/node_modules/material-icon-theme/icons/cue.svg":dP,"/node_modules/material-icon-theme/icons/cursor.svg":fP,"/node_modules/material-icon-theme/icons/cursor_light.svg":pP,"/node_modules/material-icon-theme/icons/cypress.svg":mP,"/node_modules/material-icon-theme/icons/d.svg":hP,"/node_modules/material-icon-theme/icons/dart.svg":gP,"/node_modules/material-icon-theme/icons/dart_generated.svg":_P,"/node_modules/material-icon-theme/icons/database.svg":vP,"/node_modules/material-icon-theme/icons/deepsource.svg":yP,"/node_modules/material-icon-theme/icons/denizenscript.svg":bP,"/node_modules/material-icon-theme/icons/deno.svg":xP,"/node_modules/material-icon-theme/icons/deno_light.svg":SP,"/node_modules/material-icon-theme/icons/dependabot.svg":CP,"/node_modules/material-icon-theme/icons/dependencies-update.svg":wP,"/node_modules/material-icon-theme/icons/dhall.svg":TP,"/node_modules/material-icon-theme/icons/diff.svg":EP,"/node_modules/material-icon-theme/icons/dinophp.svg":DP,"/node_modules/material-icon-theme/icons/disc.svg":OP,"/node_modules/material-icon-theme/icons/django.svg":kP,"/node_modules/material-icon-theme/icons/dll.svg":AP,"/node_modules/material-icon-theme/icons/docker.svg":jP,"/node_modules/material-icon-theme/icons/doctex-installer.svg":MP,"/node_modules/material-icon-theme/icons/doctex.clone.svg":NP,"/node_modules/material-icon-theme/icons/document.svg":PP,"/node_modules/material-icon-theme/icons/dotjs.svg":FP,"/node_modules/material-icon-theme/icons/drawio.svg":IP,"/node_modules/material-icon-theme/icons/drizzle.svg":LP,"/node_modules/material-icon-theme/icons/drone.svg":RP,"/node_modules/material-icon-theme/icons/drone_light.svg":zP,"/node_modules/material-icon-theme/icons/dtx.clone.svg":BP,"/node_modules/material-icon-theme/icons/duc.svg":VP,"/node_modules/material-icon-theme/icons/dune.svg":HP,"/node_modules/material-icon-theme/icons/edge.svg":UP,"/node_modules/material-icon-theme/icons/editorconfig.svg":WP,"/node_modules/material-icon-theme/icons/ejs.svg":GP,"/node_modules/material-icon-theme/icons/elixir.svg":KP,"/node_modules/material-icon-theme/icons/elm.svg":qP,"/node_modules/material-icon-theme/icons/email.svg":JP,"/node_modules/material-icon-theme/icons/ember.svg":YP,"/node_modules/material-icon-theme/icons/epub.svg":XP,"/node_modules/material-icon-theme/icons/erlang.svg":ZP,"/node_modules/material-icon-theme/icons/esbuild.svg":QP,"/node_modules/material-icon-theme/icons/eslint.svg":$P,"/node_modules/material-icon-theme/icons/excalidraw.svg":eF,"/node_modules/material-icon-theme/icons/exe.svg":tF,"/node_modules/material-icon-theme/icons/expo.svg":nF,"/node_modules/material-icon-theme/icons/expo_light.svg":rF,"/node_modules/material-icon-theme/icons/fastlane.svg":iF,"/node_modules/material-icon-theme/icons/favicon.svg":aF,"/node_modules/material-icon-theme/icons/figma.svg":oF,"/node_modules/material-icon-theme/icons/file.svg":sF,"/node_modules/material-icon-theme/icons/firebase.svg":cF,"/node_modules/material-icon-theme/icons/flash.svg":lF,"/node_modules/material-icon-theme/icons/flow.svg":uF,"/node_modules/material-icon-theme/icons/font.svg":dF,"/node_modules/material-icon-theme/icons/forth.svg":fF,"/node_modules/material-icon-theme/icons/fortran.svg":pF,"/node_modules/material-icon-theme/icons/foxpro.svg":mF,"/node_modules/material-icon-theme/icons/freemarker.svg":hF,"/node_modules/material-icon-theme/icons/fsharp.svg":gF,"/node_modules/material-icon-theme/icons/fusebox.svg":_F,"/node_modules/material-icon-theme/icons/gamemaker.svg":vF,"/node_modules/material-icon-theme/icons/garden.svg":yF,"/node_modules/material-icon-theme/icons/gatsby.svg":bF,"/node_modules/material-icon-theme/icons/gcp.svg":xF,"/node_modules/material-icon-theme/icons/gemfile.svg":SF,"/node_modules/material-icon-theme/icons/gemini-ai.svg":CF,"/node_modules/material-icon-theme/icons/gemini.svg":wF,"/node_modules/material-icon-theme/icons/git.svg":TF,"/node_modules/material-icon-theme/icons/github-actions-workflow.svg":EF,"/node_modules/material-icon-theme/icons/github-sponsors.svg":DF,"/node_modules/material-icon-theme/icons/gitlab.svg":OF,"/node_modules/material-icon-theme/icons/gitpod.svg":kF,"/node_modules/material-icon-theme/icons/gleam.svg":AF,"/node_modules/material-icon-theme/icons/gnuplot.svg":jF,"/node_modules/material-icon-theme/icons/go-mod.svg":MF,"/node_modules/material-icon-theme/icons/go.svg":NF,"/node_modules/material-icon-theme/icons/go_gopher.svg":PF,"/node_modules/material-icon-theme/icons/godot-assets.svg":FF,"/node_modules/material-icon-theme/icons/godot.svg":IF,"/node_modules/material-icon-theme/icons/google.svg":LF,"/node_modules/material-icon-theme/icons/gradle.svg":RF,"/node_modules/material-icon-theme/icons/grafana-alloy.svg":zF,"/node_modules/material-icon-theme/icons/grain.svg":BF,"/node_modules/material-icon-theme/icons/graphcool.svg":VF,"/node_modules/material-icon-theme/icons/graphql.svg":HF,"/node_modules/material-icon-theme/icons/gridsome.svg":UF,"/node_modules/material-icon-theme/icons/groovy.svg":WF,"/node_modules/material-icon-theme/icons/grunt.svg":GF,"/node_modules/material-icon-theme/icons/gulp.svg":KF,"/node_modules/material-icon-theme/icons/h.svg":qF,"/node_modules/material-icon-theme/icons/hack.svg":JF,"/node_modules/material-icon-theme/icons/hadolint.svg":YF,"/node_modules/material-icon-theme/icons/haml.svg":XF,"/node_modules/material-icon-theme/icons/handlebars.svg":ZF,"/node_modules/material-icon-theme/icons/happo.svg":QF,"/node_modules/material-icon-theme/icons/hardhat.svg":$F,"/node_modules/material-icon-theme/icons/harmonix.svg":eI,"/node_modules/material-icon-theme/icons/haskell.svg":tI,"/node_modules/material-icon-theme/icons/haxe.svg":nI,"/node_modules/material-icon-theme/icons/hcl.svg":rI,"/node_modules/material-icon-theme/icons/hcl_light.svg":iI,"/node_modules/material-icon-theme/icons/helm.svg":aI,"/node_modules/material-icon-theme/icons/heroku.svg":oI,"/node_modules/material-icon-theme/icons/hex.svg":sI,"/node_modules/material-icon-theme/icons/hip.svg":cI,"/node_modules/material-icon-theme/icons/histoire.svg":lI,"/node_modules/material-icon-theme/icons/hjson.svg":uI,"/node_modules/material-icon-theme/icons/horusec.svg":dI,"/node_modules/material-icon-theme/icons/hosts.svg":fI,"/node_modules/material-icon-theme/icons/hosts_light.svg":pI,"/node_modules/material-icon-theme/icons/hpp.svg":mI,"/node_modules/material-icon-theme/icons/html.svg":hI,"/node_modules/material-icon-theme/icons/http.svg":gI,"/node_modules/material-icon-theme/icons/huff.svg":_I,"/node_modules/material-icon-theme/icons/huff_light.svg":vI,"/node_modules/material-icon-theme/icons/hurl.svg":yI,"/node_modules/material-icon-theme/icons/husky.svg":bI,"/node_modules/material-icon-theme/icons/i18n.svg":xI,"/node_modules/material-icon-theme/icons/idris.svg":SI,"/node_modules/material-icon-theme/icons/ifanr-cloud.svg":CI,"/node_modules/material-icon-theme/icons/image.svg":wI,"/node_modules/material-icon-theme/icons/imba.svg":TI,"/node_modules/material-icon-theme/icons/installation.svg":EI,"/node_modules/material-icon-theme/icons/instructions.clone.svg":DI,"/node_modules/material-icon-theme/icons/ionic.svg":OI,"/node_modules/material-icon-theme/icons/istanbul.svg":kI,"/node_modules/material-icon-theme/icons/jar.svg":AI,"/node_modules/material-icon-theme/icons/java.svg":jI,"/node_modules/material-icon-theme/icons/javaclass.svg":MI,"/node_modules/material-icon-theme/icons/javascript-map.svg":NI,"/node_modules/material-icon-theme/icons/javascript.svg":PI,"/node_modules/material-icon-theme/icons/jenkins.svg":FI,"/node_modules/material-icon-theme/icons/jest.svg":II,"/node_modules/material-icon-theme/icons/jinja.svg":LI,"/node_modules/material-icon-theme/icons/jinja_light.svg":RI,"/node_modules/material-icon-theme/icons/jsconfig.svg":zI,"/node_modules/material-icon-theme/icons/json.svg":BI,"/node_modules/material-icon-theme/icons/json_schema.svg":VI,"/node_modules/material-icon-theme/icons/jsr.svg":HI,"/node_modules/material-icon-theme/icons/jsr_light.svg":UI,"/node_modules/material-icon-theme/icons/julia.svg":WI,"/node_modules/material-icon-theme/icons/jupyter.svg":GI,"/node_modules/material-icon-theme/icons/just.svg":KI,"/node_modules/material-icon-theme/icons/karma.svg":qI,"/node_modules/material-icon-theme/icons/kcl.svg":JI,"/node_modules/material-icon-theme/icons/key.svg":YI,"/node_modules/material-icon-theme/icons/keystatic.svg":XI,"/node_modules/material-icon-theme/icons/kivy.svg":ZI,"/node_modules/material-icon-theme/icons/kl.svg":QI,"/node_modules/material-icon-theme/icons/knip.svg":$I,"/node_modules/material-icon-theme/icons/kotlin.svg":eL,"/node_modules/material-icon-theme/icons/kubernetes.svg":tL,"/node_modules/material-icon-theme/icons/kusto.svg":nL,"/node_modules/material-icon-theme/icons/label.svg":rL,"/node_modules/material-icon-theme/icons/laravel.svg":iL,"/node_modules/material-icon-theme/icons/latex-class.clone.svg":aL,"/node_modules/material-icon-theme/icons/latex-package.clone.svg":oL,"/node_modules/material-icon-theme/icons/latex.clone.svg":sL,"/node_modules/material-icon-theme/icons/latexmk.svg":cL,"/node_modules/material-icon-theme/icons/lbx.svg":lL,"/node_modules/material-icon-theme/icons/lean.svg":uL,"/node_modules/material-icon-theme/icons/lefthook.svg":dL,"/node_modules/material-icon-theme/icons/lerna.svg":fL,"/node_modules/material-icon-theme/icons/less.svg":pL,"/node_modules/material-icon-theme/icons/liara.svg":mL,"/node_modules/material-icon-theme/icons/lib.svg":hL,"/node_modules/material-icon-theme/icons/license.svg":gL,"/node_modules/material-icon-theme/icons/lighthouse.svg":_L,"/node_modules/material-icon-theme/icons/lilypond.svg":vL,"/node_modules/material-icon-theme/icons/lintstaged.svg":yL,"/node_modules/material-icon-theme/icons/liquid.svg":bL,"/node_modules/material-icon-theme/icons/lisp.svg":xL,"/node_modules/material-icon-theme/icons/livescript.svg":SL,"/node_modules/material-icon-theme/icons/lock.svg":CL,"/node_modules/material-icon-theme/icons/log.svg":wL,"/node_modules/material-icon-theme/icons/lolcode.svg":TL,"/node_modules/material-icon-theme/icons/lottie.svg":EL,"/node_modules/material-icon-theme/icons/lua.svg":DL,"/node_modules/material-icon-theme/icons/luau.svg":OL,"/node_modules/material-icon-theme/icons/lynx.svg":kL,"/node_modules/material-icon-theme/icons/lyric.svg":AL,"/node_modules/material-icon-theme/icons/macaulay2.svg":jL,"/node_modules/material-icon-theme/icons/makefile.svg":ML,"/node_modules/material-icon-theme/icons/markdoc-config.svg":NL,"/node_modules/material-icon-theme/icons/markdoc.svg":PL,"/node_modules/material-icon-theme/icons/markdown.svg":FL,"/node_modules/material-icon-theme/icons/markdownlint.svg":IL,"/node_modules/material-icon-theme/icons/markojs.svg":LL,"/node_modules/material-icon-theme/icons/mathematica.svg":RL,"/node_modules/material-icon-theme/icons/matlab.svg":zL,"/node_modules/material-icon-theme/icons/maven.svg":BL,"/node_modules/material-icon-theme/icons/mdsvex.svg":VL,"/node_modules/material-icon-theme/icons/mdx.svg":HL,"/node_modules/material-icon-theme/icons/mercurial.svg":UL,"/node_modules/material-icon-theme/icons/merlin.svg":WL,"/node_modules/material-icon-theme/icons/mermaid.svg":GL,"/node_modules/material-icon-theme/icons/meson.svg":KL,"/node_modules/material-icon-theme/icons/metro.svg":qL,"/node_modules/material-icon-theme/icons/minecraft-fabric.svg":JL,"/node_modules/material-icon-theme/icons/minecraft.svg":YL,"/node_modules/material-icon-theme/icons/mint.svg":XL,"/node_modules/material-icon-theme/icons/mist.clone.svg":ZL,"/node_modules/material-icon-theme/icons/mjml.svg":QL,"/node_modules/material-icon-theme/icons/mocha.svg":$L,"/node_modules/material-icon-theme/icons/modernizr.svg":eR,"/node_modules/material-icon-theme/icons/mojo.svg":tR,"/node_modules/material-icon-theme/icons/moon.svg":nR,"/node_modules/material-icon-theme/icons/moonscript.svg":rR,"/node_modules/material-icon-theme/icons/mrpack.svg":iR,"/node_modules/material-icon-theme/icons/mxml.svg":aR,"/node_modules/material-icon-theme/icons/nano-staged.svg":oR,"/node_modules/material-icon-theme/icons/nano-staged_light.svg":sR,"/node_modules/material-icon-theme/icons/ndst.svg":cR,"/node_modules/material-icon-theme/icons/nest-controller.clone.svg":lR,"/node_modules/material-icon-theme/icons/nest-decorator.clone.svg":uR,"/node_modules/material-icon-theme/icons/nest-filter.clone.svg":dR,"/node_modules/material-icon-theme/icons/nest-gateway.clone.svg":fR,"/node_modules/material-icon-theme/icons/nest-guard.clone.svg":pR,"/node_modules/material-icon-theme/icons/nest-interceptor.clone.svg":mR,"/node_modules/material-icon-theme/icons/nest-middleware.clone.svg":hR,"/node_modules/material-icon-theme/icons/nest-module.clone.svg":gR,"/node_modules/material-icon-theme/icons/nest-pipe.clone.svg":_R,"/node_modules/material-icon-theme/icons/nest-resolver.clone.svg":vR,"/node_modules/material-icon-theme/icons/nest-service.clone.svg":yR,"/node_modules/material-icon-theme/icons/nest.svg":bR,"/node_modules/material-icon-theme/icons/netlify.svg":xR,"/node_modules/material-icon-theme/icons/netlify_light.svg":SR,"/node_modules/material-icon-theme/icons/next.svg":CR,"/node_modules/material-icon-theme/icons/next_light.svg":wR,"/node_modules/material-icon-theme/icons/nextflow.svg":TR,"/node_modules/material-icon-theme/icons/nginx.svg":ER,"/node_modules/material-icon-theme/icons/ngrx-actions.svg":DR,"/node_modules/material-icon-theme/icons/ngrx-effects.svg":OR,"/node_modules/material-icon-theme/icons/ngrx-entity.svg":kR,"/node_modules/material-icon-theme/icons/ngrx-reducer.svg":AR,"/node_modules/material-icon-theme/icons/ngrx-selectors.svg":jR,"/node_modules/material-icon-theme/icons/ngrx-state.svg":MR,"/node_modules/material-icon-theme/icons/nim.svg":NR,"/node_modules/material-icon-theme/icons/nix.svg":PR,"/node_modules/material-icon-theme/icons/nodejs.svg":FR,"/node_modules/material-icon-theme/icons/nodejs_alt.svg":IR,"/node_modules/material-icon-theme/icons/nodemon.svg":LR,"/node_modules/material-icon-theme/icons/npm.svg":RR,"/node_modules/material-icon-theme/icons/nuget.svg":zR,"/node_modules/material-icon-theme/icons/nunjucks.svg":BR,"/node_modules/material-icon-theme/icons/nuxt.svg":VR,"/node_modules/material-icon-theme/icons/nx.svg":HR,"/node_modules/material-icon-theme/icons/objective-c.svg":UR,"/node_modules/material-icon-theme/icons/objective-cpp.svg":WR,"/node_modules/material-icon-theme/icons/ocaml.svg":GR,"/node_modules/material-icon-theme/icons/odin.svg":KR,"/node_modules/material-icon-theme/icons/onnx.svg":qR,"/node_modules/material-icon-theme/icons/opa.svg":JR,"/node_modules/material-icon-theme/icons/opam.svg":YR,"/node_modules/material-icon-theme/icons/openapi.svg":XR,"/node_modules/material-icon-theme/icons/openapi_light.svg":ZR,"/node_modules/material-icon-theme/icons/opencode.svg":QR,"/node_modules/material-icon-theme/icons/opencode_light.svg":$R,"/node_modules/material-icon-theme/icons/opentofu.svg":ez,"/node_modules/material-icon-theme/icons/opentofu_light.svg":tz,"/node_modules/material-icon-theme/icons/otne.svg":nz,"/node_modules/material-icon-theme/icons/oxc.svg":rz,"/node_modules/material-icon-theme/icons/packship.svg":iz,"/node_modules/material-icon-theme/icons/palette.svg":az,"/node_modules/material-icon-theme/icons/panda.svg":oz,"/node_modules/material-icon-theme/icons/parcel.svg":sz,"/node_modules/material-icon-theme/icons/pascal.svg":cz,"/node_modules/material-icon-theme/icons/pawn.svg":lz,"/node_modules/material-icon-theme/icons/payload.svg":uz,"/node_modules/material-icon-theme/icons/payload_light.svg":dz,"/node_modules/material-icon-theme/icons/pdf.svg":fz,"/node_modules/material-icon-theme/icons/pdm.svg":pz,"/node_modules/material-icon-theme/icons/peg.svg":mz,"/node_modules/material-icon-theme/icons/percy.svg":hz,"/node_modules/material-icon-theme/icons/perl.svg":gz,"/node_modules/material-icon-theme/icons/php-cs-fixer.svg":_z,"/node_modules/material-icon-theme/icons/php.svg":vz,"/node_modules/material-icon-theme/icons/php_elephant.svg":yz,"/node_modules/material-icon-theme/icons/php_elephant_pink.svg":bz,"/node_modules/material-icon-theme/icons/phpstan.svg":xz,"/node_modules/material-icon-theme/icons/phpunit.svg":Sz,"/node_modules/material-icon-theme/icons/pinejs.svg":Cz,"/node_modules/material-icon-theme/icons/pipeline.svg":wz,"/node_modules/material-icon-theme/icons/pkl.svg":Tz,"/node_modules/material-icon-theme/icons/plastic.svg":Ez,"/node_modules/material-icon-theme/icons/playwright.svg":Dz,"/node_modules/material-icon-theme/icons/plop.svg":Oz,"/node_modules/material-icon-theme/icons/pm2-ecosystem.svg":kz,"/node_modules/material-icon-theme/icons/pnpm.svg":Az,"/node_modules/material-icon-theme/icons/pnpm_light.svg":jz,"/node_modules/material-icon-theme/icons/poetry.svg":Mz,"/node_modules/material-icon-theme/icons/postcss.svg":Nz,"/node_modules/material-icon-theme/icons/posthtml.svg":Pz,"/node_modules/material-icon-theme/icons/powerpoint.svg":Fz,"/node_modules/material-icon-theme/icons/powershell.svg":Iz,"/node_modules/material-icon-theme/icons/pre-commit.svg":Lz,"/node_modules/material-icon-theme/icons/prettier.svg":Rz,"/node_modules/material-icon-theme/icons/prisma.svg":zz,"/node_modules/material-icon-theme/icons/processing.svg":Bz,"/node_modules/material-icon-theme/icons/prolog.svg":Vz,"/node_modules/material-icon-theme/icons/prompt.svg":Hz,"/node_modules/material-icon-theme/icons/proto.svg":Uz,"/node_modules/material-icon-theme/icons/protractor.svg":Wz,"/node_modules/material-icon-theme/icons/pug.svg":Gz,"/node_modules/material-icon-theme/icons/puppet.svg":Kz,"/node_modules/material-icon-theme/icons/puppeteer.svg":qz,"/node_modules/material-icon-theme/icons/purescript.svg":Jz,"/node_modules/material-icon-theme/icons/python-misc.svg":Yz,"/node_modules/material-icon-theme/icons/python.svg":Xz,"/node_modules/material-icon-theme/icons/pytorch.svg":Zz,"/node_modules/material-icon-theme/icons/qsharp.svg":Qz,"/node_modules/material-icon-theme/icons/quarto.svg":$z,"/node_modules/material-icon-theme/icons/quasar.svg":eB,"/node_modules/material-icon-theme/icons/quokka.svg":tB,"/node_modules/material-icon-theme/icons/qwik.svg":nB,"/node_modules/material-icon-theme/icons/r.svg":rB,"/node_modules/material-icon-theme/icons/racket.svg":iB,"/node_modules/material-icon-theme/icons/raml.svg":aB,"/node_modules/material-icon-theme/icons/razor.svg":oB,"/node_modules/material-icon-theme/icons/rbxmk.svg":sB,"/node_modules/material-icon-theme/icons/rc.svg":cB,"/node_modules/material-icon-theme/icons/react.svg":lB,"/node_modules/material-icon-theme/icons/react_ts.svg":uB,"/node_modules/material-icon-theme/icons/readme.svg":dB,"/node_modules/material-icon-theme/icons/reason.svg":fB,"/node_modules/material-icon-theme/icons/red.svg":pB,"/node_modules/material-icon-theme/icons/redux-action.svg":mB,"/node_modules/material-icon-theme/icons/redux-reducer.svg":hB,"/node_modules/material-icon-theme/icons/redux-selector.svg":gB,"/node_modules/material-icon-theme/icons/redux-store.svg":_B,"/node_modules/material-icon-theme/icons/regedit.svg":vB,"/node_modules/material-icon-theme/icons/remark.svg":yB,"/node_modules/material-icon-theme/icons/remix.svg":bB,"/node_modules/material-icon-theme/icons/remix_light.svg":xB,"/node_modules/material-icon-theme/icons/renovate.svg":SB,"/node_modules/material-icon-theme/icons/replit.svg":CB,"/node_modules/material-icon-theme/icons/rescript-interface.svg":wB,"/node_modules/material-icon-theme/icons/rescript.svg":TB,"/node_modules/material-icon-theme/icons/restql.svg":EB,"/node_modules/material-icon-theme/icons/riot.svg":DB,"/node_modules/material-icon-theme/icons/roadmap.svg":OB,"/node_modules/material-icon-theme/icons/roblox.svg":kB,"/node_modules/material-icon-theme/icons/robot.svg":AB,"/node_modules/material-icon-theme/icons/robots.svg":jB,"/node_modules/material-icon-theme/icons/rocket.svg":MB,"/node_modules/material-icon-theme/icons/rojo.svg":NB,"/node_modules/material-icon-theme/icons/rolldown.svg":PB,"/node_modules/material-icon-theme/icons/rollup.svg":FB,"/node_modules/material-icon-theme/icons/rome.svg":IB,"/node_modules/material-icon-theme/icons/routing.svg":LB,"/node_modules/material-icon-theme/icons/rspec.svg":RB,"/node_modules/material-icon-theme/icons/rstack.svg":zB,"/node_modules/material-icon-theme/icons/rubocop.svg":BB,"/node_modules/material-icon-theme/icons/rubocop_light.svg":VB,"/node_modules/material-icon-theme/icons/ruby.svg":HB,"/node_modules/material-icon-theme/icons/ruff.svg":UB,"/node_modules/material-icon-theme/icons/rust.svg":WB,"/node_modules/material-icon-theme/icons/salesforce.svg":GB,"/node_modules/material-icon-theme/icons/salt.svg":KB,"/node_modules/material-icon-theme/icons/san.svg":qB,"/node_modules/material-icon-theme/icons/sas.svg":JB,"/node_modules/material-icon-theme/icons/sass.svg":YB,"/node_modules/material-icon-theme/icons/sbt.svg":XB,"/node_modules/material-icon-theme/icons/scala.svg":ZB,"/node_modules/material-icon-theme/icons/scheme.svg":QB,"/node_modules/material-icon-theme/icons/scons.svg":$B,"/node_modules/material-icon-theme/icons/scons_light.svg":eV,"/node_modules/material-icon-theme/icons/screwdriver.svg":tV,"/node_modules/material-icon-theme/icons/search.svg":nV,"/node_modules/material-icon-theme/icons/semantic-release.svg":rV,"/node_modules/material-icon-theme/icons/semantic-release_light.svg":iV,"/node_modules/material-icon-theme/icons/semgrep.svg":aV,"/node_modules/material-icon-theme/icons/sentry.svg":oV,"/node_modules/material-icon-theme/icons/sequelize.svg":sV,"/node_modules/material-icon-theme/icons/serverless.svg":cV,"/node_modules/material-icon-theme/icons/settings.svg":lV,"/node_modules/material-icon-theme/icons/shader.svg":uV,"/node_modules/material-icon-theme/icons/shellcheck.svg":dV,"/node_modules/material-icon-theme/icons/shellcheck_light.svg":fV,"/node_modules/material-icon-theme/icons/silverstripe.svg":pV,"/node_modules/material-icon-theme/icons/simulink.svg":mV,"/node_modules/material-icon-theme/icons/siyuan.svg":hV,"/node_modules/material-icon-theme/icons/sketch.svg":gV,"/node_modules/material-icon-theme/icons/skill.svg":_V,"/node_modules/material-icon-theme/icons/slim.svg":vV,"/node_modules/material-icon-theme/icons/slint.svg":yV,"/node_modules/material-icon-theme/icons/slug.svg":bV,"/node_modules/material-icon-theme/icons/smarty.svg":xV,"/node_modules/material-icon-theme/icons/sml.svg":SV,"/node_modules/material-icon-theme/icons/snakemake.svg":CV,"/node_modules/material-icon-theme/icons/snapcraft.svg":wV,"/node_modules/material-icon-theme/icons/snowpack.svg":TV,"/node_modules/material-icon-theme/icons/snowpack_light.svg":EV,"/node_modules/material-icon-theme/icons/snyk.svg":DV,"/node_modules/material-icon-theme/icons/solidity.svg":OV,"/node_modules/material-icon-theme/icons/sonarcloud.svg":kV,"/node_modules/material-icon-theme/icons/spwn.svg":AV,"/node_modules/material-icon-theme/icons/stackblitz.svg":jV,"/node_modules/material-icon-theme/icons/stan.svg":MV,"/node_modules/material-icon-theme/icons/steadybit.svg":NV,"/node_modules/material-icon-theme/icons/stencil.svg":PV,"/node_modules/material-icon-theme/icons/stitches.svg":FV,"/node_modules/material-icon-theme/icons/stitches_light.svg":IV,"/node_modules/material-icon-theme/icons/storybook.svg":LV,"/node_modules/material-icon-theme/icons/stryker.svg":RV,"/node_modules/material-icon-theme/icons/sty.clone.svg":zV,"/node_modules/material-icon-theme/icons/stylable.svg":BV,"/node_modules/material-icon-theme/icons/stylelint.svg":VV,"/node_modules/material-icon-theme/icons/stylelint_light.svg":HV,"/node_modules/material-icon-theme/icons/stylus.svg":UV,"/node_modules/material-icon-theme/icons/sublime.svg":WV,"/node_modules/material-icon-theme/icons/subtitles.svg":GV,"/node_modules/material-icon-theme/icons/supabase.svg":KV,"/node_modules/material-icon-theme/icons/svelte.svg":qV,"/node_modules/material-icon-theme/icons/svelte_js.clone.svg":JV,"/node_modules/material-icon-theme/icons/svelte_ts.clone.svg":YV,"/node_modules/material-icon-theme/icons/svg.svg":XV,"/node_modules/material-icon-theme/icons/svgo.svg":ZV,"/node_modules/material-icon-theme/icons/svgr.svg":QV,"/node_modules/material-icon-theme/icons/swagger.svg":$V,"/node_modules/material-icon-theme/icons/sway.svg":eH,"/node_modules/material-icon-theme/icons/swc.svg":tH,"/node_modules/material-icon-theme/icons/swift.svg":nH,"/node_modules/material-icon-theme/icons/syncpack.svg":rH,"/node_modules/material-icon-theme/icons/systemd.svg":iH,"/node_modules/material-icon-theme/icons/systemd_light.svg":aH,"/node_modules/material-icon-theme/icons/table.svg":oH,"/node_modules/material-icon-theme/icons/tailwindcss.svg":sH,"/node_modules/material-icon-theme/icons/tape.clone.svg":cH,"/node_modules/material-icon-theme/icons/taskfile.svg":lH,"/node_modules/material-icon-theme/icons/tauri.svg":uH,"/node_modules/material-icon-theme/icons/taze.svg":dH,"/node_modules/material-icon-theme/icons/tcl.svg":fH,"/node_modules/material-icon-theme/icons/teal.svg":pH,"/node_modules/material-icon-theme/icons/templ.svg":mH,"/node_modules/material-icon-theme/icons/template.svg":hH,"/node_modules/material-icon-theme/icons/terraform.svg":gH,"/node_modules/material-icon-theme/icons/test-js.svg":_H,"/node_modules/material-icon-theme/icons/test-jsx.svg":vH,"/node_modules/material-icon-theme/icons/test-ts.svg":yH,"/node_modules/material-icon-theme/icons/tex.svg":bH,"/node_modules/material-icon-theme/icons/textlint.svg":xH,"/node_modules/material-icon-theme/icons/tilt.svg":SH,"/node_modules/material-icon-theme/icons/tldraw.svg":CH,"/node_modules/material-icon-theme/icons/tldraw_light.svg":wH,"/node_modules/material-icon-theme/icons/tobi.svg":TH,"/node_modules/material-icon-theme/icons/tobimake.svg":EH,"/node_modules/material-icon-theme/icons/toc.svg":DH,"/node_modules/material-icon-theme/icons/todo.svg":OH,"/node_modules/material-icon-theme/icons/toml.svg":kH,"/node_modules/material-icon-theme/icons/toml_light.svg":AH,"/node_modules/material-icon-theme/icons/toon.svg":jH,"/node_modules/material-icon-theme/icons/travis.svg":MH,"/node_modules/material-icon-theme/icons/tree.svg":NH,"/node_modules/material-icon-theme/icons/trigger.svg":PH,"/node_modules/material-icon-theme/icons/tsconfig.svg":FH,"/node_modules/material-icon-theme/icons/tsdoc.svg":IH,"/node_modules/material-icon-theme/icons/tsdown.svg":LH,"/node_modules/material-icon-theme/icons/tsil.svg":RH,"/node_modules/material-icon-theme/icons/tune.svg":zH,"/node_modules/material-icon-theme/icons/turborepo.svg":BH,"/node_modules/material-icon-theme/icons/turborepo_light.svg":VH,"/node_modules/material-icon-theme/icons/twig.svg":HH,"/node_modules/material-icon-theme/icons/twine.svg":UH,"/node_modules/material-icon-theme/icons/typedoc.svg":WH,"/node_modules/material-icon-theme/icons/typescript-def.svg":GH,"/node_modules/material-icon-theme/icons/typescript.svg":KH,"/node_modules/material-icon-theme/icons/typst.svg":qH,"/node_modules/material-icon-theme/icons/uiua.svg":JH,"/node_modules/material-icon-theme/icons/umi.svg":YH,"/node_modules/material-icon-theme/icons/uml.svg":XH,"/node_modules/material-icon-theme/icons/uml_light.svg":ZH,"/node_modules/material-icon-theme/icons/unity.svg":QH,"/node_modules/material-icon-theme/icons/unlicense.svg":$H,"/node_modules/material-icon-theme/icons/unocss.svg":eU,"/node_modules/material-icon-theme/icons/url.svg":tU,"/node_modules/material-icon-theme/icons/uv.svg":nU,"/node_modules/material-icon-theme/icons/vagrant.svg":rU,"/node_modules/material-icon-theme/icons/vala.svg":iU,"/node_modules/material-icon-theme/icons/vanilla-extract.svg":aU,"/node_modules/material-icon-theme/icons/varnish.svg":oU,"/node_modules/material-icon-theme/icons/vedic.svg":sU,"/node_modules/material-icon-theme/icons/velite.svg":cU,"/node_modules/material-icon-theme/icons/velocity.svg":lU,"/node_modules/material-icon-theme/icons/vercel.svg":uU,"/node_modules/material-icon-theme/icons/vercel_light.svg":dU,"/node_modules/material-icon-theme/icons/verdaccio.svg":fU,"/node_modules/material-icon-theme/icons/verified.svg":pU,"/node_modules/material-icon-theme/icons/verilog.svg":mU,"/node_modules/material-icon-theme/icons/verse.svg":hU,"/node_modules/material-icon-theme/icons/verse_light.svg":gU,"/node_modules/material-icon-theme/icons/vfl.svg":_U,"/node_modules/material-icon-theme/icons/video.svg":vU,"/node_modules/material-icon-theme/icons/vim.svg":yU,"/node_modules/material-icon-theme/icons/virtual.svg":bU,"/node_modules/material-icon-theme/icons/visualstudio.svg":xU,"/node_modules/material-icon-theme/icons/vite.svg":SU,"/node_modules/material-icon-theme/icons/vitest.svg":CU,"/node_modules/material-icon-theme/icons/vlang.svg":wU,"/node_modules/material-icon-theme/icons/vscode.svg":TU,"/node_modules/material-icon-theme/icons/vue-config.svg":EU,"/node_modules/material-icon-theme/icons/vue.svg":DU,"/node_modules/material-icon-theme/icons/vuex-store.svg":OU,"/node_modules/material-icon-theme/icons/wakatime.svg":kU,"/node_modules/material-icon-theme/icons/wakatime_light.svg":AU,"/node_modules/material-icon-theme/icons/wallaby.svg":jU,"/node_modules/material-icon-theme/icons/wally.svg":MU,"/node_modules/material-icon-theme/icons/warp.svg":NU,"/node_modules/material-icon-theme/icons/warp_light.svg":PU,"/node_modules/material-icon-theme/icons/watchman.svg":FU,"/node_modules/material-icon-theme/icons/webassembly.svg":IU,"/node_modules/material-icon-theme/icons/webhint.svg":LU,"/node_modules/material-icon-theme/icons/webpack.svg":RU,"/node_modules/material-icon-theme/icons/wepy.svg":zU,"/node_modules/material-icon-theme/icons/werf.svg":BU,"/node_modules/material-icon-theme/icons/windicss.svg":VU,"/node_modules/material-icon-theme/icons/wolframlanguage.svg":HU,"/node_modules/material-icon-theme/icons/word.svg":UU,"/node_modules/material-icon-theme/icons/wrangler.svg":WU,"/node_modules/material-icon-theme/icons/wxt.svg":GU,"/node_modules/material-icon-theme/icons/xaml.svg":KU,"/node_modules/material-icon-theme/icons/xmake.svg":qU,"/node_modules/material-icon-theme/icons/xml.svg":JU,"/node_modules/material-icon-theme/icons/yaml.svg":YU,"/node_modules/material-icon-theme/icons/yang.svg":XU,"/node_modules/material-icon-theme/icons/yarn.svg":ZU,"/node_modules/material-icon-theme/icons/zeabur.svg":QU,"/node_modules/material-icon-theme/icons/zeabur_light.svg":$U,"/node_modules/material-icon-theme/icons/zig.svg":eW,"/node_modules/material-icon-theme/icons/zip.svg":tW,"/node_modules/material-icon-theme/icons/zizmor.svg":nW});function uW(e){let t=`/node_modules/material-icon-theme/icons`;return lW[`${t}/${e}`]??lW[`${t}/file.svg`]}function dW({path:e,size:t=16}){let n=uW(cW(e,`light`)),r=uW(cW(e,`dark`)),i={width:t,height:t,"--file-icon":`url("${n}")`,"--file-icon-dark":`url("${r}")`};return(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block shrink-0 bg-contain bg-center bg-no-repeat [background-image:var(--file-icon)] [[data-theme=dark]_&]:[background-image:var(--file-icon-dark)]`,style:i})}function fW(e,t){let n=BM(e),r=JSON.stringify([...new Set(t)].sort()),[i,a]=(0,h.useState)(`正在连接文件监听…`);return(0,h.useEffect)(()=>{let e=JSON.parse(r);if(!e.length)return;let t=!1,i=0,o=1e3,s,c,l=!1,u=`file:${n}`,d=()=>{t||(cM.invalidateQueries({queryKey:[`files`,n]}),cM.invalidateQueries({queryKey:[`file-search`,n]}))},f=async()=>{if(!(l||t)){l=!0;try{for(let e=0;e<10&&!t;e++){let n=cj.parse(await Y(`/api/resource-events?${new URLSearchParams({streamId:u,after:String(i),limit:`500`})}`));if(t)return;if(n.resyncRequired||!n.items.length){i=n.currentSequence;break}if(i=Math.max(i,n.items.at(-1)?.sequence??i),i>=n.currentSequence)break;e===9&&(i=n.currentSequence)}}catch{t||a(`监听恢复失败,请手动刷新。`)}finally{l=!1,d()}}},p=()=>{if(t)return;let r=new URL(`/ws`,window.location.href);r.protocol=r.protocol===`https:`?`wss:`:`ws:`,s=new WebSocket(r),s.onopen=()=>s?.send(JSON.stringify({type:`subscribe`,subscriptions:[{topic:`file`,resourceId:n,paths:e.slice(0,128),after:i}]})),s.onmessage=r=>{if(t)return;let s;try{s=JSON.parse(String(r.data))}catch{a(`文件监听响应无效,请刷新。`);return}let c=lj.safeParse(s);if(c.success&&c.data.subscription.resourceId===n){o=1e3,a(c.data.partial||e.length>128?`部分监听,请按需手动刷新。`:`文件监听已连接`),f(),d();return}if(uj.safeParse(s).success){a(`文件监听不可用,请手动刷新。`);return}let l=sj.safeParse(s);l.success&&l.data.streamId===u&&(l.data.sequence<=i||(l.data.sequence===i+1?i=l.data.sequence:f(),l.data.type===`file.resync.required`&&a(l.data.payload.reasonCode===`RECOVERED`?`文件监听已连接`:`监听已降级,请手动刷新。`),d()))},s.onerror=()=>{t||a(`文件监听断开,可手动刷新。`)},s.onclose=()=>{t||(a(`文件监听断开,正在重连;可手动刷新。`),c=setTimeout(p,o),o=Math.min(o*2,1e4))}};return p(),()=>{t=!0,clearTimeout(c),s?.close()}},[n,r]),i}function pW(e,t,n){if(e)return{projectId:e};let r=n.find(e=>e.id===t);return r&&r.workspaceKind!=="default"?{sessionId:r.id}:{workspace:`default`}}function mW(e,t,n){let r=pW(e,t,n);return`projectId`in r?`project:${r.projectId}`:`sessionId`in r?`session:${r.sessionId}`:`global`}function hW(e,t){return`workspace`in pW(null,e,t)?`默认工作区`:`独立会话`}var gW=yM()(SM((e,t)=>({projectId:null,sessionId:``,pinnedSessionId:null,draftSession:null,sidebarWidth:268,resourceWidth:340,sidebarCollapsed:!1,resourceCollapsed:!1,mobileSidebarOpen:!1,expandedProjects:{prj_larness:!0,prj_docs:!0},focusComposerNonce:0,expandedFileDirectories:{},resourceTab:`files`,fileReveal:null,setResourceTab:t=>e({resourceTab:t,fileReveal:null}),revealFile:(t,n,r)=>e(e=>{let i=n.split(`/`).slice(0,-1);return{resourceTab:`files`,resourceCollapsed:!1,fileReveal:{scope:t,path:n,scroll:r?.scroll??`center`},expandedFileDirectories:{...e.expandedFileDirectories,[t]:[...new Set([`.`,...e.expandedFileDirectories[t]??[],...i.map((e,t)=>i.slice(0,t+1).join(`/`))])]}}}),setExpandedFileDirectories:(t,n)=>e(e=>({expandedFileDirectories:{...e.expandedFileDirectories,[t]:n},fileReveal:null})),reconcileWorkspace:(n,r)=>{let i=t();if(i.sessionId!==``&&i.sessionId===i.pinnedSessionId)return;let a=i.projectId===null||n.includes(i.projectId);if(a&&i.draftSession?.id===i.sessionId&&i.draftSession.projectId===i.projectId)return;let o=r.find(e=>e.id===i.sessionId);if(o){(o.projectId!==i.projectId||i.draftSession)&&t().selectSession(o.id,o.projectId);return}let s=a?i.projectId:null;a&&i.sessionId.startsWith(`draft_`)?e({draftSession:{id:i.sessionId,projectId:s}}):t().startDraft(s)},selectSession:(t,n)=>e({sessionId:t,projectId:n,fileReveal:null,pinnedSessionId:null,draftSession:null,mobileSidebarOpen:!1}),openPinnedSession:(t,n)=>e({sessionId:t,projectId:n,fileReveal:null,pinnedSessionId:t,draftSession:null,mobileSidebarOpen:!1}),startDraft:t=>e(e=>{if(e.draftSession!==null&&e.draftSession.projectId===t)return{sessionId:e.draftSession.id,projectId:t,fileReveal:null,mobileSidebarOpen:!1};let n=`draft_${crypto.randomUUID()}`;return{draftSession:{id:n,projectId:t},sessionId:n,projectId:t,fileReveal:null,mobileSidebarOpen:!1}}),setDraftModel:(t,n)=>e(e=>e.draftSession?.id===t?{draftSession:{...e.draftSession,selection:n}}:e),setDraftWebSearch:(t,n)=>e(e=>e.draftSession?.id===t?{draftSession:{...e.draftSession,webSearchEnabled:n}}:e),commitDraft:(t,n,r)=>e(e=>e.sessionId===t?{sessionId:n,projectId:r,draftSession:null,mobileSidebarOpen:!1}:e),setSidebarWidth:t=>e({sidebarWidth:t}),setResourceWidth:t=>e({resourceWidth:t}),toggleSidebar:()=>e(e=>({sidebarCollapsed:!e.sidebarCollapsed})),toggleResource:()=>e(e=>({resourceCollapsed:!e.resourceCollapsed})),setMobileSidebar:t=>e({mobileSidebarOpen:t}),toggleProject:t=>e(e=>({expandedProjects:{...e.expandedProjects,[t]:!(e.expandedProjects[t]??!0)}})),expandProject:t=>e(e=>({expandedProjects:{...e.expandedProjects,[t]:!0}})),setExpandedProjects:t=>e({expandedProjects:t}),focusComposer:()=>e(e=>({focusComposerNonce:e.focusComposerNonce+1}))}),{name:`larness.nav.v1`,version:1,partialize:e=>({projectId:e.projectId,sessionId:e.sessionId,draftSession:e.draftSession,sidebarWidth:e.sidebarWidth,resourceWidth:e.resourceWidth,sidebarCollapsed:e.sidebarCollapsed,resourceCollapsed:e.resourceCollapsed,expandedProjects:e.expandedProjects,expandedFileDirectories:e.expandedFileDirectories})})),_W=yM(e=>({draft:``,drafts:{},setDraft:t=>e(e=>{let n=gW.getState().sessionId,r={...e.drafts,[n]:t};return t===``&&delete r[n],{draft:t,drafts:r}})}));gW.subscribe((e,t)=>{e.sessionId!==t.sessionId&&_W.setState({draft:_W.getState().drafts[e.sessionId]??``})});var vW=[`.`],yW=e=>e.split(`/`).slice(0,-1).join(`/`)||`.`,bW=(e,t)=>e===`.`?t:`${e}/${t}`;function xW({projectId:e,onQuickOpen:t}){let n=gW(e=>e.sessionId),{data:r}=uM(),i=pW(e,n,r.sessions);return(0,g.jsx)(SW,{scope:i,onQuickOpen:t},BM(i))}function SW({scope:e,onQuickOpen:t}){let n=BM(e),r=gW(e=>e.resourceWidth),i=gW(e=>e.expandedFileDirectories[n]??vW),a=gW(e=>e.fileReveal?.scope===n?e.fileReveal:null),[o,s]=(0,h.useState)(null),[c,l]=(0,h.useState)(null),[u,d]=(0,h.useState)(!1),f=(0,h.useRef)(!1),p=(0,h.useRef)(null),[m,_]=(0,h.useState)(!1),[v,y]=(0,h.useState)(null),b=(0,h.useRef)(null),x=(0,h.useRef)(null),S=(0,h.useRef)(null),C=(0,h.useRef)(!1);(0,h.useLayoutEffect)(()=>(C.current=!0,()=>{C.current=!1,x.current?.abort()}),[]),fW(e,i);let w=t=>{x.current?.abort(),x.current=new AbortController;let{signal:n}=x.current;y(null),KM(e,t,`projectId`in e?`project`:`workspace`in e?`global`:`session`,{signal:n,treeWidth:r}).catch(e=>{n.aborted||y(GM(e))})},T=()=>{let e=b.current?.closest(`[data-file-tree-scroll]`);S.current=e?{element:e,top:e.scrollTop}:null},E=e=>{f.current||(y(null),p.current=null,d(!1),e.action===`createFile`||e.action===`createDirectory`?S.current||T():S.current=null,l(e))},D=(e,t)=>{gW.getState().setExpandedFileDirectories(n,[...new Set([...i,t])]),E({action:e,path:t})},O=e=>{let t=[...b.current?.querySelectorAll(`[data-file-path]`)??[]].find(e=>e.dataset.filePath===o),n=o&&t?t.hasAttribute(`aria-expanded`)?o:yW(o):`.`;D(e,n)},k=async t=>{if(!c||f.current)return;(c.action===`createFile`||c.action===`createDirectory`||c.action===`rename`)&&l(null);let r=c.action===`deleteFile`||c.action===`deleteDirectory`,i=c.action===`createFile`||c.action===`createDirectory`;if(c.action!==`move`&&!r&&(!t||/[\\/:]/.test(t)||t===`.`||t===`..`)){y(`请输入一个有效的名称。`);return}f.current=!0,_(!0),y(null);let a=c.action;try{let u;if(p.current?.value===t)u=p.current.input;else if(`expectedVersion`in c)u={scope:e,action:c.action,path:c.path,confirmed:!0,expectedVersion:c.expectedVersion};else if(c.action===`rename`||c.action===`move`){let n=a===`rename`?bW(yW(c.path),t):bW(t,c.path.split(`/`).at(-1)??c.path);if(n===c.path){l(null);return}if(c.directoryVersion)u={scope:e,action:`moveDirectory`,path:c.path,destination:n,expectedVersion:c.directoryVersion};else{let t=await HM(e,c.path),r=CM.getState();if(r.saving[t.realPath]){y(`正在保存该文件,请稍后重试。`);return}let i=`${t.realPath.replaceAll(`\\`,`/`).slice(0,-t.path.length)}${n}`;if(Object.keys(r.drafts).some(e=>e.replaceAll(`\\`,`/`)===i)){y(`目标路径有未保存的草稿,请先处理该草稿。`);return}u={scope:e,action:`move`,path:c.path,destination:n,expectedVersion:r.drafts[t.realPath]?.baseVersion??t.version}}}else u={scope:e,action:c.action,path:bW(c.path,t)};p.current?.value!==t&&(p.current={value:t,input:u,key:crypto.randomUUID()});let d=await Ete(u,p.current.key);if(u.action===`move`&&YM(e,d),u.action===`moveDirectory`&&(Dte(e,d),cM.invalidateQueries({queryKey:[`files`,n,`content`]})),r&&cM.invalidateQueries({queryKey:a===`deleteDirectory`?[`files`,n,`content`]:VM(e,d.path)}),i?await cM.invalidateQueries({queryKey:[`files`,n,`directory`]}):await cM.resetQueries({queryKey:[`files`,n,`directory`]}),cM.invalidateQueries({queryKey:[`file-search`,n]}),!C.current)return;if(l(null),r){if((o===d.path||o?.startsWith(`${d.path}/`))&&s(null),a===`deleteDirectory`){let e=gW.getState(),t=e.expandedFileDirectories[n]??vW;e.setExpandedFileDirectories(n,t.filter(e=>e!==d.path&&!e.startsWith(`${d.path}/`)))}return}let f=gW.getState();if(u.action===`moveDirectory`&&d.previousPath){let e=d.previousPath,t=f.expandedFileDirectories[n]??vW;f.setExpandedFileDirectories(n,t.map(t=>t===e||t.startsWith(`${e}/`)?d.path+t.slice(e.length):t))}if(f.revealFile(n,d.path,a===`createFile`||a===`createDirectory`?{scroll:`none`}:void 0),i&&S.current){let{element:e,top:t}=S.current;S.current=null,requestAnimationFrame(()=>{requestAnimationFrame(()=>{C.current&&(e.scrollTop=t)})})}a===`createFile`&&w(d.path)}catch(e){e instanceof dj&&e.status<500&&(p.current=null),C.current&&r&&e instanceof dj&&[`VERSION_CONFLICT`,`NOT_FOUND`,`PATH_OUTSIDE_PROJECT`].includes(e.code)?(d(!0),y(`文件已变化或不存在,请刷新后重新发起删除。`),cM.resetQueries({queryKey:[`files`,n,`directory`]})):C.current&&(y(GM(e)),a===`deleteDirectory`&&(cM.invalidateQueries({queryKey:[`files`,n]}),cM.invalidateQueries({queryKey:[`file-search`,n]})))}finally{f.current=!1,C.current&&_(!1)}},A=e=>{let t=i.includes(e);t&&o?.startsWith(`${e}/`)&&s(e),gW.getState().setExpandedFileDirectories(n,t?i.filter(t=>t!==e&&!t.startsWith(`${e}/`)):[...i,e])},j=e=>{if(gW.getState().fileReveal!==a)return;if(gW.setState({fileReveal:null}),e===null){y(`无法在文件树中定位该文件。`);return}let t=[...b.current?.querySelectorAll(`[data-file-path]`)??[]].find(t=>t.dataset.filePath===e);y(null),s(e),t?.focus({preventScroll:!0}),a?.scroll!==`none`&&t?.scrollIntoView?.({block:a?.scroll??`center`})},M=e=>{let t=e.target.closest(`[data-file-path]`);if(!t)return;let n=[...e.currentTarget.querySelectorAll(`[data-file-path]`)],r=n.indexOf(t),a=t.dataset.filePath;if(!a)return;let o=t.hasAttribute(`aria-expanded`),s=i.includes(a),c;switch(e.key){case`ArrowDown`:c=n[r+1];break;case`ArrowUp`:c=n[r-1];break;case`ArrowLeft`:o&&s?A(a):c=n.find(e=>e.dataset.filePath===t.dataset.parentPath);break;case`ArrowRight`:o&&!s?A(a):n[r+1]?.dataset.parentPath===a&&(c=n[r+1]);break;case`Enter`:if(o)return;w(a);break;default:return}e.preventDefault(),c?.focus({preventScroll:!0}),c?.scrollIntoView?.({block:`nearest`})},N=async e=>{try{await navigator.clipboard.writeText(e)}catch{y(`无法复制路径,请检查浏览器的剪贴板权限。`)}};return(0,g.jsxs)(`div`,{className:`p-1.5 text-[11px] text-ink-2`,children:[(0,g.jsxs)(`div`,{role:`toolbar`,"aria-label":`文件操作`,className:`file-tree-toolbar sticky top-0 isolate z-10 -mt-1.5 -mr-1.5 mb-1 ml-auto flex w-fit min-h-9 items-center gap-0.5 px-1.5`,children:[(0,g.jsx)(`button`,{type:`button`,"aria-label":`新建文件`,title:`新建文件`,disabled:m,className:`rounded p-1.5 hover:bg-surface-2`,onPointerDown:T,onClick:()=>O(`createFile`),children:(0,g.jsx)(Fo,{size:13})}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`新建目录`,title:`新建目录`,disabled:m,className:`rounded p-1.5 hover:bg-surface-2`,onPointerDown:T,onClick:()=>O(`createDirectory`),children:(0,g.jsx)(Vo,{size:13})}),t?(0,g.jsx)(`button`,{type:`button`,"aria-label":`快速打开文件`,"aria-keyshortcuts":`Meta+P Control+P`,title:`快速打开文件(⌘P / Ctrl+P)`,className:`rounded p-1.5 hover:bg-surface-2`,onClick:t,children:(0,g.jsx)(Zs,{size:13})}):null,(0,g.jsx)(`button`,{type:`button`,"aria-label":`复制相对路径`,title:`复制相对路径`,disabled:!o,className:`rounded p-1.5 hover:bg-surface-2 disabled:opacity-40`,onClick:()=>{o&&N(o)},children:(0,g.jsx)(yo,{size:13})}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`全部折叠`,title:`全部折叠`,disabled:i.length===1,className:`rounded p-1.5 hover:bg-surface-2 disabled:opacity-40`,onClick:()=>{o?.includes(`/`)&&s(null),gW.getState().setExpandedFileDirectories(n,vW)},children:(0,g.jsx)(io,{size:13})})]}),(0,g.jsx)(qc,{message:c?.action===`move`||c?.action===`deleteFile`||c?.action===`deleteDirectory`?null:v,onDismiss:()=>y(null)}),c?.action===`move`?(0,g.jsx)(kte,{scope:e,source:c.path,directorySource:!!c.directoryVersion,busy:m,error:v,move:e=>void k(e),close:()=>l(null)}):null,c?.action===`deleteFile`||c?.action===`deleteDirectory`?(0,g.jsx)(Ate,{path:c.path,directory:c.action===`deleteDirectory`,busy:m,error:v,stale:u,remove:()=>void k(``),close:()=>l(null)}):null,(0,g.jsx)(`fieldset`,{ref:b,"aria-label":`文件树`,className:`min-w-0`,onKeyDown:M,children:(0,g.jsx)(CW,{scope:e,path:`.`,depth:0,expanded:i,toggle:A,selected:o,select:s,copy:e=>void N(e),chat:e=>{let{draft:t,setDraft:n}=_W.getState();n(`${t}${t&&!/\s$/.test(t)?` `:``}${e} `),gW.getState().focusComposer()},open:w,reveal:a?.path??null,finishReveal:j,edit:c,busy:m,begin:E,beginCreate:D,submit:e=>void k(e),cancel:()=>{S.current=null,l(null)}})})]})}function CW(e){let{scope:t,path:n,depth:r,expanded:i,toggle:a,selected:o,select:s,copy:c,chat:l,open:u,reveal:d,finishReveal:f,edit:p,busy:m,begin:_,beginCreate:v,submit:y,cancel:b}=e,x=[`files`,BM(t),`directory`,n],S=$g({queryKey:x,initialPageParam:void 0,queryFn:({pageParam:e})=>WM(t,n,e),getNextPageParam:e=>e.nextCursor??void 0,staleTime:0}),C=S.data?.pages.flatMap(e=>e.items)??[],w=n===`.`?d:d?.startsWith(`${n}/`)&&d.slice(n.length+1),T=w?w.split(`/`)[0]:null,E=T?C.find(e=>e.name===T):void 0;return(0,h.useLayoutEffect)(()=>{T&&(S.isError?f(null):E?E.path===d?f(E.path):E.type!==`directory`&&f(null):!S.isFetching&&S.isSuccess&&(S.hasNextPage?S.fetchNextPage():f(null)))},[T,E,d,f,S]),(0,g.jsxs)(g.Fragment,{children:[S.isPending?(0,g.jsx)(`p`,{className:`p-2 text-ink-3`,children:`正在读取目录…`}):null,(0,g.jsx)(qc,{message:S.isError?GM(S.error):null,retry:{label:`重新加载目录`,run:()=>void cM.resetQueries({queryKey:x})}}),p?.path===n&&(p.action===`createFile`||p.action===`createDirectory`)?(0,g.jsx)(`div`,{style:{paddingLeft:6+r*12},children:(0,g.jsx)(XM,{label:p.action===`createFile`?`新文件名`:`新目录名`,initial:``,kind:p.action===`createFile`?`file`:`directory`,busy:m,submit:y,cancel:b},p.action)}):null,C.map(t=>{let d=t.type===`directory`,f=d&&i.includes(t.path),h=t.entryVersion,x=(0,g.jsxs)(`button`,{type:`button`,"data-file-path":t.path,"data-parent-path":n,title:t.path,"aria-label":d?`目录 ${t.name}`:`打开文件 ${t.name}`,"aria-expanded":d?f:void 0,"aria-current":o===t.path||void 0,className:B(`flex h-[26px] w-full items-center gap-1.5 rounded px-1.5 text-left hover:bg-accent-soft`,o===t.path&&`bg-accent-soft text-accent`),style:{paddingLeft:6+r*12},onFocus:()=>s(t.path),onClick:()=>{s(t.path),d&&a(t.path)},onDoubleClick:d?void 0:()=>u(t.path),children:[d?(0,g.jsxs)(g.Fragment,{children:[f?(0,g.jsx)(Xa,{size:11}):(0,g.jsx)(eo,{size:11}),(0,g.jsx)(Go,{size:13,className:`text-warning`})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:`w-[11px]`}),(0,g.jsx)(dW,{path:t.path})]}),(0,g.jsx)(`span`,{className:`truncate`,children:t.name})]});return(0,g.jsxs)(`div`,{children:[p?.action===`rename`&&p.path===t.path?(0,g.jsx)(`div`,{className:`min-w-0`,style:{paddingLeft:6+r*12},children:(0,g.jsx)(XM,{label:`新名称`,initial:t.name,kind:t.type,busy:m,submit:y,cancel:b})}):d&&!h?x:(0,g.jsx)(Ote,{copy:()=>c(t.path),chat:()=>l(t.path),createFile:d?()=>v(`createFile`,t.path):void 0,createDirectory:d?()=>v(`createDirectory`,t.path):void 0,rename:()=>_({action:`rename`,path:t.path,directoryVersion:d?h:void 0}),move:()=>_({action:`move`,path:t.path,directoryVersion:d?h:void 0}),remove:h?()=>_({action:d?`deleteDirectory`:`deleteFile`,path:t.path,expectedVersion:h}):void 0,children:x}),f?(0,g.jsx)(CW,{...e,path:t.path,depth:r+1}):null]},t.path)}),n===`.`&&S.isSuccess&&!C.length?(0,g.jsx)(`p`,{className:`px-2 py-3 text-[10.5px] text-ink-3`,children:`当前工作区暂无文件`}):null,S.hasNextPage?(0,g.jsx)(`button`,{type:`button`,className:`px-3 py-2 text-accent`,disabled:S.isFetchingNextPage,onClick:()=>void S.fetchNextPage(),children:`加载更多文件`}):null]})}var wW={running:`bg-success`,idle:`bg-ink-3`,waiting:`bg-warning`,error:`bg-danger`,info:`bg-accent`};function TW({tone:e=`idle`,pulse:t=!1,className:n}){return(0,g.jsx)(`span`,{className:B(`relative inline-flex h-1.5 w-1.5 shrink-0 rounded-full`,wW[e],n),children:t?(0,g.jsx)(`span`,{className:B(`absolute inset-0 animate-ping rounded-full opacity-60`,wW[e])}):null})}async function EW(e){return Y(`/api/projects/${encodeURIComponent(e)}/git/status`)}async function DW(e,t,n){return Y(`/api/projects/${encodeURIComponent(e)}/git/diff?path=${encodeURIComponent(t)}&staged=${n}`)}async function OW(e,t=100,n=0){return(await Y(`/api/projects/${encodeURIComponent(e)}/git/branches?limit=${t}&cursor=${n}`)).items}async function kW(e,t){return Y(`/api/projects/${encodeURIComponent(e)}/git/actions`,{method:`POST`,csrf:!0,body:t})}async function AW(e,t){return Y(`/api/projects/${encodeURIComponent(e)}/git/remote-actions`,{method:`POST`,csrf:!0,body:t})}async function jW(e){return Y(`/api/resource-actions/${encodeURIComponent(e)}/execute`,{method:`POST`,csrf:!0,body:{}})}function MW(){return{folders:new Map,files:[]}}function NW(e){let t=MW();for(let n of e){let e=t;for(let t of n.path.split(`/`).slice(0,-1)){e.folders.has(t)||e.folders.set(t,MW());let n=e.folders.get(t);n&&(e=n)}e.files.push(n)}return t}var PW={modified:`M`,added:`A`,deleted:`D`,renamed:`R`,untracked:`U`,conflicted:`!`},FW=`grid min-h-6 min-w-0 flex-1 grid-cols-[11px_13px_minmax(0,1fr)] items-center gap-1.5 text-left`;function IW(e,t){return[...e.files.filter(e=>e.staged===t&&e.status!==`conflicted`).map(e=>e.path),...[...e.folders.values()].flatMap(e=>IW(e,t))]}function LW({path:e,paths:t,staged:n,disabled:r,onApply:i}){if(!t.length)return null;let a=n?`取消暂存`:`暂存`,o=t.length>200,s=o?`此目录下有 ${t.length} 个文件,单次最多处理 200 个,请选择子目录或文件`:`${a}此目录下 ${t.length} 个文件`,c=n?xs:Vs;return(0,g.jsx)(`button`,{type:`button`,disabled:r||o,"aria-label":`${a}目录 ${e}`,title:s,onClick:()=>i(t),className:`flex h-6 w-6 shrink-0 items-center justify-center rounded text-ink-3 opacity-0 transition-opacity hover:bg-surface group-hover/folder-row:opacity-100 group-focus-within/folder-row:opacity-100 focus:opacity-100 disabled:opacity-30 [@media(hover:none)]:opacity-100`,children:(0,g.jsx)(c,{size:13})})}function RW({changes:e,disabled:t,onOpen:n,onStage:r,onUnstage:i,onStageFolder:a,onUnstageFolder:o,onDiscard:s}){let[c,l]=(0,h.useState)(()=>new Set);function u(e,d,f){return(0,g.jsxs)(g.Fragment,{children:[[...e.folders].sort(([e],[t])=>e.localeCompare(t)).map(([e,n])=>{let r=n,i=e;for(;!r.files.length&&r.folders.size===1;){let e=[...r.folders][0];if(!e)break;i+=`/${e[0]}`,r=e[1]}let s=`${f}${e}`,p=`${f}${i}`,m=c.has(s);return(0,g.jsxs)(`div`,{children:[(0,g.jsxs)(`div`,{style:{paddingLeft:8+d*12},className:`group/folder-row flex min-h-6 min-w-0 items-center gap-1.5 rounded-md pr-5 text-[11px] text-ink-2 hover:bg-surface-2 focus-within:bg-surface-2`,children:[(0,g.jsxs)(`button`,{type:`button`,"aria-expanded":!m,title:p,className:FW,onClick:()=>l(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t}),children:[(0,g.jsx)(eo,{size:11,className:`shrink-0 transition-transform motion-reduce:transition-none ${m?``:`rotate-90`}`}),(0,g.jsx)(Go,{size:13,className:`shrink-0 text-warning`}),(0,g.jsx)(`span`,{className:`truncate`,children:i})]}),(0,g.jsx)(LW,{path:p,paths:IW(r,!1),staged:!1,disabled:t,onApply:a}),(0,g.jsx)(LW,{path:p,paths:IW(r,!0),staged:!0,disabled:t,onApply:o})]}),!m&&u(r,d+1,`${p}/`)]},e)}),e.files.sort((e,t)=>e.path.localeCompare(t.path)).map(e=>(0,g.jsxs)(`div`,{style:{paddingLeft:8+d*12},className:`group flex min-w-0 items-center gap-1 rounded-md pr-1 hover:bg-surface-2 focus-within:bg-surface-2`,children:[(0,g.jsxs)(`button`,{type:`button`,title:e.origPath?`${e.origPath} → ${e.path}`:e.path,"aria-label":`查看差异 ${e.path}${e.staged?`(已暂存)`:``}`,onClick:()=>n(e),className:`${FW} py-1 text-[11px] text-ink-2`,children:[(0,g.jsx)(No,{size:13,className:`col-start-2 text-accent`}),(0,g.jsx)(`span`,{className:`truncate`,children:e.path.split(`/`).at(-1)})]}),!e.staged&&e.status!==`conflicted`?(0,g.jsx)(`button`,{type:`button`,disabled:t,"aria-label":`暂存 ${e.path}`,title:`暂存更改`,onClick:()=>r(e.path),className:`flex h-6 w-6 shrink-0 items-center justify-center rounded text-ink-3 opacity-0 transition-opacity hover:bg-surface group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100 disabled:opacity-30 [@media(hover:none)]:opacity-100`,children:(0,g.jsx)(Vs,{size:13})}):null,e.staged?(0,g.jsx)(`button`,{type:`button`,disabled:t,"aria-label":`取消暂存 ${e.path}`,title:`取消暂存(保留工作区修改)`,onClick:()=>i(e.path),className:`flex h-6 w-6 shrink-0 items-center justify-center rounded text-ink-3 opacity-0 transition-opacity hover:bg-surface group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100 disabled:opacity-30 [@media(hover:none)]:opacity-100`,children:(0,g.jsx)(xs,{size:13})}):e.status===`conflicted`?null:(0,g.jsx)(`button`,{type:`button`,disabled:t,"aria-label":`放弃更改 ${e.path}`,title:e.status===`untracked`?`放弃更改(删除未跟踪文件)`:`放弃未暂存更改`,onClick:()=>s(e),className:`flex h-6 w-6 shrink-0 items-center justify-center rounded text-ink-3 opacity-0 transition-opacity hover:bg-danger/10 hover:text-danger group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100 disabled:opacity-30 [@media(hover:none)]:opacity-100`,children:(0,g.jsx)(Cc,{size:13})}),(0,g.jsx)(`span`,{title:e.status,className:`w-4 shrink-0 text-center font-mono text-[10px] ${e.status===`deleted`||e.status===`conflicted`?`text-danger`:e.status===`untracked`||e.status===`added`?`text-success`:`text-warning`}`,children:PW[e.status]??e.status.slice(0,1).toUpperCase()})]},e.path))]})}return(0,g.jsx)(`div`,{children:u(NW(e),0,``)})}function zW({projectId:e}){return(0,g.jsx)(UW,{projectId:e},e??`none`)}function BW(e,t){return`diff:${e}:${t}`}function VW(e){if(!(e instanceof dj))return`Git 操作结果暂无法确认,请核对本地和远端分支状态后再试。`;if(e.code===`GIT_UNAVAILABLE`)return`Git 暂不可用,请检查主机上的 Git 和当前仓库。`;if(e.status>=500)return`Git 操作结果暂无法确认,请核对本地和远端分支状态后再试。`;if(e.code===`GIT_AUTH_REQUIRED`)return`远端认证失败,请检查运行 Larness 的主机上的 Git 凭据。`;if(e.code===`GIT_CONFLICT`)switch(e.message){case`Git operation would overwrite local changes`:return`拉取会覆盖本地未提交的改动,请先提交、暂存或移除这些文件再拉取。`;case`Resolve conflicts before pulling`:return`还有未解决的冲突,请先处理冲突再拉取。`;case`Git operation cannot be applied without a merge`:return`本地与上游分支无法快进,请先在终端处理分叉。`;case`Git push requires integrating upstream changes`:return`上游分支有新提交,请先拉取并处理可能的分叉。`;case`Git command timed out`:return`Git 操作超时,请核对本地和远端分支状态后再试。`;default:return`Git 操作未完成,请核对当前分支、上游和工作区状态后再试。`}return fj(e,`Git 操作失败,请核对状态后重试。`)}function HW(e){if(!(e instanceof dj))return`Git 操作失败,请核对状态后重试。`;if(e.code===`VERSION_CONFLICT`)return`Git 状态已变化,请在列表刷新后重新选择。`;if(e.code===`GIT_CONFLICT`)switch(e.message){case`Project is locked by another writer`:return`项目正被其他写入者占用(Agent 运行或终端命令),请等它结束后重试。`;case`Repository changed before the Git action executed`:return`Git 状态在操作执行前发生了变化,请在列表刷新后重新选择。`;case`Git command timed out`:return`Git 操作超时,请核对工作区状态后重试。`;default:return`Git 拒绝了这次操作,请核对工作区状态后重试。`}return fj(e,`Git 操作失败,请核对状态后重试。`)}function UW({projectId:e}){let[t,n]=(0,h.useState)(null),r=zM(e=>e.open),[i,a]=(0,h.useState)(!1),[o,s]=(0,h.useState)(``),c=(0,h.useRef)(!1),[l,u]=(0,h.useState)(null),d=l!==null,[f,p]=(0,h.useState)(``),[m,_]=(0,h.useState)(``),[v,y]=(0,h.useState)(``),b=Jg({queryKey:[`git`,`status`,e],queryFn:()=>EW(e??``),enabled:e!==null,refetchInterval:3e3,retry:!1}),x=Jg({queryKey:[`git`,`branches`,e],queryFn:()=>OW(e??``),enabled:e!==null,retry:!1}),S=()=>{n(null),p(``)};if(e===null)return(0,g.jsx)(`p`,{className:`px-2 py-3 text-[10.5px] text-ink-3`,children:`暂无 Git 仓库`});if(b.isPending)return(0,g.jsx)(`p`,{className:`px-2 py-3 text-[10.5px] text-ink-3`,children:`读取 Git 状态…`});if(b.isError&&!b.data)return(0,g.jsx)(`p`,{className:`px-2 py-3 text-[10.5px] text-ink-3`,children:`Git 暂不可用`});let C=b.data;if(!C)return null;let w=[...C.staged.map(e=>({...e,staged:!0})),...C.unstaged.map(e=>({...e,staged:!1})),...C.untracked.map(e=>({path:e,origPath:null,status:`untracked`,staged:!1})),...C.conflicts.map(e=>({...e,staged:!1}))],T=async()=>{await Promise.all([b.refetch(),x.refetch()])},E=async(e,t=`local`)=>{if(!c.current){c.current=!0,u(t),p(``),_(``);try{await e(),await T()}catch(e){p(t===`local`?HW(e):VW(e)),await T()}finally{c.current=!1,u(null)}}},D=t=>E(async()=>{if((await jW((await kW(e,t)).id)).status!==`COMPLETED`)throw Error(`Git 操作未完成,请重试核对。`);t.action===`discard`&&n(null),t.action===`commit`&&s(``),t.action===`createBranch`&&y(``)}),O=t=>E(async()=>{if((await AW(e,{action:t,expectedSnapshot:C.snapshotVersion,requestId:crypto.randomUUID()})).status!==`COMPLETED`)throw Error(`Git remote action did not complete`);_(t===`pull`?`拉取完成`:`推送完成`)},t),k=w.filter(e=>e.staged),A=[...new Map(w.filter(e=>!e.staged).map(e=>[e.path,e])).values()],j=d||b.isError,M=j||!C.upstream||!C.head,N=t=>r({kind:`git-diff`,resourceId:BW(e,t.path),title:t.path.split(`/`).pop()??t.path,projectId:e,source:`project`,git:{path:t.path,staged:t.staged}}),P=()=>{!j&&o.trim()&&k.length&&D({action:`commit`,message:o.trim()})};return(0,g.jsxs)(`div`,{"data-testid":`git-panel`,className:`relative flex h-full min-h-0 flex-col px-1 pb-1`,children:[(0,g.jsx)(`div`,{className:`shrink-0 px-1 pb-2`,children:(0,g.jsxs)(`div`,{className:`relative`,children:[(0,g.jsx)(pm,{"aria-label":`提交信息`,value:o,disabled:d,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),P())},rows:2,placeholder:`提交信息(⌘ / Ctrl + Enter)`,className:`block resize-none border-line-strong bg-surface pt-2 pb-10 text-[11px]`}),(0,g.jsx)(`button`,{type:`button`,title:`仅提交已暂存的更改`,"aria-label":`提交已暂存 (${k.length})`,disabled:j||!o.trim()||!k.length,onClick:P,className:`absolute right-2 bottom-2 grid size-7 place-items-center rounded-full bg-accent text-white transition-opacity enabled:hover:opacity-85 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 disabled:opacity-40`,children:(0,g.jsx)(Ja,{size:14})})]})}),(0,g.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:[[{title:`已暂存`,rows:k},{title:`更改`,rows:A}].map(e=>(0,g.jsxs)(`details`,{open:!0,hidden:!e.rows.length,className:`mb-1`,children:[(0,g.jsxs)(`summary`,{className:`flex cursor-pointer items-center gap-2 px-2 py-1.5 text-[11px] font-medium text-ink-2`,children:[(0,g.jsx)(`span`,{children:e.title}),(0,g.jsx)(`span`,{className:`ml-auto rounded-full bg-accent-soft px-1.5 text-[10px] text-accent`,children:e.rows.length})]}),(0,g.jsx)(RW,{changes:e.rows,disabled:j,onOpen:N,onStage:e=>void D({action:`add`,paths:[e]}),onUnstage:e=>void D({action:`unstage`,paths:[e]}),onStageFolder:e=>void D({action:`stageFiles`,paths:e,expectedSnapshot:C.snapshotVersion}),onUnstageFolder:e=>void D({action:`unstageFiles`,paths:e,expectedSnapshot:C.snapshotVersion}),onDiscard:e=>{p(``),n(e)}})]},e.title)),w.length?null:(0,g.jsx)(`p`,{className:`px-2 py-3 text-[11px] text-ink-3`,children:`工作区干净`})]}),(0,g.jsxs)(`div`,{className:`relative mt-1 flex shrink-0 items-center gap-1 border-t border-line px-1 pt-1.5 text-ink-3`,role:`toolbar`,"aria-label":`Git 操作`,children:[(0,g.jsxs)(`button`,{type:`button`,disabled:j,"aria-label":`管理分支`,title:C.upstream??`未设置上游`,onClick:()=>a(e=>!e),"aria-expanded":i,className:`flex min-w-0 flex-1 items-center gap-1 rounded px-1 py-1 text-[10.5px] hover:bg-surface-2 disabled:opacity-40`,children:[(0,g.jsx)(qo,{size:13,className:`shrink-0`}),(0,g.jsxs)(`span`,{className:`flex min-w-0 flex-col text-left leading-tight`,children:[(0,g.jsx)(`span`,{className:`truncate text-ink-2`,children:C.branch}),(0,g.jsx)(`span`,{className:`truncate text-[9px]`,children:C.upstream??`未设置上游`})]})]}),(0,g.jsxs)(`span`,{className:`shrink-0 font-mono text-[9px]`,title:`传入 / 传出提交`,children:[`↓`,C.behind,` ↑`,C.ahead]}),(0,g.jsx)(`button`,{type:`button`,disabled:M,"aria-label":`拉取(仅快进)`,"aria-busy":l===`pull`,title:C.upstream?`从 ${C.upstream} 拉取(仅快进)`:`当前分支未设置上游`,onClick:()=>void O(`pull`),className:`rounded p-1.5 hover:bg-surface-2 disabled:opacity-40`,children:l===`pull`?(0,g.jsx)(ds,{size:13,className:`animate-spin motion-reduce:animate-none`}):(0,g.jsx)(Ma,{size:13})}),(0,g.jsx)(`button`,{type:`button`,disabled:M,"aria-label":`推送`,"aria-busy":l===`push`,title:C.upstream?`推送到 ${C.upstream}`:`当前分支未设置上游`,onClick:()=>void O(`push`),className:`rounded p-1.5 hover:bg-surface-2 disabled:opacity-40`,children:l===`push`?(0,g.jsx)(ds,{size:13,className:`animate-spin motion-reduce:animate-none`}):(0,g.jsx)(Ba,{size:13})}),(0,g.jsx)(`button`,{type:`button`,disabled:d,"aria-label":`刷新 Git`,"aria-busy":l===`local`,title:`刷新 Git`,onClick:()=>void E(async()=>{}),className:`rounded p-1.5 hover:bg-surface-2 disabled:opacity-40`,children:(0,g.jsx)(Us,{size:12,className:l===`local`?`animate-spin motion-reduce:animate-none`:``})}),i?(0,g.jsxs)(`section`,{"aria-label":`分支管理`,className:`absolute bottom-full left-0 right-0 z-10 mb-2 space-y-2 rounded-xl border border-line bg-surface p-3 shadow-lg`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] font-medium text-ink-2`,children:[`分支`,(0,g.jsx)(`button`,{type:`button`,"aria-label":`关闭分支管理`,onClick:()=>a(!1),children:(0,g.jsx)(Oc,{size:12})})]}),(0,g.jsx)(hm,{label:`切换分支`,value:C.branch,disabled:j||!x.data,onValueChange:e=>{e!==C.branch&&D({action:`switchBranch`,name:e})},placeholder:C.branch,options:(x.data??[]).map(e=>({value:e.name,label:e.name}))}),(0,g.jsxs)(`form`,{className:`flex gap-1`,onSubmit:e=>{e.preventDefault(),!j&&v.trim()&&D({action:`createBranch`,name:v.trim()})},children:[(0,g.jsx)(fm,{"aria-label":`新分支名`,value:v,onChange:e=>y(e.target.value),placeholder:`新分支名`,className:`min-w-0 flex-1 py-1 text-[11px]`}),(0,g.jsx)(`button`,{type:`submit`,"aria-label":`创建分支`,title:`创建分支`,disabled:j||!v.trim(),className:`rounded border border-line px-2 disabled:opacity-40`,children:(0,g.jsx)(Vs,{size:13})})]})]}):null]}),(0,g.jsx)(Jc,{open:t!==null,title:`放弃更改?`,description:t?.status===`untracked`?`该文件尚未被 Git 跟踪,确认后将删除,无法通过 Git 恢复。`:`该文件的未暂存修改将丢失,恢复为暂存区版本;已暂存内容会保留。`,confirmLabel:`确认放弃`,danger:!0,pending:d,confirmDisabled:b.isError,error:f,onDismissError:()=>p(``),onCancel:S,onConfirm:()=>{t&&D({action:`discard`,path:t.path,confirmed:!0})},children:(0,g.jsx)(`p`,{className:`break-all rounded bg-surface-2 p-2 font-mono text-xs`,children:t?.path})}),t===null?(0,g.jsx)(qc,{message:f||(b.isError?`Git 状态读取失败,请刷新后继续。`:i&&x.isError?`分支读取失败,请刷新重试。`:null),onDismiss:f?()=>p(``):void 0}):null,(0,g.jsx)(`span`,{role:`status`,className:`sr-only`,children:m})]})}var WW=[{id:`files`,label:`文件`,icon:zo},{id:`git`,label:`Git`,icon:qo}];function GW({onQuickOpen:e}={}){let{data:t}=uM(),n=gW(e=>e.projectId),r=gW(e=>e.resourceWidth),i=gW(e=>e.resourceTab),a=gW(e=>e.setResourceTab);n===`prj_larness`&&t.gitChanges;let o={files:void 0,git:void 0};return(0,g.jsx)(`aside`,{"aria-label":`项目资源`,"data-project-resources":!0,className:`hidden shrink-0 bg-surface/40 xl:flex xl:flex-col`,style:{width:r},children:(0,g.jsxs)(Pm,{value:i,onValueChange:e=>a(e),className:`flex min-h-0 flex-1 flex-col`,children:[(0,g.jsx)(`div`,{className:`shrink-0 px-2.5 pb-1.5 pt-2.5`,children:(0,g.jsx)(Fm,{"aria-label":`项目资源分区`,className:`flex w-full`,children:WW.map(({id:e,label:t,icon:n})=>(0,g.jsxs)(Im,{id:`resource-tab-${e}`,value:e,className:`h-7 flex-1 justify-center gap-1.5 px-2`,children:[(0,g.jsx)(n,{size:13,className:`shrink-0`}),(0,g.jsx)(`span`,{className:`truncate`,children:t}),typeof o[e]==`number`?(0,g.jsx)(`span`,{className:`shrink-0 rounded-full bg-surface-2 px-1.5 text-[10px] leading-4 text-ink-3`,children:o[e]}):null]},e))})}),(0,g.jsx)(`div`,{role:`tabpanel`,id:`resource-files`,"aria-labelledby":`resource-tab-files`,"data-file-tree-scroll":!0,hidden:i!==`files`,className:`min-h-0 flex-1 scroll-pt-11 overflow-y-auto px-2 pb-2`,children:(0,g.jsx)(xW,{projectId:n,onQuickOpen:e})}),(0,g.jsx)(`div`,{role:`tabpanel`,id:`resource-git`,"aria-labelledby":`resource-tab-git`,hidden:i!==`git`,className:`min-h-0 flex-1 overflow-y-auto px-2 pb-2 pt-2`,children:(0,g.jsx)(zW,{projectId:n})})]})})}function KW(){return Jg({queryKey:[`bootstrap`],queryFn:()=>Y(`/api/bootstrap`),staleTime:5e3,retry:!1})}function qW(e=!0){return Jg({queryKey:[`session`],enabled:e,queryFn:async()=>{try{let e=await Y(`/api/auth/session`);return mj(e.csrfToken),e}catch(e){if(e instanceof dj&&e.code===`UNAUTHENTICATED`)return mj(null),null;throw e}},retry:!1,staleTime:0,refetchInterval:3e4})}function JW(){let e=wh();(0,h.useEffect)(()=>{let t=()=>{e.invalidateQueries({queryKey:[`session`]}),e.invalidateQueries({queryKey:[`bootstrap`]})};return window.addEventListener(`larness:unauthenticated`,t),()=>window.removeEventListener(`larness:unauthenticated`,t)},[e])}function YW(){let e=wh(),t=Fv();return async()=>{try{await Y(`/api/auth/logout`,{method:`POST`,csrf:!0})}finally{mj(null),e.clear(),t(`/`,{replace:!0})}}}function XW({session:e,open:t,onClose:n}){let r=wh(),[i,a]=(0,h.useState)(``),[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(null);(0,h.useEffect)(()=>{a(e?.title??``),l(null),s(!1)},[e]);let u=async()=>{if(e!==null&&i.trim()){s(!0),l(null);try{await zj(e.id,{title:i.trim()}),await r.invalidateQueries({queryKey:[`workspace`]}),n()}catch(e){l(fj(e,`重命名失败`))}finally{s(!1)}}};return(0,g.jsx)(Hc,{open:t&&e!==null,onOpenChange:e=>e?void 0:n(),children:(0,g.jsxs)(Wc,{children:[(0,g.jsx)(Gc,{children:`重命名会话`}),(0,g.jsx)(Kc,{children:`标题只用于展示,不参与授权。`}),(0,g.jsx)(fm,{value:i,onChange:e=>a(e.target.value),"aria-label":`会话标题`,autoFocus:!0,className:`mt-4 h-9`}),(0,g.jsx)(qc,{message:c,onDismiss:()=>l(null)}),(0,g.jsxs)(`div`,{className:`mt-5 flex justify-end gap-2`,children:[(0,g.jsx)(V,{variant:`secondary`,size:`sm`,onClick:n,children:`取消`}),(0,g.jsx)(V,{variant:`primary`,size:`sm`,disabled:o||!i.trim(),onClick:()=>void u(),children:o?`正在保存…`:`保存`})]})]})})}var ZW=[`jobs`],QW=[`jobs`,`summary`],$W=e=>[`jobs`,`detail`,e],eG=e=>[`jobs`,`runs`,e];async function tG(){return Y(`/api/jobs`)}async function nG(){return Y(`/api/jobs/summary`)}async function rG(e){return Y(`/api/jobs/${encodeURIComponent(e)}`)}async function iG(e){return Y(`/api/jobs`,{method:`POST`,csrf:!0,body:e})}async function aG(e,t){return Y(`/api/jobs/${encodeURIComponent(e)}`,{method:`PATCH`,csrf:!0,body:t})}async function oG(e){await Y(`/api/jobs/${encodeURIComponent(e)}`,{method:`DELETE`,csrf:!0})}async function sG(e){return Y(`/api/jobs/${encodeURIComponent(e)}/run`,{method:`POST`,csrf:!0})}async function cG(e,t){let n=new URLSearchParams({limit:`50`});return t&&n.set(`cursor`,t),Y(`/api/jobs/${encodeURIComponent(e)}/runs?${n.toString()}`)}async function lG(e){return Y(`/api/job-runs/${encodeURIComponent(e)}/cancel`,{method:`POST`,csrf:!0})}var uG=`h-[min(680px,calc(100dvh-24px))]`;function dG({icon:e,title:t,description:n,closeLabel:r,count:i,actions:a,children:o,testId:s,widthClassName:c,bodyClassName:l,onEscapeKeyDown:u}){return(0,g.jsxs)(Wc,{className:B(`flex flex-col overflow-hidden p-0`,uG,c??`w-[min(920px,calc(100vw-24px))]`),...s===void 0?{}:{"data-testid":s},...u===void 0?{}:{onEscapeKeyDown:u},children:[(0,g.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center gap-2 border-b border-line px-4`,children:[(0,g.jsx)(`span`,{className:`grid size-7 shrink-0 place-items-center rounded-lg bg-accent-soft text-accent`,children:(0,g.jsx)(e,{size:14,"aria-hidden":`true`})}),(0,g.jsx)(Gc,{className:`text-[12.5px] font-semibold`,children:t}),(0,g.jsx)(Kc,{className:`sr-only`,children:n}),i===void 0?null:(0,g.jsx)(`span`,{className:`rounded-full bg-surface-2 px-1.5 py-[1px] text-[9.5px] text-ink-3`,children:i}),(0,g.jsx)(`div`,{className:`flex-1`}),a,(0,g.jsx)(Uc,{asChild:!0,children:(0,g.jsx)(V,{size:`sm`,variant:`ghost`,"aria-label":r,children:(0,g.jsx)(Oc,{size:14})})})]}),(0,g.jsx)(`div`,{className:B(`flex min-h-0 flex-1 flex-col`,l),children:o})]})}function fG({icon:e,title:t,hint:n,action:r,compact:i=!1,className:a}){return(0,g.jsxs)(`div`,{className:B(`flex h-full min-h-[180px] flex-col items-center justify-center gap-2 p-6 text-center`,i&&`min-h-[140px] gap-1.5 p-4`,a),children:[(0,g.jsx)(`span`,{className:B(`grid place-items-center rounded-xl bg-surface-2 text-ink-3`,i?`size-8`:`size-10`),children:(0,g.jsx)(e,{size:i?15:18,"aria-hidden":`true`})}),(0,g.jsx)(`p`,{className:B(`font-medium text-ink`,i?`text-[11.5px]`:`text-[12px]`),children:t}),n===void 0?null:(0,g.jsx)(`p`,{className:`max-w-[280px] text-[10.5px] leading-relaxed text-ink-3`,children:n}),r]})}function pG(e,t=Date.now()){let n=Math.max(0,t-e),r=Math.floor(n/6e4);if(r<1)return`刚刚`;if(r<60)return`${r} 分钟前`;let i=Math.floor(r/60);return i<24?`${i} 小时前`:`${Math.floor(i/24)} 天前`}function mG(e,t){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=0)return null;let n=Math.max(0,e),r=1024**3;if(t>=1024*r){let e=1024*r;return{used:`${(n/e).toFixed(1)}`,total:`${(t/e).toFixed(1)} TB`}}if(t>=100*r)return{used:`${Math.round(n/r)}`,total:`${Math.round(t/r)} GB`};let i=t>=10*r?0:1;return{used:`${(n/r).toFixed(1)}`,total:`${(t/r).toFixed(i)} GB`}}function hG(e,t){return!Number.isFinite(e)||!Number.isFinite(t)||t<=0?0:Math.min(100,Math.max(0,e/t*100))}var gG={queued:`排队中`,running:`运行中`,succeeded:`成功`,failed:`失败`,timed_out:`超时`,cancelled:`已取消`,interrupted:`已中断`,skipped:`已跳过`},_G={queued:`text-warning`,running:`text-accent`,succeeded:`text-success`,failed:`text-danger`,timed_out:`text-danger`,cancelled:`text-ink-3`,interrupted:`text-danger`,skipped:`text-ink-3`},vG={scheduled:`计划`,manual:`手动`,catch_up:`补跑`},yG={script:`脚本`,agent:`Agent`};function bG(e){return new Date(e).toLocaleString(`zh-CN`,{hour12:!1})}function xG(e){return e.schedule.type===`cron`?`Cron ${e.schedule.expression} · ${e.schedule.timezone}`:`每 ${e.schedule.seconds} 秒 · ${e.schedule.timezone}`}function SG(e){return e===null?`—`:e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.floor(e/6e4)}m ${Math.round(e%6e4/1e3)}s`}function CG(e){return e.lastStatus}function wG({open:e,onOpenChange:t}){let n=wh(),[r,i]=(0,h.useState)(null),[a,o]=(0,h.useState)(null),[s,c]=(0,h.useState)(!1),[l,u]=(0,h.useState)(null),d=Jg({queryKey:ZW,queryFn:tG,enabled:e,refetchInterval:e?5e3:!1}),f=Jg({queryKey:$W(r??``),queryFn:()=>rG(r??``),enabled:e&&r!==null,refetchInterval:e&&r!==null?2e3:!1}),p=Jg({queryKey:eG(r??``),queryFn:()=>cG(r??``),enabled:e&&r!==null,refetchInterval:e&&r!==null?2e3:!1}),m=Jg({queryKey:[`projects`,`jobs`],queryFn:_j,enabled:e}),_=Jg({queryKey:[`model-catalog`,`jobs`],queryFn:wj,enabled:e&&a!==null});(0,h.useEffect)(()=>{e||(i(null),o(null),c(!1),u(null))},[e]),(0,h.useEffect)(()=>{d.data&&!d.isFetching&&r!==null&&!d.data.items.some(e=>e.id===r)&&(i(null),c(!1))},[d.data,r,d.isFetching]);let v=()=>{n.invalidateQueries({queryKey:ZW}),n.invalidateQueries({queryKey:QW}),r!==null&&(n.invalidateQueries({queryKey:$W(r)}),n.invalidateQueries({queryKey:eG(r)}))},y=Qg({mutationFn:e=>sG(e),retry:!1,onMutate:()=>u(null),onError:e=>u(fj(e,`执行失败`)),onSettled:v}),b=Qg({mutationFn:e=>lG(e),retry:!1,onMutate:()=>u(null),onError:e=>u(fj(e,`取消失败`)),onSettled:v}),x=Qg({mutationFn:e=>oG(e),retry:!1,onMutate:()=>u(null),onError:e=>u(fj(e,`删除失败`)),onSuccess:()=>{i(null),c(!1)},onSettled:v}),S=Qg({mutationFn:({id:e,enabled:t})=>aG(e,{enabled:t}),retry:!1,onMutate:()=>u(null),onError:e=>u(fj(e,`更新失败`)),onSettled:v}),C=()=>{i(null),o(null),c(!1),u(null),t(!1)},w=f.data;return(0,g.jsx)(Hc,{open:e,onOpenChange:e=>{e||C()},children:(0,g.jsxs)(dG,{icon:ho,title:`自动化任务`,description:`管理 Cron / 固定间隔的脚本与 Agent 任务,查看运行历史`,closeLabel:`关闭自动化任务`,count:d.data?.items.length??0,testId:`jobs-dialog`,actions:(0,g.jsxs)(V,{size:`sm`,variant:`ghost`,disabled:d.isFetching,onClick:()=>void d.refetch(),children:[(0,g.jsx)(Us,{size:12,className:d.isFetching?`animate-spin`:void 0}),`刷新`]}),children:[(0,g.jsx)(qc,{message:l??(d.isError?`任务列表读取失败,请刷新重试。`:null),onDismiss:l?()=>u(null):void 0}),a===null?r===null?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`div`,{className:`flex shrink-0 items-center justify-end border-b border-line px-3 py-2`,children:(0,g.jsxs)(V,{size:`sm`,variant:`secondary`,onClick:()=>o(`new`),children:[(0,g.jsx)(Vs,{size:12}),`新建任务`]})}),(0,g.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-2`,children:d.isPending?(0,g.jsx)(`p`,{role:`status`,className:`p-2 text-[11px] text-ink-3`,children:`正在读取任务…`}):d.data?.items.length?(0,g.jsx)(`div`,{className:`space-y-1`,children:d.data.items.map(e=>(0,g.jsxs)(`button`,{type:`button`,"aria-label":`${e.name} ${e.lastStatus?gG[e.lastStatus]:`未运行`}`,onClick:()=>i(e.id),className:`flex w-full items-center gap-3 rounded-lg border border-transparent px-2 py-2 text-left hover:border-line hover:bg-surface-2`,children:[(0,g.jsx)(`span`,{className:B(`h-1.5 w-1.5 shrink-0 rounded-full`,e.enabled?`bg-success`:`bg-ink-3/40`)}),(0,g.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,g.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`truncate text-[12px] font-medium`,children:e.name}),(0,g.jsx)(`span`,{className:`rounded bg-surface-2 px-1.5 text-[9.5px] text-ink-3`,children:yG[e.kind]}),!e.enabled&&(0,g.jsx)(`span`,{className:`text-[9.5px] text-ink-3`,children:`已停用`})]}),(0,g.jsx)(`span`,{className:`mt-0.5 block truncate text-[10px] text-ink-3`,children:xG(e)})]}),(0,g.jsxs)(`span`,{className:`shrink-0 text-right`,children:[(0,g.jsx)(TG,{status:e.lastStatus}),(0,g.jsx)(`span`,{className:`mt-0.5 block text-[10px] text-ink-3`,children:e.nextRunAt?`下次 ${bG(e.nextRunAt)}`:`不排期`})]})]},e.id))}):d.isError?null:(0,g.jsx)(fG,{icon:ho,title:`还没有定时任务`,hint:`创建脚本或 Agent 任务,按 Cron / 间隔在本机执行。`})})]}):(0,g.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col`,"aria-label":`任务详情`,children:[(0,g.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 border-b border-line px-3 py-2`,children:[(0,g.jsx)(V,{size:`sm`,variant:`ghost`,"aria-label":`返回任务列表`,onClick:()=>{i(null),c(!1)},children:(0,g.jsx)(Pa,{size:12})}),(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,g.jsx)(`h3`,{className:`truncate text-[12.5px] font-semibold`,children:w?.name??`任务`}),w!==void 0&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:`rounded bg-surface-2 px-1.5 py-0.5 text-[10px] text-ink-3`,children:yG[w.kind]}),(0,g.jsx)(TG,{status:CG(w)}),(0,g.jsx)(`span`,{className:`text-[10px] text-ink-3`,children:w.enabled?`已启用`:`已停用`})]})]}),(0,g.jsx)(`p`,{className:`mt-1 text-[10px] text-ink-3`,children:w===void 0?`正在读取任务…`:xG(w)})]}),w!==void 0&&(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[(0,g.jsx)(V,{size:`sm`,variant:`ghost`,onClick:()=>S.mutate({id:w.id,enabled:!w.enabled}),disabled:S.isPending,children:w.enabled?`停用`:`启用`}),(0,g.jsxs)(V,{size:`sm`,variant:`secondary`,onClick:()=>y.mutate(w.id),disabled:y.isPending,children:[(0,g.jsx)(zs,{size:12}),`立即执行`]}),(0,g.jsx)(V,{size:`sm`,variant:`secondary`,onClick:()=>o(w),children:`编辑`}),(0,g.jsxs)(V,{size:`sm`,variant:`danger`,onClick:()=>c(!0),disabled:x.isPending,children:[(0,g.jsx)(yc,{size:12}),`删除`]})]})]}),s&&w!==void 0&&(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-line bg-danger/5 px-3 py-2 text-[11px]`,children:[(0,g.jsx)(`span`,{children:`删除后不再触发,运行历史保留。运行中的任务会被取消。`}),(0,g.jsx)(`div`,{className:`flex-1`}),(0,g.jsx)(V,{size:`sm`,variant:`ghost`,onClick:()=>c(!1),children:`取消`}),(0,g.jsx)(V,{size:`sm`,variant:`danger`,onClick:()=>x.mutate(w.id),disabled:x.isPending,children:`确认删除`})]}),w===void 0?(0,g.jsx)(`p`,{role:`status`,className:`p-3 text-[11px] text-ink-3`,children:`正在读取任务详情…`}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`grid shrink-0 grid-cols-2 gap-2 px-3 py-2 md:grid-cols-4`,children:[(0,g.jsx)(EG,{label:`下一次运行`,value:w.nextRunAt?bG(w.nextRunAt):`—`}),(0,g.jsx)(EG,{label:`最近运行`,value:w.lastRunAt?pG(w.lastRunAt):`—`}),(0,g.jsx)(EG,{label:`超时`,value:`${w.timeoutSeconds} 秒`}),(0,g.jsx)(EG,{label:`错过触发`,value:w.missedPolicy===`run_once`?`补跑一次`:`跳过`})]}),(0,g.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 pb-3`,children:(0,g.jsxs)(`div`,{className:`grid gap-2 md:grid-cols-2`,children:[(0,g.jsx)(DG,{title:`执行配置`,children:w.kind===`script`?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`p`,{className:`mb-2 rounded bg-warning/10 px-2 py-1.5 text-[10.5px] text-warning`,children:`脚本以本机账户权限运行,可访问项目外文件和网络。输出有长度限制并经过脱敏。`}),(0,g.jsx)(`pre`,{className:`max-h-48 overflow-auto rounded bg-surface-2 p-2 text-[10.5px] leading-relaxed`,children:w.script?.source??``})]}):(0,g.jsxs)(`dl`,{className:`space-y-2 text-[11px]`,children:[(0,g.jsx)(OG,{label:`审批策略`,value:w.agent?.approvalPolicy===`autonomous`?`完全自主`:`只读`}),(0,g.jsx)(OG,{label:`模型`,value:w.agent?.model??`继承会话默认`}),(0,g.jsx)(OG,{label:`提示词`,value:(0,g.jsx)(`span`,{className:`whitespace-pre-wrap`,children:w.agent?.prompt??``})}),w.agent?.sessionId&&(0,g.jsx)(OG,{label:`会话`,value:(0,g.jsx)(`button`,{type:`button`,className:`text-accent hover:underline`,onClick:()=>{gW.getState().openPinnedSession(w.agent?.sessionId??``,w.projectId),C()},children:`打开任务会话`})})]})}),(0,g.jsx)(DG,{title:`运行历史`,children:p.isPending?(0,g.jsx)(`p`,{className:`text-[11px] text-ink-3`,children:`正在读取运行历史…`}):p.data?.items.length?(0,g.jsx)(`div`,{className:`space-y-2`,children:p.data.items.map(e=>(0,g.jsx)(kG,{run:e,onCancel:()=>b.mutate(e.id),onOpenSession:e.sessionId?()=>{gW.getState().openPinnedSession(e.sessionId??``,w.projectId),C()}:void 0,cancelling:b.isPending},e.id))}):(0,g.jsx)(`p`,{className:`text-[11px] text-ink-3`,children:`还没有运行记录。`})})]})})]})]}):(0,g.jsx)(AG,{job:a===`new`?null:a,projects:m.data??[],catalog:_.data??null,onCancel:()=>o(null),onSaved:async e=>{o(null),i(e.id),v()},onError:u})]})})}function TG({status:e}){return e===null?(0,g.jsx)(`span`,{className:`text-[10px] text-ink-3`,children:`未运行`}):(0,g.jsx)(`span`,{className:B(`text-[10px] font-medium`,_G[e]),children:gG[e]})}function EG({label:e,value:t}){return(0,g.jsxs)(`div`,{className:`rounded-lg bg-surface-2 px-2 py-1.5`,children:[(0,g.jsx)(`div`,{className:`text-[9.5px] text-ink-3`,children:e}),(0,g.jsx)(`div`,{className:`mt-0.5 truncate text-[11px]`,children:t})]})}function DG({title:e,children:t}){return(0,g.jsxs)(`section`,{className:`rounded-lg border border-line p-2`,children:[(0,g.jsx)(`h4`,{className:`mb-2 text-[11px] font-semibold`,children:e}),t]})}function OG({label:e,value:t}){return(0,g.jsxs)(`div`,{className:`flex gap-2`,children:[(0,g.jsx)(`dt`,{className:`w-16 shrink-0 text-ink-3`,children:e}),(0,g.jsx)(`dd`,{className:`min-w-0 flex-1`,children:t})]})}function kG({run:e,onCancel:t,onOpenSession:n,cancelling:r}){let i=e.status===`running`||e.status===`queued`;return(0,g.jsxs)(`div`,{className:`rounded-lg border border-line px-2 py-1.5 text-[10.5px]`,children:[(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,g.jsx)(TG,{status:e.status}),(0,g.jsx)(`span`,{className:`text-ink-3`,children:vG[e.trigger]}),(0,g.jsx)(`span`,{className:`text-ink-3`,children:pG(e.createdAt)}),(0,g.jsx)(`span`,{className:`text-ink-3`,children:SG(e.durationMs)}),(0,g.jsx)(`span`,{className:`flex-1`}),i&&(0,g.jsxs)(V,{size:`sm`,variant:`ghost`,onClick:t,disabled:r,children:[(0,g.jsx)(dc,{size:10}),`取消`]}),n&&(0,g.jsx)(V,{size:`sm`,variant:`ghost`,onClick:n,children:`打开会话`})]}),e.output&&(0,g.jsx)(`pre`,{className:`mt-1 max-h-24 overflow-auto rounded bg-surface-2 p-1.5 text-[10px]`,children:e.output}),e.errorMessage&&(0,g.jsx)(`p`,{className:`mt-1 text-[10px] text-danger`,children:e.errorMessage})]})}function AG({job:e,projects:t,catalog:n,onCancel:r,onSaved:i,onError:a}){let o=(0,h.useId)(),[s,c]=(0,h.useState)(e?.name??``),[l,u]=(0,h.useState)(e?.projectId??``),[d,f]=(0,h.useState)(e?.kind??`script`),[p,m]=(0,h.useState)(e?.schedule.type??`cron`),[_,v]=(0,h.useState)(e?.schedule.type===`cron`?e.schedule.expression:`0 9 * * *`),[y,b]=(0,h.useState)(e?.schedule.type===`interval`?String(e.schedule.seconds):`300`),[x,S]=(0,h.useState)(e?.schedule.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone),[C,w]=(0,h.useState)(String(e?.timeoutSeconds??600)),[T,E]=(0,h.useState)(e?.missedPolicy??`skip`),[D,O]=(0,h.useState)(e?.script?.source??`console.log("hello")`),[k,A]=(0,h.useState)(e?.agent?.prompt??``),[j,M]=(0,h.useState)(e?.agent?.approvalPolicy??`readonly`),[N,P]=(0,h.useState)(e?.agent?.model&&e.agent.credentialProfileId?`${e.agent.credentialProfileId}::${e.agent.model}`:``),[ee,F]=(0,h.useState)(e?.agent?.approvalPolicy===`autonomous`),[I,te]=(0,h.useState)(!1),[ne,re]=(0,h.useState)(null),ie=(n?.groups??[]).flatMap(e=>e.models.filter(e=>e.visible!==!1).map(t=>({key:`${e.credentialProfileId}::${t.id}`,label:`${e.credentialLabel} · ${t.label}`}))),ae=async()=>{re(null);let t=s.trim();if(!t)return re(`请填写任务名称`);if(p===`cron`&&_.trim().split(/\s+/).length!==5)return re(`Cron 必须是 5 字段表达式`);let n=Number(y);if(p===`interval`&&(!Number.isInteger(n)||n<60))return re(`间隔至少 60 秒`);let r=Number(C);if(!Number.isInteger(r)||r<60||r>3600)return re(`超时需在 60–3600 秒之间`);if(d===`agent`&&!k.trim())return re(`请填写 Agent 提示词`);if(d===`script`&&!D.trim())return re(`请填写脚本源码`);if(d===`agent`&&j===`autonomous`&&!ee)return re(`请先确认完全自主风险`);let o=p===`cron`?{type:`cron`,expression:_.trim(),timezone:x.trim()}:{type:`interval`,seconds:n,timezone:x.trim()},[c,u]=N?N.split(`::`):[null,null],f=d===`script`?{name:t,projectId:l||null,kind:`script`,schedule:o,enabled:e?.enabled??!0,timeoutSeconds:r,missedPolicy:T,script:{source:D}}:{name:t,projectId:l||null,kind:`agent`,schedule:o,enabled:e?.enabled??!0,timeoutSeconds:r,missedPolicy:T,agent:{prompt:k.trim(),model:u??null,credentialProfileId:c??null,thinking:e?.agent?.thinking??null,approvalPolicy:j}},m={name:t,enabled:e?.enabled??!0,schedule:o,timeoutSeconds:r,missedPolicy:T,...d===`script`?{script:{source:D}}:{agent:{prompt:k.trim(),model:u??null,credentialProfileId:c??null,thinking:e?.agent?.thinking??null,approvalPolicy:j}}};te(!0);try{i(e?await aG(e.id,m):await iG(f))}catch(e){a(fj(e,`保存任务失败,请重试。`))}finally{te(!1)}};return(0,g.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3`,children:[(0,g.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,g.jsx)(V,{size:`sm`,variant:`ghost`,"aria-label":`取消编辑`,onClick:r,children:(0,g.jsx)(Pa,{size:12})}),(0,g.jsx)(`h3`,{className:`text-[12.5px] font-semibold`,children:e?`编辑任务`:`新建任务`})]}),(0,g.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,g.jsx)(jG,{label:`名称`,children:(0,g.jsx)(fm,{value:s,onChange:e=>c(e.target.value)})}),(0,g.jsx)(jG,{label:`项目`,children:(0,g.jsx)(hm,{label:`项目`,value:l,onValueChange:u,disabled:e!==null,options:[{value:``,label:`默认工作区`},...t.filter(e=>e.kind!=="default").map(e=>({value:e.id,label:e.name}))]})}),(0,g.jsx)(jG,{label:`类型`,children:(0,g.jsx)(hm,{label:`类型`,value:d,onValueChange:f,disabled:e!==null,options:[{value:`script`,label:`脚本`},{value:`agent`,label:`Agent`}]})}),(0,g.jsx)(jG,{label:`触发方式`,children:(0,g.jsx)(hm,{label:`触发方式`,value:p,onValueChange:m,options:[{value:`cron`,label:`Cron`},{value:`interval`,label:`固定间隔`}]})}),p===`cron`?(0,g.jsx)(jG,{label:`Cron(分 时 日 月 周)`,children:(0,g.jsx)(fm,{value:_,onChange:e=>v(e.target.value)})}):(0,g.jsx)(jG,{label:`间隔(秒)`,children:(0,g.jsx)(fm,{type:`number`,min:60,value:y,onChange:e=>b(e.target.value)})}),(0,g.jsx)(jG,{label:`时区(IANA)`,children:(0,g.jsx)(fm,{value:x,onChange:e=>S(e.target.value)})}),(0,g.jsx)(jG,{label:`超时(秒)`,children:(0,g.jsx)(fm,{type:`number`,min:60,max:3600,value:C,onChange:e=>w(e.target.value)})}),(0,g.jsx)(jG,{label:`错过触发`,children:(0,g.jsx)(hm,{label:`错过触发`,value:T,onValueChange:E,options:[{value:`skip`,label:`跳过`},{value:`run_once`,label:`补跑一次`}]})}),d===`script`?(0,g.jsxs)(`div`,{className:`md:col-span-2`,children:[(0,g.jsx)(jG,{label:`脚本源码(Node ESM)`,children:(0,g.jsx)(pm,{className:`h-40 resize-y font-mono leading-relaxed`,value:D,onChange:e=>O(e.target.value)})}),(0,g.jsx)(`p`,{className:`mt-1 text-[10px] text-warning`,children:`脚本以本机账户权限运行,可访问项目外文件和网络。`})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`div`,{className:`md:col-span-2`,children:(0,g.jsx)(jG,{label:`Agent 提示词`,children:(0,g.jsx)(pm,{className:`h-28 resize-y leading-relaxed`,value:k,onChange:e=>A(e.target.value)})})}),(0,g.jsx)(jG,{label:`审批策略`,children:(0,g.jsx)(hm,{label:`审批策略`,value:j,onValueChange:e=>{M(e),F(!1)},options:[{value:`readonly`,label:`只读`},{value:`autonomous`,label:`完全自主`}]})}),(0,g.jsx)(jG,{label:`模型`,children:(0,g.jsx)(hm,{label:`模型`,value:N,onValueChange:P,options:[{value:``,label:`继承会话默认`},...ie.map(e=>({value:e.key,label:e.label}))]})}),j===`autonomous`&&(0,g.jsxs)(`label`,{htmlFor:`${o}-confirm-autonomous`,className:`md:col-span-2 flex items-start gap-2 rounded-lg border border-danger/30 bg-danger/5 px-2 py-2 text-[11px]`,children:[(0,g.jsx)(mm,{id:`${o}-confirm-autonomous`,className:`mt-0.5`,checked:ee,onChange:e=>F(e.target.checked)}),(0,g.jsx)(`span`,{children:`我了解:该任务无人值守运行,可按完全自主策略执行已登记工具(含文件写入 / 命令)。程序以本机账户权限运行,可访问项目外文件和网络。`})]})]})]}),ne&&(0,g.jsx)(`p`,{role:`alert`,className:`mt-2 text-[11px] text-danger`,children:ne}),(0,g.jsxs)(`div`,{className:`mt-3 flex justify-end gap-2`,children:[(0,g.jsx)(V,{size:`sm`,variant:`ghost`,onClick:r,children:`取消`}),(0,g.jsx)(V,{size:`sm`,variant:`secondary`,onClick:()=>void ae(),disabled:I,children:I?`保存中…`:`保存`})]})]})}function jG({label:e,children:t}){return(0,g.jsxs)(`label`,{className:`block`,children:[(0,g.jsx)(`span`,{className:`mb-1 block text-[10.5px] text-ink-3`,children:e}),t]})}var MG={all:[`memory`],project:e=>[`memory`,`project`,e],projectList:(e,t={})=>[`memory`,`project`,e,t],global:[`memory`,`global`],globalList:(e={})=>[`memory`,`global`,e]};function NG(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&r!==``&&t.set(n,String(r));let n=t.toString();return n.length===0?``:`?${n}`}async function PG(e,t={}){return Y(`/api/projects/${encodeURIComponent(e)}/memories${NG(t)}`)}async function FG(e,t){return Y(`/api/projects/${encodeURIComponent(e)}/memories`,{method:`POST`,body:t,csrf:!0})}async function IG(e,t,n){return Y(`/api/projects/${encodeURIComponent(e)}/memories/${encodeURIComponent(t)}`,{method:`PATCH`,body:n,csrf:!0})}async function LG(e,t,n){await Y(`/api/projects/${encodeURIComponent(e)}/memories/${encodeURIComponent(t)}?expectedUpdatedAt=${n}`,{method:`DELETE`,csrf:!0})}async function RG(e,t){return Y(`/api/projects/${encodeURIComponent(e)}/memories/${encodeURIComponent(t)}/restore`,{method:`POST`,csrf:!0})}async function zG(e={}){return Y(`/api/memories/global${NG(e)}`)}async function BG(e){return Y(`/api/memories/global`,{method:`POST`,body:e,csrf:!0})}async function VG(e,t){return Y(`/api/memories/global/${encodeURIComponent(e)}`,{method:`PATCH`,body:t,csrf:!0})}async function HG(e,t){await Y(`/api/memories/global/${encodeURIComponent(e)}?expectedUpdatedAt=${t}`,{method:`DELETE`,csrf:!0})}async function UG(e){return Y(`/api/memories/global/${encodeURIComponent(e)}/restore`,{method:`POST`,csrf:!0})}function WG(e){return e<1024?`${e} B`:`${(e/1024).toFixed(1)} KiB`}function GG(e){return Math.min(100,Math.round(e.activeBytes/Math.max(1,e.limits.activeBytes)*100))}function KG({status:e}){return(0,g.jsx)(`span`,{className:B(`rounded-full border px-1.5 py-[1px] text-[9px]`,e===`active`?`text-success border-success/30 bg-success/10`:e===`review`?`text-warning border-warning/30 bg-warning/10`:`text-ink-3 border-line bg-surface-2`),children:e})}function qG({open:e,onOpenChange:t,projectId:n,initialScope:r=`project`}){let i=wh(),a=Jg({queryKey:[`project`,n],queryFn:()=>xj(n??``),enabled:e&&n!==null}),o=a.data?.settings.memory?.enabled??!0,s=a.data?.settings.memory?.globalEnabled??!0,[c,l]=(0,h.useState)(n===null?`global`:r),[u,d]=(0,h.useState)(`active`),[f,p]=(0,h.useState)(null),[m,_]=(0,h.useState)(``),[v,y]=(0,h.useState)(``),[b,x]=(0,h.useState)(!1),[S,C]=(0,h.useState)(`fact`),[w,T]=(0,h.useState)(``),[E,D]=(0,h.useState)(``),[O,k]=(0,h.useState)(``),[A,j]=(0,h.useState)(null),[M,N]=(0,h.useState)(null);(0,h.useEffect)(()=>{e&&(l(n===null?`global`:r),p(null),x(!1),j(null))},[e,n,r]);let P=Jg({queryKey:c===`project`&&n!==null?MG.projectList(n,{status:u}):MG.globalList({status:u}),queryFn:()=>c===`project`&&n!==null?PG(n,{status:u,limit:200}):zG({status:u,limit:200}),enabled:e&&(c===`global`||n!==null)}),ee=P.data?.items??[],F=P.data?.budget,I=ee.find(e=>e.id===f)??null;(0,h.useEffect)(()=>{I===null?(_(``),y(``)):(_(I.title),y(I.body))},[I]);let te=Qg({mutationFn:async e=>e(),retry:!1,onMutate:()=>j(null),onError:e=>j(fj(e,`记忆操作失败`)),onSettled:async()=>{await i.invalidateQueries({queryKey:MG.all})}}),ne=e=>{te.mutate(e)},re=e=>{if(n===null)return;let t=e===`enabled`?{enabled:!o,globalEnabled:s}:{enabled:o,globalEnabled:!s};ne(async()=>{await Sj(n,{settings:{memory:t}}),await i.invalidateQueries({queryKey:[`workspace`]})})},ie=()=>{if(I===null)return;let e={title:m.trim(),body:v.trim(),expectedUpdatedAt:I.updatedAt};ne(()=>I.scope===`global`?VG(I.id,e):IG(n??``,I.id,e))},ae=e=>{ne(()=>e.scope===`global`?VG(e.id,{pinned:!e.pinned,expectedUpdatedAt:e.updatedAt}):IG(n??``,e.id,{pinned:!e.pinned,expectedUpdatedAt:e.updatedAt}))},oe=(e,t)=>{ne(()=>e.scope===`global`?VG(e.id,{status:t,expectedUpdatedAt:e.updatedAt}):IG(n??``,e.id,{status:t,expectedUpdatedAt:e.updatedAt}))};return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Hc,{open:e,onOpenChange:t,children:(0,g.jsxs)(dG,{icon:Wa,title:`记忆与偏好`,description:`管理项目记忆与跨项目用户偏好`,closeLabel:`关闭记忆与偏好`,count:F?.activeCount,actions:(0,g.jsx)(`div`,{className:`flex shrink-0 items-center gap-1 rounded-lg bg-surface-2 p-0.5`,children:[`project`,`global`].map(e=>(0,g.jsx)(`button`,{type:`button`,disabled:e===`project`&&n===null,onClick:()=>{l(e),p(null),x(!1)},className:B(`rounded-md px-2.5 py-1 text-[10.5px] disabled:opacity-40`,c===e?`bg-surface text-ink shadow-sm`:`text-ink-3`),children:e===`project`?`项目记忆`:`跨项目偏好`},e))}),children:[A?(0,g.jsx)(`div`,{className:`shrink-0 px-5 pt-3`,children:(0,g.jsx)(qc,{message:A,onDismiss:()=>j(null)})}):null,F?(0,g.jsxs)(`div`,{className:`shrink-0 border-b border-line px-5 py-2.5`,children:[n===null?null:(0,g.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-center gap-4 text-[10px] text-ink-3`,children:[(0,g.jsxs)(`label`,{className:`flex items-center gap-1.5`,children:[(0,g.jsx)(`input`,{type:`checkbox`,className:`accent-accent`,checked:o,onChange:()=>re(`enabled`)}),`启用项目记忆`]}),(0,g.jsxs)(`label`,{className:`flex items-center gap-1.5`,children:[(0,g.jsx)(`input`,{type:`checkbox`,className:`accent-accent`,checked:s,onChange:()=>re(`globalEnabled`)}),`允许跨项目偏好`]})]}),(0,g.jsxs)(`div`,{className:`flex items-center justify-between text-[10px] text-ink-3`,children:[(0,g.jsxs)(`span`,{children:[`active `,F.activeCount,` 条 · `,WG(F.activeBytes),` /`,` `,WG(F.limits.activeBytes)]}),(0,g.jsxs)(`span`,{children:[`总占用 `,WG(F.totalBytes),` / `,WG(F.limits.totalBytes),` `,`· review `,F.reviewCount]})]}),(0,g.jsx)(`div`,{className:`mt-1.5 h-1.5 overflow-hidden rounded-full bg-surface-2`,children:(0,g.jsx)(`div`,{className:B(`h-full rounded-full`,GG(F)>=90?`bg-danger`:`bg-accent`),style:{width:`${GG(F)}%`}})})]}):null,(0,g.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,g.jsxs)(`div`,{className:`flex min-h-0 w-[46%] min-w-0 flex-col border-r border-line`,children:[(0,g.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-line px-3 py-2`,children:[(0,g.jsx)(hm,{label:`状态`,value:u,options:[{value:`active`,label:`active`},{value:`review`,label:`review`},{value:`evicted`,label:`evicted`}],onValueChange:d}),(0,g.jsx)(V,{size:`sm`,variant:`soft`,leading:(0,g.jsx)(Vs,{size:12}),disabled:c===`project`&&n===null,onClick:()=>{x(!0),p(null)},children:`手动添加`})]}),(0,g.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto overscroll-contain p-1.5`,children:P.isLoading?(0,g.jsx)(`div`,{role:`status`,className:`px-2 py-6 text-center text-[11px] text-ink-3`,children:`正在读取记忆…`}):ee.length===0?(0,g.jsx)(fG,{icon:Wa,title:`还没有记忆`,hint:`Agent 会在发现稳定事实时自动学习。`,compact:!0}):ee.map(e=>(0,g.jsxs)(`button`,{type:`button`,onClick:()=>{p(e.id),x(!1)},className:B(`flex w-full flex-col gap-1 rounded-lg border px-2.5 py-2 text-left`,e.id===f?`border-accent/40 bg-accent-soft/60`:`border-transparent hover:border-line hover:bg-surface-2`),children:[(0,g.jsxs)(`div`,{className:`flex w-full items-center gap-1.5`,children:[(0,g.jsx)(`span`,{className:`truncate text-[11px] font-medium text-ink`,children:e.title}),e.pinned?(0,g.jsx)(Ls,{size:10,className:`shrink-0 text-accent`}):null,(0,g.jsx)(`span`,{className:`ml-auto shrink-0`,children:(0,g.jsx)(KG,{status:e.status})})]}),(0,g.jsxs)(`div`,{className:`flex w-full items-center gap-1.5 text-[9.5px] text-ink-3`,children:[(0,g.jsx)(`span`,{className:`rounded bg-surface-2 px-1`,children:e.kind}),(0,g.jsx)(`span`,{className:`truncate font-mono`,children:e.key}),e.stale?(0,g.jsx)(`span`,{className:`text-warning`,children:`stale`}):null]})]},e.id))})]}),(0,g.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,children:b?(0,g.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,g.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain p-5`,children:[(0,g.jsx)(`div`,{className:`text-[12px] font-medium text-ink`,children:`手动添加记忆`}),c===`project`?(0,g.jsx)(JG,{label:`类型`,children:(0,g.jsx)(hm,{label:`类型`,value:S,options:[{value:`fact`,label:`fact`},{value:`command`,label:`command`},{value:`gotcha`,label:`gotcha`},{value:`decision`,label:`decision`}],onValueChange:C})}):null,(0,g.jsx)(JG,{label:`key`,children:(0,g.jsx)(fm,{value:w,onChange:e=>T(e.target.value),placeholder:`build.test.command`})}),(0,g.jsx)(JG,{label:`标题`,children:(0,g.jsx)(fm,{value:E,onChange:e=>D(e.target.value),placeholder:`测试命令`})}),(0,g.jsx)(JG,{label:`内容`,children:(0,g.jsx)(pm,{value:O,onChange:e=>k(e.target.value),className:`h-32 resize-y font-mono`})})]}),(0,g.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-line px-5 py-3`,children:[(0,g.jsx)(V,{size:`sm`,variant:`secondary`,onClick:()=>x(!1),children:`取消`}),(0,g.jsx)(V,{size:`sm`,variant:`primary`,disabled:te.isPending||w.trim().length===0||E.trim().length===0||O.trim().length===0,onClick:()=>{let e={kind:c===`global`?`preference`:S,key:w.trim(),title:E.trim(),body:O.trim()};ne(async()=>{c===`global`?await BG(e):await FG(n??``,e),x(!1),T(``),D(``),k(``)})},children:`保存`})]})]}):I===null?(0,g.jsx)(fG,{icon:Wa,title:`选择一条记忆`,hint:`查看来源、使用情况与修订。`,compact:!0}):(0,g.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,g.jsxs)(`div`,{className:`shrink-0 space-y-2 border-b border-line px-5 py-3`,children:[(0,g.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,g.jsx)(KG,{status:I.status}),(0,g.jsx)(`span`,{className:`shrink-0 text-[10px] text-ink-3`,children:I.kind}),(0,g.jsx)(`span`,{className:`truncate font-mono text-[10px] text-ink-3`,children:I.key})]}),(0,g.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap gap-x-4 gap-y-1 text-[10px] text-ink-3`,children:[(0,g.jsxs)(`span`,{className:`max-w-[220px] truncate`,title:I.sourceTurnId??`用户创建`,children:[`来源 `,I.sourceTurnId??`用户创建`]}),(0,g.jsxs)(`span`,{children:[`使用 `,I.useCount,` 次`]}),(0,g.jsxs)(`span`,{children:[`修订 `,I.revisionCount]}),(0,g.jsxs)(`span`,{children:[`置信度 `,I.confidence.toFixed(2)]})]})]}),(0,g.jsxs)(`div`,{className:`flex shrink-0 flex-wrap justify-end gap-1`,children:[(0,g.jsx)(V,{size:`sm`,variant:`ghost`,leading:I.pinned?(0,g.jsx)(Fs,{size:12}):(0,g.jsx)(Ls,{size:12}),onClick:()=>ae(I),children:I.pinned?`取消固定`:`固定`}),I.status===`evicted`?(0,g.jsx)(V,{size:`sm`,variant:`soft`,leading:(0,g.jsx)(Gs,{size:12}),onClick:()=>ne(()=>I.scope===`global`?UG(I.id):RG(n??``,I.id)),children:`恢复`}):(0,g.jsx)(V,{size:`sm`,variant:`ghost`,leading:(0,g.jsx)(yc,{size:12}),onClick:()=>N(I),children:`忘记`})]})]}),I.status===`review`?(0,g.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-warning/25 bg-warning/5 px-3 py-2`,children:[(0,g.jsx)(`span`,{className:`text-[10.5px] text-ink-2`,children:`这条记忆需要确认。`}),(0,g.jsx)(V,{size:`sm`,variant:`primary`,onClick:()=>oe(I,`active`),children:`接受`}),(0,g.jsx)(V,{size:`sm`,variant:`secondary`,onClick:()=>oe(I,`rejected`),children:`拒绝`})]}):null]}),(0,g.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 px-5 py-3`,children:[(0,g.jsx)(JG,{label:`标题`,className:`shrink-0`,children:(0,g.jsx)(fm,{value:m,onChange:e=>_(e.target.value)})}),(0,g.jsx)(JG,{label:`内容`,className:`flex min-h-0 flex-1 flex-col`,children:(0,g.jsx)(pm,{value:v,onChange:e=>y(e.target.value),className:`min-h-[120px] flex-1 resize-none font-mono`})})]}),(0,g.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-3 border-t border-line px-5 py-3 text-[10px] text-ink-3`,children:[(0,g.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`更新 `,new Date(I.updatedAt).toLocaleString(),I.expiresAt?` · 过期 ${new Date(I.expiresAt).toLocaleDateString()}`:``]}),(0,g.jsx)(V,{size:`sm`,variant:`primary`,leading:(0,g.jsx)(Ys,{size:12}),disabled:te.isPending,onClick:ie,children:`保存`})]})]})})]})]})}),(0,g.jsx)(Jc,{open:M!==null,title:`忘记这条记忆`,description:`“${M?.title??``}”将不再注入上下文,并在 90 天内不会被重新学习。`,confirmLabel:`忘记`,danger:!0,pending:te.isPending,onCancel:()=>N(null),onConfirm:()=>{let e=M;e!==null&&(N(null),ne(()=>e.scope===`global`?HG(e.id,e.updatedAt):LG(n??``,e.id,e.updatedAt)))},overlayClassName:`z-[310]`,className:`z-[311]`})]})}function JG({label:e,children:t,className:n}){return(0,g.jsxs)(`fieldset`,{className:B(`m-0 block min-w-0 space-y-1 border-0 p-0`,n),children:[(0,g.jsx)(`legend`,{className:`p-0 text-[10px] text-ink-3`,children:e}),t]})}function YG(e){return{deepseek:`DeepSeek`,glm:`GLM`,"openai-compatible":`兼容`,"opencode-go":`OpenCode Go`,bailian:`阿里云百炼`,kimi:`Kimi`,minimax:`MiniMax`}[e]??e}function XG(e){return e===`usage`?`按量`:e===`subscription`?`套餐额度`:`计费方式未知`}var ZG=new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:1});function QG(e){if(e.contextWindow!==null)return{tokens:e.contextWindow,label:`上下文窗口`};let t=e.capabilities?.maxInputTokens;return t===void 0?void 0:{tokens:t,label:`最大输入`}}function $G(e){let t=QG(e);return t&&ZG.format(t.tokens)}function eK(e){if(!e.thinking.supported)return e.thinking.reasoning?`支持推理,档位由平台控制`:void 0;if(e.thinking.mode===`toggle`)return`思考可开启或关闭`;let t=e.thinking.levels.map(e=>e.label).join(`、`);return t?`思考档位:${t}`:`可调思考档位`}function tK(e){let t=e.capabilities?.inputModalities,n=e.capabilities?.tools,r=QG(e);return[t===void 0?`截图能力未知`:t.includes(`image`)?`支持截图`:`不支持截图`,n===void 0?`工具能力未知`:n?`支持工具调用`:`不支持工具调用`,eK(e)??`无可调思考档位`,r?`${r.label} ${r.tokens.toLocaleString(`zh-CN`)} token`:`未声明上下文窗口`].join(` · `)}function nK({model:e}){let t=$G(e),n=eK(e),r=e.capabilities?.inputModalities?.includes(`image`),i=e.capabilities?.tools;if(!t&&!n&&!r&&!i)return null;let a=tK(e);return(0,g.jsx)(Sh,{label:a,side:`top`,className:`z-[320] max-w-[240px] leading-relaxed`,children:(0,g.jsxs)(`span`,{role:`img`,"aria-label":a,tabIndex:0,className:`inline-flex shrink-0 items-center gap-1.5 rounded px-1 text-ink-3 outline-none focus-visible:ring-2 focus-visible:ring-accent/40`,children:[r?(0,g.jsx)(as,{size:13,"aria-hidden":`true`}):null,i?(0,g.jsx)(Ec,{size:13,"aria-hidden":`true`}):null,n?(0,g.jsx)(Wa,{size:13,"aria-hidden":`true`}):null,t?(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`font-mono text-[10px] tabular-nums`,children:t}):null]})})}function rK({model:e,isDefault:t,busy:n,verification:r,makeDefault:i,edit:a,verify:o,toggleVisibility:s}){let[c,l]=(0,h.useState)(!1),u=(0,h.useId)(),d=(0,h.useId)(),f=e.visible!==!1,p=e.agentSelectable??e.contextWindow!==null,m=p?null:e.capabilities?.tools===!1?`不支持工具`:e.capabilities?.streaming===!1?`不支持流式`:e.contextWindow===null&&e.capabilities?.maxInputTokens===void 0?`待补上下文`:`暂不可选`;return(0,g.jsxs)(`li`,{className:B(`px-2 py-1.5`,!f&&`bg-surface-2/50 text-ink-3`),children:[(0,g.jsxs)(`div`,{className:`relative flex items-center gap-2`,children:[(0,g.jsxs)(`button`,{type:`button`,"aria-label":e.label,"aria-describedby":t?u:void 0,"aria-expanded":c,"aria-controls":c?d:void 0,onClick:()=>l(!c),className:`flex min-w-0 flex-1 items-center gap-1.5 rounded py-1 text-left text-xs font-semibold outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-accent/40`,children:[(0,g.jsx)(`span`,{className:`truncate`,children:e.label}),t?(0,g.jsx)(`span`,{id:u,role:`img`,"aria-label":`新会话默认模型`,className:`shrink-0 text-accent`,children:(0,g.jsx)(pc,{size:12,fill:`currentColor`,"aria-hidden":`true`})}):null]}),(0,g.jsxs)(`div`,{className:`relative z-10 flex shrink-0 items-center gap-1.5`,children:[m?(0,g.jsx)(`span`,{className:`text-[10px] text-warning`,children:m}):null,r===`testing`?(0,g.jsxs)(`span`,{role:`status`,className:`inline-flex items-center gap-1 text-[10px] text-ink-3`,children:[(0,g.jsx)(ds,{size:12,className:`motion-safe:animate-spin`,"aria-hidden":`true`}),`测试中…`]}):r===`passed`?(0,g.jsxs)(`span`,{role:`status`,className:`sr-only`,children:[e.label,` 测试通过`]}):null,(0,g.jsx)(nK,{model:e}),(0,g.jsx)(V,{size:`sm`,variant:`ghost`,"aria-pressed":f,"aria-label":`${e.label} 在会话中显示`,title:f?`从会话选择器隐藏`:`在会话选择器显示`,disabled:n,onClick:s,children:f?(0,g.jsx)(jo,{size:13,"aria-hidden":`true`}):(0,g.jsx)(ko,{size:13,"aria-hidden":`true`})})]})]}),c?(0,g.jsxs)(`fieldset`,{id:d,"aria-label":`${e.label} 操作`,className:`mt-1 flex min-w-0 flex-wrap items-center gap-1`,children:[(0,g.jsxs)(V,{size:`sm`,variant:`ghost`,disabled:n||!f||!p||t,onClick:i,children:[(0,g.jsx)(pc,{size:13,"aria-hidden":`true`}),`设为默认`]}),(0,g.jsxs)(V,{size:`sm`,variant:`ghost`,disabled:n,onClick:a,children:[(0,g.jsx)(ss,{size:13,"aria-hidden":`true`}),`详情`]}),(0,g.jsxs)(V,{size:`sm`,variant:`ghost`,disabled:n||!p,onClick:o,children:[(0,g.jsx)(zs,{size:13,"aria-hidden":`true`}),`测试调用`,r===`passed`?(0,g.jsx)(`span`,{className:`text-[10px] text-ink-3`,children:`已验证`}):null]})]}):null]})}var iK=`z-[311] max-h-[calc(100dvh-32px)] w-[min(400px,calc(100vw-28px))] space-y-3 overflow-y-auto`;function aK(e){return e.candidatesOnly&&e.syncedAt!==null?`候选目录 · 调用待验证`:e.syncedAt===null?`尚未同步`:`同步于 ${new Date(e.syncedAt).toLocaleString(`zh-CN`,{hour12:!1})}`}function oK({open:e,onOpenChange:t}){let n=(0,h.useId)(),r=wh(),[i,a]=(0,h.useState)(),[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(!1),[u,d]=(0,h.useState)([]),[f,p]=(0,h.useState)(null),[m,_]=(0,h.useState)([]),[v,y]=(0,h.useState)(`deepseek`),[b,x]=(0,h.useState)(``),[S,C]=(0,h.useState)(``),[w,T]=(0,h.useState)(``),[E,D]=(0,h.useState)(),[O,k]=(0,h.useState)(),A=[...new Set(m.map(e=>e.provider))].sort((e,t)=>Number(e===`openai-compatible`)-Number(t===`openai-compatible`)),j=m.filter(e=>e.provider===v),M=j.find(e=>e.id===b)??(j.length===1?j[0]:void 0),[N,P]=(0,h.useState)(``),[ee,F]=(0,h.useState)(`128`),[I,te]=(0,h.useState)(``),[ne,re]=(0,h.useState)(`128`),[ie,ae]=(0,h.useState)(`DeepSeek Key`),[oe,se]=(0,h.useState)(``),[ce,le]=(0,h.useState)(!1),[ue,de]=(0,h.useState)(!1),[L,fe]=(0,h.useState)(!1),[pe,me]=(0,h.useState)(null),he=f?.groups??(f===null?[]:[f]),ge=f?.defaultSelection??null,_e=u.find(({id:e})=>e===i)??u.find(({id:e})=>e===ge?.credentialProfileId)??u[0],ve=he.find(e=>e.credentialProfileId===_e?.id),ye=w.trim().toLowerCase(),be=ve?.models.filter(e=>`${e.label} ${e.id}`.toLowerCase().includes(ye))??[],xe=E?.existing?ve?.models.find(e=>e.id===E.modelId):void 0,Se=o||c||E!==void 0||ce,Ce=()=>{ue||(s(!1),l(!1),D(void 0),le(!1),se(``),me(null))},we=e=>{s(!1),a(e),l(!1),se(``),T(``),me(null)},Te=async()=>{fe(!0),me(null);try{let[e,t,n]=await Promise.all([jj(),wj().catch(()=>null),Oj()]);d(e),p(t),_(n)}catch(e){me(fj(e,`加载模型设置失败`))}finally{fe(!1)}};(0,h.useEffect)(()=>{e?Te():(se(``),l(!1),le(!1),a(void 0),s(!1),T(``),D(void 0),k(void 0))},[e]),(0,h.useEffect)(()=>{_e?.provider===`openai-compatible`&&(te(_e.endpoint??``),re(String(Math.max(1,Math.round((_e.contextWindow??128e3)/1024)))))},[_e?.id,_e?.endpoint,_e?.contextWindow]);let Ee=async(e,t=!1,n=!1)=>{de(!0),me(null);try{let r=await Dj({credentialProfileId:e,...n?{includePublicDirectory:n}:{}});p(r);let i=r.groups.find(t=>t.credentialProfileId===e);e&&(!i||i.lastRefreshError)?me(t?`Key 已保存,目录同步失败。请打开该 Key 后重试刷新。`:`目录同步失败,请检查连接。`):r.directoryStatus===`unavailable`&&me(`公共能力目录暂不可用,已保留缓存。`)}catch(e){me(t?`Key 已保存,目录同步失败。请打开该 Key 后重试刷新。`:fj(e,`刷新目录失败`));let n=await wj().catch(()=>null);n&&p(n)}finally{await r.invalidateQueries({queryKey:[`model-catalog`]}),de(!1)}},De=async(e,t)=>{if(t.visible!==!1){if(!(t.agentSelectable??t.contextWindow!==null))me(`该模型未声明上下文窗口,暂时不能设为默认。`);else{de(!0),me(null);try{await Tj({model:t.id,credentialProfileId:e.credentialProfileId}),p(await wj()),await r.invalidateQueries({queryKey:[`model-catalog`]})}catch(e){me(fj(e,`设置默认模型失败`))}finally{de(!1)}}}},Oe=async(e,t)=>{de(!0),me(null);try{await Ej({credentialProfileId:e.credentialProfileId,modelId:t.id,visible:t.visible===!1}),p(await wj()),await r.invalidateQueries({queryKey:[`model-catalog`]})}catch(e){me(fj(e,`更新显示状态失败`))}finally{de(!1)}},ke=async()=>{if(oe.trim()&&M){de(!0),me(null);try{let e=await Mj({presetId:M.id,label:ie.trim()||M.label,apiKey:oe.trim(),...v===`openai-compatible`||M.fields?.includes(`endpoint`)?{endpoint:N.trim()}:{},...v===`openai-compatible`?{contextWindow:Math.max(1,Number(ee)||128)*1024}:{},...M.fields?.includes(`workspaceId`)?{workspaceId:S.trim()}:{}});we(e.id),d(t=>[...t.filter(({id:t})=>t!==e.id),e]),await Te(),await Ee(e.id,!0,M.provider===`opencode-go`||M.provider===`kimi`||M.provider===`bailian`)}catch(e){me(fj(e,`保存 Key 失败`))}finally{de(!1)}}},Ae=async e=>{de(!0),me(null);try{await Nj(e.id,{label:ie.trim(),revision:e.revision,...oe.trim()?{apiKey:oe.trim()}:{}});let t=oe.trim().length>0;se(``),k(void 0),l(!1),await Te(),t&&await Ee(e.id,!0)}catch(e){me(fj(e,`更新连接失败`))}finally{de(!1)}},je=(e,t)=>{let n={};t.sources?.maxInputTokens===`user`&&(n.maxInputTokens=t.capabilities?.maxInputTokens),t.sources?.maxOutputTokens===`user`&&(n.maxOutputTokens=t.capabilities?.maxOutputTokens),t.sources?.outputModalities===`user`&&(n.outputModalities=t.capabilities?.outputModalities),t.sources?.streaming===`user`&&(n.streaming=t.capabilities?.streaming),D({connection:e,modelId:t.id,existing:!0,original:n,thinking:t.sources?.thinking===`user`&&t.thinking.mode!==`variants`?t.thinking.supported?t.thinking.mode??`levels`:`off`:void 0,pictures:t.sources?.inputModalities===`user`?t.capabilities?.inputModalities?.includes(`image`)?`yes`:`no`:``,window:t.sources?.contextWindow===`user`?String(t.contextWindow):``,tools:t.sources?.tools===`user`?t.capabilities?.tools?`yes`:`no`:``})},Me=async(e=!1)=>{if(E){de(!0),me(null);try{await kj(E.connection,E.modelId.trim(),e?null:{...E.original,...E.thinking?{thinking:E.thinking}:{},...E.pictures?{inputModalities:E.pictures===`yes`?[`text`,`image`]:[`text`]}:{},...E.window?{contextWindow:Number(E.window)}:{},...E.tools?{tools:E.tools===`yes`}:{}}),D(void 0),await Te(),await r.invalidateQueries({queryKey:[`model-catalog`]})}catch(e){me(fj(e,`保存模型能力失败`))}finally{de(!1)}}},Ne=async(e,t)=>{let n={credentialId:e.credentialProfileId,modelId:t.id};de(!0),k({...n,status:`testing`}),me(null);try{await Aj(n.credentialId,n.modelId),k({...n,status:`passed`})}catch(e){k(void 0),me(fj(e,`测试调用失败`))}finally{de(!1)}},Pe=async e=>{de(!0),me(null);try{await Nj(e,{endpoint:I.trim(),contextWindow:Math.max(1,Number(ne)||128)*1024}),se(``),l(!1),await Te(),await Ee(e)}catch(e){me(fj(e,`保存兼容端点失败`))}finally{de(!1)}},Fe=async e=>{de(!0),me(null);try{await Pj(e),le(!1),a(void 0),l(!1),se(``),T(``),k(void 0),await Te(),await r.invalidateQueries({queryKey:[`model-catalog`]})}catch(e){me(fj(e,`删除 Key 失败`))}finally{le(!1),de(!1)}};return(0,g.jsx)(Hc,{open:e,onOpenChange:e=>{(e||!Se)&&t(e)},children:(0,g.jsxs)(dG,{icon:ls,title:`模型与凭据`,description:`按 Key 管理模型和连接`,closeLabel:`关闭模型设置`,count:u.length,onEscapeKeyDown:e=>{Se&&(e.preventDefault(),Ce())},actions:(0,g.jsxs)(V,{size:`sm`,variant:`secondary`,disabled:o||ue||L,onClick:()=>{s(!0),l(!1),ae(`${YG(v)} Key`),se(``),me(null)},children:[(0,g.jsx)(Vs,{size:13,"aria-hidden":`true`}),`添加 Key`]}),children:[!o&&!c&&!E?(0,g.jsx)(qc,{message:pe,onDismiss:()=>me(null)}):null,(0,g.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col sm:flex-row`,children:[(0,g.jsx)(`nav`,{"aria-label":`Key 列表`,className:`flex shrink-0 gap-1.5 overflow-x-auto border-b border-line bg-surface-2/30 p-2 sm:w-[204px] sm:flex-col sm:overflow-y-auto sm:border-b-0 sm:border-r`,children:u.map(e=>{let t=he.find(({credentialProfileId:t})=>t===e.id),n=e.id===_e?.id;return(0,g.jsxs)(`button`,{type:`button`,"aria-pressed":n,onClick:()=>we(e.id),disabled:ue,className:B(`flex min-w-[140px] max-w-[204px] shrink-0 items-center gap-2 rounded-lg border px-2 py-2 text-left outline-none hover:bg-surface-2 focus-visible:ring-2 focus-visible:ring-accent/40 sm:w-full sm:min-w-0`,n?`border-accent/20 bg-accent-soft`:`border-transparent`),children:[(0,g.jsx)(`span`,{className:B(`grid size-7 shrink-0 place-items-center rounded-md bg-surface-2 text-ink-3`,n&&`bg-surface/75 text-accent`),children:(0,g.jsx)(ls,{size:13,"aria-hidden":`true`})}),(0,g.jsxs)(`span`,{className:`min-w-0`,children:[(0,g.jsx)(`span`,{className:`block truncate text-xs font-semibold`,children:e.label}),(0,g.jsxs)(`span`,{className:`block truncate text-[10px] text-ink-3`,children:[YG(e.provider),` ·`,` `,XG(e.billing??t?.billing)]}),(0,g.jsx)(`span`,{className:`mt-0.5 block text-[10px] text-ink-3`,children:t?`${t.models.length} 个模型`:`目录不可用`})]})]},e.id)})}),(0,g.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:_e?(0,g.jsxs)(`section`,{"aria-label":`${_e.label} 模型`,className:`min-h-0 flex-1 overflow-y-auto`,children:[(0,g.jsxs)(`div`,{className:`space-y-3 border-b border-line px-3 py-3 sm:px-4`,children:[(0,g.jsxs)(`div`,{className:`flex flex-wrap items-start gap-2`,children:[(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsx)(`h3`,{className:`truncate text-sm font-semibold`,children:_e.label}),(0,g.jsxs)(`p`,{className:`mt-0.5 text-[11px] text-ink-3`,children:[ve?aK(ve):`目录不可用`,ve?.stale&&ve.syncedAt!==null?` · 待刷新`:``]})]}),(0,g.jsxs)(V,{size:`sm`,variant:`secondary`,disabled:ue,onClick:()=>void Ee(_e.id,!1,!0),children:[(0,g.jsx)(Us,{size:12,"aria-hidden":`true`}),`刷新目录`]}),(0,g.jsx)(V,{size:`sm`,variant:`ghost`,"aria-haspopup":`dialog`,disabled:ue,onClick:()=>{ae(_e.label),se(``),me(null),l(!0)},children:`管理 Key`}),(0,g.jsx)(V,{size:`sm`,variant:`ghost`,"aria-label":`删除 Key`,disabled:ue,onClick:()=>le(!0),children:(0,g.jsx)(yc,{size:13,"aria-hidden":`true`})})]}),(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsxs)(`label`,{className:`flex min-w-0 flex-1 items-center gap-2 rounded-lg border border-line px-2.5 focus-within:border-accent/60`,children:[(0,g.jsx)(Zs,{size:13,"aria-hidden":`true`,className:`shrink-0 text-ink-3`}),(0,g.jsx)(`input`,{type:`search`,"aria-label":`搜索当前 Key 的模型`,placeholder:`搜索当前 Key 的模型`,className:`h-8 w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-ink-3`,value:w,onChange:e=>T(e.target.value)})]}),(0,g.jsxs)(V,{size:`sm`,variant:`ghost`,disabled:ue,onClick:()=>D({connection:_e.id,modelId:``,window:``,tools:``}),children:[(0,g.jsx)(Vs,{size:12,"aria-hidden":`true`}),`登记模型`]})]})]}),!ve||be.length===0?(0,g.jsx)(fG,{icon:Zs,title:ve?ye?`没有匹配的模型`:`此 Key 暂无模型`:`目录不可用`,hint:ve?ye?`换个关键词试试。`:`刷新目录或手动登记。`:`刷新目录后重试。`,compact:!0}):(0,g.jsx)(`ul`,{className:`divide-y divide-line/70 px-3 sm:px-4`,children:be.map(e=>(0,g.jsx)(rK,{model:e,isDefault:e.visible!==!1&&e.id===ge?.model&&ve.credentialProfileId===ge.credentialProfileId,busy:ue,verification:O?.credentialId===ve.credentialProfileId&&O.modelId===e.id?O.status:void 0,makeDefault:()=>void De(ve,e),edit:()=>je(ve.credentialProfileId,e),verify:()=>void Ne(ve,e),toggleVisibility:()=>void Oe(ve,e)},`${ve.credentialProfileId}:${e.id}`))}),(0,g.jsx)(Jc,{open:ce,overlayClassName:`z-[310]`,className:`z-[311]`,title:`删除 Key?`,description:`${_e.label} 会从本机移除,对应模型也会从选择器中消失。此操作不可撤销。`,confirmLabel:`删除`,danger:!0,pending:ue,onCancel:()=>le(!1),onConfirm:()=>void Fe(_e.id)})]}):L?null:(0,g.jsx)(fG,{icon:ls,title:`还没有 Key`,hint:`添加后即可同步官方模型目录。`})})]}),o?(0,g.jsx)(Hc,{open:!0,onOpenChange:e=>{e||Ce()},children:(0,g.jsxs)(Wc,{overlayClassName:`z-[310]`,className:iK,children:[(0,g.jsx)(Gc,{children:`添加 Key`}),(0,g.jsx)(Kc,{className:`sr-only`,children:`选择接入平台并保存 API Key。`}),(0,g.jsx)(qc,{message:pe,onDismiss:()=>me(null)}),(0,g.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:A.map(e=>(0,g.jsx)(V,{size:`sm`,variant:v===e?`secondary`:`ghost`,"aria-pressed":v===e,onClick:()=>{y(e),x(``),ae(`${YG(e)} Key`)},children:YG(e)},e))}),j.length>1?(0,g.jsx)(hm,{label:`Key 来源`,showLabel:!0,value:b,onValueChange:x,options:j.map(e=>({value:e.id,label:e.label}))}):null,M?.fields?.includes(`workspaceId`)?(0,g.jsxs)(`label`,{htmlFor:`${n}-workspace`,className:`block text-xs`,children:[`工作空间 ID`,(0,g.jsx)(fm,{id:`${n}-workspace`,value:S,onChange:e=>C(e.target.value)})]}):null,v===`openai-compatible`||M?.fields?.includes(`endpoint`)?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`label`,{htmlFor:`${n}-endpoint`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`端点 URL`,(0,g.jsx)(fm,{id:`${n}-endpoint`,value:N,onChange:e=>P(e.target.value),"aria-label":`兼容端点 URL`,placeholder:`https://api.example.com/v1`,className:`mt-1 font-mono text-[11px]`})]}),(0,g.jsxs)(`label`,{htmlFor:`${n}-window`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`上下文窗口(K)`,(0,g.jsx)(fm,{id:`${n}-window`,value:ee,onChange:e=>F(e.target.value),"aria-label":`兼容上下文窗口(K)`,inputMode:`numeric`,className:`mt-1 font-mono text-[11px]`})]})]}):null,(0,g.jsxs)(`label`,{htmlFor:`${n}-credential-name`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`名称`,(0,g.jsx)(fm,{id:`${n}-credential-name`,value:ie,onChange:e=>ae(e.target.value),"aria-label":`凭据名称`,className:`mt-1 text-[11px]`})]}),(0,g.jsxs)(`label`,{htmlFor:`${n}-api-key`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`API Key`,(0,g.jsx)(fm,{id:`${n}-api-key`,type:`password`,value:oe,onChange:e=>se(e.target.value),"aria-label":`API Key`,placeholder:`sk-…`,autoComplete:`off`,className:`mt-1 font-mono text-[11px]`})]}),(0,g.jsxs)(V,{variant:`primary`,size:`sm`,disabled:ue||!oe.trim()||!M||(v===`openai-compatible`||M.fields?.includes(`endpoint`))&&!N.trim()||M.fields?.includes(`workspaceId`)&&!S.trim(),onClick:()=>void ke(),children:[ue?(0,g.jsx)(ds,{size:12,className:`animate-spin`}):null,`添加`]}),(0,g.jsx)(Uc,{asChild:!0,children:(0,g.jsx)(V,{variant:`ghost`,size:`sm`,disabled:ue,children:`取消`})})]})}):null,c&&_e?(0,g.jsx)(Hc,{open:!0,onOpenChange:e=>{e||Ce()},children:(0,g.jsxs)(Wc,{overlayClassName:`z-[310]`,className:iK,children:[(0,g.jsx)(Gc,{children:`管理 Key`}),(0,g.jsxs)(Kc,{className:`wrap-anywhere`,children:[_e.masked,` · `,_e.endpoint??`官方端点`]}),(0,g.jsx)(qc,{message:pe,onDismiss:()=>me(null)}),(0,g.jsxs)(`fieldset`,{className:`min-w-0 space-y-3`,children:[(0,g.jsx)(`legend`,{className:`sr-only`,children:`连接凭据`}),(0,g.jsxs)(`label`,{htmlFor:`${n}-connection-label`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`连接名称`,(0,g.jsx)(fm,{id:`${n}-connection-label`,value:ie,onChange:e=>ae(e.target.value),className:`mt-1 text-[11px]`})]}),(0,g.jsxs)(`label`,{htmlFor:`${n}-replacement-key`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`替换 API Key`,(0,g.jsx)(fm,{id:`${n}-replacement-key`,type:`password`,autoComplete:`off`,value:oe,onChange:e=>se(e.target.value),className:`mt-1 font-mono text-[11px]`})]})]}),_e.provider===`openai-compatible`?(0,g.jsxs)(`fieldset`,{className:`min-w-0 space-y-3`,children:[(0,g.jsx)(`legend`,{className:`sr-only`,children:`兼容端点`}),(0,g.jsxs)(`label`,{htmlFor:`${n}-endpoint-edit`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`端点 URL`,(0,g.jsx)(fm,{id:`${n}-endpoint-edit`,"aria-label":`兼容端点 URL`,value:I,onChange:e=>te(e.target.value),className:`mt-1 font-mono text-[11px]`})]}),(0,g.jsxs)(`label`,{htmlFor:`${n}-window-edit`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`上下文窗口(K)`,(0,g.jsx)(fm,{id:`${n}-window-edit`,"aria-label":`兼容上下文窗口(K)`,value:ne,onChange:e=>re(e.target.value),inputMode:`numeric`,className:`mt-1 font-mono text-[11px]`})]})]}):null,(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[(0,g.jsx)(V,{size:`sm`,variant:`primary`,disabled:ue||!ie.trim(),onClick:()=>void Ae(_e),children:`保存连接`}),_e.provider===`openai-compatible`?(0,g.jsx)(V,{size:`sm`,variant:`secondary`,disabled:ue||!I.trim(),onClick:()=>void Pe(_e.id),children:`保存端点`}):null,(0,g.jsx)(Uc,{asChild:!0,children:(0,g.jsx)(V,{variant:`ghost`,size:`sm`,disabled:ue,children:`取消`})})]})]})}):null,E?(0,g.jsx)(Hc,{open:!0,onOpenChange:e=>{e||Ce()},children:(0,g.jsxs)(Wc,{overlayClassName:`z-[310]`,className:iK,children:[(0,g.jsx)(Gc,{children:`模型能力`}),(0,g.jsx)(Kc,{children:xe?tK(xe):`留空的字段由目录提供。`}),(0,g.jsx)(qc,{message:pe,onDismiss:()=>me(null)}),(0,g.jsxs)(`label`,{htmlFor:`${n}-override-model`,className:`block text-xs`,children:[`模型 ID`,(0,g.jsx)(fm,{id:`${n}-override-model`,readOnly:E.existing,value:E.modelId,onChange:e=>D({...E,modelId:e.target.value})})]}),(0,g.jsxs)(`label`,{htmlFor:`${n}-override-context`,className:`block text-xs`,children:[`上下文窗口(Token)`,(0,g.jsx)(fm,{id:`${n}-override-context`,type:`number`,min:1,value:E.window,onChange:e=>D({...E,window:e.target.value})})]}),(0,g.jsx)(hm,{label:`工具调用`,showLabel:!0,value:E.tools,onValueChange:e=>D({...E,tools:e}),options:[{value:``,label:`按目录`},{value:`yes`,label:`支持`},{value:`no`,label:`不支持`}]}),(0,g.jsx)(hm,{label:`截图输入`,showLabel:!0,value:E.pictures??``,onValueChange:e=>D({...E,pictures:e}),options:[{value:``,label:`按目录`},{value:`yes`,label:`支持截图`},{value:`no`,label:`仅文本输入`}]}),(0,g.jsx)(hm,{label:`思考模式`,showLabel:!0,value:E.thinking??``,onValueChange:e=>D({...E,thinking:e||void 0}),options:[{value:``,label:`按目录`},{value:`off`,label:`无档位`},{value:`toggle`,label:`开 / 关`},{value:`levels`,label:`可关闭的档位`},{value:`mandatory-levels`,label:`必选档位`}]}),(0,g.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,g.jsx)(V,{variant:`primary`,size:`sm`,disabled:ue||!E.modelId.trim()||!E.window&&!E.tools&&!E.thinking&&!E.pictures&&Object.keys(E.original??{}).length===0,onClick:()=>void Me(),children:`保存能力`}),(0,g.jsx)(V,{variant:`ghost`,size:`sm`,disabled:ue||!E.modelId.trim(),onClick:()=>void Me(!0),children:`移除覆盖`})]})]})}):null,L?(0,g.jsxs)(`p`,{className:`flex shrink-0 items-center gap-1.5 px-4 py-2 text-[10.5px] text-ink-3`,children:[(0,g.jsx)(ds,{size:11,className:`animate-spin`}),` 正在读取…`]}):null]})})}var sK=e=>[`processes`,e??`all`],cK=e=>[`processes`,`detail`,e];async function lK(e){return(await Y(`/api/processes${e?`?projectId=${encodeURIComponent(e)}`:``}`)).items.map(e=>NA.parse(e))}async function uK(e){return NA.parse(await Y(`/api/processes/${encodeURIComponent(e)}`))}async function dK(e,t=0,n=200){return Y(`/api/processes/${encodeURIComponent(e)}/output?after=${t}&limit=${n}`)}async function fK(e){return Y(`/api/processes/${encodeURIComponent(e)}/stop`,{method:`POST`,csrf:!0,body:{}})}function pK({open:e,onOpenChange:t}){return(0,g.jsx)(Hc,{open:e,onOpenChange:t,children:(0,g.jsx)(Wc,{className:`max-h-[calc(100dvh-24px)] w-[min(640px,calc(100vw-40px))] overflow-y-auto`,children:(0,g.jsx)(mK,{onClose:()=>t(!1)})})})}function mK({onClose:e}){let t=(0,h.useId)(),n=wh(),[r,i]=(0,h.useState)(),[a,o]=(0,h.useState)(null),[s,c]=(0,h.useState)(``),[l,u]=(0,h.useState)(!1),[d,f]=(0,h.useState)(null),{data:p,error:m,isFetching:_,refetch:v}=Jg({queryKey:[`project-directories`,r],queryFn:()=>gj(r),retry:!1,refetchOnWindowFocus:!1}),y=m?fj(m,`无法读取目录`):null,b=p?.roots??[],x=a??(r&&!y?p?.path??``:``),S=!!x.trim()&&!l&&(a!==null||!_);function C(e){o(null),f(null),e===r?v():i(e)}let w=async()=>{if(S){u(!0),f(null);try{await vj({rootPath:x.trim(),...s.trim()?{name:s.trim()}:{}}),await n.invalidateQueries({queryKey:[`workspace`]}),e()}catch(e){f(fj(e,`添加项目失败`))}finally{u(!1)}}};return(0,g.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),w()},children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`flex h-8 w-8 items-center justify-center rounded-lg bg-accent-soft text-accent`,children:(0,g.jsx)(Vo,{size:15})}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(Gc,{children:`添加项目`}),(0,g.jsx)(Kc,{children:`选择项目目录,然后填写显示名称。`})]})]}),(0,g.jsxs)(`div`,{className:`mt-4 rounded-xl border border-line bg-surface-2/40`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1 border-b border-line px-2 py-1.5`,children:[(0,g.jsx)(`button`,{type:`button`,"aria-label":`上一级`,title:`上一级`,disabled:!p?.parent||_,onClick:()=>p?.parent&&C(p.parent),className:`flex h-6 w-6 items-center justify-center rounded text-ink-3 hover:bg-black/[.06] hover:text-ink disabled:opacity-40 dark:hover:bg-white/[.08]`,children:(0,g.jsx)(no,{size:13})}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`主目录`,title:`主目录`,disabled:_,onClick:()=>C(p?.home),className:`flex h-6 w-6 items-center justify-center rounded text-ink-3 hover:bg-black/[.06] hover:text-ink disabled:opacity-40 dark:hover:bg-white/[.08]`,children:(0,g.jsx)(rs,{size:12})}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`刷新目录`,title:`刷新`,disabled:_,onClick:()=>void v(),className:`flex h-6 w-6 items-center justify-center rounded text-ink-3 hover:bg-black/[.06] hover:text-ink disabled:opacity-40 dark:hover:bg-white/[.08]`,children:(0,g.jsx)(Us,{size:12})}),b.length>0&&(0,g.jsxs)(nm,{modal:!1,children:[(0,g.jsx)(rm,{asChild:!0,children:(0,g.jsxs)(V,{variant:`secondary`,size:`sm`,disabled:_,children:[(0,g.jsx)(ts,{size:13}),`磁盘与卷`,(0,g.jsx)(Xa,{size:12})]})}),(0,g.jsx)(am,{align:`start`,className:`z-[302] max-h-60 max-w-72 overflow-auto`,children:b.map(e=>(0,g.jsxs)(sm,{onSelect:()=>C(e.path),children:[(0,g.jsx)(ts,{size:13,className:`shrink-0`}),(0,g.jsx)(`span`,{className:`truncate`,title:e.path,children:e.name})]},e.path))})]}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate px-1 font-mono text-[10.5px] text-ink-2`,children:p?.path??(y?`目录不可用`:`读取中…`)})]}),(0,g.jsxs)(`div`,{className:`h-[230px] overflow-auto p-1.5`,children:[_?(0,g.jsxs)(`div`,{className:`flex h-full items-center justify-center gap-1.5 text-[11px] text-ink-3`,children:[(0,g.jsx)(ds,{size:12,className:`animate-spin`}),` 正在读取目录…`]}):y?null:p?.entries.length===0?(0,g.jsx)(`p`,{className:`px-2 py-3 text-[11px] text-ink-3`,children:`没有子目录`}):p?.entries.map(e=>(0,g.jsxs)(`button`,{type:`button`,onClick:()=>C(e.path),className:`flex h-8 w-full items-center gap-2 rounded-md px-2 text-left text-[11.5px] text-ink-2 hover:bg-black/[.05] hover:text-ink dark:hover:bg-white/[.07]`,children:[(0,g.jsx)(Go,{size:13,className:`shrink-0 text-accent/80`}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name})]},e.path)),!_&&!y&&p?.truncated?(0,g.jsx)(`p`,{className:`px-2 py-1 text-[10px] text-warning`,children:`目录过多,仅显示前 500 项`}):null]})]}),(0,g.jsxs)(`label`,{htmlFor:`${t}-directory`,className:`mt-3 block text-[11px] font-medium text-ink-2`,children:[`项目目录(也可直接粘贴绝对路径)`,(0,g.jsx)(fm,{id:`${t}-directory`,value:x,onChange:e=>o(e.target.value),"aria-label":`项目目录`,placeholder:`粘贴目录的绝对路径`,spellCheck:!1,className:`mt-1.5 h-9 font-mono text-[11.5px]`})]}),(0,g.jsxs)(`label`,{htmlFor:`${t}-name`,className:`mt-2.5 block text-[11px] font-medium text-ink-2`,children:[`显示名称(可选)`,(0,g.jsx)(fm,{id:`${t}-name`,value:s,onChange:e=>c(e.target.value),placeholder:`默认取目录名`,className:`mt-1.5 h-9 text-[11.5px]`})]}),(0,g.jsx)(qc,{message:d??y,onDismiss:d?()=>f(null):void 0}),(0,g.jsxs)(`div`,{className:`mt-5 flex justify-end gap-2`,children:[(0,g.jsx)(V,{variant:`secondary`,size:`sm`,onClick:e,children:`取消`}),(0,g.jsx)(V,{type:`submit`,variant:`primary`,size:`sm`,disabled:!S,children:l?`正在添加…`:`添加项目`})]})]})}function hK({project:e,open:t,onClose:n}){let r=wh(),[i,a]=(0,h.useState)(``),[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(null);(0,h.useEffect)(()=>{a(e?.name??``),l(null),s(!1)},[e]);let u=async()=>{if(e!==null&&i.trim()){s(!0),l(null);try{await Sj(e.id,{name:i.trim()}),await r.invalidateQueries({queryKey:[`workspace`]}),n()}catch(e){l(fj(e,`重命名失败`))}finally{s(!1)}}};return(0,g.jsx)(Hc,{open:t&&e!==null,onOpenChange:e=>e?void 0:n(),children:(0,g.jsxs)(Wc,{children:[(0,g.jsx)(Gc,{children:`重命名项目`}),(0,g.jsx)(Kc,{children:`只改变展示名称,不移动或重命名本地目录。`}),(0,g.jsx)(fm,{value:i,onChange:e=>a(e.target.value),"aria-label":`项目名称`,autoFocus:!0,className:`mt-4 h-9`}),(0,g.jsx)(qc,{message:c,onDismiss:()=>l(null)}),(0,g.jsxs)(`div`,{className:`mt-5 flex justify-end gap-2`,children:[(0,g.jsx)(V,{variant:`secondary`,size:`sm`,onClick:n,children:`取消`}),(0,g.jsx)(V,{variant:`primary`,size:`sm`,disabled:o||!i.trim(),onClick:()=>void u(),children:o?`正在保存…`:`保存`})]})]})})}var gK=[`service-ops`,`services`],_K=e=>[`service-ops`,`deployments`,e],vK=e=>[`service-ops`,`logs`,e];async function yK(e,t){return Uk.parse(await Y(`/api/service-ops/services/${encodeURIComponent(e)}/control`,{method:`POST`,csrf:!0,body:t}))}async function bK(){return Wk.parse(await Y(`/api/service-ops/services`))}async function xK(e){return(await Y(`/api/service-ops/services/${encodeURIComponent(e)}/deployments`)).items}async function SK(e){return Y(`/api/service-ops/services/${encodeURIComponent(e)}/logs`)}var CK={stopped:`已停止`,starting:`启动中`,running:`运行中`,unhealthy:`不健康`,stopping:`停止中`,failed:`失败`,unknown:`未知`},wK={start:`启动`,stop:`停止`,restart:`重启`};function TK({open:e,onOpenChange:t}){let n=wh(),[r,i]=(0,h.useState)(null),[a,o]=(0,h.useState)(null),[s,c]=(0,h.useState)(!1),l=Jg({queryKey:gK,queryFn:bK,enabled:e,refetchInterval:e?3e3:!1}),u=l.data?.items.find(({targetId:e})=>e===r);(0,h.useEffect)(()=>{l.data&&r&&!l.data.items.some(e=>e.targetId===r)&&(i(null),o(null),c(!1))},[l.data,r]);let d=u?.targetId??``,f=Jg({queryKey:_K(d),queryFn:()=>xK(d),enabled:e&&!!u&&u.source!==`pm2-cli`}),p=Jg({queryKey:vK(d),queryFn:()=>SK(d),enabled:e&&!!u,refetchInterval:e&&u?3e3:!1}),m=()=>n.invalidateQueries({queryKey:[`service-ops`]}),_=Qg({mutationFn:({service:e,action:t,requestKey:n})=>yK(e.targetId,{action:t,requestKey:n,expectedPm2Name:e.pm2Name,confirmed:!0}),retry:!1,onSuccess:()=>{o(null),c(!1)},onError:()=>{o(null),c(!0)},onSettled:()=>{m()}}),v=e=>{if(!u||_.isPending)return;c(!1);let t={service:u,action:e,requestKey:crypto.randomUUID()};e===`start`?_.mutate(t):o(t)},y=e=>{let n=gW.getState();n.projectId===e.projectId&&n.sessionId||n.startDraft(e.projectId);let r=_W.getState();r.draft.trim()||r.setDraft(`请检查 PM2 服务 ${e.pm2Name} 的状态和日志。`),n.focusComposer(),t(!1)},b=_.isPending||l.isError||!!u&&[`starting`,`stopping`,`unknown`].includes(u.observedState);return(0,g.jsx)(Hc,{open:e,onOpenChange:e=>{e||(i(null),o(null),c(!1)),t(e)},children:(0,g.jsxs)(dG,{icon:tc,title:`服务运维`,description:`查看正式服务状态、日志及启停操作`,closeLabel:`关闭服务运维`,count:l.data?.items.length??0,testId:`service-ops-dialog`,actions:(0,g.jsxs)(V,{size:`sm`,variant:`ghost`,disabled:l.isFetching,onClick:()=>void m(),children:[(0,g.jsx)(Us,{size:12,className:l.isFetching?`animate-spin`:void 0}),`刷新`]}),children:[(0,g.jsx)(qc,{message:s?`操作失败,请刷新状态和日志后再试。`:l.isError?l.data?`刷新失败,当前为上次观察结果。`:`正式服务不可用,请刷新重试。`:u&&p.isError?`日志读取失败,请刷新重试。`:null,onDismiss:s?()=>c(!1):void 0}),l.isPending?(0,g.jsx)(`p`,{role:`status`,className:`p-3 text-[11px] text-ink-3`,children:`正在读取服务…`}):u?(0,g.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col`,"aria-label":`服务详情`,children:[(0,g.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-start gap-2 border-b border-line px-3 py-2`,children:[(0,g.jsx)(V,{size:`sm`,variant:`ghost`,"aria-label":`返回服务列表`,onClick:()=>{i(null),c(!1)},children:(0,g.jsx)(Pa,{size:12})}),(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(`h3`,{className:`truncate text-[12.5px] font-semibold`,children:u.name}),(0,g.jsx)(EK,{service:u})]}),(0,g.jsxs)(`p`,{className:`mt-1 text-[10px] text-ink-3`,children:[`所属项目 `,u.projectName??u.projectId]})]}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[(0,g.jsxs)(V,{size:`sm`,variant:`secondary`,onClick:()=>y(u),children:[(0,g.jsx)(Ra,{size:12}),`在项目会话中处理`]}),u.observedState!==`running`&&(0,g.jsxs)(V,{size:`sm`,variant:`secondary`,disabled:b||u.reasonCode===`PM2_MISSING`,onClick:()=>v(`start`),children:[(0,g.jsx)(zs,{size:12}),`启动`]}),(0,g.jsxs)(V,{size:`sm`,variant:`secondary`,disabled:b||u.observedState===`stopped`,onClick:()=>v(`restart`),children:[(0,g.jsx)(qs,{size:12}),`重启`]}),(0,g.jsxs)(V,{size:`sm`,variant:`danger`,disabled:b||u.observedState===`stopped`,onClick:()=>v(`stop`),children:[(0,g.jsx)(dc,{size:11}),`停止`]})]})]}),(0,g.jsxs)(`div`,{className:`grid shrink-0 grid-cols-2 gap-2 px-3 py-2 md:grid-cols-4`,children:[(0,g.jsx)(DK,{label:`PM2 服务`,value:u.pm2Name,mono:!0}),(0,g.jsx)(DK,{label:`进程 PID`,value:u.pid?.toString()??`—`,mono:!0}),(0,g.jsx)(DK,{label:`健康检查`,value:u.lastHealthAt?pG(u.lastHealthAt):`未核验`}),(0,g.jsx)(DK,{label:`最近观察`,value:pG(u.updatedAt)})]}),_.isPending&&(0,g.jsxs)(`p`,{role:`status`,className:`px-3 pb-2 text-[11px] text-ink-3`,children:[`正在`,wK[_.variables.action],`,等待 PM2 状态…`]}),u.reasonCode&&u.reasonCode!==`HEALTH_UNVERIFIED`&&(0,g.jsx)(`p`,{className:`px-3 pb-2 text-[11px] text-danger [overflow-wrap:anywhere]`,children:u.reasonCode===`PM2_MISSING`?`PM2 中已无此服务,请在项目会话中重新部署。`:u.reasonCode}),(0,g.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-1.5 px-3 pb-3`,children:[(0,g.jsxs)(`h3`,{className:`flex items-center gap-1.5 text-[10px] uppercase tracking-[0.08em] text-ink-3`,children:[(0,g.jsx)(_c,{size:11}),`运行日志`]}),(0,g.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto rounded-lg border border-line bg-[#0f1115] p-2 font-mono text-[10px] leading-5 text-[#c7ccd4]`,children:p.isPending?(0,g.jsx)(`p`,{className:`text-white/35`,children:`读取中…`}):(0,g.jsx)(`pre`,{className:`whitespace-pre-wrap break-all`,children:p.data?.text||(p.isError?`日志暂不可用`:`暂无日志`)})}),p.data?.truncated&&(0,g.jsx)(`p`,{className:`text-[10px] text-ink-3`,children:`仅显示最近日志。`})]}),u.source!==`pm2-cli`&&(0,g.jsxs)(`details`,{className:`max-h-36 shrink-0 overflow-auto border-t border-line px-3 py-2 text-[11px] text-ink-2`,children:[(0,g.jsxs)(`summary`,{className:`cursor-pointer`,children:[`历史发布记录`,u.version?` · ${u.version}`:``]}),f.isError?(0,g.jsx)(`p`,{children:`发布记录读取失败`}):f.data?.length?f.data.map(e=>(0,g.jsx)(OK,{deployment:e},e.id)):(0,g.jsx)(`p`,{className:`mt-2`,children:`暂无发布记录`})]})]}):(0,g.jsxs)(`section`,{className:`min-h-0 flex-1 overflow-auto p-3`,"aria-label":`正式服务列表`,children:[l.data?.items.length?(0,g.jsx)(`div`,{className:`grid grid-cols-1 gap-2 md:grid-cols-2`,children:l.data.items.map(e=>(0,g.jsxs)(`button`,{type:`button`,className:`min-w-0 rounded-lg border border-line bg-surface p-2.5 text-left transition-colors hover:bg-surface-2`,onClick:()=>{i(e.targetId),c(!1)},children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`truncate text-[12px] font-medium`,children:e.name}),(0,g.jsx)(EK,{service:e}),(0,g.jsxs)(`span`,{className:`ml-auto flex items-center gap-1`,children:[e.namespace===`larness`?null:(0,g.jsxs)(`span`,{className:`rounded bg-warning/10 px-1.5 py-0.5 text-[9px] text-warning`,title:`PM2 namespace=${e.namespace};Larness 隔离目录内仍按项目关联`,children:[`namespace `,e.namespace]}),(0,g.jsx)(`span`,{className:`rounded bg-black/[0.04] px-1.5 py-0.5 text-[9px] text-ink-3 dark:bg-white/[0.07]`,children:`PM2`})]})]}),(0,g.jsx)(`p`,{className:`mt-2 truncate text-[11px] text-ink-2`,children:e.projectName??e.projectId}),(0,g.jsx)(`p`,{className:`mt-1 truncate font-mono text-[10px] text-ink-3`,children:e.pm2Name}),(0,g.jsxs)(`p`,{className:`mt-2 text-[9.5px] text-ink-3`,children:[e.pid?`PID ${e.pid} · `:``,`观察于`,` `,pG(e.updatedAt)]})]},e.targetId))}):!l.isError&&(0,g.jsx)(fG,{icon:tc,title:`暂无正式服务`,hint:`在项目会话中部署后,在这里启停和查看日志。`}),!!l.data?.unassociated.length&&(0,g.jsxs)(`div`,{className:`mt-3 rounded-lg border border-line bg-surface-2/50 p-2.5 text-[11px] text-ink-3`,children:[(0,g.jsx)(`p`,{children:`未关联项目的 PM2 服务`}),l.data.unassociated.map(e=>(0,g.jsx)(`p`,{className:`mt-1 font-mono text-[10px] [overflow-wrap:anywhere]`,children:e.pm2Name},e.pm2Name))]})]}),l.data?.pm2Home&&(0,g.jsxs)(`details`,{className:`shrink-0 border-t border-line bg-surface-2/30 px-3 py-2 text-[10px] text-ink-3`,children:[(0,g.jsx)(`summary`,{className:`cursor-pointer`,children:`本机 PM2 查询命令`}),(0,g.jsx)(`p`,{className:`mt-2`,children:`终端查询时使用此实例目录,与页面保持一致。`}),(0,g.jsx)(`code`,{className:`mt-1 block select-all break-all font-mono text-ink-2`,children:`PM2_HOME='${l.data.pm2Home.replaceAll(`'`,`'\\''`)}' pm2 list`})]}),(0,g.jsx)(Jc,{open:e&&!!a,title:`${a?wK[a.action]:`操作`}服务?`,description:a?.action===`stop`?`停止后服务将无法访问,可随时重新启动。`:`重启期间服务会短暂中断。`,confirmLabel:`确认${a?wK[a.action]:`操作`}`,danger:a?.action===`stop`,pending:_.isPending,onCancel:()=>o(null),onConfirm:()=>{a&&_.mutate(a)},children:(0,g.jsxs)(`div`,{className:`rounded-lg border border-line bg-surface-2/50 p-2.5`,children:[(0,g.jsx)(`p`,{className:`text-[12px] font-medium`,children:a?.service.name}),(0,g.jsx)(`p`,{className:`mt-1 text-[11px] text-ink-3`,children:a?.service.projectName??a?.service.projectId}),(0,g.jsx)(`p`,{className:`mt-1 break-all font-mono text-[10px] text-ink-3`,children:a?.service.pm2Name})]})})]})})}function EK({service:e}){return(0,g.jsx)(`span`,{className:B(`shrink-0 rounded-full border px-1.5 py-[1px] text-[9px]`,e.observedState===`running`?`border-success/20 bg-success/10 text-success`:e.observedState===`failed`||e.observedState===`unhealthy`?`border-danger/20 bg-danger/10 text-danger`:`border-line bg-surface-2 text-ink-3`),children:CK[e.observedState]})}function DK({label:e,value:t,mono:n}){return(0,g.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-line bg-surface-2/50 px-2 py-1.5`,children:[(0,g.jsx)(`p`,{className:`text-[9px] uppercase tracking-[0.08em] text-ink-3`,children:e}),(0,g.jsx)(`p`,{className:B(`mt-1 truncate text-[11px]`,n&&`font-mono`),title:t,children:t})]})}function OK({deployment:e}){return(0,g.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2 text-[11px] text-ink-3`,children:[(0,g.jsx)(`span`,{children:e.version}),(0,g.jsx)(`span`,{children:e.reasonCode??e.status}),(0,g.jsx)(`span`,{children:pG(e.createdAt)})]})}var kK=[{value:`deepseek`,label:`DeepSeek Search & Fetch`},{value:`glm`,label:`GLM Web Search / Reader`}],AK=[{value:`cn`,label:`国内 · open.bigmodel.cn`},{value:`global`,label:`国际 · api.z.ai`}],jK=[`3`,`5`,`8`,`10`].map(e=>({value:e,label:`${e} 条`})),MK=`z-[311] max-h-[calc(100dvh-32px)] w-[min(400px,calc(100vw-28px))] space-y-3 overflow-y-auto`;function NK(e){return e===`deepseek`?`DeepSeek`:`GLM`}function PK(e){return e.provider===`deepseek`?`固定端点`:e.region===`global`?`国际`:`国内`}function FK({open:e,onOpenChange:t}){let n=wh(),r=gM(),i=r.data.connections,a=r.data.activeConnectionId,[o,s]=(0,h.useState)(null),[c,l]=(0,h.useState)(null),[u,d]=(0,h.useState)(`deepseek`),[f,p]=(0,h.useState)(`cn`),[m,_]=(0,h.useState)(``),[v,y]=(0,h.useState)(``),[b,x]=(0,h.useState)(`5`),[S,C]=(0,h.useState)(`6`),[w,T]=(0,h.useState)(`4`),[E,D]=(0,h.useState)(!1),[O,k]=(0,h.useState)(null),[A,j]=(0,h.useState)(null),[M,N]=(0,h.useState)(null),[P,ee]=(0,h.useState)(null);(0,h.useEffect)(()=>{e&&(s(null),l(null),j(null),N(null),k(null))},[e]),(0,h.useEffect)(()=>{x(String(r.data.maxResults)),C(String(r.data.maxSearchesPerTurn)),T(String(r.data.maxFetchesPerTurn))},[r.data.maxResults,r.data.maxSearchesPerTurn,r.data.maxFetchesPerTurn]);let F=async()=>{await n.invalidateQueries({queryKey:hM})},I=()=>{l(null),d(`deepseek`),p(`cn`),_(``),y(``),j(null),N(null),s(`add`)},te=e=>{l(e),d(e.provider),p(e.region??`cn`),_(e.label),y(``),j(null),N(null),s(`edit`)},ne=()=>{x(String(r.data.maxResults)),C(String(r.data.maxSearchesPerTurn)),T(String(r.data.maxFetchesPerTurn)),j(null),N(null),s(`quota`)},re=()=>{E||(s(null),l(null),j(null))},ie=async()=>{D(!0),j(null);try{c===null?(await Vj({provider:u,label:m.trim(),apiKey:v,...u===`glm`?{region:f}:{}}),N(`搜索 Key 已添加`)):(await Hj(c.id,{label:m.trim(),...u===`glm`?{region:f}:{},...v.trim().length>0?{apiKey:v}:{}}),N(`搜索 Key 已更新`)),await F(),s(null),l(null),y(``)}catch(e){j(fj(e,`保存搜索 Key 失败`))}finally{D(!1)}},ae=async()=>{D(!0),j(null);try{await Gj({activeConnectionId:a,maxResults:Number(b),maxSearchesPerTurn:Number(S),maxFetchesPerTurn:Number(w)}),await F(),s(null),N(`每轮配额已保存`)}catch(e){j(fj(e,`保存每轮配额失败`))}finally{D(!1)}},oe=async e=>{D(!0),j(null),N(null);try{await Gj({activeConnectionId:e.id,maxResults:Number(b),maxSearchesPerTurn:Number(S),maxFetchesPerTurn:Number(w)}),await F(),N(`当前搜索 Key:${e.label}`)}catch(e){j(fj(e,`切换搜索 Key 失败`))}finally{D(!1)}},se=async e=>{D(!0),k(e.id),j(null),N(null);try{let t=await Wj(e.id);N(`「${e.label}」连接可用:${t.resultCount} 条结果 · ${t.latencyMs} ms`)}catch(e){j(fj(e,`搜索 Key 测试失败`))}finally{k(null),D(!1)}},ce=async()=>{if(P!==null){D(!0),j(null);try{await Uj(P.id),ee(null),await F(),N(`搜索 Key 已删除`)}catch(e){j(fj(e,`删除搜索 Key 失败`)),ee(null)}finally{D(!1)}}};return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Hc,{open:e,onOpenChange:t,children:(0,g.jsxs)(dG,{icon:$o,title:`联网搜索`,description:`独立管理搜索 Key 与每轮配额`,closeLabel:`关闭联网搜索`,count:i.length,widthClassName:`w-[min(560px,calc(100vw-24px))]`,onEscapeKeyDown:e=>{o!==null&&(e.preventDefault(),re())},actions:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(V,{size:`sm`,variant:`secondary`,disabled:E,onClick:ne,"aria-label":`每轮配额`,children:[(0,g.jsx)($s,{size:13,"aria-hidden":`true`}),`每轮配额`]}),(0,g.jsxs)(V,{size:`sm`,variant:`secondary`,disabled:E,onClick:I,"aria-label":`添加 Key`,children:[(0,g.jsx)(Vs,{size:13,"aria-hidden":`true`}),`添加 Key`]})]}),children:[o===null?(0,g.jsx)(Bc,{message:A??M,tone:A?`error`:`success`,onDismiss:()=>A?j(null):N(null)}):null,(0,g.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3`,children:i.length===0?(0,g.jsx)(fG,{icon:ls,title:`还没有搜索 Key`,hint:`添加 DeepSeek 或 GLM 的搜索 Key 后,输入框的地球按钮才可点亮。`,action:(0,g.jsxs)(V,{size:`sm`,variant:`secondary`,onClick:I,disabled:E,"aria-label":`添加第一个 Key`,children:[(0,g.jsx)(Vs,{size:13,"aria-hidden":`true`}),`添加 Key`]})}):(0,g.jsx)(`ul`,{className:`space-y-2`,children:i.map(e=>{let t=e.id===a,n=O===e.id;return(0,g.jsxs)(`li`,{className:B(`flex items-center gap-2.5 rounded-xl border px-3 py-2.5`,t?`border-accent/30 bg-accent-soft/50`:`border-line bg-surface`),children:[(0,g.jsx)(`span`,{className:B(`grid size-8 shrink-0 place-items-center rounded-lg`,t?`bg-surface text-accent`:`bg-surface-2 text-ink-3`),children:(0,g.jsx)($o,{size:14,"aria-hidden":`true`})}),(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,g.jsx)(`span`,{className:`truncate text-[12px] font-medium text-ink`,children:e.label}),t?(0,g.jsx)(`span`,{className:`shrink-0 rounded-full bg-success/10 px-1.5 py-[1px] text-[8.5px] text-success`,children:`当前`}):null]}),(0,g.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1 text-[9.5px] text-ink-3`,children:[(0,g.jsx)(`span`,{className:`shrink-0`,children:NK(e.provider)}),(0,g.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,g.jsx)(`span`,{className:`shrink-0`,children:PK(e)}),(0,g.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,g.jsx)(`span`,{className:`truncate font-mono`,children:e.maskedKey})]})]}),(0,g.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5`,children:[(0,g.jsx)(gm,{label:`编辑 ${e.label}`,disabled:E,onClick:()=>te(e),children:(0,g.jsx)(Ns,{size:13,"aria-hidden":`true`})}),(0,g.jsx)(gm,{label:`设为当前 ${e.label}`,active:t,disabled:E||t,onClick:()=>void oe(e),children:(0,g.jsx)(Ja,{size:13,"aria-hidden":`true`})}),(0,g.jsx)(gm,{label:`测试连接 ${e.label}`,"aria-busy":n,disabled:E,onClick:()=>void se(e),children:n?(0,g.jsx)(ds,{size:13,className:`animate-spin motion-reduce:animate-none`,"aria-hidden":`true`}):(0,g.jsx)(Ac,{size:13,"aria-hidden":`true`})}),(0,g.jsx)(gm,{label:`删除 ${e.label}`,tone:`danger`,disabled:E,onClick:()=>ee(e),children:(0,g.jsx)(yc,{size:13,"aria-hidden":`true`})})]})]},e.id)})})})]})}),(0,g.jsx)(Hc,{open:o===`add`||o===`edit`,onOpenChange:e=>{e||re()},children:(0,g.jsxs)(Wc,{overlayClassName:`z-[310]`,className:MK,children:[(0,g.jsx)(Gc,{children:c===null?`添加搜索 Key`:`编辑搜索 Key`}),(0,g.jsx)(Kc,{className:`sr-only`,children:`搜索 Key 与模型 Key 分开保存,只保存在本机加密存储。`}),A===null?null:(0,g.jsx)(qc,{message:A,onDismiss:()=>j(null)}),(0,g.jsx)(hm,{label:`服务商`,showLabel:!0,value:u,onValueChange:e=>d(e),options:[...kK],disabled:c!==null}),u===`glm`?(0,g.jsx)(hm,{label:`区域`,showLabel:!0,value:f,onValueChange:e=>p(e),options:[...AK]}):null,(0,g.jsxs)(`label`,{htmlFor:`web-search-key-label`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`名称`,(0,g.jsx)(fm,{id:`web-search-key-label`,className:`mt-1`,value:m,onChange:e=>_(e.target.value),placeholder:`例如:DeepSeek 搜索`})]}),(0,g.jsxs)(`label`,{htmlFor:`web-search-key-secret`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`API Key`,(0,g.jsx)(fm,{id:`web-search-key-secret`,className:`mt-1 font-mono text-[11px]`,type:`password`,value:v,onChange:e=>y(e.target.value),placeholder:c===null?`sk-…`:`留空表示不修改`,autoComplete:`off`})]}),(0,g.jsxs)(`div`,{className:`flex justify-end gap-2 pt-1`,children:[(0,g.jsx)(V,{size:`sm`,variant:`ghost`,disabled:E,onClick:re,children:`取消`}),(0,g.jsx)(V,{size:`sm`,variant:`primary`,disabled:E||!m.trim()||c===null&&!v.trim(),onClick:()=>void ie(),children:`保存`})]})]})}),(0,g.jsx)(Hc,{open:o===`quota`,onOpenChange:e=>{e||re()},children:(0,g.jsxs)(Wc,{overlayClassName:`z-[310]`,className:MK,children:[(0,g.jsx)(Gc,{children:`每轮配额`}),(0,g.jsx)(Kc,{className:`sr-only`,children:`控制每轮搜索的结果数、搜索次数与抓取次数。`}),A===null?null:(0,g.jsx)(qc,{message:A,onDismiss:()=>j(null)}),(0,g.jsx)(hm,{label:`结果数`,showLabel:!0,value:b,onValueChange:x,options:jK}),(0,g.jsxs)(`label`,{htmlFor:`web-search-quota-searches`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`每轮搜索次数`,(0,g.jsx)(fm,{id:`web-search-quota-searches`,className:`mt-1`,inputMode:`numeric`,value:S,onChange:e=>C(e.target.value)})]}),(0,g.jsxs)(`label`,{htmlFor:`web-search-quota-fetches`,className:`block text-[10.5px] font-semibold text-ink-3`,children:[`每轮抓取次数`,(0,g.jsx)(fm,{id:`web-search-quota-fetches`,className:`mt-1`,inputMode:`numeric`,value:w,onChange:e=>T(e.target.value)})]}),(0,g.jsxs)(`div`,{className:`flex justify-end gap-2 pt-1`,children:[(0,g.jsx)(V,{size:`sm`,variant:`ghost`,disabled:E,onClick:re,children:`取消`}),(0,g.jsx)(V,{size:`sm`,variant:`primary`,disabled:E,onClick:()=>void ae(),children:`保存`})]})]})}),(0,g.jsx)(Jc,{open:P!==null,title:`删除搜索 Key?`,description:`将删除「${P?.label??``}」及其加密 Key。已开启联网搜索的会话会在下一轮失败关闭,直到重新配置。`,confirmLabel:`删除`,danger:!0,pending:E,onCancel:()=>ee(null),onConfirm:()=>void ce()})]})}function IK(e,t,n){let r=e.indexOf(t);if(r<0)return e;let i=Math.max(0,Math.min(n,e.length)),a=i>r?i-1:i;if(a===r)return e;let o=[...e];return o.splice(r,1),o.splice(a,0,t),o}function LK(e,t){let n=new Map(e.map(e=>[e.id,e])),r=t.map(e=>n.get(e)).filter(e=>e!==void 0),i=new Set(t);return[...e.filter(e=>e.kind==="default"),...r,...e.filter(e=>e.kind!=="default"&&!i.has(e.id))]}var RK=yM(e=>({extra:[],create:t=>{let n={id:`ses_local_${Math.random().toString(36).slice(2,9)}`,projectId:t,title:`新会话`,status:`idle`,updatedAt:Date.now()};return e(e=>({extra:[n,...e.extra]})),n},rename:(t,n)=>e(e=>({extra:e.extra.map(e=>e.id===t?{...e,title:n}:e)}))}));function zK(){let e=RK(e=>e.create),t=gW(e=>e.startDraft),n=gW(e=>e.expandProject),r=gW(e=>e.selectSession),i=gW(e=>e.focusComposer);return(0,h.useCallback)(async()=>{let e=gW.getState().projectId;n(e??`prj_default`),t(e),i()},[e,n,i,r,t])}var BK=yM(e=>({webSearchOpen:!1,setWebSearchOpen:t=>e({webSearchOpen:t}),openWebSearch:()=>e({webSearchOpen:!0})})),VK=e=>[`terminals`,`detail`,e],HK=e=>[`EXITED`,`TERMINATED`,`INTERRUPTED`].includes(e),UK=e=>e.title??e.role??`Shell ${e.id.slice(-6)}`;async function WK(e){return WA.parse(await Y(`/api/terminals/${encodeURIComponent(e)}`))}async function GK(e,t){return YA.parse(await Y(`/api/terminals?limit=50${t&&`projectId`in t?`&projectId=${encodeURIComponent(t.projectId)}`:t&&`sessionId`in t?`&workspaceSessionId=${encodeURIComponent(t.sessionId)}`:`&global=true`}${e?`&cursor=${encodeURIComponent(e)}`:``}`))}async function KK(e,t){return WA.parse(await Y(`/api/terminals`,{method:`POST`,csrf:!0,headers:{"Idempotency-Key":t},body:{scope:e,riskAcknowledged:!0}}))}async function qK(e,t,n){let r=WA.parse(await Y(`/api/terminals/${encodeURIComponent(e)}/${t}`,{method:`POST`,csrf:!0,body:n}));return cM.setQueryData(VK(e),r),t===`rename`&&zM.setState(t=>({windows:t.windows.map(t=>({...t,tabs:t.tabs.map(t=>t.resourceId===e?{...t,title:UK(r)}:t)}))})),await cM.invalidateQueries({queryKey:[`terminals`]}),t===`terminate`&&cM.invalidateQueries({queryKey:[`workspace`]}),r}function JK(e){cM.setQueryData(VK(e.id),e),zM.getState().open({kind:`terminal`,resourceId:e.id,title:UK(e),projectId:e.projectId,sessionId:e.projectId?e.sourceSessionId:e.workspaceSessionId,source:e.mode===`dev`?`agent`:e.projectId?`project`:e.workspaceSessionId?`session`:`global`});for(let t of zM.getState().windows)if(t.tabs.some(t=>t.resourceId===e.id))for(let e of t.tabs)e.resourceId===`terminal:empty`&&zM.getState().closeTab(t.id,e.id)}function YK(e,t){let n=LA.safeParse(e.resourceTarget);return!n.success||typeof e.originClientSessionId!=`string`||e.originClientSessionId!==t?!1:(XK(n.data),!0)}function XK(e,t=!1){cM.invalidateQueries({queryKey:[`terminals`]}),cM.invalidateQueries({queryKey:[`workspace`]}),zM.getState().open({kind:`terminal`,resourceId:e.terminalId,title:e.role??`终端`,projectId:e.projectId,source:`agent`,activate:t})}function ZK(e){return e.status===`EXITED`||e.status===`TERMINATED`||e.status===`INTERRUPTED`&&e.reasonCode===`NOT_STARTED`}async function QK(e,t){let n=LA.safeParse(e.closedTerminalTarget);if(!n.success||!t||e.originClientSessionId!==t)return!1;let{terminalId:r,projectId:i}=n.data,a=()=>zM.getState().windows.flatMap(e=>e.tabs.filter(e=>e.kind===`terminal`&&e.resourceId===r&&e.projectId===i).map(t=>({windowId:e.id,tabId:t.id})));if(!a().length)return!1;try{let e=await WK(r);if(e.id!==r||e.projectId!==i||!ZK(e))return!1;cM.setQueryData(VK(r),e);let t=zM.getState().focusedId;for(let e of a())zM.getState().closeTab(e.windowId,e.tabId);return t&&zM.getState().windows.some(e=>e.id===t)&&zM.setState({focusedId:t}),cM.invalidateQueries({queryKey:[`terminals`]}),cM.invalidateQueries({queryKey:[`workspace`]}),!0}catch{return!1}}function $K(e){return e.payload??{}}function eq(e,t){let n=e[t];return typeof n==`string`?n:void 0}function tq(e,t){let n=e[t];return typeof n==`number`?n:void 0}var nq=new Set([`normal`,`continued`,`budget`,`output_truncated`,`provider_error`,`error`,`cancelled`,`interrupted`]);function rq(e){let t=e.terminalReason;return typeof t==`string`&&nq.has(t)?t:void 0}var iq=new Set(nA);function aq(e){let t=e.budgetCause;return typeof t==`string`&&iq.has(t)?t:void 0}function oq(e,t){let n=e.findIndex(e=>e.id===t.id);if(n===-1)return[...e,t];let r=[...e];return r[n]=t,r}function sq(e,t,n){return e.map(e=>e.kind===`tool`&&e.id===t?{...e,...n}:e)}function cq(e,t,n){return e.map(e=>e.kind===`approval`&&e.id===t?{...e,status:n}:e)}function lq(e,t){let n=eq(t,`toolCallId`)??`${e.eventId}_tool`,r=eq(t,`turnId`);return r===void 0?n:`${r}:${n}`}function uq(e,t){let n=e.find(e=>e.kind===`message`&&e.id===t.messageId);return oq(e,{id:t.messageId,kind:`message`,role:`assistant`,text:`${n?.text??``}${t.text}`,createdAt:n?.createdAt??t.createdAt,...n?.turnId===void 0&&t.turnId===void 0?{}:{turnId:n?.turnId??t.turnId},streaming:!0})}function dq(e){return Array.isArray(e.attachments)?e.attachments.filter(e=>typeof e==`object`&&!!e).flatMap(e=>{let t=typeof e.id==`string`&&/^att_[a-f0-9-]{36}$/.test(e.id)?e.id:null;if(t===null)return[];let n=e.kind===`image`?`image`:`document`,r=e.status===`pending`||e.status===`failed`?e.status:`ready`,i=e.method===`native`||e.method===`text-layer`||e.method===`ocr`||e.method===`vision`?e.method:`none`;return[{id:t,filename:typeof e.filename==`string`?e.filename:`attachment`,mime:typeof e.mime==`string`?e.mime:`application/octet-stream`,kind:n,sizeBytes:typeof e.sizeBytes==`number`?e.sizeBytes:0,status:r,method:i,pageCount:typeof e.pageCount==`number`?e.pageCount:null,tokenCount:typeof e.tokenCount==`number`?e.tokenCount:0,errorCode:typeof e.errorCode==`string`?e.errorCode:null}]}).slice(0,8):[]}function fq(e,t){let n=$K(t),r=eq(n,`turnId`)??t.eventId;switch(t.type){case`user.message`:{let i=eq(n,`text`)??``,a=Array.isArray(n.attachmentIds)?n.attachmentIds.filter(e=>typeof e==`string`&&/^att_[a-f0-9-]{36}$/.test(e)).slice(0,8):[],o=dq(n);return oq(e.filter(e=>!e.id.startsWith(`optimistic_user_`)),{id:`msg_${r}_user`,kind:`message`,role:`user`,text:i,createdAt:t.timestamp,...o.length===0&&a.length?{screenshots:{sessionId:t.streamId,ids:a}}:{},...o.length?{attachments:o}:{},turnId:r})}case`assistant.message`:{let i=eq(n,`text`)??``;return oq(e,{id:eq(n,`messageId`)??`msg_${r}_assistant`,kind:`message`,role:`assistant`,text:i,createdAt:t.timestamp,turnId:r})}case`assistant.delta`:{let i=eq(n,`text`)??``;return uq(e,{messageId:eq(n,`messageId`)??`msg_${r}_assistant`,text:i,createdAt:t.timestamp,turnId:r})}case`tool.requested`:return oq(e,{id:lq(t,n),kind:`tool`,turnId:r,name:eq(n,`name`)??`tool`,summary:eq(n,`argsSummary`)??``,args:``,status:`running`,createdAt:t.timestamp});case`tool.started`:{let i=lq(t,n);return e.some(e=>e.kind===`tool`&&e.id===i)?sq(e,i,{status:`running`}):oq(e,{id:i,kind:`tool`,turnId:r,name:eq(n,`name`)??`tool`,summary:``,args:``,status:`running`,createdAt:t.timestamp})}case`tool.command.created`:{let r=eq(n,`commandId`),i=jO.safeParse(n.command);return r&&/^cmd_[a-f0-9-]{36}$/.test(r)?sq(e,lq(t,n),{commandId:r,...i.success?{args:JSON.stringify(i.data,null,2),commandLabel:[i.data.executable.split(/[\\/]/).at(-1),...i.data.args].join(` `)}:{}}):e}case`tool.completed`:{let i=lq(t,n),a=RA.safeParse(n.resourceTarget),o=Array.isArray(n.supersedes)?n.supersedes.filter(e=>typeof e==`string`):[],s=sq(e,i,{status:`done`,output:eq(n,`resultSummary`)??``,...a.success?{resourceTarget:a.data}:{}});return o.reduce((e,n)=>sq(e,lq(t,{turnId:r,toolCallId:n}),{retried:!0}),s)}case`tool.failed`:return sq(e,lq(t,n),{status:`error`,output:`${eq(n,`errorCode`)??`TOOL_ERROR`}: ${eq(n,`message`)??`tool failed`}`});case`file.changed`:{let i=eq(n,`path`)??`file`,a=eq(n,`version`)??``,o=eq(n,`changeType`)??`modified`;return oq(e,{id:`file_${r}_${i}_${a}`,kind:`artifact`,turnId:r,title:`${o===`created`?`已创建`:`已修改`} ${i}`,description:`文件变更 · ${o}`,meta:a.slice(0,12),createdAt:t.timestamp})}case`tool.approval.required`:return oq(e,{id:eq(n,`approvalId`)??`approval_${t.eventId}`,kind:`approval`,turnId:r,toolName:eq(n,`toolName`),summary:eq(n,`summary`),risk:eq(n,`risk`),scope:n.scope,expiresAt:tq(n,`expiresAt`),status:`pending`,createdAt:t.timestamp});case`tool.approval.resolved`:{let t=eq(n,`approvalId`)??``,r=eq(n,`decision`)===`approved`?`approved`:`rejected`;return e.some(e=>e.kind===`approval`&&e.id===t)?cq(e,t,r):e}case`plan.updated`:{let t=OA.safeParse(n.plan);return t.success?oq(e,t.data):e}case`artifact.created`:{let t=n.artifact;return t===void 0?e:oq(e,t)}case`turn.failed`:return oq(e,{id:`error_${r}`,kind:`error`,turnId:r,message:`${eq(n,`errorCode`)??`INTERNAL`}: ${eq(n,`message`)??`执行失败`}`,createdAt:t.timestamp});case`turn.interrupted`:return oq(e,{id:`interrupted_${r}`,kind:`error`,turnId:r,message:`执行已中断,请重新发送任务。`,createdAt:t.timestamp});case`turn.cancelled`:return oq(e,{id:`cancelled_${r}`,kind:`error`,turnId:r,message:`已停止当前执行。`,createdAt:t.timestamp});default:return e}}function pq(e,t){let n=fq(e,t);if(!gq(t))return n;let r=$K(t),i=_q(t),a=t.type===`turn.completed`?`completed`:t.type===`turn.failed`?`failed`:t.type===`turn.cancelled`?`cancelled`:`interrupted`,o=rq(r),s=aq(r),c=rA.safeParse(r.fileResults),l=tq(r,`fileResultsOmitted`);return n.map(e=>e.kind===`message`&&e.turnId===i?{...e,streaming:!1,...e.role===`user`?{turnOutcome:a,durationMs:tq(r,`durationMs`),...o===void 0?{}:{terminalReason:o},...s===void 0?{}:{budgetCause:s},...c.success?{fileResults:c.data}:{},...l===void 0?{}:{fileResultsOmitted:l}}:{}}:e.kind===`approval`&&e.status===`pending`&&i!==null&&e.turnId===i?{...e,status:`rejected`}:e)}function mq(e){let t={};for(let n of e){if(n.type!==`model.usage`)continue;let e=$K(n),r=eq(e,`model`),i=tq(e,`inputTokens`),a=tq(e,`outputTokens`),o=tq(e,`durationMs`),s=tq(e,`contextWindow`);r!==void 0&&(t[r]={...t[r],...i===void 0?{}:{inputTokens:i},...a===void 0?{}:{outputTokens:a},...o===void 0?{}:{durationMs:o},...s===void 0?{}:{contextWindow:s},updatedAt:n.timestamp})}return t}function hq(e){return e.reduce((e,t)=>pq(e,t),[])}function gq(e){return e.type===`turn.completed`||e.type===`turn.failed`||e.type===`turn.cancelled`||e.type===`turn.interrupted`}function _q(e){return eq($K(e),`turnId`)??null}function vq(e){return e.replace(/\s+/g,` `).trim().slice(-240).trimStart()}function yq(e,t){return e.findIndex(e=>e.id===t.id)===-1?[...e,{id:t.id,kind:`reasoning`,text:vq(t.text),streaming:!0,createdAt:t.createdAt,...t.turnId===void 0?{}:{turnId:t.turnId}}]:e.map(e=>e.id===t.id&&e.kind===`reasoning`?{...e,text:vq(`${e.text}${t.text}`),streaming:!0}:e)}function bq(e,t){return new Promise((n,r)=>{if(t.aborted){r(new DOMException(`Aborted`,`AbortError`));return}let i=window.setTimeout(()=>{t.removeEventListener(`abort`,a),n()},e),a=()=>{window.clearTimeout(i),r(new DOMException(`Aborted`,`AbortError`))};t.addEventListener(`abort`,a,{once:!0})})}function xq(e){return`${e}_${Math.random().toString(36).slice(2,10)}`}function Sq(e,t){return{id:e,kind:`message`,role:`assistant`,text:t,createdAt:Date.now(),streaming:!0}}new class{async snapshot(){return await Promise.resolve(),structuredClone(ite)}async timeline(e){return await Promise.resolve(),e===`ses_1`?structuredClone(rte):[]}async*sendTurn({text:e,signal:t}){let n={id:xq(`plan`),kind:`plan`,title:`执行计划`,createdAt:Date.now(),steps:[{id:`p1`,title:`确认当前会话与项目状态`,status:`running`},{id:`p2`,title:`更新工作台并启动开发服务`,status:`pending`},{id:`p3`,title:`验证预览地址与日志`,status:`pending`}]};await bq(420,t),yield{type:`plan`,item:n},await bq(520,t),yield{type:`plan`,item:{...n,steps:[{id:`p1`,title:`确认当前会话与项目状态`,status:`done`},{id:`p2`,title:`更新工作台并启动开发服务`,status:`running`},{id:`p3`,title:`验证预览地址与日志`,status:`pending`}]}};let r=Sq(xq(`msg`),``);yield{type:`message.assistant`,item:r};for(let n of[`收到。`,`我会在 **${e.slice(0,24)}** 这个任务上继续,`,`先读取项目脚本和现有端口,再启动开发服务。`])await bq(160,t),yield{type:`message.delta`,id:r.id,text:n};let i={id:xq(`tool`),kind:`tool`,name:`read_file`,summary:`读取 package.json 与 vite.config.ts`,args:`{ "paths": ["package.json", "apps/web/vite.config.ts"] }`,status:`running`,createdAt:Date.now()};yield{type:`tool`,item:i},await bq(700,t),yield{type:`tool.update`,id:i.id,patch:{status:`done`,durationMs:76,output:`2 个文件 · 1.8 KB · 发现 dev / build 脚本`}},await bq(320,t),yield{type:`plan`,item:{...n,steps:[{id:`p1`,title:`确认当前会话与项目状态`,status:`done`},{id:`p2`,title:`更新工作台并启动开发服务`,status:`running`},{id:`p3`,title:`验证预览地址与日志`,status:`pending`}]}};let a={id:xq(`tool`),kind:`tool`,name:`run_command`,summary:`pnpm --filter @larness/web dev`,args:`{ "command": "pnpm --filter @larness/web dev", "cwd": ".", "timeout": 120000 }`,status:`running`,createdAt:Date.now()};yield{type:`tool`,item:a},await bq(1100,t),yield{type:`tool.update`,id:a.id,patch:{status:`done`,durationMs:1084,output:`VITE v7.1.7 ready in 412 ms
108
+ ➜ Local: http://localhost:5173/`}},yield{type:`plan`,item:{...n,steps:[{id:`p1`,title:`确认当前会话与项目状态`,status:`done`},{id:`p2`,title:`更新工作台并启动开发服务`,status:`done`},{id:`p3`,title:`验证预览地址与日志`,status:`running`}]}};let o=Sq(xq(`msg`),``);yield{type:`message.assistant`,item:o};for(let e of[`开发服务器已启动,端口 **5173**。`,`你可以从顶部浏览器入口打开预览,`,`或在右侧服务区查看实时日志。`])await bq(180,t),yield{type:`message.delta`,id:o.id,text:e};yield{type:`artifact`,item:{id:xq(`art`),kind:`artifact`,title:`本地预览已就绪`,description:`Vite 开发服务运行在 5173,可从浏览器窗口打开。`,meta:`http://localhost:5173`,href:`http://localhost:5173`,createdAt:Date.now()}},yield{type:`plan`,item:{...n,steps:[{id:`p1`,title:`确认当前会话与项目状态`,status:`done`},{id:`p2`,title:`更新工作台并启动开发服务`,status:`done`},{id:`p3`,title:`验证预览地址与日志`,status:`done`}]}},yield{type:`turn.done`}}async resolveApproval(e,t){await new Promise(e=>window.setTimeout(e,600))}async cancelTurn(e){await Promise.resolve()}};var Cq=null,wq=null,Tq=null,Eq=null,Dq=0,Oq=!1,kq=!1,Aq=0,jq=null,Mq=new Set;function Nq(){jq!==null&&(window.clearTimeout(jq),jq=null)}function Pq(e){return{id:`error_${Date.now()}_${Math.random().toString(36).slice(2,6)}`,kind:`error`,message:e,createdAt:Date.now()}}async function Fq(e,t,n){if(t.length===0)return;let r=await Qj(e,t),i=r.find(({attachment:e})=>e.status===`failed`);if(i)throw Error(`${i.attachment.filename} 解析失败,请移除或重试。`);if(!n){for(let{attachment:t}of r)if(t.kind===`image`&&t.method===`none`)try{await Zj(e,t.id)}catch{throw Error(`${t.filename} 需要视觉模型或本地 OCR 才能发送。`)}}return r.map(({attachment:e})=>e.id)}function Iq(){Tq!==null&&(window.clearTimeout(Tq),Tq=null),Nq(),Aq=0,Eq=null,wq?.close(),wq=null}function Lq(e){return e.length===0||/unauthenticated|authorization|session|revoked|expired|device/i.test(e)}var Rq=Object.freeze({id:null,phase:`idle`,startedAt:null});function zq(e=`idle`,t=null,n=null){return{id:t,phase:e,startedAt:n}}var Bq=e=>e.turn.phase!==`idle`,Vq=e=>e.turn.id,Hq=e=>e.turn.startedAt;function Uq(e){switch(e){case`QUEUED`:return`pending`;case`PREPARING`:case`RUNNING`:return`running`;case`WAITING_APPROVAL`:return`waiting_approval`;case`CANCELLING`:return`cancelling`;default:return`running`}}function Wq(e,t){let n=_q(t);if(gq(t))return e.id===null||n===null||e.id===n?Rq:e;if(t.type!==`turn.created`&&t.type!==`turn.status`||n===null)return e;let r=t.payload??{},i=typeof r.status==`string`?r.status:null,a=e.id===n;return{id:n,phase:t.type===`turn.created`?`pending`:Uq(i),startedAt:a?e.startedAt??t.timestamp:t.timestamp}}function Gq(e){return e===null?Rq:{id:e.id,phase:Uq(e.status),startedAt:e.createdAt}}function Kq(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n?.type===`context.compressed`)return{degraded:(typeof n.payload==`object`&&n.payload!==null?n.payload:{}).degraded===!0,createdAt:n.timestamp}}return null}function qq(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n?.type!==`turn.completed`)continue;let r=typeof n.payload==`object`&&n.payload!==null?n.payload.usage:null;if(typeof r==`object`&&r){let e=r;if(typeof e.inputTokens==`number`)return e.inputTokens;if(typeof e.totalTokens==`number`)return e.totalTokens}}return 0}function Jq(e,t){return e.some(e=>gq(e)&&_q(e)===t)}function Yq(e){let t=$q.getState();e.sessionId!==t.sessionId||t.turn.phase===`idle`||t.turn.id!==null&&e.turnId!==t.turn.id||Mq.has(e.turnId)||$q.setState({items:uq(t.items,{messageId:e.messageId,text:e.text,createdAt:e.timestamp,turnId:e.turnId})})}function Xq(e){let t=$q.getState();e.sessionId!==t.sessionId||t.turn.phase===`idle`||t.turn.id!==null&&e.turnId!==t.turn.id||Mq.has(e.turnId)||$q.setState({items:yq(t.items,{id:`reasoning_${e.turnId}`,turnId:e.turnId,text:e.text,createdAt:e.timestamp})})}function Zq(e,t=!1,n=!1){let r=$q.getState();if(e.sessionId!==void 0&&e.sessionId!==r.sessionId||e.sequence<=r.lastSeq)return;if(!n&&e.sequence!==r.lastSeq+1){r.syncEvents();return}let i=e.payload??{},a=_q(e),o=gq(e);o&&a!==null&&Mq.add(a);let s=Wq(r.turn,e),c=pq(r.items,e).map(e=>o&&e.kind===`reasoning`?{...e,streaming:!1}:e),l=e.type===`turn.completed`&&typeof i.usage==`object`&&i.usage!==null?i.usage:null,u=typeof l?.inputTokens==`number`?l.inputTokens:typeof l?.totalTokens==`number`?l.totalTokens:r.contextTokens,d=e.type===`model.usage`?{...r.modelUsage,...mq([e])}:r.modelUsage;$q.setState({items:o?c.map(e=>e.kind===`message`?{...e,streaming:!1}:e):c,lastSeq:e.sequence,turn:s,contextTokens:u,contextNotice:e.type===`context.compressed`?{degraded:i.degraded===!0,createdAt:e.timestamp}:r.contextNotice,modelUsage:d}),e.type===`tool.completed`&&QK(i,cM.getQueryData([`session`])?.clientSessionId),o&&cM.invalidateQueries({queryKey:fM(e.sessionId??r.sessionId)}),t&&e.type===`tool.completed`&&typeof i.originClientSessionId==`string`&&(cM.invalidateQueries({queryKey:[`terminals`]}),YK(i,cM.getQueryData([`session`])?.clientSessionId))}function Qq(e){if(typeof window>`u`)return;Iq(),Eq=e;let t=window.location.protocol===`https:`?`wss`:`ws`,n=new WebSocket(`${t}://${window.location.host}/ws`);wq=n,n.addEventListener(`open`,()=>{Eq===e&&n.send(JSON.stringify({type:`subscribe`,subscriptions:[{topic:`agent`,resourceId:e}]}))}),n.addEventListener(`message`,t=>{if(wq!==n||Eq!==e)return;let r;try{r=JSON.parse(String(t.data))}catch{return}if(typeof r!=`object`||!r)return;let i=r;i.kind===`subscribed`?(typeof i.currentSequence==`number`?i.currentSequence:0)>$q.getState().lastSeq&&$q.getState().syncEvents():i.kind===`assistant.delta`&&i.topic===`agent`?Yq(i):i.kind===`assistant.reasoning.delta`&&i.topic===`agent`?Xq(i):i.kind===`event`&&i.topic===`agent`&&Zq(i,!0)}),n.addEventListener(`close`,t=>{wq===n&&Eq===e&&(wq=null,t.code===1008&&Lq(t.reason)?window.dispatchEvent(new Event(`larness:unauthenticated`)):Tq=window.setTimeout(()=>{Eq===e&&Qq(e)},1e3))}),n.addEventListener(`error`,()=>n.close())}var $q=yM((e,t)=>({sessionId:``,items:[],loading:!1,turn:Rq,contextTokens:0,contextNotice:null,modelUsage:{},lastSeq:0,scrollToLatestNonce:0,load:async n=>{let r=++Dq;if(Iq(),Mq=new Set,Cq?.abort(),Cq=null,e({sessionId:n,items:[],loading:!!n,turn:Rq,contextTokens:0,contextNotice:null,modelUsage:{},lastSeq:0}),!n)e({loading:!1});else if(n.startsWith(`draft_`))e({loading:!1});else try{let[i,a]=await Promise.all([Rj(n),aM(n,0)]);if(r!==Dq||t().sessionId!==n)return;let o=i.activeTurn!==null&&!Jq(a,i.activeTurn.id)?i.activeTurn:null;Mq=new Set(a.filter(e=>gq(e)).map(e=>_q(e)).filter(e=>e!==null)),e({items:hq(a),lastSeq:a.at(-1)?.sequence??0,loading:!1,turn:Gq(o),contextTokens:qq(a),contextNotice:Kq(a),modelUsage:mq(a)});let s=cM.getQueryData([`session`]);for(let e of a)e.type===`tool.completed`&&typeof e.payload==`object`&&e.payload!==null&&QK(e.payload,s?.clientSessionId);Qq(n)}catch(t){if(r!==Dq)return;e({loading:!1,items:[Pq(t instanceof Error?t.message:`加载会话失败`)]})}},disconnect:()=>{Iq()},syncEvents:async()=>{let n=t().sessionId;if(n){if(Oq)kq=!0;else{Oq=!0,Nq();try{do{kq=!1;let e=await aM(n,t().lastSeq);if(t().sessionId!==n)return;for(let t of e)Zq(t,!1,!0)}while(kq&&t().sessionId===n);Aq=0}catch(r){if(t().sessionId!==n)return;if(Aq<2){Aq+=1;let e=500*Aq;jq=window.setTimeout(()=>{jq=null,t().sessionId===n&&t().syncEvents()},e);return}Aq=0;let i=r instanceof Error?r.message:`事件补拉失败`;e(e=>({items:[...e.items,Pq(`事件补拉失败:${i}`)]}))}finally{Oq=!1,kq&&(kq=!1,t().syncEvents())}}}},send:async(n,r,i,a,o,s=[],c,l=!1)=>{let u=n.trim();if(!u&&s.length===0||t().turn.phase!==`idle`)return;let d=t().sessionId;if(!d)return;e(e=>({scrollToLatestNonce:e.scrollToLatestNonce+1}));let f=gW.getState();if(f.sessionId!==d||cM.isMutating({mutationKey:pM(d)}))return;let p=f.draftSession;if(p!==null&&p.id===d){e({turn:zq(`pending`,null,Date.now())});let n=null,f=!1;try{n=await Ij({...p.projectId===null?{}:{projectId:p.projectId},...a===void 0?{}:{agentProfile:a}}),await zj(n.id,{...r,approvalPolicyId:i,...o===void 0?{}:{webSearchEnabled:o}}),i!==void 0&&cM.invalidateQueries({queryKey:mM});let e=await Fq(n.id,s,l);await tM(n.id,{input:u,...r,...e?{attachmentIds:e}:{}},crypto.randomUUID()),f=!0,c?.(),await cM.invalidateQueries({queryKey:[`workspace`]}),gW.getState().commitDraft(p.id,n.id,n.projectId)}catch(r){if(n!==null&&!f&&await Kj(n.id).catch(()=>void 0),t().sessionId!==d)return;let i=r instanceof Error?r.message:`发送失败`;e(e=>({turn:Rq,items:[...e.items,Pq(`发送失败:${i}`)]}))}return}let m={id:`optimistic_user_${Date.now()}`,kind:`message`,role:`user`,text:u,createdAt:Date.now()};e(e=>({items:[...e.items,m],turn:zq(`pending`,null,Date.now())}));try{let n=await Fq(d,s,l),i=await tM(d,{input:u,...r,...n?{attachmentIds:n}:{}},crypto.randomUUID());if(c?.(),cM.invalidateQueries({queryKey:dM(d)}),t().sessionId!==d)return;let a=t().turn;a.id===null&&e({turn:{...a,id:i.turnId}}),await cM.invalidateQueries({queryKey:[`workspace`]}),t().sessionId===d&&await t().syncEvents()}catch(n){if(t().sessionId!==d)return;let r=n instanceof Error?n.message:`发送失败`;e(e=>({turn:Rq,items:[...e.items.filter(e=>e.id!==m.id),Pq(`发送失败:${r}`)]})),await t().syncEvents()}},stop:()=>{let e=t().sessionId,n=t().turn.id;n!==null&&nM(n).catch(n=>{if(t().sessionId!==e)return;let r=n instanceof Error?n.message:`停止失败`;$q.setState(e=>({items:[...e.items,Pq(`停止失败:${r}`)]}))})},resumeTurn:async n=>{let r=t().sessionId;try{let i=await rM(n);if(t().sessionId!==r)return;e({turn:zq(`pending`,i.turnId,Date.now())}),await t().syncEvents()}catch(e){if(t().sessionId!==r)return;let n=e instanceof Error?e.message:`无法继续该任务`;$q.setState(e=>({items:[...e.items,Pq(`继续失败:${n}`)]}))}},resolveApproval:async(n,r)=>{let i=r===`approve`?`approved`:`rejected`,a=t=>e(e=>({items:e.items.map(e=>e.kind===`approval`&&e.id===n?{...e,status:t}:e)}));if(t().items.find(e=>e.kind===`approval`&&e.id===n)?.status!==`pending`)return;let o=t().sessionId;await Kee(n,r),t().sessionId===o&&(a(i),await t().syncEvents())}})),eJ=5,tJ=5;function nJ({mobile:e=!1}){let t=(0,h.useId)(),{data:n}=uM(),{projectId:r,sessionId:i,draftSession:a,sidebarWidth:o,expandedProjects:s,toggleProject:c,expandProject:l,setExpandedProjects:u,selectSession:d,startDraft:f}=gW(),p=RK(e=>e.extra),m=$q(e=>null),_=zK(),v=YW(),y=wh(),b=gW(e=>e.focusComposer),[x,S]=(0,h.useState)(``),[C,w]=(0,h.useState)({}),[T,E]=(0,h.useState)(!1),[D,O]=(0,h.useState)(!1),k=BK(e=>e.webSearchOpen),A=BK(e=>e.setWebSearchOpen),[j,M]=(0,h.useState)(!1),[N,P]=(0,h.useState)(null),[ee,F]=(0,h.useState)(`global`),[I,te]=(0,h.useState)(!1),[ne,re]=(0,h.useState)(!1),[ie,ae]=(0,h.useState)(0),oe=Jg({queryKey:QW,queryFn:nG,enabled:!0,refetchInterval:15e3}),se=Math.max(0,(oe.data?.failedLast24h??0)-ie),ce=Jg({queryKey:sK(),queryFn:()=>lK(),enabled:!0,refetchInterval:3e3}),le=(0,h.useMemo)(()=>{let e=new Map;for(let t of ce.data??[])t.status===`RUNNING`&&e.set(t.projectId,(e.get(t.projectId)??0)+1);return e},[ce.data]);(0,h.useEffect)(()=>{ne&&oe.data&&ae(oe.data.failedLast24h)},[ne,oe.data]),(0,h.useEffect)(()=>{w(e=>{let t=Object.keys(s).filter(e=>s[e]===!1);if(!t.some(t=>e[t]!==void 0))return e;let n={...e};for(let e of t)delete n[e];return n})},[s]);let[ue,de]=(0,h.useState)(null),[L,fe]=(0,h.useState)(null),[pe,me]=(0,h.useState)(null),[he,ge]=(0,h.useState)(null),_e=(0,h.useRef)(null),ve=(0,h.useRef)(``),ye=(0,h.useRef)(!1),be=(0,h.useRef)(null);(0,h.useEffect)(()=>{if(ue===null)return;let e=()=>de(null),t=e=>{e.key===`Escape`&&de(null)};return window.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,t),window.addEventListener(`blur`,e),()=>{window.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,t),window.removeEventListener(`blur`,e)}},[ue]);let xe=(e,t,n,r)=>{e.preventDefault(),e.stopPropagation(),de(t===`project`&&n===`prj_default`?null:{kind:t,id:n,title:r,x:e.clientX,y:e.clientY})},Se=(0,h.useMemo)(()=>[...n.sessions].sort((e,t)=>t.updatedAt-e.updatedAt),[p,n.sessions]),Ce=e=>{l(e),f(e===`prj_default`?null:e),b()},we=Se.find(e=>e.id===i),Te=r===null&&(!we||we.workspaceKind==="default"),Ee=x.trim().toLowerCase(),De=e=>e.status!==`idle`||e.id===m,Oe=e=>e.id===i?2:+!!De(e),ke=n.projects.map(e=>{let t=e.name.toLowerCase().includes(Ee);return{...e,matchesName:t,sessions:Se.filter(n=>(e.kind==="default"?n.workspaceKind==="default":n.projectId===e.id)&&(t||n.title.toLowerCase().includes(Ee)))}}),Ae=ke.filter(e=>e.matchesName||e.sessions.length>0),je=Se.filter(e=>!Ee||e.title.toLowerCase().includes(Ee)||e.projectId&&n.projects.find(t=>t.id===e.projectId)?.name.toLowerCase().includes(Ee)).slice(0,6),Me=ke.filter(e=>e.kind!=="default"),Ne=Ee.length===0&&Me.length>1,Pe=new Map(Me.map((e,t)=>[e.id,t])),Fe=pe?Me.findIndex(e=>e.id===pe.id):-1,Ie=pe?.moved===!0&&pe.targetIndex!==Fe&&pe.targetIndex!==Fe+1,Le=()=>{document.body.style.userSelect=ve.current},Re=()=>{be.current===null&&(be.current=s,u(Object.fromEntries(ke.map(e=>[e.id,!1]))))},ze=()=>{let e=be.current;e!==null&&(be.current=null,u(e))},Be=async e=>{let t=y.getQueryData([`workspace`]);t&&y.setQueryData([`workspace`],{...t,projects:LK(t.projects,e)});try{await yj(e),await y.invalidateQueries({queryKey:[`workspace`]}),ge(null)}catch(e){t&&y.setQueryData([`workspace`],t),ge(fj(e,`调整项目顺序失败`)),y.invalidateQueries({queryKey:[`workspace`]})}},Ve=(e,t)=>{if(pe!==null||!Ne||t===`prj_default`||e.button!==0)return;try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}ve.current=document.body.style.userSelect,document.body.style.userSelect=`none`;let n=Me.findIndex(e=>e.id===t);me({id:t,pointerId:e.pointerId,startY:e.clientY,moved:!1,targetIndex:Math.max(0,n)})},R=e=>{if(pe===null||pe.pointerId!==e.pointerId)return;!pe.moved&&Math.abs(e.clientY-pe.startY)>=4&&Re();let t=_e.current?Array.from(_e.current.querySelectorAll(`[data-project-drop-index]`)).map(e=>{let t=e.getBoundingClientRect();return{top:t.top,bottom:t.bottom}}):[];me(n=>{if(n===null||n.pointerId!==e.pointerId||!n.moved&&Math.abs(e.clientY-n.startY)<4)return n;let r=t.findIndex(t=>e.clientY<(t.top+t.bottom)/2),i=r===-1?t.length:r;return n.moved&&n.targetIndex===i?n:{...n,moved:!0,targetIndex:i}})},He=e=>{if(pe===null||pe.pointerId!==e.pointerId)return;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}Le(),ze();let t=pe;if(me(null),!t.moved)return;ye.current=!0,window.setTimeout(()=>{ye.current=!1},0);let n=Me.map(e=>e.id),r=IK(n,t.id,t.targetIndex);r!==n&&Be(r)},Ue=()=>{Le(),ze(),me(null)},We=(e,t)=>{if(!Ne||t===`prj_default`||e.key!==`ArrowUp`&&e.key!==`ArrowDown`)return;e.preventDefault();let n=Me.map(e=>e.id),r=n.indexOf(t),i=r+(e.key===`ArrowUp`?-1:1);if(r<0||i<0||i>=n.length)return;let a=[...n];[a[r],a[i]]=[a[i],a[r]],Be(a)};return(0,h.useEffect)(()=>()=>{document.body.style.userSelect=ve.current;let e=be.current;e!==null&&(be.current=null,u(e))},[u]),(0,g.jsxs)(`aside`,{className:B(`shrink-0 flex-col bg-surface/45`,e?`flex h-full bg-surface`:`hidden md:flex`),style:{width:e?268:o},"aria-label":`项目与会话导航`,children:[(0,g.jsx)(`div`,{className:`px-2.5 pt-3`,children:(0,g.jsxs)(`button`,{type:`button`,onClick:_,className:`group flex h-8 w-full items-center gap-2 rounded-[9px] border border-line bg-surface px-2.5 text-[12px] font-medium text-ink shadow-[var(--shadow-card)] transition-colors hover:border-accent/30 hover:bg-accent-soft`,children:[(0,g.jsx)(Vs,{size:14,className:`text-accent`}),(0,g.jsx)(`span`,{children:`新建会话`}),(0,g.jsx)(_m,{className:`ml-auto group-hover:border-accent/20`,children:`⌘K`})]})}),(0,g.jsx)(`div`,{className:`px-2.5 pt-2.5`,children:(0,g.jsxs)(`label`,{htmlFor:`${t}-search`,className:`flex h-7 items-center gap-1.5 rounded-lg bg-black/[.035] px-2 text-ink-3 transition-colors focus-within:bg-surface focus-within:ring-1 focus-within:ring-accent/30 dark:bg-white/[.05]`,children:[(0,g.jsx)(Zs,{size:12.5}),(0,g.jsx)(fm,{id:`${t}-search`,variant:`bare`,value:x,onChange:e=>S(e.target.value),placeholder:`搜索项目或会话`,className:`h-full w-full bg-transparent text-[11.5px] text-ink outline-none placeholder:text-ink-3`,"aria-label":`搜索项目或会话`})]})}),(0,g.jsxs)(`div`,{className:`mt-3 flex min-h-0 flex-1 flex-col overflow-y-auto px-1.5 pb-2`,children:[(0,g.jsxs)(`div`,{className:`flex items-center px-2 pb-1 text-[10px] font-semibold uppercase tracking-[.08em] text-ink-3`,children:[`项目`,(0,g.jsx)(`button`,{type:`button`,onClick:()=>E(!0),"aria-label":`添加项目`,className:`ml-auto flex h-5 w-5 items-center justify-center rounded-md text-ink-3 hover:bg-black/[.05] hover:text-ink dark:hover:bg-white/[.07]`,children:(0,g.jsx)(Vo,{size:12})})]}),(0,g.jsxs)(`div`,{ref:_e,"data-project-list":!0,children:[Ae.map(e=>{let t=s[e.id]??!0,n=e.kind==="default",r=e.runningTerminals??0,o=le.get(n?null:e.id)??0,l=n?-1:Pe.get(e.id)??-1,u=pe?.id===e.id&&pe.moved,p=n?null:e.id,m=!Ee&&a?.projectId===p,h=eJ-Number(m),_=!Ee&&e.sessions.length>h,v=h+(C[e.id]??0)*tJ,y=v>=e.sessions.length,b=e.sessions;if(_&&!y){let e=new Set([...b].sort((e,t)=>Oe(t)-Oe(e)).slice(0,v));b=b.filter(t=>e.has(t))}return(0,g.jsxs)(`div`,{"data-project-id":e.id,className:B(`relative mb-0.5`,u?`opacity-60`:null),children:[Ie&&pe&&!n&&pe.targetIndex===l?(0,g.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute -top-px left-1 right-1 z-10 h-0.5 rounded-full bg-accent`}):null,(0,g.jsxs)(`div`,{className:`flex items-center gap-0.5`,"data-project-drop-index":n?void 0:l,children:[(0,g.jsxs)(`button`,{type:`button`,"aria-label":n?`默认工作区`:void 0,"aria-keyshortcuts":Ne&&!n?`ArrowUp ArrowDown`:void 0,"aria-pressed":n?Te:void 0,title:Ne&&!n?`拖拽调整项目顺序;聚焦后可按上下方向键`:void 0,onClick:()=>{ye.current?ye.current=!1:c(e.id)},onPointerDown:t=>Ve(t,e.id),onPointerMove:R,onPointerUp:He,onPointerCancel:Ue,onKeyDown:t=>We(t,e.id),onContextMenu:t=>xe(t,`project`,e.id,e.name),"aria-expanded":t,className:B(`flex h-[27px] min-w-0 flex-1 items-center gap-1.5 rounded-md px-1.5 text-left text-[11.5px] text-ink-2 hover:bg-black/[.035] hover:text-ink dark:hover:bg-white/[.05]`,Ne&&!n?`cursor-grab`:null,pe?.id===e.id?`cursor-grabbing`:null),children:[t?(0,g.jsx)(Xa,{size:11,className:`text-ink-3`}):(0,g.jsx)(eo,{size:11,className:`text-ink-3`}),(0,g.jsx)(`span`,{className:`flex h-4 w-4 items-center justify-center rounded-[4px]`,style:{backgroundColor:`${e.accent}18`,color:e.accent},children:(0,g.jsx)(Go,{size:10})}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.name}),o>0?(0,g.jsxs)(`span`,{className:`flex shrink-0 items-center gap-0.5 text-accent`,title:`${o} 个运行中的后台服务`,"aria-hidden":`true`,"data-testid":`project-service-indicator`,children:[(0,g.jsx)(tc,{size:10,strokeWidth:2}),(0,g.jsx)(`span`,{className:`font-mono text-[9px]`,children:o})]}):null,r>0?(0,g.jsx)(`span`,{className:`flex shrink-0 items-center text-success`,title:`${r} 个运行中的终端`,"aria-hidden":`true`,"data-testid":`project-terminal-indicator`,children:(0,g.jsx)(lc,{size:10,strokeWidth:2})}):null,e.git?(0,g.jsx)(`span`,{className:`flex shrink-0 items-center text-ink-3`,title:e.branch?`Git · ${e.branch}`:`Git 仓库`,"aria-hidden":`true`,"data-testid":`project-git-indicator`,children:(0,g.jsx)(qo,{size:10,strokeWidth:2})}):null,n?(0,g.jsx)(`span`,{className:`text-[9px] text-ink-3`,children:`内置`}):null]}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`在 ${e.name} 中新建会话`,onClick:()=>Ce(e.id),className:`flex h-5 w-5 shrink-0 items-center justify-center rounded text-ink-3 hover:bg-black/[.06] hover:text-ink dark:hover:bg-white/[.08]`,children:(0,g.jsx)(Vs,{size:11})})]}),t?(0,g.jsxs)(`div`,{className:`ml-[10px] border-l border-line/70 pl-1`,children:[m?(0,g.jsx)(rJ,{title:`新会话`,draft:!0,active:a?.id===i,running:!1,onClick:()=>f(p)}):null,b.length?b.map(e=>(0,g.jsx)(rJ,{title:e.title,active:e.id===i,running:De(e),onClick:()=>d(e.id,p),onContextMenu:t=>xe(t,`session`,e.id,e.title)},e.id)):m?null:(0,g.jsx)(`div`,{className:`px-2 py-1 text-[10.5px] text-ink-3`,children:`暂无会话`}),_?(0,g.jsx)(`button`,{type:`button`,"aria-expanded":y,onClick:()=>w(t=>({...t,[e.id]:y?0:(t[e.id]??0)+1})),className:`flex h-6 w-full items-center rounded-md pl-5 pr-2 text-left text-[10.5px] text-ink-3 hover:bg-black/[.035] hover:text-ink dark:hover:bg-white/[.05]`,children:y?`收起`:`展开更多`}):null]}):null]},e.id)}),Ie&&pe&&pe.targetIndex===Me.length?(0,g.jsx)(`div`,{className:`relative h-0`,"aria-hidden":`true`,children:(0,g.jsx)(`div`,{className:`absolute inset-x-1 -top-px h-0.5 rounded-full bg-accent`})}):null]}),Ae.length===0?(0,g.jsx)(`div`,{className:`mx-1 rounded-lg border border-dashed border-line px-2.5 py-3 text-[10.5px] text-ink-3`,children:Ee?`没有匹配的项目或会话`:`还没有登记项目。点击项目标题旁的 + 添加本机目录。`}):null,(0,g.jsxs)(`div`,{className:`mt-3 flex items-center px-2 pb-1 text-[10px] font-semibold uppercase tracking-[.08em] text-ink-3`,children:[`最近`,(0,g.jsx)(`span`,{className:`ml-auto font-normal normal-case tracking-normal text-ink-3/70`,children:je.length})]}),je.map(e=>{let t=n.projects.find(t=>t.id===e.projectId);return(0,g.jsxs)(`button`,{type:`button`,onClick:()=>d(e.id,e.projectId),onContextMenu:t=>xe(t,`session`,e.id,e.title),className:B(`group flex w-full flex-col gap-0.5 rounded-lg px-2 py-1.5 text-left transition-colors`,e.id===i?`bg-accent-soft/70 text-ink`:`text-ink-2 hover:bg-black/[.035] dark:hover:bg-white/[.05]`),children:[(0,g.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[De(e)?(0,g.jsx)(iJ,{}):(0,g.jsx)(po,{size:11,className:`shrink-0 text-ink-3`}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[11.5px] font-medium`,children:e.title})]}),(0,g.jsxs)(`span`,{className:`flex items-center gap-1.5 pl-[17px] text-[9.5px] text-ink-3`,children:[(0,g.jsx)(`span`,{className:`truncate`,children:t?.name??(e.workspaceKind==="default"?`默认工作区`:`独立会话`)}),(0,g.jsx)(`span`,{children:`·`}),(0,g.jsx)(`span`,{className:`shrink-0`,children:pG(e.updatedAt)})]})]},`recent_${e.id}`)})]}),(0,g.jsxs)(`div`,{className:`shrink-0 border-t border-line px-2 py-2`,children:[(0,g.jsx)(`fieldset`,{"aria-label":`服务与设置`,className:`m-0 min-w-0 border-0 p-0`,children:(0,g.jsxs)(`div`,{className:`grid grid-cols-5 gap-0.5`,children:[(0,g.jsx)(aJ,{icon:tc,title:`服务运维`,short:`服务`,onClick:()=>te(!0)}),(0,g.jsx)(aJ,{icon:ho,title:`自动化任务`,short:`任务`,badge:se,onClick:()=>re(!0)}),(0,g.jsx)(aJ,{icon:Wa,title:`记忆与偏好`,short:`记忆`,onClick:()=>{P(r!==null&&r!==`prj_default`?r:null),F(r!==null&&r!==`prj_default`?`project`:`global`),M(!0)}}),(0,g.jsx)(aJ,{icon:$o,title:`联网搜索`,short:`搜索`,onClick:()=>A(!0)}),(0,g.jsx)(aJ,{icon:ls,title:`模型与凭据`,short:`模型`,onClick:()=>O(!0)})]})}),(0,g.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 rounded-lg px-2 py-1.5 hover:bg-black/[.035] dark:hover:bg-white/[.05]`,children:[(0,g.jsxs)(`div`,{className:`relative flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-[#ffd60a] to-[#ff9f0a] text-[10px] font-semibold text-[#1d1d1f]`,children:[`B`,(0,g.jsx)(`span`,{className:`absolute -bottom-0.5 -right-0.5 h-1.5 w-1.5 rounded-full bg-success ring-2 ring-surface`})]}),(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsx)(`div`,{className:`truncate text-[11.5px] font-medium text-ink`,children:`bulv`}),(0,g.jsx)(`div`,{className:`truncate text-[9.5px] text-ink-3`,children:`本机操作者`})]}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`退出登录`,title:`退出登录`,"data-testid":`logout-button`,onClick:()=>void v(),className:`flex h-6 w-6 items-center justify-center rounded-md text-ink-3 hover:bg-black/[.06] hover:text-danger dark:hover:bg-white/[.08]`,children:(0,g.jsx)(ps,{size:13})})]})]}),ue?(0,g.jsxs)(`div`,{role:`menu`,"aria-label":`会话或项目操作`,onPointerDown:e=>e.stopPropagation(),className:`fixed z-[220] w-[184px] rounded-xl border border-line bg-surface p-1 shadow-[var(--shadow-pop)]`,style:{left:Math.min(ue.x,window.innerWidth-196),top:Math.min(ue.y,window.innerHeight-112)},children:[(0,g.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{fe({kind:ue.kind===`project`?`rename-project`:`rename-session`,id:ue.id,title:ue.title}),de(null)},className:`flex h-8 w-full items-center gap-2 rounded-lg px-2.5 text-left text-[11.5px] text-ink-2 hover:bg-black/[.045] hover:text-ink dark:hover:bg-white/[.07]`,children:[(0,g.jsx)(Ns,{size:13,className:`text-ink-3`}),ue.kind===`project`?`重命名项目`:`重命名会话`]}),ue.kind===`project`?(0,g.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{P(ue.id),F(`project`),M(!0),de(null)},className:`flex h-8 w-full items-center gap-2 rounded-lg px-2.5 text-left text-[11.5px] text-ink-2 hover:bg-black/[.045] hover:text-ink dark:hover:bg-white/[.07]`,children:[(0,g.jsx)(Wa,{size:13,className:`text-ink-3`}),`项目记忆…`]}):null,(0,g.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{fe({kind:ue.kind===`project`?`remove-project`:`archive-session`,id:ue.id,title:ue.title}),de(null)},className:`flex h-8 w-full items-center gap-2 rounded-lg px-2.5 text-left text-[11.5px] text-danger hover:bg-danger/10`,children:[ue.kind===`project`?(0,g.jsx)(yc,{size:13}):(0,g.jsx)(Aa,{size:13}),ue.kind===`project`?`移除项目`:`归档会话`]})]}):null,(0,g.jsx)(qc,{message:he,onDismiss:()=>ge(null)}),(0,g.jsx)(XW,{session:L?.kind===`rename-session`?{id:L.id,title:L.title}:null,open:L?.kind===`rename-session`,onClose:()=>fe(null)}),(0,g.jsx)(hK,{project:L?.kind===`rename-project`?{id:L.id,name:L.title}:null,open:L?.kind===`rename-project`,onClose:()=>fe(null)}),(0,g.jsx)(oJ,{open:L?.kind===`archive-session`,title:`归档会话`,description:`“${L?.title??``}”将从列表中隐藏,工作目录与源码不会被删除。`,confirmLabel:`归档`,onCancel:()=>fe(null),onConfirm:async()=>{L?.kind===`archive-session`&&(await Kj(L.id),await y.invalidateQueries({queryKey:[`workspace`]}),L.id===i&&d(``,null),fe(null))}}),(0,g.jsx)(oJ,{open:L?.kind===`remove-project`,title:`移除项目`,description:`仅移除“${L?.title??``}”的登记,不会删除本地源码;项目内会话会变成独立会话。`,confirmLabel:`移除项目`,onCancel:()=>fe(null),onConfirm:async()=>{L?.kind===`remove-project`&&(await bj(L.id),await y.invalidateQueries({queryKey:[`workspace`]}),L.id===r&&d(``,null),fe(null))}}),(0,g.jsx)(pK,{open:T,onOpenChange:E}),(0,g.jsx)(qG,{open:j,onOpenChange:M,projectId:N,initialScope:ee}),(0,g.jsx)(TK,{open:I,onOpenChange:te}),(0,g.jsx)(wG,{open:ne,onOpenChange:re}),(0,g.jsx)(oK,{open:D,onOpenChange:O}),(0,g.jsx)(FK,{open:k,onOpenChange:A})]})}function rJ({title:e,active:t,running:n,draft:r=!1,onClick:i,onContextMenu:a}){return(0,g.jsxs)(`button`,{type:`button`,onClick:i,onContextMenu:a,"aria-current":t?`true`:void 0,"aria-busy":n,className:B(`flex h-[26px] w-full items-center gap-1.5 rounded-md px-2 text-left text-[11px] transition-colors`,t?`bg-accent-soft font-medium text-ink`:`text-ink-2 hover:bg-black/[.035] hover:text-ink dark:hover:bg-white/[.05]`),children:[(0,g.jsx)(`span`,{className:`flex w-3 shrink-0 items-center justify-center`,"aria-hidden":`true`,children:n?(0,g.jsx)(iJ,{}):(0,g.jsx)(TW,{tone:t?`info`:`idle`})}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e}),r?(0,g.jsx)(`span`,{className:`shrink-0 rounded bg-black/[.045] px-1 py-[1px] text-[8.5px] text-ink-3 dark:bg-white/[.07]`,children:`草稿`}):null]})}function iJ(){return(0,g.jsx)(ds,{size:11,className:`shrink-0 animate-spin text-accent motion-reduce:animate-none`,"aria-hidden":`true`})}function aJ({icon:e,title:t,short:n,badge:r,onClick:i}){let a=r!==void 0&&r>0?`,${r} 个失败任务`:``,o=r!==void 0&&r>0?r>99?`99+`:String(r):null;return(0,g.jsxs)(`button`,{type:`button`,onClick:i,disabled:i===void 0,"aria-label":`${t}${a}`,title:`${t}${a}`,className:`group flex h-9 min-w-0 flex-col items-center justify-center gap-0.5 rounded-lg text-ink-2 transition-colors hover:bg-black/[.035] hover:text-ink disabled:cursor-default disabled:opacity-60 dark:hover:bg-white/[.05]`,children:[(0,g.jsxs)(`span`,{className:`relative flex h-4 w-4 items-center justify-center`,children:[(0,g.jsx)(e,{size:14,strokeWidth:1.75,"aria-hidden":`true`,className:`text-ink-3 transition-colors group-hover:text-ink`}),o===null?null:(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -right-2.5 -top-1.5 min-w-[12px] rounded-full bg-danger px-0.5 text-center text-[8px] font-semibold leading-[12px] text-white`,children:o})]}),(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`w-full truncate text-center text-[9px] leading-none`,children:n})]})}function oJ({open:e,title:t,description:n,confirmLabel:r,onCancel:i,onConfirm:a}){let[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(null);(0,h.useEffect)(()=>{e&&(s(!1),l(null))},[e]);let u=async()=>{s(!0),l(null);try{await a()}catch(e){l(fj(e,`操作失败`)),s(!1)}};return(0,g.jsx)(Jc,{open:e,title:t,description:n,confirmLabel:r,danger:!0,pending:o,error:c,onDismissError:()=>l(null),onCancel:i,onConfirm:()=>void u()})}var sJ=(e,t,n)=>Math.min(n,Math.max(t,e));function cJ({side:e,label:t,value:n,min:r,max:i,defaultValue:a,onChange:o,collapsed:s=!1,className:c}){return(0,g.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,"aria-label":t,"aria-hidden":s||void 0,"aria-valuenow":Math.round(n),"aria-valuemin":r,"aria-valuemax":i,tabIndex:s?-1:0,onPointerDown:t=>{t.preventDefault();let a=t.clientX,s=n,c=document.body.style.cursor,l=document.body.style.userSelect;document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`;let u=t=>{let n=e===`left`?t.clientX-a:a-t.clientX;o(sJ(s+n,r,i))},d=()=>{document.body.style.cursor=c,document.body.style.userSelect=l,window.removeEventListener(`pointermove`,u),window.removeEventListener(`pointerup`,d)};window.addEventListener(`pointermove`,u),window.addEventListener(`pointerup`,d)},onDoubleClick:()=>o(a),onKeyDown:t=>{if(t.key!==`ArrowLeft`&&t.key!==`ArrowRight`)return;t.preventDefault();let a=t.shiftKey?64:16,s=t.key===`ArrowRight`?a:-a;o(sJ(n+(e===`left`?s:-s),r,i))},className:`relative z-30 shrink-0 cursor-col-resize bg-line transition-[width,opacity,background-color] hover:bg-accent/45 focus-visible:bg-accent/60 focus-visible:outline-none ${s?`pointer-events-none w-0 opacity-0 duration-160`:`w-px duration-200`} ${c??``}`,children:(0,g.jsx)(`span`,{"aria-hidden":!0,className:`absolute inset-y-0 -left-2 -right-2`})})}var lJ=90;function uJ({icon:e,label:t,value:n,valueClass:r}){return(0,g.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,g.jsx)(e,{size:13,strokeWidth:1.9,className:`shrink-0 text-ink-3`}),(0,g.jsx)(`span`,{className:`text-[9px] font-medium uppercase tracking-[.08em] text-ink-3`,children:t}),(0,g.jsx)(`span`,{className:`font-mono text-[10px] font-medium tabular-nums ${r}`,children:n})]})}function dJ({metrics:e}){let t=e===null?null:Math.min(100,Math.max(0,e.cpuPercent)),n=t===null?`—`:`${Math.round(t)}%`,r=t!==null&&t>lJ,i=mG(e?.memoryUsedBytes??0,e?.memoryTotalBytes??0),a=hG(e?.memoryUsedBytes??0,e?.memoryTotalBytes??0);return(0,g.jsxs)(`div`,{className:`mr-1 hidden items-center gap-3 xl:flex`,children:[(0,g.jsx)(`span`,{className:`sr-only`,children:`服务端资源占用`}),(0,g.jsx)(uJ,{icon:xo,label:`CPU`,value:n,valueClass:r?`text-danger`:`text-ink`}),(0,g.jsx)(uJ,{icon:_s,label:`RAM`,valueClass:`text-ink`,value:i===null?`—`:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:i!==null&&a>lJ?`text-danger`:void 0,children:i.used}),` / `,i.total]})})]})}async function fJ(){return Y(`/api/system/metrics`)}var pJ=4e3;function mJ(e){return Jg({queryKey:[`host-metrics`],queryFn:fJ,enabled:!0,refetchInterval:pJ,staleTime:0,retry:!1}).data??null}function hJ(e){let[t,n]=(0,h.useState)(()=>typeof window>`u`?!1:window.matchMedia(e).matches);return(0,h.useEffect)(()=>{let t=window.matchMedia(e);n(t.matches);let r=e=>n(e.matches);return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}function gJ({version:e}){let{data:t}=uM(),{theme:n,resolved:r,setTheme:i}=S(),{projectId:a,sessionId:o,toggleSidebar:s,setMobileSidebar:c}=gW(),l=hJ(`(max-width: 767px)`),u=$q(e=>e.items).filter(e=>e.kind===`approval`&&e.status===`pending`),d=$q(Bq),f=mJ(t.host),p=t.projects.find(e=>e.id===a)??null,m=n===`system`?Cs:r===`dark`?Ts:hc,h=typeof e==`string`&&e!==`0.0.0`&&/^\d+\.\d+\.\d+(?:-[\w.-]+)?(?:\+[\w.-]+)?$/.test(e)?`v${e}`:`版本未知`;return(0,g.jsxs)(`header`,{className:`relative z-50 flex h-12 shrink-0 items-center gap-2 border-b border-line bg-surface/70 px-2.5 backdrop-blur-xl`,children:[(0,g.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,g.jsx)(`div`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-[7px] bg-gradient-to-br from-[#3d9bff] to-[#0066d6] text-[11px] font-bold text-white shadow-sm`,children:`L`}),(0,g.jsx)(`span`,{className:`shrink-0 text-[12.5px] font-semibold tracking-[-.01em]`,children:`Larness`}),(0,g.jsx)(`span`,{className:`shrink-0 rounded-full border border-line bg-surface-2 px-1.5 py-[1px] font-mono text-[9px] text-ink-3`,children:h})]}),(0,g.jsx)(gm,{label:l?`打开导航`:`切换侧栏`,onClick:()=>l?c(!0):s(),children:(0,g.jsx)(Ds,{size:15})}),(0,g.jsx)(`span`,{className:`mx-0.5 h-3.5 w-px shrink-0 bg-line`}),(0,g.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,g.jsx)(`span`,{className:`truncate text-[12.5px] font-semibold tracking-[-.01em]`,children:p?.name??hW(o,t.sessions)}),(0,g.jsx)(`span`,{className:`text-ink-3`,children:`/`}),(0,g.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,g.jsx)(TW,{tone:d?`running`:`idle`,pulse:d}),(0,g.jsx)(`span`,{className:`text-[11px] text-ink-2`,children:d?`Agent 运行中`:`空闲`})]}),p?.branch?(0,g.jsxs)(`span`,{className:`ml-1 hidden items-center gap-1 rounded-full border border-line bg-surface-2 px-2 py-[2px] font-mono text-[10px] text-ink-2 md:flex`,children:[(0,g.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-accent/70`}),p.branch]}):null]}),(0,g.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[(0,g.jsx)(dJ,{metrics:f}),(0,g.jsxs)(nm,{children:[(0,g.jsx)(rm,{asChild:!0,children:(0,g.jsx)(gm,{label:`外观与主题`,children:(0,g.jsx)(m,{size:15})})}),(0,g.jsxs)(am,{align:`end`,children:[(0,g.jsx)(om,{children:`外观`}),(0,g.jsxs)(im,{value:n,onValueChange:e=>i(e),children:[(0,g.jsxs)(cm,{value:`light`,children:[(0,g.jsx)(hc,{size:13}),` 浅色`]}),(0,g.jsxs)(cm,{value:`dark`,children:[(0,g.jsx)(Ts,{size:13}),` 深色`]}),(0,g.jsxs)(cm,{value:`system`,children:[(0,g.jsx)(Cs,{size:13}),` 跟随系统`]})]})]})]}),(0,g.jsxs)(nm,{children:[(0,g.jsx)(rm,{asChild:!0,children:(0,g.jsxs)(gm,{label:`通知`,className:`relative`,children:[(0,g.jsx)(Ha,{size:15}),u.length>0?(0,g.jsx)(`span`,{className:`absolute right-1.5 top-1.5 h-1.5 w-1.5 rounded-full bg-danger ring-2 ring-surface`}):null]})}),(0,g.jsxs)(am,{align:`end`,className:`w-[280px]`,children:[(0,g.jsx)(om,{children:`通知`}),u.length>0?u.map(e=>(0,g.jsxs)(sm,{className:`items-start gap-2 py-2`,children:[(0,g.jsx)(TW,{tone:`waiting`,className:`mt-1`}),(0,g.jsxs)(`span`,{children:[(0,g.jsx)(`span`,{className:`block text-[12px] font-medium text-ink`,children:e.serviceName?`${e.serviceName} 部署待批准`:e.toolName?`${e.toolName} 待批准`:`操作待批准`}),(0,g.jsx)(`span`,{className:`mt-0.5 block text-[11px] text-ink-3`,children:e.summary??`等待你的批准。`})]})]},e.id)):(0,g.jsx)(sm,{disabled:!0,children:`暂无新通知`})]})]})]})]})}var _J=s(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),vJ=s(((e,t)=>{var n=_J();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),yJ=u(s(((e,t)=>{t.exports=vJ()()}))(),1);function bJ(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function xJ(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Function]`}function SJ(e){return typeof e==`number`&&!isNaN(e)}function CJ(e){return parseInt(e,10)}function wJ(e,t,n){if(e[t])return Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)}var TJ=[`Moz`,`Webkit`,`O`,`ms`];function EJ(e=`transform`){if(typeof window>`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;n<TJ.length;n++)if(DJ(e,TJ[n])in t)return TJ[n];return``}function DJ(e,t){return t?`${t}${OJ(e)}`:e}function OJ(e){let t=``,n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]===`-`?n=!0:t+=e[r];return t}var kJ=EJ(),AJ=``;function jJ(e,t){AJ||=bJ([`matches`,`webkitMatchesSelector`,`mozMatchesSelector`,`msMatchesSelector`,`oMatchesSelector`],function(t){return xJ(e[t])})??``;let n=e[AJ];return xJ(n)?!!n.call(e,t):!1}function MJ(e,t,n){let r=e;do{if(jJ(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function NJ(e,t,n,r){if(!e)return;let i={capture:!0,...r},a=n;e.addEventListener?e.addEventListener(t,a,i):e.attachEvent?e.attachEvent(`on`+t,a):e[`on`+t]=a}function PJ(e,t,n,r){if(!e)return;let i={capture:!0,...r},a=n;e.removeEventListener?e.removeEventListener(t,a,i):e.detachEvent?e.detachEvent(`on`+t,a):e[`on`+t]=null}function FJ(e){let t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=CJ(n.borderTopWidth),t+=CJ(n.borderBottomWidth),t}function IJ(e){let t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=CJ(n.borderLeftWidth),t+=CJ(n.borderRightWidth),t}function LJ(e){let t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=CJ(n.paddingTop),t-=CJ(n.paddingBottom),t}function RJ(e){let t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=CJ(n.paddingLeft),t-=CJ(n.paddingRight),t}function zJ(e,t,n){let r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-r.left)/n,y:(e.clientY+t.scrollTop-r.top)/n}}function BJ(e,t){let n=HJ(e,t,`px`);return{[DJ(`transform`,kJ)]:n}}function VJ(e,t){return HJ(e,t,``)}function HJ({x:e,y:t},n,r){let i=`translate(${e}${r},${t}${r})`;return n&&(i=`translate(${`${typeof n.x==`string`?n.x:n.x+r}`}, ${`${typeof n.y==`string`?n.y:n.y+r}`})`+i),i}function UJ(e,t){return e.targetTouches&&bJ(e.targetTouches,e=>t===e.identifier)||e.changedTouches&&bJ(e.changedTouches,e=>t===e.identifier)}function WJ(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function GJ(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function KJ(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??GJ();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
109
+ `,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
110
+ `,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&YJ(e.body,`react-draggable-transparent-selection`)}function qJ(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{JJ(e)}):JJ(e)}function JJ(e){if(e)try{e.body&&XJ(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function YJ(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function XJ(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function ZJ(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:iY(r);let i=aY(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+CJ(s.paddingLeft)+CJ(o.marginLeft),top:-i.offsetTop+CJ(s.paddingTop)+CJ(o.marginTop),right:RJ(a)-IJ(i)-i.offsetLeft+CJ(s.paddingRight)-CJ(o.marginRight),bottom:LJ(a)-FJ(i)-i.offsetTop+CJ(s.paddingBottom)-CJ(o.marginBottom)}}return SJ(r.right)&&(t=Math.min(t,r.right)),SJ(r.bottom)&&(n=Math.min(n,r.bottom)),SJ(r.left)&&(t=Math.max(t,r.left)),SJ(r.top)&&(n=Math.max(n,r.top)),[t,n]}function QJ(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function $J(e){return e.props.axis===`both`||e.props.axis===`x`}function eY(e){return e.props.axis===`both`||e.props.axis===`y`}function tY(e,t,n){let r=typeof t==`number`?UJ(e,t):null;if(typeof t==`number`&&!r)return null;let i=aY(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return zJ(r||e,a,n.props.scale)}function nY(e,t,n){let r=!SJ(e.lastX),i=aY(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function rY(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function iY(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function aY(e){let t=e.findDOMNode();if(!t)throw Error(`<DraggableCore>: Unmounted during event!`);return t}var oY=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},sY={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},cY=sY.mouse,lY=class extends h.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(`<DraggableCore> not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!MJ(e.target,this.props.handle,t)||this.props.cancel&&MJ(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=WJ(e);this.touchIdentifier=r;let i=tY(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=nY(this,a,o);oY(`DraggableCore: handleDragStart: %j`,s),oY(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&KJ(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,NJ(n,cY.move,this.handleDrag),NJ(n,cY.stop,this.handleDragStop))},this.handleDrag=e=>{let t=tY(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=QJ(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=nY(this,n,r);if(oY(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1)try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}else this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=tY(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=QJ(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=nY(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&qJ(a.ownerDocument),oY(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(oY(`DraggableCore: Removing handlers`),PJ(a.ownerDocument,cY.move,this.handleDrag),PJ(a.ownerDocument,cY.stop,this.handleDragStop))},this.onMouseDown=e=>(cY=sY.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(cY=sY.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(cY=sY.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(cY=sY.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&NJ(e,sY.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;PJ(t,sY.mouse.move,this.handleDrag),PJ(t,sY.touch.move,this.handleDrag),PJ(t,sY.mouse.stop,this.handleDragStop),PJ(t,sY.touch.stop,this.handleDragStop),PJ(e,sY.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&qJ(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=en.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(oY(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return h.cloneElement(h.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};lY.displayName=`DraggableCore`,lY.propTypes={allowAnyClick:yJ.default.bool,allowMobileScroll:yJ.default.bool,children:yJ.default.node.isRequired,disabled:yJ.default.bool,enableUserSelectHack:yJ.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:yJ.default.arrayOf(yJ.default.number),handle:yJ.default.string,cancel:yJ.default.string,nodeRef:yJ.default.object,nonce:yJ.default.string,onStart:yJ.default.func,onDrag:yJ.default.func,onStop:yJ.default.func,onMouseDown:yJ.default.func,scale:yJ.default.number,className:wJ,style:wJ,transform:wJ},lY.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var uY=class extends h.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(oY(`Draggable: onDragStart: %j`,t),this.props.onStart(e,rY(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;oY(`Draggable: onDrag: %j`,t);let n=rY(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=ZJ(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,rY(this,t))===!1)return!1;oY(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(oY(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=en.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,p=!s||this.state.dragging,m=s||r,g={x:$J(this)&&p?this.state.x:m.x,y:eY(this)&&p?this.state.y:m.y};this.state.isElementSVG?f=VJ(g,c):d=BJ(g,c);let _=h.Children.only(n),v=w(_.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return h.createElement(lY,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},h.cloneElement(_,{className:v,style:{..._.props.style,...d},transform:f}))}};uY.displayName=`Draggable`,uY.propTypes={...lY.propTypes,axis:yJ.default.oneOf([`both`,`x`,`y`,`none`]),bounds:yJ.default.oneOfType([yJ.default.shape({left:yJ.default.number,right:yJ.default.number,top:yJ.default.number,bottom:yJ.default.number}),yJ.default.string,yJ.default.oneOf([!1])]),defaultClassName:yJ.default.string,defaultClassNameDragging:yJ.default.string,defaultClassNameDragged:yJ.default.string,defaultPosition:yJ.default.shape({x:yJ.default.number,y:yJ.default.number}),positionOffset:yJ.default.shape({x:yJ.default.oneOfType([yJ.default.number,yJ.default.string]),y:yJ.default.oneOfType([yJ.default.number,yJ.default.string])}),position:yJ.default.shape({x:yJ.default.number,y:yJ.default.number}),className:wJ,style:wJ,transform:wJ},uY.defaultProps={...lY.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1};var dY=uY,fY=function(){return fY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fY.apply(this,arguments)},pY={width:`100%`,height:`10px`,top:`0px`,left:`0px`,cursor:`row-resize`},mY={width:`10px`,height:`100%`,top:`0px`,left:`0px`,cursor:`col-resize`},hY={width:`20px`,height:`20px`,position:`absolute`,zIndex:1},gY={top:fY(fY({},pY),{top:`-5px`}),right:fY(fY({},mY),{left:void 0,right:`-5px`}),bottom:fY(fY({},pY),{top:void 0,bottom:`-5px`}),left:fY(fY({},mY),{left:`-5px`}),topRight:fY(fY({},hY),{right:`-10px`,top:`-10px`,cursor:`ne-resize`}),bottomRight:fY(fY({},hY),{right:`-10px`,bottom:`-10px`,cursor:`se-resize`}),bottomLeft:fY(fY({},hY),{left:`-10px`,bottom:`-10px`,cursor:`sw-resize`}),topLeft:fY(fY({},hY),{left:`-10px`,top:`-10px`,cursor:`nw-resize`})},_Y=(0,h.memo)(function(e){var t=e.onResizeStart,n=e.direction,r=e.children,i=e.replaceStyles,a=e.className,o=(0,h.useCallback)(function(e){t(e,n)},[t,n]),s=(0,h.useCallback)(function(e){t(e,n)},[t,n]),c=(0,h.useMemo)(function(){return fY(fY({position:`absolute`,userSelect:`none`},gY[n]),i??{})},[i,n]);return(0,g.jsx)(`div`,{className:a||void 0,style:c,onMouseDown:o,onTouchStart:s,children:r})}),vY=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),yY=function(){return yY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},yY.apply(this,arguments)},bY={width:`auto`,height:`auto`},xY=function(e,t,n){return Math.max(Math.min(e,n),t)},SY=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},CY=function(e,t){return new RegExp(e,`i`).test(t)},wY=function(e){return!!(e.touches&&e.touches.length)},TY=function(e){return!(!e.clientX&&e.clientX!==0||!e.clientY&&e.clientY!==0)},EY=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n},0),i=Math.abs(t[r]-e);return n===0||i<n?t[r]:e},DY=function(e){return e=e.toString(),e===`auto`||e.endsWith(`px`)||e.endsWith(`%`)||e.endsWith(`vh`)||e.endsWith(`vw`)||e.endsWith(`vmax`)||e.endsWith(`vmin`)?e:`${e}px`},OY=function(e,t,n,r){if(e&&typeof e==`string`){if(e.endsWith(`px`))return Number(e.replace(`px`,``));if(e.endsWith(`%`)){var i=Number(e.replace(`%`,``))/100;return t*i}if(e.endsWith(`vw`)){var i=Number(e.replace(`vw`,``))/100;return n*i}if(e.endsWith(`vh`)){var i=Number(e.replace(`vh`,``))/100;return r*i}}return e},kY=function(e,t,n,r,i,a,o){return r=OY(r,e.width,t,n),i=OY(i,e.height,t,n),a=OY(a,e.width,t,n),o=OY(o,e.height,t,n),{maxWidth:r===void 0?void 0:Number(r),maxHeight:i===void 0?void 0:Number(i),minWidth:a===void 0?void 0:Number(a),minHeight:o===void 0?void 0:Number(o)}},AY=function(e){return Array.isArray(e)?e:[e,e]},jY=`as.ref.style.className.grid.gridGap.snap.bounds.boundsByDirection.size.defaultSize.minWidth.minHeight.maxWidth.maxHeight.lockAspectRatio.lockAspectRatioExtraWidth.lockAspectRatioExtraHeight.enable.handleStyles.handleClasses.handleWrapperStyle.handleWrapperClass.children.onResizeStart.onResize.onResizeStop.handleComponent.scale.resizeRatio.snapGap`.split(`.`),MY=`__resizable_base__`,NY=function(e){vY(t,e);function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.delta={width:0,height:0},n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement(`div`);return t.style.width=`100%`,t.style.height=`100%`,t.style.position=`absolute`,t.style.transform=`scale(0, 0)`,t.style.left=`0`,t.style.flex=`0 0 100%`,t.classList?t.classList.add(MY):t.className+=MY,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.state={isResizing:!1,width:n.propsSize?.width??`auto`,height:n.propsSize?.height??`auto`,direction:`right`,original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:`100%`,width:`100%`,backgroundColor:`rgba(0,0,0,0)`,cursor:`auto`,opacity:0,position:`fixed`,zIndex:9999,top:`0`,left:`0`,bottom:`0`,right:`0`},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||bY},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;i!==`relative`&&(this.resizable.style.position=`relative`),e=this.resizable.style.width===`auto`?n:this.resizable.offsetWidth,t=this.resizable.style.height===`auto`?r:this.resizable.offsetHeight,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(e.state[t]===void 0||e.state[t]===`auto`)return`auto`;if(e.propsSize&&e.propsSize[t]&&e.propsSize[t]?.toString().endsWith(`%`)){if(e.state[t].toString().endsWith(`%`))return e.state[t].toString();var n=e.getParentSize();return`${Number(e.state[t].toString().replace(`px`,``))/n[t]*100}%`}return DY(e.state[t])};return{width:t&&t.width!==void 0&&!this.state.isResizing?DY(t.width):n(`width`),height:t&&t.height!==void 0&&!this.state.isResizing?DY(t.height):n(`height`)}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;n!==`wrap`&&(t=!0,this.parentNode.style.flexWrap=`wrap`),e.style.position=`relative`,e.style.minWidth=`100%`,e.style.minHeight=`100%`;var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener(`mouseup`,this.onMouseUp),this.window.addEventListener(`mousemove`,this.onMouseMove),this.window.addEventListener(`mouseleave`,this.onMouseUp),this.window.addEventListener(`touchmove`,this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener(`touchend`,this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener(`mouseup`,this.onMouseUp),this.window.removeEventListener(`mousemove`,this.onMouseMove),this.window.removeEventListener(`mouseleave`,this.onMouseUp),this.window.removeEventListener(`touchmove`,this.onMouseMove,!0),this.window.removeEventListener(`touchend`,this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:e.flexBasis===`auto`?void 0:e.flexBasis})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return this.state[t]===`auto`&&this.state.original[t]===e&&(n===void 0||n===`auto`)?`auto`:e},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n=this.props.boundsByDirection,r=this.state.direction,i=n&&CY(`left`,r),a=n&&CY(`top`,r),o,s;if(this.props.bounds===`parent`){var c=this.parentNode;c&&(o=i?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),s=a?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds===`window`?this.window&&(o=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,s=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),s=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),s&&Number.isFinite(s)&&(t=t&&t<s?t:s),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=AY(this.props.resizeRatio||1),i=r[0],a=r[1],o=this.state,s=o.direction,c=o.original,l=this.props,u=l.lockAspectRatio,d=l.lockAspectRatioExtraHeight,f=l.lockAspectRatioExtraWidth,p=c.width,m=c.height,h=d||0,g=f||0;return CY(`right`,s)&&(p=c.width+(e-c.x)*i/n,u&&(m=(p-g)/this.ratio+h)),CY(`left`,s)&&(p=c.width-(e-c.x)*i/n,u&&(m=(p-g)/this.ratio+h)),CY(`bottom`,s)&&(m=c.height+(t-c.y)*a/n,u&&(p=(m-h)*this.ratio+g)),CY(`top`,s)&&(m=c.height-(t-c.y)*a/n,u&&(p=(m-h)*this.ratio+g)),{newWidth:p,newHeight:m}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,a=i.lockAspectRatio,o=i.lockAspectRatioExtraHeight,s=i.lockAspectRatioExtraWidth,c=r.width===void 0?10:r.width,l=n.width===void 0||n.width<0?e:n.width,u=r.height===void 0?10:r.height,d=n.height===void 0||n.height<0?t:n.height,f=o||0,p=s||0;if(a){var m=(u-f)*this.ratio+p,h=(d-f)*this.ratio+p,g=(c-p)/this.ratio+f,_=(l-p)/this.ratio+f,v=Math.max(c,m),y=Math.min(l,h),b=Math.max(u,g),x=Math.min(d,_);e=xY(e,v,y),t=xY(t,b,x)}else e=xY(e,c,l),t=xY(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if(this.props.bounds===`parent`){var t=this.parentNode;if(t){var n=t.getBoundingClientRect();this.parentLeft=n.left*e,this.parentTop=n.top*e}}if(this.props.bounds&&typeof this.props.bounds!=`string`){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var i=this.resizable.getBoundingClientRect(),a=i.left,o=i.top,s=i.right,c=i.bottom;this.resizableLeft=a*e,this.resizableRight=s*e,this.resizableTop=o*e,this.resizableBottom=c*e}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n=0,r=0;if(e.nativeEvent&&TY(e.nativeEvent)?(n=e.nativeEvent.clientX,r=e.nativeEvent.clientY):e.nativeEvent&&wY(e.nativeEvent)&&(n=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY),!(this.props.onResizeStart&&this.resizable&&this.props.onResizeStart(e,t,this.resizable)===!1)){this.props.size&&(this.props.size.height!==void 0&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),this.props.size.width!==void 0&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio==`number`?this.props.lockAspectRatio:this.size.width/this.size.height;var i,a=this.window.getComputedStyle(this.resizable);if(a.flexBasis!==`auto`){var o=this.parentNode;if(o){var s=this.window.getComputedStyle(o).flexDirection;this.flexDir=s.startsWith(`row`)?`row`:`column`,i=a.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var c={original:{x:n,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:yY(yY({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||`auto`}),direction:t,flexBasis:i};this.setState(c)}}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&wY(e))try{e.preventDefault(),e.stopPropagation()}catch{}var n=this.props,r=n.maxWidth,i=n.maxHeight,a=n.minWidth,o=n.minHeight,s=wY(e)?e.touches[0].clientX:e.clientX,c=wY(e)?e.touches[0].clientY:e.clientY,l=this.state,u=l.direction,d=l.original,f=l.width,p=l.height,m=this.getParentSize(),h=kY(m,this.window.innerWidth,this.window.innerHeight,r,i,a,o);r=h.maxWidth,i=h.maxHeight,a=h.minWidth,o=h.minHeight;var g=this.calculateNewSizeFromDirection(s,c),_=g.newHeight,v=g.newWidth,y=this.calculateNewMaxFromBoundary(r,i);this.props.snap&&this.props.snap.x&&(v=EY(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=EY(_,this.props.snap.y,this.props.snapGap));var b=this.calculateNewSizeFromAspectRatio(v,_,{width:y.maxWidth,height:y.maxHeight},{width:a,height:o});if(v=b.newWidth,_=b.newHeight,this.props.grid){var x=SY(v,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),S=SY(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),C=this.props.snapGap||0,w=C===0||Math.abs(x-v)<=C?x:v,T=C===0||Math.abs(S-_)<=C?S:_;v=w,_=T}var E={width:v-d.width,height:_-d.height};if(this.delta=E,f&&typeof f==`string`){if(f.endsWith(`%`)){var D=v/m.width*100;v=`${D}%`}else if(f.endsWith(`vw`)){var O=v/this.window.innerWidth*100;v=`${O}vw`}else if(f.endsWith(`vh`)){var k=v/this.window.innerHeight*100;v=`${k}vh`}}if(p&&typeof p==`string`){if(p.endsWith(`%`)){var D=_/m.height*100;_=`${D}%`}else if(p.endsWith(`vw`)){var O=_/this.window.innerWidth*100;_=`${O}vw`}else if(p.endsWith(`vh`)){var k=_/this.window.innerHeight*100;_=`${k}vh`}}var A={width:this.createSizeForCssProperty(v,`width`),height:this.createSizeForCssProperty(_,`height`)};this.flexDir===`row`?A.flexBasis=A.width:this.flexDir===`column`&&(A.flexBasis=A.height);var j=this.state.width!==A.width,M=this.state.height!==A.height,N=this.state.flexBasis!==A.flexBasis,P=j||M||N;P&&(0,en.flushSync)(function(){t.setState(A)}),this.props.onResize&&P&&this.props.onResize(e,u,this.resizable,E)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction;t.original,n&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,this.delta),this.props.size&&this.setState({width:this.props.size.width??`auto`,height:this.props.size.height??`auto`}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:yY(yY({},this.state.backgroundStyle),{cursor:`auto`})}))},t.prototype.updateSize=function(e){this.setState({width:e.width??`auto`,height:e.height??`auto`})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,i=t.handleClasses,a=t.handleWrapperStyle,o=t.handleWrapperClass,s=t.handleComponent;if(!n)return null;var c=Object.keys(n).map(function(t){return n[t]===!1?null:(0,g.jsx)(_Y,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:i&&i[t],children:s&&s[t]?s[t]:null},t)});return(0,g.jsx)(`div`,{className:o,style:a,children:c})},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,n){return jY.indexOf(n)===-1&&(t[n]=e.props[n]),t},{}),n=yY(yY(yY({position:`relative`,userSelect:this.state.isResizing?`none`:`auto`},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:`border-box`,flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||`div`;return(0,g.jsxs)(r,yY({style:n,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&(0,g.jsx)(`div`,{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:`div`,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(h.PureComponent),PY=function(e,t){return PY=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},PY(e,t)};function FY(e,t){PY(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var IY=function(){return IY=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},IY.apply(this,arguments)};function LY(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var RY={width:`auto`,height:`auto`,display:`inline-block`,position:`absolute`,top:0,left:0},zY=function(e){return{bottom:e,bottomLeft:e,bottomRight:e,left:e,right:e,top:e,topLeft:e,topRight:e}},BY=function(e){FY(t,e);function t(t){var n=e.call(this,t)||this;return n.resizingPosition={x:0,y:0},n.offsetFromParent={left:0,top:0},n.resizableElement={current:null},n.originalPosition={x:0,y:0},n.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},n.onResizeStart=n.onResizeStart.bind(n),n.onResize=n.onResize.bind(n),n.onResizeStop=n.onResizeStop.bind(n),n.onDragStart=n.onDragStart.bind(n),n.onDrag=n.onDrag.bind(n),n.onDragStop=n.onDragStop.bind(n),n.getMaxSizesFromProps=n.getMaxSizesFromProps.bind(n),n}return t.prototype.componentDidMount=function(){this.updateOffsetFromParent();var e=this.offsetFromParent,t=e.left,n=e.top,r=this.getDraggablePosition(),i=r.x,a=r.y;this.draggable.setState({x:i-t,y:a-n}),this.forceUpdate()},t.prototype.getDraggablePosition=function(){var e=this.draggable.state;return{x:e.x,y:e.y}},t.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},t.prototype.getParentSize=function(){return this.resizable.getParentSize()},t.prototype.getMaxSizesFromProps=function(){return{maxWidth:this.props.maxWidth===void 0?2**53-1:this.props.maxWidth,maxHeight:this.props.maxHeight===void 0?2**53-1:this.props.maxHeight}},t.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},t.prototype.getOffsetHeight=function(e){var t=this.props.scale;switch(this.props.bounds){case`window`:return window.innerHeight/t;case`body`:return document.body.offsetHeight/t;default:return e.offsetHeight}},t.prototype.getOffsetWidth=function(e){var t=this.props.scale;switch(this.props.bounds){case`window`:return window.innerWidth/t;case`body`:return document.body.offsetWidth/t;default:return e.offsetWidth}},t.prototype.onDragStart=function(e,t){if(this.props.onDragStart&&this.props.onDragStart(e,t)===!1)return!1;var n=this.getDraggablePosition();if(this.originalPosition=n,this.props.bounds){var r=this.getParent(),i=this.props.scale,a;if(this.props.bounds===`parent`)a=r;else if(this.props.bounds===`body`){var o=r.getBoundingClientRect(),s=o.left,c=o.top,l=document.body.getBoundingClientRect(),u=-(s-r.offsetLeft*i-l.left)/i,d=-(c-r.offsetTop*i-l.top)/i,f=(document.body.offsetWidth-this.resizable.size.width*i)/i+u,p=(document.body.offsetHeight-this.resizable.size.height*i)/i+d;return this.setState({bounds:{top:d,right:f,bottom:p,left:u}})}else if(this.props.bounds===`window`){if(!this.resizable)return;var m=r.getBoundingClientRect(),h=m.left,g=m.top,_=-(h-r.offsetLeft*i)/i,v=-(g-r.offsetTop*i)/i,f=(window.innerWidth-this.resizable.size.width*i)/i+_,p=(window.innerHeight-this.resizable.size.height*i)/i+v;return this.setState({bounds:{top:v,right:f,bottom:p,left:_}})}else typeof this.props.bounds==`string`?a=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(a=this.props.bounds);if(a instanceof HTMLElement&&r instanceof HTMLElement){var y=a.getBoundingClientRect(),b=y.left,x=y.top,S=r.getBoundingClientRect(),C=S.left,w=S.top,T=(b-C)/i,E=x-w;if(this.resizable){this.updateOffsetFromParent();var D=this.offsetFromParent;this.setState({bounds:{top:E-D.top,right:T+(a.offsetWidth-this.resizable.size.width)-D.left/i,bottom:E+(a.offsetHeight-this.resizable.size.height)-D.top,left:T-D.left/i}})}}}},t.prototype.onDrag=function(e,t){if(this.props.onDrag){var n=this.offsetFromParent,r=n.left,i=n.top;if(!this.props.dragAxis||this.props.dragAxis===`both`)return this.props.onDrag(e,IY(IY({},t),{x:t.x+r,y:t.y+i}));if(this.props.dragAxis===`x`)return this.props.onDrag(e,IY(IY({},t),{x:t.x+r,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis===`y`)return this.props.onDrag(e,IY(IY({},t),{x:this.originalPosition.x+r,y:t.y+i,deltaX:0}))}},t.prototype.onDragStop=function(e,t){if(this.props.onDragStop){var n=this.offsetFromParent,r=n.left,i=n.top;if(!this.props.dragAxis||this.props.dragAxis===`both`)return this.props.onDragStop(e,IY(IY({},t),{x:t.x+r,y:t.y+i}));if(this.props.dragAxis===`x`)return this.props.onDragStop(e,IY(IY({},t),{x:t.x+r,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis===`y`)return this.props.onDragStop(e,IY(IY({},t),{x:this.originalPosition.x+r,y:t.y+i,deltaX:0}))}},t.prototype.onResizeStart=function(e,t,n){if(this.props.onResizeStart&&this.props.onResizeStart(e,t,n)===!1)return!1;e.stopPropagation(),this.setState({resizing:!0});var r=this.props.scale,i=this.offsetFromParent,a=this.getDraggablePosition();if(this.resizingPosition={x:a.x+i.left,y:a.y+i.top},this.originalPosition=a,this.props.bounds){var o=this.getParent(),s=void 0;this.props.bounds===`parent`?s=o:this.props.bounds===`body`?s=document.body:this.props.bounds===`window`?s=window:typeof this.props.bounds==`string`?s=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(s=this.props.bounds);var c=this.getSelfElement();if(c instanceof Element&&(s instanceof HTMLElement||s===window)&&o instanceof HTMLElement){var l=this.getMaxSizesFromProps(),u=l.maxWidth,d=l.maxHeight,f=this.getParentSize();if(u&&typeof u==`string`){if(u.endsWith(`%`)){var p=Number(u.replace(`%`,``))/100;u=f.width*p}else u.endsWith(`px`)&&(u=Number(u.replace(`px`,``)))}if(d&&typeof d==`string`){if(d.endsWith(`%`)){var p=Number(d.replace(`%`,``))/100;d=f.height*p}else d.endsWith(`px`)&&(d=Number(d.replace(`px`,``)))}var m=c.getBoundingClientRect(),h=m.left,g=m.top,_=this.props.bounds===`window`?{left:0,top:0}:s.getBoundingClientRect(),v=_.left,y=_.top,b=this.getOffsetWidth(s),x=this.getOffsetHeight(s),S=t.toLowerCase().endsWith(`left`),C=t.toLowerCase().endsWith(`right`),w=t.startsWith(`top`),T=t.startsWith(`bottom`);if((S||w)&&this.resizable){var E=(h-v)/r+this.resizable.size.width;this.setState({maxWidth:E>Number(u)?u:E})}if(C||this.props.lockAspectRatio&&!S&&!w){var E=b+(v-h)/r;this.setState({maxWidth:E>Number(u)?u:E})}if((w||S)&&this.resizable){var E=(g-y)/r+this.resizable.size.height;this.setState({maxHeight:E>Number(d)?d:E})}if(T||this.props.lockAspectRatio&&!w&&!S){var E=x+(y-g)/r;this.setState({maxHeight:E>Number(d)?d:E})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight})},t.prototype.onResize=function(e,t,n,r){var i=this,a={x:this.originalPosition.x,y:this.originalPosition.y},o=-r.width,s=-r.height;[`top`,`left`,`topLeft`,`bottomLeft`,`topRight`].includes(t)&&(t===`bottomLeft`?a.x+=o:(t===`topRight`||(a.x+=o),a.y+=s));var c=this.draggable.state;(a.x!==c.x||a.y!==c.y)&&(0,en.flushSync)(function(){i.draggable.setState(a)}),this.updateOffsetFromParent();var l=this.offsetFromParent,u=this.getDraggablePosition().x+l.left,d=this.getDraggablePosition().y+l.top;this.resizingPosition={x:u,y:d},this.props.onResize&&this.props.onResize(e,t,n,r,{x:u,y:d})},t.prototype.onResizeStop=function(e,t,n,r){this.setState({resizing:!1});var i=this.getMaxSizesFromProps(),a=i.maxWidth,o=i.maxHeight;this.setState({maxWidth:a,maxHeight:o}),this.props.onResizeStop&&this.props.onResizeStop(e,t,n,r,this.resizingPosition)},t.prototype.updateSize=function(e){this.resizable&&this.resizable.updateSize({width:e.width,height:e.height})},t.prototype.updatePosition=function(e){this.draggable.setState(e)},t.prototype.updateOffsetFromParent=function(){var e=this.props.scale,t=this.getParent(),n=this.getSelfElement();if(!t||n===null)return{top:0,left:0};var r=t.getBoundingClientRect(),i=r.left,a=r.top,o=n.getBoundingClientRect(),s=this.getDraggablePosition(),c=t.scrollLeft,l=t.scrollTop;this.offsetFromParent={left:o.left-i+c-s.x*e,top:o.top-a+l-s.y*e}},t.prototype.render=function(){var e=this,t=this.props,n=t.disableDragging,r=t.style,i=t.dragHandleClassName,a=t.position,o=t.onMouseDown,s=t.onMouseUp,c=t.dragAxis,l=t.dragGrid,u=t.bounds,d=t.enableUserSelectHack,f=t.cancel,p=t.children;t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop;var m=t.resizeHandleStyles,g=t.resizeHandleClasses,_=t.resizeHandleComponent,v=t.enableResizing,y=t.resizeGrid,b=t.resizeHandleWrapperClass,x=t.resizeHandleWrapperStyle,S=t.scale,C=t.allowAnyClick,w=t.dragPositionOffset,T=LY(t,`disableDragging.style.dragHandleClassName.position.onMouseDown.onMouseUp.dragAxis.dragGrid.bounds.enableUserSelectHack.cancel.children.onResizeStart.onResize.onResizeStop.onDragStart.onDrag.onDragStop.resizeHandleStyles.resizeHandleClasses.resizeHandleComponent.enableResizing.resizeGrid.resizeHandleWrapperClass.resizeHandleWrapperStyle.scale.allowAnyClick.dragPositionOffset`.split(`.`)),E=this.props.default?IY({},this.props.default):void 0;delete T.default;var D=n||i?{cursor:`auto`}:{cursor:`move`},O=IY(IY(IY({},RY),D),r),k=this.offsetFromParent,A=k.left,j=k.top,M;a&&(M={x:a.x-A,y:a.y-j});var N=this.state.resizing?void 0:M,P=this.state.resizing?`both`:c;return(0,h.createElement)(dY,{ref:function(t){t&&(e.draggable=t)},handle:i?`.${i}`:void 0,defaultPosition:E,onMouseDown:o,onMouseUp:s,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:P,disabled:n,grid:l,bounds:u?this.state.bounds:void 0,position:N,enableUserSelectHack:d,cancel:f,scale:S,allowAnyClick:C,nodeRef:this.resizableElement,positionOffset:w},(0,h.createElement)(NY,IY({},T,{ref:function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},defaultSize:E,size:this.props.size,enable:typeof v==`boolean`?zY(v):v,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:O,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:y,handleWrapperClass:b,handleWrapperStyle:x,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:m,handleClasses:g,handleComponent:_,scale:this.props.scale}),p))},t.defaultProps={maxWidth:2**53-1,maxHeight:2**53-1,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},t}(h.PureComponent);function VY(e,t){return e?e.kind===`services`?t.services.find(t=>t.id===e.resourceId)?.name??e.title:e.kind===`terminal`?t.terminals.find(t=>t.id===e.resourceId)?.title??e.title:e.title:`窗口`}async function HY(e,t=`/`,n=`embedded`,r=`service`,i){return Y(`/api/previews/resolve`,{method:`POST`,csrf:!0,body:r===`process`?{processId:e,projectId:i,path:t,mode:n}:{serviceId:e,path:t,mode:n}})}function UY({tab:e}){return e.browser?(0,g.jsx)(GY,{tab:e}):(0,g.jsx)(KY,{tab:e})}function WY(e){return e instanceof dj||e instanceof Error?e.message:`预览不可用`}function GY({tab:e}){let t=e.browser,[n,r]=(0,h.useState)(null),[i,a]=(0,h.useState)(``),[o,s]=(0,h.useState)(!0),[c,l]=(0,h.useState)(0),[u,d]=(0,h.useState)(!1),f=(0,h.useRef)(null),p=`preview-${e.id.replace(/[^a-zA-Z0-9_-]/g,`-`)}`;(0,h.useEffect)(()=>{if(!t)return;let n=!1,i=c;return s(!0),a(``),r(null),HY(t.serviceId,t.path,`embedded`,t.targetKind,e.projectId??void 0).then(e=>{n||i!==c||(r(e),s(!1))}).catch(e=>{n||i!==c||(a(WY(e)),s(!1))}),()=>{n=!0}},[t,c,e.projectId]),(0,h.useEffect)(()=>{n&&f.current?.submit()},[n]);let m=async()=>{if(!t||u)return;d(!0),a(``);let n=window.open(`about:blank`,`_blank`);try{if(!n)throw Error(`浏览器阻止了新窗口`);n.opener=null;let r=await HY(t.serviceId,t.path,`external`,t.targetKind,e.projectId??void 0),i=document.createElement(`form`);i.method=`POST`,i.action=r.bootstrapUrl,i.target=`preview-external-${Date.now()}`,n.name=i.target,i.style.display=`none`;for(let[e,n]of[[`ticket`,r.ticket],[`path`,t.path]]){let t=document.createElement(`input`);t.type=`hidden`,t.name=e,t.value=n,i.append(t)}document.body.append(i),i.submit(),i.remove()}catch(e){n?.close(),a(WY(e))}finally{d(!1)}};return(0,g.jsxs)(`div`,{className:`flex h-full flex-col bg-surface`,children:[(0,g.jsxs)(`div`,{className:`flex h-10 shrink-0 items-center gap-1 border-b border-line bg-surface-2/45 px-2`,children:[(0,g.jsx)(gm,{label:`后退`,disabled:!0,className:`h-6 w-6`,children:(0,g.jsx)(Pa,{size:13})}),(0,g.jsx)(gm,{label:`前进`,disabled:!0,className:`h-6 w-6`,children:(0,g.jsx)(Ia,{size:13})}),(0,g.jsx)(gm,{label:`刷新预览`,onClick:()=>l(e=>e+1),className:`h-6 w-6`,children:(0,g.jsx)(Us,{size:12,className:o?`animate-spin`:void 0})}),(0,g.jsxs)(`div`,{className:`mx-1 flex h-7 min-w-0 flex-1 items-center gap-1.5 rounded-lg border border-line bg-surface px-2`,children:[(0,g.jsx)(rc,{size:11,className:`shrink-0 text-success`}),(0,g.jsx)(`span`,{title:`预览地址`,className:`h-full min-w-0 flex-1 truncate font-mono text-[10.5px] leading-7 text-ink-2`,children:n?`${n.origin}${t?.path??`/`}`:`解析预览来源…`}),o?(0,g.jsx)(ds,{size:11,className:`animate-spin text-ink-3`}):null]}),(0,g.jsx)(gm,{label:`在独立来源打开`,onClick:()=>void m(),disabled:u,className:`h-6 w-6`,children:(0,g.jsx)(Do,{size:12})})]}),(0,g.jsxs)(`div`,{className:`relative min-h-0 flex-1 bg-white`,children:[i?(0,g.jsxs)(`div`,{className:`absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-surface text-center`,children:[(0,g.jsx)(`p`,{role:`alert`,title:i,className:`max-w-[360px] px-4 text-[12px] text-ink-2`,children:`无法访问`}),(0,g.jsx)(`button`,{type:`button`,className:`text-[11px] text-accent underline`,onClick:()=>l(e=>e+1),children:`刷新`})]}):null,(0,g.jsx)(`form`,{ref:f,method:`POST`,action:n?.bootstrapUrl??``,target:p,hidden:!0,children:(0,g.jsx)(`input`,{type:`hidden`,name:`ticket`,value:n?.ticket??``,readOnly:!0})}),(0,g.jsx)(`iframe`,{name:p,title:`项目预览`,"data-testid":`preview-frame`,src:`about:blank`,sandbox:`allow-scripts allow-forms allow-same-origin`,referrerPolicy:`no-referrer`,className:`h-full w-full border-0 bg-white`}),o?(0,g.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-surface/60 text-[11px] text-ink-3`,children:`正在建立隔离预览…`}):null]}),(0,g.jsxs)(`div`,{className:`flex h-6 shrink-0 items-center gap-1.5 border-t border-line bg-surface-2/50 px-2 font-mono text-[9px] text-ink-3`,children:[(0,g.jsx)(Co,{size:10,className:`shrink-0`}),(0,g.jsx)(`span`,{className:`whitespace-nowrap`,children:`独立来源`})]})]})}function KY({tab:e}){let[t,n]=(0,h.useState)(e.resourceId.startsWith(`http`)?e.resourceId:`http://localhost:5173/dashboard`),[r,i]=(0,h.useState)(!1),a=()=>{i(!0),window.setTimeout(()=>i(!1),650)};return(0,g.jsxs)(`div`,{className:`flex h-full flex-col bg-surface`,children:[(0,g.jsxs)(`div`,{className:`flex h-10 shrink-0 items-center gap-1 border-b border-line bg-surface-2/45 px-2`,children:[(0,g.jsx)(gm,{label:`后退`,disabled:!0,className:`h-6 w-6`,children:(0,g.jsx)(Pa,{size:13})}),(0,g.jsx)(gm,{label:`前进`,disabled:!0,className:`h-6 w-6`,children:(0,g.jsx)(Ia,{size:13})}),(0,g.jsx)(gm,{label:`刷新`,onClick:a,className:`h-6 w-6`,children:(0,g.jsx)(Us,{size:12,className:r?`animate-spin`:void 0})}),(0,g.jsxs)(`form`,{className:`mx-1 flex h-7 min-w-0 flex-1 items-center gap-1.5 rounded-lg border border-line bg-surface px-2`,onSubmit:e=>{e.preventDefault(),a()},children:[(0,g.jsx)(rc,{size:11,className:`shrink-0 text-success`}),(0,g.jsx)(fm,{variant:`bare`,value:t,onChange:e=>n(e.target.value),"aria-label":`预览地址`,className:`h-full min-w-0 flex-1 bg-transparent font-mono text-[10.5px] text-ink-2 outline-none`}),r?(0,g.jsx)(ds,{size:11,className:`animate-spin text-ink-3`}):null]})]}),(0,g.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto bg-[#f7f8fa]`,children:(0,g.jsx)(qY,{address:t})}),(0,g.jsxs)(`div`,{className:`flex h-6 shrink-0 items-center gap-1.5 border-t border-line bg-surface-2/50 px-2 font-mono text-[9px] text-ink-3`,children:[(0,g.jsx)(Co,{size:10,className:`shrink-0`}),(0,g.jsx)(`span`,{className:`whitespace-nowrap`,children:`演示预览`})]})]})}function qY({address:e}){return(0,g.jsxs)(`div`,{className:`min-h-full bg-[#f7f8fa] text-[#1d1d1f]`,children:[(0,g.jsx)(`div`,{className:`border-b border-black/[.06] bg-white/80 px-6 py-3 backdrop-blur`,children:(0,g.jsxs)(`div`,{className:`mx-auto flex max-w-[900px] items-center gap-3`,children:[(0,g.jsx)(`div`,{className:`flex h-6 w-6 items-center justify-center rounded-lg bg-[#0a84ff] text-[10px] font-bold text-white`,children:`L`}),(0,g.jsx)(`span`,{className:`text-[12px] font-semibold`,children:`Larness`}),(0,g.jsxs)(`nav`,{className:`ml-4 flex items-center gap-4 text-[10.5px] text-[#6e6e73]`,children:[(0,g.jsx)(`span`,{className:`text-[#1d1d1f]`,children:`概览`}),(0,g.jsx)(`span`,{children:`项目`}),(0,g.jsx)(`span`,{children:`运行记录`})]}),(0,g.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`rounded-full bg-[#30d158]/10 px-2 py-[2px] text-[9px] font-medium text-[#1f9d48]`,children:`dev · healthy`}),(0,g.jsx)(`div`,{className:`h-6 w-6 rounded-full bg-[#ffd60a]`})]})]})}),(0,g.jsxs)(`div`,{className:`mx-auto max-w-[900px] px-6 py-8`,children:[(0,g.jsxs)(`div`,{className:`flex items-end justify-between`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`p`,{className:`text-[10px] font-medium uppercase tracking-[.12em] text-[#86868b]`,children:`Workspace overview`}),(0,g.jsx)(`h2`,{className:`mt-2 text-[28px] font-semibold tracking-[-.03em]`,children:`你的工作空间,已就绪。`}),(0,g.jsx)(`p`,{className:`mt-1.5 max-w-[520px] text-[12px] leading-5 text-[#6e6e73]`,children:`这是 Vite 开发服务的本地预览占位页面。真实项目会在独立来源中加载,不共享管理站的 Cookie。`})]}),(0,g.jsxs)(`div`,{className:`hidden rounded-xl border border-black/[.06] bg-white px-3 py-2 text-right shadow-sm sm:block`,children:[(0,g.jsx)(`div`,{className:`font-mono text-[9px] text-[#86868b]`,children:e}),(0,g.jsx)(`div`,{className:`mt-1 text-[10px] text-[#1f9d48]`,children:`HTTP 200 · 42ms`})]})]}),(0,g.jsx)(`div`,{className:`mt-6 grid grid-cols-3 gap-3`,children:[{label:`运行中的服务`,value:`3`,detail:`+1 今日`,tint:`#0a84ff`},{label:`本周部署`,value:`12`,detail:`全部健康`,tint:`#30d158`},{label:`终端会话`,value:`2`,detail:`1 个空闲`,tint:`#ff9f0a`}].map(e=>(0,g.jsxs)(`div`,{className:`rounded-2xl border border-black/[.06] bg-white p-4 shadow-[0_1px_2px_rgba(0,0,0,.03)]`,children:[(0,g.jsx)(`div`,{className:`text-[10px] text-[#86868b]`,children:e.label}),(0,g.jsxs)(`div`,{className:`mt-2 flex items-end gap-2`,children:[(0,g.jsx)(`span`,{className:`text-[26px] font-semibold leading-none tracking-[-.04em]`,children:e.value}),(0,g.jsx)(`span`,{className:`pb-0.5 text-[9.5px] text-[#6e6e73]`,children:e.detail})]}),(0,g.jsx)(`div`,{className:`mt-3 h-1 rounded-full bg-black/[.05]`,children:(0,g.jsx)(`div`,{className:`h-full rounded-full`,style:{width:e.label===`运行中的服务`?`62%`:`78%`,background:e.tint}})})]},e.label))}),(0,g.jsxs)(`div`,{className:`mt-3 grid grid-cols-[1.4fr_1fr] gap-3`,children:[(0,g.jsxs)(`div`,{className:`rounded-2xl border border-black/[.06] bg-white p-4`,children:[(0,g.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,g.jsx)(`span`,{className:`text-[11px] font-semibold`,children:`最近活动`}),(0,g.jsx)(`span`,{className:`text-[9.5px] text-[#86868b]`,children:`过去 24 小时`})]}),(0,g.jsx)(`div`,{className:`mt-3 flex h-[92px] items-end gap-1.5`,children:[38,52,44,66,58,74,62,80,68,86,72,92].map((e,t)=>(0,g.jsx)(`div`,{className:B(`flex-1 rounded-t-[3px]`,t===11?`bg-[#0a84ff]`:`bg-[#0a84ff]/20`),style:{height:`${e}%`}},t))})]}),(0,g.jsxs)(`div`,{className:`rounded-2xl border border-black/[.06] bg-white p-4`,children:[(0,g.jsx)(`div`,{className:`text-[11px] font-semibold`,children:`当前会话`}),(0,g.jsx)(`div`,{className:`mt-3 space-y-2`,children:[[`feat/agent-runtime`,`feat/agent-runtime`,`运行中`],[`web-prod`,`PM2 · 8080`,`待部署`],[`preview`,`localhost:5173`,`已连接`]].map(([e,t,n])=>(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-[#0a84ff]`}),(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsx)(`div`,{className:`truncate text-[10.5px] font-medium`,children:e}),(0,g.jsx)(`div`,{className:`truncate font-mono text-[9px] text-[#86868b]`,children:t})]}),(0,g.jsx)(`span`,{className:`text-[9px] text-[#6e6e73]`,children:n})]},e))})]})]})]}),(0,g.jsxs)(`div`,{className:`flex items-center justify-center gap-2 border-t border-black/[.05] py-4 text-[9px] text-[#86868b]`,children:[(0,g.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-[#30d158]`}),`这是 S0 视觉 Demo 的静态预览,不加载真实项目页面`]})]})}function JY({tab:e}){return(0,g.jsx)(YY,{tab:e})}function YY({tab:e}){let[t,n]=(0,h.useState)(null),r=e.projectId,i=e.git,a=Jg({queryKey:[`git`,`diff`,r,i?.path,i?.staged],queryFn:()=>DW(r??``,i?.path??``,i?.staged===!0),enabled:r!==null&&i!==void 0,retry:!1});if(r===null||i===void 0)return(0,g.jsx)(`p`,{className:`p-4 text-xs text-ink-3`,children:`Diff 目标缺少项目或路径,请重新打开。`});if(a.isPending)return(0,g.jsxs)(`p`,{className:`flex items-center gap-2 p-4 text-xs text-ink-3`,children:[(0,g.jsx)(ds,{size:12,className:`animate-spin`}),` 读取 Diff…`]});if(a.isError)return(0,g.jsx)(qc,{message:`差异读取失败,请重新打开或重试。`,retry:{label:`重新读取`,run:()=>void a.refetch()}});let o=a.data;return(0,g.jsxs)(XY,{data:o,children:[(0,g.jsx)(qc,{message:t,onDismiss:()=>n(null)}),(0,g.jsx)(`button`,{type:`button`,className:`shrink-0 rounded px-1 py-0.5 text-ink-2 hover:bg-surface-2`,onClick:()=>{n(null),KM({projectId:r},i.path,`project`).catch(e=>n(GM(e)))},children:`打开工作区文件`})]})}function XY({data:e,children:t}){let n=e.binary?[]:e.diff.split(`
111
+ `);return(0,g.jsxs)(`div`,{className:`flex h-full flex-col bg-surface`,children:[(0,g.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-line px-3 py-2`,children:[(0,g.jsx)(Xo,{size:14,className:`text-ink-3`}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[10.5px] text-ink-2`,children:e.path}),(0,g.jsx)(`span`,{className:`rounded-full border border-line bg-surface-2 px-1.5 py-[1px] text-[9px] text-ink-3`,children:e.staged?`已暂存`:`工作区`}),t]}),e.binary?(0,g.jsx)(`p`,{className:`p-4 text-xs text-ink-3`,children:`二进制文件不显示文本 Diff;仍可按显式路径暂存 / 提交。`}):e.truncated?(0,g.jsx)(`p`,{className:`p-4 text-xs text-warning`,children:`Diff 超过 1 MiB,已截断;不自动写入或覆盖文件。`}):e.diff.trim()===``?(0,g.jsxs)(`div`,{className:`space-y-1 p-4 text-xs text-ink-3`,children:[(0,g.jsx)(`p`,{children:e.staged?`暂存区与 HEAD 没有文本差异。`:`工作区没有未暂存的文本差异。`}),(0,g.jsx)(`p`,{children:`未跟踪文件、仅权限或行尾变化、以及只存在于另一侧的改动不会显示在这里;可切换“已暂存 / 工作区”,或直接打开工作区文件。`})]}):(0,g.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto font-mono text-[10.5px] leading-[19px]`,children:n.map((e,t)=>(0,g.jsxs)(`div`,{className:B(`flex min-w-max whitespace-pre`,e.startsWith(`+`)&&!e.startsWith(`+++`)&&`bg-success/[.08]`,e.startsWith(`-`)&&!e.startsWith(`---`)&&`bg-danger/[.07]`),children:[(0,g.jsx)(`span`,{className:`w-5 shrink-0 select-none text-center text-ink-3/70`,children:e.startsWith(`+`)&&!e.startsWith(`+++`)?`+`:e.startsWith(`-`)&&!e.startsWith(`---`)?`-`:` `}),(0,g.jsx)(`span`,{className:`whitespace-pre pr-6 text-ink-2`,children:e||` `})]},`${t}_${e.slice(0,16)}`))}),(0,g.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-3 border-t border-line bg-surface-2/40 px-3 text-[10px] text-ink-3`,children:[(0,g.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,g.jsx)(Ja,{size:11,className:`text-success`}),`只读 Diff`]}),(0,g.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,g.jsx)(Vs,{size:11,className:`text-success`}),`新增`]}),(0,g.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,g.jsx)(yc,{size:11,className:`text-danger`}),`删除`]})]})]})}(0,h.lazy)(()=>e(()=>import(`./FileViewer-DKlF-CWF.js`),__vite__mapDeps([0,1,2,3,4,5])));var ZY=(0,h.lazy)(()=>e(()=>import(`./FileEditor-DnQa6Owc.js`),__vite__mapDeps([6,1,2,3,4,5])));function QY({tab:e}){return e.file?(0,g.jsx)($Y,{tab:e,target:e.file},e.id):(0,g.jsx)(`div`,{className:`p-5 text-sm text-ink-3`,children:`从右侧文件树打开文件。旧的预览 Tab 请关闭后重新打开。`})}function $Y({tab:e,target:t}){let n=Jg({queryKey:VM(t.scope,t.path),queryFn:()=>HM(t.scope,t.path),staleTime:0}),r=CM(e=>e.monitoring[BM(t.scope)]),i=CM(t=>t.drafts[e.resourceId]),a=CM(t=>t.saving[e.resourceId]??!1),[o,s]=(0,h.useState)(null),[c,l]=(0,h.useState)(!1),u=n.data,d=!!i&&!!u&&i.baseVersion!==u.version,f=i?.text??u?.content;return(0,h.useEffect)(()=>{let t=t=>{(t.metaKey||t.ctrlKey)&&t.key===`s`&&(t.preventDefault(),a||n.isError||d||(s(null),JM(e).catch(e=>s(GM(e)))))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[a,n.isError,d,e]),(0,g.jsxs)(`div`,{className:`flex h-full flex-col text-[11px] text-ink-2`,children:[(0,g.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 border-b border-line p-2`,children:[(0,g.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-mono`,title:t.path,children:[t.path,i?` ●`:``]}),(0,g.jsx)(`button`,{type:`button`,title:`在文件树中定位`,className:`hidden xl:inline`,onClick:()=>gW.getState().revealFile(BM(t.scope),t.path),children:`在文件树中定位`}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`刷新文件`,disabled:a,onClick:()=>{s(null),n.refetch()},children:`刷新`}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`保存文件`,disabled:!i||a||d||n.isError,onClick:()=>{s(null),JM(e).catch(e=>s(GM(e)))},children:a?`保存中…`:`保存`})]}),(0,g.jsx)(qc,{message:n.isError?GM(n.error):d?null:o,onDismiss:n.isError?void 0:()=>s(null)}),d?(0,g.jsxs)(`div`,{className:`shrink-0 space-y-2 border-b border-line bg-warning/10 p-2`,children:[(0,g.jsx)(`p`,{role:`status`,children:`磁盘文件已变化,草稿已保留。`}),(0,g.jsxs)(`div`,{className:`flex gap-4`,children:[(0,g.jsx)(`button`,{type:`button`,onClick:()=>l(!c),children:c?`返回编辑`:`查看差异`}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>{CM.getState().discard(e.resourceId),l(!1),s(null)},children:`重新加载磁盘`}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>{u&&i&&CM.getState().edit(e.resourceId,i.text,u.version),l(!1),s(null)},children:`手工合并`})]}),(0,g.jsx)(`p`,{className:`text-ink-3`,children:c?`磁盘版本 → 本地草稿`:`重载将放弃草稿;手工合并保留草稿,编辑后按当前磁盘版本保存。`})]}):null,(0,g.jsx)(`div`,{className:`min-h-0 flex-1`,children:f===void 0?(0,g.jsx)(`p`,{className:`p-4`,children:n.isPending?`正在读取完整文件…`:`文件不可用`}):(0,g.jsx)(h.Suspense,{fallback:(0,g.jsx)(`p`,{className:`p-4`,children:`正在加载编辑器…`}),children:(0,g.jsx)(ZY,{identity:e.resourceId,path:t.path,text:f,original:c&&d?u?.content:void 0,readOnly:a||n.isError,onChange:t=>{u&&(t===u.content&&(!i||i.baseVersion===u.version)?CM.getState().discard(e.resourceId):(zM.getState().keepFileTab(e.id),CM.getState().edit(e.resourceId,t,i?.baseVersion??u.version)))}},`${e.resourceId}:${c}`)})}),(0,g.jsxs)(`div`,{className:`shrink-0 border-t border-line px-3 py-1 text-ink-3`,children:[`UTF-8 · `,i?`未保存`:`已同步`,n.isFetching?` · 正在刷新`:``,` · `,r??`正在连接文件监听…`]})]})}function eX(e){switch(e){case`RUNNING`:return`运行中`;case`STARTING`:return`启动中`;case`STOPPING`:return`停止中`;case`STOPPED`:return`已停止`;case`FAILED`:return`失败`;default:return`已退出`}}function tX(e){return e===`RUNNING`?`border-success/20 bg-success/10 text-success`:e===`FAILED`?`border-danger/20 bg-danger/10 text-danger`:`border-line bg-surface-2 text-ink-3`}function nX({tab:e}){let t=e.projectId;return t?(0,g.jsx)(rX,{projectId:t,initialId:e.resourceId.startsWith(`prc_`)?e.resourceId:null}):(0,g.jsx)(`div`,{className:`flex h-full items-center justify-center text-xs text-ink-3`,children:`选择一个项目后查看服务`})}function rX({projectId:e,initialId:t}){let[n,r]=(0,h.useState)(t),i=wh(),a=Jg({queryKey:sK(e),queryFn:()=>lK(e),refetchInterval:2e3});if(n)return(0,g.jsx)(iX,{id:n,projectId:e,onBack:()=>r(null),onStopped:()=>{i.invalidateQueries({queryKey:sK(e)}),i.invalidateQueries({queryKey:cK(n)})}});let o=a.data??[],s=o.filter(e=>e.status===`RUNNING`).length;return(0,g.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,g.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-line px-3 py-2`,children:[(0,g.jsx)(tc,{size:14,className:`text-ink-3`}),(0,g.jsx)(`span`,{className:`text-[12px] font-semibold text-ink`,children:`服务`}),(0,g.jsxs)(`span`,{className:`rounded-full bg-surface-2 px-1.5 text-[10px] text-ink-3`,children:[s,`/`,o.length]}),(0,g.jsx)(gm,{className:`ml-auto h-6 w-6`,label:`刷新服务`,onClick:()=>void a.refetch(),disabled:a.isFetching,children:(0,g.jsx)(Us,{size:12,className:a.isFetching?`animate-spin`:void 0})})]}),(0,g.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,g.jsx)(qc,{message:a.isError?`服务读取失败,请刷新重试。`:null}),o.length===0&&!a.isError?(0,g.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-2 text-center`,children:[(0,g.jsx)(tc,{size:22,className:`text-ink-3`}),(0,g.jsx)(`p`,{className:`text-[12px] font-medium text-ink`,children:`当前项目暂无后台服务`}),(0,g.jsx)(`p`,{className:`max-w-[340px] text-[11px] text-ink-3`,children:`在项目会话中让 Agent 启动开发服务器或常驻任务,启动后即可在这里查看和预览。`})]}):(0,g.jsx)(`div`,{className:`grid grid-cols-1 gap-2 md:grid-cols-2`,children:o.map(e=>(0,g.jsxs)(`button`,{type:`button`,onClick:()=>r(e.id),className:`rounded-lg border border-line bg-surface p-2.5 text-left transition-colors hover:bg-surface-2`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`truncate text-[12px] font-medium text-ink`,children:e.name??e.executable}),(0,g.jsx)(`span`,{className:B(`rounded-full border px-1.5 py-[1px] text-[9px]`,tX(e.status)),children:eX(e.status)}),e.previewEligible?(0,g.jsx)(`span`,{className:`ml-auto rounded bg-accent-soft px-1 text-[9px] text-accent`,children:`可预览`}):null]}),(0,g.jsx)(`div`,{className:`mt-1 truncate font-mono text-[10px] text-ink-3`,children:e.port?`127.0.0.1:${e.port}`:e.executable}),(0,g.jsxs)(`div`,{className:`mt-0.5 truncate text-[9.5px] text-ink-3`,children:[e.pid?`PID ${e.pid} · `:``,e.cwd]})]},e.id))})]})]})}function iX({id:e,projectId:t,onBack:n,onStopped:r}){let i=wh(),a=zM(e=>e.open),[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(null),[u,d]=(0,h.useState)(0),[f,p]=(0,h.useState)([]),m=(0,h.useRef)(0),_=Jg({queryKey:cK(e),queryFn:()=>uK(e),refetchInterval:2e3}),v=Jg({queryKey:[`processes`,`output`,e,u],queryFn:()=>dK(e,u,200),refetchInterval:1500});(0,h.useEffect)(()=>{let e=v.data;if(!e)return;let t=e.chunks.filter(e=>e.cursor>m.current);t.length>0&&(m.current=t[t.length-1]?.cursor??m.current,p(e=>[...e,...t.map(e=>e.data)].slice(-600))),e.nextCursor>u&&d(e.nextCursor)},[v.data,u]);let y=_.data,b=async()=>{try{await fK(e),s(!1),l(null),await i.invalidateQueries({queryKey:cK(e)}),await i.invalidateQueries({queryKey:[`processes`]}),r()}catch(e){l(fj(e,`停止服务失败,请重试。`)),s(!1)}};return(0,g.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,g.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-line px-3 py-2`,children:[(0,g.jsx)(gm,{className:`h-6 w-6`,label:`返回服务列表`,onClick:n,children:(0,g.jsx)(Pa,{size:13})}),(0,g.jsx)(`span`,{className:`truncate text-[12px] font-semibold text-ink`,children:y?.name??`服务详情`}),y?(0,g.jsx)(`span`,{className:B(`rounded-full border px-1.5 py-[1px] text-[9px]`,tX(y.status)),children:eX(y.status)}):null,y?.previewEligible?(0,g.jsx)(V,{className:`ml-auto`,size:`sm`,variant:`secondary`,leading:(0,g.jsx)(Do,{size:11}),onClick:()=>a({kind:`browser`,resourceId:`browser:${y.id}:/`,browser:{serviceId:y.id,path:`/`,targetKind:`process`},title:`预览 ${y.name??y.executable}`,projectId:t,source:`project`}),children:`预览`}):null,y?.status===`RUNNING`||y?.status===`STARTING`?(0,g.jsx)(V,{className:y.previewEligible?``:`ml-auto`,size:`sm`,variant:`secondary`,leading:(0,g.jsx)(dc,{size:11}),onClick:()=>s(!0),children:`停止`}):null]}),(0,g.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,g.jsx)(qc,{message:c??(_.isError?`服务读取失败`:null)}),y?(0,g.jsxs)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-[11px]`,children:[(0,g.jsx)(`dt`,{className:`text-ink-3`,children:`命令`}),(0,g.jsx)(`dd`,{className:`truncate font-mono text-ink-2`,children:y.executable}),(0,g.jsx)(`dt`,{className:`text-ink-3`,children:`目录`}),(0,g.jsx)(`dd`,{className:`truncate font-mono text-ink-2`,children:y.cwd}),(0,g.jsx)(`dt`,{className:`text-ink-3`,children:`端口`}),(0,g.jsx)(`dd`,{className:`font-mono text-ink-2`,children:y.port?`127.0.0.1:${y.port}`:`未声明`}),(0,g.jsx)(`dt`,{className:`text-ink-3`,children:`PID`}),(0,g.jsx)(`dd`,{className:`font-mono text-ink-2`,children:y.pid??`—`}),(0,g.jsx)(`dt`,{className:`text-ink-3`,children:`开始`}),(0,g.jsx)(`dd`,{className:`text-ink-2`,children:y.startedAt?new Date(y.startedAt).toLocaleString(`zh-CN`):`—`})]}):null,(0,g.jsx)(`pre`,{role:`log`,"aria-label":`服务输出`,className:`mt-3 max-h-[calc(100dvh-16rem)] min-h-32 overflow-auto whitespace-pre-wrap break-words rounded-lg border border-line bg-surface-2 p-2 font-mono text-[10.5px] text-ink-2`,children:f.length>0?f.join(``):`等待服务输出…`})]}),(0,g.jsx)(Jc,{open:o,title:`停止服务?`,description:`将停止该任务及其进程组;未保存的临时状态会丢失。`,confirmLabel:`确认停止`,danger:!0,onCancel:()=>s(!1),onConfirm:()=>void b()})]})}var aX=2,oX=1,sX=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(aX,Math.floor(u/e.css.cell.width)),rows:Math.max(oX,Math.floor(l/e.css.cell.height))}}},cX=Object.defineProperty,lX=Object.getOwnPropertyDescriptor,uX=(e,t)=>{for(var n in t)cX(e,n,{get:t[n],enumerable:!0})},dX=(e,t,n,r)=>{for(var i=r>1?void 0:r?lX(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&cX(t,n,i),i},X=(e,t)=>(n,r)=>t(n,r,e),fX=`Terminal input`,pX={get:()=>fX,set:e=>fX=e},mX=`Too much output to announce, navigate to rows manually to read`,hX={get:()=>mX,set:e=>mX=e};function gX(e){return e.replace(/\r?\n/g,`\r`)}function _X(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function vX(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function yX(e,t,n,r){e.stopPropagation(),e.clipboardData&&bX(e.clipboardData.getData(`text/plain`),t,n,r)}function bX(e,t,n,r){e=gX(e),e=_X(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function xX(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function SX(e,t,n,r,i){xX(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function CX(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function wX(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var TX=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o)}else i!==65279&&(t[r++]=i)}return r}},EX=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128||(c=(i&31)<<6|a&63,c<128)){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},DX=``,OX=` `,kX=class e{constructor(){this.fg=0,this.bg=0,this.extended=new AX}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},AX=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},jX=class e extends kX{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new AX,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?CX(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},MX=`di$target`,NX=`di$dependencies`,PX=new Map;function FX(e){return e[NX]||[]}function IX(e){if(PX.has(e))return PX.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);LX(t,e,r)};return t._id=e,PX.set(e,t),t}function LX(e,t,n){t[MX]===t?t[NX].push({id:e,index:n}):(t[NX]=[{id:e,index:n}],t[MX]=t)}var RX=IX(`BufferService`),zX=IX(`CoreMouseService`),BX=IX(`CoreService`),VX=IX(`CharsetService`),HX=IX(`InstantiationService`),UX=IX(`LogService`),WX=IX(`OptionsService`),GX=IX(`OscLinkService`),KX=IX(`UnicodeService`),qX=IX(`DecorationService`),JX=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new jX,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(c!==-1||n.hasContent(t)){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):YX(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};JX=dX([X(0,RX),X(1,WX),X(2,GX)],JX);function YX(e,t){if(confirm(`Do you want to navigate to ${t}?
112
+
113
+ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var XX=IX(`CharSizeService`),ZX=IX(`CoreBrowserService`),QX=IX(`MouseService`),$X=IX(`RenderService`),eZ=IX(`SelectionService`),tZ=IX(`CharacterJoinerService`),nZ=IX(`ThemeService`),rZ=IX(`LinkProviderService`),iZ=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?uZ.isErrorNoTelemetry(e)?new uZ(e.message+`
114
+
115
+ `+e.stack):Error(e.message+`
116
+
117
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function aZ(e){sZ(e)||iZ.onUnexpectedError(e)}var oZ=`Canceled`;function sZ(e){return e instanceof cZ||e instanceof Error&&e.name===oZ&&e.message===oZ}var cZ=class extends Error{constructor(){super(oZ),this.name=this.message}};function lZ(e){return Error(e?`Illegal argument: ${e}`:`Illegal argument`)}var uZ=class e extends Error{constructor(e){super(e),this.name=`CodeExpectedError`}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(e){return e.name===`CodeExpectedError`}},dZ=class e extends Error{constructor(t){super(t||`An unexpected bug occurred.`),Object.setPrototypeOf(this,e.prototype)}};function fZ(e,t=0){return e[e.length-(1+t)]}var pZ;(e=>{function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(pZ||={});var mZ=class e{constructor(e){this.iterate=e}forEach(e){this.iterate(t=>(e(t),!0))}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}some(e){let t=!1;return this.iterate(n=>(t=e(n),!t)),t}findFirst(e){let t;return this.iterate(n=>!e(n)||(t=n,!1)),t}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||pZ.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};mZ.empty=new mZ(e=>{});function hZ(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var gZ;(e=>{function t(e){return e&&typeof e==`object`&&typeof e[Symbol.iterator]==`function`}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(e){yield e}e.single=i;function a(e){return t(e)?e:i(e)}e.wrap=a;function o(e){return e||n}e.from=o;function*s(e){for(let t=e.length-1;t>=0;t--)yield e[t]}e.reverse=s;function c(e){return!e||e[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(e){return e[Symbol.iterator]().next().value}e.first=l;function u(e,t){let n=0;for(let r of e)if(t(r,n++))return!0;return!1}e.some=u;function d(e,t){for(let n of e)if(t(n))return n}e.find=d;function*f(e,t){for(let n of e)t(n)&&(yield n)}e.filter=f;function*p(e,t){let n=0;for(let r of e)yield t(r,n++)}e.map=p;function*m(e,t){let n=0;for(let r of e)yield*t(r,n++)}e.flatMap=m;function*h(...e){for(let t of e)yield*t}e.concat=h;function g(e,t,n){let r=n;for(let n of e)r=t(r,n);return r}e.reduce=g;function*_(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t<n;t++)yield e[t]}e.slice=_;function v(t,n=1/0){let r=[];if(n===0)return[r,t];let i=t[Symbol.iterator]();for(let t=0;t<n;t++){let t=i.next();if(t.done)return[r,e.empty()];r.push(t.value)}return[r,{[Symbol.iterator](){return i}}]}e.consume=v;async function y(e){let t=[];for await(let n of e)t.push(n);return Promise.resolve(t)}e.asyncToArray=y})(gZ||={});var _Z=null;function vZ(e){return _Z?.trackDisposable(e),e}function yZ(e){_Z?.markAsDisposed(e)}function bZ(e,t){_Z?.setParent(e,t)}function xZ(e){return _Z?.markAsSingleton(e),e}function SZ(e){if(gZ.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t,`Encountered errors while disposing of store`);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function CZ(...e){return wZ(()=>SZ(e))}function wZ(e){let t=vZ({dispose:hZ(()=>{yZ(t),e()})});return t}var TZ=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,vZ(this)}dispose(){this._isDisposed||(yZ(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{SZ(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw Error(`Cannot register a disposable on itself!`);return bZ(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(Error(`Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!`).stack):this._toDispose.add(t),t}delete(e){if(e){if(e===this)throw Error(`Cannot dispose a disposable on itself!`);this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),bZ(e,null))}};TZ.DISABLE_DISPOSED_WARNING=!1;var EZ=TZ,DZ=class{constructor(){this._store=new EZ,vZ(this),bZ(this._store,this)}dispose(){yZ(this),this._store.dispose()}_register(e){if(e===this)throw Error(`Cannot register a disposable on itself!`);return this._store.add(e)}};DZ.None=Object.freeze({dispose(){}});var OZ=class{constructor(){this._isDisposed=!1,vZ(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&bZ(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,yZ(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&bZ(e,null),e}},kZ=typeof window==`object`?window:globalThis,AZ=class e{constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};AZ.Undefined=new AZ(void 0);var jZ=AZ,MZ=class{constructor(){this._first=jZ.Undefined,this._last=jZ.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===jZ.Undefined}clear(){let e=this._first;for(;e!==jZ.Undefined;){let t=e.next;e.prev=jZ.Undefined,e.next=jZ.Undefined,e=t}this._first=jZ.Undefined,this._last=jZ.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new jZ(e);if(this._first===jZ.Undefined)this._first=n,this._last=n;else if(t){let e=this._last;this._last=n,n.prev=e,e.next=n}else{let e=this._first;this._first=n,n.next=e,e.prev=n}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(n))}}shift(){if(this._first!==jZ.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==jZ.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==jZ.Undefined&&e.next!==jZ.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===jZ.Undefined&&e.next===jZ.Undefined?(this._first=jZ.Undefined,this._last=jZ.Undefined):e.next===jZ.Undefined?(this._last=this._last.prev,this._last.next=jZ.Undefined):e.prev===jZ.Undefined&&(this._first=this._first.next,this._first.prev=jZ.Undefined);--this._size}*[Symbol.iterator](){let e=this._first;for(;e!==jZ.Undefined;)yield e.element,e=e.next}},NZ=globalThis.performance&&typeof globalThis.performance.now==`function`,PZ=class e{static create(t){return new e(t)}constructor(e){this._now=NZ&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime===-1?this._now()-this._startTime:this._stopTime-this._startTime}},FZ;(e=>{e.None=()=>DZ.None;function t(e,t){return d(e,()=>{},0,void 0,!0,void 0,t)}e.defer=t;function n(e){return(t,n=null,r)=>{let i=!1,a;return a=e(e=>{if(!i)return a?a.dispose():i=!0,t.call(n,e)},null,r),i&&a.dispose(),a}}e.once=n;function r(e,t,n){return l((n,r=null,i)=>e(e=>n.call(r,t(e)),null,i),n)}e.map=r;function i(e,t,n){return l((n,r=null,i)=>e(e=>{t(e),n.call(r,e)},null,i),n)}e.forEach=i;function a(e,t,n){return l((n,r=null,i)=>e(e=>t(e)&&n.call(r,e),null,i),n)}e.filter=a;function o(e){return e}e.signal=o;function s(...e){return(t,n=null,r)=>u(CZ(...e.map(e=>e(e=>t.call(n,e)))),r)}e.any=s;function c(e,t,n,i){let a=n;return r(e,e=>(a=t(a,e),a),i)}e.reduce=c;function l(e,t){let n,r=new Z({onWillAddFirstListener(){n=e(r.fire,r)},onDidRemoveLastListener(){n?.dispose()}});return t?.add(r),r.event}function u(e,t){return t instanceof Array?t.push(e):t&&t.add(e),e}function d(e,t,n=100,r=!1,i=!1,a,o){let s,c,l,u=0,d,f=new Z({leakWarningThreshold:a,onWillAddFirstListener(){s=e(e=>{u++,c=t(c,e),r&&!l&&(f.fire(c),c=void 0),d=()=>{let e=c;c=void 0,l=void 0,(!r||u>1)&&f.fire(e),u=0},typeof n==`number`?(clearTimeout(l),l=setTimeout(d,n)):l===void 0&&(l=0,queueMicrotask(d))})},onWillRemoveListener(){i&&u>0&&d?.()},onDidRemoveLastListener(){d=void 0,s.dispose()}});return o?.add(f),f.event}e.debounce=d;function f(t,n=0,r){return e.debounce(t,(e,t)=>e?(e.push(t),e):[t],n,void 0,!0,void 0,r)}e.accumulate=f;function p(e,t=(e,t)=>e===t,n){let r=!0,i;return a(e,e=>{let n=r||!t(e,i);return r=!1,i=e,n},n)}e.latch=p;function m(t,n,r){return[e.filter(t,n,r),e.filter(t,e=>!n(e),r)]}e.split=m;function h(e,t=!1,n=[],r){let i=n.slice(),a=e(e=>{i?i.push(e):s.fire(e)});r&&r.add(a);let o=()=>{i?.forEach(e=>s.fire(e)),i=null},s=new Z({onWillAddFirstListener(){a||(a=e(e=>s.fire(e)),r&&r.add(a))},onDidAddFirstListener(){i&&(t?setTimeout(o):o())},onDidRemoveLastListener(){a&&a.dispose(),a=null}});return r&&r.add(s),s.event}e.buffer=h;function g(e,t){return(n,r,i)=>{let a=t(new v);return e(function(e){let t=a.evaluate(e);t!==_&&n.call(r,t)},void 0,i)}}e.chain=g;let _=Symbol(`HaltChainable`);class v{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push(t=>(e(t),t)),this}filter(e){return this.steps.push(t=>e(t)?t:_),this}reduce(e,t){let n=t;return this.steps.push(t=>(n=e(n,t),n)),this}latch(e=(e,t)=>e===t){let t=!0,n;return this.steps.push(r=>{let i=t||!e(r,n);return t=!1,n=r,i?r:_}),this}evaluate(e){for(let t of this.steps)if(e=t(e),e===_)break;return e}}function y(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new Z({onWillAddFirstListener:()=>e.on(t,r),onDidRemoveLastListener:()=>e.removeListener(t,r)});return i.event}e.fromNodeEventEmitter=y;function b(e,t,n=e=>e){let r=(...e)=>i.fire(n(...e)),i=new Z({onWillAddFirstListener:()=>e.addEventListener(t,r),onDidRemoveLastListener:()=>e.removeEventListener(t,r)});return i.event}e.fromDOMEventEmitter=b;function x(e){return new Promise(t=>n(e)(t))}e.toPromise=x;function S(e){let t=new Z;return e.then(e=>{t.fire(e)},()=>{t.fire(void 0)}).finally(()=>{t.dispose()}),t.event}e.fromPromise=S;function C(e,t){return e(e=>t.fire(e))}e.forward=C;function w(e,t,n){return t(n),e(e=>t(e))}e.runAndSubscribe=w;class T{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;let n={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new Z(n),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function E(e,t){return new T(e,t).emitter.event}e.fromObservable=E;function D(e){return(t,n,r)=>{let i=0,a=!1,o={beginUpdate(){i++},endUpdate(){i--,i===0&&(e.reportChanges(),a&&(a=!1,t.call(n)))},handlePossibleChange(){},handleChange(){a=!0}};e.addObserver(o),e.reportChanges();let s={dispose(){e.removeObserver(o)}};return r instanceof EZ?r.add(s):Array.isArray(r)&&r.push(s),s}}e.fromObservableLight=D})(FZ||={});var IZ=class e{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(e){this._stopWatch=new PZ,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}};IZ.all=new Set,IZ._idPool=0;var LZ=IZ,RZ=-1,zZ=class e{constructor(t,n,r=(e._idPool++).toString(16).padStart(3,`0`)){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t<n)return;this._stacks||=new Map;let r=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,r+1),--this._warnCountdown,this._warnCountdown<=0){this._warnCountdown=n*.5;let[e,r]=this.getMostFrequentStack(),i=`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${r}):`;console.warn(i),console.warn(e);let a=new HZ(i,e);this._errorHandler(a)}return()=>{let t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,r]of this._stacks)(!e||t<r)&&(e=[n,r],t=r);return e}};zZ._idPool=1;var BZ=zZ,VZ=class e{constructor(e){this.value=e}static create(){return new e(Error().stack??``)}print(){console.warn(this.value.split(`
118
+ `).slice(2).join(`
119
+ `))}},HZ=class extends Error{constructor(e,t){super(e),this.name=`ListenerLeakError`,this.stack=t}},UZ=class extends Error{constructor(e,t){super(e),this.name=`ListenerRefusalError`,this.stack=t}},WZ=0,GZ=class{constructor(e){this.value=e,this.id=WZ++}},KZ=2,Z=class{constructor(e){this._size=0,this._options=e,this._leakageMon=RZ>0||this._options?.leakWarningThreshold?new BZ(e?.onListenerError??aZ,this._options?.leakWarningThreshold??RZ):void 0,this._perfMon=this._options?._profName?new LZ(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);let t=this._leakageMon.getMostFrequentStack()??[`UNKNOWN stack`,-1],n=new UZ(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||aZ)(n),DZ.None}if(this._disposed)return DZ.None;t&&(e=e.bind(t));let r=new GZ(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=VZ.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof GZ?(this._deliveryQueue??=new qZ,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=wZ(()=>{i?.(),this._removeListener(r)});return n instanceof EZ?n.add(a):Array.isArray(n)&&n.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log(`disposed?`,this._disposed),console.log(`size?`,this._size),console.log(`arr?`,JSON.stringify(this._listeners)),Error(`Attempted to dispose unknown listener`);this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*KZ<=t.length){let e=0;for(let n=0;n<t.length;n++)t[n]?t[e++]=t[n]:r&&(this._deliveryQueue.end--,e<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=e}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||aZ;if(!n)e.value(t);else try{e.value(t)}catch(e){n(e)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners){if(this._listeners instanceof GZ)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}}this._perfMon?.stop()}hasListeners(){return this._size>0}},qZ=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},JZ=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new Z,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new Z,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};JZ.INSTANCE=new JZ;var YZ=JZ;function XZ(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}YZ.INSTANCE.onDidChangeZoomLevel;function ZZ(e){return YZ.INSTANCE.getZoomFactor(e)}YZ.INSTANCE.onDidChangeFullscreen;var QZ=typeof navigator==`object`?navigator.userAgent:``,$Z=QZ.indexOf(`Firefox`)>=0,eQ=QZ.indexOf(`AppleWebKit`)>=0,tQ=QZ.indexOf(`Chrome`)>=0,nQ=!tQ&&QZ.indexOf(`Safari`)>=0;QZ.indexOf(`Electron/`),QZ.indexOf(`Android`);var rQ=!1;if(typeof kZ.matchMedia==`function`){let e=kZ.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=kZ.matchMedia(`(display-mode: fullscreen)`);rQ=e.matches,XZ(kZ,e,({matches:e})=>{rQ&&t.matches||(rQ=e)})}function iQ(){return rQ}var aQ=`en`,oQ=!1,sQ=!1,cQ=!1,lQ=!1,uQ=!1,dQ=aQ,fQ,pQ=globalThis,mQ;typeof pQ.vscode<`u`&&typeof pQ.vscode.process<`u`?mQ=pQ.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(mQ=process);var hQ=typeof mQ?.versions?.electron==`string`&&mQ?.type===`renderer`;if(typeof mQ==`object`){oQ=mQ.platform===`win32`,sQ=mQ.platform===`darwin`,cQ=mQ.platform===`linux`,cQ&&mQ.env.SNAP&&mQ.env.SNAP_REVISION,mQ.env.CI||mQ.env.BUILD_ARTIFACTSTAGINGDIRECTORY,dQ=aQ;let e=mQ.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,dQ=t.resolvedLanguage||aQ,t.languagePack?.translationsConfigFile}catch{}lQ=!0}else typeof navigator==`object`&&!hQ?(fQ=navigator.userAgent,oQ=fQ.indexOf(`Windows`)>=0,sQ=fQ.indexOf(`Macintosh`)>=0,(fQ.indexOf(`Macintosh`)>=0||fQ.indexOf(`iPad`)>=0||fQ.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,cQ=fQ.indexOf(`Linux`)>=0,fQ?.indexOf(`Mobi`),uQ=!0,dQ=globalThis._VSCODE_NLS_LANGUAGE||aQ,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var gQ=oQ,_Q=sQ,vQ=cQ,yQ=lQ;uQ&&typeof pQ.importScripts==`function`&&pQ.origin;var bQ=fQ,xQ=dQ,SQ;(e=>{function t(){return xQ}e.value=t;function n(){return xQ.length===2?xQ===`en`:xQ.length>=3&&xQ[0]===`e`&&xQ[1]===`n`&&xQ[2]===`-`}e.isDefaultVariant=n;function r(){return xQ===`en`}e.isDefault=r})(SQ||={});var CQ=typeof pQ.postMessage==`function`&&!pQ.importScripts;(()=>{if(CQ){let e=[];pQ.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r.id===t.data.vscodeScheduleAsyncWork){e.splice(n,1),r.callback();return}}});let t=0;return n=>{let r=++t;e.push({id:r,callback:n}),pQ.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var wQ=!!(bQ&&bQ.indexOf(`Chrome`)>=0);bQ&&bQ.indexOf(`Firefox`),!wQ&&bQ&&bQ.indexOf(`Safari`),bQ&&bQ.indexOf(`Edg/`),bQ&&bQ.indexOf(`Android`);var TQ=typeof navigator==`object`?navigator:{};yQ||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||TQ&&TQ.clipboard&&TQ.clipboard.writeText,yQ||TQ&&TQ.clipboard&&TQ.clipboard.readText,yQ||iQ()||TQ.keyboard,`ontouchstart`in kZ||TQ.maxTouchPoints,kZ.PointerEvent&&(`ontouchstart`in kZ||navigator.maxTouchPoints);var EQ=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},DQ=new EQ,OQ=new EQ,kQ=new EQ,AQ=Array(230),jQ;(e=>{function t(e){return DQ.keyCodeToStr(e)}e.toString=t;function n(e){return DQ.strToKeyCode(e)}e.fromString=n;function r(e){return OQ.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return kQ.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return OQ.strToKeyCode(e)||kQ.strToKeyCode(e)}e.fromUserSettings=a;function o(e){if(e>=98&&e<=113)return null;switch(e){case 16:return`Up`;case 18:return`Down`;case 15:return`Left`;case 17:return`Right`}return DQ.keyCodeToStr(e)}e.toElectronAccelerator=o})(jQ||={});var MQ=class e{constructor(e,t,n,r,i){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}equals(t){return t instanceof e&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){return`K${this.ctrlKey?`1`:`0`}${this.shiftKey?`1`:`0`}${this.altKey?`1`:`0`}${this.metaKey?`1`:`0`}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new NQ([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},NQ=class{constructor(e){if(e.length===0)throw lZ(`chords`);this.chords=e}getHashCode(){let e=``;for(let t=0,n=this.chords.length;t<n;t++)t!==0&&(e+=`;`),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function PQ(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return jQ.fromString(t)}let t=e.keyCode;if(t===3)return 7;if($Z)switch(t){case 59:return 85;case 60:if(vQ)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(_Q)return 57}else if(eQ&&(_Q&&t===93||!_Q&&t===92))return 57;return AQ[t]||0}var FQ=_Q?256:2048,IQ=512,LQ=1024,RQ=_Q?2048:256,zQ=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.(`AltGraph`),this.keyCode=PQ(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=FQ),this.altKey&&(t|=IQ),this.shiftKey&&(t|=LQ),this.metaKey&&(t|=RQ),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new MQ(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},BQ=new WeakMap;function VQ(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,n=e.parent.location;if(t.origin!==`null`&&n.origin!==`null`&&t.origin!==n.origin)return null}catch{return null}return e.parent}var HQ=class{static getSameOriginWindowChain(e){let t=BQ.get(e);if(!t){t=[],BQ.set(e,t);let n=e,r;do r=VQ(n),r?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=r;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let n=0,r=0,i=this.getSameOriginWindowChain(e);for(let e of i){let i=e.window.deref();if(n+=i?.scrollY??0,r+=i?.scrollX??0,i===t||!e.iframeElement)break;let a=e.iframeElement.getBoundingClientRect();n+=a.top,r+=a.left}return{top:n,left:r}}},UQ=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type===`dblclick`&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX==`number`?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let n=HQ.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=n.left,this.posy-=n.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},WQ=class{constructor(e,t=0,n=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t;let r=!1;if(tQ){let e=navigator.userAgent.match(/Chrome\/(\d+)/);r=(e?parseInt(e[1]):123)<=122}if(e){let t=e,n=e,i=e.view?.devicePixelRatio||1;if(typeof t.wheelDeltaY<`u`)this.deltaY=r?t.wheelDeltaY/(120*i):t.wheelDeltaY/120;else if(typeof n.VERTICAL_AXIS<`u`&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if(e.type===`wheel`){let t=e;this.deltaY=t.deltaMode===t.DOM_DELTA_LINE?$Z&&!_Q?-e.deltaY/3:-e.deltaY:-e.deltaY/40}if(typeof t.wheelDeltaX<`u`)this.deltaX=nQ&&gQ?-(t.wheelDeltaX/120):r?t.wheelDeltaX/(120*i):t.wheelDeltaX/120;else if(typeof n.HORIZONTAL_AXIS<`u`&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type===`wheel`){let t=e;this.deltaX=t.deltaMode===t.DOM_DELTA_LINE?$Z&&!_Q?-e.deltaX/3:-e.deltaX:-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(this.deltaY=r?e.wheelDelta/(120*i):e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},GQ=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),KQ;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof qQ?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:FZ.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:GQ})})(KQ||={});var qQ=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?GQ:(this._emitter||=new Z,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}},JQ=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e==`function`&&typeof t==`number`&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new dZ(`Calling 'cancelAndSet' on a disposed TimeoutTimer`);this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new dZ(`Calling 'setIfNotSet' on a disposed TimeoutTimer`);this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},YQ=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,n=globalThis){if(this.isDisposed)throw new dZ(`Calling 'cancelAndSet' on a disposed IntervalTimer`);this.cancel();let r=n.setInterval(()=>{e()},t);this.disposable=wZ(()=>{n.clearInterval(r),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var XQ;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(XQ||={});var ZQ=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new Z,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await FZ.toPromise(this._onStateChanged.event)}while(1)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};ZQ.EMPTY=ZQ.fromArray([]);function QQ(e){return $Q(e,0)}function $Q(e,t){switch(typeof e){case`object`:return e===null?e$(349,t):Array.isArray(e)?r$(e,t):i$(e,t);case`string`:return n$(e,t);case`boolean`:return t$(e,t);case`number`:return e$(e,t);case`undefined`:return e$(937,t);default:return e$(617,t)}}function e$(e,t){return(t<<5)-t+e|0}function t$(e,t){return e$(e?433:863,t)}function n$(e,t){t=e$(149417,t);for(let n=0,r=e.length;n<r;n++)t=e$(e.charCodeAt(n),t);return t}function r$(e,t){return t=e$(104579,t),e.reduce((e,t)=>$Q(t,e),t)}function i$(e,t){return t=e$(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=n$(n,t),$Q(e[n],t)),t)}var{registerWindow:$ne,getWindow:a$,getDocument:ere,getWindows:tre,getWindowsCount:nre,getWindowId:o$,getWindowById:rre,hasWindow:ire,onDidRegisterWindow:s$,onWillUnregisterWindow:are,onDidUnregisterWindow:ore}=function(){let e=new Map,t={window:kZ,disposables:new EZ};e.set(kZ.vscodeWindowId,t);let n=new Z,r=new Z,i=new Z;function a(n,r){return(typeof n==`number`?e.get(n):void 0)??(r?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(t){if(e.has(t.vscodeWindowId))return DZ.None;let a=new EZ,o={window:t,disposables:a.add(new EZ)};return e.set(t.vscodeWindowId,o),a.add(wZ(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(l$(t,v$.BEFORE_UNLOAD,()=>{i.fire(t)})),n.fire(o),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:a,getWindow(e){let t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;let n=e;return n?.view?n.view.window:kZ},getDocument(e){return a$(e).document}}}(),c$=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&=(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,null)}};function l$(e,t,n,r){return new c$(e,t,n,r)}function u$(e,t){return function(n){return t(new UQ(e,n))}}function d$(e){return function(t){return e(new zQ(t))}}var f$=function(e,t,n,r){let i=n;return t===`click`||t===`mousedown`||t===`contextmenu`?i=u$(a$(e),n):(t===`keydown`||t===`keypress`||t===`keyup`)&&(i=d$(n)),l$(e,t,i,r)},p$,m$=class extends YQ{constructor(e){super(),this.defaultTarget=e&&a$(e)}cancelAndSet(e,t,n){return super.cancelAndSet(e,t,n??this.defaultTarget)}},h$=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){aZ(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,n=new Map,r=new Map,i=i=>{n.set(i,!1);let a=e.get(i)??[];for(t.set(i,a),e.set(i,[]),r.set(i,!0);a.length>0;)a.sort(h$.sort),a.shift().execute();r.set(i,!1)};p$=(t,r,a=0)=>{let o=o$(t),s=new h$(r,a),c=e.get(o);return c||(c=[],e.set(o,c)),c.push(s),n.get(o)||(n.set(o,!0),t.requestAnimationFrame(()=>i(o))),s}})();var g$=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,n=this.height){return t!==this.width||n!==this.height?new e(t,n):this}static is(e){return typeof e==`object`&&typeof e.height==`number`&&typeof e.width==`number`}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};g$.None=new g$(0,0);function _$(e){let t=e.getBoundingClientRect(),n=a$(e);return{left:t.left+n.scrollX,top:t.top+n.scrollY,width:t.width,height:t.height}}new class{constructor(){this.mutationObservers=new Map}observe(e,t,n){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let i=QQ(n),a=r.get(i);if(a)a.users+=1;else{let o=new Z,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(wZ(()=>{--c.users,c.users===0&&(o.dispose(),s.disconnect(),r?.delete(i),r?.size===0&&this.mutationObservers.delete(e))})),r.set(i,a)}return a.onDidMutate}};var v$={CLICK:`click`,AUXCLICK:`auxclick`,DBLCLICK:`dblclick`,MOUSE_UP:`mouseup`,MOUSE_DOWN:`mousedown`,MOUSE_OVER:`mouseover`,MOUSE_MOVE:`mousemove`,MOUSE_OUT:`mouseout`,MOUSE_ENTER:`mouseenter`,MOUSE_LEAVE:`mouseleave`,MOUSE_WHEEL:`wheel`,POINTER_UP:`pointerup`,POINTER_DOWN:`pointerdown`,POINTER_MOVE:`pointermove`,POINTER_LEAVE:`pointerleave`,CONTEXT_MENU:`contextmenu`,WHEEL:`wheel`,KEY_DOWN:`keydown`,KEY_PRESS:`keypress`,KEY_UP:`keyup`,LOAD:`load`,BEFORE_UNLOAD:`beforeunload`,UNLOAD:`unload`,PAGE_SHOW:`pageshow`,PAGE_HIDE:`pagehide`,PASTE:`paste`,ABORT:`abort`,ERROR:`error`,RESIZE:`resize`,SCROLL:`scroll`,FULLSCREEN_CHANGE:`fullscreenchange`,WK_FULLSCREEN_CHANGE:`webkitfullscreenchange`,SELECT:`select`,CHANGE:`change`,SUBMIT:`submit`,RESET:`reset`,FOCUS:`focus`,FOCUS_IN:`focusin`,FOCUS_OUT:`focusout`,BLUR:`blur`,INPUT:`input`,STORAGE:`storage`,DRAG_START:`dragstart`,DRAG:`drag`,DRAG_ENTER:`dragenter`,DRAG_LEAVE:`dragleave`,DRAG_OVER:`dragover`,DROP:`drop`,DRAG_END:`dragend`,ANIMATION_START:eQ?`webkitAnimationStart`:`animationstart`,ANIMATION_END:eQ?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:eQ?`webkitAnimationIteration`:`animationiteration`},y$=class{constructor(e){this.domNode=e,this._maxWidth=``,this._width=``,this._height=``,this._top=``,this._left=``,this._bottom=``,this._right=``,this._paddingTop=``,this._paddingLeft=``,this._paddingBottom=``,this._paddingRight=``,this._fontFamily=``,this._fontWeight=``,this._fontSize=``,this._fontStyle=``,this._fontFeatureSettings=``,this._fontVariationSettings=``,this._textDecoration=``,this._lineHeight=``,this._letterSpacing=``,this._className=``,this._display=``,this._position=``,this._visibility=``,this._color=``,this._backgroundColor=``,this._layerHint=!1,this._contain=`none`,this._boxShadow=``}setMaxWidth(e){let t=b$(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=b$(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=b$(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=b$(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=b$(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=b$(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=b$(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=b$(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=b$(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=b$(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=b$(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=b$(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=b$(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=b$(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?`translate3d(0px, 0px, 0px)`:``)}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function b$(e){return typeof e==`number`?`${e}px`:e}function x$(e){return new y$(e)}var S$=class{constructor(){this._hooks=new EZ,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let n=this._onStopCallback;this._onStopCallback=null,e&&n&&n(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,n,r,i){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=r,this._onStopCallback=i;let a=e;try{e.setPointerCapture(t),this._hooks.add(wZ(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{a=a$(e)}this._hooks.add(l$(a,v$.POINTER_MOVE,e=>{e.buttons===n?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)})),this._hooks.add(l$(a,v$.POINTER_UP,e=>this.stopMonitoring(!0)))}};function C$(e,t,n){let r=null,i=null;if(typeof n.value==`function`?(r=`value`,i=n.value,i.length!==0&&console.warn(`Memoize should only be used in functions with zero parameters`)):typeof n.get==`function`&&(r=`get`,i=n.get),!i)throw Error(`not supported`);let a=`$memoize$${t}`;n[r]=function(...e){return this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,e)}),this[a]}}var w$;(e=>(e.Tap=`-xterm-gesturetap`,e.Change=`-xterm-gesturechange`,e.Start=`-xterm-gesturestart`,e.End=`-xterm-gesturesend`,e.Contextmenu=`-xterm-gesturecontextmenu`))(w$||={});var T$=class e extends DZ{constructor(){super(),this.dispatched=!1,this.targets=new MZ,this.ignoreTargets=new MZ,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(FZ.runAndSubscribe(s$,({window:e,disposables:t})=>{t.add(l$(e.document,`touchstart`,e=>this.onTouchStart(e),{passive:!1})),t.add(l$(e.document,`touchend`,t=>this.onTouchEnd(e,t))),t.add(l$(e.document,`touchmove`,e=>this.onTouchMove(e),{passive:!1}))},{window:kZ,disposables:this._store}))}static addTarget(t){return e.isTouchDevice()?(e.INSTANCE||=xZ(new e),wZ(e.INSTANCE.targets.push(t))):DZ.None}static ignoreTarget(t){return e.isTouchDevice()?(e.INSTANCE||=xZ(new e),wZ(e.INSTANCE.ignoreTargets.push(t))):DZ.None}static isTouchDevice(){return`ontouchstart`in kZ||navigator.maxTouchPoints>0}dispose(){this.handle&&=(this.handle.dispose(),null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&=(this.handle.dispose(),null);for(let n=0,r=e.targetTouches.length;n<r;n++){let r=e.targetTouches.item(n);this.activeTouches[r.identifier]={id:r.identifier,initialTarget:r.target,initialTimeStamp:t,initialPageX:r.pageX,initialPageY:r.pageY,rollingTimestamps:[t],rollingPageX:[r.pageX],rollingPageY:[r.pageY]};let i=this.newGestureEvent(w$.Start,r.target);i.pageX=r.pageX,i.pageY=r.pageY,this.dispatchEvent(i)}this.dispatched&&=(e.preventDefault(),e.stopPropagation(),!1)}onTouchEnd(t,n){let r=Date.now(),i=Object.keys(this.activeTouches).length;for(let a=0,o=n.changedTouches.length;a<o;a++){let o=n.changedTouches.item(a);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn(`move of an UNKNOWN touch`,o);continue}let s=this.activeTouches[o.identifier],c=Date.now()-s.initialTimeStamp;if(c<e.HOLD_DELAY&&Math.abs(s.initialPageX-fZ(s.rollingPageX))<30&&Math.abs(s.initialPageY-fZ(s.rollingPageY))<30){let e=this.newGestureEvent(w$.Tap,s.initialTarget);e.pageX=fZ(s.rollingPageX),e.pageY=fZ(s.rollingPageY),this.dispatchEvent(e)}else if(c>=e.HOLD_DELAY&&Math.abs(s.initialPageX-fZ(s.rollingPageX))<30&&Math.abs(s.initialPageY-fZ(s.rollingPageY))<30){let e=this.newGestureEvent(w$.Contextmenu,s.initialTarget);e.pageX=fZ(s.rollingPageX),e.pageY=fZ(s.rollingPageY),this.dispatchEvent(e)}else if(i===1){let e=fZ(s.rollingPageX),n=fZ(s.rollingPageY),i=fZ(s.rollingTimestamps)-s.rollingTimestamps[0],a=e-s.rollingPageX[0],o=n-s.rollingPageY[0],c=[...this.targets].filter(e=>s.initialTarget instanceof Node&&e.contains(s.initialTarget));this.inertia(t,c,r,Math.abs(a)/i,a>0?1:-1,e,Math.abs(o)/i,o>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(w$.End,s.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&=(n.preventDefault(),n.stopPropagation(),!1)}newGestureEvent(e,t){let n=document.createEvent(`CustomEvent`);return n.initEvent(e,!1,!0),n.initialTarget=t,n.tapCount=0,n}dispatchEvent(t){if(t.type===w$.Tap){let n=new Date().getTime(),r=0;r=n-this._lastSetTapCountTime>e.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=n,t.tapCount=r}else(t.type===w$.Change||t.type===w$.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let e of this.ignoreTargets)if(e.contains(t.initialTarget))return;let e=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let r=0,i=t.initialTarget;for(;i&&i!==n;)r++,i=i.parentElement;e.push([r,n])}e.sort((e,t)=>e[0]-t[0]);for(let[n,r]of e)r.dispatchEvent(t),this.dispatched=!0}}inertia(t,n,r,i,a,o,s,c,l){this.handle=p$(t,()=>{let u=Date.now(),d=u-r,f=0,p=0,m=!0;i+=e.SCROLL_FRICTION*d,s+=e.SCROLL_FRICTION*d,i>0&&(m=!1,f=a*i*d),s>0&&(m=!1,p=c*s*d);let h=this.newGestureEvent(w$.Change);h.translationX=f,h.translationY=p,n.forEach(e=>e.dispatchEvent(h)),m||this.inertia(t,n,u,i,a,o+f,s,c,l+p)})}onTouchMove(e){let t=Date.now();for(let n=0,r=e.changedTouches.length;n<r;n++){let r=e.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(r.identifier))){console.warn(`end of an UNKNOWN touch`,r);continue}let i=this.activeTouches[r.identifier],a=this.newGestureEvent(w$.Change,i.initialTarget);a.translationX=r.pageX-fZ(i.rollingPageX),a.translationY=r.pageY-fZ(i.rollingPageY),a.pageX=r.pageX,a.pageY=r.pageY,this.dispatchEvent(a),i.rollingPageX.length>3&&(i.rollingPageX.shift(),i.rollingPageY.shift(),i.rollingTimestamps.shift()),i.rollingPageX.push(r.pageX),i.rollingPageY.push(r.pageY),i.rollingTimestamps.push(t)}this.dispatched&&=(e.preventDefault(),e.stopPropagation(),!1)}};T$.SCROLL_FRICTION=-.005,T$.HOLD_DELAY=700,T$.CLEAR_TAP_COUNT_TIME=400,dX([C$],T$,`isTouchDevice`,1);var E$=T$,D$=class extends DZ{onclick(e,t){this._register(l$(e,v$.CLICK,n=>t(new UQ(a$(e),n))))}onmousedown(e,t){this._register(l$(e,v$.MOUSE_DOWN,n=>t(new UQ(a$(e),n))))}onmouseover(e,t){this._register(l$(e,v$.MOUSE_OVER,n=>t(new UQ(a$(e),n))))}onmouseleave(e,t){this._register(l$(e,v$.MOUSE_LEAVE,n=>t(new UQ(a$(e),n))))}onkeydown(e,t){this._register(l$(e,v$.KEY_DOWN,e=>t(new zQ(e))))}onkeyup(e,t){this._register(l$(e,v$.KEY_UP,e=>t(new zQ(e))))}oninput(e,t){this._register(l$(e,v$.INPUT,t))}onblur(e,t){this._register(l$(e,v$.BLUR,t))}onfocus(e,t){this._register(l$(e,v$.FOCUS,t))}onchange(e,t){this._register(l$(e,v$.CHANGE,t))}ignoreGesture(e){return E$.ignoreTarget(e)}},O$=11,k$=class extends D${constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement(`div`),this.bgDomNode.className=`arrow-background`,this.bgDomNode.style.position=`absolute`,this.bgDomNode.style.width=e.bgWidth+`px`,this.bgDomNode.style.height=e.bgHeight+`px`,typeof e.top<`u`&&(this.bgDomNode.style.top=`0px`),typeof e.left<`u`&&(this.bgDomNode.style.left=`0px`),typeof e.bottom<`u`&&(this.bgDomNode.style.bottom=`0px`),typeof e.right<`u`&&(this.bgDomNode.style.right=`0px`),this.domNode=document.createElement(`div`),this.domNode.className=e.className,this.domNode.style.position=`absolute`,this.domNode.style.width=O$+`px`,this.domNode.style.height=O$+`px`,typeof e.top<`u`&&(this.domNode.style.top=e.top+`px`),typeof e.left<`u`&&(this.domNode.style.left=e.left+`px`),typeof e.bottom<`u`&&(this.domNode.style.bottom=e.bottom+`px`),typeof e.right<`u`&&(this.domNode.style.right=e.right+`px`),this._pointerMoveMonitor=this._register(new S$),this._register(f$(this.bgDomNode,v$.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._register(f$(this.domNode,v$.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._pointerdownRepeatTimer=this._register(new m$),this._pointerdownScheduleRepeatTimer=this._register(new JQ)}_arrowPointerDown(e){e.target&&e.target instanceof Element&&(this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,a$(e))},200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault())}},A$=class e{constructor(e,t,n,r,i,a,o){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,n|=0,r|=0,i|=0,a|=0,o|=0),this.rawScrollLeft=r,this.rawScrollTop=o,t<0&&(t=0),r+t>n&&(r=n-t),r<0&&(r=0),i<0&&(i=0),o+i>a&&(o=a-i),o<0&&(o=0),this.width=t,this.scrollWidth=n,this.scrollLeft=r,this.height=i,this.scrollHeight=a,this.scrollTop=o}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(t,n){return new e(this._forceIntegerValues,typeof t.width<`u`?t.width:this.width,typeof t.scrollWidth<`u`?t.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,typeof t.height<`u`?t.height:this.height,typeof t.scrollHeight<`u`?t.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new e(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<`u`?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<`u`?t.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let n=this.width!==e.width,r=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,a=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:r,scrollLeftChanged:i,heightChanged:a,scrollHeightChanged:o,scrollTopChanged:s}}},j$=class extends DZ{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Z),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new A$(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&=(this._smoothScrolling.dispose(),null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let n=this._state.withScrollDimensions(e,t);this._setState(n,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&=(this._smoothScrolling.dispose(),null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>`u`?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>`u`?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;let r;r=t?new F$(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{let t=this._state.withScrollPosition(e);this._smoothScrolling=F$.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}},M$=class{constructor(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}};function N$(e,t){let n=t-e;return function(t){return e+n*L$(t)}}function P$(e,t,n){return function(r){return r<n?e(r/n):t((r-n)/(1-n))}}var F$=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.duration=r,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,n){if(Math.abs(e-t)>2.5*n){let r,i;return e<t?(r=e+.75*n,i=t-.75*n):(r=e-.75*n,i=t+.75*n),P$(N$(e,r),N$(i,t),.33)}return N$(e,t)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){let t=(e-this.startTime)/this.duration;return t<1?new M$(this.scrollLeft(t),this.scrollTop(t),!1):new M$(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,n,r){return e.start(t,n,r)}static start(t,n,r){r+=10;let i=Date.now()-10;return new e(t,n,i,r)}};function I$(e){return e**3}function L$(e){return 1-I$(1-e)}var R$=class extends DZ{constructor(e,t,n){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=n,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new JQ)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3||this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?` fade`:``)))}},z$=140,B$=class extends D${constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new R$(e.visibility,`visible scrollbar `+e.extraScrollbarClassName,`invisible scrollbar `+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new S$),this._shouldRender=!0,this.domNode=x$(document.createElement(`div`)),this.domNode.setAttribute(`role`,`presentation`),this.domNode.setAttribute(`aria-hidden`,`true`),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition(`absolute`),this._register(l$(this.domNode.domNode,v$.POINTER_DOWN,e=>this._domNodePointerDown(e)))}_createArrow(e){let t=this._register(new k$(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,n,r){this.slider=x$(document.createElement(`div`)),this.slider.setClassName(`slider`),this.slider.setPosition(`absolute`),this.slider.setTop(e),this.slider.setLeft(t),typeof n==`number`&&this.slider.setWidth(n),typeof r==`number`&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain(`strict`),this.domNode.domNode.appendChild(this.slider.domNode),this._register(l$(this.slider.domNode,v$.POINTER_DOWN,e=>{e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))})),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderPointerPosition(e);n<=i&&i<=r?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,n;if(e.target===this.domNode.domNode&&typeof e.offsetX==`number`&&typeof e.offsetY==`number`)t=e.offsetX,n=e.offsetY;else{let r=_$(this.domNode.domNode);t=e.pageX-r.left,n=e.pageY-r.top}let r=this._pointerDownRelativePosition(t,n);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),n=this._sliderOrthogonalPointerPosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName(`active`,!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{let i=this._sliderOrthogonalPointerPosition(e),a=Math.abs(i-n);if(gQ&&a>z$){this._setDesiredScrollPositionNow(r.getScrollPosition());return}let o=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(o))},()=>{this.slider.toggleClassName(`active`,!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},V$=class e{constructor(e,t,n,r,i,a){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=r,this._scrollSize=i,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){let t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,n,r,i){let a=Math.max(0,n-e),o=Math.max(0,a-2*t),s=r>0&&r>n;if(!s)return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(o),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*o/r))),l=(o-c)/(r-n),u=i*l;return{computedAvailableSize:Math.round(a),computedIsNeeded:s,computedSliderSize:Math.round(c),computedSliderRatio:l,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,n=this._scrollPosition;return t<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;let t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}},H$=class extends B${constructor(e,t,n){let r=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new V$(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,r.width,r.scrollWidth,i.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:`horizontal`,scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw Error(`horizontalHasArrows is not supported in xterm.js`);this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},U$=class extends B${constructor(e,t,n){let r=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:n,scrollbarState:new V$(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,r.height,r.scrollHeight,i.scrollTop),visibility:t.vertical,extraScrollbarClassName:`vertical`,scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw Error(`horizontalHasArrows is not supported in xterm.js`);this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},W$=500,G$=50,K$=!0,q$=class{constructor(e,t,n){this.timestamp=e,this.deltaX=t,this.deltaY=n,this.score=0}},J$=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,t=0,n=1,r=this._rear;do{let i=r===this._front?e:2**-n;if(e-=i,t+=this._memory[r].score*i,r===this._front)break;r=(this._capacity+r-1)%this._capacity,n++}while(1);return t<=.5}acceptStandardWheelEvent(e){if(tQ){let t=ZZ(a$(e.browserEvent));this.accept(Date.now(),e.deltaX*t,e.deltaY*t)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,n){let r=null,i=new q$(e,t,n);this._front===-1&&this._rear===-1?(this._memory[0]=i,this._front=0,this._rear=0):(r=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i),i.score=this._computeScore(i,r)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let n=.5;if(this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(n+=.25),t){let r=Math.abs(e.deltaX),i=Math.abs(e.deltaY),a=Math.abs(t.deltaX),o=Math.abs(t.deltaY),s=Math.max(Math.min(r,a),1),c=Math.max(Math.min(i,o),1),l=Math.max(r,a),u=Math.max(i,o);l%s===0&&u%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}};J$.INSTANCE=new J$;var Y$=J$,X$=class extends D${constructor(e,t,n){super(),this._onScroll=this._register(new Z),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Z),this.onWillScroll=this._onWillScroll.event,this._options=Q$(t),this._scrollable=n,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));let r={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new U$(this._scrollable,this._options,r)),this._horizontalScrollbar=this._register(new H$(this._scrollable,this._options,r)),this._domNode=document.createElement(`div`),this._domNode.className=`xterm-scrollable-element `+this._options.className,this._domNode.setAttribute(`role`,`presentation`),this._domNode.style.position=`relative`,this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=x$(document.createElement(`div`)),this._leftShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=x$(document.createElement(`div`)),this._topShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=x$(document.createElement(`div`)),this._topLeftShadowDomNode.setClassName(`shadow`),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onmouseleave(this._listenOnDomNode,e=>this._onMouseLeave(e)),this._hideTimeout=this._register(new JQ),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=SZ(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,_Q&&(this._options.className+=` mac`),this._domNode.className=`xterm-scrollable-element `+this._options.className}updateOptions(e){typeof e.handleMouseWheel<`u`&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<`u`&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<`u`&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<`u`&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<`u`&&(this._options.horizontal=e.horizontal),typeof e.vertical<`u`&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<`u`&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<`u`&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<`u`&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new WQ(e))}_setListeningToMouseWheel(e){this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=SZ(this._mouseWheelToDispose),e)&&this._mouseWheelToDispose.push(l$(this._listenOnDomNode,v$.MOUSE_WHEEL,e=>{this._onMouseWheel(new WQ(e))},{passive:!1}))}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=Y$.INSTANCE;K$&&t.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let r=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&i+r===0?i=r=0:Math.abs(r)>=Math.abs(i)?i=0:r=0),this._options.flipAxes&&([r,i]=[i,r]);let a=!_Q&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!i&&(i=r,r=0),e.browserEvent&&e.browserEvent.altKey&&(i*=this._options.fastScrollSensitivity,r*=this._options.fastScrollSensitivity);let o=this._scrollable.getFutureScrollPosition(),s={};if(r){let e=G$*r,t=o.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(s,t)}if(i){let e=G$*i,t=o.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(s,t)}s=this._scrollable.validateScrollPosition(s),(o.scrollLeft!==s.scrollLeft||o.scrollTop!==s.scrollTop)&&(K$&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(s):this._scrollable.setScrollPositionNow(s),n=!0)}let r=n;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0,r=n?` left`:``,i=t?` top`:``,a=n||t?` top-left-corner`:``;this._leftShadowDomNode.setClassName(`shadow${r}`),this._topShadowDomNode.setClassName(`shadow${i}`),this._topLeftShadowDomNode.setClassName(`shadow${a}${i}${r}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),W$)}},Z$=class extends X${constructor(e,t,n){super(e,t,n)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function Q$(e){let t={lazyRender:typeof e.lazyRender<`u`&&e.lazyRender,className:typeof e.className<`u`?e.className:``,useShadows:typeof e.useShadows<`u`?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<`u`?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<`u`&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<`u`&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<`u`&&e.alwaysConsumeMouseWheel,scrollYToX:typeof e.scrollYToX<`u`&&e.scrollYToX,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<`u`?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<`u`?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<`u`?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<`u`?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<`u`?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<`u`?e.listenOnDomNode:null,horizontal:typeof e.horizontal<`u`?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<`u`?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<`u`?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<`u`&&e.horizontalHasArrows,vertical:typeof e.vertical<`u`?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<`u`?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<`u`&&e.verticalHasArrows,verticalSliderSize:typeof e.verticalSliderSize<`u`?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<`u`&&e.scrollByPage};return t.horizontalSliderSize=typeof e.horizontalSliderSize<`u`?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<`u`?e.verticalSliderSize:t.verticalScrollbarSize,_Q&&(t.className+=` mac`),t}var $$=class extends DZ{constructor(e,t,n,r,i,a,o,s){super(),this._bufferService=n,this._optionsService=o,this._renderService=s,this._onRequestScrollLines=this._register(new Z),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let c=this._register(new j$({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:e=>p$(r.window,e)}));this._register(this._optionsService.onSpecificOptionChange(`smoothScrollDuration`,()=>{c.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new Z$(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},c)),this._register(this._optionsService.onMultipleOptionChange([`scrollSensitivity`,`fastScrollSensitivity`,`overviewRuler`],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(i.onProtocolChange(e=>{this._scrollableElement.updateOptions({handleMouseWheel:!(e&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(FZ.runAndSubscribe(a.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=a.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(wZ(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=r.mainDocument.createElement(`style`),t.appendChild(this._styleElement),this._register(wZ(()=>this._styleElement.remove())),this._register(FZ.runAndSubscribe(a.onChangeColors,()=>{this._styleElement.textContent=[`.xterm .xterm-scrollable-element > .scrollbar > .slider {`,` background: ${a.colors.scrollbarSliderBackground.css};`,`}`,`.xterm .xterm-scrollable-element > .scrollbar > .slider:hover {`,` background: ${a.colors.scrollbarSliderHoverBackground.css};`,`}`,`.xterm .xterm-scrollable-element > .scrollbar > .slider.active {`,` background: ${a.colors.scrollbarSliderActiveBackground.css};`,`}`].join(`
120
+ `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(e=>this._handleScroll(e)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),n=t-this._bufferService.buffer.ydisp;n!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(n)),this._isHandlingScroll=!1}};$$=dX([X(2,RX),X(3,ZX),X(4,zX),X(5,nZ),X(6,WX),X(7,$X)],$$);var e1=class extends DZ{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement(`div`),this._container.classList.add(`xterm-decoration-container`),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(e=>this._removeDecoration(e))),this._register(wZ(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement(`div`);t.classList.add(`xterm-decoration`),t.classList.toggle(`xterm-decoration-top-layer`,e?.options?.layer===`top`),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display=`none`),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display=`none`,e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.display=this._altBufferIsActive?`none`:`block`,this._altBufferIsActive||(n.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,n.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,n.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,n.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(n)}}_refreshXPosition(e,t=e.element){if(!t)return;let n=e.options.x??0;(e.options.anchor||`left`)===`right`?t.style.right=n?`${n*this._renderService.dimensions.css.cell.width}px`:``:t.style.left=n?`${n*this._renderService.dimensions.css.cell.width}px`:``}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};e1=dX([X(1,RX),X(2,ZX),X(3,qX),X(4,$X)],e1);var t1=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||`full`]&&t<=e.endBufferLine+this._linePadding[n||`full`]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},n1={full:0,left:0,center:0,right:0},r1={full:0,left:0,center:0,right:0},i1={full:0,left:0,center:0,right:0},a1=class extends DZ{constructor(e,t,n,r,i,a,o,s){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=r,this._renderService=i,this._optionsService=a,this._themeService=o,this._coreBrowserService=s,this._colorZoneStore=new t1,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-decoration-overview-ruler`),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(wZ(()=>this._canvas?.remove()));let c=this._canvas.getContext(`2d`);if(c)this._ctx=c;else throw Error(`Ctx cannot be null`);this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?`none`:`block`})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange(`overviewRuler`,()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);r1.full=this._canvas.width,r1.left=e,r1.center=t,r1.right=e,this._refreshDrawHeightConstants(),i1.full=1,i1.left=1,i1.center=1+r1.left,i1.right=1+r1.left+r1.center}_refreshDrawHeightConstants(){n1.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);n1.left=t,n1.center=t,n1.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n1.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n1.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n1.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n1.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let e of this._decorationService.decorations)this._colorZoneStore.addDecoration(e);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!==`full`&&this._renderColorZone(t);for(let t of e)t.position===`full`&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(i1[e.position||`full`],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-n1[e.position||`full`]/2),r1[e.position||`full`],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+n1[e.position||`full`]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};a1=dX([X(2,RX),X(3,qX),X(4,$X),X(5,WX),X(6,nZ),X(7,ZX)],a1);var Q;(e=>(e.NUL=`\0`,e.SOH=``,e.STX=``,e.ETX=``,e.EOT=``,e.ENQ=``,e.ACK=``,e.BEL=`\x07`,e.BS=`\b`,e.HT=` `,e.LF=`
121
+ `,e.VT=`\v`,e.FF=`\f`,e.CR=`\r`,e.SO=``,e.SI=``,e.DLE=``,e.DC1=``,e.DC2=``,e.DC3=``,e.DC4=``,e.NAK=``,e.SYN=``,e.ETB=``,e.CAN=``,e.EM=``,e.SUB=``,e.ESC=`\x1B`,e.FS=``,e.GS=``,e.RS=``,e.US=``,e.SP=` `,e.DEL=``))(Q||={});var o1;(e=>(e.PAD=`€`,e.HOP=``,e.BPH=`‚`,e.NBH=`ƒ`,e.IND=`„`,e.NEL=`…`,e.SSA=`†`,e.ESA=`‡`,e.HTS=`ˆ`,e.HTJ=`‰`,e.VTS=`Š`,e.PLD=`‹`,e.PLU=`Œ`,e.RI=``,e.SS2=`Ž`,e.SS3=``,e.DCS=``,e.PU1=`‘`,e.PU2=`’`,e.STS=`“`,e.CCH=`”`,e.MW=`•`,e.SPA=`–`,e.EPA=`—`,e.SOS=`˜`,e.SGCI=`™`,e.SCI=`š`,e.CSI=`›`,e.ST=`œ`,e.OSC=``,e.PM=`ž`,e.APC=`Ÿ`))(o1||={});var s1;(e=>e.ST=`${Q.ESC}\\`)(s1||={});var c1=class{constructor(e,t,n,r,i,a){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=a,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=``}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent=``,this._dataAlreadySent=``,this._compositionView.classList.add(`active`)}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(e){if(this._compositionView.classList.remove(`active`),this._isComposing=!1,e){let e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let t;e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,this._compositionPosition.start):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}},0)}else{this._isSendingComposition=!1;let e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,n=t.replace(e,``);this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.length<e.length?this._coreService.triggerDataEvent(`${Q.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),t=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=e*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+`px`,this._compositionView.style.top=n+`px`,this._compositionView.style.height=t+`px`,this._compositionView.style.lineHeight=t+`px`,this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+`px`;let i=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+`px`,this._textarea.style.top=n+`px`,this._textarea.style.width=Math.max(i.width,1)+`px`,this._textarea.style.height=Math.max(i.height,1)+`px`,this._textarea.style.lineHeight=i.height+`px`}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};c1=dX([X(2,RX),X(3,WX),X(4,BX),X(5,$X)],c1);var l1=0,u1=0,d1=0,f1=0,p1={css:`#00000000`,rgba:0},m1;(e=>{function t(e,t,n,r){return r===void 0?`#${y1(e)}${y1(t)}${y1(n)}`:`#${y1(e)}${y1(t)}${y1(n)}${y1(r)}`}e.toCss=t;function n(e,t,n,r=255){return(e<<24|t<<16|n<<8|r)>>>0}e.toRgba=n;function r(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}e.toColor=r})(m1||={});var h1;(e=>{function t(e,t){if(f1=(t.rgba&255)/255,f1===1)return{css:t.css,rgba:t.rgba};let n=t.rgba>>24&255,r=t.rgba>>16&255,i=t.rgba>>8&255,a=e.rgba>>24&255,o=e.rgba>>16&255,s=e.rgba>>8&255;return l1=a+Math.round((n-a)*f1),u1=o+Math.round((r-o)*f1),d1=s+Math.round((i-s)*f1),{css:m1.toCss(l1,u1,d1),rgba:m1.toRgba(l1,u1,d1)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=v1.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return m1.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[l1,u1,d1]=v1.toChannels(t),{css:m1.toCss(l1,u1,d1),rgba:t}}e.opaque=i;function a(e,t){return f1=Math.round(t*255),[l1,u1,d1]=v1.toChannels(e.rgba),{css:m1.toCss(l1,u1,d1,f1),rgba:m1.toRgba(l1,u1,d1,f1)}}e.opacity=a;function o(e,t){return f1=e.rgba&255,a(e,f1*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}e.toColorRGB=s})(h1||={});var g1;(e=>{let t,n;try{let e=document.createElement(`canvas`);e.width=1,e.height=1;let r=e.getContext(`2d`,{willReadFrequently:!0});r&&(t=r,t.globalCompositeOperation=`copy`,n=t.createLinearGradient(0,0,1,1))}catch{}function r(e){if(e.match(/#[\da-f]{3,8}/i))switch(e.length){case 4:return l1=parseInt(e.slice(1,2).repeat(2),16),u1=parseInt(e.slice(2,3).repeat(2),16),d1=parseInt(e.slice(3,4).repeat(2),16),m1.toColor(l1,u1,d1);case 5:return l1=parseInt(e.slice(1,2).repeat(2),16),u1=parseInt(e.slice(2,3).repeat(2),16),d1=parseInt(e.slice(3,4).repeat(2),16),f1=parseInt(e.slice(4,5).repeat(2),16),m1.toColor(l1,u1,d1,f1);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}let r=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(r)return l1=parseInt(r[1]),u1=parseInt(r[2]),d1=parseInt(r[3]),f1=Math.round((r[5]===void 0?1:parseFloat(r[5]))*255),m1.toColor(l1,u1,d1,f1);if(!t||!n||(t.fillStyle=n,t.fillStyle=e,typeof t.fillStyle!=`string`)||(t.fillRect(0,0,1,1),[l1,u1,d1,f1]=t.getImageData(0,0,1,1).data,f1!==255))throw Error(`css.toColor: Unsupported css format`);return{rgba:m1.toRgba(l1,u1,d1,f1),css:e}}e.toColor=r})(g1||={});var _1;(e=>{function t(e){return n(e>>16&255,e>>8&255,e&255)}e.relativeLuminance=t;function n(e,t,n){let r=e/255,i=t/255,a=n/255,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,c=a<=.03928?a/12.92:((a+.055)/1.055)**2.4;return o*.2126+s*.7152+c*.0722}e.relativeLuminance2=n})(_1||={});var v1;(e=>{function t(e,t){if(f1=(t&255)/255,f1===1)return t;let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=e>>24&255,o=e>>16&255,s=e>>8&255;return l1=a+Math.round((n-a)*f1),u1=o+Math.round((r-o)*f1),d1=s+Math.round((i-s)*f1),m1.toRgba(l1,u1,d1)}e.blend=t;function n(e,t,n){let a=_1.relativeLuminance(e>>8),o=_1.relativeLuminance(t>>8);if(b1(a,o)<n){if(o<a){let o=r(e,t,n),s=b1(a,_1.relativeLuminance(o>>8));if(s<n){let r=i(e,t,n);return s>b1(a,_1.relativeLuminance(r>>8))?o:r}return o}let s=i(e,t,n),c=b1(a,_1.relativeLuminance(s>>8));if(c<n){let i=r(e,t,n);return c>b1(a,_1.relativeLuminance(i>>8))?s:i}return s}}e.ensureContrastRatio=n;function r(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=b1(_1.relativeLuminance2(o,s,c),_1.relativeLuminance2(r,i,a));for(;l<n&&(o>0||s>0||c>0);)o-=Math.max(0,Math.ceil(o*.1)),s-=Math.max(0,Math.ceil(s*.1)),c-=Math.max(0,Math.ceil(c*.1)),l=b1(_1.relativeLuminance2(o,s,c),_1.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.reduceLuminance=r;function i(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=b1(_1.relativeLuminance2(o,s,c),_1.relativeLuminance2(r,i,a));for(;l<n&&(o<255||s<255||c<255);)o=Math.min(255,o+Math.ceil((255-o)*.1)),s=Math.min(255,s+Math.ceil((255-s)*.1)),c=Math.min(255,c+Math.ceil((255-c)*.1)),l=b1(_1.relativeLuminance2(o,s,c),_1.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.increaseLuminance=i;function a(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}e.toChannels=a})(v1||={});function y1(e){let t=e.toString(16);return t.length<2?`0`+t:t}function b1(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var x1=class extends kX{constructor(e,t,n){super(),this.content=0,this.combinedData=``,this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error(`not implemented`)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},S1=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new jX}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let n=[],r=t.translateToString(!0),i=0,a=0,o=0,s=t.getFg(0),c=t.getBg(0);for(let e=0;e<t.getTrimmedLength();e++)if(t.loadCell(e,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==s||this._workCell.bg!==c){if(e-i>1){let e=this._getJoinedRanges(r,o,a,t,i);for(let t=0;t<e.length;t++)n.push(e[t])}i=e,o=a,s=this._workCell.fg,c=this._workCell.bg}a+=this._workCell.getChars().length||OX.length}if(this._bufferService.cols-i>1){let e=this._getJoinedRanges(r,o,a,t,i);for(let t=0;t<e.length;t++)n.push(e[t])}return n}_getJoinedRanges(e,t,n,r,i){let a=e.substring(t,n),o=[];try{o=this._characterJoiners[0].handler(a)}catch(e){console.error(e)}for(let e=1;e<this._characterJoiners.length;e++)try{let t=this._characterJoiners[e].handler(a);for(let e=0;e<t.length;e++)S1._mergeRanges(o,t[e])}catch(e){console.error(e)}return this._stringRangesToCellRanges(o,r,i),o}_stringRangesToCellRanges(e,t,n){let r=0,i=!1,a=0,o=e[r];if(o){for(let s=n;s<this._bufferService.cols;s++){let n=t.getWidth(s),c=t.getString(s).length||OX.length;if(n!==0){if(!i&&o[0]<=a&&(o[0]=s,i=!0),o[1]<=a){if(o[1]=s,o=e[++r],!o)break;o[0]<=a?(o[0]=s,i=!0):i=!1}a+=c}}o&&(o[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(n){if(t[1]<=i[0])return e[r-1][1]=t[1],e;if(t[1]<=i[1])return e[r-1][1]=Math.max(t[1],i[1]),e.splice(r,1),e;e.splice(r,1),r--}else{if(t[1]<=i[0])return e.splice(r,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),n=!0);continue}}return n?e[e.length-1][1]=t[1]:e.push(t),e}};S1=dX([X(0,RX)],S1);function C1(e){return 57508<=e&&e<=57558}function sre(e){return 9472<=e&&e<=9631}function w1(e){return C1(e)||sre(e)}function T1(){return{css:{canvas:E1(),cell:E1()},device:{canvas:E1(),cell:E1(),char:{width:0,height:0,left:0,top:0}}}}function E1(){return{width:0,height:0}}var D1=class{constructor(e,t,n,r,i,a,o){this._document=e,this._characterJoinerService=t,this._optionsService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=a,this._themeService=o,this._workCell=new jX,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,n){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=n}createRow(e,t,n,r,i,a,o,s,c,l,u){let d=[],f=this._characterJoinerService.getJoinedCharacters(t),p=this._themeService.colors,m=e.getNoBgTrimmedLength();n&&m<a+1&&(m=a+1);let h,g=0,_=``,v=0,y=0,b=0,x=0,S=!1,C=0,w=!1,T=0,E=0,D=[],O=l!==-1&&u!==-1;for(let k=0;k<m;k++){e.loadCell(k,this._workCell);let m=this._workCell.getWidth();if(m===0)continue;let A=!1,j=k>=E,M=k,N=this._workCell;if(f.length>0&&k===f[0][0]&&j){let r=f.shift(),i=this._isCellInSelection(r[0],t);for(v=r[0]+1;v<r[1];v++)j&&=i===this._isCellInSelection(v,t);j&&=!n||a<r[0]||a>=r[1],j?(A=!0,N=new x1(this._workCell,e.translateToString(!0,r[0],r[1]),r[1]-r[0]),M=r[1]-1,m=N.getWidth()):E=r[1]}let P=this._isCellInSelection(k,t),ee=n&&k===a,F=O&&k>=l&&k<=u,I=!1;this._decorationService.forEachDecorationAtCell(k,t,void 0,e=>{I=!0});let te=N.getChars()||OX;if(te===` `&&(N.isUnderline()||N.isOverline())&&(te=`\xA0`),T=m*s-c.get(te,N.isBold(),N.isItalic()),!h)h=this._document.createElement(`span`);else if(g&&(P&&w||!P&&!w&&N.bg===y)&&(P&&w&&p.selectionForeground||N.fg===b)&&N.extended.ext===x&&F===S&&T===C&&!ee&&!A&&!I&&j){N.isInvisible()?_+=OX:_+=te,g++;continue}else g&&(h.textContent=_),h=this._document.createElement(`span`),g=0,_=``;if(y=N.bg,b=N.fg,x=N.extended.ext,S=F,C=T,w=P,A&&a>=k&&a<=M&&(a=k),!this._coreService.isCursorHidden&&ee&&this._coreService.isCursorInitialized){if(D.push(`xterm-cursor`),this._coreBrowserService.isFocused)o&&D.push(`xterm-cursor-blink`),D.push(r===`bar`?`xterm-cursor-bar`:r===`underline`?`xterm-cursor-underline`:`xterm-cursor-block`);else if(i)switch(i){case`outline`:D.push(`xterm-cursor-outline`);break;case`block`:D.push(`xterm-cursor-block`);break;case`bar`:D.push(`xterm-cursor-bar`);break;case`underline`:D.push(`xterm-cursor-underline`)}}if(N.isBold()&&D.push(`xterm-bold`),N.isItalic()&&D.push(`xterm-italic`),N.isDim()&&D.push(`xterm-dim`),_=N.isInvisible()?OX:N.getChars()||OX,N.isUnderline()&&(D.push(`xterm-underline-${N.extended.underlineStyle}`),_===` `&&(_=`\xA0`),!N.isUnderlineColorDefault())){if(N.isUnderlineColorRGB())h.style.textDecorationColor=`rgb(${kX.toColorRGB(N.getUnderlineColor()).join(`,`)})`;else{let e=N.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&N.isBold()&&e<8&&(e+=8),h.style.textDecorationColor=p.ansi[e].css}}N.isOverline()&&(D.push(`xterm-overline`),_===` `&&(_=`\xA0`)),N.isStrikethrough()&&D.push(`xterm-strikethrough`),F&&(h.style.textDecoration=`underline`);let ne=N.getFgColor(),re=N.getFgColorMode(),ie=N.getBgColor(),ae=N.getBgColorMode(),oe=!!N.isInverse();if(oe){let e=ne;ne=ie,ie=e;let t=re;re=ae,ae=t}let se,ce,le=!1;this._decorationService.forEachDecorationAtCell(k,t,void 0,e=>{e.options.layer!==`top`&&le||(e.backgroundColorRGB&&(ae=50331648,ie=e.backgroundColorRGB.rgba>>8&16777215,se=e.backgroundColorRGB),e.foregroundColorRGB&&(re=50331648,ne=e.foregroundColorRGB.rgba>>8&16777215,ce=e.foregroundColorRGB),le=e.options.layer===`top`)}),!le&&P&&(se=this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque,ie=se.rgba>>8&16777215,ae=50331648,le=!0,p.selectionForeground&&(re=50331648,ne=p.selectionForeground.rgba>>8&16777215,ce=p.selectionForeground)),le&&D.push(`xterm-decoration-top`);let ue;switch(ae){case 16777216:case 33554432:ue=p.ansi[ie],D.push(`xterm-bg-${ie}`);break;case 50331648:ue=m1.toColor(ie>>16,ie>>8&255,ie&255),this._addStyle(h,`background-color:#${O1((ie>>>0).toString(16),`0`,6)}`);break;default:oe?(ue=p.foreground,D.push(`xterm-bg-257`)):ue=p.background}switch(se||N.isDim()&&(se=h1.multiplyOpacity(ue,.5)),re){case 16777216:case 33554432:N.isBold()&&ne<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ne+=8),this._applyMinimumContrast(h,ue,p.ansi[ne],N,se,void 0)||D.push(`xterm-fg-${ne}`);break;case 50331648:let e=m1.toColor(ne>>16&255,ne>>8&255,ne&255);this._applyMinimumContrast(h,ue,e,N,se,ce)||this._addStyle(h,`color:#${O1(ne.toString(16),`0`,6)}`);break;default:this._applyMinimumContrast(h,ue,p.foreground,N,se,ce)||oe&&D.push(`xterm-fg-257`)}D.length&&=(h.className=D.join(` `),0),!ee&&!A&&!I&&j?g++:h.textContent=_,T!==this.defaultSpacing&&(h.style.letterSpacing=`${T}px`),d.push(h),k=M}return h&&g&&(h.textContent=_),d}_applyMinimumContrast(e,t,n,r,i,a){if(this._optionsService.rawOptions.minimumContrastRatio===1||w1(r.getCode()))return!1;let o=this._getContrastCache(r),s;if(!i&&!a&&(s=o.getColor(t.rgba,n.rgba)),s===void 0){let e=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);s=h1.ensureContrastRatio(i||t,a||n,e),o.setColor((i||t).rgba,(a||n).rgba,s??null)}return s?(this._addStyle(e,`color:${s.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute(`style`,`${e.getAttribute(`style`)||``}${t};`)}_isCellInSelection(e,t){let n=this._selectionStart,r=this._selectionEnd;return!n||!r?!1:this._columnSelectMode?n[0]<=r[0]?e>=n[0]&&t>=n[1]&&e<r[0]&&t<=r[1]:e<n[0]&&t>=n[1]&&e>=r[0]&&t<=r[1]:t>n[1]&&t<r[1]||n[1]===r[1]&&t===n[1]&&e>=n[0]&&e<r[0]||n[1]<r[1]&&t===r[1]&&e<r[0]||n[1]<r[1]&&t===n[1]&&e>=n[0]}};D1=dX([X(1,tZ),X(2,WX),X(3,ZX),X(4,BX),X(5,qX),X(6,nZ)],D1);function O1(e,t,n){for(;e.length<n;)e=t+e;return e}var k1=class{constructor(e,t){this._flat=new Float32Array(256),this._font=``,this._fontSize=0,this._weight=`normal`,this._weightBold=`bold`,this._measureElements=[],this._container=e.createElement(`div`),this._container.classList.add(`xterm-width-cache-measure-container`),this._container.setAttribute(`aria-hidden`,`true`),this._container.style.whiteSpace=`pre`,this._container.style.fontKerning=`none`;let n=e.createElement(`span`);n.classList.add(`xterm-char-measure-element`);let r=e.createElement(`span`);r.classList.add(`xterm-char-measure-element`),r.style.fontWeight=`bold`;let i=e.createElement(`span`);i.classList.add(`xterm-char-measure-element`),i.style.fontStyle=`italic`;let a=e.createElement(`span`);a.classList.add(`xterm-char-measure-element`),a.style.fontWeight=`bold`,a.style.fontStyle=`italic`,this._measureElements=[n,r,i,a],this._container.appendChild(n),this._container.appendChild(r),this._container.appendChild(i),this._container.appendChild(a),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,n,r){e===this._font&&t===this._fontSize&&n===this._weight&&r===this._weightBold||(this._font=e,this._fontSize=t,this._weight=n,this._weightBold=r,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${n}`,this._measureElements[1].style.fontWeight=`${r}`,this._measureElements[2].style.fontWeight=`${n}`,this._measureElements[3].style.fontWeight=`${r}`,this.clear())}get(e,t,n){let r=0;if(!t&&!n&&e.length===1&&(r=e.charCodeAt(0))<256){if(this._flat[r]!==-9999)return this._flat[r];let t=this._measure(e,0);return t>0&&(this._flat[r]=t),t}let i=e;t&&(i+=`B`),n&&(i+=`I`);let a=this._holey.get(i);if(a===void 0){let r=0;t&&(r|=1),n&&(r|=2),a=this._measure(e,r),a>0&&this._holey.set(i,a)}return a}_measure(e,t){let n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}},A1=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n,r=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1]){this.clear();return}let i=e.buffers.active.ydisp,a=t[1]-i,o=n[1]-i,s=Math.max(a,0),c=Math.min(o,e.rows-1);s>=e.rows||c<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=a,this.viewportEndRow=o,this.viewportCappedStartRow=s,this.viewportCappedEndRow=c,this.startCol=t[0],this.endCol=n[0])}isCellSelected(e,t,n){return this.hasSelection?(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t<this.endCol&&n<=this.viewportCappedEndRow:t<this.startCol&&n>=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol):!1}};function j1(){return new A1}var M1=`xterm-dom-renderer-owner-`,N1=`xterm-rows`,P1=`xterm-fg-`,F1=`xterm-bg-`,I1=`xterm-focus`,L1=`xterm-selection`,R1=1,z1=class extends DZ{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=a,this._linkifier2=o,this._charSizeService=c,this._optionsService=l,this._bufferService=u,this._coreService=d,this._coreBrowserService=f,this._themeService=p,this._terminalClass=R1++,this._rowElements=[],this._selectionRenderModel=j1(),this.onRequestRedraw=this._register(new Z).event,this._rowContainer=this._document.createElement(`div`),this._rowContainer.classList.add(N1),this._rowContainer.style.lineHeight=`normal`,this._rowContainer.setAttribute(`aria-hidden`,`true`),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement(`div`),this._selectionContainer.classList.add(L1),this._selectionContainer.setAttribute(`aria-hidden`,`true`),this.dimensions=T1(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(e=>this._injectCss(e))),this._injectCss(this._themeService.colors),this._rowFactory=s.createInstance(D1,document),this._element.classList.add(M1+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(e=>this._handleLinkHover(e))),this._register(this._linkifier2.onHideLinkUnderline(e=>this._handleLinkLeave(e))),this._register(wZ(()=>{this._element.classList.remove(M1+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new k1(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let e of this._rowElements)e.style.width=`${this.dimensions.css.canvas.width}px`,e.style.height=`${this.dimensions.css.cell.height}px`,e.style.lineHeight=`${this.dimensions.css.cell.height}px`,e.style.overflow=`hidden`;this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${N1} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${N1} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${N1} .xterm-dim { color: ${h1.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let n=`blink_underline_${this._terminalClass}`,r=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${r} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${N1}.${I1} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${N1}.${I1} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${N1}.${I1} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${N1} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${N1} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${N1} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${N1} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${N1} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${L1} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L1} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L1} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[n,r]of e.ansi.entries())t+=`${this._terminalSelector} .${P1}${n} { color: ${r.css}; }${this._terminalSelector} .${P1}${n}.xterm-dim { color: ${h1.multiplyOpacity(r,.5).css}; }${this._terminalSelector} .${F1}${n} { background-color: ${r.css}; }`;t+=`${this._terminalSelector} .${P1}257 { color: ${h1.opaque(e.background).css}; }${this._terminalSelector} .${P1}257.xterm-dim { color: ${h1.multiplyOpacity(h1.opaque(e.background),.5).css}; }${this._terminalSelector} .${F1}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get(`W`,!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let e=this._rowElements.length;e<=t;e++){let e=this._document.createElement(`div`);this._rowContainer.appendChild(e),this._rowElements.push(e)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(I1),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(I1),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,n){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,n),!this._selectionRenderModel.hasSelection))return;let r=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,a=this._selectionRenderModel.viewportCappedStartRow,o=this._selectionRenderModel.viewportCappedEndRow,s=this._document.createDocumentFragment();if(n){let n=e[0]>t[0];s.appendChild(this._createSelectionElement(a,n?t[0]:e[0],n?e[0]:t[0],o-a+1))}else{let n=r===a?e[0]:0,c=a===i?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,n,c));let l=o-a-1;if(s.appendChild(this._createSelectionElement(a+1,0,this._bufferService.cols,l)),a!==o){let e=i===o?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(o,0,e))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,n,r=1){let i=this._document.createElement(`div`),a=t*this.dimensions.css.cell.width,o=this.dimensions.css.cell.width*(n-t);return a+o>this.dimensions.css.canvas.width&&(o=this.dimensions.css.canvas.width-a),i.style.height=`${r*this.dimensions.css.cell.height}px`,i.style.top=`${e*this.dimensions.css.cell.height}px`,i.style.left=`${a}px`,i.style.width=`${o}px`,i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let n=this._bufferService.buffer,r=n.ybase+n.y,i=Math.min(n.x,this._bufferService.cols-1),a=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,o=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let c=e;c<=t;c++){let e=c+n.ydisp,t=this._rowElements[c],l=n.lines.get(e);if(!t||!l)break;t.replaceChildren(...this._rowFactory.createRow(l,e,e===r,o,s,i,a,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${M1}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,r,i,a){n<0&&(e=0),r<0&&(t=0);let o=this._bufferService.rows-1;n=Math.max(Math.min(n,o),0),r=Math.max(Math.min(r,o),0),i=Math.min(i,this._bufferService.cols);let s=this._bufferService.buffer,c=s.ybase+s.y,l=Math.min(s.x,i-1),u=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let o=n;o<=r;++o){let p=o+s.ydisp,m=this._rowElements[o],h=s.lines.get(p);if(!m||!h)break;m.replaceChildren(...this._rowFactory.createRow(h,p,p===c,d,f,l,u,this.dimensions.css.cell.width,this._widthCache,a?o===n?e:0:-1,a?(o===r?t:i)-1:-1))}}};z1=dX([X(7,HX),X(8,XX),X(9,WX),X(10,RX),X(11,BX),X(12,ZX),X(13,nZ)],z1);var B1=class extends DZ{constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this._register(new Z),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new U1(this._optionsService))}catch{this._measureStrategy=this._register(new H1(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange([`fontFamily`,`fontSize`],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};B1=dX([X(2,WX)],B1);var V1=class extends DZ{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},H1=class extends V1{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,this._measureElement=this._document.createElement(`span`),this._measureElement.classList.add(`xterm-char-measure-element`),this._measureElement.textContent=`W`.repeat(32),this._measureElement.setAttribute(`aria-hidden`,`true`),this._measureElement.style.whiteSpace=`pre`,this._measureElement.style.fontKerning=`none`,this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},U1=class extends V1{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext(`2d`);let t=this._ctx.measureText(`W`);if(!(`width`in t&&`fontBoundingBoxAscent`in t&&`fontBoundingBoxDescent`in t))throw Error(`Required font metrics not supported`)}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText(`W`);return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},W1=class extends DZ{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new G1(this._window)),this._onDprChange=this._register(new Z),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new Z),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(e=>this._screenDprMonitor.setWindow(e))),this._register(FZ.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(l$(this._textarea,`focus`,()=>this._isFocused=!0)),this._register(l$(this._textarea,`blur`,()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},G1=class extends DZ{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new OZ),this._onDprChange=this._register(new Z),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(wZ(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=l$(this._parentWindow,`resize`,()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},K1=class extends DZ{constructor(){super(),this.linkProviders=[],this._register(wZ(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function q1(e,t,n){let r=n.getBoundingClientRect(),i=e.getComputedStyle(n),a=parseInt(i.getPropertyValue(`padding-left`)),o=parseInt(i.getPropertyValue(`padding-top`));return[t.clientX-r.left-a,t.clientY-r.top-o]}function J1(e,t,n,r,i,a,o,s,c){if(!a)return;let l=q1(e,t,n);if(l)return l[0]=Math.ceil((l[0]+(c?o/2:0))/o),l[1]=Math.ceil(l[1]/s),l[0]=Math.min(Math.max(l[0],1),r+ +!!c),l[1]=Math.min(Math.max(l[1],1),i),l}var Y1=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,r,i){return J1(window,e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let n=q1(window,e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};Y1=dX([X(0,$X),X(1,XX)],Y1);var X1=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&=(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()),this._animationFrame}refresh(e,t,n){this._rowCount=n,e=e===void 0?0:e,t=t===void 0?this._rowCount-1:t,this._rowStart=this._rowStart===void 0?e:Math.min(this._rowStart,e),this._rowEnd=this._rowEnd===void 0?t:Math.max(this._rowEnd,t),!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},Z1={};uX(Z1,{getSafariVersion:()=>i0,isChromeOS:()=>u0,isFirefox:()=>t0,isIpad:()=>o0,isIphone:()=>s0,isLegacyEdge:()=>n0,isLinux:()=>l0,isMac:()=>a0,isNode:()=>Q1,isSafari:()=>r0,isWindows:()=>c0});var Q1=typeof process<`u`&&`title`in process,$1=Q1?`node`:navigator.userAgent,e0=Q1?`node`:navigator.platform,t0=$1.includes(`Firefox`),n0=$1.includes(`Edge`),r0=/^((?!chrome|android).)*safari/i.test($1);function i0(){if(!r0)return 0;let e=$1.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var a0=[`Macintosh`,`MacIntel`,`MacPPC`,`Mac68K`].includes(e0),o0=e0===`iPad`,s0=e0===`iPhone`,c0=[`Windows`,`Win16`,`Win32`,`WinCE`].includes(e0),l0=e0.indexOf(`Linux`)>=0,u0=/\bCrOS\b/.test($1),d0=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&=(this._cancelCallback(this._idleCallback),void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||=this._requestCallback(this._process.bind(this))}_process(e){this._idleCallback=void 0;let t=0,n=0,r=e.timeRemaining(),i=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),n=Math.max(t,n),i=e.timeRemaining(),n*1.5>i){r-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=i}this.clear()}},f0=class extends d0{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},p0=class extends d0{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},m0=!Q1&&`requestIdleCallback`in window?p0:f0,h0=class{constructor(){this._queue=new m0}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},g0=class extends DZ{constructor(e,t,n,r,i,a,o,s,c){super(),this._rowCount=e,this._optionsService=n,this._charSizeService=r,this._coreService=i,this._coreBrowserService=s,this._renderer=this._register(new OZ),this._pausedResizeTask=new h0,this._observerDisposable=this._register(new OZ),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new Z),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new Z),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new Z),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new Z),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new X1((e,t)=>this._renderRows(e,t),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new _0(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(wZ(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(o.onResize(()=>this._fullRefresh())),this._register(o.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(a.onDecorationRegistered(()=>this._fullRefresh())),this._register(a.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange([`customGlyphs`,`drawBoldTextInBrightColors`,`letterSpacing`,`lineHeight`,`fontFamily`,`fontSize`,`fontWeight`,`fontWeightBold`,`minimumContrastRatio`,`rescaleOverlappingGlyphs`],()=>{this.clear(),this.handleResize(o.cols,o.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange([`cursorBlink`,`cursorStyle`],()=>this.refreshRows(o.buffer.y,o.buffer.y,!0))),this._register(c.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(e=>this._registerIntersectionObserver(e,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if(`IntersectionObserver`in e){let n=new e.IntersectionObserver(e=>this._handleIntersectionChange(e[e.length-1]),{threshold:0});n.observe(t),this._observerDisposable.value=wZ(()=>n.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,n=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let r=this._syncOutputHandler.flush();r&&(e=Math.min(e,r.start),t=Math.max(t,r.end)),n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&=(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(e=>this.refreshRows(e.start,e.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,n){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,this._renderer.value?.handleSelectionChanged(e,t,n)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};g0=dX([X(2,WX),X(3,XX),X(4,BX),X(5,qX),X(6,RX),X(7,ZX),X(8,nZ)],g0);var _0=class{constructor(e,t,n){this._coreBrowserService=e,this._coreService=t,this._onTimeout=n,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function v0(e,t,n,r){let i=n.buffer.x,a=n.buffer.y;if(!n.buffer.hasScrollback)return x0(i,a,e,t,n,r)+S0(a,t,n,r)+C0(i,a,e,t,n,r);let o;if(a===t)return o=i>e?`D`:`C`,A0(Math.abs(i-e),k0(o,r));o=a>t?`D`:`C`;let s=Math.abs(a-t);return A0(b0(a>t?e:i,n)+(s-1)*n.cols+1+y0(a>t?i:e,n),k0(o,r))}function y0(e,t){return e-1}function b0(e,t){return t.cols-e}function x0(e,t,n,r,i,a){return S0(t,r,i,a).length===0?``:A0(O0(e,t,e,t-T0(t,i),!1,i).length,k0(`D`,a))}function S0(e,t,n,r){let i=e-T0(e,n),a=t-T0(t,n);return A0(Math.abs(i-a)-w0(e,t,n),k0(D0(e,t),r))}function C0(e,t,n,r,i,a){let o;o=S0(t,r,i,a).length>0?r-T0(r,i):t;let s=r,c=E0(e,t,n,r,i,a);return A0(O0(e,o,n,s,c===`C`,i).length,k0(c,a))}function w0(e,t,n){let r=0,i=e-T0(e,n),a=t-T0(t,n);for(let o=0;o<Math.abs(i-a);o++){let a=D0(e,t)===`A`?-1:1;n.buffer.lines.get(i+a*o)?.isWrapped&&r++}return r}function T0(e,t){let n=0,r=t.buffer.lines.get(e),i=r?.isWrapped;for(;i&&e>=0&&e<t.rows;)n++,r=t.buffer.lines.get(--e),i=r?.isWrapped;return n}function E0(e,t,n,r,i,a){let o;return o=S0(n,r,i,a).length>0?r-T0(r,i):t,e<n&&o<=r||e>=n&&o<r?`C`:`D`}function D0(e,t){return e>t?`A`:`B`}function O0(e,t,n,r,i,a){let o=e,s=t,c=``;for(;(o!==n||s!==r)&&s>=0&&s<a.buffer.lines.length;)o+=i?1:-1,i&&o>a.cols-1?(c+=a.buffer.translateBufferLineToString(s,!1,e,o),o=0,e=0,s++):!i&&o<0&&(c+=a.buffer.translateBufferLineToString(s,!1,0,e+1),o=a.cols-1,e=o,s--);return c+a.buffer.translateBufferLineToString(s,!1,e,o)}function k0(e,t){let n=t?`O`:`[`;return Q.ESC+n+e}function A0(e,t){e=Math.floor(e);let n=``;for(let r=0;r<e;r++)n+=t;return n}var j0=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function M0(e,t){if(e.start.y>e.end.y)throw Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var N0=50,P0=15,F0=50,I0=500,L0=RegExp(`\xA0`,`g`),R0=class extends DZ{constructor(e,t,n,r,i,a,o,s,c){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=r,this._coreService=i,this._mouseService=a,this._optionsService=o,this._renderService=s,this._coreBrowserService=c,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new jX,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new Z),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new Z),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new Z),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new Z),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=e=>this._handleMouseMove(e),this._mouseUpListener=e=>this._handleMouseUp(e),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(e=>this._handleTrim(e)),this._register(this._bufferService.buffers.onBufferActivate(e=>this._handleBufferActivate(e))),this.enable(),this._model=new j0(this._bufferService),this._activeSelectionMode=0,this._register(wZ(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(e=>{e.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return``;let n=this._bufferService.buffer,r=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return``;let i=e[0]<t[0]?e[0]:t[0],a=e[0]<t[0]?t[0]:e[0];for(let o=e[1];o<=t[1];o++){let e=n.translateBufferLineToString(o,!0,i,a);r.push(e)}}else{let i=e[1]===t[1]?t[0]:void 0;r.push(n.translateBufferLineToString(e[1],!0,e[0],i));for(let i=e[1]+1;i<=t[1]-1;i++){let e=n.lines.get(i),t=n.translateBufferLineToString(i,!0);e?.isWrapped?r[r.length-1]+=t:r.push(t)}if(e[1]!==t[1]){let e=n.lines.get(t[1]),i=n.translateBufferLineToString(t[1],!0,0,t[0]);e&&e.isWrapped?r[r.length-1]+=i:r.push(i)}}return r.map(e=>e.replace(L0,` `)).join(c0?`\r
122
+ `:`
123
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh()),l0&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r||!t?!1:this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r?!1:this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let n=this._linkifier.currentLink?.link?.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=M0(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=q1(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-N0),N0),t/=N0,t/Math.abs(t)+Math.round(t*(P0-1)))}shouldForceSelection(e){return a0?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener(`mouseup`,this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),F0)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener(`mousemove`,this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener(`mouseup`,this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(a0&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let n=this._bufferService.buffer;if(this._model.selectionEnd[1]<n.lines.length){let e=n.lines.get(this._model.selectionEnd[1]);e&&e.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}t&&t[0]===this._model.selectionEnd[0]&&t[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<I0&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let t=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(t&&t[0]!==void 0&&t[1]!==void 0){let e=v0(t[0]-1,t[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(e,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,n=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);n?!e||!t||this._oldSelectionStart&&this._oldSelectionEnd&&e[0]===this._oldSelectionStart[0]&&e[1]===this._oldSelectionStart[1]&&t[0]===this._oldSelectionEnd[0]&&t[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(e,t,n):this._oldHasSelection&&this._fireOnSelectionChange(e,t,n)}_fireOnSelectionChange(e,t,n){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=n,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(e=>this._handleTrim(e))}_convertViewportColToCharacterIndex(e,t){let n=t;for(let r=0;t>=r;r++){let i=e.loadCell(r,this._workCell).getChars().length;this._workCell.getWidth()===0?n--:i>1&&t!==r&&(n+=i-1)}return n}setSelection(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,n=!0,r=!0){if(e[0]>=this._bufferService.cols)return;let i=this._bufferService.buffer,a=i.lines.get(e[1]);if(!a)return;let o=i.translateBufferLineToString(e[1],!1),s=this._convertViewportColToCharacterIndex(a,e[0]),c=s,l=e[0]-s,u=0,d=0,f=0,p=0;if(o.charAt(s)===` `){for(;s>0&&o.charAt(s-1)===` `;)s--;for(;c<o.length&&o.charAt(c+1)===` `;)c++}else{let t=e[0],n=e[0];a.getWidth(t)===0&&(u++,t--),a.getWidth(n)===2&&(d++,n++);let r=a.getString(n).length;for(r>1&&(p+=r-1,c+=r-1);t>0&&s>0&&!this._isCharWordSeparator(a.loadCell(t-1,this._workCell));){a.loadCell(t-1,this._workCell);let e=this._workCell.getChars().length;this._workCell.getWidth()===0?(u++,t--):e>1&&(f+=e-1,s-=e-1),s--,t--}for(;n<a.length&&c+1<o.length&&!this._isCharWordSeparator(a.loadCell(n+1,this._workCell));){a.loadCell(n+1,this._workCell);let e=this._workCell.getChars().length;this._workCell.getWidth()===2?(d++,n++):e>1&&(p+=e-1,c+=e-1),c++,n++}}c++;let m=s+l-u+f,h=Math.min(this._bufferService.cols,c-s+u+d-f-p);if(t||o.slice(s,c).trim()!==``){if(n&&m===0&&a.getCodePoint(0)!==32){let t=i.lines.get(e[1]-1);if(t&&a.isWrapped&&t.getCodePoint(this._bufferService.cols-1)!==32){let t=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(t){let e=this._bufferService.cols-t.start;m-=e,h+=e}}}if(r&&m+h===this._bufferService.cols&&a.getCodePoint(this._bufferService.cols-1)!==32){let t=i.lines.get(e[1]+1);if(t?.isWrapped&&t.getCodePoint(0)!==32){let t=this._getWordAt([0,e[1]+1],!1,!1,!0);t&&(h+=t.length)}}return{start:m,length:h}}}_selectWordAt(e,t){let n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let n=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}}_isCharWordSeparator(e){return e.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),n={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=M0(n,this._bufferService.cols)}};R0=dX([X(3,RX),X(4,BX),X(5,QX),X(6,WX),X(7,$X),X(8,ZX)],R0);var z0=class{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},B0=class{constructor(){this._color=new z0,this._css=new z0}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},V0=Object.freeze((()=>{let e=[g1.toColor(`#2e3436`),g1.toColor(`#cc0000`),g1.toColor(`#4e9a06`),g1.toColor(`#c4a000`),g1.toColor(`#3465a4`),g1.toColor(`#75507b`),g1.toColor(`#06989a`),g1.toColor(`#d3d7cf`),g1.toColor(`#555753`),g1.toColor(`#ef2929`),g1.toColor(`#8ae234`),g1.toColor(`#fce94f`),g1.toColor(`#729fcf`),g1.toColor(`#ad7fa8`),g1.toColor(`#34e2e2`),g1.toColor(`#eeeeec`)],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let r=t[n/36%6|0],i=t[n/6%6|0],a=t[n%6];e.push({css:m1.toCss(r,i,a),rgba:m1.toRgba(r,i,a)})}for(let t=0;t<24;t++){let n=8+t*10;e.push({css:m1.toCss(n,n,n),rgba:m1.toRgba(n,n,n)})}return e})()),H0=g1.toColor(`#ffffff`),U0=g1.toColor(`#000000`),W0=g1.toColor(`#ffffff`),G0=U0,K0={css:`rgba(255, 255, 255, 0.3)`,rgba:4294967117},q0=H0,J0=class extends DZ{constructor(e){super(),this._optionsService=e,this._contrastCache=new B0,this._halfContrastCache=new B0,this._onChangeColors=this._register(new Z),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:H0,background:U0,cursor:W0,cursorAccent:G0,selectionForeground:void 0,selectionBackgroundTransparent:K0,selectionBackgroundOpaque:h1.blend(U0,K0),selectionInactiveBackgroundTransparent:K0,selectionInactiveBackgroundOpaque:h1.blend(U0,K0),scrollbarSliderBackground:h1.opacity(H0,.2),scrollbarSliderHoverBackground:h1.opacity(H0,.4),scrollbarSliderActiveBackground:h1.opacity(H0,.5),overviewRulerBorder:H0,ansi:V0.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange(`minimumContrastRatio`,()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange(`theme`,()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=Y0(e.foreground,H0),t.background=Y0(e.background,U0),t.cursor=h1.blend(t.background,Y0(e.cursor,W0)),t.cursorAccent=h1.blend(t.background,Y0(e.cursorAccent,G0)),t.selectionBackgroundTransparent=Y0(e.selectionBackground,K0),t.selectionBackgroundOpaque=h1.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=Y0(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=h1.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?Y0(e.selectionForeground,p1):void 0,t.selectionForeground===p1&&(t.selectionForeground=void 0),h1.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=h1.opacity(t.selectionBackgroundTransparent,.3)),h1.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=h1.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=Y0(e.scrollbarSliderBackground,h1.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=Y0(e.scrollbarSliderHoverBackground,h1.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=Y0(e.scrollbarSliderActiveBackground,h1.opacity(t.foreground,.5)),t.overviewRulerBorder=Y0(e.overviewRulerBorder,q0),t.ansi=V0.slice(),t.ansi[0]=Y0(e.black,V0[0]),t.ansi[1]=Y0(e.red,V0[1]),t.ansi[2]=Y0(e.green,V0[2]),t.ansi[3]=Y0(e.yellow,V0[3]),t.ansi[4]=Y0(e.blue,V0[4]),t.ansi[5]=Y0(e.magenta,V0[5]),t.ansi[6]=Y0(e.cyan,V0[6]),t.ansi[7]=Y0(e.white,V0[7]),t.ansi[8]=Y0(e.brightBlack,V0[8]),t.ansi[9]=Y0(e.brightRed,V0[9]),t.ansi[10]=Y0(e.brightGreen,V0[10]),t.ansi[11]=Y0(e.brightYellow,V0[11]),t.ansi[12]=Y0(e.brightBlue,V0[12]),t.ansi[13]=Y0(e.brightMagenta,V0[13]),t.ansi[14]=Y0(e.brightCyan,V0[14]),t.ansi[15]=Y0(e.brightWhite,V0[15]),e.extendedAnsi){let n=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let r=0;r<n;r++)t.ansi[r+16]=Y0(e.extendedAnsi[r],V0[r+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0)for(let e=0;e<this._restoreColors.ansi.length;++e)this._colors.ansi[e]=this._restoreColors.ansi[e];else switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};J0=dX([X(0,WX)],J0);function Y0(e,t){if(e!==void 0)try{return g1.toColor(e)}catch{}return t}var X0=class{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){let n=this._entries.get(e);return this._entries.set(e,t),n}forEach(e){for(let[t,n]of this._entries.entries())e(t,n)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},Z0=class{constructor(){this._services=new X0,this._services.set(HX,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let n=FX(e).sort((e,t)=>e.index-t.index),r=[];for(let t of n){let n=this._services.get(t.id);if(!n)throw Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id._id}.`);r.push(n)}let i=n.length>0?n[0].index:t.length;if(t.length!==i)throw Error(`[createInstance] First service dependency of ${e.name} at position ${i+1} conflicts with ${t.length} static arguments`);return new e(...t,...r)}},Q0={trace:0,debug:1,info:2,warn:3,error:4,off:5},$0=`xterm.js: `,e2=class extends DZ{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),t2=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=Q0[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]==`function`&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?``:$0)+t,...n)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};e2=dX([X(0,WX)],e2);var t2,n2=class extends DZ{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new Z),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new Z),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new Z),this.onTrim=this.onTrimEmitter.event,this._array=Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=Array(e);for(let n=0;n<Math.min(e,this.length);n++)t[n]=this._array[this._getCyclicIndex(n)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw Error(`Can only recycle when the buffer is full`);return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...n){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let t=this._length-1;t>=e;t--)this._array[this._getCyclicIndex(t+n.length)]=this._array[this._getCyclicIndex(t)];for(let t=0;t<n.length;t++)this._array[this._getCyclicIndex(e+t)]=n[t];if(n.length&&this.onInsertEmitter.fire({index:e,amount:n.length}),this._length+n.length>this._maxLength){let e=this._length+n.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=n.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw Error(`start argument out of range`);if(e+n<0)throw Error(`Cannot shift elements in list beyond index 0`);if(n>0){for(let r=t-1;r>=0;r--)this.set(e+r+n,this.get(e+r));let r=e+t+n-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<t;r++)this.set(e+r+n,this.get(e+r))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},r2=3,i2=Object.freeze(new kX),a2=0,o2=2,s2=class e{constructor(e,t,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(e*r2);let r=t||jX.fromCharData([0,DX,1,0]);for(let t=0;t<e;++t)this.setCell(t,r);this.length=e}get(e){let t=this._data[e*r2+0],n=t&2097151;return[this._data[e*r2+1],t&2097152?this._combined[e]:n?CX(n):``,t>>22,t&2097152?this._combined[e].charCodeAt(this._combined[e].length-1):n]}set(e,t){this._data[e*r2+1]=t[0],t[1].length>1?(this._combined[e]=t[1],this._data[e*r2+0]=e|2097152|t[2]<<22):this._data[e*r2+0]=t[1].charCodeAt(0)|t[2]<<22}getWidth(e){return this._data[e*r2+0]>>22}hasWidth(e){return this._data[e*r2+0]&12582912}getFg(e){return this._data[e*r2+1]}getBg(e){return this._data[e*r2+2]}hasContent(e){return this._data[e*r2+0]&4194303}getCodePoint(e){let t=this._data[e*r2+0];return t&2097152?this._combined[e].charCodeAt(this._combined[e].length-1):t&2097151}isCombined(e){return this._data[e*r2+0]&2097152}getString(e){let t=this._data[e*r2+0];return t&2097152?this._combined[e]:t&2097151?CX(t&2097151):``}isProtected(e){return this._data[e*r2+2]&536870912}loadCell(e,t){return a2=e*r2,t.content=this._data[a2+0],t.fg=this._data[a2+1],t.bg=this._data[a2+2],t.content&2097152&&(t.combinedData=this._combined[e]),t.bg&268435456&&(t.extended=this._extendedAttrs[e]),t}setCell(e,t){t.content&2097152&&(this._combined[e]=t.combinedData),t.bg&268435456&&(this._extendedAttrs[e]=t.extended),this._data[e*r2+0]=t.content,this._data[e*r2+1]=t.fg,this._data[e*r2+2]=t.bg}setCellFromCodepoint(e,t,n,r){r.bg&268435456&&(this._extendedAttrs[e]=r.extended),this._data[e*r2+0]=t|n<<22,this._data[e*r2+1]=r.fg,this._data[e*r2+2]=r.bg}addCodepointToCell(e,t,n){let r=this._data[e*r2+0];r&2097152?this._combined[e]+=CX(t):r&2097151?(this._combined[e]=CX(r&2097151)+CX(t),r&=-2097152,r|=2097152):r=t|1<<22,n&&(r&=-12582913,r|=n<<22),this._data[e*r2+0]=r}insertCells(e,t,n){if(e%=this.length,e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length-e){let r=new jX;for(let n=this.length-e-t-1;n>=0;--n)this.setCell(e+t+n,this.loadCell(e+n,r));for(let r=0;r<t;++r)this.setCell(e+r,n)}else for(let t=e;t<this.length;++t)this.setCell(t,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(e,t,n){if(e%=this.length,t<this.length-e){let r=new jX;for(let n=0;n<this.length-e-t;++n)this.setCell(e+n,this.loadCell(e+t+n,r));for(let e=this.length-t;e<this.length;++e)this.setCell(e,n)}else for(let t=e;t<this.length;++t)this.setCell(t,n);e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),this.getWidth(e)===0&&!this.hasContent(e)&&this.setCellFromCodepoint(e,0,1,n)}replaceCells(e,t,n,r=!1){if(r)for(e&&this.getWidth(e-1)===2&&!this.isProtected(e-1)&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length&&this.getWidth(t-1)===2&&!this.isProtected(t)&&this.setCellFromCodepoint(t,0,1,n);e<t&&e<this.length;)this.isProtected(e)||this.setCell(e,n),e++;else for(e&&this.getWidth(e-1)===2&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t,0,1,n);e<t&&e<this.length;)this.setCell(e++,n)}resize(e,t){if(e===this.length)return this._data.length*4*o2<this._data.buffer.byteLength;let n=e*r2;if(e>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let e=new Uint32Array(n);e.set(this._data),this._data=e}for(let n=this.length;n<e;++n)this.setCell(n,t)}else{this._data=this._data.subarray(0,n);let t=Object.keys(this._combined);for(let n=0;n<t.length;n++){let r=parseInt(t[n],10);r>=e&&delete this._combined[r]}let r=Object.keys(this._extendedAttrs);for(let t=0;t<r.length;t++){let n=parseInt(r[t],10);n>=e&&delete this._extendedAttrs[n]}}return this.length=e,n*4*o2<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*o2<this._data.buffer.byteLength){let e=new Uint32Array(this._data.length);return e.set(this._data),this._data=e,1}return 0}fill(e,t=!1){if(t)for(let t=0;t<this.length;++t)this.isProtected(t)||this.setCell(t,e);else{this._combined={},this._extendedAttrs={};for(let t=0;t<this.length;++t)this.setCell(t,e)}}copyFrom(e){this.length===e.length?this._data.set(e._data):this._data=new Uint32Array(e._data),this.length=e.length,this._combined={};for(let t in e._combined)this._combined[t]=e._combined[t];this._extendedAttrs={};for(let t in e._extendedAttrs)this._extendedAttrs[t]=e._extendedAttrs[t];this.isWrapped=e.isWrapped}clone(){let t=new e(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let e in this._combined)t._combined[e]=this._combined[e];for(let e in this._extendedAttrs)t._extendedAttrs[e]=this._extendedAttrs[e];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(this._data[e*r2+0]&4194303)return e+(this._data[e*r2+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(this._data[e*r2+0]&4194303||this._data[e*r2+2]&50331648)return e+(this._data[e*r2+0]>>22);return 0}copyCellsFrom(e,t,n,r,i){let a=e._data;if(i)for(let i=r-1;i>=0;i--){for(let e=0;e<r2;e++)this._data[(n+i)*r2+e]=a[(t+i)*r2+e];a[(t+i)*r2+2]&268435456&&(this._extendedAttrs[n+i]=e._extendedAttrs[t+i])}else for(let i=0;i<r;i++){for(let e=0;e<r2;e++)this._data[(n+i)*r2+e]=a[(t+i)*r2+e];a[(t+i)*r2+2]&268435456&&(this._extendedAttrs[n+i]=e._extendedAttrs[t+i])}let o=Object.keys(e._combined);for(let r=0;r<o.length;r++){let i=parseInt(o[r],10);i>=t&&(this._combined[i-t+n]=e._combined[i])}}translateToString(e,t,n,r){t??=0,n??=this.length,e&&(n=Math.min(n,this.getTrimmedLength())),r&&(r.length=0);let i=``;for(;t<n;){let e=this._data[t*r2+0],n=e&2097151,a=e&2097152?this._combined[t]:n?CX(n):OX;if(i+=a,r)for(let e=0;e<a.length;++e)r.push(t);t+=e>>22||1}return r&&r.push(t),i}};function c2(e,t,n,r,i,a){let o=[];for(let s=0;s<e.length-1;s++){let c=s,l=e.get(++c);if(!l.isWrapped)continue;let u=[e.get(s)];for(;c<e.length&&l.isWrapped;)u.push(l),l=e.get(++c);if(!a&&r>=s&&r<c){s+=u.length-1;continue}let d=0,f=f2(u,d,t),p=1,m=0;for(;p<u.length;){let e=f2(u,p,t),r=e-m,a=n-f,o=Math.min(r,a);u[d].copyCellsFrom(u[p],m,f,o,!1),f+=o,f===n&&(d++,f=0),m+=o,m===e&&(p++,m=0),f===0&&d!==0&&u[d-1].getWidth(n-1)===2&&(u[d].copyCellsFrom(u[d-1],n-1,f++,1,!1),u[d-1].setCell(n-1,i))}u[d].replaceCells(f,n,i);let h=0;for(let e=u.length-1;e>0&&(e>d||u[e].getTrimmedLength()===0);e--)h++;h>0&&(o.push(s+u.length-h),o.push(h)),s+=u.length-1}return o}function l2(e,t){let n=[],r=0,i=t[r],a=0;for(let o=0;o<e.length;o++)if(i===o){let n=t[++r];e.onDeleteEmitter.fire({index:o-a,amount:n}),o+=n-1,a+=n,i=t[++r]}else n.push(o);return{layout:n,countRemoved:a}}function u2(e,t){let n=[];for(let r=0;r<t.length;r++)n.push(e.get(t[r]));for(let t=0;t<n.length;t++)e.set(t,n[t]);e.length=t.length}function d2(e,t,n){let r=[],i=e.map((n,r)=>f2(e,r,t)).reduce((e,t)=>e+t),a=0,o=0,s=0;for(;s<i;){if(i-s<n){r.push(i-s);break}a+=n;let c=f2(e,o,t);a>c&&(a-=c,o++);let l=e[o].getWidth(a-1)===2;l&&a--;let u=l?n-1:n;r.push(u),s+=u}return r}function f2(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();let r=!e[t].hasContent(n-1)&&e[t].getWidth(n-1)===1,i=e[t+1].getWidth(0)===2;return r&&i?n-1:n}var p2=class e{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=e._nextId++,this._onDispose=this.register(new Z),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),SZ(this._disposables),this._disposables.length=0)}register(e){return this._disposables.push(e),e}};p2._nextId=1;var m2=p2,h2={},g2=h2.B;h2[0]={"`":`◆`,a:`▒`,b:`␉`,c:`␌`,d:`␍`,e:`␊`,f:`°`,g:`±`,h:`␤`,i:`␋`,j:`┘`,k:`┐`,l:`┌`,m:`└`,n:`┼`,o:`⎺`,p:`⎻`,q:`─`,r:`⎼`,s:`⎽`,t:`├`,u:`┤`,v:`┴`,w:`┬`,x:`│`,y:`≤`,z:`≥`,"{":`π`,"|":`≠`,"}":`£`,"~":`·`},h2.A={"#":`£`},h2.B=void 0,h2[4]={"#":`£`,"@":`¾`,"[":`ij`,"\\":`½`,"]":`|`,"{":`¨`,"|":`f`,"}":`¼`,"~":`´`},h2.C=h2[5]={"[":`Ä`,"\\":`Ö`,"]":`Å`,"^":`Ü`,"`":`é`,"{":`ä`,"|":`ö`,"}":`å`,"~":`ü`},h2.R={"#":`£`,"@":`à`,"[":`°`,"\\":`ç`,"]":`§`,"{":`é`,"|":`ù`,"}":`è`,"~":`¨`},h2.Q={"@":`à`,"[":`â`,"\\":`ç`,"]":`ê`,"^":`î`,"`":`ô`,"{":`é`,"|":`ù`,"}":`è`,"~":`û`},h2.K={"@":`§`,"[":`Ä`,"\\":`Ö`,"]":`Ü`,"{":`ä`,"|":`ö`,"}":`ü`,"~":`ß`},h2.Y={"#":`£`,"@":`§`,"[":`°`,"\\":`ç`,"]":`é`,"`":`ù`,"{":`à`,"|":`ò`,"}":`è`,"~":`ì`},h2.E=h2[6]={"@":`Ä`,"[":`Æ`,"\\":`Ø`,"]":`Å`,"^":`Ü`,"`":`ä`,"{":`æ`,"|":`ø`,"}":`å`,"~":`ü`},h2.Z={"#":`£`,"@":`§`,"[":`¡`,"\\":`Ñ`,"]":`¿`,"{":`°`,"|":`ñ`,"}":`ç`},h2.H=h2[7]={"@":`É`,"[":`Ä`,"\\":`Ö`,"]":`Å`,"^":`Ü`,"`":`é`,"{":`ä`,"|":`ö`,"}":`å`,"~":`ü`},h2[`=`]={"#":`ù`,"@":`à`,"[":`é`,"\\":`ç`,"]":`ê`,"^":`î`,_:`è`,"`":`ô`,"{":`ä`,"|":`ö`,"}":`ü`,"~":`û`};var _2=4294967295,v2=class{constructor(e,t,n){this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=i2.clone(),this.savedCharset=g2,this.markers=[],this._nullCell=jX.fromCharData([0,DX,1,0]),this._whitespaceCell=jX.fromCharData([0,OX,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new m0,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new n2(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new AX),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new AX),this._whitespaceCell}getBlankLine(e,t){return new s2(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>_2?_2:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=i2);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new n2(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let n=this.getNullCell(i2),r=0,i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(let t=0;t<this.lines.length;t++)r+=+this.lines.get(t).resize(e,n);let a=0;if(this._rows<t)for(let r=this._rows;r<t;r++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new s2(e,n)):this.ybase>0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(new s2(e,n)));else for(let e=this._rows;e>t;e--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){let e=this.lines.length-i;e>0&&(this.lines.trimStart(e),this.ybase=Math.max(this.ybase-e,0),this.ydisp=Math.max(this.ydisp-e,0),this.savedY=Math.max(this.savedY-e,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),a&&(this.y+=a),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let t=0;t<this.lines.length;t++)r+=+this.lines.get(t).resize(e,n);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),r>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend===`conpty`&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=c2(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(i2),n);if(r.length>0){let n=l2(this.lines,r);u2(this.lines,n.layout),this._reflowLargerAdjustViewport(e,t,n.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){let r=this.getNullCell(i2),i=n;for(;i-->0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new s2(e,r))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-n,0)}_reflowSmaller(e,t){let n=this._optionsService.rawOptions.reflowCursorLine,r=this.getNullCell(i2),i=[],a=0;for(let o=this.lines.length-1;o>=0;o--){let s=this.lines.get(o);if(!s||!s.isWrapped&&s.getTrimmedLength()<=e)continue;let c=[s];for(;s.isWrapped&&o>0;)s=this.lines.get(--o),c.unshift(s);if(!n){let e=this.ybase+this.y;if(e>=o&&e<o+c.length)continue}let l=c[c.length-1].getTrimmedLength(),u=d2(c,this._cols,e),d=u.length-c.length,f;f=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+d):Math.max(0,this.lines.length-this.lines.maxLength+d);let p=[];for(let e=0;e<d;e++){let e=this.getBlankLine(i2,!0);p.push(e)}p.length>0&&(i.push({start:o+c.length+a,newLines:p}),a+=p.length),c.push(...p);let m=u.length-1,h=u[m];h===0&&(m--,h=u[m]);let g=c.length-d-1,_=l;for(;g>=0;){let e=Math.min(_,h);if(c[m]===void 0)break;c[m].copyCellsFrom(c[g],_-e,h-e,e,!0),h-=e,h===0&&(m--,h=u[m]),_-=e,_===0&&(g--,_=f2(c,Math.max(g,0),this._cols))}for(let t=0;t<c.length;t++)u[t]<e&&c[t].setCell(u[t],r);let v=d-f;for(;v-->0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+a)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+d,this.ybase+t-1)}if(i.length>0){let e=[],t=[];for(let e=0;e<this.lines.length;e++)t.push(this.lines.get(e));let n=this.lines.length,r=n-1,o=0,s=i[o];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+a);let c=0;for(let l=Math.min(this.lines.maxLength-1,n+a-1);l>=0;l--)if(s&&s.start>r+c){for(let e=s.newLines.length-1;e>=0;e--)this.lines.set(l--,s.newLines[e]);l++,e.push({index:r+1,amount:s.newLines.length}),c+=s.newLines.length,s=i[++o]}else this.lines.set(l,t[r--]);let l=0;for(let t=e.length-1;t>=0;t--)e[t].index+=l,this.lines.onInsertEmitter.fire(e[t]),l+=e[t].amount;let u=Math.max(0,n+a-this.lines.maxLength);u>0&&this.lines.onTrimEmitter.fire(u)}}translateBufferLineToString(e,t,n=0,r){let i=this.lines.get(e);return i?i.translateToString(t,n,r):``}getWrappedRangeForLine(e){let t=e,n=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+1<this.lines.length&&this.lines.get(n+1).isWrapped;)n++;return{first:t,last:n}}setupTabStops(e){for(e==null?(this.tabs={},e=0):this.tabs[e]||(e=this.prevStop(e));e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e??=this.x;!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e??=this.x;!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new m2(e);return this.markers.push(t),t.register(this.lines.onTrim(e=>{t.line-=e,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(e=>{t.line>=e.index&&(t.line+=e.amount)})),t.register(this.lines.onDelete(e=>{t.line>=e.index&&t.line<e.index+e.amount&&t.dispose(),t.line>e.index&&(t.line-=e.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},y2=class extends DZ{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new Z),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange(`scrollback`,()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange(`tabStopWidth`,()=>this.setupTabStops()))}reset(){this._normal=new v2(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new v2(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},b2=2,x2=1,S2=class extends DZ{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new Z),this.onResize=this._onResize.event,this._onScroll=this._register(new Z),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,b2),this.rows=Math.max(e.rawOptions.rows||0,x2),this.buffers=this._register(new y2(e,this)),this._register(this.buffers.onBufferActivate(e=>{this._onScroll.fire(e.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let n=this.cols!==e,r=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:n,rowsChanged:r})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let n=this.buffer,r;r=this._cachedBlankLine,r&&r.length===this.cols&&r.getFg(0)===e.fg&&r.getBg(0)===e.bg||(r=n.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;let i=n.ybase+n.scrollTop,a=n.ybase+n.scrollBottom;if(n.scrollTop===0){let e=n.lines.isFull;a===n.lines.length-1?e?n.lines.recycle().copyFrom(r):n.lines.push(r.clone()):n.lines.splice(a+1,0,r.clone()),e?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{let e=a-i+1;n.lines.shiftElements(i+1,e-1,-1),n.lines.set(a,r.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(e,t){let n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);let r=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),r!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))}};S2=dX([X(0,WX)],S2);var C2={cols:80,rows:24,cursorBlink:!1,cursorStyle:`block`,cursorWidth:1,cursorInactiveStyle:`outline`,customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:`alt`,fastScrollSensitivity:5,fontFamily:`monospace`,fontSize:15,fontWeight:`normal`,fontWeightBold:`bold`,ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:`info`,logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:a0,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:` ()[]{}',"\``,altClickMovesCursor:!0,convertEol:!1,termName:`xterm`,cancelEvents:!1,overviewRuler:{}},w2=[`normal`,`bold`,`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`],T2=class extends DZ{constructor(e){super(),this._onOptionChange=this._register(new Z),this.onOptionChange=this._onOptionChange.event;let t={...C2};for(let n in e)if(n in t)try{let r=e[n];t[n]=this._sanitizeAndValidateOption(n,r)}catch(e){console.error(e)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(wZ(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(n=>{n===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(n=>{e.indexOf(n)!==-1&&t()})}_setupOptions(){let e=e=>{if(!(e in C2))throw Error(`No option with key "${e}"`);return this.rawOptions[e]},t=(e,t)=>{if(!(e in C2))throw Error(`No option with key "${e}"`);t=this._sanitizeAndValidateOption(e,t),this.rawOptions[e]!==t&&(this.rawOptions[e]=t,this._onOptionChange.fire(e))};for(let n in this.rawOptions){let r={get:e.bind(this,n),set:t.bind(this,n)};Object.defineProperty(this.options,n,r)}}_sanitizeAndValidateOption(e,t){switch(e){case`cursorStyle`:if(t||=C2[e],!E2(t))throw Error(`"${t}" is not a valid value for ${e}`);break;case`wordSeparator`:t||=C2[e];break;case`fontWeight`:case`fontWeightBold`:if(typeof t==`number`&&1<=t&&t<=1e3)break;t=w2.includes(t)?t:C2[e];break;case`cursorWidth`:t=Math.floor(t);case`lineHeight`:case`tabStopWidth`:if(t<1)throw Error(`${e} cannot be less than 1, value: ${t}`);break;case`minimumContrastRatio`:t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case`scrollback`:if(t=Math.min(t,4294967295),t<0)throw Error(`${e} cannot be less than 0, value: ${t}`);break;case`fastScrollSensitivity`:case`scrollSensitivity`:if(t<=0)throw Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case`rows`:case`cols`:if(!t&&t!==0)throw Error(`${e} must be numeric, value: ${t}`);break;case`windowsPty`:t??={}}return t}};function E2(e){return e===`block`||e===`underline`||e===`bar`}function D2(e,t=5){if(typeof e!=`object`)return e;let n=Array.isArray(e)?[]:{};for(let r in e)n[r]=t<=1?e[r]:e[r]&&D2(e[r],t-1);return n}var O2=Object.freeze({insertMode:!1}),k2=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),A2=class extends DZ{constructor(e,t,n){super(),this._bufferService=e,this._logService=t,this._optionsService=n,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new Z),this.onData=this._onData.event,this._onUserInput=this._register(new Z),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new Z),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new Z),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=D2(O2),this.decPrivateModes=D2(k2)}reset(){this.modes=D2(O2),this.decPrivateModes=D2(k2)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace(`sending data (codes)`,()=>e.split(``).map(e=>e.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace(`sending binary (codes)`,()=>e.split(``).map(e=>e.charCodeAt(0))),this._onBinary.fire(e))}};A2=dX([X(0,RX),X(1,UX),X(2,WX)],A2);var j2={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>e.action!==32||e.button!==3},ANY:{events:31,restrict:e=>!0}};function M2(e,t){let n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(n|=64,n|=e.action):(n|=e.button&3,e.button&4&&(n|=64),e.button&8&&(n|=128),e.action===32?n|=32:e.action===0&&!t&&(n|=3)),n}var N2=String.fromCharCode,P2={DEFAULT:e=>{let t=[M2(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?``:`\x1B[M${N2(t[0])}${N2(t[1])}${N2(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?`m`:`M`;return`\x1B[<${M2(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?`m`:`M`;return`\x1B[<${M2(e,!0)};${e.x};${e.y}${t}`}},F2=class extends DZ{constructor(e,t,n){super(),this._bufferService=e,this._coreService=t,this._optionsService=n,this._protocols={},this._encodings={},this._activeProtocol=``,this._activeEncoding=``,this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new Z),this.onProtocolChange=this._onProtocolChange.event;for(let e of Object.keys(j2))this.addProtocol(e,j2[e]);for(let e of Object.keys(P2))this.addEncoding(e,P2[e]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol=`NONE`,this.activeEncoding=`DEFAULT`,this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,n){if(e.deltaY===0||e.shiftKey||t===void 0||n===void 0)return 0;let r=t/n,i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=r+0,Math.abs(e.deltaY)<50&&(i*=.3),this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding===`SGR_PIXELS`))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding===`DEFAULT`?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,n){if(n){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift}};F2=dX([X(0,RX),X(1,BX),X(2,WX)],F2);var I2=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],L2=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],R2;function z2(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var B2=class{constructor(){if(this.version=`6`,!R2){R2=new Uint8Array(65536),R2.fill(1),R2[0]=0,R2.fill(0,1,32),R2.fill(0,127,160),R2.fill(2,4352,4448),R2[9001]=2,R2[9002]=2,R2.fill(2,11904,42192),R2[12351]=1,R2.fill(2,44032,55204),R2.fill(2,63744,64256),R2.fill(2,65040,65050),R2.fill(2,65072,65136),R2.fill(2,65280,65377),R2.fill(2,65504,65511);for(let e=0;e<I2.length;++e)R2.fill(0,I2[e][0],I2[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?R2[e]:z2(e,L2)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=V2.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return V2.createPropertyValue(0,n,r)}},V2=class e{constructor(){this._providers=Object.create(null),this._active=``,this._onChange=new Z,this.onChange=this._onChange.event;let e=new B2;this.register(e),this._active=e.version,this._activeProvider=e}static extractShouldJoin(e){return!!(e&1)}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t,n=!1){return(e&16777215)<<3|(t&3)<<1|!!n}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(t){let n=0,r=0,i=t.length;for(let a=0;a<i;++a){let o=t.charCodeAt(a);if(55296<=o&&o<=56319){if(++a>=i)return n+this.wcwidth(o);let e=t.charCodeAt(a);56320<=e&&e<=57343?o=(o-55296)*1024+e-56320+65536:n+=this.wcwidth(e)}let s=this.charProperties(o,r),c=e.extractWidth(s);e.extractShouldJoin(s)&&(c-=e.extractWidth(r)),n+=c,r=s}return n}charProperties(e,t){return this._activeProvider.charProperties(e,t)}},H2=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function U2(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);n&&t&&(n.isWrapped=t[3]!==0&&t[3]!==32)}var W2=2147483647,G2=256,K2=class e{constructor(e=32,t=32){if(this.maxLength=e,this.maxSubParamsLength=t,t>G2)throw Error(`maxSubParamsLength must not be greater than 256`);this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let n=new e;if(!t.length)return n;for(let e=+!!Array.isArray(t[0]);e<t.length;++e){let r=t[e];if(Array.isArray(r))for(let e=0;e<r.length;++e)n.addSubParam(r[e]);else n.addParam(r)}return n}clone(){let t=new e(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let e=[];for(let t=0;t<this.length;++t){e.push(this.params[t]);let n=this._subParamsIdx[t]>>8,r=this._subParamsIdx[t]&255;r-n>0&&e.push(Array.prototype.slice.call(this._subParams,n,r))}return e}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(e){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw Error(`values lesser than -1 are not allowed`);this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>W2?W2:e}}addSubParam(e){if(this._digitIsSub=!0,this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(e<-1)throw Error(`values lesser than -1 are not allowed`);this._subParams[this._subParamsLength++]=e>W2?W2:e,this._subParamsIdx[this.length-1]++}}hasSubParams(e){return(this._subParamsIdx[e]&255)-(this._subParamsIdx[e]>>8)>0}getSubParams(e){let t=this._subParamsIdx[e]>>8,n=this._subParamsIdx[e]&255;return n-t>0?this._subParams.subarray(t,n):null}getSubParamsAll(){let e={};for(let t=0;t<this.length;++t){let n=this._subParamsIdx[t]>>8,r=this._subParamsIdx[t]&255;r-n>0&&(e[t]=this._subParams.slice(n,r))}return e}addDigit(e){let t;if(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,r=n[t-1];n[t-1]=~r?Math.min(r*10+e,W2):e}},q2=[],J2=class{constructor(){this._state=0,this._active=q2,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=q2}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=q2,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||q2,!this._active.length)this._handlerFb(this._id,`START`);else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,n){if(!this._active.length)this._handlerFb(this._id,`PUT`,wX(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}start(){this.reset(),this._state=1}put(e,t,n){if(this._state!==3){if(this._state===1)for(;t<n;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&n-t>0&&this._put(e,t,n)}}end(e,t=!0){if(this._state!==0){if(this._state!==3){if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,`END`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].end(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}}this._active=q2,this._id=-1,this._state=0}}},Y2=class{constructor(e){this._handler=e,this._data=``,this._hitLimit=!1}start(){this._data=``,this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=wX(e,t,n),this._data.length>1e7&&(this._data=``,this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(e=>(this._data=``,this._hitLimit=!1,e));return this._data=``,this._hitLimit=!1,t}},X2=[],Z2=class{constructor(){this._handlers=Object.create(null),this._active=X2,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=X2}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let n=this._handlers[e];return n.push(t),{dispose:()=>{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=X2,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||X2,!this._active.length)this._handlerFb(this._ident,`HOOK`,t);else for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(t)}put(e,t,n){if(!this._active.length)this._handlerFb(this._ident,`PUT`,wX(e,t,n));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,`UNHOOK`,e);else{let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&n===!1){for(;r>=0&&(n=this._active[r].unhook(e),n!==!0);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}this._active=X2,this._ident=0}},Q2=new K2;Q2.addParam(0);var $2=class{constructor(e){this._handler=e,this._data=``,this._params=Q2,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():Q2,this._data=``,this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=wX(e,t,n),this._data.length>1e7&&(this._data=``,this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(e=>(this._params=Q2,this._data=``,this._hitLimit=!1,e));return this._params=Q2,this._data=``,this._hitLimit=!1,t}},e4=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,n,r){this.table[t<<8|e]=n<<4|r}addMany(e,t,n,r){for(let i=0;i<e.length;i++)this.table[t<<8|e[i]]=n<<4|r}},t4=160,n4=function(){let e=new e4(4095),t=Array.apply(null,Array(256)).map((e,t)=>t),n=(e,n)=>t.slice(e,n),r=n(32,127),i=n(0,24);i.push(25),i.push.apply(i,n(28,32));let a=n(0,14),o;for(o in e.setDefault(1,0),e.addMany(r,0,2,0),a)e.addMany([24,26,153,154],o,3,0),e.addMany(n(128,144),o,3,0),e.addMany(n(144,152),o,3,0),e.add(156,o,0,0),e.add(27,o,11,1),e.add(157,o,4,8),e.addMany([152,158,159],o,0,7),e.add(155,o,11,3),e.add(144,o,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(r,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(n(28,32),9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(n(28,32),10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(n(28,32),12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(t4,0,2,0),e.add(t4,8,5,8),e.add(t4,6,0,6),e.add(t4,11,0,11),e.add(t4,13,13,13),e}(),r4=class extends DZ{constructor(e=n4){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new K2,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(e,t,n)=>{},this._executeHandlerFb=e=>{},this._csiHandlerFb=(e,t)=>{},this._escHandlerFb=e=>{},this._errorHandlerFb=e=>e,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(wZ(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new J2),this._dcsParser=this._register(new Z2),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:`\\`},()=>!0)}_identifier(e,t=[64,126]){let n=0;if(e.prefix){if(e.prefix.length>1)throw Error(`only one byte as prefix supported`);if(n=e.prefix.charCodeAt(0),n&&60>n||n>63)throw Error(`prefix must be in range 0x3c .. 0x3f`)}if(e.intermediates){if(e.intermediates.length>2)throw Error(`only two bytes as intermediates are supported`);for(let t=0;t<e.intermediates.length;++t){let r=e.intermediates.charCodeAt(t);if(32>r||r>47)throw Error(`intermediate must be in range 0x20 .. 0x2f`);n<<=8,n|=r}}if(e.final.length!==1)throw Error(`final must be a single byte`);let r=e.final.charCodeAt(0);if(t[0]>r||r>t[1])throw Error(`final must be in range ${t[0]} .. ${t[1]}`);return n<<=8,n|=r,n}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join(``)}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let n=this._identifier(e,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);let r=this._escHandlers[n];return r.push(t),{dispose:()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let n=this._identifier(e);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);let r=this._csiHandlers[n];return r.push(t),{dispose:()=>{let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,n,r,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=r,this._parseStack.chunkPos=i}parse(e,t,n){let r=0,i=0,a=0,o;if(this._parseStack.state){if(this._parseStack.state===2)this._parseStack.state=0,a=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,Error(`improper continuation due to previous async handler, giving up parsing`);let t=this._parseStack.handlers,i=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&i>-1){for(;i>=0&&(o=t[i](this._params),o!==!0);i--)if(o instanceof Promise)return this._parseStack.handlerPos=i,o}this._parseStack.handlers=[];break;case 4:if(n===!1&&i>-1){for(;i>=0&&(o=t[i](),o!==!0);i--)if(o instanceof Promise)return this._parseStack.handlerPos=i,o}this._parseStack.handlers=[];break;case 6:if(r=e[this._parseStack.chunkPos],o=this._dcsParser.unhook(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(r=e[this._parseStack.chunkPos],o=this._oscParser.end(r!==24&&r!==26,n),o)return o;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,a=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}}for(let n=a;n<t;++n){switch(r=e[n],i=this._transitions.table[this.currentState<<8|(r<160?r:t4)],i>>4){case 2:for(let i=n+1;;++i)if(i>=t||(r=e[i])<32||r>126&&r<t4||++i>=t||(r=e[i])<32||r>126&&r<t4||++i>=t||(r=e[i])<32||r>126&&r<t4||++i>=t||(r=e[i])<32||r>126&&r<t4){this._printHandler(e,n,i),n=i-1;break}break;case 3:this._executeHandlers[r]?this._executeHandlers[r]():this._executeHandlerFb(r),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:n,code:r,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let a=this._csiHandlers[this._collect<<8|r],s=a?a.length-1:-1;for(;s>=0&&(o=a[s](this._params),o!==!0);s--)if(o instanceof Promise)return this._preserveStack(3,a,s,i,n),o;s<0&&this._csiHandlerFb(this._collect<<8|r,this._params),this.precedingJoinState=0;break;case 8:do switch(r){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(r-48)}while(++n<t&&(r=e[n])>47&&r<60);n--;break;case 9:this._collect<<=8,this._collect|=r;break;case 10:let c=this._escHandlers[this._collect<<8|r],l=c?c.length-1:-1;for(;l>=0&&(o=c[l](),o!==!0);l--)if(o instanceof Promise)return this._preserveStack(4,c,l,i,n),o;l<0&&this._escHandlerFb(this._collect<<8|r),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|r,this._params);break;case 13:for(let i=n+1;;++i)if(i>=t||(r=e[i])===24||r===26||r===27||r>127&&r<t4){this._dcsParser.put(e,n,i),n=i-1;break}break;case 14:if(o=this._dcsParser.unhook(r!==24&&r!==26),o)return this._preserveStack(6,[],0,i,n),o;r===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let i=n+1;;i++)if(i>=t||(r=e[i])<32||r>127&&r<t4){this._oscParser.put(e,n,i),n=i-1;break}break;case 6:if(o=this._oscParser.end(r!==24&&r!==26),o)return this._preserveStack(5,[],0,i,n),o;r===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=i&15}}},i4=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,a4=/^[\da-f]+$/;function o4(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf(`rgb:`)===0){t=t.slice(4);let e=i4.exec(t);if(e){let t=e[1]?15:e[4]?255:e[7]?4095:65535;return[Math.round(parseInt(e[1]||e[4]||e[7]||e[10],16)/t*255),Math.round(parseInt(e[2]||e[5]||e[8]||e[11],16)/t*255),Math.round(parseInt(e[3]||e[6]||e[9]||e[12],16)/t*255)]}}else if(t.indexOf(`#`)===0&&(t=t.slice(1),a4.exec(t)&&[3,6,9,12].includes(t.length))){let e=t.length/3,n=[0,0,0];for(let r=0;r<3;++r){let i=parseInt(t.slice(e*r,e*r+e),16);n[r]=e===1?i<<4:e===2?i:e===3?i>>4:i>>8}return n}}function s4(e,t){let n=e.toString(16),r=n.length<2?`0`+n:n;switch(t){case 4:return n[0];case 8:return r;case 12:return(r+r).slice(0,3);default:return r+r}}function c4(e,t=16){let[n,r,i]=e;return`rgb:${s4(n,t)}/${s4(r,t)}/${s4(i,t)}`}var l4={"(":0,")":1,"*":2,"+":3,"-":1,".":2},u4=131072,d4=10;function f4(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var p4=5e3,m4=0,h4=class extends DZ{constructor(e,t,n,r,i,a,o,s,c=new r4){super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=r,this._optionsService=i,this._oscLinkService=a,this._coreMouseService=o,this._unicodeService=s,this._parser=c,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new TX,this._utf8Decoder=new EX,this._windowTitle=``,this._iconName=``,this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=i2.clone(),this._eraseAttrDataInternal=i2.clone(),this._onRequestBell=this._register(new Z),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new Z),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new Z),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new Z),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new Z),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new Z),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new Z),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new Z),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new Z),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new Z),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new Z),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new Z),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new Z),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new g4(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(e=>this._activeBuffer=e.activeBuffer)),this._parser.setCsiHandlerFallback((e,t)=>{this._logService.debug(`Unknown CSI code: `,{identifier:this._parser.identToString(e),params:t.toArray()})}),this._parser.setEscHandlerFallback(e=>{this._logService.debug(`Unknown ESC code: `,{identifier:this._parser.identToString(e)})}),this._parser.setExecuteHandlerFallback(e=>{this._logService.debug(`Unknown EXECUTE code: `,{code:e})}),this._parser.setOscHandlerFallback((e,t,n)=>{this._logService.debug(`Unknown OSC code: `,{identifier:e,action:t,data:n})}),this._parser.setDcsHandlerFallback((e,t,n)=>{t===`HOOK`&&(n=n.toArray()),this._logService.debug(`Unknown DCS code: `,{identifier:this._parser.identToString(e),action:t,payload:n})}),this._parser.setPrintHandler((e,t,n)=>this.print(e,t,n)),this._parser.registerCsiHandler({final:`@`},e=>this.insertChars(e)),this._parser.registerCsiHandler({intermediates:` `,final:`@`},e=>this.scrollLeft(e)),this._parser.registerCsiHandler({final:`A`},e=>this.cursorUp(e)),this._parser.registerCsiHandler({intermediates:` `,final:`A`},e=>this.scrollRight(e)),this._parser.registerCsiHandler({final:`B`},e=>this.cursorDown(e)),this._parser.registerCsiHandler({final:`C`},e=>this.cursorForward(e)),this._parser.registerCsiHandler({final:`D`},e=>this.cursorBackward(e)),this._parser.registerCsiHandler({final:`E`},e=>this.cursorNextLine(e)),this._parser.registerCsiHandler({final:`F`},e=>this.cursorPrecedingLine(e)),this._parser.registerCsiHandler({final:`G`},e=>this.cursorCharAbsolute(e)),this._parser.registerCsiHandler({final:`H`},e=>this.cursorPosition(e)),this._parser.registerCsiHandler({final:`I`},e=>this.cursorForwardTab(e)),this._parser.registerCsiHandler({final:`J`},e=>this.eraseInDisplay(e,!1)),this._parser.registerCsiHandler({prefix:`?`,final:`J`},e=>this.eraseInDisplay(e,!0)),this._parser.registerCsiHandler({final:`K`},e=>this.eraseInLine(e,!1)),this._parser.registerCsiHandler({prefix:`?`,final:`K`},e=>this.eraseInLine(e,!0)),this._parser.registerCsiHandler({final:`L`},e=>this.insertLines(e)),this._parser.registerCsiHandler({final:`M`},e=>this.deleteLines(e)),this._parser.registerCsiHandler({final:`P`},e=>this.deleteChars(e)),this._parser.registerCsiHandler({final:`S`},e=>this.scrollUp(e)),this._parser.registerCsiHandler({final:`T`},e=>this.scrollDown(e)),this._parser.registerCsiHandler({final:`X`},e=>this.eraseChars(e)),this._parser.registerCsiHandler({final:`Z`},e=>this.cursorBackwardTab(e)),this._parser.registerCsiHandler({final:"`"},e=>this.charPosAbsolute(e)),this._parser.registerCsiHandler({final:`a`},e=>this.hPositionRelative(e)),this._parser.registerCsiHandler({final:`b`},e=>this.repeatPrecedingCharacter(e)),this._parser.registerCsiHandler({final:`c`},e=>this.sendDeviceAttributesPrimary(e)),this._parser.registerCsiHandler({prefix:`>`,final:`c`},e=>this.sendDeviceAttributesSecondary(e)),this._parser.registerCsiHandler({final:`d`},e=>this.linePosAbsolute(e)),this._parser.registerCsiHandler({final:`e`},e=>this.vPositionRelative(e)),this._parser.registerCsiHandler({final:`f`},e=>this.hVPosition(e)),this._parser.registerCsiHandler({final:`g`},e=>this.tabClear(e)),this._parser.registerCsiHandler({final:`h`},e=>this.setMode(e)),this._parser.registerCsiHandler({prefix:`?`,final:`h`},e=>this.setModePrivate(e)),this._parser.registerCsiHandler({final:`l`},e=>this.resetMode(e)),this._parser.registerCsiHandler({prefix:`?`,final:`l`},e=>this.resetModePrivate(e)),this._parser.registerCsiHandler({final:`m`},e=>this.charAttributes(e)),this._parser.registerCsiHandler({final:`n`},e=>this.deviceStatus(e)),this._parser.registerCsiHandler({prefix:`?`,final:`n`},e=>this.deviceStatusPrivate(e)),this._parser.registerCsiHandler({intermediates:`!`,final:`p`},e=>this.softReset(e)),this._parser.registerCsiHandler({intermediates:` `,final:`q`},e=>this.setCursorStyle(e)),this._parser.registerCsiHandler({final:`r`},e=>this.setScrollRegion(e)),this._parser.registerCsiHandler({final:`s`},e=>this.saveCursor(e)),this._parser.registerCsiHandler({final:`t`},e=>this.windowOptions(e)),this._parser.registerCsiHandler({final:`u`},e=>this.restoreCursor(e)),this._parser.registerCsiHandler({intermediates:`'`,final:`}`},e=>this.insertColumns(e)),this._parser.registerCsiHandler({intermediates:`'`,final:`~`},e=>this.deleteColumns(e)),this._parser.registerCsiHandler({intermediates:`"`,final:`q`},e=>this.selectProtected(e)),this._parser.registerCsiHandler({intermediates:`$`,final:`p`},e=>this.requestMode(e,!0)),this._parser.registerCsiHandler({prefix:`?`,intermediates:`$`,final:`p`},e=>this.requestMode(e,!1)),this._parser.setExecuteHandler(Q.BEL,()=>this.bell()),this._parser.setExecuteHandler(Q.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(Q.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(Q.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(Q.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(Q.BS,()=>this.backspace()),this._parser.setExecuteHandler(Q.HT,()=>this.tab()),this._parser.setExecuteHandler(Q.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(Q.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(o1.IND,()=>this.index()),this._parser.setExecuteHandler(o1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(o1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Y2(e=>(this.setTitle(e),this.setIconName(e),!0))),this._parser.registerOscHandler(1,new Y2(e=>this.setIconName(e))),this._parser.registerOscHandler(2,new Y2(e=>this.setTitle(e))),this._parser.registerOscHandler(4,new Y2(e=>this.setOrReportIndexedColor(e))),this._parser.registerOscHandler(8,new Y2(e=>this.setHyperlink(e))),this._parser.registerOscHandler(10,new Y2(e=>this.setOrReportFgColor(e))),this._parser.registerOscHandler(11,new Y2(e=>this.setOrReportBgColor(e))),this._parser.registerOscHandler(12,new Y2(e=>this.setOrReportCursorColor(e))),this._parser.registerOscHandler(104,new Y2(e=>this.restoreIndexedColor(e))),this._parser.registerOscHandler(110,new Y2(e=>this.restoreFgColor(e))),this._parser.registerOscHandler(111,new Y2(e=>this.restoreBgColor(e))),this._parser.registerOscHandler(112,new Y2(e=>this.restoreCursorColor(e))),this._parser.registerEscHandler({final:`7`},()=>this.saveCursor()),this._parser.registerEscHandler({final:`8`},()=>this.restoreCursor()),this._parser.registerEscHandler({final:`D`},()=>this.index()),this._parser.registerEscHandler({final:`E`},()=>this.nextLine()),this._parser.registerEscHandler({final:`H`},()=>this.tabSet()),this._parser.registerEscHandler({final:`M`},()=>this.reverseIndex()),this._parser.registerEscHandler({final:`=`},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:`>`},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:`c`},()=>this.fullReset()),this._parser.registerEscHandler({final:`n`},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:`o`},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:`|`},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:`}`},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:`~`},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:`%`,final:`@`},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:`%`,final:`G`},()=>this.selectDefaultCharset());for(let e in h2)this._parser.registerEscHandler({intermediates:`(`,final:e},()=>this.selectCharset(`(`+e)),this._parser.registerEscHandler({intermediates:`)`,final:e},()=>this.selectCharset(`)`+e)),this._parser.registerEscHandler({intermediates:`*`,final:e},()=>this.selectCharset(`*`+e)),this._parser.registerEscHandler({intermediates:`+`,final:e},()=>this.selectCharset(`+`+e)),this._parser.registerEscHandler({intermediates:`-`,final:e},()=>this.selectCharset(`-`+e)),this._parser.registerEscHandler({intermediates:`.`,final:e},()=>this.selectCharset(`.`+e)),this._parser.registerEscHandler({intermediates:`/`,final:e},()=>this.selectCharset(`/`+e));this._parser.registerEscHandler({intermediates:`#`,final:`8`},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(e=>(this._logService.error(`Parsing error: `,e),e)),this._parser.registerDcsHandler({intermediates:`$`,final:`q`},new $2((e,t)=>this.requestStatusString(e,t)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,n,r){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=n,this._parseStack.position=r}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((e,t)=>setTimeout(()=>t(`#SLOW_TIMEOUT`),p4))]).catch(e=>{if(e!==`#SLOW_TIMEOUT`)throw e;console.warn(`async parser handler taking longer than ${p4} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,r=this._activeBuffer.x,i=this._activeBuffer.y,a=0,o=this._parseStack.paused;if(o){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;r=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>u4&&(a=this._parseStack.position+u4)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e==`string`?` "${e}"`:` "${Array.prototype.map.call(e,e=>String.fromCharCode(e)).join(``)}"`}`),this._logService.logLevel===0&&this._logService.trace(`parsing data (codes)`,typeof e==`string`?e.split(``).map(e=>e.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<u4&&(this._parseBuffer=new Uint32Array(Math.min(e.length,u4))),o||this._dirtyRowTracker.clearRange(),e.length>u4)for(let t=a;t<e.length;t+=u4){let a=t+u4<e.length?t+u4:e.length,o=typeof e==`string`?this._stringDecoder.decode(e.substring(t,a),this._parseBuffer):this._utf8Decoder.decode(e.subarray(t,a),this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,o))return this._preserveStack(r,i,o,t),this._logSlowResolvingAsync(n),n}else if(!o){let t=typeof e==`string`?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,t))return this._preserveStack(r,i,t,0),this._logSlowResolvingAsync(n),n}(this._activeBuffer.x!==r||this._activeBuffer.y!==i)&&this._onCursorMove.fire();let s=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),c=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);c<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(c,this._bufferService.rows-1),end:Math.min(s,this._bufferService.rows-1)})}print(e,t,n){let r,i,a=this._charsetService.charset,o=this._optionsService.rawOptions.screenReaderMode,s=this._bufferService.cols,c=this._coreService.decPrivateModes.wraparound,l=this._coreService.modes.insertMode,u=this._curAttrData,d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&n-t>0&&d.getWidth(this._activeBuffer.x-1)===2&&d.setCellFromCodepoint(this._activeBuffer.x-1,0,1,u);let f=this._parser.precedingJoinState;for(let p=t;p<n;++p){if(r=e[p],r<127&&a){let e=a[String.fromCharCode(r)];e&&(r=e.charCodeAt(0))}let t=this._unicodeService.charProperties(r,f);i=V2.extractWidth(t);let n=V2.extractShouldJoin(t),m=n?V2.extractWidth(f):0;if(f=t,o&&this._onA11yChar.fire(CX(r)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+i-m>s){if(c){let e=d,t=this._activeBuffer.x-m;for(this._activeBuffer.x=m,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),m>0&&d instanceof s2&&d.copyCellsFrom(e,t,0,m,!1);t<s;)e.setCellFromCodepoint(t++,0,1,u)}else if(this._activeBuffer.x=s-1,i===2)continue}if(n&&this._activeBuffer.x){let e=d.getWidth(this._activeBuffer.x-1)?1:2;d.addCodepointToCell(this._activeBuffer.x-e,r,i);for(let e=i-m;--e>=0;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}else if(l&&(d.insertCells(this._activeBuffer.x,i-m,this._activeBuffer.getNullCell(u)),d.getWidth(s-1)===2&&d.setCellFromCodepoint(s-1,0,1,u)),d.setCellFromCodepoint(this._activeBuffer.x++,r,i,u),i>0)for(;--i;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}this._parser.precedingJoinState=f,this._activeBuffer.x<s&&n-t>0&&d.getWidth(this._activeBuffer.x)===0&&!d.hasContent(this._activeBuffer.x)&&d.setCellFromCodepoint(this._activeBuffer.x,0,1,u),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final===`t`&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,e=>!f4(e.params[0],this._optionsService.rawOptions.windowOptions)||t(e)):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new $2(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Y2(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,n,r=!1,i=!1){let a=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);a.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),i),r&&(a.isWrapped=!1)}_resetBufferLine(e,t=!1){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n&&(n.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),n.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let n;switch(e.params[0]){case 0:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);n<this._bufferService.rows;n++)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(n);break;case 1:for(n=this._activeBuffer.y,this._dirtyRowTracker.markDirty(n),this._eraseInBufferLine(n,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(n+1).isWrapped=!1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(n=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,n-1);n--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+n)?.getTrimmedLength(););for(;n>=0;n--)this._bufferService.scroll(this._eraseAttrData())}else{for(n=this._bufferService.rows,this._dirtyRowTracker.markDirty(n-1);n--;)this._resetBufferLine(n,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let e=this._activeBuffer.lines.length-this._bufferService.rows;e>0&&(this._activeBuffer.lines.trimStart(e),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-e,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-e,0),this._onScroll.fire(0))}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,i=this._bufferService.rows-1+this._activeBuffer.ybase-r+1;for(;t--;)this._activeBuffer.lines.splice(i-1,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let n=this._activeBuffer.ybase+this._activeBuffer.y,r;for(r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-r;t--;)this._activeBuffer.lines.splice(n,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(i2));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let n=e.params[0]||1,r=V2.extractWidth(t),i=this._activeBuffer.x-r,a=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(i),o=new Uint32Array(a.length*n),s=0;for(let e=0;e<a.length;){let t=a.codePointAt(e)||0;o[s++]=t,e+=t>65535?2:1}let c=s;for(let e=1;e<n;++e)o.copyWithin(c,0,s),c+=s;return this.print(o,0,c),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is(`xterm`)||this._is(`rxvt-unicode`)||this._is(`screen`)?this._coreService.triggerDataEvent(Q.ESC+`[?1;2c`):this._is(`linux`)&&this._coreService.triggerDataEvent(Q.ESC+`[?6c`)),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is(`xterm`)?this._coreService.triggerDataEvent(Q.ESC+`[>0;276;0c`):this._is(`rxvt-unicode`)?this._coreService.triggerDataEvent(Q.ESC+`[>85;95;0c`):this._is(`linux`)?this._coreService.triggerDataEvent(e.params[0]+`c`):this._is(`screen`)&&this._coreService.triggerDataEvent(Q.ESC+`[>83;40003;0c`)),!0}_is(e){return(this._optionsService.rawOptions.termName+``).indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g2),this._charsetService.setgCharset(1,g2),this._charsetService.setgCharset(2,g2),this._charsetService.setgCharset(3,g2);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug(`Serial port requested application keypad.`),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol=`X10`;break;case 1e3:this._coreMouseService.activeProtocol=`VT200`;break;case 1002:this._coreMouseService.activeProtocol=`DRAG`;break;case 1003:this._coreMouseService.activeProtocol=`ANY`;break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug(`DECSET 1005 not supported (see #2507)`);break;case 1006:this._coreMouseService.activeEncoding=`SGR`;break;case 1015:this._logService.debug(`DECSET 1015 not supported (see #2507)`);break;case 1016:this._coreMouseService.activeEncoding=`SGR_PIXELS`;break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug(`Switching back to normal keypad.`),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol=`NONE`;break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug(`DECRST 1005 not supported (see #2507)`);break;case 1006:this._coreMouseService.activeEncoding=`DEFAULT`;break;case 1015:this._logService.debug(`DECRST 1015 not supported (see #2507)`);break;case 1016:this._coreMouseService.activeEncoding=`DEFAULT`;break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0)}return!0}requestMode(e,t){let n;(e=>(e[e.NOT_RECOGNIZED=0]=`NOT_RECOGNIZED`,e[e.SET=1]=`SET`,e[e.RESET=2]=`RESET`,e[e.PERMANENTLY_SET=3]=`PERMANENTLY_SET`,e[e.PERMANENTLY_RESET=4]=`PERMANENTLY_RESET`))(n||={});let r=this._coreService.decPrivateModes,{activeProtocol:i,activeEncoding:a}=this._coreMouseService,o=this._coreService,{buffers:s,cols:c}=this._bufferService,{active:l,alt:u}=s,d=this._optionsService.rawOptions,f=(e,n)=>(o.triggerDataEvent(`${Q.ESC}[${t?``:`?`}${e};${n}$y`),!0),p=e=>e?1:2,m=e.params[0];return t?m===2?f(m,4):m===4?f(m,p(o.modes.insertMode)):m===12?f(m,3):m===20?f(m,p(d.convertEol)):f(m,0):m===1?f(m,p(r.applicationCursorKeys)):m===3?f(m,d.windowOptions.setWinLines?c===80?2:+(c===132):0):m===6?f(m,p(r.origin)):m===7?f(m,p(r.wraparound)):m===8?f(m,3):m===9?f(m,p(i===`X10`)):m===12?f(m,p(d.cursorBlink)):m===25?f(m,p(!o.isCursorHidden)):m===45?f(m,p(r.reverseWraparound)):m===66?f(m,p(r.applicationKeypad)):m===67?f(m,4):m===1e3?f(m,p(i===`VT200`)):m===1002?f(m,p(i===`DRAG`)):m===1003?f(m,p(i===`ANY`)):m===1004?f(m,p(r.sendFocus)):m===1005?f(m,4):m===1006?f(m,p(a===`SGR`)):m===1015?f(m,4):m===1016?f(m,p(a===`SGR_PIXELS`)):m===1048?f(m,1):m===47||m===1047||m===1049?f(m,p(l===u)):m===2004?f(m,p(r.bracketedPasteMode)):m===2026?f(m,p(r.synchronizedOutput)):f(m,0)}_updateAttrColor(e,t,n,r,i){return t===2?(e|=50331648,e&=-16777216,e|=kX.fromColorRGB([n,r,i])):t===5&&(e&=-50331904,e|=33554432|n&255),e}_extractColor(e,t,n){let r=[0,0,-1,0,0,0],i=0,a=0;do{if(r[a+i]=e.params[t+a],e.hasSubParams(t+a)){let n=e.getSubParams(t+a),o=0;do r[1]===5&&(i=1),r[a+o+1+i]=n[o];while(++o<n.length&&o+a+1+i<r.length);break}if(r[1]===5&&a+i>=2||r[1]===2&&a+i>=5)break;r[1]&&(i=1)}while(++a+t<e.length&&a+i<r.length);for(let e=2;e<r.length;++e)r[e]===-1&&(r[e]=0);switch(r[0]){case 38:n.fg=this._updateAttrColor(n.fg,r[1],r[3],r[4],r[5]);break;case 48:n.bg=this._updateAttrColor(n.bg,r[1],r[3],r[4],r[5]);break;case 58:n.extended=n.extended.clone(),n.extended.underlineColor=this._updateAttrColor(n.extended.underlineColor,r[1],r[3],r[4],r[5])}return a}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=i2.fg,e.bg=i2.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,n,r=this._curAttrData;for(let i=0;i<t;i++)n=e.params[i],n>=30&&n<=37?(r.fg&=-50331904,r.fg|=16777216|n-30):n>=40&&n<=47?(r.bg&=-50331904,r.bg|=16777216|n-40):n>=90&&n<=97?(r.fg&=-50331904,r.fg|=n-90|16777224):n>=100&&n<=107?(r.bg&=-50331904,r.bg|=n-100|16777224):n===0?this._processSGR0(r):n===1?r.fg|=134217728:n===3?r.bg|=67108864:n===4?(r.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,r)):n===5?r.fg|=536870912:n===7?r.fg|=67108864:n===8?r.fg|=1073741824:n===9?r.fg|=2147483648:n===2?r.bg|=134217728:n===21?this._processUnderline(2,r):n===22?(r.fg&=-134217729,r.bg&=-134217729):n===23?r.bg&=-67108865:n===24?(r.fg&=-268435457,this._processUnderline(0,r)):n===25?r.fg&=-536870913:n===27?r.fg&=-67108865:n===28?r.fg&=-1073741825:n===29?r.fg&=2147483647:n===39?(r.fg&=-67108864,r.fg|=i2.fg&16777215):n===49?(r.bg&=-67108864,r.bg|=i2.bg&16777215):n===38||n===48||n===58?i+=this._extractColor(e,i,r):n===53?r.bg|=1073741824:n===55?r.bg&=-1073741825:n===59?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):n===100?(r.fg&=-67108864,r.fg|=i2.fg&16777215,r.bg&=-67108864,r.bg|=i2.bg&16777215):this._logService.debug(`Unknown SGR attribute: %d.`,n);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${Q.ESC}[0n`);break;case 6:let e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Q.ESC}[${e};${t}R`)}return!0}deviceStatusPrivate(e){if(e.params[0]===6){let e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Q.ESC}[?${e};${t}R`)}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=i2.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle=`block`;break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle=`underline`;break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle=`bar`}let e=t%2==1;this._coreService.decPrivateModes.cursorBlink=e}return!0}setScrollRegion(e){let t=e.params[0]||1,n;return(e.length<2||(n=e.params[1])>this._bufferService.rows||n===0)&&(n=this._bufferService.rows),n>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=n-1,this._setCursor(0,0)),!0}windowOptions(e){if(!f4(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${Q.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>d4&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>d4&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],n=e.split(`;`);for(;n.length>1;){let e=n.shift(),r=n.shift();if(/^\d+$/.exec(e)){let n=parseInt(e);if(_4(n)){if(r===`?`)t.push({type:0,index:n});else{let e=o4(r);e&&t.push({type:1,index:n,color:e})}}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(`;`);if(t===-1)return!0;let n=e.slice(0,t).trim(),r=e.slice(t+1);return r?this._createHyperlink(n,r):!n.trim()&&this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let n=e.split(`:`),r,i=n.findIndex(e=>e.startsWith(`id=`));return i!==-1&&(r=n[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:r,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let n=e.split(`;`);for(let e=0;e<n.length&&!(t>=this._specialColors.length);++e,++t)if(n[e]===`?`)this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let r=o4(n[e]);r&&this._onColor.fire([{type:1,index:this._specialColors[t],color:r}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],n=e.split(`;`);for(let e=0;e<n.length;++e)if(/^\d+$/.exec(n[e])){let r=parseInt(n[e]);_4(r)&&t.push({type:2,index:r})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug(`Serial port requested application keypad.`),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug(`Switching back to normal keypad.`),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,g2),!0}selectCharset(e){return e.length===2?(e[0]===`/`||this._charsetService.setgCharset(l4[e[0]],h2[e[1]]||g2),!0):(this.selectDefaultCharset(),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=i2.clone(),this._eraseAttrDataInternal=i2.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new jX;e.content=4194373,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let n=this._activeBuffer.ybase+this._activeBuffer.y+t,r=this._activeBuffer.lines.get(n);r&&(r.fill(e),r.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let n=e=>(this._coreService.triggerDataEvent(`${Q.ESC}${e}${Q.ESC}\\`),!0),r=this._bufferService.buffer,i=this._optionsService.rawOptions;return n(e===`"q`?`P1$r${+!!this._curAttrData.isProtected()}"q`:e===`"p`?`P1$r61;1"p`:e===`r`?`P1$r${r.scrollTop+1};${r.scrollBottom+1}r`:e===`m`?`P1$r0m`:e===` q`?`P1$r${{block:2,underline:4,bar:6}[i.cursorStyle]-+!!i.cursorBlink} q`:`P0$r`)}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},g4=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(m4=e,e=t,t=m4),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};g4=dX([X(0,RX)],g4);function _4(e){return 0<=e&&e<256}var v4=5e7,y4=12,b4=50,x4=class extends DZ{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new Z),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let n;for(;n=this._writeBuffer.shift();){this._action(n);let e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>v4)throw Error(`write data discarded, use flow control to avoid losing data`);if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let n=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let e=this._writeBuffer[this._bufferOffset],r=this._action(e,t);if(r){r.catch(e=>(queueMicrotask(()=>{throw e}),Promise.resolve(!1))).then(e=>performance.now()-n>=y4?setTimeout(()=>this._innerWrite(0,e)):this._innerWrite(n,e));return}let i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=e.length,performance.now()-n>=y4)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>b4&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},S4=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let n=t.addMarker(t.ybase+t.y),r={data:e,id:this._nextId++,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(r,n)),this._dataByLinkId.set(r.id,r),r.id}let n=e,r=this._getEntryIdKey(n),i=this._entriesWithId.get(r);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;let a=t.addMarker(t.ybase+t.y),o={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[a]};return a.onDispose(()=>this._removeMarkerFromLink(o,a)),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(e,t){let n=this._dataByLinkId.get(e);if(n&&n.lines.every(e=>e.line!==t)){let e=this._bufferService.buffer.addMarker(t);n.lines.push(e),e.onDispose(()=>this._removeMarkerFromLink(n,e))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let n=e.lines.indexOf(t);n!==-1&&(e.lines.splice(n,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};S4=dX([X(0,RX)],S4);var C4=!1,w4=class extends DZ{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new OZ),this._onBinary=this._register(new Z),this.onBinary=this._onBinary.event,this._onData=this._register(new Z),this.onData=this._onData.event,this._onLineFeed=this._register(new Z),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new Z),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new Z),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new Z),this._instantiationService=new Z0,this.optionsService=this._register(new T2(e)),this._instantiationService.setService(WX,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(S2)),this._instantiationService.setService(RX,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(e2)),this._instantiationService.setService(UX,this._logService),this.coreService=this._register(this._instantiationService.createInstance(A2)),this._instantiationService.setService(BX,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(F2)),this._instantiationService.setService(zX,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(V2)),this._instantiationService.setService(KX,this.unicodeService),this._charsetService=this._instantiationService.createInstance(H2),this._instantiationService.setService(VX,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(S4),this._instantiationService.setService(GX,this._oscLinkService),this._inputHandler=this._register(new h4(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(FZ.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(FZ.forward(this._bufferService.onResize,this._onResize)),this._register(FZ.forward(this.coreService.onData,this._onData)),this._register(FZ.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange([`windowsMode`,`windowsPty`],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new x4((e,t)=>this._inputHandler.parse(e,t))),this._register(FZ.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new Z),this._onScroll.event(e=>{this._onScrollApi?.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!C4&&(this._logService.warn(`writeSync is unreliable and will be removed soon.`),C4=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,b2),t=Math.max(t,x2),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend===`conpty`&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(U2.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:`H`},()=>(U2(this._bufferService),!1))),this._windowsWrappingHeuristics.value=wZ(()=>{for(let t of e)t.dispose()})}}},T4={48:[`0`,`)`],49:[`1`,`!`],50:[`2`,`@`],51:[`3`,`#`],52:[`4`,`$`],53:[`5`,`%`],54:[`6`,`^`],55:[`7`,`&`],56:[`8`,`*`],57:[`9`,`(`],186:[`;`,`:`],187:[`=`,`+`],188:[`,`,`<`],189:[`-`,`_`],190:[`.`,`>`],191:[`/`,`?`],192:["`",`~`],219:[`[`,`{`],220:[`\\`,`|`],221:[`]`,`}`],222:[`'`,`"`]};function E4(e,t,n,r){let i={type:0,cancel:!1,key:void 0},a=+!!e.shiftKey|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key===`UIKeyInputUpArrow`?i.key=t?Q.ESC+`OA`:Q.ESC+`[A`:e.key===`UIKeyInputLeftArrow`?i.key=t?Q.ESC+`OD`:Q.ESC+`[D`:e.key===`UIKeyInputRightArrow`?i.key=t?Q.ESC+`OC`:Q.ESC+`[C`:e.key===`UIKeyInputDownArrow`&&(i.key=t?Q.ESC+`OB`:Q.ESC+`[B`);break;case 8:i.key=e.ctrlKey?`\b`:Q.DEL,e.altKey&&(i.key=Q.ESC+i.key);break;case 9:if(e.shiftKey){i.key=Q.ESC+`[Z`;break}i.key=Q.HT,i.cancel=!0;break;case 13:i.key=e.altKey?Q.ESC+Q.CR:Q.CR,i.cancel=!0;break;case 27:i.key=Q.ESC,e.altKey&&(i.key=Q.ESC+Q.ESC),i.cancel=!0;break;case 37:if(e.metaKey)break;i.key=a?Q.ESC+`[1;`+(a+1)+`D`:t?Q.ESC+`OD`:Q.ESC+`[D`;break;case 39:if(e.metaKey)break;i.key=a?Q.ESC+`[1;`+(a+1)+`C`:t?Q.ESC+`OC`:Q.ESC+`[C`;break;case 38:if(e.metaKey)break;i.key=a?Q.ESC+`[1;`+(a+1)+`A`:t?Q.ESC+`OA`:Q.ESC+`[A`;break;case 40:if(e.metaKey)break;i.key=a?Q.ESC+`[1;`+(a+1)+`B`:t?Q.ESC+`OB`:Q.ESC+`[B`;break;case 45:!e.shiftKey&&!e.ctrlKey&&(i.key=Q.ESC+`[2~`);break;case 46:i.key=a?Q.ESC+`[3;`+(a+1)+`~`:Q.ESC+`[3~`;break;case 36:i.key=a?Q.ESC+`[1;`+(a+1)+`H`:t?Q.ESC+`OH`:Q.ESC+`[H`;break;case 35:i.key=a?Q.ESC+`[1;`+(a+1)+`F`:t?Q.ESC+`OF`:Q.ESC+`[F`;break;case 33:e.shiftKey?i.type=2:i.key=e.ctrlKey?Q.ESC+`[5;`+(a+1)+`~`:Q.ESC+`[5~`;break;case 34:e.shiftKey?i.type=3:i.key=e.ctrlKey?Q.ESC+`[6;`+(a+1)+`~`:Q.ESC+`[6~`;break;case 112:i.key=a?Q.ESC+`[1;`+(a+1)+`P`:Q.ESC+`OP`;break;case 113:i.key=a?Q.ESC+`[1;`+(a+1)+`Q`:Q.ESC+`OQ`;break;case 114:i.key=a?Q.ESC+`[1;`+(a+1)+`R`:Q.ESC+`OR`;break;case 115:i.key=a?Q.ESC+`[1;`+(a+1)+`S`:Q.ESC+`OS`;break;case 116:i.key=a?Q.ESC+`[15;`+(a+1)+`~`:Q.ESC+`[15~`;break;case 117:i.key=a?Q.ESC+`[17;`+(a+1)+`~`:Q.ESC+`[17~`;break;case 118:i.key=a?Q.ESC+`[18;`+(a+1)+`~`:Q.ESC+`[18~`;break;case 119:i.key=a?Q.ESC+`[19;`+(a+1)+`~`:Q.ESC+`[19~`;break;case 120:i.key=a?Q.ESC+`[20;`+(a+1)+`~`:Q.ESC+`[20~`;break;case 121:i.key=a?Q.ESC+`[21;`+(a+1)+`~`:Q.ESC+`[21~`;break;case 122:i.key=a?Q.ESC+`[23;`+(a+1)+`~`:Q.ESC+`[23~`;break;case 123:i.key=a?Q.ESC+`[24;`+(a+1)+`~`:Q.ESC+`[24~`;break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?i.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?i.key=Q.NUL:e.keyCode>=51&&e.keyCode<=55?i.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?i.key=Q.DEL:e.keyCode===219?i.key=Q.ESC:e.keyCode===220?i.key=Q.FS:e.keyCode===221&&(i.key=Q.GS);else if((!n||r)&&e.altKey&&!e.metaKey){let t=T4[e.keyCode]?.[+!!e.shiftKey];if(t)i.key=Q.ESC+t;else if(e.keyCode>=65&&e.keyCode<=90){let t=e.ctrlKey?e.keyCode-64:e.keyCode+32,n=String.fromCharCode(t);e.shiftKey&&(n=n.toUpperCase()),i.key=Q.ESC+n}else if(e.keyCode===32)i.key=Q.ESC+(e.ctrlKey?Q.NUL:` `);else if(e.key===`Dead`&&e.code.startsWith(`Key`)){let t=e.code.slice(3,4);e.shiftKey||(t=t.toLowerCase()),i.key=Q.ESC+t,i.cancel=!0}}else n&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(i.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?i.key=e.key:e.key&&e.ctrlKey&&(e.key===`_`&&(i.key=Q.US),e.key===`@`&&(i.key=Q.NUL))}return i}var D4=0,O4=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new m0,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new m0,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((e,t)=>this._getKey(e)-this._getKey(t)),t=0,n=0,r=Array(this._array.length+this._insertedValues.length);for(let i=0;i<r.length;i++)n>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[n])?(r[i]=e[t],t++):r[i]=this._array[n++];this._array=r,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(D4=this._search(t),D4===-1)||this._getKey(this._array[D4])!==t)return!1;do if(this._array[D4]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(D4),!0;while(++D4<this._array.length&&this._getKey(this._array[D4])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((e,t)=>e-t),t=0,n=Array(this._array.length-e.length),r=0;for(let i=0;i<this._array.length;i++)e[t]===i?t++:n[r++]=this._array[i];this._array=n,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(D4=this._search(e),!(D4<0||D4>=this._array.length)&&this._getKey(this._array[D4])===e))do yield this._array[D4];while(++D4<this._array.length&&this._getKey(this._array[D4])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(D4=this._search(e),!(D4<0||D4>=this._array.length)&&this._getKey(this._array[D4])===e))do t(this._array[D4]);while(++D4<this._array.length&&this._getKey(this._array[D4])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,n=this._array.length-1;for(;n>=t;){let r=t+n>>1,i=this._getKey(this._array[r]);if(i>e)n=r-1;else if(i<e)t=r+1;else{for(;r>0&&this._getKey(this._array[r-1])===e;)r--;return r}}return t}},k4=0,A4=0,j4=class extends DZ{constructor(){super(),this._decorations=new O4(e=>e?.marker.line),this._onDecorationRegistered=this._register(new Z),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new Z),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(wZ(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new M4(e);if(t){let e=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),e.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,n){let r=0,i=0;for(let a of this._decorations.getKeyIterator(t))r=a.options.x??0,i=r+(a.options.width??1),e>=r&&e<i&&(!n||(a.options.layer??`bottom`)===n)&&(yield a)}forEachDecorationAtCell(e,t,n,r){this._decorations.forEachByKey(t,t=>{k4=t.options.x??0,A4=k4+(t.options.width??1),e>=k4&&e<A4&&(!n||(t.options.layer??`bottom`)===n)&&r(t)})}},M4=class extends EZ{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new Z),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new Z),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position=`full`)}get backgroundColorRGB(){return this._cachedBg===null&&(this._cachedBg=this.options.backgroundColor?g1.toColor(this.options.backgroundColor):void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this._cachedFg=this.options.foregroundColor?g1.toColor(this.options.foregroundColor):void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},N4=1e3,P4=class{constructor(e,t=N4){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,n){this._rowCount=n,e=e===void 0?0:e,t=t===void 0?this._rowCount-1:t,this._rowStart=this._rowStart===void 0?e:Math.min(this._rowStart,e),this._rowEnd=this._rowEnd===void 0?t:Math.max(this._rowEnd,t);let r=performance.now();if(r-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){let e=r-this._lastRefreshMs,t=this._debounceThresholdMS-e;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},t)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},F4=20,I4=class extends DZ{constructor(e,t,n,r){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce=``;let i=this._coreBrowserService.mainDocument;this._accessibilityContainer=i.createElement(`div`),this._accessibilityContainer.classList.add(`xterm-accessibility`),this._rowContainer=i.createElement(`div`),this._rowContainer.setAttribute(`role`,`list`),this._rowContainer.classList.add(`xterm-accessibility-tree`),this._rowElements=[];for(let e=0;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);if(this._topBoundaryFocusListener=e=>this._handleBoundaryFocus(e,0),this._bottomBoundaryFocusListener=e=>this._handleBoundaryFocus(e,1),this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=i.createElement(`div`),this._liveRegion.classList.add(`live-region`),this._liveRegion.setAttribute(`aria-live`,`assertive`),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new P4(this._renderRows.bind(this))),!this._terminal.element)throw Error(`Cannot enable accessibility before Terminal.open`);this._terminal.element.insertAdjacentElement(`afterbegin`,this._accessibilityContainer),this._register(this._terminal.onResize(e=>this._handleResize(e.rows))),this._register(this._terminal.onRender(e=>this._refreshRows(e.start,e.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(e=>this._handleChar(e))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
124
+ `))),this._register(this._terminal.onA11yTab(e=>this._handleTab(e))),this._register(this._terminal.onKey(e=>this._handleKey(e.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(l$(i,`selectionchange`,()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(wZ(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(` `)}_handleChar(e){this._liveRegionLineCount<F4+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
125
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===F4+1&&(this._liveRegion.textContent+=hX.get())))}_clearLiveRegion(){this._liveRegion.textContent=``,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let e=n.lines.get(n.ydisp+i),t=[],a=e?.translateToString(!0,void 0,void 0,t)||``,o=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(a.length===0?(s.textContent=`\xA0`,this._rowColumns.set(s,[0,1])):(s.textContent=a,this._rowColumns.set(s,t)),s.setAttribute(`aria-posinset`,o),s.setAttribute(`aria-setsize`,r),this._alignRowWidth(s))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce=``)}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute(`aria-posinset`)===(t===0?`1`:`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==r)return;let i,a;if(t===0?(i=n,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(i=this._rowElements.shift(),a=n,this._rowContainer.removeChild(i)),i.removeEventListener(`focus`,this._topBoundaryFocusListener),a.removeEventListener(`focus`,this._bottomBoundaryFocusListener),t===0){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement(`afterbegin`,e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error(`anchorNode and/or focusNode are null`);return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let i=({node:e,offset:t})=>{let n=e instanceof Text?e.parentNode:e,r=parseInt(n?.getAttribute(`aria-posinset`),10)-1;if(isNaN(r))return console.warn(`row is invalid. Race condition?`),null;let i=this._rowColumns.get(n);if(!i)return console.warn(`columns is null. Race condition?`),null;let a=t<i.length?i[t]:i.slice(-1)[0]+1;return a>=this._terminal.cols&&(++r,a=0),{row:r,column:a}},a=i(t),o=i(n);if(a&&o){if(a.row>o.row||a.row===o.row&&a.column>=o.column)throw Error(`invalid range`);this._terminal.select(a.column,a.row,(o.row-a.row)*this._terminal.cols-a.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener(`focus`,this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement(`div`);return e.setAttribute(`role`,`listitem`),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform=``;let t=e.getBoundingClientRect().width,n=this._rowColumns.get(e)?.slice(-1)?.[0];if(!n)return;let r=n*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${r/t})`}};I4=dX([X(1,HX),X(2,ZX),X(3,$X)],I4);var L4=class extends DZ{constructor(e,t,n,r,i){super(),this._element=e,this._mouseService=t,this._renderService=n,this._bufferService=r,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new Z),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new Z),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(wZ(()=>{SZ(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(l$(this._element,`mouseleave`,()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(l$(this._element,`mousemove`,this._handleMouseMove.bind(this))),this._register(l$(this._element,`mousedown`,this._handleMouseDown.bind(this))),this._register(l$(this._element,`mouseup`,this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let n=e.composedPath();for(let e=0;e<n.length;e++){let t=n[e];if(t.classList.contains(`xterm`))break;if(t.classList.contains(`xterm-hover`))return}this._lastBufferCell&&t.x===this._lastBufferCell.x&&t.y===this._lastBufferCell.y||(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){this._activeLine!==e.y||this._wasResized?(this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1):this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){this._activeProviderReplies&&t||(this._activeProviderReplies?.forEach(e=>{e?.forEach(e=>{e.link.dispose&&e.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[r,i]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(r)&&(n=this._checkLinkProviderResult(r,e,n)):i.provideLinks(e.y,t=>{if(this._isMouseOut)return;let i=t?.map(e=>({link:e}));this._activeProviderReplies?.set(r,i),n=this._checkLinkProviderResult(r,e,n),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let n=new Set;for(let r=0;r<t.size;r++){let i=t.get(r);if(i)for(let t=0;t<i.length;t++){let r=i[t],a=r.link.range.start.y<e?0:r.link.range.start.x,o=r.link.range.end.y>e?this._bufferService.cols:r.link.range.end.x;for(let e=a;e<=o;e++){if(n.has(e)){i.splice(t--,1);break}n.add(e)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;let r=this._activeProviderReplies.get(e),i=!1;for(let t=0;t<e;t++)(!this._activeProviderReplies.has(t)||this._activeProviderReplies.get(t))&&(i=!0);if(!i&&r){let e=r.find(e=>this._linkAtPosition(e.link,t));e&&(n=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let e=0;e<this._activeProviderReplies.size;e++){let r=this._activeProviderReplies.get(e)?.find(e=>this._linkAtPosition(e.link,t));if(r){n=!0,this._handleNewLink(r);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&R4(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,SZ(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:e=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle(`xterm-cursor-pointer`,e))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(e=>{if(!this._currentLink)return;let t=e.start===0?0:e.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent)){let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._askForLink(e,!1)}})))}_linkHover(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add(`xterm-cursor-pointer`)),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){let n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove(`xterm-cursor-pointer`)),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){let n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t,n){let r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};L4=dX([X(1,QX),X(2,$X),X(3,RX),X(4,rZ)],L4);function R4(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var z4=class extends w4{constructor(e={}){super(e),this._linkifier=this._register(new OZ),this.browser=Z1,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new OZ),this._onCursorMove=this._register(new Z),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new Z),this.onKey=this._onKey.event,this._onRender=this._register(new Z),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new Z),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new Z),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new Z),this.onBell=this._onBell.event,this._onFocus=this._register(new Z),this._onBlur=this._register(new Z),this._onA11yCharEmitter=this._register(new Z),this._onA11yTabEmitter=this._register(new Z),this._onWillOpen=this._register(new Z),this._setup(),this._decorationService=this._instantiationService.createInstance(j4),this._instantiationService.setService(qX,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(K1),this._instantiationService.setService(rZ,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(JX)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(e=>this.refresh(e?.start??0,e?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(e=>this._reportWindowsOptions(e))),this._register(this._inputHandler.onColor(e=>this._handleColorEvent(e))),this._register(FZ.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(FZ.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(FZ.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(FZ.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(e=>this._afterResize(e.cols,e.rows))),this._register(wZ(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let e,n=``;switch(t.index){case 256:e=`foreground`,n=`10`;break;case 257:e=`background`,n=`11`;break;case 258:e=`cursor`,n=`12`;break;default:e=`ansi`,n=`4;`+t.index}switch(t.type){case 0:let r=h1.toColorRGB(e===`ansi`?this._themeService.colors.ansi[t.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent(`${Q.ESC}]${n};${c4(r)}${s1.ST}`);break;case 1:if(e===`ansi`)this._themeService.modifyColors(e=>e.ansi[t.index]=m1.toColor(...t.color));else{let n=e;this._themeService.modifyColors(e=>e[n]=m1.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(I4,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Q.ESC+`[I`),this.element.classList.add(`focus`),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value=``,this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Q.ESC+`[O`),this.element.classList.remove(`focus`),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),a=this._renderService.dimensions.css.cell.width*i,o=this.buffer.y*this._renderService.dimensions.css.cell.height,s=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+`px`,this.textarea.style.top=o+`px`,this.textarea.style.width=a+`px`,this.textarea.style.height=r+`px`,this.textarea.style.lineHeight=r+`px`,this.textarea.style.zIndex=`-5`}_initGlobal(){this._bindKeys(),this._register(l$(this.element,`copy`,e=>{this.hasSelection()&&vX(e,this._selectionService)}));let e=e=>yX(e,this.textarea,this.coreService,this.optionsService);this._register(l$(this.textarea,`paste`,e)),this._register(l$(this.element,`paste`,e)),t0?this._register(l$(this.element,`mousedown`,e=>{e.button===2&&SX(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(l$(this.element,`contextmenu`,e=>{SX(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),l0&&this._register(l$(this.element,`auxclick`,e=>{e.button===1&&xX(e,this.textarea,this.screenElement)}))}_bindKeys(){this._register(l$(this.textarea,`keyup`,e=>this._keyUp(e),!0)),this._register(l$(this.textarea,`keydown`,e=>this._keyDown(e),!0)),this._register(l$(this.textarea,`keypress`,e=>this._keyPress(e),!0)),this._register(l$(this.textarea,`compositionstart`,()=>this._compositionHelper.compositionstart())),this._register(l$(this.textarea,`compositionupdate`,e=>this._compositionHelper.compositionupdate(e))),this._register(l$(this.textarea,`compositionend`,()=>this._compositionHelper.compositionend())),this._register(l$(this.textarea,`input`,e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw Error(`Terminal requires a parent element.`);if(e.isConnected||this._logService.debug(`Terminal.open was called on an element that was not attached to the DOM`),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement(`div`),this.element.dir=`ltr`,this.element.classList.add(`terminal`),this.element.classList.add(`xterm`),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement(`div`),this._viewportElement.classList.add(`xterm-viewport`),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement(`div`),this.screenElement.classList.add(`xterm-screen`),this._register(l$(this.screenElement,`mousemove`,e=>this.updateCursorStyle(e))),this._helperContainer=this._document.createElement(`div`),this._helperContainer.classList.add(`xterm-helpers`),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let n=this.textarea=this._document.createElement(`textarea`);this.textarea.classList.add(`xterm-helper-textarea`),this.textarea.setAttribute(`aria-label`,pX.get()),u0||this.textarea.setAttribute(`aria-multiline`,`false`),this.textarea.setAttribute(`autocorrect`,`off`),this.textarea.setAttribute(`autocapitalize`,`off`),this.textarea.setAttribute(`spellcheck`,`false`),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange(`disableStdin`,()=>n.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(W1,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<`u`?window.document:null)),this._instantiationService.setService(ZX,this._coreBrowserService),this._register(l$(this.textarea,`focus`,e=>this._handleTextAreaFocus(e))),this._register(l$(this.textarea,`blur`,()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(B1,this._document,this._helperContainer),this._instantiationService.setService(XX,this._charSizeService),this._themeService=this._instantiationService.createInstance(J0),this._instantiationService.setService(nZ,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S1),this._instantiationService.setService(tZ,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(g0,this.rows,this.screenElement)),this._instantiationService.setService($X,this._renderService),this._register(this._renderService.onRenderedViewportChange(e=>this._onRender.fire(e))),this.onResize(e=>this._renderService.resize(e.cols,e.rows)),this._compositionView=this._document.createElement(`div`),this._compositionView.classList.add(`composition-view`),this._compositionHelper=this._instantiationService.createInstance(c1,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(Y1),this._instantiationService.setService(QX,this._mouseService);let r=this._linkifier.value=this._register(this._instantiationService.createInstance(L4,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance($$,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(e=>{super.scrollLines(e,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(R0,this.element,this.screenElement,r)),this._instantiationService.setService(eZ,this._selectionService),this._register(this._selectionService.onRequestScrollLines(e=>this.scrollLines(e.amount,e.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()})),this._register(FZ.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(e1,this.screenElement)),this._register(l$(this.element,`mousedown`,e=>this._selectionService.handleMouseDown(e))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add(`enable-mouse-events`)):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(I4,this)),this._register(this.optionsService.onSpecificOptionChange(`screenReaderMode`,e=>this._handleScreenReaderModeOptionChange(e))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(a1,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange(`overviewRuler`,e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(a1,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(z1,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function n(t){let n=e._mouseService.getMouseReportCoords(t,e.screenElement);if(!n)return!1;let r,i;switch(t.overrideType||t.type){case`mousemove`:i=32,t.buttons===void 0?(r=3,t.button!==void 0&&(r=t.button<3?t.button:3)):r=t.buttons&1?0:t.buttons&4?1:t.buttons&2?2:3;break;case`mouseup`:i=0,r=t.button<3?t.button:3;break;case`mousedown`:i=1,r=t.button<3?t.button:3;break;case`wheel`:if(e._customWheelEventHandler&&e._customWheelEventHandler(t)===!1)return!1;let n=t.deltaY;if(n===0||e.coreMouseService.consumeWheelEvent(t,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;i=n<0?0:1,r=4;break;default:return!1}return i===void 0||r===void 0||r>4?!1:e.coreMouseService.triggerMouseEvent({col:n.col,row:n.row,x:n.x,y:n.y,button:r,action:i,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}let r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},i={mouseup:e=>(n(e),e.buttons||(this._document.removeEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.removeEventListener(`mousemove`,r.mousedrag)),this.cancel(e)),wheel:e=>(n(e),this.cancel(e,!0)),mousedrag:e=>{e.buttons&&n(e)},mousemove:e=>{e.buttons||n(e)}};this._register(this.coreMouseService.onProtocolChange(e=>{e?(this.optionsService.rawOptions.logLevel===`debug`&&this._logService.debug(`Binding to mouse events:`,this.coreMouseService.explainEvents(e)),this.element.classList.add(`enable-mouse-events`),this._selectionService.disable()):(this._logService.debug(`Unbinding from mouse events.`),this.element.classList.remove(`enable-mouse-events`),this._selectionService.enable()),e&8?r.mousemove||=(t.addEventListener(`mousemove`,i.mousemove),i.mousemove):(t.removeEventListener(`mousemove`,r.mousemove),r.mousemove=null),e&16?r.wheel||=(t.addEventListener(`wheel`,i.wheel,{passive:!1}),i.wheel):(t.removeEventListener(`wheel`,r.wheel),r.wheel=null),e&2?r.mouseup||=i.mouseup:(this._document.removeEventListener(`mouseup`,r.mouseup),r.mouseup=null),e&4?r.mousedrag||=i.mousedrag:(this._document.removeEventListener(`mousemove`,r.mousedrag),r.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(l$(t,`mousedown`,e=>{if(e.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(e))return n(e),r.mouseup&&this._document.addEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.addEventListener(`mousemove`,r.mousedrag),this.cancel(e)})),this._register(l$(t,`wheel`,t=>{if(!r.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(t)===!1)return!1;if(!this.buffer.hasScrollback){if(t.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(t,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(t,!0);let n=Q.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?`O`:`[`)+(t.deltaY<0?`A`:`B`);return this.coreService.triggerDataEvent(n,!0),this.cancel(t,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add(`column-select`):this.element.classList.remove(`column-select`)}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){bX(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:``}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;t||e.key!==`Dead`&&e.key!==`AltGraph`||(this._unprocessedDeadKey=!0);let n=E4(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),n.type===3||n.type===2){let t=this.rows-1;return this.scrollLines(n.type===2?-t:t),this.cancel(e,!0)}if(n.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((n.key===Q.ETX||n.key===Q.CR)&&(this.textarea.value=``),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState(`AltGraph`);return t.type===`keypress`?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(B4(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType===`insertText`&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){e===this.cols&&t===this.rows?this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure():super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(i2));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains(`focus`)?this.coreService.triggerDataEvent(Q.ESC+`[I`):this.coreService.triggerDataEvent(Q.ESC+`[O`)}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let e=this._renderService.dimensions.css.canvas.width.toFixed(0),t=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Q.ESC}[4;${t};${e}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Q.ESC}[6;${r};${n}t`)}}cancel(e,t){if(this.options.cancelEvents||t)return e.preventDefault(),e.stopPropagation(),!1}};function B4(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var V4=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n<this._addons.length;n++)if(this._addons[n]===e){t=n;break}if(t===-1)throw Error(`Could not dispose an addon that has not been loaded`);e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},H4=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new jX)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}},U4=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new H4(t)}getNullCell(){return new jX}},W4=class extends DZ{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new Z),this.onBufferChange=this._onBufferChange.event,this._normal=new U4(this._core.buffers.normal,`normal`),this._alternate=new U4(this._core.buffers.alt,`alternate`),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw Error(`Active buffer is neither normal nor alternate`)}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},G4=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,e=>t(e.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(e,n)=>t(e,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},K4=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},q4=[`cols`,`rows`],J4=0,Y4=class extends DZ{constructor(e){super(),this._core=this._register(new z4(e)),this._addonManager=this._register(new V4),this._publicOptions={...this._core.options};let t=e=>this._core.options[e],n=(e,t)=>{this._checkReadonlyOptions(e),this._core.options[e]=t};for(let e in this._core.options){let r={get:t.bind(this,e),set:n.bind(this,e)};Object.defineProperty(this._publicOptions,e,r)}}_checkReadonlyOptions(e){if(q4.includes(e))throw Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw Error(`You must set the allowProposedApi option to true to use proposed API`)}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||=new G4(this._core),this._parser}get unicode(){return this._checkProposedApi(),new K4(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||=this._register(new W4(this._core)),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t=`none`;switch(this._core.coreMouseService.activeProtocol){case`X10`:t=`x10`;break;case`VT200`:t=`vt200`;break;case`DRAG`:t=`drag`;break;case`ANY`:t=`any`}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
126
+ `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return pX.get()},set promptLabel(e){pX.set(e)},get tooMuchOutput(){return hX.get()},set tooMuchOutput(e){hX.set(e)}}}_verifyIntegers(...e){for(J4 of e)if(J4===1/0||isNaN(J4)||J4%1!=0)throw Error(`This API only accepts integers`)}_verifyPositiveIntegers(...e){for(J4 of e)if(J4&&(J4===1/0||isNaN(J4)||J4%1!=0||J4<0))throw Error(`This API only accepts positive integers`)}},X4=(0,h.createContext)(null);function Z4({children:e,windows:t}){let[n]=(0,h.useState)(()=>new Map);return(0,h.useEffect)(()=>{if(!n.size)return;let e=new Set(t.flatMap(e=>e.tabs.map(e=>e.id)));for(let[t,r]of n)e.has(t)||(r.terminal.dispose(),n.delete(t))},[n,t]),(0,h.useEffect)(()=>()=>{for(let e of n.values())e.terminal.dispose();n.clear()},[n]),(0,g.jsx)(X4.Provider,{value:n,children:e})}function Q4(){let e=(0,h.useContext)(X4);if(!e)throw Error(`Terminal screen provider is missing`);return e}function $4(){let e=new Y4({fontSize:12,fontFamily:`ui-monospace, Menlo, monospace`,cursorBlink:!0,scrollback:2e3,disableStdin:!0,theme:{background:`#0f1115`,foreground:`#d7dae0`}}),t=new sX;return e.loadAddon(t),{terminal:e,fit:t,cursor:0,log:``,gap:!1,ready:!1,pendingWrite:Promise.resolve()}}var e3={CREATED:`正在创建`,RUNNING:`运行中`,STOPPING:`正在终止`,EXITED:`已退出`,TERMINATED:`已终止`,INTERRUPTED:`已中断`};function t3({id:e,tabId:t,visible:n}){let r=Q4(),i=Jg({queryKey:VK(e),queryFn:()=>WK(e),enabled:n,staleTime:0,refetchOnMount:`always`,refetchInterval:2e3}),a=i.data?HK(i.data.status):!1,o=i.isFetchedAfterMount&&i.isSuccess,[s,c]=(0,h.useState)(!1);(0,h.useEffect)(()=>{o&&c(!0)},[o]);let l=(o||s)&&!!i.data&&!a,u=i.data?UK(i.data):null;(0,h.useEffect)(()=>{if(u===null)return;let t=zM.getState();t.windows.some(t=>t.tabs.some(t=>t.resourceId===e&&t.title!==u))&&zM.setState({windows:t.windows.map(t=>({...t,tabs:t.tabs.map(t=>t.resourceId===e&&t.title!==u?{...t,title:u}:t)}))})},[e,u]);let d=(0,h.useRef)(i.data);d.current=i.data;let f=(0,h.useRef)(null),p=(0,h.useRef)(null),m=(0,h.useRef)(null),_=(0,h.useRef)(!1),[v,y]=(0,h.useState)(null);(0,h.useEffect)(()=>{y(document.getElementById(`terminal-controls-${t}`))},[t]);let[b,x]=(0,h.useState)(!1),[S,C]=(0,h.useState)(null),[w,T]=(0,h.useState)(``),[E,D]=(0,h.useState)(``),[O,k]=(0,h.useState)(!1),[A,j]=(0,h.useState)(``),[M,N]=(0,h.useState)(!0),[P,ee]=(0,h.useState)(!1),[F,I]=(0,h.useState)(Date.now()),te=i.data?.lease,ne=n&&!!S&&te?.ownerConnectionId===S&&te.expiresAt>F&&i.data?.status===`RUNNING`&&!i.isError,re=ne&&b,ie=te?.ownerType===`agent`&&te.expiresAt>F&&i.data?.status===`RUNNING`&&!i.isError;(0,h.useLayoutEffect)(()=>{if(a){r.get(t)?.terminal.dispose(),r.delete(t),j(``);return}let e=f.current;if(!l||!e)return;let n=r.get(t)??$4();r.set(t,n),p.current=n;let i=n.terminal;return i.element?e.appendChild(i.element):i.open(e),k(n.gap),j(n.ready?n.log:``),N(!n.ready),()=>{p.current=null,i.element?.remove()}},[r,l,t,a]),(0,h.useLayoutEffect)(()=>{C(null),x(!1);let t=f.current,r=p.current;if(!n||!l||!t||!r)return;let{terminal:i,fit:a}=r;i.options.cursorBlink=!0,_.current=!1;let o=!1,s=!1,c=500,u,h,g=null,v=null,y=0,b=null,S=null,w=[],E=0;T(``);let D=()=>o?Promise.resolve():cM.invalidateQueries({queryKey:VK(e)}),O=()=>{let e=d.current;return!!g&&!!v&&e?.status===`RUNNING`&&e.lease?.ownerConnectionId===g&&e.lease.generation===v&&e.lease.expiresAt>Date.now()&&u?.readyState===WebSocket.OPEN},A=()=>{v=null,x(!1),S=null,w=[],E=0,i.options.disableStdin=!0},M=()=>{if(!O()||S!==null||!w.length)return;let t=w.shift();t!==void 0&&(E-=new TextEncoder().encode(t).length,S=++y,u?.send(JSON.stringify({type:`terminal.input`,terminalId:e,leaseGeneration:v,inputSequence:S,data:t})))},P=i.onData(e=>{if(!O())return;let t=new TextEncoder().encode(e).length;t>8192||E+t>32768?T(`输入过大,请分段粘贴(单次最多 8 KiB)。`):(w.push(e),E+=t,M())}),ee=()=>{r.ready||(r.ready=!0,j(r.log),N(!1))},F=async()=>{if(!(s||o)){s=!0;try{await r.pendingWrite;for(let t=0;t<8&&!o;t++){let t=GA.parse(await Y(`/api/terminals/${encodeURIComponent(e)}/output?after=${r.cursor}&limit=100`));if(o)return;r.gap||=t.resyncRequired||t.truncated;let n=r.cursor,a=[];for(let e of t.chunks)e.cursor<=n||(e.cursor!==n+1&&(r.gap=!0),a.push(e.data),n=e.cursor);r.gap&&k(!0);let s=Math.max(n,t.nextCursor);if(!a.length){r.cursor=s,ee();break}let c=a.join(``);r.pendingWrite=new Promise(e=>{i.write(c,()=>{r.cursor=s,r.log=(r.log+c).slice(-16384),e()})}),await r.pendingWrite,!o&&r.ready&&j(r.log)}}catch{o||(T(`输出读取失败,正在重试;历史可能不完整。`),ee())}finally{s=!1}}},te,ne=()=>{clearTimeout(te),te=setTimeout(()=>{!o&&t.clientWidth&&t.clientHeight&&(a.fit(),O()&&qK(e,`resize`,{connectionId:g,leaseGeneration:v,cols:Math.max(2,Math.min(500,i.cols)),rows:Math.max(1,Math.min(300,i.rows))}).catch(()=>{o||(A(),D(),T(`尺寸同步失败,请重新获取输入权。`))}))},100)},re=new ResizeObserver(ne);re.observe(t),ne();let ie=()=>{if(o)return;let t=new URL(`/ws`,location.href);t.protocol=t.protocol===`https:`?`wss:`:`ws:`;let n=new WebSocket(t);u=n,n.onopen=()=>n.send(JSON.stringify({type:`subscribe`,subscriptions:[{topic:`terminal`,resourceId:e,after:0}]})),n.onmessage=t=>{if(o||u!==n)return;let r;try{r=JSON.parse(String(t.data))}catch{A(),T(`终端响应无效,请刷新。`);return}let i=KA.safeParse(r);if(i.success&&i.data.subscription.resourceId===e){g=i.data.connectionId,c=500,D().then(()=>{!o&&u===n&&n.readyState===WebSocket.OPEN&&C(g)}),F();return}let a=qA.safeParse(r);if(a.success&&S===a.data.inputSequence){S=null,M();return}let s=UA.safeParse(r);if(s.success&&s.data.resourceId===e){(s.data.payload.lease?.generation!==v||s.data.payload.lease?.ownerConnectionId!==g||s.data.payload.status!==`RUNNING`)&&A(),D(),F();return}if(BA.safeParse(r).success){F();return}let l=JA.safeParse(r);l.success&&(A(),D(),T(`终端操作被拒绝(${l.data.code}),请重新获取输入权。`))},n.onclose=()=>{o||(g=null,C(null),A(),D(),T(`连接已断开,正在重连;不会重放输入。`),h=setTimeout(ie,c),c=Math.min(c*2,1e4))}},ae=t=>{t.lease&&(d.current=t,cM.setQueryData(VK(e),t),v=t.lease.generation,b!==v&&(y=0),b=v,x(!0),S=null,i.options.disableStdin=!1,i.focus(),ne(),T(``))};m.current={acquire:async()=>{if(!g)throw Error(`Disconnected`);let t=g,n=await qK(e,`lease`,{action:`acquire`,connectionId:t});o||g!==t||n.lease?.ownerConnectionId!==t||ae(n)},takeover:async()=>{if(!g)throw Error(`Disconnected`);let t=g,n=await qK(e,`takeover`,{connectionId:t});o||g!==t||n.lease?.ownerConnectionId!==t||ae(n)},release:async()=>{let t=d.current?.lease,n=t?.ownerConnectionId===g?t?.generation:v;A(),g&&n&&await qK(e,`lease`,{action:`release`,connectionId:g,leaseGeneration:n})}};let oe=setInterval(()=>{if(!O())return;let t=g,n=v;qK(e,`lease`,{action:`renew`,connectionId:g,leaseGeneration:v}).then(r=>{!o&&t===g&&n===v&&(d.current=r,cM.setQueryData(VK(e),r))}).catch(()=>{o||(A(),D(),T(`输入租约续期失败,请重新获取输入权。`))})},1e4),se=setInterval(()=>{I(Date.now()),i.options.disableStdin=!O(),O()||x(!1),F()},1e3);return ie(),()=>{o=!0,m.current=null,clearTimeout(h),clearTimeout(te),clearInterval(oe),clearInterval(se),re.disconnect(),P.dispose(),u?.close(),i.options.disableStdin=!0,i.options.cursorBlink=!1,i.blur()}},[e,l,n]),(0,h.useEffect)(()=>{if(!n||M||!S||!i.data||i.data.status!==`RUNNING`||i.isError||_.current||(_.current=!0,i.data.mode!==`shell`||i.data.lease&&i.data.lease.expiresAt>Date.now()))return;let t=!1;return ee(!0),m.current?.acquire().catch(()=>{t||cM.invalidateQueries({queryKey:VK(e)})}).finally(()=>{t||ee(!1)}),()=>{t=!0,ee(!1)}},[S,e,i.data,i.isError,M,n]);let ae=async e=>{ee(!0),T(``),D(``);try{await e()}catch{D(`终端操作失败,请刷新状态后重试。`)}finally{ee(!1)}};return(0,g.jsxs)(`div`,{"data-testid":`live-terminal`,"data-terminal-id":e,"data-input-state":re?`active`:ie?`agent`:`inactive`,className:`flex h-full min-h-0 flex-col bg-[#0f1115] text-white/80`,children:[v?(0,en.createPortal)((0,g.jsxs)(nm,{children:[(0,g.jsx)(rm,{asChild:!0,children:(0,g.jsx)(`button`,{type:`button`,"aria-label":`终端操作`,title:`终端操作`,className:`flex w-7 items-center justify-center text-ink-3 hover:bg-surface-2 hover:text-ink`,children:(0,g.jsx)(To,{size:14})})}),(0,g.jsx)(am,{onCloseAutoFocus:e=>{e.preventDefault(),re&&f.current?.querySelector(`.xterm-helper-textarea`)?.focus()},children:(0,g.jsx)(sm,{"aria-label":ne?`释放输入权`:ie?`接管控制`:`获取输入权`,disabled:P||M||!S||!i.data||i.isError||i.data.status!==`RUNNING`||!ne&&!ie&&!!te&&te.expiresAt>F,onSelect:()=>void ae(async()=>{ne?await m.current?.release():ie?await m.current?.takeover():await m.current?.acquire()}),children:ne?`交给 AI`:ie?`接管控制`:`输入终端`})})]}),v):null,i.data&&i.data.status!==`RUNNING`?(0,g.jsx)(`p`,{role:`status`,className:`px-2 text-xs`,children:e3[i.data.status]}):null,i.data?.reasonCode?(0,g.jsxs)(`p`,{className:`px-2 text-xs`,children:[`状态原因:`,i.data.reasonCode]}):null,i.data?.exitCode!==null&&i.data?.exitCode!==void 0?(0,g.jsxs)(`p`,{className:`px-2 text-xs`,children:[`退出码 `,i.data.exitCode]}):null,!a&&O?(0,g.jsx)(`p`,{role:`status`,className:`px-2 text-xs text-amber-300`,children:`部分历史输出已过期或缺失,当前回放不完整。`}):null,i.isError||!a&&w?(0,g.jsx)(`p`,{role:`alert`,className:`px-2 text-xs text-red-300`,children:!a&&w||`终端不可用,请刷新核对;不会自动重建。`}):null,(0,g.jsx)(qc,{message:!a&&n?E:null,onDismiss:()=>D(``)}),l?(0,g.jsxs)(g.Fragment,{children:[M?(0,g.jsx)(`p`,{role:`status`,className:`px-2 pt-2 text-xs text-white/60`,children:`正在恢复终端输出…`}):null,(0,g.jsx)(`div`,{ref:f,role:`application`,"aria-label":`交互终端`,className:B(`min-h-0 flex-1 p-2`,M&&`invisible`),onPointerDown:()=>{!ne&&!ie&&S&&!P&&(!te||te.expiresAt<=Date.now())&&i.data?.status===`RUNNING`&&ae(async()=>{await m.current?.acquire()})}}),(0,g.jsx)(`pre`,{role:`log`,"aria-label":`终端输出`,"aria-live":`off`,className:`sr-only`,children:A})]}):null]})}function n3({scope:e,label:t=`新建终端`,children:n,className:r}){let[i,a]=(0,h.useState)(null),[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(``);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`button`,{type:`button`,"aria-label":t,title:`新建终端`,className:r,onClick:()=>{l(``),a({key:crypto.randomUUID(),scope:e})},children:n??`新建终端`}),(0,g.jsx)(Jc,{open:i!==null,title:`创建终端确认`,description:`终端以本机账户权限运行,可访问项目外文件。`,confirmLabel:`确认创建`,pendingLabel:`正在创建…`,pending:o,error:c,onDismissError:()=>l(``),onCancel:()=>a(null),onConfirm:async()=>{if(i&&!o){s(!0),l(``);try{JK(await KK(i.scope,i.key)),a(null),cM.invalidateQueries({queryKey:[`terminals`]}),cM.invalidateQueries({queryKey:[`workspace`]})}catch{l(`创建结果未确认,请重试核对;重试不会重复创建。`)}finally{s(!1)}}}})]})}function r3(e,t){return`projectId`in t&&t.projectId!==`prj_default`?e.projectId===t.projectId:`sessionId`in t?e.workspaceSessionId===t.sessionId:!e.projectId&&!e.workspaceSessionId}async function i3(e,t){let n=[],r=new Set,i;do{t.throwIfAborted();let a=await GK(i,e);if(n.push(...a.items.filter(t=>t.status===`RUNNING`&&r3(t,e))),i=a.nextCursor??void 0,i){if(r.has(i))throw Error(`Repeated terminal cursor`);r.add(i)}}while(i);for(let r of n.reverse()){t.throwIfAborted();let n=await WK(r.id).catch(e=>{if(e instanceof dj&&e.status===404)return null;throw e});if(n){if(n.id!==r.id||!r3(n,e))throw Error(`Terminal scope changed`);if(n.status===`RUNNING`)return n}}return null}function a3({projectId:e,sessionId:t,visible:n=!0}){let r=e?{projectId:e}:t?{sessionId:t}:{workspace:`default`},{data:i,isFetchedAfterMount:a,isError:o,isFetching:s,refetch:c}=Jg({queryKey:[`terminals`,`restore`,e,t],queryFn:({signal:e})=>i3(r,e),enabled:n,staleTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1});return(0,h.useEffect)(()=>{n&&i&&a&&!o&&!s&&JK(i)},[i,a,o,s,n]),(0,g.jsx)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 p-3 text-[12px] text-ink`,children:o&&!s?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`p`,{role:`alert`,className:`text-ink-3`,children:`无法恢复终端,请重试。`}),(0,g.jsx)(`button`,{type:`button`,className:`text-accent`,onClick:()=>void c(),children:`重试`}),(0,g.jsx)(n3,{scope:r,className:`text-accent`})]}):!a||s||i?(0,g.jsx)(`p`,{role:`status`,className:`text-ink-3`,children:`正在读取终端…`}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(lc,{size:24,"aria-hidden":`true`,className:`text-ink-3/50`}),(0,g.jsx)(`p`,{className:`text-ink-3`,children:`暂无运行中的终端`}),(0,g.jsx)(n3,{scope:r,className:`rounded-lg bg-accent px-3 py-1.5 text-white`})]})})}function o3({tab:e,visible:t}){return e.resourceId===`terminal:empty`?(0,g.jsx)(a3,{projectId:e.projectId,sessionId:e.sourceSessionId??void 0,visible:t}):(0,g.jsx)(t3,{id:e.resourceId,tabId:e.id,visible:t},e.id)}function s3({tab:e,visible:t}){if(!e)return null;switch(e.kind){case`files`:return(0,g.jsx)(QY,{tab:e});case`terminal`:return(0,g.jsx)(o3,{tab:e,visible:t});case`services`:return(0,g.jsx)(nX,{tab:e});case`browser`:return(0,g.jsx)(UY,{tab:e});case`git-diff`:return(0,g.jsx)(JY,{tab:e});default:return null}}function c3({kind:e,path:t}){return e===`files`?(0,g.jsx)(dW,{path:t,size:14}):(0,g.jsx)(e===`terminal`?lc:e===`services`?tc:e===`browser`?Co:Xo,{size:11.5,className:`shrink-0 text-ink-3`})}function l3(e,t,n){return e?n??e:t===`session`?`独立会话`:`默认工作区`}function u3({window:e}){let[t,n]=(0,h.useState)(null),[r,i]=(0,h.useState)(``),a=CM(e=>e.saving),o=CM(e=>e.drafts),s=zM(e=>e.setActiveTab),c=zM(e=>e.closeTab),{data:l}=uM(),u=DM(e.tabs,e.filter),d=OM(u,e.activeTabId)?.id,f=u.filter(e=>e.kind!==`terminal`||e.resourceId!==`terminal:empty`),p=e.tabs[0]?.kind,m=(0,h.useRef)(null),[_,v]=(0,h.useState)(!1),[y,b]=(0,h.useState)(null);return(0,h.useEffect)(()=>{let t=m.current;if(!t||!e.tabs.length)return;let n=()=>v(t.scrollWidth>t.clientWidth+1),r=new ResizeObserver(n);return r.observe(t),n(),t.querySelector(`[data-tab-id="${d}"]`)?.scrollIntoView?.({block:`nearest`,inline:`nearest`}),()=>r.disconnect()},[e.tabs,d]),(0,g.jsxs)(`div`,{className:`relative flex h-8 shrink-0 items-stretch border-b border-line bg-surface-2/35`,children:[(0,g.jsx)(qc,{message:r,onDismiss:()=>i(``)}),_?(0,g.jsx)(`button`,{type:`button`,"aria-label":`向左滚动 Tab`,className:`shrink-0 px-1 text-ink-3 hover:text-ink`,onClick:()=>m.current?.scrollBy({left:-180,behavior:`smooth`}),children:(0,g.jsx)(Qa,{size:13})}):null,(0,g.jsx)(`div`,{ref:m,role:`tablist`,"aria-label":`窗口 Tab`,onKeyDown:t=>{if(!(t.target instanceof HTMLElement)||t.target.getAttribute(`role`)!==`tab`)return;let n=f.findIndex(e=>e.id===d),r=t.key===`ArrowRight`?(n+1)%f.length:t.key===`ArrowLeft`?(n-1+f.length)%f.length:t.key===`Home`?0:t.key===`End`?f.length-1:-1,i=f[r];i&&(t.preventDefault(),s(e.id,i.id),m.current?.querySelector(`[data-tab-id="${i.id}"]`)?.focus())},className:`window-tabs-scroll flex h-8 min-w-0 flex-1 items-end gap-0.5 overflow-x-auto overflow-y-hidden px-2`,onWheel:e=>{m.current&&Math.abs(e.deltaY)>Math.abs(e.deltaX)&&(m.current.scrollLeft+=e.deltaY)},children:f.map(r=>{let u=r.id===d,f=l.projects.find(e=>e.id===r.projectId)??null,p=l3(r.projectId,r.originType,f?.name);return(0,g.jsx)(`div`,{className:`flex shrink-0 items-end`,children:(0,g.jsxs)(`div`,{className:B(`group flex h-7 max-w-[220px] shrink-0 items-center gap-1.5 rounded-t-[8px] border border-b-0 px-2.5 text-[10.5px] transition-colors`,u?`border-line bg-surface text-ink`:`border-transparent text-ink-3 hover:bg-black/[.03] hover:text-ink-2 dark:hover:bg-white/[.04]`),children:[y?.id===r.id?(0,g.jsx)(`form`,{onSubmit:async e=>{e.preventDefault();try{await qK(r.resourceId,`rename`,{title:y.title}),b(null)}catch{i(`改名失败,请重试。`)}},children:(0,g.jsx)(fm,{ref:e=>e?.focus(),"aria-label":`终端名称`,maxLength:80,value:y.title,onChange:e=>b({...y,title:e.target.value}),onKeyDown:e=>{e.key===`Escape`&&b(null)},className:`h-5 w-32 border-accent/40 px-1 text-[11px]`})}):(0,g.jsxs)(`button`,{type:`button`,"data-tab-id":r.id,role:`tab`,"aria-selected":u,onDoubleClick:()=>{r.preview&&zM.getState().keepFileTab(r.id),r.kind===`terminal`&&r.resourceId.startsWith(`term_`)&&b({id:r.id,title:r.title})},onKeyDown:e=>{e.key===`F2`&&r.kind===`terminal`&&r.resourceId.startsWith(`term_`)&&(e.preventDefault(),b({id:r.id,title:r.title}))},onClick:()=>s(e.id,r.id),title:`${p} · ${r.title}${r.kind===`terminal`?` · 双击或 F2 改名`:r.preview?` · 预览,双击保留`:``}`,className:`flex min-w-0 flex-1 items-center gap-1.5 focus-visible:outline-none`,children:[(0,g.jsx)(c3,{kind:r.kind,path:r.file?.path??r.title}),(0,g.jsxs)(`span`,{className:B(`truncate`,r.preview&&`italic`),children:[r.title,o[r.resourceId]?` ●`:``]})]}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`关闭 ${r.title}`,disabled:!!t||(a[r.resourceId]??!1),onClick:async t=>{if(t.stopPropagation(),r.kind===`terminal`&&r.resourceId!==`terminal:empty`){n(r.id),i(``);try{let t=await WK(r.resourceId);if(!ZK(HK(t.status)?t:await qK(r.resourceId,`terminate`,{confirmed:!0})))throw Error(`Termination unconfirmed`);c(e.id,r.id)}catch{i(`终止未确认,已保留 Tab;请核对状态后重试。`)}finally{n(null)}}else r.file&&o[r.resourceId]?CM.setState({closeRequest:{windowId:e.id,tabId:r.id}}):c(e.id,r.id)},className:`window-no-drag rounded p-0.5 text-ink-3 opacity-70 transition-opacity hover:bg-black/[.06] hover:text-ink group-hover:opacity-100 dark:hover:bg-white/[.08]`,children:(0,g.jsx)(Oc,{size:10})})]})},r.id)})}),_?(0,g.jsx)(`button`,{type:`button`,"aria-label":`向右滚动 Tab`,className:`shrink-0 px-1 text-ink-3 hover:text-ink`,onClick:()=>m.current?.scrollBy({left:180,behavior:`smooth`}),children:(0,g.jsx)(eo,{size:13})}):null,p===`terminal`?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`div`,{id:`terminal-controls-${d}`,className:`flex shrink-0`}),(0,g.jsx)(n3,{label:`新建终端 Tab`,className:`flex w-8 shrink-0 items-center justify-center text-ink-3 hover:bg-surface-2 hover:text-ink`,scope:e.tabs[0]?.projectId?{projectId:e.tabs[0].projectId}:e.tabs[0]?.originType===`session`&&e.tabs[0].sourceSessionId?{sessionId:e.tabs[0].sourceSessionId}:{workspace:`default`},children:(0,g.jsx)(Vs,{size:14})})]}):null]})}function d3({window:e}){let t=zM(e=>e.focus),n=zM(e=>e.close),r=zM(e=>e.hide),i=zM(e=>e.toggleMaximize),a=zM(e=>e.togglePin),o=zM(e=>e.setBounds),{data:s}=uM(),c=OM(DM(e.tabs,e.filter),e.activeTabId),l=VY(c,s);return(0,g.jsxs)(BY,{bounds:`parent`,dragHandleClassName:`window-drag-handle`,cancel:`.window-no-drag`,disableDragging:e.maximized,enableResizing:!e.maximized,minWidth:420,minHeight:280,size:e.maximized?{width:`100%`,height:`100%`}:{width:e.width,height:e.height},position:e.maximized?{x:0,y:0}:{x:e.x,y:e.y},onMouseDown:()=>t(e.id),onDragStop:(t,n)=>o(e.id,{x:n.x,y:n.y,width:e.width,height:e.height}),onResizeStop:(t,n,r,i,a)=>o(e.id,{x:a.x,y:a.y,width:r.offsetWidth,height:r.offsetHeight}),style:{zIndex:e.z,display:e.minimized?`none`:`flex`,flexDirection:`column`},inert:e.minimized,"data-window-frame":e.id,role:`dialog`,"aria-label":l,className:B(`pointer-events-auto flex flex-col overflow-hidden border border-line bg-surface window-shadow`,e.maximized?`rounded-none`:`rounded-xl`),children:[(0,g.jsxs)(`div`,{className:`window-drag-handle flex h-10 shrink-0 items-center gap-2 border-b border-line bg-surface-2/55 px-3`,children:[(0,g.jsxs)(`div`,{className:`window-no-drag group/traffic flex items-center gap-1.5`,children:[(0,g.jsx)(`button`,{type:`button`,"aria-label":`关闭窗口`,title:`关闭窗口`,onClick:()=>n(e.id),className:`flex h-3 w-3 items-center justify-center rounded-full bg-[#ff5f57] text-[8px] text-[#6b0d08] opacity-95 transition-opacity hover:brightness-95`,children:(0,g.jsx)(Oc,{size:7,strokeWidth:2.8,className:`opacity-0 group-hover/traffic:opacity-100`})}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`隐藏窗口`,title:`隐藏窗口`,onClick:()=>r(e.id),className:`flex h-3 w-3 items-center justify-center rounded-full bg-[#febc2e] text-[8px] text-[#6b4b00] opacity-95 transition-opacity hover:brightness-95`,children:(0,g.jsx)(xs,{size:7,strokeWidth:3,className:`opacity-0 group-hover/traffic:opacity-100`})}),(0,g.jsx)(`button`,{type:`button`,"aria-label":e.maximized?`还原窗口`:`最大化窗口`,title:e.maximized?`还原窗口`:`最大化窗口`,onClick:()=>i(e.id),className:`flex h-3 w-3 items-center justify-center rounded-full bg-[#28c840] text-[8px] text-[#0b4d12] opacity-95 transition-opacity hover:brightness-95`,children:e.maximized?(0,g.jsx)(ys,{size:7,strokeWidth:2.8,className:`opacity-0 group-hover/traffic:opacity-100`}):(0,g.jsx)(hs,{size:7,strokeWidth:2.8,className:`opacity-0 group-hover/traffic:opacity-100`})})]}),(0,g.jsxs)(`div`,{className:`pointer-events-none absolute left-1/2 -translate-x-1/2 text-center`,children:[(0,g.jsx)(`div`,{className:`max-w-[260px] truncate text-[11.5px] font-medium text-ink`,children:l}),(0,g.jsx)(`div`,{className:`text-[9px] text-ink-3`,children:f3(c?.kind)})]}),(0,g.jsx)(`div`,{className:`window-no-drag ml-auto flex items-center`,children:(0,g.jsx)(gm,{label:e.pinned?`取消置顶`:`置顶窗口`,active:e.pinned,className:`h-6 w-6`,onClick:()=>a(e.id),children:e.pinned?(0,g.jsx)(Fs,{size:12}):(0,g.jsx)(Ls,{size:12})})})]}),c?.kind===`services`?null:(0,g.jsx)(u3,{window:e}),(0,g.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:c?(0,g.jsx)(s3,{tab:c,visible:!e.minimized}):(0,g.jsx)(`div`,{className:`flex h-full items-center justify-center text-[11px] text-ink-3`,children:`暂无打开的 Tab`})})]})}function f3(e){switch(e){case`files`:return`文件`;case`terminal`:return`终端`;case`services`:return`服务`;case`browser`:return`预览`;case`git-diff`:return`Diff`;default:return``}}function p3({scope:e,paths:t}){let n=fW(e,t),r=BM(e);return(0,h.useEffect)(()=>{CM.setState(e=>({monitoring:{...e.monitoring,[r]:n}}))},[r,n]),(0,g.jsx)(`span`,{className:`sr-only`,role:`status`,children:n})}function m3(){let t=(0,h.useRef)([]),n=zM(e=>e.windows),r=CM(e=>e.drafts),i=CM(e=>e.closeRequest),[a,o]=(0,h.useState)(null),[s,c]=(0,h.useState)(!1),l=new Map;for(let e of n)for(let t of e.tabs){if(!t.file)continue;let e=BM(t.file.scope),n=l.get(e)??{scope:t.file.scope,paths:[]};n.paths.push(t.file.path),l.set(e,n)}(0,h.useEffect)(()=>{let r=n.flatMap(e=>e.tabs.filter(e=>e.file).map(e=>e.resourceId)),i=t.current.filter(e=>!r.includes(e));i.length&&e(async()=>{let{disposeFileModel:e}=await import(`./FileEditor-DnQa6Owc.js`);return{disposeFileModel:e}},__vite__mapDeps([6,1,2,3,4,5])).then(({disposeFileModel:e})=>{for(let t of i)zM.getState().windows.some(e=>e.tabs.some(e=>e.file&&e.resourceId===t))||e(t)}),t.current=r},[n]),(0,h.useEffect)(()=>{let e=e=>{Object.keys(CM.getState().drafts).length&&(e.preventDefault(),e.returnValue=``)};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[]);let u=i?n.find(e=>e.id===i.windowId)?.tabs.find(e=>e.id===i.tabId):void 0,d=()=>{CM.setState({closeRequest:null}),o(null)},f=()=>{i&&u&&(CM.getState().discard(u.resourceId),zM.getState().closeTab(i.windowId,i.tabId),d())};return(0,g.jsxs)(g.Fragment,{children:[[...l].map(([e,t])=>(0,g.jsx)(p3,{...t},e)),i&&u&&r[u.resourceId]?(0,g.jsx)(Hc,{open:!0,onOpenChange:e=>{!e&&!s&&d()},children:(0,g.jsxs)(Wc,{className:`pointer-events-auto space-y-4 text-sm`,children:[(0,g.jsx)(Gc,{children:`未保存的文件`}),(0,g.jsxs)(Kc,{children:[u.title,` 有未保存的改动。`]}),(0,g.jsx)(qc,{message:a,onDismiss:()=>o(null)}),(0,g.jsxs)(`div`,{className:`flex gap-3`,children:[(0,g.jsx)(V,{type:`button`,disabled:s,onClick:()=>{c(!0),JM(u).then(f).catch(e=>o(GM(e))).finally(()=>c(!1))},children:`保存并关闭`}),(0,g.jsx)(V,{type:`button`,variant:`secondary`,disabled:s,onClick:f,children:`放弃改动`}),(0,g.jsx)(V,{type:`button`,variant:`secondary`,disabled:s,onClick:d,children:`取消`})]})]})}):null]})}function h3(){let e=zM(e=>e.closeRequest);return e?(0,g.jsx)(g3,{request:e},JSON.stringify(e)):null}function g3({request:e}){let t=zM(e=>e.windows),n=CM(e=>e.drafts),r=CM(e=>e.saving),[i,a]=(0,h.useState)(e.tabIds.length<=1),[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(``),u=t.find(t=>t.id===e.windowId)?.tabs.filter(t=>e.tabIds.includes(t.id))??[],d=u.find(e=>e.file&&n[e.resourceId]),f=o||u.some(e=>r[e.resourceId]),p=()=>zM.setState({closeRequest:null});return(0,h.useEffect)(()=>{if(!(!i||d||f)){for(let t of u)zM.getState().closeTab(e.windowId,t.id);zM.setState({closeRequest:null})}},[i,d,f,u,e.windowId]),i&&!d?null:(0,g.jsx)(Hc,{open:!0,onOpenChange:e=>{!e&&!f&&p()},children:(0,g.jsxs)(Wc,{className:`pointer-events-auto space-y-4 text-sm`,onEscapeKeyDown:e=>{f&&e.preventDefault()},onPointerDownOutside:e=>{f&&e.preventDefault()},children:[(0,g.jsx)(Gc,{children:i?`未保存的文件`:`关闭 ${u.length} 个 Tab?`}),(0,g.jsx)(Kc,{children:i?`${d?.title??`文件`} 有未保存的改动。`:`最小化可以保留这些 Tab,关闭后需要重新打开。`}),(0,g.jsx)(qc,{message:c,onDismiss:()=>l(``)}),(0,g.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,g.jsx)(V,{variant:`secondary`,disabled:f,onClick:p,children:`取消`}),i?d?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(V,{variant:`secondary`,disabled:f,onClick:()=>{CM.getState().discard(d.resourceId),l(``)},children:`放弃改动并继续`}),(0,g.jsx)(V,{disabled:f,onClick:()=>{s(!0),l(``),JM(d).then(()=>{CM.getState().drafts[d.resourceId]&&l(`文件在保存期间有新改动,请再次保存。`)}).catch(()=>l(`保存失败,已保留文件和草稿,请核对后重试。`)).finally(()=>s(!1))},children:`保存并继续`})]}):null:(0,g.jsx)(V,{onClick:()=>a(!0),children:`关闭全部 Tab`})]})]})})}function _3({window:e}){let[t,n]=(0,h.useState)(!e.minimized);if(!t){if(e.minimized)return null;n(!0)}return(0,g.jsx)(d3,{window:e})}function v3(){let{projectId:e,sessionId:t}=gW(),{data:n}=uM(),r=mW(e,t,n.sessions),i=zM(e=>e.windows),a=zM(e=>e.setBounds);return(0,h.useEffect)(()=>{let e=()=>{for(let e of zM.getState().windows)e.maximized||a(e.id,{x:e.x,y:e.y,width:e.width,height:e.height})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[a]),(0,h.useEffect)(()=>{let e=window.setTimeout(()=>{for(let e of zM.getState().windows)e.maximized||a(e.id,{x:e.x,y:e.y,width:e.width,height:e.height})},50);return()=>window.clearTimeout(e)},[a]),(0,h.useEffect)(()=>{let e=e=>{e.button===0&&e.target instanceof Element&&(document.querySelector(`[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]`)||e.target.closest(`[data-window-frame], [data-window-dock], [data-project-resources], [role="dialog"], [role="alertdialog"], [role="menu"]`)||zM.getState().hideScope(r))};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[r]),(0,g.jsx)(Z4,{windows:i,children:(0,g.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 z-40 overflow-hidden`,children:[(0,g.jsx)(h3,{}),(0,g.jsx)(m3,{}),i.filter(e=>NM(e)===r).map(e=>(0,g.jsx)(_3,{window:e},e.id))]})})}var y3={files:No,terminal:lc,services:tc,browser:Co,"git-diff":Xo};function b3(){let{data:e}=uM(),{projectId:t,sessionId:n}=gW(),{windows:r,focusedId:i,open:a,restore:o}=zM(),s=(Jg({queryKey:sK(),queryFn:()=>lK(),enabled:!0,refetchInterval:3e3}).data??[]).filter(e=>e.status===`RUNNING`&&e.projectId===t).length,c=mW(t,n,e.sessions),l=pW(t,n,e.sessions),u=r.filter(e=>NM(e)===c),d=n=>{let r=u.find(e=>e.tabs[0]?.kind===n);r?o(r.id):(e.terminals.find(e=>e.projectId===t),e.services.find(e=>e.projectId===t),a({kind:n,resourceId:`${n}:empty`,title:n===`terminal`?`终端`:`服务`,projectId:t,sessionId:`sessionId`in l?l.sessionId:null,source:t?`project`:`session`}))};return(0,g.jsx)(`div`,{className:`pointer-events-none relative z-10 mb-1.5 flex justify-center px-1`,children:(0,g.jsxs)(`nav`,{"aria-label":`项目窗口`,"data-window-dock":!0,className:`window-tabs-scroll pointer-events-auto flex max-w-full items-center gap-0.5 overflow-x-auto rounded-[10px] border border-line bg-surface/90 p-0.5 shadow-[var(--shadow-card)] backdrop-blur-xl`,children:[[`terminal`,`services`].map(e=>{let t=y3[e],n=u.find(t=>t.tabs[0]?.kind===e),r=n&&!n.minimized&&n.id===i;return(0,g.jsxs)(`button`,{type:`button`,"aria-label":e===`terminal`?`打开终端窗口`:`打开服务窗口`,"aria-pressed":!!r,onClick:()=>d(e),className:B(`flex h-6 shrink-0 items-center gap-1 rounded-md px-1.5 [@media(pointer:coarse)]:h-11 text-[11px] font-medium transition-colors`,r?`bg-accent-soft text-accent`:`text-ink-2 hover:bg-surface-2 hover:text-ink`),children:[(0,g.jsx)(t,{size:12,strokeWidth:1.7,className:e===`terminal`?`text-accent`:`text-success`}),e===`terminal`?`终端`:`服务`,e===`services`&&s>0?(0,g.jsx)(`span`,{className:`rounded bg-black/[.045] px-1 font-mono text-[9px] dark:bg-white/[.08]`,children:s}):null,e===`terminal`&&n&&n.tabs.filter(e=>!e.resourceId.endsWith(`:empty`)).length>0?(0,g.jsx)(`span`,{className:`rounded bg-black/[.045] px-1 font-mono text-[9px] dark:bg-white/[.08]`,children:n.tabs.filter(e=>!e.resourceId.endsWith(`:empty`)).length}):null]},e)}),u.filter(e=>e.minimized&&![`terminal`,`services`].includes(e.tabs[0]?.kind??``)).map(e=>{let t=e.tabs.find(t=>t.id===e.activeTabId)??e.tabs[0];if(!t)return null;let n=y3[t.kind];return(0,g.jsxs)(`button`,{type:`button`,"aria-label":`恢复 ${t.title}`,onClick:()=>o(e.id),title:t.title,className:`flex h-6 max-w-32 shrink-0 items-center gap-1 rounded-md px-1.5 [@media(pointer:coarse)]:h-11 text-[11px] text-ink-2 transition-colors hover:bg-surface-2 hover:text-ink`,children:[(0,g.jsx)(n,{size:12,className:`shrink-0 text-accent`}),(0,g.jsx)(`span`,{className:`truncate`,children:t.title}),e.tabs.length>1?(0,g.jsx)(`span`,{className:`text-[9px] text-ink-3`,children:e.tabs.length}):null]},e.id)})]})})}function x3(e){let t=new Set(e.filter(e=>e.kind===`message`&&e.role===`user`&&e.turnOutcome!==void 0).map(e=>e.turnId));return e.filter(e=>e.kind===`approval`&&e.status===`pending`&&(e.turnId===void 0||!t.has(e.turnId)))}function S3(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var C3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,T3={};function E3(e,t){return((t||T3).jsx?w3:C3).test(e)}var D3=/[ \t\n\f\r]/g;function O3(e){return typeof e==`object`?e.type===`text`&&k3(e.value):k3(e)}function k3(e){return e.replace(D3,``)===``}var A3=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};A3.prototype.normal={},A3.prototype.property={},A3.prototype.space=void 0;function j3(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new A3(n,r,t)}function M3(e){return e.toLowerCase()}var N3=class{constructor(e,t){this.attribute=t,this.property=e}};N3.prototype.attribute=``,N3.prototype.booleanish=!1,N3.prototype.boolean=!1,N3.prototype.commaOrSpaceSeparated=!1,N3.prototype.commaSeparated=!1,N3.prototype.defined=!1,N3.prototype.mustUseProperty=!1,N3.prototype.number=!1,N3.prototype.overloadedBoolean=!1,N3.prototype.property=``,N3.prototype.spaceSeparated=!1,N3.prototype.space=void 0;var P3=c({boolean:()=>I3,booleanish:()=>L3,commaOrSpaceSeparated:()=>V3,commaSeparated:()=>B3,number:()=>$,overloadedBoolean:()=>R3,spaceSeparated:()=>z3}),F3=0,I3=H3(),L3=H3(),R3=H3(),$=H3(),z3=H3(),B3=H3(),V3=H3();function H3(){return 2**++F3}var U3=Object.keys(P3),W3=class extends N3{constructor(e,t,n,r){let i=-1;if(super(e,t),G3(this,`space`,r),typeof n==`number`)for(;++i<U3.length;){let e=U3[i];G3(this,U3[i],(n&P3[e])===P3[e])}}};W3.prototype.defined=!0;function G3(e,t,n){n&&(e[t]=n)}function K3(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new W3(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[M3(r)]=r,n[M3(a.attribute)]=r}return new A3(t,n,e.space)}var q3=K3({properties:{ariaActiveDescendant:null,ariaAtomic:L3,ariaAutoComplete:null,ariaBusy:L3,ariaChecked:L3,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:z3,ariaCurrent:null,ariaDescribedBy:z3,ariaDetails:null,ariaDisabled:L3,ariaDropEffect:z3,ariaErrorMessage:null,ariaExpanded:L3,ariaFlowTo:z3,ariaGrabbed:L3,ariaHasPopup:null,ariaHidden:L3,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:z3,ariaLevel:$,ariaLive:null,ariaModal:L3,ariaMultiLine:L3,ariaMultiSelectable:L3,ariaOrientation:null,ariaOwns:z3,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:L3,ariaReadOnly:L3,ariaRelevant:null,ariaRequired:L3,ariaRoleDescription:z3,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:L3,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function J3(e,t){return t in e?e[t]:t}function Y3(e,t){return J3(e,t.toLowerCase())}var X3=K3({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:B3,acceptCharset:z3,accessKey:z3,action:null,allow:null,allowFullScreen:I3,allowPaymentRequest:I3,allowUserMedia:I3,alpha:I3,alt:null,as:null,async:I3,autoCapitalize:null,autoComplete:z3,autoFocus:I3,autoPlay:I3,blocking:z3,capture:null,charSet:null,checked:I3,cite:null,className:z3,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:L3,controls:I3,controlsList:z3,coords:$|B3,crossOrigin:null,data:null,dateTime:null,decoding:null,default:I3,defer:I3,dir:null,dirName:null,disabled:I3,download:R3,draggable:L3,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:I3,formTarget:null,headers:z3,height:$,hidden:R3,high:$,href:null,hrefLang:null,htmlFor:z3,httpEquiv:z3,id:null,imageSizes:null,imageSrcSet:null,inert:I3,inputMode:null,integrity:null,is:null,isMap:I3,itemId:null,itemProp:z3,itemRef:z3,itemScope:I3,itemType:z3,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:I3,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:I3,muted:I3,name:null,nonce:null,noModule:I3,noValidate:I3,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:I3,optimum:$,pattern:null,ping:z3,placeholder:null,playsInline:I3,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:I3,referrerPolicy:null,rel:z3,required:I3,reversed:I3,rows:$,rowSpan:$,sandbox:z3,scope:null,scoped:I3,seamless:I3,selected:I3,shadowRootClonable:I3,shadowRootCustomElementRegistry:I3,shadowRootDelegatesFocus:I3,shadowRootMode:null,shadowRootSerializable:I3,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:L3,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:I3,useMap:null,value:L3,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:z3,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:I3,declare:I3,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:I3,noHref:I3,noShade:I3,noWrap:I3,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:L3,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:I3,disablePictureInPicture:I3,disableRemotePlayback:I3,exportParts:B3,part:z3,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:Y3}),Z3=K3({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:V3,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:z3,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:I3,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:B3,g2:B3,glyphName:B3,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:V3,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:z3,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:V3,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:V3,rev:V3,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:V3,requiredFeatures:V3,requiredFonts:V3,requiredFormats:V3,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:V3,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:V3,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:V3,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:J3}),Q3=K3({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),$3=K3({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Y3}),e6=K3({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),t6={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},n6=/[A-Z]/g,r6=/-[a-z]/g,i6=/^data[-\w.:]+$/i;function a6(e,t){let n=M3(t),r=t,i=N3;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&i6.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(r6,s6);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!r6.test(e)){let n=e.replace(n6,o6);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=W3}return new i(r,t)}function o6(e){return`-`+e.toLowerCase()}function s6(e){return e.charAt(1).toUpperCase()}var c6=j3([q3,X3,Q3,$3,e6],`html`),l6=j3([q3,Z3,Q3,$3,e6],`svg`);function u6(e){return e.join(` `).trim()}var d6=/\/\*(?:[^*]|\*(?!\/))*\*\//g,f6=/\n/g,p6=/^\s*/,m6=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,h6=/^:\s*/,g6=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,_6=/^[;\s]*/,v6=`
127
+ `,y6=`/`,b6=`*`,x6=``,S6=`comment`,C6=`declaration`;function w6(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(f6);t&&(n+=t.length);var i=e.lastIndexOf(v6);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(p6)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(y6==e.charAt(0)&&b6==e.charAt(1)){for(var n=2;x6!=e.charAt(n)&&(b6!=e.charAt(n)||y6!=e.charAt(n+1));)++n;if(n+=2,x6===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:S6,comment:o})}}function f(){var e=a(),t=c(m6);if(t){if(d(),!c(h6))return s(`property missing ':'`);var n=c(g6),r=e({type:C6,property:t[0].replace(d6,x6).trim(),value:n?n[0].replace(d6,x6).trim():x6});return c(_6),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function T6(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=w6(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var E6=O6(`end`),D6=O6(`start`);function O6(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function k6(e){let t=D6(e),n=E6(e);if(t&&n)return{start:t,end:n}}function A6(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?M6(e.position):`start`in e||`end`in e?M6(e):`line`in e||`column`in e?j6(e):``}function j6(e){return N6(e&&e.line)+`:`+N6(e&&e.column)}function M6(e){return j6(e&&e.start)+`-`+j6(e&&e.end)}function N6(e){return e&&typeof e==`number`?e:1}var P6=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=A6(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};P6.prototype.file=``,P6.prototype.name=``,P6.prototype.reason=``,P6.prototype.message=``,P6.prototype.stack=``,P6.prototype.column=void 0,P6.prototype.line=void 0,P6.prototype.ancestors=void 0,P6.prototype.cause=void 0,P6.prototype.fatal=void 0,P6.prototype.place=void 0,P6.prototype.ruleId=void 0,P6.prototype.source=void 0;var F6={}.hasOwnProperty,I6=new Map,L6=/[A-Z]/g,R6=/-([a-z])/g,z6=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),B6=new Set([`td`,`th`]),V6=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function H6(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=$6(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Q6(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?l6:c6,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=U6(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function U6(e,t,n){if(t.type===`element`)return W6(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return G6(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return q6(e,t,n);if(t.type===`mdxjsEsm`)return K6(e,t);if(t.type===`root`)return J6(e,t,n);if(t.type===`text`)return Y6(e,t)}function W6(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=l6,e.schema=i),e.ancestors.push(t);let a=a8(e,t.tagName,!1),o=e8(e,t),s=n8(e,t);return z6.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!O3(e)})),X6(e,o,a,t),Z6(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function G6(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}o8(e,t.position)}function K6(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);o8(e,t.position)}function q6(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=l6,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:a8(e,t.name,!0),o=t8(e,t),s=n8(e,t);return X6(e,o,a,t),Z6(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function J6(e,t,n){let r={};return Z6(r,n8(e,t)),e.create(t,e.Fragment,r,n)}function Y6(e,t){return t.value}function X6(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Z6(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Q6(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function $6(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=D6(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function e8(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&F6.call(t.properties,i)){let a=r8(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&B6.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function t8(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else o8(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else o8(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function n8(e,t){let n=[],r=-1,i=e.passKeys?new Map:I6;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=U6(e,a,o);s!==void 0&&n.push(s)}return n}function r8(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=a6(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?S3(n):u6(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:s8(n):i8(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?t6[r.property]||r.property:r.attribute,n]}function i8(e,t){let n={};try{T6(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(R6,u8))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new P6("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=V6+`#cannot-parse-style-attribute`,r}return n}function a8(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=E3(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=E3(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return F6.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);o8(e)}function o8(e,t){let n=new P6("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=V6+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function s8(e){let t={},n;for(n in e)F6.call(e,n)&&(t[c8(n)]=e[n]);return t}function c8(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(L6,l8);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function l8(e){return`-`+e.toLowerCase()}function u8(e,t){return t.toUpperCase()}var d8={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},f8={};function p8(e,t){let n=t||f8;return m8(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function m8(e,t,n){if(g8(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return h8(e.children,t,n)}return Array.isArray(e)?h8(e,t,n):``}function h8(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=m8(e[i],t,n);return r.join(``)}function g8(e){return!!(e&&typeof e==`object`)}var _8=document.createElement(`i`);function v8(e){let t=`&`+e+`;`;_8.innerHTML=t;let n=_8.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function y8(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function b8(e,t){return e.length>0?(y8(e,e.length,0,t),e):t}var x8={}.hasOwnProperty;function S8(e){let t={},n=-1;for(;++n<e.length;)C8(t,e[n]);return t}function C8(e,t){let n;for(n in t){let r=(x8.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){x8.call(r,a)||(r[a]=[]);let e=i[a];w8(r[a],Array.isArray(e)?e:e?[e]:[])}}}function w8(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);y8(e,0,0,r)}function T8(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function E8(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var D8=z8(/[A-Za-z]/),O8=z8(/[\dA-Za-z]/),k8=z8(/[#-'*+\--9=?A-Z^-~]/);function A8(e){return e!==null&&(e<32||e===127)}var j8=z8(/\d/),M8=z8(/[\dA-Fa-f]/),N8=z8(/[!-/:-@[-`{-~]/);function P8(e){return e!==null&&e<-2}function F8(e){return e!==null&&(e<0||e===32)}function I8(e){return e===-2||e===-1||e===32}var L8=z8(/\p{P}|\p{S}/u),R8=z8(/\s/);function z8(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function B8(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&O8(e.charCodeAt(n+1))&&O8(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function V8(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return I8(r)?(e.enter(n),s(r)):t(r)}function s(r){return I8(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function H8(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&I8(t)?(e.enter(r),c(t)):l(t)}function c(t){return I8(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var U8={tokenize:W8};function W8(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),V8(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return P8(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var G8=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){K8(this,e,t,n,!1)}addBefore(e,t,n){K8(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function K8(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var q8={tokenize:Y8},J8={tokenize:X8};function Y8(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new G8;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(J8,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(J8,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return P8(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new G8;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function X8(e,t,n){return V8(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Z8(e){if(e===null||F8(e)||R8(e))return 1;if(L8(e))return 2}function Q8(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var $8={name:`attention`,resolveAll:e5,tokenize:cre};function e5(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};t5(o,-a),t5(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=b8(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=b8(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=b8(r,Q8(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=b8(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=b8(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),y8(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function cre(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Z8(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Z8(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function t5(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var lre={name:`autolink`,tokenize:ure};function ure(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return D8(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||O8(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||O8(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||A8(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):k8(t)?(e.consume(t),l):n(t)}function u(e){return O8(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||O8(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var n5={partial:!0,tokenize:dre};function dre(e,t,n){return r;function r(t){return I8(t)?V8(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||P8(e)?t(e):n(e)}}var r5={continuation:{tokenize:pre},exit:mre,name:`blockQuote`,tokenize:fre};function fre(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return I8(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function pre(e,t,n){let r=this;return i;function i(t){return I8(t)?V8(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(r5,t,n)(r)}}function mre(e){e.exit(`blockQuote`)}var i5={name:`characterEscape`,tokenize:hre};function hre(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return N8(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var a5={name:`characterReference`,tokenize:gre};function gre(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=O8,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=M8,u):(e.enter(`characterReferenceValue`),a=7,o=j8,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===O8&&!v8(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var o5={partial:!0,tokenize:_re};function _re(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var s5={concrete:!0,name:`codeFenced`,tokenize:vre};function vre(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),I8(t)?V8(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||P8(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(o5,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||P8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):I8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),V8(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||P8(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||P8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&I8(t)?V8(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||P8(t)?e.check(o5,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||P8(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),I8(t)?V8(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),I8(t)?V8(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||P8(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var c5={name:`codeIndented`,tokenize:bre},yre={partial:!0,tokenize:xre};function bre(e,t,n){return r;function r(t){return e.enter(`codeIndented`),H8(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):P8(t)?e.attempt(yre,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||P8(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function xre(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):P8(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):H8(e,t,a,`linePrefix`,4,4)(o)}function a(e){return P8(e)?i(e):n(e)}}var Sre={name:`codeText`,previous:wre,resolve:Cre,tokenize:Tre};function Cre(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function wre(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Tre(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):P8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||P8(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Ere=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&l5(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),l5(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),l5(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);l5(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);l5(this.left,t.reverse())}}}};function l5(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function u5(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Ere(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Dre(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return y8(e,0,1/0,u.slice(0)),!l}function Dre(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Ore={resolve:Are,tokenize:jre},kre={partial:!0,tokenize:Mre};function Are(e){return u5(e),e}function jre(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):P8(t)?e.check(kre,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Mre(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),V8(e,a,`linePrefix`)}function a(i){if(i===null||P8(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function d5(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||A8(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||P8(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||F8(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||A8(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function f5(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):P8(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||P8(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!I8(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function p5(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):P8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),V8(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||P8(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function m5(e,t){let n;return r;function r(i){return P8(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):I8(i)?V8(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Nre={name:`definition`,tokenize:Fre},Pre={partial:!0,tokenize:Ire};function Fre(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return f5.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=E8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return F8(t)?m5(e,l)(t):l(t)}function l(t){return d5(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Pre,d,d)(t)}function d(t){return I8(t)?V8(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||P8(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ire(e,t,n){return r;function r(t){return F8(t)?m5(e,i)(t):n(t)}function i(t){return p5(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return I8(t)?V8(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||P8(e)?t(e):n(e)}}var Lre={name:`hardBreakEscape`,tokenize:Rre};function Rre(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return P8(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var zre={name:`headingAtx`,resolve:Bre,tokenize:Vre};function Bre(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};y8(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Vre(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||F8(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||P8(n)?(e.exit(`atxHeading`),t(n)):I8(n)?V8(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||F8(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var h5=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),g5=[`pre`,`script`,`style`,`textarea`],Hre={concrete:!0,name:`htmlFlow`,resolveTo:Wre,tokenize:Gre},Ure={partial:!0,tokenize:Kre};function Wre(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Gre(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):D8(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):D8(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return D8(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||F8(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&g5.includes(l)?(i=1,r.interrupt?t(s):O(s)):h5.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||O8(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return I8(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||D8(t)?(e.consume(t),b):I8(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||O8(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):I8(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):I8(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||P8(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||F8(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||I8(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||P8(t)?O(t):I8(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),ee):P8(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ure,te,k)(t)):t===null||P8(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(o5,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||P8(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return g5.includes(n)?(e.consume(t),I):O(t)}return D8(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function ee(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||P8(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function Kre(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(n5,t,n)}}var qre={name:`htmlText`,tokenize:Jre};function Jre(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):D8(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):D8(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):P8(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):P8(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):P8(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):P8(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return D8(t)?(e.consume(t),S):n(t)}function S(t){return t===45||O8(t)?(e.consume(t),S):C(t)}function C(t){return P8(t)?(o=C,N(t)):I8(t)?(e.consume(t),C):M(t)}function w(t){return t===45||O8(t)?(e.consume(t),w):t===47||t===62||F8(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||D8(t)?(e.consume(t),E):P8(t)?(o=T,N(t)):I8(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||O8(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):P8(t)?(o=D,N(t)):I8(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):P8(t)?(o=O,N(t)):I8(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):P8(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||F8(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||F8(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return I8(t)?V8(e,ee,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ee(t)}function ee(t){return e.enter(`htmlTextData`),o(t)}}var _5={name:`labelEnd`,resolveAll:Qre,resolveTo:$re,tokenize:eie},Yre={tokenize:tie},Xre={tokenize:nie},Zre={tokenize:rie};function Qre(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&y8(e,0,e.length,n),e}function $re(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=b8(o,e.slice(i+1,i+r+3)),o=b8(o,[[`enter`,l,t]]),o=b8(o,Q8(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=b8(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=b8(o,e.slice(a+1)),o=b8(o,[[`exit`,s,t]]),y8(e,i,e.length,o),e}function eie(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(E8(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Yre,u,o?u:d)(t):t===91?e.attempt(Xre,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Zre,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function tie(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return F8(t)?m5(e,a)(t):a(t)}function a(t){return t===41?u(t):d5(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return F8(t)?m5(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?p5(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return F8(t)?m5(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function nie(e,t,n){let r=this;return i;function i(t){return f5.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(E8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function rie(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var iie={name:`labelStartImage`,resolveAll:_5.resolveAll,tokenize:aie};function aie(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var oie={name:`labelStartLink`,resolveAll:_5.resolveAll,tokenize:sie};function sie(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var v5={name:`lineEnding`,tokenize:cie};function cie(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),V8(e,t,`linePrefix`)}}var y5={name:`thematicBreak`,tokenize:lie};function lie(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||P8(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),I8(t)?V8(e,s,`whitespace`)(t):s(t))}}var b5={continuation:{tokenize:pie},exit:hie,name:`list`,tokenize:fie},uie={partial:!0,tokenize:gie},die={partial:!0,tokenize:mie};function fie(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:j8(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(y5,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return j8(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(n5,r.interrupt?n:u,e.attempt(uie,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return I8(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function pie(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(n5,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,V8(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!I8(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(die,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,V8(e,e.attempt(b5,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function mie(e,t,n){let r=this;return V8(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function hie(e){e.exit(this.containerState.type)}function gie(e,t,n){let r=this;return V8(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!I8(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var x5={name:`setextUnderline`,resolveTo:_ie,tokenize:vie};function _ie(e,t){let n=new G8,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function vie(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),I8(t)?V8(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||P8(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var yie={tokenize:bie};function bie(e){let t=this,n=e.attempt(n5,r,e.attempt(this.parser.constructs.flowInitial,i,V8(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ore,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var xie={resolveAll:C5()},Sie=S5(`string`),Cie=S5(`text`);function S5(e){return{resolveAll:C5(e===`text`?wie:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function C5(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function wie(e,t){let n=new G8,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Tie=c({attentionMarkers:()=>Nie,contentInitial:()=>Die,disable:()=>Pie,document:()=>Eie,flow:()=>kie,flowInitial:()=>Oie,insideSpan:()=>Mie,string:()=>Aie,text:()=>jie}),Eie={42:b5,43:b5,45:b5,48:b5,49:b5,50:b5,51:b5,52:b5,53:b5,54:b5,55:b5,56:b5,57:b5,62:r5},Die={91:Nre},Oie={[-2]:c5,[-1]:c5,32:c5},kie={35:zre,42:y5,45:[x5,y5],60:Hre,61:x5,95:y5,96:s5,126:s5},Aie={38:a5,92:i5},jie={[-5]:v5,[-4]:v5,[-3]:v5,33:iie,38:a5,42:$8,60:[lre,qre],91:oie,92:[Lre,i5],93:_5,95:$8,96:Sre},Mie={null:[$8,xie]},Nie={null:[42,95]},Pie={null:[]};function Fie(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=b8(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Q8(a,l.events,l),l.events):[]}function f(e,t){return Lie(p(e),t)}function p(e){return Iie(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){P8(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&y8(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Iie(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Lie(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
128
+ `;break;case-3:o=`\r
129
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Rie(e){let t={constructs:S8([Tie,...(e||{}).extensions||[]]),content:n(U8),defined:[],document:n(q8),flow:n(yie),lazy:{},string:n(Sie),text:n(Cie)};return t;function n(e){return n;function n(n){return Fie(t,e,n)}}}function zie(e){for(;!u5(e););return e}var w5=/[\0\t\n\r]/g;function Bie(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){w5.lastIndex=c;let n=w5.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Vie=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Hie(e){return e.replace(Vie,Uie)}function Uie(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return T8(n.slice(t?2:1),t?16:10)}return v8(n)||e}var T5={}.hasOwnProperty;function Wie(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Gie(n)(zie(Rie(n).document().write(Bie()(e,t,!0))))}function Gie(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ve),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(me),blockQuote:o(ue),characterEscape:E,characterReference:E,codeFenced:o(de),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(de,s),codeText:o(L,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(fe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(pe),hardBreakEscape:o(he),hardBreakTrailing:o(he),htmlFlow:o(ge,s),htmlFlowData:E,htmlText:o(ge,s),htmlTextData:E,image:o(_e),label:s,link:o(ve),listItem:o(be),listItemValue:p,listOrdered:o(ye,f),listUnordered:o(ye),paragraph:o(xe),reference:re,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(me),strong:o(Se),thematicBreak:o(we)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:le,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:se,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:F,labelText:ee,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ie,resourceDestinationString:I,resourceTitleString:te,resource:ne,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};D5(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),T5.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||O5).call(o,void 0,e[0])}for(r.position={start:E5(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:E5(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:E5(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+A6({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||O5).call(this,e,r[0])),n.position.end=E5(e.end)}function d(){return p8(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=E8(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Ce(),n.position={start:E5(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=E5(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=E5(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Hie(t),n.identifier=E8(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=E8(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=T8(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=v8(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=E5(e.end)}function ce(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[],position:void 0}}function de(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function L(){return{type:`inlineCode`,value:``,position:void 0}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function pe(){return{type:`emphasis`,children:[],position:void 0}}function me(){return{type:`heading`,depth:0,children:[],position:void 0}}function he(){return{type:`break`,position:void 0}}function ge(){return{type:`html`,value:``,position:void 0}}function _e(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function ve(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function xe(){return{type:`paragraph`,children:[],position:void 0}}function Se(){return{type:`strong`,children:[],position:void 0}}function Ce(){return{type:`text`,value:``,position:void 0}}function we(){return{type:`thematicBreak`,position:void 0}}}function E5(e){return{line:e.line,column:e.column,offset:e.offset}}function D5(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?D5(e,r):Kie(e,r)}}function Kie(e,t){let n;for(n in t)if(T5.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function O5(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+A6({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+A6({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+A6({start:t.start,end:t.end})+`) is still open`)}function qie(e){let t=this;t.parser=n;function n(n){return Wie(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Jie(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Yie(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
130
+ `}]}function Xie(e,t){let n=t.value?t.value+`
131
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Zie(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qie(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $ie(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=B8(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function eae(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tae(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function k5(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function nae(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return k5(e,t);let i={src:B8(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function rae(e,t){let n={src:B8(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function iae(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function aae(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return k5(e,t);let i={href:B8(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function oae(e,t){let n={href:B8(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sae(e,t,n){let r=e.all(t),i=n?cae(n):A5(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
132
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
133
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function cae(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=A5(n[r])}return t}function A5(e){return e.spread??e.children.length>1}function lae(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function uae(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dae(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function fae(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pae(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=D6(t.children[1]),o=E6(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function mae(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function hae(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var j5=9,M5=32;function gae(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(N5(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(N5(t.slice(i),i>0,!1)),a.join(``)}function N5(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===j5||t===M5;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===j5||t===M5;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function _ae(e,t){let n={type:`text`,value:gae(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vae(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var yae={blockquote:Jie,break:Yie,code:Xie,delete:Zie,emphasis:Qie,footnoteReference:$ie,heading:eae,html:tae,imageReference:nae,image:rae,inlineCode:iae,linkReference:aae,link:oae,listItem:sae,list:lae,paragraph:uae,root:dae,strong:fae,table:pae,tableCell:hae,tableRow:mae,text:_ae,thematicBreak:vae,toml:P5,yaml:P5,definition:P5,footnoteDefinition:P5};function P5(){}var{defineProperty:bae}=Object,F5=typeof self==`object`?self:globalThis,I5=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new F5[e](t)},xae=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?bae(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof F5[e]==`function`?I5(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(I5(a,o),i)};return r},L5=e=>xae(new Map,e)(0),R5=``,{toString:Sae}={},{keys:Cae,is:wae}=Object,z5=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Sae.call(e).slice(8,-1);switch(n){case`Array`:return[1,R5];case`Object`:return[2,R5];case`Date`:return[3,R5];case`RegExp`:return[4,R5];case`Map`:return[5,R5];case`Set`:return[6,R5];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},B5=([e,t])=>e===0&&(t===`function`||t===`symbol`),Tae=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=z5(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&wae(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Cae(o))(e||!B5(z5(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?R5:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(B5(z5(n))||B5(z5(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!B5(z5(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},V5=(e,{json:t,lossy:n}={})=>{let r=[];return Tae(!(t||n),!!t,new Map,r)(e),r},H5=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?L5(V5(e,t)):structuredClone(e):(e,t)=>L5(V5(e,t));function Eae(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Dae(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Oae(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Eae,r=e.options.footnoteBackLabel||Dae,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=B8(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...H5(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
134
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
135
+ `}]}}var U5=(function(e){if(e==null)return Mae;if(typeof e==`function`)return W5(e);if(typeof e==`object`)return Array.isArray(e)?kae(e):Aae(e);if(typeof e==`string`)return jae(e);throw Error(`Expected function, string, or object as test`)});function kae(e){let t=[],n=-1;for(;++n<e.length;)t[n]=U5(e[n]);return W5(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Aae(e){let t=e;return W5(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function jae(e){return W5(t);function t(t){return t&&t.type===e}}function W5(e){return t;function t(t,n,r){return!!(Nae(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Mae(){return!0}function Nae(e){return typeof e==`object`&&!!e&&`type`in e}function Pae(e){return e}var G5=[],Fae=`skip`;function K5(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=U5(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+Pae(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=G5;if(s&&r&&(o=q5(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=q5(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function q5(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?G5:[e]}function J5(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?K5(e,i,Y5(a),o):K5(e,i,Iae(a),o)}function Iae(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?Y5(e.enter):e.enter,exit:typeof e.exit==`function`?Y5(e.exit):e.exit}}function Y5(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var X5={}.hasOwnProperty,Lae={};function Rae(e,t){let n=t||Lae,r=new Map,i=new Map,a={all:s,applyData:Bae,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...yae,...n.handlers},one:o,options:n,patch:zae,wrap:Hae};return J5(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(X5.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=H5(n);return r.children=a.all(e),r}return H5(e)}return(a.options.unknownHandler||Vae)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Z5(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Z5(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function zae(e,t){e.position&&(t.position=k6(e))}function Bae(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,H5(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Vae(e,t){let n=t.data||{},r=`value`in t&&!(X5.call(n,`hProperties`)||X5.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Hae(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
136
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
137
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
138
+ `}),n}function Z5(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Q5(e,t){let n=Rae(e,t),r=n.one(e,void 0),i=Oae(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
139
+ `},i)),a}function Uae(e,t){return e&&`run`in e?async function(n,r){let i=Q5(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Q5(n,{file:r,...e||t})}}function $5(e){if(e)throw e}var Wae=s(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function e7(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Gae(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Kae(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Kae(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var t7={basename:qae,dirname:Jae,extname:Yae,join:Xae,sep:`/`};function qae(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);n7(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Jae(e){if(n7(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Yae(e){n7(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Xae(...e){let t=-1,n;for(;++t<e.length;)n7(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Zae(n)}function Zae(e){n7(e);let t=e.codePointAt(0)===47,n=Qae(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Qae(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function n7(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var $ae={cwd:eoe};function eoe(){return`/`}function r7(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function toe(e){if(typeof e==`string`)e=new URL(e);else if(!r7(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return noe(e)}function noe(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var i7=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],a7=class{constructor(e){let t;t=e?r7(e)?{path:e}:typeof e==`string`||roe(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:$ae.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<i7.length;){let e=i7[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)i7.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?t7.basename(this.path):void 0}set basename(e){s7(e,`basename`),o7(e,`basename`),this.path=t7.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?t7.dirname(this.path):void 0}set dirname(e){c7(this.basename,`dirname`),this.path=t7.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?t7.extname(this.path):void 0}set extname(e){if(o7(e,`extname`),c7(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=t7.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){r7(e)&&(e=toe(e)),s7(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?t7.basename(this.path,this.extname):void 0}set stem(e){s7(e,`stem`),o7(e,`stem`),this.path=t7.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new P6(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function o7(e,t){if(e&&e.includes(t7.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+t7.sep+"`")}function s7(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function c7(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function roe(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ioe=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),l7=u(Wae(),1),aoe={}.hasOwnProperty,ooe=new class e extends ioe{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Gae()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,l7.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(f7(`data`,this.frozen),this.namespace[e]=t,this):aoe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(f7(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=h7(e),n=this.parser||this.Parser;return u7(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),u7(`process`,this.parser||this.Parser),d7(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=h7(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);coe(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),u7(`processSync`,this.parser||this.Parser),d7(`processSync`,this.compiler||this.Compiler),this.process(e,r),m7(`processSync`,`process`,t),n;function r(e,r){t=!0,$5(e),n=r}}run(e,t,n){p7(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=h7(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),m7(`runSync`,`run`,n),r;function i(e,t){$5(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=h7(t),r=this.compiler||this.Compiler;return d7(`stringify`,r),p7(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(f7(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,l7.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];e7(o)&&e7(r)&&(r=(0,l7.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function u7(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function d7(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function f7(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function p7(e){if(!e7(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function m7(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function h7(e){return soe(e)?e:new a7(e)}function soe(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function coe(e){return typeof e==`string`||loe(e)}function loe(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var g7=[],_7={allowDangerousHtml:!0},uoe=/^(https?|ircs?|mailto|xmpp)$/i,doe=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function foe(e){let t=poe(e),n=moe(e);return hoe(t.runSync(t.parse(n),n),e)}function poe(e){let t=e.rehypePlugins||g7,n=e.remarkPlugins||g7,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._7}:_7;return ooe().use(qie).use(n).use(Uae,r).use(t)}function moe(e){let t=e.children||``,n=new a7;return typeof t==`string`?n.value=t:``+t,n}function hoe(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||goe;for(let e of doe)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return J5(e,l),H6(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in d8)if(Object.hasOwn(d8,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=d8[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function goe(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||uoe.test(e.slice(0,t))?e:``}function v7(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function _oe(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function voe(e,t,n){let r=U5((n||{}).ignore||[]),i=yoe(t),a=-1;for(;++a<i.length;)K5(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return Fae}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function yoe(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([boe(e[0]),xoe(e[1])])}return t}function boe(e){return typeof e==`string`?new RegExp(_oe(e),`g`):e}function xoe(e){return typeof e==`function`?e:function(){return e}}var y7=`phrasing`,b7=[`autolink`,`link`,`image`,`label`];function Soe(){return{transforms:[koe],enter:{literalAutolink:woe,literalAutolinkEmail:x7,literalAutolinkHttp:x7,literalAutolinkWww:x7},exit:{literalAutolink:Ooe,literalAutolinkEmail:Doe,literalAutolinkHttp:Toe,literalAutolinkWww:Eoe}}}function Coe(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:y7,notInConstruct:b7},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:y7,notInConstruct:b7},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:y7,notInConstruct:b7}]}}function woe(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function x7(e){this.config.enter.autolinkProtocol.call(this,e)}function Toe(e){this.config.exit.autolinkProtocol.call(this,e)}function Eoe(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Doe(e){this.config.exit.autolinkEmail.call(this,e)}function Ooe(e){this.exit(e)}function koe(e){voe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Aoe],[RegExp(`(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)`,`gu`),joe]],{ignore:[`link`,`linkReference`]})}function Aoe(e,t,n,r,i){let a=``;if(!S7(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Moe(n)))return!1;let o=Noe(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function joe(e,t,n,r){return!S7(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Moe(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Noe(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=v7(e,`(`),a=v7(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function S7(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||R8(n)||L8(n))&&(!t||n!==47)}C7.peek=Hoe;function Poe(){this.buffer()}function Foe(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Ioe(){this.buffer()}function Loe(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Roe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=E8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zoe(e){this.exit(e)}function Boe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=E8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Voe(e){this.exit(e)}function Hoe(){return`[`}function C7(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Uoe(){return{enter:{gfmFootnoteCallString:Poe,gfmFootnoteCall:Foe,gfmFootnoteDefinitionLabelString:Ioe,gfmFootnoteDefinition:Loe},exit:{gfmFootnoteCallString:Roe,gfmFootnoteCall:zoe,gfmFootnoteDefinitionLabelString:Boe,gfmFootnoteDefinition:Voe}}}function Woe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:C7},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
140
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?w7:Goe))),s(),o}}function Goe(e,t,n){return t===0?e:w7(e,t,n)}function w7(e,t,n){return(n?``:` `)+e}var Koe=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];T7.attention=Zoe,T7.peek=Qoe;function qoe(){return{canContainEols:[`delete`],enter:{strikethrough:Yoe},exit:{strikethrough:Xoe}}}function Joe(){return{handlers:{delete:T7},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Koe}]}}function Yoe(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Xoe(e){this.exit(e)}function T7(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Zoe(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Qoe(){return`~`}function $oe(e){return e.length}function ese(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||$oe,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=tse(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=E7(r[d]);else{let e=E7(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
141
+ `)}function tse(e){return e==null?``:String(e)}function E7(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var nse=U5([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function rse(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),ise);return i(),o}function ise(e,t,n){return`>`+(n?``:` `)+e}function ase(e,t){return D7(e,t.inConstruct,!0)&&!D7(e,t.notInConstruct,!1)}function D7(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function O7(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
142
+ `&&!e.before&&!e.after&&ase(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
143
+ `}function ose(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function sse(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function cse(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function k7(e,t,n,r){let i=cse(n),a=e.value||``;if(sse(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,lse);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(ose(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
144
+ `,encode:["`"],...o.current()})),t()}return u+=o.move(`
145
+ `),a&&(u+=o.move(a+`
146
+ `)),u+=o.move(s),c(),u}function lse(e,t,n){return(n?``:` `)+e}function A7(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function use(e,t,n,r){let i=A7(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
147
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function dse(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function j7(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function M7(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function N7(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function P7(e,t,n){let r=Z8(e),i=Z8(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function fse(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:D8(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!D8(a))return;for(;a===45||O8(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&g5.includes(o)?1:h5.includes(o)?6:7}var pse=new Map([[`*`,!1],[`_`,!0]]);function mse(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function F7(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=pse.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=Z8(u.charCodeAt(u.length-1)),f=Z8((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(gse(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:mse(e,t,a),index:o}}}function I7(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?j7(n.value):M7(n.value),i=N7(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function hse(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=R7(e,c,r,i),u=F7(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function gse(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function _se(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!N8(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function vse(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?j7(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
148
+ `)&&l.type===`html`&&fse(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(z7(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=L7(l,f.attention,t,c);a.push(e),s=M7(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=M7(n)}}return r.pop(),a}function L7(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=_se(e.type,a,o),c=s[0],l=n.enter(i);r.move(c);let u=vse(e,n,{...r.current(),before:c,after:c});return r.move(z7(u,c,c)),r.move(c),l(),{children:u,sequences:s}}function R7(e,t,n,r){let i=[],a,o=M7(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===j7(n)&&I7([e],!0),a=void 0,i.push(e),e.value&&(o=M7(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=j7(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=R7(n.children,t,c,c),m=p.length>0?p[0].value:``,h=P7(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&I7(p,!0);let g=p.length>0?M7(p[p.length-1].value):``,_=P7(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&I7(p,!1),h.outside&&d!==`
149
+ `&&d!==`\r`&&I7(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function z7(e,t,n){let r=new Map,i=R7(e,r,t,n),a=i,o=F7(a,t,n);for(;o;){let s=hse(e,r,o,t,n);if(!s){a=i;break}r=s.chosen,a=s.tokens,o=s.mistake}let s=``;for(let e of a)s+=e.value;return s}B7.attention=V7,B7.peek=yse;function B7(e,t,n,r){let i=n.enter(`phrasing`),a=z7([L7(e,V7,n,n.createTracker(r))],r.before,r.after);return i(),a}function V7(e,t){return{construct:`emphasis`,markers:dse(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function yse(e,t,n){return n.options.emphasis||`*`}function bse(e,t){let n=!1;return J5(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&p8(e)&&(t.options.setext||n))}function xse(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(bse(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
150
+ `,after:`
151
+ `});return r(),t(),o+`
152
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
153
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
154
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=N7(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}H7.peek=Sse;function H7(e){return e.value||``}function Sse(){return`<`}U7.peek=Cse;function U7(e,t,n,r){let i=A7(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Cse(){return`!`}W7.peek=wse;function W7(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function wse(){return`!`}G7.peek=Tse;function G7(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Tse(){return"`"}function K7(e,t){let n=p8(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}q7.peek=Ese;function q7(e,t,n,r){let i=A7(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(K7(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
155
+ `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Ese(e,t,n){return K7(e,n)?`<`:`[`}J7.peek=Dse;function J7(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Dse(){return`[`}function Y7(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ose(e){let t=Y7(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function kse(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function X7(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ase(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?kse(n):Y7(n),s=e.ordered?o===`.`?`)`:`.`:Ose(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),X7(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function jse(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Mse(e,t,n,r){let i=jse(n),a=n.bulletCurrent||Y7(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Nse(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Pse(e,t,n,r){if(!e.children.some(function(e){return nse(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function Fse(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Z7.attention=Q7,Z7.peek=Ise;function Z7(e,t,n,r){let i=n.enter(`phrasing`),a=z7([L7(e,Q7,n,n.createTracker(r))],r.before,r.after);return i(),a}function Q7(e,t){return{construct:`strong`,markers:Fse(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Ise(e,t,n){return n.options.strong||`*`}function Lse(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function Rse(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function zse(e,t,n){let r=(X7(n)+(n.options.ruleSpaces?` `:``)).repeat(Rse(n));return n.options.ruleSpaces?r.slice(0,-1):r}var $7={blockquote:rse,break:O7,code:k7,definition:use,emphasis:B7,hardBreak:O7,heading:xse,html:H7,image:U7,imageReference:W7,inlineCode:G7,link:q7,linkReference:J7,list:Ase,listItem:Mse,paragraph:Nse,root:Pse,strong:Z7,text:Lse,thematicBreak:zse};function Bse(){return{enter:{table:Vse,tableData:t9,tableHeader:t9,tableRow:Use},exit:{codeText:Wse,table:Hse,tableData:e9,tableHeader:e9,tableRow:e9}}}function Vse(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Hse(e){this.exit(e),this.data.inTable=void 0}function Use(e){this.enter({type:`tableRow`,children:[]},e)}function e9(e){this.exit(e)}function t9(e){this.enter({type:`tableCell`,children:[]},e)}function Wse(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Gse));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Gse(e,t){return t===`|`?t:e}function Kse(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
156
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
157
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return ese(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=$7.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function qse(){return{exit:{taskListCheckValueChecked:n9,taskListCheckValueUnchecked:n9,paragraph:Yse}}}function Jse(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Xse}}}function n9(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Yse(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Xse(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=$7.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Zse(){return[Soe(),Uoe(),qoe(),Bse(),qse()]}function Qse(e){return{extensions:[Coe(),Woe(e),Joe(),Kse(e),Jse()]}}var $se={tokenize:ace,partial:!0},r9={tokenize:oce,partial:!0},i9={tokenize:sce,partial:!0},a9={tokenize:cce,partial:!0},ece={tokenize:lce,partial:!0},o9={name:`wwwAutolink`,tokenize:rce,previous:d9},s9={name:`protocolAutolink`,tokenize:ice,previous:f9},c9={name:`emailAutolink`,tokenize:nce,previous:p9},l9={};function tce(){return{text:l9}}for(var u9=48;u9<123;)l9[u9]=c9,u9++,u9===58?u9=65:u9===91&&(u9=97);l9[43]=c9,l9[45]=c9,l9[46]=c9,l9[95]=c9,l9[72]=[c9,s9],l9[104]=[c9,s9],l9[87]=[c9,o9],l9[119]=[c9,o9];function nce(e,t,n){let r=this,i,a;return o;function o(t){return!m9(t)||!p9.call(r,r.previous)||h9(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return m9(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(ece,u,l)(t):t===45||t===95||O8(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&D8(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function rce(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!d9.call(r,r.previous)||h9(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check($se,e.attempt(r9,e.attempt(i9,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function ice(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&f9.call(r,r.previous)&&!h9(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(D8(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||A8(t)||F8(t)||R8(t)||L8(t)?n(t):e.attempt(r9,e.attempt(i9,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ace(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function oce(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(a9,c,s)(t):t===null||F8(t)||R8(t)||t!==45&&L8(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function sce(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(a9,t,a)(o):o===null||F8(o)||R8(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function cce(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||F8(o)||R8(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||F8(e)||R8(e)?t(e):r(e)}function a(e){return D8(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):D8(t)?(e.consume(t),o):n(t)}}function lce(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return O8(e)?n(e):t(e)}}function d9(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||F8(e)}function f9(e){return!D8(e)}function p9(e){return!(e===47||m9(e))}function m9(e){return e===43||e===45||e===46||e===95||O8(e)}function h9(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var uce={tokenize:vce,partial:!0};function dce(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:hce,continuation:{tokenize:gce},exit:_ce}},text:{91:{name:`gfmFootnoteCall`,tokenize:mce},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:fce,resolveTo:pce}}}}function fce(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=E8(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function pce(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function mce(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||F8(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(E8(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return F8(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function hce(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||F8(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=E8(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return F8(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),V8(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function gce(e,t,n){return e.check(n5,t,e.attempt(uce,t,n))}function _ce(e){e.exit(`gfmFootnoteDefinition`)}function vce(e,t,n){let r=this;return V8(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function yce(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&y8(o,o.length,0,Q8(s,e.slice(r+1,n),t)),y8(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),y8(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Z8(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Z8(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var bce=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){xce(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function xce(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Sce(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Cce(){return{flow:{null:{name:`table`,tokenize:wce,resolveAll:Tce}}}}function wce(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):P8(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):I8(t)?V8(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||F8(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,I8(t)?V8(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return I8(t)?V8(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||P8(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return I8(t)?V8(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||P8(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||P8(n)?(e.exit(`tableRow`),t(n)):I8(n)?V8(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||F8(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Tce(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new bce;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(_9(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=g9(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=g9(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=g9(f,t,o,i,n,d)):(o[0]=o[1],d=g9(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&_9(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Sce(t.events,n))}return e}function g9(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},v9(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=v9(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=v9(t.events,n[2]),a=v9(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},v9(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function _9(e,t,n,r,i){let a=[],o=v9(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function v9(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Ece={name:`tasklistCheck`,tokenize:Oce};function Dce(){return{text:{91:Ece}}}function Oce(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return F8(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return P8(r)?t(r):I8(r)?e.check({tokenize:kce},t,n)(r):n(r)}}function kce(e,t,n){return V8(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Ace(e){return S8([tce(),dce(),yce(e),Cce(),Dce()])}var jce={};function Mce(e){let t=this,n=e||jce,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Ace(n)),a.push(Zse()),o.push(Qse(n))}var Nce={h1:({children:e})=>(0,g.jsx)(`h1`,{className:`mb-2 mt-1 text-[15px] font-medium leading-6 text-ink`,children:e}),h2:({children:e})=>(0,g.jsx)(`h2`,{className:`mb-1.5 mt-3 text-[14px] font-medium leading-5 text-ink`,children:e}),h3:({children:e})=>(0,g.jsx)(`h3`,{className:`mb-1 mt-2.5 text-[13px] font-medium leading-5 text-ink`,children:e}),p:({children:e})=>(0,g.jsx)(`p`,{className:`my-1.5 leading-[1.65] first:mt-0 last:mb-0`,children:e}),strong:({children:e})=>(0,g.jsx)(`strong`,{className:`font-medium text-ink`,children:e}),em:({children:e})=>(0,g.jsx)(`em`,{className:`italic`,children:e}),a:({children:e,href:t})=>(0,g.jsx)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`text-accent underline decoration-accent/40 underline-offset-2 hover:decoration-accent`,children:e}),ul:({children:e})=>(0,g.jsx)(`ul`,{className:`my-1.5 list-disc space-y-0.5 pl-5 marker:text-ink-3`,children:e}),ol:({children:e})=>(0,g.jsx)(`ol`,{className:`my-1.5 list-decimal space-y-0.5 pl-5 marker:text-ink-3`,children:e}),li:({children:e})=>(0,g.jsx)(`li`,{className:`leading-[1.65]`,children:e}),blockquote:({children:e})=>(0,g.jsx)(`blockquote`,{className:`my-2 border-l-2 border-accent/30 pl-3 text-ink-2`,children:e}),hr:()=>(0,g.jsx)(`hr`,{className:`my-3 border-line`}),pre:({children:e})=>(0,g.jsx)(`pre`,{className:`my-2 overflow-x-auto rounded-lg bg-surface-2 px-3 py-2.5 font-mono text-[12px] leading-5 text-ink`,children:e}),code:({children:e,className:t})=>(0,g.jsx)(`code`,{className:t?`font-mono ${t}`:`rounded bg-black/[.06] px-1 py-[1px] font-mono text-[.92em] text-ink dark:bg-white/[.1]`,children:e}),table:({children:e})=>(0,g.jsx)(`div`,{className:`my-2 overscroll-x-contain overflow-x-auto rounded-lg border border-line`,children:(0,g.jsx)(`table`,{className:`w-full min-w-max border-collapse text-left text-[11.5px] [overflow-wrap:anywhere]`,children:e})}),thead:({children:e})=>(0,g.jsx)(`thead`,{className:`bg-surface-2 text-ink-2`,children:e}),th:({children:e,style:t})=>(0,g.jsx)(`th`,{style:t,className:`whitespace-nowrap border-b border-line-strong px-3 py-1.5 font-medium`,children:e}),td:({children:e,style:t})=>(0,g.jsx)(`td`,{style:t,className:`max-w-[320px] border-b border-line/70 px-3 py-1.5 align-middle`,children:e}),tr:({children:e})=>(0,g.jsx)(`tr`,{className:`even:bg-ink/[.04] last:[&>td]:border-b-0`,children:e})};function y9({text:e}){return(0,g.jsx)(`div`,{className:`markdown-body [&_pre_code]:bg-transparent [&_pre_code]:p-0`,children:(0,g.jsx)(foe,{remarkPlugins:[Mce],components:Nce,children:e})})}var Pce=(0,h.lazy)(()=>e(()=>import(`./FileEditor-DnQa6Owc.js`),__vite__mapDeps([6,1,2,3,4,5]))),Fce=6e4;function b9({sessionId:e,target:t,onClose:n}){let[r,i]=(0,h.useState)(null),[a,o]=(0,h.useState)(null),[s,c]=(0,h.useState)(!1),[l,u]=(0,h.useState)(null),d=l===t.id,f=t.kind===`document`&&ob(t.mime),[p,m]=(0,h.useState)({id:t.id,view:`text`}),_=p.id===t.id?p.view:`text`,v=e=>m({id:t.id,view:e}),[y,b]=(0,h.useState)(null),[x,S]=(0,h.useState)(null);return(0,h.useEffect)(()=>{if(t.kind!==`document`||_!==`text`)return;let n=!0;return i(null),o(null),$j(e,t.id).then(e=>{n&&(i(e.markdown),c(e.truncated))}).catch(()=>{n&&o(`无法读取解析结果。`)}),()=>{n=!1}},[e,t.id,t.kind,_]),(0,h.useEffect)(()=>{if(!f||_!==`source`)return;let n=!0;return b(null),S(null),eM(e,t.id,{maxChars:Fce}).then(e=>{n&&b({content:e.content,lineStart:e.lineStart,lineEnd:e.lineEnd,totalLines:e.totalLines,truncated:e.truncated})}).catch(()=>{n&&S(`无法读取原始文件。`)}),()=>{n=!1}},[e,t.id,f,_]),(0,h.useEffect)(()=>{let e=e=>{e.key===`Escape`&&n()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n]),(0,g.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`附件预览:${t.filename}`,className:`fixed inset-0 z-[340] flex items-center justify-center bg-black/45 p-4`,children:(0,g.jsxs)(`div`,{className:`flex max-h-[86vh] w-full max-w-4xl flex-col overflow-hidden rounded-xl border border-line bg-surface shadow-[var(--shadow-card)]`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-line px-3 py-2`,children:[(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[12.5px] text-ink`,children:t.filename}),f?(0,g.jsx)(`div`,{role:`tablist`,"aria-label":`预览视图`,className:`flex items-center gap-0.5 rounded-full bg-surface-2/60 p-0.5`,children:[[`text`,`解析视图`],[`source`,`原文`]].map(([e,t])=>(0,g.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":_===e,onClick:()=>v(e),className:`rounded-full px-2 py-0.5 text-[11px] ${_===e?`bg-surface text-ink shadow-[var(--shadow-card)]`:`text-ink-3 hover:text-ink`}`,children:t},e))}):null,t.kind===`document`?(0,g.jsx)(`a`,{href:Jj(e,t.id),download:t.filename,className:`text-[11px] text-accent hover:underline`,children:`下载`}):null,(0,g.jsx)(`button`,{type:`button`,"aria-label":`关闭预览`,onClick:n,className:`rounded p-1 text-ink-3 hover:bg-surface-2`,children:(0,g.jsx)(Oc,{size:14})})]}),(0,g.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-4`,children:t.kind===`image`?d?(0,g.jsx)(`p`,{role:`status`,className:`text-[12px] text-danger`,children:`无法加载原图,文件可能已被删除。`}):(0,g.jsx)(`img`,{src:Jj(e,t.id),alt:t.filename,className:`mx-auto max-h-[70vh] max-w-full object-contain`,onError:()=>u(t.id)}):_===`source`?(0,g.jsx)(Ice,{identity:t.id,filename:t.filename,source:y,error:x}):a===null?r===null?(0,g.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-[12px] text-ink-3`,children:[(0,g.jsx)(ds,{size:13,className:`animate-spin motion-reduce:animate-none`}),` `,`读取解析结果…`]}):r.length===0?(0,g.jsx)(`p`,{role:`status`,className:`text-[12px] text-ink-3`,children:`该附件没有可预览的文本。`}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(y9,{text:r}),s?(0,g.jsx)(`p`,{className:`mt-3 text-[11px] text-ink-3`,children:`预览已截断,完整内容可由 Agent 分页读取。`}):null]}):(0,g.jsx)(`p`,{role:`status`,className:`text-[12px] text-danger`,children:a})})]})})}function Ice({identity:e,filename:t,source:n,error:r}){return r===null?n===null?(0,g.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-[12px] text-ink-3`,children:[(0,g.jsx)(ds,{size:13,className:`animate-spin motion-reduce:animate-none`}),` 读取原始文件…`]}):(0,g.jsxs)(`div`,{className:`flex h-[68vh] flex-col gap-2`,children:[(0,g.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-md border border-line`,children:(0,g.jsx)(h.Suspense,{fallback:(0,g.jsx)(`p`,{className:`p-3 text-[12px] text-ink-3`,children:`加载编辑器…`}),children:(0,g.jsx)(Pce,{identity:`attachment:${e}`,path:t,text:n.content,readOnly:!0,onChange:()=>void 0})})}),(0,g.jsxs)(`p`,{className:`text-[11px] text-ink-3`,children:[`第 `,n.lineStart,`–`,n.lineEnd,` 行 · 共 `,n.totalLines,` 行`,n.truncated?` · 预览已截断,完整内容可由 Agent 分页读取`:``]})]}):(0,g.jsx)(`p`,{role:`status`,className:`text-[12px] text-danger`,children:r})}var x9=`inline-flex h-7 max-w-full items-center gap-1.5 rounded-full border border-line/80 bg-surface-2/55 px-2 text-[11px] text-ink-2`,Lce=`transition-colors hover:border-accent/35 hover:bg-accent-soft/30 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 disabled:pointer-events-none disabled:opacity-55`,Rce={none:`原图`,native:`文本`,"text-layer":`文本层`,ocr:`OCR`,vision:`视觉转写`},zce={ATTACHMENT_TOO_LARGE:`文件过大`,ATTACHMENT_UNSUPPORTED:`格式不支持`,ATTACHMENT_LIMIT:`附件已满`,ATTACHMENT_PARSE_FAILED:`无法解析`,ATTACHMENT_PARSE_TIMEOUT:`解析超时`,ATTACHMENT_ENCRYPTED:`文件已加密`,ATTACHMENT_PDF_NO_TEXT:`PDF 无可提取文本`,ATTACHMENT_VISION_UNAVAILABLE:`当前模型不支持图片`,ATTACHMENT_NOT_READY:`仍在解析`,ATTACHMENT_STORAGE_FAILED:`存储不可用`};function Bce(e){return[e.status===`uploading`||e.status===`pending`?`解析中`:null,e.status===`failed`?e.errorCode?zce[e.errorCode]??`解析失败`:`解析失败`:null,e.pageCount?`${e.pageCount} 页`:null,e.method&&e.method!==`none`?Rce[e.method]:null,e.warningCount?`${e.warningCount} 条警告`:null].filter(Boolean).join(` · `)}function S9({item:e,disabled:t=!1,onRemove:n,onOpen:r}){let i=e.status===`uploading`||e.status===`pending`,a=e.status===`failed`,o=Bce(e);return(0,g.jsxs)(`div`,{className:B(x9,`shrink-0 gap-1 pr-1.5 pl-2 text-left`,a?`border-danger/35 bg-danger/5`:e.status===`ready`&&r?`hover:border-accent/35 hover:bg-accent-soft/30`:null),title:o.length>0?`${e.filename} · ${o}`:e.filename,"data-testid":`attachment-chip`,children:[i?(0,g.jsx)(ds,{size:11,"aria-hidden":`true`,className:`shrink-0 animate-spin text-ink-3 motion-reduce:animate-none`}):(0,g.jsx)(dW,{path:e.filename,size:13}),(0,g.jsx)(`button`,{type:`button`,onClick:r,disabled:e.status!==`ready`||r===void 0,className:`min-w-0 max-w-[180px] truncate text-left text-[11px] text-ink-2 enabled:hover:text-ink disabled:cursor-default`,children:e.filename}),a?(0,g.jsx)(xc,{size:10,"aria-hidden":`true`,className:B(`shrink-0 text-danger`,n?null:`mr-0.5`)}):null,o.length>0?(0,g.jsx)(`span`,{className:`sr-only`,children:o}):null,n?(0,g.jsx)(`button`,{type:`button`,onClick:n,disabled:t,"aria-label":`移除 ${e.filename}`,className:`shrink-0 rounded-full p-0.5 text-ink-3 hover:bg-surface-3 hover:text-ink disabled:opacity-40`,children:(0,g.jsx)(Oc,{size:10})}):null]})}function Vce({items:e,disabled:t=!1,onRemove:n,onRetry:r,onPreview:i}){return e.length===0?null:(0,g.jsx)(`div`,{className:`flex flex-wrap gap-1.5 px-3 pt-3`,"data-testid":`attachment-tray`,children:e.map(e=>(0,g.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,g.jsx)(S9,{item:{id:e.attachment?.id,filename:e.file.name,kind:e.attachment?.kind??(e.file.type.startsWith(`image/`)?`image`:`document`),status:e.status,method:e.attachment?.method,pageCount:e.attachment?.pageCount,warningCount:e.attachment?.warnings.length,errorCode:e.errorCode??e.attachment?.errorCode},disabled:t,onRemove:()=>n(e.key),onOpen:()=>i?.(e)}),e.status===`failed`&&r?(0,g.jsx)(`button`,{type:`button`,onClick:()=>r(e.key),className:`text-[11px] text-accent hover:underline`,children:`重试`}):null]},e.key))})}var C9=`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-[11.5px] text-ink-2 outline-none hover:bg-surface-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent/40 disabled:opacity-50`;function Hce({groups:e,model:t,credentialProfileId:n,thinking:r,catalogError:i,disabled:a,onSelectModel:o,onSelectThinking:s}){let c=(0,h.useId)(),l=(0,h.useRef)(null),u=(0,h.useRef)(null),d=(0,h.useRef)(null),[f,p]=(0,h.useState)(!1),[m,_]=(0,h.useState)(`root`),v=t?.thinking.mode,y=t?.thinking.supported?v===`toggle`?[{id:`off`,label:`关闭`},{id:`on`,label:`开启`}]:[...v===`mandatory-levels`||v===`variants`?[]:[{id:`off`,label:`关闭`}],...t.thinking.levels]:[],b=y.find(e=>e.id===r)?.label;(0,h.useEffect)(()=>{if(!f)return;d.current?.focus();let e=e=>{e.target instanceof Node&&!l.current?.contains(e.target)&&p(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[f]);let x=()=>{p(!1),u.current?.focus()},S=e=>{d.current?.focus(),_(e)};return(0,g.jsxs)(`div`,{ref:l,className:`relative min-w-0`,children:[(0,g.jsxs)(`button`,{ref:u,type:`button`,"aria-label":`模型与思考:${t?.label??`选择模型`}${b?` · ${b}`:``}`,"aria-haspopup":`dialog`,"aria-expanded":f&&!a,"aria-controls":f&&!a?c:void 0,disabled:a,onClick:()=>{_(`root`),p(!f)},className:`flex h-7 min-w-0 items-center gap-1.5 rounded-lg px-1.5 text-[11px] font-medium text-ink-2 transition-colors hover:bg-surface-2 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40`,children:[(0,g.jsx)(`span`,{className:`max-w-[96px] truncate sm:max-w-[144px]`,children:t?.label??`选择模型`}),b?(0,g.jsxs)(`span`,{className:B(`shrink-0 text-[10px] font-semibold`,r===`off`||r===`effort:none`?`text-ink-3`:`text-accent`),children:[(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`mr-1 text-ink-3`,children:`·`}),b]}):null,(0,g.jsx)(Xa,{size:11,"aria-hidden":`true`,className:`shrink-0 text-ink-3`})]}),f&&!a?(0,g.jsx)(`div`,{ref:d,id:c,role:`dialog`,"aria-label":`模型与思考`,tabIndex:-1,onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),x())},className:`absolute bottom-[calc(100%+8px)] left-0 z-40 flex max-h-[min(360px,55dvh)] w-[min(240px,calc(100vw-68px))] flex-col overflow-hidden rounded-xl border border-line bg-surface/95 p-1.5 text-ink shadow-[var(--shadow-pop)] outline-none backdrop-blur-xl`,children:m===`root`?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`button`,{type:`button`,"aria-label":`模型:${t?.label??`选择模型`}`,onClick:()=>S(`models`),className:C9,children:[(0,g.jsx)(`span`,{className:`w-14 shrink-0 text-[10px] text-ink-3`,children:`模型`}),(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-ink`,children:t?.label??`选择模型`}),(0,g.jsx)(eo,{size:11,"aria-hidden":`true`,className:`text-ink-3`})]}),(0,g.jsxs)(`button`,{type:`button`,"aria-label":`思考强度:${b??`不支持`}`,disabled:y.length===0,onClick:()=>S(`thinking`),className:C9,children:[(0,g.jsx)(`span`,{className:`w-14 shrink-0 text-[10px] text-ink-3`,children:`思考强度`}),(0,g.jsx)(`span`,{className:B(`min-w-0 flex-1 truncate`,b&&r!==`off`&&r!==`effort:none`&&`text-accent`),children:b??`不支持`}),y.length>0?(0,g.jsx)(eo,{size:11,"aria-hidden":`true`,className:`text-ink-3`}):null]})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1 px-1 pb-1 pt-0.5`,children:[(0,g.jsx)(`button`,{type:`button`,"aria-label":`返回`,onClick:()=>S(`root`),className:`grid size-5 place-items-center rounded-md text-ink-3 outline-none hover:bg-surface-2 focus-visible:ring-2 focus-visible:ring-accent/40`,children:(0,g.jsx)(Qa,{size:12,"aria-hidden":`true`})}),(0,g.jsx)(`span`,{className:`text-[10.5px] font-semibold text-ink-3`,children:m===`models`?`模型`:`思考强度`})]}),(0,g.jsx)(`div`,{className:`min-h-0 overflow-y-auto overscroll-contain`,children:m===`models`?(0,g.jsxs)(g.Fragment,{children:[e.length===0?(0,g.jsx)(`p`,{className:`px-2 py-2 text-[11px] text-ink-3`,children:i?`目录不可用,请在模型设置中刷新。`:`请先在模型设置中添加 Key。`}):null,e.map(e=>{let r=`${c}-${e.credentialProfileId}`;return(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`div`,{id:r,className:`truncate px-2.5 pb-0.5 pt-1.5 text-[10px] text-ink-3`,children:e.credentialLabel}),(0,g.jsxs)(`ul`,{"aria-labelledby":r,children:[e.models.length===0?(0,g.jsx)(`li`,{className:`px-2.5 py-1.5 text-[10.5px] text-ink-3`,children:e.lastRefreshError?`目录读取失败,请在设置中刷新。`:`此 Key 暂无可选模型`}):null,e.models.map(r=>{let i=r.id===t?.id&&e.credentialProfileId===n;return(0,g.jsx)(`li`,{children:(0,g.jsxs)(`button`,{type:`button`,"aria-label":r.label,"aria-pressed":i,onClick:()=>{x(),o(r.id,e.credentialProfileId)},className:B(C9,i&&`bg-surface-2 text-ink`),children:[(0,g.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:r.label}),(0,g.jsx)(`span`,{className:`text-[9.5px] text-ink-3`,children:$G(r)}),i?(0,g.jsx)(Ja,{size:13,"aria-hidden":`true`,className:`shrink-0 text-accent`}):null]})},r.id)})]})]},e.credentialProfileId)})]}):y.map(e=>(0,g.jsxs)(`button`,{type:`button`,"aria-pressed":e.id===r,onClick:()=>{x(),e.id!==r&&s(e.id)},className:B(C9,e.id===r&&`bg-surface-2 text-ink`),children:[(0,g.jsx)(`span`,{className:`flex-1`,children:e.label}),e.id===r?(0,g.jsx)(Ja,{size:13,"aria-hidden":`true`,className:`shrink-0 text-accent`}):null]},e.id))})]})}):null]})}function w9(e){if(e<1e3)return String(e);if(e<1e5){let t=(e/1e3).toFixed(1);return`${t.endsWith(`.0`)?t.slice(0,-2):t}k`}if(e<1e6)return`${Math.round(e/1e3)}k`;let t=(e/1e6).toFixed(2);return`${t.endsWith(`.00`)?t.slice(0,-3):t.endsWith(`0`)?t.slice(0,-1):t}M`}function Uce(e,t){return e===void 0||t===void 0||e<=0||t<=0?null:Math.round(e/(t/1e3))}function Wce(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}function Gce(e,t){if(e!==null&&t!==null&&Number.isFinite(e)&&e>=0&&Number.isFinite(t)&&t>0){let n=Math.min(100,Math.max(0,Math.round(e/t*100)));return{known:!0,percent:n,text:`本轮 ${w9(e)} / ${w9(t)} · ${n}%`,detail:`本轮请求输入:${e.toLocaleString()} / ${t.toLocaleString()} tokens(${n}%)`}}return{known:!1,percent:0,text:`暂无统计`,detail:t!==null&&Number.isFinite(t)&&t>0?`暂无统计 · 模型窗口 ${t.toLocaleString()} tokens`:`暂无统计 · 模型窗口未知`}}function T9({used:e,limit:t}){let n=Gce(e,t);return(0,g.jsx)(Sh,{label:n.detail,side:`top`,children:(0,g.jsxs)(`div`,{role:`progressbar`,"aria-label":`上下文用量`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.known?n.percent:void 0,"aria-valuetext":n.detail,className:`flex shrink-0 items-center gap-1`,children:[(0,g.jsxs)(`svg`,{"aria-hidden":`true`,width:`14`,height:`14`,viewBox:`0 0 20 20`,className:`-rotate-90`,fill:`none`,children:[(0,g.jsx)(`circle`,{cx:`10`,cy:`10`,r:`7`,stroke:`currentColor`,strokeWidth:`2`,className:`text-line-strong`}),n.known?(0,g.jsx)(`circle`,{cx:`10`,cy:`10`,r:`7`,pathLength:`100`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeDasharray:`100`,strokeDashoffset:100-n.percent,className:B(`transition-[stroke-dashoffset] duration-150 motion-reduce:transition-none`,n.percent>=90?`text-danger`:n.percent>=75?`text-warning`:`text-accent`)}):null]}),(0,g.jsx)(`span`,{className:`tabular-nums`,children:n.text})]})})}function E9({children:e}){return(0,g.jsx)(`div`,{role:`status`,"aria-label":`会话用量`,className:`mt-1 flex min-h-[16px] flex-wrap items-center gap-1 px-1 text-[10.5px] text-ink-3`,children:e})}function Kce({usage:e,streaming:t,lastStep:n,contextUsage:r}){if(e===null)return(0,g.jsxs)(E9,{children:[(0,g.jsx)(`span`,{children:`Token 统计加载中…`}),(0,g.jsx)(`span`,{className:`flex-1`}),(0,g.jsx)(T9,{...r})]});if(e===void 0)return(0,g.jsxs)(E9,{children:[(0,g.jsx)(`span`,{className:`flex-1`}),(0,g.jsx)(T9,{...r})]});let i=e.partial,a=`${i?`≥ `:``}${w9(e.totalTokens)} tokens`,o=e.cache.hitRate===null?null:Math.round(e.cache.hitRate*100),s=e.cache.knownRequests>0?[`缓存命中 ${w9(e.cache.readTokens)} tokens`,`未命中 ${w9(e.cache.missTokens)} tokens`,...e.cache.unknownRequests>0?[`未知 ${e.cache.unknownRequests} 次请求`]:[]].join(` · `):e.cache.unknownRequests>0?`缓存未知 · ${e.cache.unknownRequests} 次请求未回报缓存字段`:null,c=[`输入 ${w9(e.inputTokens)}`,`输出 ${w9(e.outputTokens)}`,...s===null?[]:[s],...i?[`缺失 ${e.missingTurns} 轮`]:[]].join(` · `),l=n===null?null:Uce(n.outputTokens,n.durationMs);return(0,g.jsxs)(E9,{children:[(0,g.jsx)(Sh,{label:c,side:`top`,children:(0,g.jsx)(`span`,{className:`tabular-nums`,children:a})}),o===null?null:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,g.jsx)(Sh,{label:s??`缓存命中率`,side:`top`,children:(0,g.jsxs)(`span`,{className:`tabular-nums`,children:[`缓存命中 `,o,`%`]})})]}),t&&l!==null&&n!==null?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,g.jsx)(Sh,{label:`最后一步输出 ${w9(n.outputTokens)} tokens · ${Wce(n.durationMs)}`,side:`top`,children:(0,g.jsxs)(`span`,{className:`tabular-nums`,children:[l,` tok/s`]})})]}):null,(0,g.jsx)(`span`,{className:`flex-1`}),(0,g.jsx)(T9,{...r})]})}var D9={id:`standard`,label:`标准审批`,detail:`L0/L1 自动,L2 询问`,icon:rc,tone:`text-accent`},O9=[{id:`readonly`,label:`只读`,detail:`禁止修改与执行`,icon:sc,tone:`text-success`},{id:`strict`,label:`严格审批`,detail:`所有写入都询问`,icon:ac,tone:`text-warning`},D9,{id:`autonomous`,label:`完全自主`,detail:`所有工具免人工审批`,icon:ac,tone:`text-danger`}];function k9(e){if(!e.thinking.supported)return`off`;if(e.thinking.mode===`toggle`)return`on`;if(e.thinking.defaultLevel)return e.thinking.defaultLevel;let t=e.thinking.mode===`mandatory-levels`?`high`:`medium`;return e.thinking.levels.find(e=>e.id===t)?.id??e.thinking.levels[0]?.id??`off`}function A9(e,t){if(!e.thinking.supported)return t===`off`;let n=e.thinking.mode??`levels`;return n===`toggle`?t===`off`||t===`on`:n===`variants`?e.thinking.levels.some(e=>e.id===t):n!==`mandatory-levels`&&t===`off`||e.thinking.levels.some(e=>e.id===t)}function qce({centered:e=!1,onSubmit:t}){let[n,r]=(0,h.useState)(),[i,a]=(0,h.useState)(``),[o,s]=(0,h.useState)(null),[c,l]=(0,h.useState)(null),u=(0,h.useRef)(null),d=(0,h.useRef)(new Set),[f,p]=(0,h.useState)(null),[m,_]=(0,h.useState)(),[v,y]=(0,h.useState)(null),[b,x]=(0,h.useState)(null),[S,C]=(0,h.useState)(),{catalog:w,error:T}=ote(),E=_W(e=>e.draft),D=_W(e=>e.setDraft),O=$q(Bq),k=$q(Vq),A=$q(e=>e.send),j=$q(e=>e.stop),M=gW(e=>e.focusComposerNonce),N=(0,h.useRef)(null),P=gW(e=>e.sessionId),ee=!!P,F=gW(e=>e.draftSession),I=F?.id===P,te=dte(ee&&!I?P:null),ne=I||te?.id===P,re=m?.sessionId===P?m.value:void 0,ie=cte(F?.id===P?F.projectId:void 0),ae=te?.approvalPolicyId??re??(I?ie:D9.id),oe=Yg({mutationKey:pM(P)},cM)>0,se=!ee||!ne||oe||O&&!k,ce=f!==null&&f===P,le=Qg({mutationKey:pM(P),mutationFn:async({id:e,patch:t})=>{let n=dM(e);await cM.cancelQueries({queryKey:n});let r=await zj(e,t);await cM.cancelQueries({queryKey:n}),cM.setQueryData(n,e=>e?{...e,...r}:{...r,activeTurn:null})}},cM),ue=w?.groups??(w?[w]:[]),de=ue.map(e=>({...e,models:e.models.filter(e=>e.visible!==!1&&(e.agentSelectable??e.contextWindow!==null))})),L=ue.flatMap(e=>e.models.map(t=>({group:e,model:t}))),fe=L.filter(({model:e})=>e.visible!==!1&&(e.agentSelectable??e.contextWindow!==null)),pe=I?F.selection:te,me=e=>L.find(({group:t,model:n})=>n.id===e.model&&(e.credentialProfileId==null||e.credentialProfileId===t.credentialProfileId)),he=pe?me(pe):void 0,ge=w?.defaultSelection?me(w.defaultSelection):void 0,_e=ge?.model.visible===!1?void 0:ge,ve=!!(pe?.model&&pe?.credentialProfileId&&!he),ye=he??(ve?void 0:_e??fe[0]),be=ne?ye?.model:void 0,xe=ye?.group.credentialProfileId??null,Se=he?pe?.thinking:_e?w?.defaultSelection?.thinking:null,Ce=Se==="default"?`medium`:Se,we=be&&Ce&&A9(be,Ce)?Ce:be?k9(be):`off`,Te=gM(),Ee=Te.data.activeConnectionId!==null&&Te.data.connections.some(e=>e.id===Te.data.activeConnectionId),De=I?F?.webSearchEnabled??!1:te?.webSearchEnabled??!1,Oe=De&&Ee,ke=ee&&be!==void 0&&(be.agentSelectable??be.contextWindow!==null)&&!oe&&!O,Ae=n?.sessionId===P?n.items:[],je=Ae.map(e=>e.file),Me=be?.capabilities?.inputModalities?.includes(`image`)===!0,Ne=!I&&!Me&&Ae.some(e=>e.file.type.startsWith(`image/`)&&e.status===`ready`&&e.attachment?.method!==`ocr`&&e.attachment?.method!==`vision`),Pe=Ae.some(e=>e.status===`uploading`||e.status===`pending`),Fe=Ae.some(e=>e.status===`failed`),Ie=(0,h.useCallback)(async(e,t)=>{if(P&&!d.current.has(e)){d.current.add(e);try{let n=await Zj(P,t);r(t=>t?.sessionId===P?{...t,items:t.items.map(t=>t.key===e?{...t,status:n.status,attachment:n,errorCode:n.errorCode}:t)}:t)}catch(t){let n=t instanceof dj?t.code:`ATTACHMENT_VISION_UNAVAILABLE`;r(t=>t?.sessionId===P?{...t,items:t.items.map(t=>t.key===e?{...t,status:`failed`,errorCode:n}:t)}:t),s({message:`图片需要视觉模型或本地 OCR 才能发送。`,tone:`error`})}finally{d.current.delete(e)}}},[P]),Le=async(e,t)=>{if(P&&!I)try{let n=await Xj(P,t);r(t=>t?.sessionId===P?{...t,items:t.items.map(t=>t.key===e?{...t,status:n.attachment.status,attachment:n.attachment,errorCode:n.attachment.errorCode}:t)}:t),n.attachment.status===`failed`&&s({message:`附件解析失败,可重试或移除。`,tone:`error`}),n.attachment.kind===`image`&&n.attachment.status===`ready`&&n.attachment.method===`none`&&!Me&&Ie(e,n.attachment.id)}catch(t){r(t=>t?.sessionId===P?{...t,items:t.items.map(t=>t.key===e?{...t,status:`failed`}:t)}:t),s({message:t instanceof Error?t.message:`附件上传失败`,tone:`error`})}},Re=e=>{if(!ee||!P||O||e.length===0)return;let t=n?.sessionId===P?n.items:[],i=8-t.length;if(i<=0){s({message:`每轮最多添加 8 个附件。`,tone:`error`});return}let o=e.slice(0,i),c=o.map(e=>({file:e,reason:hb(e.name,e.size)})).find(e=>e.reason!==null);if(c!==void 0&&c.reason!==null){s({message:c.reason===`secret`?`${c.file.name} 可能是凭据文件,附件不接收密钥或证书。`:c.reason===`size`?`${c.file.name} 超过 ${mb/1024/1024} MiB 上限。`:`不支持 ${c.file.name}(代码/配置/文档/图片,最大 20 MiB)。`,tone:`error`});return}let l=o.map(e=>({key:`${e.name}:${e.lastModified}:${Math.random().toString(36).slice(2,7)}`,file:e,status:I?`ready`:`uploading`}));if(r({sessionId:P,items:[...t,...l]}),a(``),!I)for(let e of l)Le(e.key,e.file)},ze=e=>{r(t=>t?.sessionId===P?{...t,items:t.items.filter(t=>t.key!==e)}:t)},Be=e=>{let t=Ae.find(t=>t.key===e);t&&(r(t=>t?.sessionId===P?{...t,items:t.items.map(t=>t.key===e?{...t,status:`uploading`}:t)}:t),Le(e,t.file))},Ve=O9.find(e=>e.id===ae)??D9,R=Ve.icon,He=$q(e=>e.modelUsage),Ue=be?He[be.id]:void 0,We=lte(ee&&!I?P:null),Ge=ee&&!I&&(Ue!==void 0||(We?.turns??0)>0),Ke=Ue?.contextWindow??be?.contextWindow??null,qe=Ue?.outputTokens!==void 0&&Ue.durationMs!==void 0?{outputTokens:Ue.outputTokens,durationMs:Ue.durationMs}:null,Je=$q(e=>x3(e.items).length>0);(0,h.useEffect)(()=>gW.subscribe((e,t)=>{e.sessionId!==t.sessionId&&p(null)}),[]),(0,h.useEffect)(()=>{M>0&&N.current?.focus()},[M]),(0,h.useEffect)(()=>{if(!(I||Me||!P))for(let e of Ae)e.file.type.startsWith(`image/`)&&e.status===`ready`&&e.attachment?.method===`none`&&Ie(e.key,e.attachment.id)},[Me,I,P,Ae,Ie]),(0,h.useEffect)(()=>{if(v===null)return;let e=setTimeout(()=>y(null),4e3);return()=>clearTimeout(e)},[v]),(0,h.useEffect)(()=>{let e=N.current;e&&(e.style.height=`auto`,e.style.height=`${Math.min(180,Math.max(48,e.scrollHeight))}px`)},[E]);let z=async(e,t)=>{if(!se){x(null),y(null);try{I?gW.getState().setDraftModel(P,e):await le.mutateAsync({id:P,patch:e}),t&&gW.getState().sessionId===P&&y({sessionId:P,message:`已切换到 ${t}`})}catch(e){x({sessionId:P,message:fj(e,`模型选择保存失败,请重试。`)})}}},Ye=(e,t)=>{let n=fe.find(({group:n,model:r})=>r.id===e&&n.credentialProfileId===t);n&&z({model:e,credentialProfileId:t,thinking:A9(n.model,we)?we:k9(n.model)},n.model.label)},Xe=async e=>{if(!(se||e===ae)){if(x(null),I)_({sessionId:P,value:e});else try{await le.mutateAsync({id:P,patch:{approvalPolicyId:e}}),await cM.invalidateQueries({queryKey:mM})}catch(e){x({sessionId:P,message:fj(e,`审批策略保存失败,请重试。`)})}}},Ze=async()=>{if(ee&&!se&&Ee){if(x(null),y(null),I){let e=!De;gW.getState().setDraftWebSearch(P,e),y({sessionId:P,message:e?`已开启联网搜索`:`已关闭联网搜索`})}else try{await le.mutateAsync({id:P,patch:{webSearchEnabled:!De}}),y({sessionId:P,message:De?`已关闭联网搜索`:`已开启联网搜索,下一轮生效`})}catch(e){x({sessionId:P,message:fj(e,`联网搜索开关保存失败,请重试。`)})}}},Qe=()=>{if(!ke||!be||!xe||Je||Ne||Pe||Fe)return;let e=E.trim();if(!e&&je.length===0)return;t?.();let n={model:be.id,credentialProfileId:xe,thinking:we},i=I?re:void 0,a=I&&De&&Ee?!0:void 0;je.length===0?A(e,n,i,void 0,a):A(e,n,i,void 0,a,je,()=>{r(e=>e?.sessionId===P?void 0:e),gW.getState().sessionId===P&&_W.getState().draft===E&&D(``)},Me),je.length===0&&D(``),requestAnimationFrame(()=>N.current?.focus())};return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{"data-testid":`composer-surface`,className:B(`relative rounded-[18px] border border-line shadow-[var(--shadow-card)] transition-[border-color,box-shadow] focus-within:border-accent/35 focus-within:ring-2 focus-within:ring-accent/10`,e?`bg-surface/40 backdrop-blur-sm`:`bg-surface`),children:[v?.sessionId===P?(0,g.jsx)(`p`,{role:`status`,className:`pointer-events-none absolute bottom-full left-2 mb-1 w-fit max-w-[calc(100%-1rem)] truncate rounded-md bg-surface/90 px-2 py-0.5 text-[10.5px] text-ink-3`,children:v.message}):null,(0,g.jsx)(qc,{message:b?.sessionId===P?b.message:null,onDismiss:()=>x(null)}),Ae.length>0?(0,g.jsx)(Vce,{items:Ae,disabled:O,onRemove:ze,onRetry:Be,onPreview:e=>e.attachment?l({id:e.attachment.id,filename:e.attachment.filename,kind:e.attachment.kind,mime:e.attachment.mime}):void 0}):null,i||Ne?(0,g.jsx)(`p`,{role:`status`,className:`px-3 pt-2 text-xs text-warning`,children:i||`当前模型连接未声明图片输入。请切换模型、启用 OCR 或移除图片。`}):null,(0,g.jsx)(`input`,{ref:u,type:`file`,accept:pb,multiple:!0,className:`hidden`,onChange:e=>{Re([...e.target.files??[]]),e.target.value=``}}),(0,g.jsx)(Bc,{message:o?.message??null,tone:o?.tone,onDismiss:()=>s(null)}),c?(0,g.jsx)(b9,{sessionId:P,target:c,onClose:()=>l(null)}):null,(0,g.jsx)(pm,{variant:`bare`,ref:N,value:E,rows:1,placeholder:ee?e?`提问、描述要做的改动…`:`继续对话,或提出新的任务…`:`新建或选择一个会话…`,onPaste:e=>{let t=[...e.clipboardData.files];t.length>0&&(e.preventDefault(),Re(t))},onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&e.preventDefault()},onDrop:e=>{e.dataTransfer.files.length&&(e.preventDefault(),Re([...e.dataTransfer.files]))},"aria-label":`对话输入`,onChange:e=>D(e.target.value),onKeyDown:e=>{if(e.key===`Enter`&&!e.shiftKey){if(e.nativeEvent.isComposing)return;e.preventDefault(),O||Qe()}},className:`block max-h-[180px] min-h-[48px] w-full resize-none bg-transparent px-3.5 pt-3 text-[13px] leading-[1.65] text-ink outline-none placeholder:text-ink-3 focus:outline-none focus-visible:outline-none`}),(0,g.jsxs)(`div`,{className:`flex items-center gap-0.5 px-2 pb-2 pt-1`,children:[(0,g.jsx)(gm,{label:Ee?Oe?`联网搜索:已开启`:`联网搜索:已关闭`:`联网搜索:未配置`,active:Oe,"aria-pressed":Oe,title:Ee?De?`关闭联网搜索`:`开启联网搜索`:`请先在左侧「联网搜索」添加搜索 Key`,disabled:!ee||se||!Ee,onClick:()=>void Ze(),className:`h-7 w-7`,children:(0,g.jsx)($o,{size:15,"aria-hidden":`true`})}),(0,g.jsx)(Hce,{groups:de,model:be,credentialProfileId:xe,thinking:we,catalogError:T,disabled:se,onSelectModel:Ye,onSelectThinking:e=>{be&&xe&&z({model:be.id,credentialProfileId:xe,thinking:e})}},P),(0,g.jsxs)(nm,{children:[(0,g.jsx)(rm,{asChild:!0,children:(0,g.jsx)(gm,{disabled:se,label:`审批策略:${Ve.label}`,title:`${Ve.label} · ${Ve.detail}`,className:`h-7 w-7`,children:(0,g.jsx)(R,{size:15,className:Ve.tone,"aria-hidden":`true`})})}),(0,g.jsxs)(am,{align:`start`,className:`w-[230px]`,children:[(0,g.jsx)(om,{children:`审批策略`}),(0,g.jsx)(im,{value:ae,onValueChange:e=>{let t=O9.find(t=>t.id===e);t&&t.id!==ae&&(t.id===`autonomous`?p(P):Xe(t.id))},children:O9.map(e=>(0,g.jsx)(cm,{value:e.id,className:`items-start py-2`,children:(0,g.jsxs)(`span`,{className:`flex flex-col`,children:[(0,g.jsx)(`span`,{className:`text-[11.5px] font-medium text-ink`,children:e.label}),(0,g.jsx)(`span`,{className:`text-[10px] text-ink-3`,children:e.detail})]})},e.id))})]})]},`policy-${P}`),(0,g.jsx)(`span`,{className:`flex-1`}),(0,g.jsx)(gm,{label:`添加附件`,title:`添加 PDF、Office、文本或图片(最大 20 MiB)`,disabled:!ee||O,onClick:()=>u.current?.click(),className:`h-7 w-7`,children:(0,g.jsx)(js,{size:15,"aria-hidden":`true`})}),O?(0,g.jsx)(`button`,{type:`button`,onClick:j,"aria-label":`停止执行`,className:`ml-1 flex h-7 w-7 items-center justify-center rounded-full bg-danger/10 text-danger transition-colors hover:bg-danger/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-danger/40`,children:(0,g.jsx)(dc,{size:11,fill:`currentColor`})}):(0,g.jsx)(`button`,{type:`button`,onClick:Qe,disabled:!E.trim()&&je.length===0||!ke||Je||Ne||Pe||Fe,"aria-label":`发送消息`,className:B(`ml-1 flex h-7 w-7 items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,(E.trim()||je.length>0)&&ke&&!Je&&!Ne&&!Pe&&!Fe?`bg-accent text-white shadow-[var(--shadow-card)] hover:brightness-110 active:brightness-95`:`bg-black/[.06] text-ink-3 dark:bg-white/[.08]`),children:(0,g.jsx)(Ba,{size:15,strokeWidth:2.2})})]}),(0,g.jsx)(Jc,{open:ce,title:`启用完全自主?`,description:`Agent 将不再逐次请求工具审批,可自行修改或删除文件、执行命令、进行 Git 推送等操作。程序以本机账户权限运行,可访问项目外文件和网络。请仅在信任当前任务时启用。此设置从下一轮起在当前会话持续生效,随时可以切回标准审批。`,confirmLabel:`确认启用`,danger:!0,onCancel:()=>p(null),onConfirm:()=>{ce&&Xe(`autonomous`),p(null)}})]}),Ge?(0,g.jsx)(Kce,{usage:I?void 0:We,streaming:O,lastStep:qe,contextUsage:{used:Ue?.inputTokens??null,limit:Ke}}):null]})}function Jce(){let e=$q(e=>e.items),t=$q(e=>e.sessionId),n=x3(e),[r,i]=(0,h.useState)(null),a=Math.max(0,n.findIndex(e=>e.id===r)),o=n[a];return o?(0,g.jsx)(Yce,{item:o,index:a,total:n.length,navigate:e=>i(n[a+e]?.id??o.id)},`${t}:${o.id}`):null}function Yce({item:e,index:t,total:n,navigate:r}){let i=$q(e=>e.resolveApproval),{data:a}=uM(),o=gW(e=>e.projectId),[s,c]=(0,h.useState)(!1),[l,u]=(0,h.useState)(null),[d,f]=(0,h.useState)(Date.now);(0,h.useEffect)(()=>{let e=window.setInterval(()=>f(Date.now()),1e3);return()=>window.clearInterval(e)},[]);let p=e.expiresAt!==void 0&&d>=e.expiresAt,m=async t=>{if(!(s||p)){c(!0),u(null);try{await i(e.id,t)}catch(e){u(fj(e,`审批提交失败,请重试`))}finally{c(!1)}}};return(0,g.jsxs)(`section`,{"aria-label":`待处理审批`,className:`mb-2 max-h-[min(42dvh,360px)] overflow-y-auto rounded-xl border border-warning/25 bg-surface p-2.5 shadow-[var(--shadow-card)] text-[12px]`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 font-medium text-ink`,children:[(0,g.jsx)(rc,{size:14,className:`text-warning`}),(0,g.jsx)(`span`,{children:`需要批准`}),n>1?(0,g.jsxs)(`div`,{className:`ml-auto flex items-center gap-1 text-ink-3`,children:[(0,g.jsx)(`button`,{type:`button`,"aria-label":`上一项审批`,disabled:s||t===0,onClick:()=>r(-1),className:`rounded p-1 disabled:opacity-30`,children:(0,g.jsx)(Qa,{size:14})}),(0,g.jsxs)(`span`,{children:[t+1,`/`,n]}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`下一项审批`,disabled:s||t===n-1,onClick:()=>r(1),className:`rounded p-1 disabled:opacity-30`,children:(0,g.jsx)(eo,{size:14})})]}):null]}),(0,g.jsx)(`pre`,{className:`mt-1.5 max-h-16 overflow-auto whitespace-pre-wrap break-words rounded-lg bg-surface-2 px-2 py-1.5 font-mono text-[12px] text-ink`,children:e.summary??e.impact??`请求执行操作`}),p?(0,g.jsx)(`p`,{role:`status`,className:`mt-1.5 text-ink-3`,children:`审批已过期,等待任务更新。`}):null,(0,g.jsx)(qc,{message:l,onDismiss:()=>u(null)}),(0,g.jsxs)(`div`,{className:`mt-1.5 flex items-start gap-3`,children:[(0,g.jsxs)(`details`,{className:`min-w-0 flex-1 pt-1 text-[11px] text-ink-3`,children:[(0,g.jsx)(`summary`,{className:`cursor-pointer`,children:`查看操作详情`}),(0,g.jsxs)(`div`,{className:`mt-1.5 space-y-1 whitespace-pre-wrap break-words`,children:[(0,g.jsxs)(`div`,{children:[a.projects.find(e=>e.id===o)?.name??`默认工作区`,` ·`,` `,e.toolName??e.serviceName??`操作`]}),(0,g.jsxs)(`div`,{children:[`授权范围:仅本次操作 · 风险 `,e.risk??`—`]}),e.expiresAt===void 0?null:(0,g.jsxs)(`div`,{children:[`有效至 `,new Date(e.expiresAt).toLocaleTimeString()]}),(0,g.jsx)(`pre`,{className:`max-h-28 overflow-auto whitespace-pre-wrap`,children:JSON.stringify(e.scope??{},null,2)})]})]}),(0,g.jsxs)(`div`,{className:`flex shrink-0 gap-1.5`,children:[(0,g.jsx)(V,{variant:`primary`,size:`sm`,"aria-label":e.toolName?`批准执行`:`批准部署`,disabled:s||p,onClick:()=>void m(`approve`),children:s?`提交中…`:`批准本次`}),(0,g.jsx)(V,{variant:`secondary`,size:`sm`,disabled:s||p,onClick:()=>void m(`reject`),children:`拒绝`})]})]})]})}function j9({icon:e,label:t,ariaLabel:n,onClick:r,disabled:i,titleAttr:a}){return(0,g.jsxs)(`button`,{type:`button`,"aria-label":n,title:a??n,disabled:i,onClick:r,className:B(`group`,x9,Lce),children:[(0,g.jsx)(e,{size:11,className:`shrink-0 text-accent`}),(0,g.jsx)(`span`,{className:`truncate`,children:t}),(0,g.jsx)(Ra,{size:10,className:`shrink-0 text-ink-3 group-hover:text-accent`})]})}function Xce(e){return e.split(`/`).pop()??e}function M9({target:e}){let[t,n]=(0,h.useState)(!1),[r,i]=(0,h.useState)(null),[a,o]=(0,h.useState)(!1);return(0,g.jsxs)(`div`,{className:`min-w-0`,children:[(0,g.jsx)(j9,{icon:Lo,label:`文件 · ${Xce(e.path)}`,ariaLabel:`查看文件 · ${e.path}`,disabled:a,onClick:()=>{o(!0),i(null),KM(e.scope,e.path,`agent`).then(t=>n(e.version!==void 0&&e.version!==t.version)).catch(e=>i(GM(e))).finally(()=>o(!1))}}),(0,g.jsx)(Bc,{message:r??(t?`文件已变化,已打开当前版本。`:null),tone:r?`error`:`success`,onDismiss:()=>r?i(null):n(!1)})]})}function N9({target:e}){let t=zM(e=>e.open),n=e.name??e.path;return(0,g.jsx)(j9,{icon:Co,label:`预览 · ${n}`,ariaLabel:`打开预览 · ${n}`,onClick:()=>t({kind:`browser`,resourceId:`browser:${e.serviceId}:${e.path}`,browser:{serviceId:e.serviceId,path:e.path},title:`预览服务`,projectId:e.projectId,source:`agent`})})}function Zce(e){return(0,g.jsx)(Qce,{...e},JSON.stringify([e.projectId,e.terminalId]))}function Qce({terminalId:e,projectId:t,label:n,ariaLabel:r,className:i,variant:a=`link`}){let[o,s]=(0,h.useState)(!1),[c,l]=(0,h.useState)(null),u=(0,h.useRef)(0),d=(0,h.useRef)(!1);(0,h.useEffect)(()=>()=>{u.current+=1,d.current=!1},[]);let f=async()=>{if(d.current)return;d.current=!0;let n=++u.current;s(!0),l(null);try{let r=await WK(e);if(n!==u.current)return;r.id!==e||r.projectId!==t?l({text:`终端归属已变化,无法打开。`,error:!0}):ZK(r)?l({text:`终端已关闭`}):r.status===`RUNNING`?JK(r):l({text:r.status===`STOPPING`?`终端正在关闭,请稍后重试。`:r.status===`CREATED`?`终端正在创建,请稍后重试。`:`终端状态异常,请核对状态后重试。`})}catch(e){if(n!==u.current)return;l(e instanceof dj&&e.status===404?{text:`终端已关闭或已被清理`}:{text:`无法读取终端状态,请重试。`,error:!0})}finally{n===u.current&&(d.current=!1,s(!1))}};return(0,g.jsxs)(`div`,{className:`min-w-0`,children:[a===`card`?(0,g.jsx)(j9,{icon:lc,label:`终端 · ${n.replace(/^打开终端 · /,``)}`,ariaLabel:r??n,disabled:o,onClick:()=>void f()}):(0,g.jsxs)(`button`,{type:`button`,disabled:o,"aria-label":r,"aria-busy":o,onClick:()=>void f(),className:B(`flex max-w-full items-center gap-2 py-1 text-left text-[12px] text-ink-2 hover:text-ink disabled:opacity-50`,i),children:[(0,g.jsx)(lc,{size:13,className:`shrink-0 text-accent`}),(0,g.jsx)(`span`,{className:`break-all`,children:n})]}),(0,g.jsx)(Bc,{message:c?.text??null,tone:c?.error?`error`:`info`,onDismiss:()=>l(null)})]})}function P9({target:e}){return(0,g.jsx)(Zce,{terminalId:e.terminalId,projectId:e.projectId,label:`打开终端 · ${e.role??e.terminalId}`,variant:`card`})}function $ce({sessionId:e,attachments:t}){let[n,r]=(0,h.useState)(null);return t.length===0?null:(0,g.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-1.5`,"data-testid":`attachment-strip`,children:[t.map(e=>(0,g.jsx)(S9,{item:{id:e.id,filename:e.filename,kind:e.kind,status:e.status,method:e.method,pageCount:e.pageCount,errorCode:e.errorCode},onOpen:()=>r({id:e.id,filename:e.filename,kind:e.kind,mime:e.mime})},e.id)),n?(0,g.jsx)(b9,{sessionId:e,target:n,onClose:()=>r(null)}):null]})}function ele(e,t){let n=wh(),[r,i]=(0,h.useState)(`正在连接输出…`);return(0,h.useEffect)(()=>{if(!t)return;let r=!1,a,o,s,c=1e3,l=!1,u=(t=!1)=>{l||=!t,r||s||(s=setTimeout(()=>{s=void 0,r||(n.invalidateQueries({queryKey:[`command`,e,`output`]}),l&&n.invalidateQueries({queryKey:[`command`,e,`state`]})),l=!1},250))},d=()=>{if(r)return;let t=new URL(`/ws`,window.location.href);t.protocol=t.protocol===`https:`?`wss:`:`ws:`,a=new WebSocket(t),a.onopen=()=>{a?.send(JSON.stringify({type:`subscribe`,subscriptions:[{topic:`command`,resourceId:e,after:0}]})),c=1e3,i(`实时输出已连接`),u()},a.onmessage=t=>{let n;try{n=JSON.parse(String(t.data))}catch{return}let r=BO.safeParse(n),i=LO.safeParse(n);r.success&&r.data.resourceId===e&&u(!0),i.success&&i.data.resourceId===e&&u()},a.onerror=()=>i(`输出连接中断,正在刷新状态…`),a.onclose=()=>{r||(i(`输出连接中断,正在重连…`),u(),o=setTimeout(d,c),c=Math.min(c*2,1e4))}};return d(),()=>{r=!0,clearTimeout(o),clearTimeout(s),a?.close()}},[t,n,e]),r}var tle={CREATED:`准备执行`,RUNNING:`执行中`,CANCELLING:`正在停止`,COMPLETED:`已完成`,FAILED:`执行失败`,CANCELLED:`已取消`,TIMED_OUT:`执行超时`,INTERRUPTED:`执行中断`},F9=e=>!e||[`CREATED`,`RUNNING`,`CANCELLING`].includes(e);async function nle(e,t){let n=t?.cursor??0,r=t?.text??``,i=t?.truncated??!1,a=t?.gap??!1;for(let t=0;t<64;t++){let t=zO.parse(await Y(`/api/commands/${e}/output?after=${n}&limit=500`));if(t.resyncRequired&&!t.chunks.length&&(r=``),r+=t.chunks.filter(e=>e.cursor>n).map(e=>e.data).join(``),i||=t.truncated,a||=t.resyncRequired,t.nextCursor<=n||t.chunks.length<500)return{text:r,truncated:i,gap:a,cursor:t.nextCursor};n=t.nextCursor}return{text:r,truncated:!0,gap:a,cursor:n}}function rle({commandId:e}){let t=wh(),n=Jg({queryKey:[`command`,e,`state`],queryFn:async()=>RO.parse(await Y(`/api/commands/${e}`)),staleTime:0,refetchInterval:e=>F9(e.state.data?.status)&&!e.state.error?2e3:!1}),r=F9(n.data?.status);ele(e,r&&!n.error);let i=Jg({queryKey:[`command`,e,`output`],queryFn:()=>nle(e,t.getQueryData([`command`,e,`output`])),staleTime:0,refetchInterval:r&&!n.error?2e3:!1}),a=n.data?.status;(0,h.useEffect)(()=>{a&&!F9(a)&&t.invalidateQueries({queryKey:[`command`,e,`output`]})},[t,e,a]);let o=()=>t.invalidateQueries({queryKey:[`command`,e]}),s=Qg({mutationFn:async()=>RO.parse(await Y(`/api/commands/${e}/cancel`,{method:`POST`,body:{},csrf:!0})),onSuccess:n=>{t.setQueryData([`command`,e,`state`],n),o()},onError:()=>{o()}});return(0,g.jsxs)(`section`,{"aria-label":`命令执行`,className:`mt-2 overflow-hidden rounded-xl border border-line bg-surface`,children:[(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 px-3 py-2 text-[11px]`,children:[(0,g.jsx)(`span`,{className:`font-semibold text-ink`,children:`命令执行`}),(0,g.jsx)(`span`,{role:`status`,className:`text-ink-2`,children:n.data?tle[n.data.status]:n.error?`命令不可用`:`正在读取状态…`}),n.data?.exitCode!==null&&n.data?.exitCode!==void 0?(0,g.jsxs)(`span`,{className:`font-mono text-ink-3`,children:[`退出码 `,n.data.exitCode]}):null,(0,g.jsxs)(`div`,{className:`ml-auto flex flex-wrap gap-1`,children:[(0,g.jsx)(V,{size:`sm`,variant:`secondary`,onClick:()=>void o(),children:`刷新输出`}),n.data&&r?(0,g.jsx)(V,{size:`sm`,variant:`secondary`,disabled:s.isPending||n.data.status===`CANCELLING`,onClick:()=>s.mutate(),children:`取消命令`}):null]})]}),n.data?.reasonCode?(0,g.jsxs)(`p`,{className:`px-3 text-[11px] text-ink-2`,children:[`原因:`,n.data.reasonCode]}):null,n.data?.status===`INTERRUPTED`?(0,g.jsx)(`p`,{className:`px-3 text-[11px] text-warning`,children:`执行已中断;停止情况以状态原因为准,不能确认时项目保持受阻。`}):null,(0,g.jsx)(qc,{message:s.error?`取消命令失败,请刷新确认。`:n.error||i.error?`命令状态或输出读取失败。`:null,onDismiss:s.error?()=>s.reset():void 0}),i.data?.gap?(0,g.jsx)(`p`,{className:`px-3 text-[11px] text-warning`,children:`输出有缺口,以下仅为当前可用记录。`}):null,i.data?.truncated||n.data?.truncated?(0,g.jsx)(`p`,{className:`px-3 text-[11px] text-warning`,children:`输出已截断。`}):null,(0,g.jsx)(`pre`,{role:`log`,"aria-label":`命令输出`,className:`max-h-[200px] overflow-auto whitespace-pre-wrap break-words border-t border-line bg-surface-2 px-3 py-2 font-mono text-[11px] text-ink-2`,children:i.data?.text||(r?`等待命令输出…`:`无可用输出`)})]})}function I9({item:e,turnActive:t=!1,turnOutcome:n,commentary:r=!1,onRetry:i}){switch(e.kind){case`message`:return(0,g.jsx)(L9,{item:e,commentary:r});case`plan`:return(0,g.jsx)(cle,{item:e,turnActive:t,turnOutcome:n});case`tool`:return(0,g.jsx)(lle,{item:e});case`reasoning`:return null;case`approval`:return null;case`artifact`:return(0,g.jsx)(ule,{item:e});case`error`:return(0,g.jsxs)(`div`,{role:`status`,className:`border-l-2 border-danger/50 pl-3 text-[12px] leading-5 text-ink-2`,children:[e.message,i?(0,g.jsx)(`button`,{type:`button`,onClick:i,className:`ml-2 text-[11px] text-accent hover:underline`,children:`重试`}):null]})}}function L9({item:e,children:t,commentary:n=!1,finalAnswer:r=!1}){let[i,a]=(0,h.useState)(!1),[o,s]=(0,h.useState)(!1),c=gW(e=>e.sessionId);if(e.role===`user`&&e.text.startsWith(`Work state checkpoint`))return(0,g.jsx)(`div`,{className:`mb-5 flex justify-end`,children:(0,g.jsxs)(`div`,{className:`max-w-[91%] rounded-[18px] bg-surface-2 px-3.5 py-2.5 text-[12px] leading-[1.65] text-ink-2 sm:max-w-[82%]`,children:[(0,g.jsx)(`div`,{className:`text-ink`,children:`自动继续上一轮的未完成工作`}),(0,g.jsx)(`div`,{className:`mt-0.5`,children:`已带上已完成文件、命令与失败诊断的核对事实。`}),(0,g.jsx)(`button`,{type:`button`,className:`mt-1 text-[11px] text-ink-3 transition-colors hover:text-accent`,onClick:()=>a(e=>!e),children:i?`收起核对事实`:`查看核对事实`}),i?(0,g.jsx)(`pre`,{className:`mt-2 max-h-56 overflow-auto whitespace-pre-wrap break-words font-mono text-[11px] text-ink-3`,children:e.text}):null]})});let l=e.attachments&&e.attachments.length>0?void 0:e.screenshots;return e.role===`user`?(0,g.jsxs)(`div`,{className:`mb-5 flex flex-col items-end gap-1.5`,children:[e.text?(0,g.jsxs)(`div`,{className:`max-w-[91%] rounded-[18px] bg-accent-soft px-3.5 py-2.5 text-[13px] leading-[1.65] text-ink sm:max-w-[82%]`,children:[(0,g.jsx)(`div`,{className:B(`whitespace-pre-wrap break-words [overflow-wrap:anywhere]`,!i&&e.text.length>1200&&`line-clamp-8`),children:e.text}),e.text.length>1200?(0,g.jsx)(`button`,{type:`button`,className:`mt-1 text-[11px] text-ink-3`,onClick:()=>a(e=>!e),children:i?`收起`:`展开消息`}):null]}):null,e.attachments&&e.attachments.length>0&&c?(0,g.jsx)($ce,{sessionId:c,attachments:e.attachments}):null,l?(0,g.jsx)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:l.ids.map(e=>(0,g.jsx)(ile,{src:qj(l.sessionId,e)},e))}):null]}):(0,g.jsxs)(`article`,{className:B(`min-w-0 break-words leading-[1.65] [overflow-wrap:anywhere]`,n?`text-[12px] text-ink-2`:`text-[13px] text-ink`),children:[e.text?(0,g.jsx)(`div`,{"data-testid":r?`final-answer-bubble`:`message-bubble`,className:B(`w-fit min-w-0 max-w-full rounded-2xl rounded-tl-md border border-line bg-surface`,n?`px-3 py-2`:`px-3.5 py-2.5`),children:(0,g.jsx)(y9,{text:e.text})}):null,t,!e.streaming&&e.text?(0,g.jsxs)(`div`,{className:`mt-2 flex items-center gap-2 px-0.5`,children:[(0,g.jsx)(`button`,{type:`button`,"aria-label":o?`已复制答复`:`复制答复`,className:`rounded p-1 text-ink-3 hover:bg-surface-2`,onClick:()=>{navigator.clipboard.writeText(e.text).then(()=>s(!0)).catch(()=>s(!1))},children:o?(0,g.jsx)(Ja,{size:13}):(0,g.jsx)(yo,{size:13})}),(0,g.jsx)(`time`,{dateTime:new Date(e.createdAt).toISOString(),title:new Date(e.createdAt).toLocaleString(),className:`font-mono text-[11px] text-ink-3`,children:new Date(e.createdAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`})})]}):null]})}function ile({src:e}){let[t,n]=(0,h.useState)(!1);return t?(0,g.jsx)(`span`,{className:`rounded-md border border-line bg-surface-2 px-2 py-1 text-[11px] text-ink-3`,children:`截图不可用`}):(0,g.jsx)(`img`,{src:e,alt:`用户截图`,className:`max-h-48 max-w-full rounded-lg object-contain`,loading:`lazy`,onError:()=>n(!0)})}function ale(e,t,n){if(e!==`running`||t)return e;switch(n){case`cancelled`:case`failed`:case`interrupted`:return`interrupted`;default:return`unmarked`}}var ole={done:`已完成:`,running:`进行中:`,failed:`失败:`,pending:`待做:`,interrupted:`已中断`,unmarked:`未标记完成`},sle=new Set([`interrupted`,`unmarked`]);function cle({item:e,turnActive:t,turnOutcome:n}){let r=e.steps.length,i=e.steps.filter(e=>e.status===`done`).length,a=e.steps.filter(e=>e.status===`failed`).length,o=t?0:e.steps.filter(e=>e.status===`running`||e.status===`pending`).length,s=`计划 · ${i}/${r} · ${e.title}${o>0?` · 另有 ${o} 步未完成`:``}`;return(0,g.jsxs)(`div`,{className:`mb-2 min-w-0 rounded-lg bg-surface-3 px-2.5 py-2 text-[12px] text-ink-2 sm:max-w-[28rem]`,children:[(0,g.jsxs)(`div`,{"aria-hidden":`true`,className:`mb-1.5 flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`shrink-0 font-medium`,children:`计划`}),(0,g.jsxs)(`span`,{className:`shrink-0 text-[11px] tabular-nums`,children:[i,`/`,r]}),(0,g.jsx)(`span`,{className:`flex-1`}),a>0?(0,g.jsxs)(`span`,{className:`shrink-0 text-[10.5px] text-danger`,children:[a,` 步失败`]}):o>0?(0,g.jsxs)(`span`,{className:`shrink-0 text-[10.5px]`,children:[o,` 步未完成`]}):null]}),(0,g.jsx)(`ol`,{"aria-label":s,className:`space-y-[3px]`,children:e.steps.map(e=>{let r=ale(e.status,t,n);return(0,g.jsxs)(`li`,{"aria-current":r===`running`?`step`:void 0,className:`flex items-start gap-1.5`,children:[r===`done`?(0,g.jsx)(Ja,{size:13,className:`mt-[2px] shrink-0 text-success`}):r===`running`?(0,g.jsx)(ds,{size:13,className:`mt-[2px] shrink-0 animate-spin text-accent motion-reduce:animate-none`}):r===`failed`?(0,g.jsx)(Oc,{size:13,className:`mt-[2px] shrink-0 text-danger`}):(0,g.jsx)(uo,{size:13,className:`mt-[2px] shrink-0 text-ink-3`}),(0,g.jsxs)(`span`,{className:B(`min-w-0 flex-1 break-words`,r===`running`&&`text-ink`),children:[e.title,(0,g.jsx)(`span`,{className:B(sle.has(r)?`ml-2`:`sr-only`,`text-[11px]`),children:ole[r]})]})]},e.id)})})]})}function lle({item:e}){let[t,n]=(0,h.useState)(!1);return(0,g.jsxs)(`div`,{className:`min-w-0 text-[12px] text-ink-3`,children:[(0,g.jsxs)(`button`,{type:`button`,"aria-expanded":t,onClick:()=>n(e=>!e),className:`flex w-full items-start gap-1.5 rounded-md py-1 text-left transition-colors hover:text-accent`,children:[(0,g.jsx)(eo,{size:13,className:B(`mt-0.5 shrink-0`,t&&`rotate-90`)}),(0,g.jsx)(`span`,{className:B(`min-w-0 [overflow-wrap:anywhere]`,e.commandLabel&&`line-clamp-2 font-mono`),children:e.commandLabel||e.summary||e.name}),e.status===`error`?(0,g.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-0.5 text-danger`,children:[(0,g.jsx)(Oc,{size:13}),` 失败`,e.retried===!0?(0,g.jsx)(`span`,{className:`text-ink-3`,children:`· 已重试`}):null]}):null]}),t?(0,g.jsxs)(`div`,{className:`ml-5 space-y-2`,children:[(0,g.jsxs)(`div`,{className:`text-[11px]`,children:[e.name,e.durationMs===void 0?``:` · ${Math.round(e.durationMs/1e3)}秒`]}),e.args?(0,g.jsx)(`pre`,{className:`max-h-[200px] overflow-auto whitespace-pre-wrap break-words rounded-lg bg-surface-2 p-2.5 font-mono text-[12px] text-ink-2`,children:e.args}):null,e.output?(0,g.jsx)(`pre`,{className:`max-h-[200px] overflow-auto whitespace-pre-wrap break-words rounded-lg bg-surface-2 p-2.5 font-mono text-[12px] text-ink-2`,children:e.output}):null,e.commandId?(0,g.jsx)(rle,{commandId:e.commandId}):null]}):null]})}function ule({item:e}){let t=zM(e=>e.open),{projectId:n,sessionId:r}=gW();return e.resourceTarget?.kind===`file`?(0,g.jsx)(M9,{target:e.resourceTarget}):e.resourceTarget?.kind===`preview`?(0,g.jsx)(N9,{target:e.resourceTarget}):e.resourceTarget?.kind===`terminal`?(0,g.jsx)(P9,{target:e.resourceTarget}):(0,g.jsxs)(`div`,{className:`break-words text-[12px] text-ink-2`,children:[(0,g.jsx)(`span`,{children:e.title}),(0,g.jsx)(`p`,{className:`mt-1 text-ink-3`,children:e.description}),e.href?(0,g.jsxs)(`button`,{type:`button`,className:`mt-1 text-accent underline decoration-accent/30 underline-offset-4 hover:decoration-accent`,onClick:()=>t({kind:`browser`,resourceId:e.href??e.id,title:e.title,projectId:n,sessionId:r,source:`artifact`}),children:[`打开 `,e.title]}):null]})}var R9=3;function dle(e){return e.kind===`message`&&e.role===`user`}function fle(e){return e.kind===`message`&&e.role===`user`&&e.text.startsWith(`Work state checkpoint`)}function ple(e){let t=[],n=new Map,r;for(let i of e){let e=i.kind===`message`&&i.role===`user`;if(fle(i)&&i.turnId!==void 0&&r!==void 0){n.set(i.turnId,r),r.turnIds.push(i.turnId),r.users.push(i);continue}let a=i.turnId??(e?i.id:r?.id??i.id),o=n.get(a);if(o)o.items.push(i),i.turnId!==void 0&&!o.turnIds.includes(i.turnId)&&o.turnIds.push(i.turnId),e&&(r=o,o.users.push(i));else{let o={id:a,items:[i],turnIds:i.turnId===void 0?[]:[i.turnId],users:e?[i]:[]};t.push(o),n.set(a,o),r=o}}return t}function mle(e,t){return t===null?e.at(-1):e.find(e=>e.turnIds.includes(t))}function hle(e){switch(e){case`tokens`:return`已达花费上限`;case`context`:return`上下文已满`;case`duration`:return`执行超时中止`;case`steps`:return`步数已达上限`;case`tool_calls`:return`工具调用已达上限`;default:return`预算停止`}}function gle(e){let t=$q(Hq),[n,r]=(0,h.useState)(()=>Date.now());return(0,h.useEffect)(()=>{if(!e)return;r(Date.now());let t=window.setInterval(()=>r(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),!e||t===null?null:Math.max(0,Math.floor((n-t)/1e3))}function _le(){return(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`process-sparkle`,"data-active":`true`,children:(0,g.jsxs)(`svg`,{viewBox:`0 0 20 20`,fill:`none`,"aria-hidden":`true`,children:[(0,g.jsx)(`path`,{className:`process-sparkle-main`,d:`M7.6 2.2c.5 4.2 1.9 5.6 6.1 6.1-4.2.5-5.6 1.9-6.1 6.1-.5-4.2-1.9-5.6-6.1-6.1 4.2-.5 5.6-1.9 6.1-6.1Z`,fill:`currentColor`}),(0,g.jsx)(`path`,{className:`process-sparkle-small`,d:`M15.4 11.2c.3 2.3 1 3 3.3 3.3-2.3.3-3 1-3.3 3.3-.3-2.3-1-3-3.3-3.3 2.3-.3 3-1 3.3-3.3Z`,fill:`currentColor`})]})})}function vle(e){switch(e.name){case`run_command`:case`run_shell`:return`命令`;case`read_file`:case`list_files`:case`search_code`:return`读取`;case`write_file`:case`apply_patch`:return`修改文件`;case`start_process`:case`list_processes`:case`read_process_output`:case`stop_process`:return`后台进程`;case`list_service_ops`:case`read_service_ops_logs`:case`control_service_ops`:return`服务运维`;default:return``}}function yle({group:e,active:t}){let n=$q(e=>e.send),r=$q(e=>e.resumeTurn),i=e.items,a=i.find(dle),o=e.users.at(-1)??a,s=t&&o?.turnOutcome===void 0,[c,l]=(0,h.useState)(!1),[u,d]=(0,h.useState)(!1),[f,p]=(0,h.useState)(!1),m=i.filter(e=>e.kind===`tool`&&e.name!==`update_plan`),_=-1,v=-1;i.forEach((e,t)=>{e.kind===`tool`&&(_=t),e.kind===`message`&&e.role===`assistant`&&(v=t)});let y=v>=0&&!s&&o?.terminalReason!==`continued`&&(v>_||o?.turnOutcome===`completed`)?i[v]:void 0,b=t&&!y?[...i].reverse().find(e=>e.kind===`message`&&e.role===`assistant`):void 0,x=i.filter(e=>e.kind===`plan`).at(-1),S=i.filter(e=>e!==a&&e!==y&&e!==b&&(e.kind===`message`&&e.role===`assistant`||e.kind===`tool`&&e.name!==`update_plan`)),C=o?.turnOutcome===`interrupted`,w=o?.turnOutcome===`failed`||o?.turnOutcome===`cancelled`,T=o?.terminalReason===`continued`,E=C&&o.turnId!==void 0?`interrupted_${o.turnId}`:void 0,D=o?.terminalReason===`budget`,O=o?.terminalReason===`output_truncated`,k=e.users.reduce((e,t)=>t.durationMs===void 0?e:(e??0)+t.durationMs,void 0),A=gle(s),j=s&&x3(i).length>0,M=[...i].reverse().find(e=>e.kind===`tool`&&e.name!==`update_plan`&&e.status===`running`),N=s&&i.some(e=>e.kind===`message`&&e.role===`assistant`&&e.streaming),P=s&&i.some(e=>e.kind===`reasoning`&&e.streaming),ee;ee=s?j?`Waiting for approval...`:M?`Running...`:N?`Generating...`:P?`Thinking...`:`Starting...`:T?`Continuing...`:C?`Interrupted`:w?`Failed`:`Completed`;let F=Math.max(0,e.users.length-1),I=s&&A!==null?`${A}s`:!s&&k!==void 0?`${Math.round(k/1e3)}s`:``,te=m.length,ne=te>0?`${te} 步`:``,re=[I,M?vle(M):``,F>0?`已自动继续 ${F} 次`:``,!s&&D?hle(o?.budgetCause):``,!s&&O?`输出被截断`:``].filter(Boolean).join(` · `),ie=[`执行过程`,ee,re,ne].filter(Boolean).join(` · `),ae=c?S:!s&&y===void 0&&!w?S.filter(e=>e.kind===`tool`&&e.status===`error`):[],oe=new Map;for(let e of m){let t=e.resourceTarget;t&&oe.set(t.kind===`file`?JSON.stringify([t.scope,t.path]):t.kind===`preview`?`preview:${t.serviceId}:${t.path}`:t.terminalId,t)}let se=new Set([...oe.values()].filter(e=>e.kind===`file`).map(e=>e.path)),ce=new Map,le=0;for(let t of e.users){le+=t.fileResultsOmitted??0;for(let e of t.fileResults??[])ce.set(e.path,e)}let ue=ce.size===0?void 0:[...ce.values()],de=new Set((ue??[]).filter(e=>e.category===`deliverable`).map(e=>e.path)),L=ue===void 0?[...oe.entries()]:[...oe.entries()].filter(([,e])=>e.kind!==`file`||de.has(e.path)),fe=L.filter(([,e])=>e.kind===`file`),pe=f?fe:fe.slice(0,R9),me=new Set(pe.map(([e])=>e)),he=L.filter(([e,t])=>t.kind!==`file`||me.has(e)),ge=i.filter(e=>{if(e.kind!==`artifact`)return!1;let t=e.title.replace(/^已(?:修改|创建) /,``);return ue===void 0?!se.has(t):t===e.title}),_e=he.length>0||ge.length>0||le>0,ve=!s&&_e?(0,g.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[he.length>0?(0,g.jsxs)(`section`,{"aria-label":`本次成果`,className:`flex flex-wrap gap-1.5`,children:[he.map(([e,t])=>t.kind===`file`?(0,g.jsx)(M9,{target:t},e):t.kind===`preview`?(0,g.jsx)(N9,{target:t},e):(0,g.jsx)(P9,{target:t},e)),fe.length>R9?(0,g.jsx)(`button`,{type:`button`,"aria-label":f?`收起文件`:`展开全部文件`,"aria-expanded":f,onClick:()=>p(e=>!e),className:`px-1 py-1 text-[11px] text-ink-3 transition-colors hover:text-accent`,children:f?`收起`:`展开全部`}):null]}):null,ge.map(e=>(0,g.jsx)(I9,{item:e},e.id)),le>0?(0,g.jsx)(`p`,{className:`text-[11px] text-ink-3`,children:`另有 ${le} 个文件未列出`}):null]}):null;return(0,g.jsxs)(`section`,{"aria-label":`对话轮次`,className:`min-w-0`,children:[a?(0,g.jsx)(I9,{item:a}):null,x?(0,g.jsx)(I9,{item:x,turnActive:s,turnOutcome:o?.turnOutcome},x.id):null,(0,g.jsxs)(`div`,{className:`space-y-2`,children:[S.length>0||m.length>0||P||j||s&&!y?(0,g.jsxs)(`div`,{className:`text-[12px] text-ink-3`,children:[(0,g.jsxs)(`button`,{type:`button`,"aria-label":ie,"aria-expanded":c,onClick:()=>l(e=>!e),className:`process-status-row flex w-full items-center gap-2 rounded-md px-1 py-1 text-left transition-colors hover:text-accent`,children:[s?(0,g.jsx)(_le,{}):null,(0,g.jsx)(`span`,{className:B(`shrink-0 font-medium text-ink-2`,s&&`process-status-shimmer`),children:ee}),re===``?null:(0,g.jsx)(`span`,{className:`relative top-[0.5px] min-w-0 truncate text-[11px] text-ink-3`,children:re}),(0,g.jsx)(`span`,{className:`flex-1`}),(0,g.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:[ne===``?null:(0,g.jsx)(`span`,{"data-testid":`process-metrics`,className:`text-[11px] text-ink-3 tabular-nums`,children:ne}),ne===``?null:(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px bg-line`}),(0,g.jsx)(eo,{size:13,className:B(`shrink-0 transition-transform`,c&&`rotate-90`)})]})]}),ae.length>0?(0,g.jsx)(`div`,{className:`ml-1.5 mt-1 space-y-1 border-l border-line pl-3`,children:ae.map(e=>(0,g.jsx)(I9,{item:e,turnActive:s,commentary:!0},e.id))}):null]}):null,o?.turnOutcome===`interrupted`&&o.turnId!==void 0?(0,g.jsx)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-md border border-line bg-surface-2 px-2.5 py-1.5 text-[12px] text-ink-2`,children:u?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:`min-w-0 flex-1`,children:`继续会新建一轮,并带上已完成文件、命令与失败诊断的核对事实;原轮次保持原样。`}),(0,g.jsx)(`button`,{type:`button`,className:`rounded border border-line px-2 py-0.5 text-ink transition-colors hover:text-accent`,onClick:()=>{d(!1),r(o.turnId??``)},children:`确认继续`}),(0,g.jsx)(`button`,{type:`button`,className:`rounded px-2 py-0.5 text-ink-3 transition-colors hover:text-ink`,onClick:()=>d(!1),children:`取消`})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`span`,{className:`min-w-0 flex-1`,children:`上次执行被中断(服务重启或退出)。`}),(0,g.jsx)(`button`,{type:`button`,className:`rounded border border-line px-2 py-0.5 text-ink transition-colors hover:text-accent`,onClick:()=>d(!0),children:`继续这个任务`})]})}):null,b?(0,g.jsx)(I9,{item:b,commentary:!0}):null,y?.kind===`message`?(0,g.jsx)(L9,{item:y,finalAnswer:!0,children:ve}):ve,i.filter(e=>e.kind===`error`&&e.id!==E).map(e=>(0,g.jsx)(I9,{item:e,onRetry:a?()=>void n(a.text):void 0},e.id))]})]})}function ble(){let e=$q(e=>e.items),t=$q(e=>e.loading),n=$q(Bq),r=$q(e=>e.contextNotice),i=$q(Vq),a=$q(e=>e.scrollToLatestNonce),o=gW(e=>e.sessionId),s=(0,h.useRef)(null),c=(0,h.useRef)(null),l=(0,h.useRef)(!0),[u,d]=(0,h.useState)(!1),f=(0,h.useCallback)(()=>{let e=s.current;e&&(l.current?e.scrollTop=e.scrollHeight:d(e.scrollHeight-e.scrollTop-e.clientHeight>140))},[]);(0,h.useLayoutEffect)(()=>{l.current=!0,d(!1)},[o]);let p=e.map(e=>e.kind===`reasoning`?``:JSON.stringify(e)).join(`|`);(0,h.useLayoutEffect)(f,[p,t]),(0,h.useLayoutEffect)(()=>{if(a===0)return;l.current=!0,d(!1);let e=s.current;e&&(e.scrollTop=e.scrollHeight)},[a]),(0,h.useEffect)(()=>{let e=s.current,t=c.current;if(!e||!t||typeof ResizeObserver>`u`)return;let n=new ResizeObserver(f);return n.observe(e),n.observe(t),()=>n.disconnect()},[f]);let m=ple(e),_=n?mle(m,i):void 0;return(0,g.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,g.jsx)(`div`,{ref:s,role:`log`,"aria-label":`会话时间线`,onClickCapture:e=>{e.target instanceof Element&&e.target.closest(`button[aria-expanded]`)&&(l.current=!1)},onScroll:e=>{let t=e.currentTarget,n=t.scrollHeight-t.scrollTop-t.clientHeight;l.current=n<70,d(n>140)},className:`min-h-0 flex-1 overflow-y-auto px-4 py-5 sm:px-7 [scrollbar-gutter:stable]`,children:(0,g.jsxs)(`div`,{ref:c,className:`mx-auto w-full max-w-[760px] space-y-8 pb-5`,children:[r?(0,g.jsxs)(`p`,{role:`status`,className:`text-[11px] text-ink-3`,children:[`上下文已压缩`,r.degraded?`(降级:超出部分已截断)`:``]}):null,t?(0,g.jsx)(`div`,{role:`status`,className:`py-8 text-[12px] text-ink-3`,children:`正在加载对话…`}):m.map(e=>(0,g.jsx)(yle,{group:e,active:_===e},`${o}:${e.id}`))]})}),(0,g.jsx)(`div`,{"aria-hidden":`true`,className:`conversation-scroll-edge conversation-scroll-edge-top`}),(0,g.jsx)(`div`,{"aria-hidden":`true`,className:`conversation-scroll-edge conversation-scroll-edge-bottom`}),u?(0,g.jsx)(`button`,{type:`button`,"aria-label":`回到最新消息`,onClick:()=>{l.current=!0,f(),d(!1)},className:`absolute bottom-3 left-1/2 z-10 flex h-8 w-8 -translate-x-1/2 items-center justify-center rounded-full border border-line bg-surface text-accent shadow-[var(--shadow-card)] transition-colors hover:bg-accent-soft`,children:(0,g.jsx)(Ma,{size:14})}):null]})}var xle=[{label:`了解项目`,text:`先帮我了解项目结构、主要功能和启动方式。`,icon:Uo,color:`text-accent`},{label:`排查问题`,text:`帮我排查一个问题:`,icon:Ka,color:`text-warning`},{label:`实现功能`,text:`我想在这个项目中实现一个功能:`,icon:_o,color:`text-success`}];function Sle(){return(0,g.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 grid place-items-center overflow-clip [container-type:size]`,children:(0,g.jsx)(`div`,{"data-testid":`welcome-backdrop`,className:`welcome-backdrop relative aspect-square w-[min(100cqw,100cqh,700px)]`})})}function Cle({workspaceLabel:e}){return(0,g.jsxs)(`h2`,{className:`mb-6 text-balance text-center text-[20px] font-semibold tracking-tight text-ink [overflow-wrap:anywhere] sm:text-[27px]`,children:[`想在 `,e,` 中做些什么?`]})}function wle(){return(0,g.jsx)(`section`,{"aria-label":`建议任务`,className:`mt-3 flex flex-wrap justify-center gap-2`,children:xle.map(({label:e,text:t,icon:n,color:r})=>(0,g.jsxs)(`button`,{type:`button`,onClick:()=>{_W.getState().setDraft(t),gW.getState().focusComposer()},className:`inline-flex min-h-8 items-center gap-1.5 rounded-lg border border-line bg-surface/70 px-2.5 text-[12px] text-ink-2 transition-colors hover:border-accent/30 hover:bg-accent-soft hover:text-ink focus-visible:outline-2 focus-visible:outline-accent`,children:[(0,g.jsx)(n,{size:14,className:r,"aria-hidden":`true`}),e]},e))})}function Tle(){let{data:e}=uM(),{projectId:t,sessionId:n,resourceCollapsed:r,toggleResource:i}=gW();RK(e=>e.extra);let a=wh(),[o,s]=(0,h.useState)(!1),c=$q(e=>e.sessionId===n&&!e.loading&&e.turn.phase===`idle`&&!e.items.length),l=(0,h.useRef)(null),u=(0,h.useRef)(null),d=(0,h.useRef)(null),f=()=>{c&&l.current&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(u.current={sessionId:n,top:l.current.getBoundingClientRect().top})};(0,h.useLayoutEffect)(()=>{if(c){d.current?.cancel();return}let e=u.current;u.current=null;let t=l.current;if(e?.sessionId!==n||!t||typeof t.animate!=`function`)return;let r=e.top-t.getBoundingClientRect().top;r&&(d.current=t.animate([{transform:`translateY(${r}px)`},{transform:`translateY(0)`}],{duration:290,easing:`cubic-bezier(.22,.75,.25,1)`}))},[c,n]);let p=[...e.sessions].find(e=>e.id===n),m=e.projects.find(e=>e.id===t)?.name??hW(n,e.sessions),_=async()=>{if(p)try{await Kj(p.id),await a.invalidateQueries({queryKey:[`workspace`]})}catch(e){window.dispatchEvent(new CustomEvent(`larness:workspace-error`,{detail:fj(e,`归档会话失败`)}))}};return(0,g.jsxs)(`main`,{className:`conversation-surface flex min-h-0 min-w-0 flex-1 flex-col bg-canvas/55`,children:[(0,g.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center gap-3 px-4 sm:px-7`,children:[(0,g.jsx)(`h1`,{className:`min-w-0 truncate text-[12px] font-medium`,children:p?.title??`新会话`}),(0,g.jsx)(`span`,{className:`ml-auto hidden max-w-[40%] truncate text-[11px] text-ink-3 md:block`,children:m}),(0,g.jsxs)(`div`,{className:`ml-auto flex items-center gap-0.5 md:ml-0`,children:[(0,g.jsx)(gm,{label:r?`展开项目资源`:`折叠项目资源`,className:`hidden xl:inline-flex`,onClick:i,children:(0,g.jsx)(ks,{size:14})}),(0,g.jsxs)(nm,{children:[(0,g.jsx)(rm,{asChild:!0,children:(0,g.jsx)(gm,{label:`会话操作`,children:(0,g.jsx)(To,{size:15})})}),(0,g.jsxs)(am,{align:`end`,className:`w-[190px]`,children:[(0,g.jsx)(sm,{disabled:!p,onSelect:()=>s(!0),children:`重命名会话`}),(0,g.jsx)(lm,{}),(0,g.jsx)(sm,{disabled:!p||!1,onSelect:()=>void _(),className:`text-danger focus:text-danger`,children:`归档会话`})]})]})]})]}),c?null:(0,g.jsx)(ble,{}),(0,g.jsx)(XW,{session:p?{id:p.id,title:p.title}:null,onClose:()=>s(!1),open:o}),(0,g.jsxs)(`div`,{"data-testid":`composer-dock`,"data-placement":c?`center`:`bottom`,className:B(`relative px-4 sm:px-7`,c?`flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto py-5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`:`shrink-0 pb-3 pt-1`),children:[c?(0,g.jsx)(Sle,{}):null,(0,g.jsxs)(`div`,{className:B(`relative mx-auto flex w-full max-w-[760px] flex-col`,c&&`my-auto shrink-0`),children:[c?(0,g.jsx)(Cle,{workspaceLabel:m}):null,c?null:(0,g.jsx)(b3,{}),(0,g.jsx)(Jce,{}),(0,g.jsx)(`div`,{ref:l,"data-composer-motion":!0,className:`relative z-10 min-w-0`,children:(0,g.jsx)(qce,{centered:c,onSubmit:f})}),c?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(wle,{}),(0,g.jsx)(`div`,{className:`mt-5`,children:(0,g.jsx)(b3,{})})]}):null]})]})]})}function Ele(e){let t=$q(e=>e.load),n=$q(e=>e.disconnect);(0,h.useEffect)(()=>(t(e),()=>n()),[n,t,e])}function Dle({scope:e,treeWidth:t,open:n,close:r,restoreFocus:i}){return(0,g.jsx)(Hc,{open:n,onOpenChange:e=>{e||r()},children:n?(0,g.jsx)(Ole,{scope:e,treeWidth:t,close:r,restoreFocus:i}):null})}function Ole({scope:e,treeWidth:t,close:n,restoreFocus:r}){let[i,a]=(0,h.useState)(``),[o,s]=(0,h.useState)(``),[c,l]=(0,h.useState)(0),[u,d]=(0,h.useState)(!1),[f,p]=(0,h.useState)(``),m=(0,h.useRef)(null),_=(0,h.useId)(),v=i.trim();(0,h.useLayoutEffect)(()=>()=>m.current?.abort(),[]),(0,h.useEffect)(()=>{let e=window.setTimeout(()=>s(v),160);return()=>window.clearTimeout(e)},[v]);let y=Jg({queryKey:[`file-search`,BM(e),o],queryFn:({signal:t})=>Tte(e,o,t),enabled:v!==``&&v===o,retry:!1,gcTime:3e4}),b=v===o?y.data?.items??[]:[],x=Math.min(c,b.length-1),S=b[x],C=S?`${_}-${x}`:void 0;(0,h.useEffect)(()=>{C&&document.getElementById(C)?.scrollIntoView?.({block:`nearest`})},[C]);let w=r=>{if(m.current)return;m.current=new AbortController;let{signal:i}=m.current;p(``),d(!0),KM(e,r,`projectId`in e?`project`:`sessionId`in e?`session`:`global`,{signal:i,treeWidth:t}).then(n).catch(e=>{i.aborted||p(GM(e))}).finally(()=>{i.aborted||(m.current=null,d(!1))})};return(0,g.jsxs)(Wc,{overlayClassName:`bg-black/10 backdrop-blur-[3px] dark:bg-black/30`,className:`top-[min(15dvh,140px)] bottom-auto mx-auto max-h-[76dvh] w-[min(640px,calc(100vw-28px))] overflow-hidden rounded-[22px] border-white/60 bg-surface/90 p-0 shadow-[0_24px_80px_-16px_rgb(0_0_0/0.38)] backdrop-blur-2xl dark:border-white/12`,onCloseAutoFocus:e=>{e.preventDefault(),r()},children:[(0,g.jsx)(Gc,{className:`sr-only`,children:`快速打开文件`}),(0,g.jsx)(Kc,{className:`sr-only`,children:`搜索当前工作区。使用方向键选择,Enter 打开。`}),(0,g.jsxs)(`div`,{className:`flex h-16 items-center gap-3 px-4 sm:h-[72px] sm:px-5`,children:[(0,g.jsx)(Zs,{size:24,"aria-hidden":`true`,className:`shrink-0 text-ink-3`}),(0,g.jsx)(fm,{variant:`bare`,className:`h-full min-w-0 flex-1 bg-transparent text-base text-ink outline-none sm:text-xl`,role:`combobox`,"aria-label":`文件名或相对路径`,"aria-autocomplete":`list`,"aria-controls":_,"aria-expanded":b.length>0,"aria-activedescendant":C,placeholder:`输入文件名或相对路径`,maxLength:128,readOnly:u,value:i,onChange:e=>{a(e.target.value),l(0),p(``)},onKeyDown:e=>{if(S&&!e.nativeEvent.isComposing){switch(e.key){case`ArrowDown`:l((x+1)%b.length);break;case`ArrowUp`:l((x+b.length-1)%b.length);break;case`Enter`:w(S.path);break;default:return}e.preventDefault()}}}),(0,g.jsx)(`button`,{type:`button`,"aria-label":`关闭快速打开`,title:`关闭快速打开`,onClick:n,className:`shrink-0 rounded-md border border-line bg-surface-2/70 px-1.5 py-0.5 font-mono text-[10px] text-ink-3 hover:text-ink`,children:`Esc`})]}),(0,g.jsx)(qc,{message:f||(v===o&&y.isError?`搜索文件失败,请修改关键词或重试。`:null),onDismiss:f?()=>p(``):void 0,retry:!f&&v===o&&y.isError?{label:`重试`,run:()=>void y.refetch()}:void 0}),(0,g.jsx)(`div`,{id:_,role:`listbox`,"aria-label":`匹配的文件`,className:B(`max-h-[min(55dvh,420px)] overflow-y-auto`,b.length>0&&`my-2 border-t border-line px-2 pt-2`),children:b.map((e,t)=>(0,g.jsxs)(`button`,{type:`button`,role:`option`,tabIndex:-1,id:`${_}-${t}`,"aria-selected":t===x,"aria-disabled":u,title:e.path,className:B(`flex w-full min-w-0 items-center gap-3 rounded-xl px-3 py-2 text-left`,t===x?`bg-accent-soft text-accent`:`hover:bg-surface-2`),onPointerMove:()=>l(t),onMouseDown:e=>e.preventDefault(),onClick:()=>w(e.path),children:[(0,g.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center rounded-[9px] bg-surface-2 text-ink-3`,children:(0,g.jsx)(dW,{path:e.path,size:18})}),(0,g.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,g.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),(0,g.jsx)(`span`,{className:`truncate text-[11px] text-ink-3`,children:e.path.split(`/`).slice(0,-1).join(`/`)||`.`})]}),t===x?(0,g.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs text-ink-3`,children:`↵`}):null]},e.path))}),v&&!f&&(u||v!==o||y.isFetching||y.data?.partial||y.isSuccess&&!b.length)?(0,g.jsx)(`p`,{role:`status`,className:`border-t border-line px-5 py-2.5 text-[11px] text-ink-3`,children:u?`正在打开文件…`:v!==o||y.isFetching?`正在搜索…`:y.data?.partial?`结果受限,请缩小关键词。`:`没有匹配的文件。`}):null]})}var kle=(e,t=220)=>{let[n,r]=(0,h.useState)(e),[i,a]=(0,h.useState)(!1);return(0,h.useEffect)(()=>{if(e){r(!0);let e=requestAnimationFrame(()=>a(!0));return()=>cancelAnimationFrame(e)}a(!1);let n=window.setTimeout(()=>r(!1),t);return()=>window.clearTimeout(n)},[e,t]),{mounted:n,visible:i}};function Ale({version:e}){let{data:t,isPending:n,isError:r}=uM(),i=gW(e=>e.projectId),a=gW(e=>e.sessionId),o=gW(e=>e.reconcileWorkspace),s=gW(e=>e.sidebarCollapsed),c=gW(e=>e.sidebarWidth),l=gW(e=>e.resourceWidth),u=gW(e=>e.resourceCollapsed),d=gW(e=>e.setSidebarWidth),f=gW(e=>e.setResourceWidth),p=gW(e=>e.mobileSidebarOpen),m=gW(e=>e.toggleSidebar),_=gW(e=>e.setMobileSidebar),v=zK(),[y,b]=(0,h.useState)(null),[x,S]=(0,h.useState)(null),C=(0,h.useRef)(null),w=pW(i,a,t.sessions),T=BM(w),E=x===T;x!==null&&!E&&S(null);let D=(0,h.useCallback)(()=>{C.current=document.activeElement instanceof HTMLElement?document.activeElement:null,S(T)},[T]),O=kle(p);return Ele(a),(0,h.useEffect)(()=>{let e=e=>{let t=e.detail;b(typeof t==`string`?t:`操作失败`)};return window.addEventListener(`larness:workspace-error`,e),()=>window.removeEventListener(`larness:workspace-error`,e)},[]),(0,h.useEffect)(()=>{n||r||o(t.projects.map(e=>e.id),t.sessions)},[t.projects,t.sessions,n,r,o]),(0,h.useEffect)(()=>{let e=e=>{if(e.defaultPrevented)return;let t=e.metaKey||e.ctrlKey,n=e.key.toLowerCase();if(t&&n===`p`&&!e.shiftKey&&!e.altKey){if(!E&&document.querySelector(`[aria-modal="true"], [role="dialog"][data-state="open"]`))return;e.preventDefault(),!E&&!e.repeat&&D()}else if(!E){if(t&&n===`k`)e.preventDefault(),v();else if(t&&n===`b`)e.preventDefault(),m();else if(e.key===`Escape`&&!t){let t=zM.getState(),n=gW.getState(),r=cM.getQueryData([`workspace`])?.sessions??[],i=mW(n.projectId,n.sessionId,r),a=t.windows.filter(e=>!e.minimized&&NM(e)===i).sort((e,t)=>t.z-e.z)[0];a&&(e.preventDefault(),t.hide(a.id))}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v,D,E,m]),(0,g.jsxs)(`div`,{className:`flex h-screen flex-col overflow-hidden bg-canvas text-ink`,"data-testid":`workspace-home`,children:[(0,g.jsx)(gJ,{version:e}),(0,g.jsxs)(`div`,{className:`relative flex min-h-0 flex-1`,children:[(0,g.jsx)(Zy,{collapsed:s,width:c,className:`hidden md:flex`,children:(0,g.jsx)(nJ,{})}),(0,g.jsx)(cJ,{side:`left`,label:`调整项目侧栏宽度`,value:c,min:220,max:360,defaultValue:268,onChange:d,collapsed:s,className:`hidden md:block`}),(0,g.jsx)(Tle,{}),(0,g.jsx)(cJ,{side:`right`,label:`调整资源侧栏宽度`,value:l,min:280,max:460,defaultValue:340,onChange:f,collapsed:u,className:`hidden xl:block`}),(0,g.jsx)(Zy,{collapsed:u,width:l,side:`right`,className:`hidden xl:flex`,children:(0,g.jsx)(GW,{onQuickOpen:D})}),(0,g.jsx)(v3,{})]}),(0,g.jsx)(Dle,{scope:w,treeWidth:u||window.innerWidth<1280?void 0:l,open:E,close:()=>S(null),restoreFocus:()=>{C.current?.focus({preventScroll:!0}),C.current=null}}),(0,g.jsx)(qc,{message:y,onDismiss:()=>b(null)}),O.mounted?(0,g.jsxs)(`div`,{className:`fixed inset-0 z-[150] md:hidden`,children:[(0,g.jsx)(`button`,{type:`button`,"aria-label":`关闭导航`,onClick:()=>_(!1),className:B(`absolute inset-0 bg-black/30 backdrop-blur-[2px] transition-opacity duration-200`,O.visible?`opacity-100`:`pointer-events-none opacity-0`)}),(0,g.jsx)(`div`,{className:B(`absolute inset-y-0 left-0 w-[280px] shadow-[var(--shadow-window)] transition-transform duration-200 ease-out`,O.visible?`translate-x-0`:`pointer-events-none -translate-x-full`),children:(0,g.jsx)(nJ,{mobile:!0})})]}):null]})}function jle(){let e=wh();(0,h.useEffect)(()=>{let t=!1,n,r,i=window.location.protocol===`https:`?`wss`:`ws`,a={queryKey:[`workspace`],exact:!0},o=async()=>{e.getQueryData(a.queryKey)===void 0&&await e.cancelQueries(a),t||await e.invalidateQueries(a)},s=()=>{let a=new WebSocket(`${i}://${window.location.host}/ws`);n=a;let c=!1;a.addEventListener(`open`,()=>{c=!0,a.send(JSON.stringify({type:`subscribe`,subscriptions:[{topic:`system`,resourceId:`system`}]}))}),a.addEventListener(`message`,n=>{if(!(t||typeof n.data!=`string`))try{let t=JSON.parse(n.data);$k.safeParse(t).success&&o(),eA.safeParse(t).success&&e.invalidateQueries({queryKey:[`jobs`]}),tA.safeParse(t).success&&e.invalidateQueries({queryKey:[`memory`]})}catch{}}),a.addEventListener(`close`,()=>{t||(c&&(e.invalidateQueries({queryKey:[`session`]}),e.invalidateQueries({queryKey:[`bootstrap`]})),r=window.setTimeout(s,1e3))}),a.addEventListener(`error`,()=>a.close())};return s(),()=>{t=!0,window.clearTimeout(r),n?.close()}},[e])}function Mle({version:e}){return jle(),(0,g.jsx)(Ale,{version:e})}function Nle({message:e,onRetry:t}){return(0,g.jsx)(`main`,{className:`flex min-h-screen items-center justify-center bg-canvas px-6 text-ink`,children:(0,g.jsxs)(`section`,{className:`w-full max-w-[420px] rounded-[18px] border border-line bg-surface p-7 shadow-card`,children:[(0,g.jsx)(`h1`,{className:`text-lg font-semibold`,children:`无法连接本机服务`}),(0,g.jsx)(`p`,{className:`mt-2 text-sm text-ink-2`,children:e}),t?(0,g.jsx)(`button`,{type:`button`,className:`mt-5 h-10 rounded-md bg-accent px-4 text-sm font-medium text-accent-ink`,onClick:t,children:`重试`}):null]})})}function Ple({children:e,redirectTo:t=`/login`}){let n=qW(),r=Nv();if(n.isPending)return null;if(!n.data){let e=t===`/login`?`/login?returnTo=${encodeURIComponent(r.pathname+r.search)}`:t;return(0,g.jsx)(my,{to:e,replace:!0})}return(0,g.jsx)(g.Fragment,{children:e})}function Fle(){let e=KW();if(e.isPending)return null;if(e.isError||!e.data)return(0,g.jsx)(Nle,{message:e.error instanceof Error?e.error.message:`本机服务未启动`,onRetry:()=>void e.refetch()});let t=e.data.auth,n=window.location.origin===t.passkeyOrigin,r=t.passkeyEnabled&&n&&t.passkeyRegistered?`/login`:`/pair`;return(0,g.jsx)(Ple,{redirectTo:r,children:(0,g.jsx)(Mle,{version:e.data.app?.version})})}function z9(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function B9(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function V9(){return Ile.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var Ile={stubThis:e=>e};function H9(e){let{id:t}=e;return{...e,id:B9(t),transports:e.transports,type:e.type}}function U9(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var W9=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function Lle({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new W9({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new W9({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new W9({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new W9({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new W9({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new W9({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new W9({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new W9({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!U9(t))return new W9({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new W9({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new W9({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new W9({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var G9=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},Rle=[`cross-platform`,`platform`];function K9(e){if(e&&!(Rle.indexOf(e)<0))return e}async function zle(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!V9())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:B9(t.challenge),user:{...t.user,id:B9(t.user.id)},excludeCredentials:t.excludeCredentials?.map(H9)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=G9.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw Lle({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){q9(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=z9(e))}catch(e){q9(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=z9(c.getAuthenticatorData())}catch(e){q9(`getAuthenticatorData()`,e)}return{id:o,rawId:z9(s),response:{attestationObject:z9(c.attestationObject),clientDataJSON:z9(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:K9(a.authenticatorAttachment)}}function q9(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function Ble(){if(!V9())return J9.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?J9.stubThis(new Promise(e=>e(!1))):J9.stubThis(e.isConditionalMediationAvailable())}var J9={stubThis:e=>e};function Vle({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new W9({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new W9({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!U9(t))return new W9({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new W9({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new W9({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function Hle(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!V9())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(H9));let a={...t,challenge:B9(t.challenge),allowCredentials:i},o={};if(n){if(!await Ble())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=G9.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw Vle({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=z9(u.userHandle)),{id:c,rawId:z9(l),response:{authenticatorData:z9(u.authenticatorData),clientDataJSON:z9(u.clientDataJSON),signature:z9(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:K9(s.authenticatorAttachment)}}function Ule(e){return e===null||!e.startsWith(`/`)||e.startsWith(`//`)||e===`/login`?`/`:e}function Y9(e){if(e instanceof dj){if(e.code===`CHALLENGE_EXPIRED`)return`登录挑战已过期,请重试`;if(e.code===`PASSKEY_AUTH_FAILED`)return`Passkey 登录失败;如果设备已被撤销,请重新配对`;if(e.code===`WEBAUTHN_NOT_CONFIGURED`||e.code===`ORIGIN_INVALID`)return`当前来源不能使用 Passkey,请改用 localhost / HTTPS 或使用配对码`}return e instanceof DOMException&&e.name===`NotAllowedError`?`已取消 Passkey 登录`:fj(e,`登录失败,请重试。`)}function Wle(){let[e]=zy(),t=Ule(e.get(`returnTo`)),n=KW(),r=qW(),i=wh(),[a,o]=(0,h.useState)(null),[s,c]=(0,h.useState)(!1),[l,u]=(0,h.useState)(null),d=V9(),f=n.data!==void 0&&window.location.origin===n.data.auth.passkeyOrigin,p=n.data?.initialized===!0&&n.data.auth.passkeyEnabled&&f&&d,m=(0,h.useCallback)(async()=>{try{let e=await Y(`/api/webauthn/authentication/options`,{method:`POST`});return o(e),e}catch(e){return u(Y9(e)),null}},[]);if((0,h.useEffect)(()=>{p&&m()},[p,m]),r.data)return(0,g.jsx)(my,{to:t,replace:!0});let _=async()=>{c(!0),u(null);try{let e=a??await m();if(e===null)return;let t=await Hle({optionsJSON:e.options});await Y(`/api/webauthn/authentication/verify`,{method:`POST`,body:{challengeId:e.challengeId,response:t}}),await i.invalidateQueries({queryKey:[`session`]}),await i.invalidateQueries({queryKey:[`bootstrap`]})}catch(e){u(Y9(e)),e instanceof dj&&e.code===`CHALLENGE_EXPIRED`&&(o(null),await m())}finally{c(!1)}};return(0,g.jsx)(`main`,{className:`flex min-h-screen items-center justify-center bg-canvas px-6 py-10 text-ink`,children:(0,g.jsxs)(`section`,{className:`w-full max-w-[420px] rounded-[18px] border border-line bg-surface p-7 shadow-card`,children:[(0,g.jsxs)(`div`,{className:`mb-6 flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`inline-flex size-7 items-center justify-center rounded-md bg-accent text-[13px] font-semibold text-accent-ink`,children:`L`}),(0,g.jsx)(`span`,{className:`text-[15px] font-semibold tracking-tight`,children:`Larness`}),(0,g.jsx)(`span`,{className:`ml-auto text-xs text-ink-3`,children:n.data?.app.version})]}),(0,g.jsx)(`h1`,{className:`text-lg font-semibold`,children:`使用 Passkey 登录`}),(0,g.jsx)(`p`,{className:`mt-1 text-sm text-ink-2`,children:`使用 Face ID、指纹或系统 PIN 解锁当前工作空间。`}),n.data?null:(0,g.jsx)(`p`,{className:`mt-6 text-sm text-ink-2`,children:n.isError?`无法连接本机服务`:`正在读取工作空间状态…`}),n.data&&!n.data.initialized?(0,g.jsxs)(`p`,{className:`mt-6 rounded-md bg-surface-2 p-3 text-sm text-ink-2`,children:[`工作空间尚未初始化。请先在本机运行 `,(0,g.jsx)(`code`,{children:`pnpm run tui`}),` 完成初始化。`]}):null,n.data?.initialized===!0&&!f?(0,g.jsxs)(`p`,{className:`mt-6 rounded-md bg-surface-2 p-3 text-sm text-ink-2`,children:[`当前来源 `,(0,g.jsx)(`code`,{children:window.location.origin}),` 不是 canonical origin`,` `,(0,g.jsx)(`code`,{children:n.data.auth.passkeyOrigin}),`。请改用 localhost 或 HTTPS 域名,或使用下方的“使用配对码”入口。`]}):null,n.data?.initialized===!0&&f&&!d?(0,g.jsx)(`p`,{className:`mt-6 rounded-md bg-surface-2 p-3 text-sm text-ink-2`,children:`当前浏览器不支持 WebAuthn / Passkey,请使用配对码入口。`}):null,n.data?.initialized===!0&&!n.data.auth.passkeyEnabled?(0,g.jsx)(`p`,{className:`mt-6 rounded-md bg-surface-2 p-3 text-sm text-ink-2`,children:`WebAuthn 配置无效(RP ID / Origin),Passkey 不可用;请使用配对码入口。`}):null,p?(0,g.jsx)(`button`,{type:`button`,className:`mt-6 flex h-10 w-full items-center justify-center rounded-md bg-accent px-4 text-sm font-medium text-accent-ink transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50`,disabled:s||a===null,onClick:()=>void _(),children:s?`正在验证…`:a===null?`正在准备…`:`使用 Passkey 登录`}):null,(0,g.jsx)(qc,{message:l,onDismiss:()=>u(null)}),(0,g.jsxs)(`div`,{className:`mt-5 flex items-center justify-between text-sm`,children:[(0,g.jsx)(Fy,{className:`text-accent hover:underline`,to:`/pair`,children:`使用配对码`}),p&&a===null?(0,g.jsx)(`button`,{type:`button`,className:`text-ink-2 hover:text-ink`,onClick:()=>void m(),children:`重试准备`}):null]})]})})}var X9=`larness.pairing.request`;function Z9(){try{window.sessionStorage.removeItem(X9)}catch{}}function Gle(){try{let e=window.sessionStorage.getItem(X9);if(e===null)return null;let t=JSON.parse(e);return typeof t.requestId==`string`&&typeof t.shortCode==`string`&&typeof t.pollToken==`string`&&typeof t.expiresAt==`number`&&t.expiresAt>Date.now()+1e3?t:(Z9(),null)}catch{return Z9(),null}}function Kle(e){try{window.sessionStorage.setItem(X9,JSON.stringify(e))}catch{}}function Q9(e){if(e instanceof dj){if(e.code===`NOT_INITIALIZED`)return`工作空间尚未初始化。请先在本机运行 pnpm run tui。`;if(e.code===`CODE_INVALID`){let t=e.details?.attemptsLeft;return t===void 0?`配对码不正确`:`配对码不正确,剩余 ${t} 次尝试`}return e.code===`PAIRING_DENIED`?`本机已拒绝本次配对申请`:e.code===`PAIRING_EXPIRED`?`配对申请或配对码已过期,请重新申请`:e.code===`RATE_LIMITED`?`尝试过于频繁,请稍后再试`:e.code===`ENROLLMENT_EXPIRED`?`Passkey 注册窗口已过期,请重新配对`:e.code===`ORIGIN_INVALID`||e.code===`WEBAUTHN_NOT_CONFIGURED`?`当前来源不能注册 Passkey,请改用 localhost / HTTPS,或在 TUI 中选择“允许本次”`:e.code===`PASSKEY_REGISTRATION_FAILED`?`Passkey 注册失败,请重试或重新配对`:e.message}return e instanceof DOMException&&e.name===`NotAllowedError`?`已取消 Passkey 注册`:e instanceof Error?e.message:`操作失败`}function qle(){let e=qW(),t=wh(),n=(0,h.useRef)(!1),[r,i]=(0,h.useState)(`creating`),[a,o]=(0,h.useState)(null),[s,c]=(0,h.useState)(null),[l,u]=(0,h.useState)(``),[d,f]=(0,h.useState)(null),[p,m]=(0,h.useState)(null),[_,v]=(0,h.useState)(null),[y,b]=(0,h.useState)(!1),x=V9();(0,h.useEffect)(()=>{e.data&&Z9()},[e.data]);let S=(0,h.useCallback)(async()=>{Z9(),i(`creating`),v(null),o(null),f(null),m(null),c(null),u(``);try{let e=await Y(`/api/pairing/requests`,{method:`POST`,body:{clientLabel:navigator.userAgent.slice(0,100)}});Kle(e),o(e),i(`waiting`)}catch(e){v(Q9(e)),i(`error`)}},[]);(0,h.useEffect)(()=>{if(n.current)return;n.current=!0;let e=Gle();e===null?S():(o(e),i(`waiting`))},[S]),(0,h.useEffect)(()=>{if(r!==`waiting`||a===null)return;let e=!1,n=setInterval(()=>{(async()=>{try{let n=await Y(`/api/pairing/requests/${a.requestId}`,{headers:{"x-pairing-token":a.pollToken}});if(e)return;n.status===`approved`?(c(n.decision),i(`code`)):n.status===`enrollment_pending`?(c(`trust`),i(`enrollment`)):n.status===`denied`?(Z9(),v(`本机已拒绝本次配对申请`),i(`error`)):n.status===`expired`?(Z9(),v(`配对申请已过期,请重新申请`),i(`error`)):n.status===`redeemed`&&(Z9(),await t.invalidateQueries({queryKey:[`session`]}),i(`error`),v(`该申请已完成配对,请返回工作台`))}catch(t){e||(t instanceof dj&&t.code===`NOT_FOUND`&&Z9(),v(Q9(t)),i(`error`))}})()},2e3);return()=>{e=!0,clearInterval(n)}},[r,a,t]);let C=(0,h.useCallback)(async()=>{try{let e=await Y(`/api/webauthn/registration/options`,{method:`POST`});return m(e),e}catch(e){return v(Q9(e)),null}},[]);if((0,h.useEffect)(()=>{r===`enrollment`&&x&&C()},[r,x,C]),e.data)return(0,g.jsx)(my,{to:`/`,replace:!0});let w=async e=>{if(e.preventDefault(),a!==null){b(!0),v(null);try{let e=await Y(`/api/pairing/redeem`,{method:`POST`,body:{requestId:a.requestId,code:l.trim()}});if(e.status===`session`){Z9(),await t.invalidateQueries({queryKey:[`session`]}),await t.invalidateQueries({queryKey:[`bootstrap`]}),i(`error`),v(`配对成功,正在进入工作台…`),await t.refetchQueries({queryKey:[`session`]});return}f(e),i(`enrollment`)}catch(e){v(Q9(e))}finally{b(!1)}}},T=async()=>{if(p!==null){b(!0),v(null);try{let e=await zle({optionsJSON:p.options});await Y(`/api/webauthn/registration/verify`,{method:`POST`,body:{challengeId:p.challengeId,response:e}}),Z9(),await t.invalidateQueries({queryKey:[`session`]}),await t.invalidateQueries({queryKey:[`bootstrap`]}),v(`Passkey 已创建,正在进入工作台…`),await t.refetchQueries({queryKey:[`session`]})}catch(e){v(Q9(e)),e instanceof dj&&(e.code===`CHALLENGE_EXPIRED`||e.code===`PASSKEY_REGISTRATION_FAILED`||e.code===`ENROLLMENT_EXPIRED`)&&(m(null),await C())}finally{b(!1)}}};return(0,g.jsx)(`main`,{className:`flex min-h-screen items-center justify-center bg-canvas px-6 py-10 text-ink`,children:(0,g.jsxs)(`section`,{className:`w-full max-w-[460px] rounded-[18px] border border-line bg-surface p-7 shadow-card`,"data-request-id":a?.requestId??``,"data-stage":r,children:[(0,g.jsxs)(`div`,{className:`mb-6 flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`inline-flex size-7 items-center justify-center rounded-md bg-accent text-[13px] font-semibold text-accent-ink`,children:`L`}),(0,g.jsx)(`span`,{className:`text-[15px] font-semibold tracking-tight`,children:`Larness`})]}),(0,g.jsx)(`h1`,{className:`text-lg font-semibold`,children:`配对这台浏览器`}),(0,g.jsx)(`p`,{className:`mt-1 text-sm text-ink-2`,children:`申请需要在本机 TUI 中批准;配对码只显示一次。`}),r===`creating`?(0,g.jsx)(`p`,{className:`mt-6 text-sm text-ink-2`,children:`正在创建配对申请…`}):null,r===`waiting`&&a?(0,g.jsxs)(`div`,{className:`mt-6`,children:[(0,g.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-ink-3`,children:`短编号`}),(0,g.jsx)(`p`,{className:`mt-1 font-mono text-3xl font-semibold tracking-[0.18em] text-ink`,children:a.shortCode}),(0,g.jsx)(`p`,{className:`mt-3 text-sm text-ink-2`,children:`等待本机 TUI 批准。批准后在此输入一次性配对码。`}),(0,g.jsx)(`button`,{type:`button`,className:`mt-4 text-sm text-accent hover:underline`,onClick:()=>void S(),children:`重新申请`})]}):null,r===`code`&&a?(0,g.jsxs)(`form`,{className:`mt-6`,onSubmit:e=>void w(e),children:[(0,g.jsxs)(`p`,{className:`text-sm text-ink-2`,children:[`已获批准(`,s===`trust`?`始终允许,需要创建 Passkey`:`允许本次`,`)。 请输入 TUI 显示的配对码。`]}),(0,g.jsx)(`label`,{className:`mt-4 block text-xs font-medium text-ink-2`,htmlFor:`pair-code`,children:`配对码`}),(0,g.jsx)(fm,{id:`pair-code`,className:`mt-1 h-11 px-3 font-mono text-lg tracking-[0.14em]`,value:l,onChange:e=>u(e.target.value.toUpperCase()),placeholder:`XXXXX-XXXXX`,autoComplete:`one-time-code`}),(0,g.jsx)(`button`,{type:`submit`,className:`mt-4 flex h-10 w-full items-center justify-center rounded-md bg-accent px-4 text-sm font-medium text-accent-ink transition hover:opacity-90 disabled:opacity-50`,disabled:y||l.trim().length===0,children:y?`正在兑换…`:`兑换配对码`}),(0,g.jsx)(`button`,{type:`button`,className:`mt-3 text-sm text-ink-2 hover:text-ink`,onClick:()=>void S(),children:`重新申请`})]}):null,r===`enrollment`?(0,g.jsxs)(`div`,{className:`mt-6`,children:[(0,g.jsx)(`p`,{className:`text-sm text-ink-2`,children:`配对码已兑换。必须在窗口过期前创建 Passkey,之后才能进入工作台。`}),d===null?(0,g.jsx)(`p`,{className:`mt-2 text-xs text-ink-3`,children:`已恢复同一配对申请的注册窗口。`}):null,x?null:(0,g.jsx)(`p`,{className:`mt-3 rounded-md bg-surface-2 p-3 text-sm text-ink-2`,children:`当前浏览器不支持 WebAuthn。请重新配对,并在 TUI 中选择“允许本次”。`}),x?(0,g.jsx)(`button`,{type:`button`,className:`mt-4 flex h-10 w-full items-center justify-center rounded-md bg-accent px-4 text-sm font-medium text-accent-ink transition hover:opacity-90 disabled:opacity-50`,disabled:y||p===null,onClick:()=>void T(),children:y?`正在创建…`:p===null?`正在准备…`:`创建 Passkey`}):null,(0,g.jsx)(`button`,{type:`button`,className:`mt-3 text-sm text-ink-2 hover:text-ink`,onClick:()=>void S(),children:`重新配对`})]}):null,r===`error`?(0,g.jsxs)(`div`,{className:`mt-6`,children:[(0,g.jsx)(`button`,{type:`button`,className:`mt-2 flex h-10 w-full items-center justify-center rounded-md bg-accent px-4 text-sm font-medium text-accent-ink transition hover:opacity-90`,onClick:()=>void S(),children:`重新申请`}),(0,g.jsx)(Fy,{className:`mt-3 inline-block text-sm text-ink-2 hover:text-ink`,to:`/login`,children:`返回登录`})]}):null,(0,g.jsx)(qc,{message:_,onDismiss:()=>v(null)}),a?(0,g.jsxs)(`p`,{className:`mt-5 text-xs text-ink-3`,children:[`申请有效期至 `,new Date(a.expiresAt).toLocaleTimeString(),`;配对码在其他设备上不显示。`]}):null]})})}function Jle(){return JW(),(0,g.jsxs)(_y,{children:[(0,g.jsx)(hy,{path:`/`,element:(0,g.jsx)(Fle,{})}),(0,g.jsx)(hy,{path:`/login`,element:(0,g.jsx)(Wle,{})}),(0,g.jsx)(hy,{path:`/pair`,element:(0,g.jsx)(qle,{})}),(0,g.jsx)(hy,{path:`*`,element:(0,g.jsx)(my,{to:`/`,replace:!0})})]})}function Yle(){return(0,g.jsx)(Jle,{})}var Xle=c({}),$9=document.getElementById(`root`);if(!$9)throw Error(`Root element not found`);(0,Gy.createRoot)($9).render((0,g.jsx)(h.StrictMode,{children:(0,g.jsx)(x,{children:(0,g.jsx)(Th,{client:cM,children:(0,g.jsx)(xh,{delayDuration:250,children:(0,g.jsx)(Py,{children:(0,g.jsx)(Yle,{})})})})})}));export{c as a,f as i,S as n,u as o,m as r,Xle as t};