@crouton-kit/crouter 0.3.81 → 0.3.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builtin-pi-packages/pi-mode-switch/README.md +3 -3
- package/dist/clients/attach/__tests__/attach-chrome-remote.test.js +12 -4
- package/dist/clients/attach/__tests__/attach-keybindings.test.js +7 -3
- package/dist/clients/attach/__tests__/chat-view-snapshot-ordering.test.js +104 -0
- package/dist/clients/attach/__tests__/crtr-output-render.test.js +16 -44
- package/dist/clients/attach/attach-cmd.d.ts +1 -2
- package/dist/clients/attach/attach-cmd.js +960 -961
- package/dist/clients/attach/attach-def.d.ts +2 -0
- package/dist/clients/attach/attach-def.js +93 -0
- package/dist/clients/attach/canvas-panels.d.ts +10 -3
- package/dist/clients/attach/canvas-panels.js +42 -16
- package/dist/clients/attach/chat-view.d.ts +20 -1
- package/dist/clients/attach/chat-view.js +85 -2
- package/dist/commands/__tests__/human.test.js +7 -22
- package/dist/commands/attention.js +31 -30
- package/dist/commands/human/prompts.js +51 -38
- package/dist/commands/human/queue.d.ts +1 -28
- package/dist/commands/human/queue.js +156 -520
- package/dist/commands/human/shared.d.ts +28 -68
- package/dist/commands/human/shared.js +37 -120
- package/dist/commands/human.js +13 -17
- package/dist/commands/node.js +4 -2
- package/dist/commands/surface.js +1 -1
- package/dist/commands/sys/__tests__/setup-core.test.js +1 -1
- package/dist/commands/sys/__tests__/setup-front-door.test.js +98 -0
- package/dist/commands/sys/setup-core.d.ts +22 -0
- package/dist/commands/sys/setup-core.js +62 -0
- package/dist/commands/sys/setup.js +8 -1
- package/dist/core/__tests__/human-deliver-e2e.test.js +95 -0
- package/dist/core/__tests__/human-deliver.test.js +332 -0
- package/dist/core/__tests__/human-node-not-supervised.test.js +5 -4
- package/dist/core/__tests__/pid-identity-match.test.js +83 -0
- package/dist/core/canvas/__tests__/attention.test.d.ts +1 -0
- package/dist/core/canvas/__tests__/attention.test.js +126 -0
- package/dist/core/canvas/__tests__/remote-canvas-source.test.js +4 -4
- package/dist/core/canvas/__tests__/render-remote.test.js +1 -1
- package/dist/core/canvas/attention.d.ts +16 -14
- package/dist/core/canvas/attention.js +34 -29
- package/dist/core/canvas/boot.d.ts +1 -0
- package/dist/core/canvas/boot.js +1 -1
- package/dist/core/canvas/browse/app.js +3 -3
- package/dist/core/canvas/pid.d.ts +43 -17
- package/dist/core/canvas/pid.js +104 -35
- package/dist/core/canvas/remote-canvas-source.d.ts +1 -1
- package/dist/core/canvas/remote-canvas-source.js +4 -2
- package/dist/core/canvas/render.d.ts +5 -5
- package/dist/core/canvas/render.js +14 -14
- package/dist/core/canvas/source.d.ts +2 -2
- package/dist/core/canvas/source.js +3 -3
- package/dist/core/keybindings/__tests__/resolve.test.js +1 -1
- package/dist/core/keybindings/catalog.d.ts +2 -2
- package/dist/core/keybindings/catalog.js +3 -2
- package/dist/core/preview-registry.js +22 -29
- package/dist/core/profiles/select.js +4 -4
- package/dist/core/runtime/front-door.js +19 -6
- package/dist/core/runtime/package-health.d.ts +13 -0
- package/dist/core/runtime/package-health.js +18 -0
- package/dist/core/runtime/pi-vendored.js +15 -1
- package/dist/core/runtime/placement.d.ts +1 -10
- package/dist/core/runtime/placement.js +43 -26
- package/dist/core/runtime/resume.js +72 -4
- package/dist/core/runtime/session-list-cache.d.ts +22 -2
- package/dist/core/runtime/session-list-cache.js +92 -24
- package/dist/core/runtime/spawn.js +9 -0
- package/dist/core/spawn.d.ts +0 -59
- package/dist/core/spawn.js +5 -163
- package/dist/daemon/crtrd.js +7 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/web-client/assets/index-DZdKS-FB.js +78 -0
- package/dist/web-client/index.html +1 -1
- package/dist/web-client/sw.js +1 -1
- package/package.json +2 -2
- package/dist/core/__tests__/full/dead-pane-regression.test.js +0 -154
- package/dist/core/__tests__/full/human-new-window-regression.test.js +0 -104
- package/dist/core/__tests__/full/review-render-pane-regression.test.js +0 -133
- package/dist/core/__tests__/human-stranded-deliver.test.js +0 -145
- package/dist/core/__tests__/human-surface-target.test.js +0 -98
- package/dist/web-client/assets/index--md2ylfi.js +0 -78
- /package/dist/{core/__tests__/full/dead-pane-regression.test.d.ts → clients/attach/__tests__/chat-view-snapshot-ordering.test.d.ts} +0 -0
- /package/dist/{core/__tests__/full/human-new-window-regression.test.d.ts → commands/sys/__tests__/setup-front-door.test.d.ts} +0 -0
- /package/dist/core/__tests__/{full/review-render-pane-regression.test.d.ts → human-deliver-e2e.test.d.ts} +0 -0
- /package/dist/core/__tests__/{human-stranded-deliver.test.d.ts → human-deliver.test.d.ts} +0 -0
- /package/dist/core/__tests__/{human-surface-target.test.d.ts → pid-identity-match.test.d.ts} +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(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 ee(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,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=ee(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},I={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},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=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.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 E(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)T.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 E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(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.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 o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.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=c(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=c(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})}}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=c(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=c(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})}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 s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var ee=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?N(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var P=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function ie(e){return{current:e}}function ae(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function L(e,t){re++,ne[re]=e.current,e.current=t}var oe=ie(null),se=ie(null),R=ie(null),ce=ie(null);function le(e,t){switch(L(R,t),L(se,e),L(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ae(oe),L(oe,e)}function ue(){ae(oe),ae(se),ae(R)}function de(e){e.memoizedState!==null&&L(ce,e);var t=oe.current,n=qd(t,e.type);t!==n&&(L(se,e),L(oe,n))}function fe(e){se.current===e&&(ae(oe),ae(se)),ce.current===e&&(ae(ce),tp._currentValue=te)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!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}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,je=t.unstable_IdlePriority,Me=t.log,Ne=t.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(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&261888;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 Ge(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=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(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 Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qe(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 Je(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ze(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-Le(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&&Qe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Qe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Le(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function $e(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Le(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function et(e,t){var n=t&-t;return n=n&42?1:tt(n),(n&(e.suspendedLanes|t))===0?n:0}function tt(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 nt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function rt(){var e=I.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function it(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var at=Math.random().toString(36).slice(2),ot=`__reactFiber$`+at,st=`__reactProps$`+at,ct=`__reactContainer$`+at,lt=`__reactEvents$`+at,ut=`__reactListeners$`+at,dt=`__reactHandles$`+at,ft=`__reactResources$`+at,pt=`__reactMarker$`+at;function mt(e){delete e[ot],delete e[st],delete e[lt],delete e[ut],delete e[dt]}function ht(e){var t=e[ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ct]||n[ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[ot])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function gt(e){if(e=e[ot]||e[ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function _t(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function vt(e){var t=e[ft];return t||=e[ft]={hoistableStyles:new Map,hoistableScripts:new Map},t}function yt(e){e[pt]=!0}var bt=new Set,xt={};function St(e,t){Ct(e,t),Ct(e+`Capture`,t)}function Ct(e,t){for(xt[e]=t,e=0;e<t.length;e++)bt.add(t[e])}var wt=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]*$`),Tt={},Et={};function Dt(e){return be.call(Et,e)?!0:be.call(Tt,e)?!1:wt.test(e)?Et[e]=!0:(Tt[e]=!0,!1)}function Ot(e,t,n){if(Dt(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 kt(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 At(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Mt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Nt(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 Pt(e){if(!e._valueTracker){var t=Mt(e)?`checked`:`value`;e._valueTracker=Nt(e,t,``+e[t])}}function Ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Mt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function It(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Lt=/[\n"\\]/g;function Rt(e){return e.replace(Lt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function zt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+jt(t)):e.value!==``+jt(t)&&(e.value=``+jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Vt(e,o,jt(n)):Vt(e,o,jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+jt(s):e.removeAttribute(`name`)}function Bt(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)){Pt(e);return}n=n==null?``:``+jt(n),t=t==null?n:``+jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Pt(e)}function Vt(e,t,n){t===`number`&&It(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ht(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ut(e,t,n){if(t!=null&&(t=``+jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+jt(n)}function Wt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(P(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Pt(e)}function Gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kt=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 qt(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||Kt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Jt(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]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&qt(e,o,t[o])}function Yt(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 Xt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Zt=/^[\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 Qt(e){return Zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function $t(){}var en=null;function tn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nn=null,rn=null;function an(e){var t=gt(e);if(t&&(e=t.stateNode)){var n=e[st]||null;a:switch(e=t.stateNode,t.type){case`input`:if(zt(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="`+Rt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[st]||null;if(!a)throw Error(i(90));zt(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&&Ft(r)}break a;case`textarea`:Ut(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ht(e,!!n.multiple,t,!1)}}}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return e(t)}finally{if(on=!1,(nn!==null||rn!==null)&&(wu(),nn&&(t=nn,e=rn,rn=nn=null,an(t),e)))for(t=0;t<e.length;t++)an(e[t])}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[st]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var ln=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,"passive",{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.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 mn=i.slice(e,1<r?1-r:void 0)}function gn(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 _n(){return!0}function vn(){return!1}function yn(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)?_n:vn,this.isPropagationStopped=vn,this}return m(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=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=m({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=m({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,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!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(m({},Dn,{dataTransfer:0})),An=yn(m({},Sn,{relatedTarget:0})),jn=yn(m({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(m({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(m({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={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`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(m({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(m({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(m({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(m({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(m({},Dn,{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})),Wn=yn(m({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=ln&&`CompositionEvent`in window,qn=null;ln&&`documentMode`in document&&(qn=document.documentMode);var Jn=ln&&`TextEvent`in window&&!qn,Yn=ln&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var er=!1;function tr(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function nr(e,t){if(er)return e===`compositionend`||!Kn&&Qn(e,t)?(e=hn(),mn=pn=fn=null,er=!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 Yn&&t.locale!==`ko`?null:t.data;default:return null}}var rr={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 ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!rr[e.type]:t===`textarea`}function ar(e,t,n,r){nn?rn?rn.push(r):rn=[r]:nn=r,t=jd(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var or=null,sr=null;function cr(e){wd(e,0)}function lr(e){if(Ft(_t(e)))return e}function ur(e,t){if(e===`change`)return t}var dr=!1;if(ln){var fr;if(ln){var pr=`oninput`in document;if(!pr){var z=document.createElement(`div`);z.setAttribute(`oninput`,`return;`),pr=typeof z.oninput==`function`}fr=pr}else fr=!1;dr=fr&&(!document.documentMode||9<document.documentMode)}function mr(){or&&(or.detachEvent(`onpropertychange`,hr),sr=or=null)}function hr(e){if(e.propertyName===`value`&&lr(sr)){var t=[];ar(t,sr,e,tn(e)),sn(cr,t)}}function gr(e,t,n){e===`focusin`?(mr(),or=t,sr=n,or.attachEvent(`onpropertychange`,hr)):e===`focusout`&&mr()}function _r(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return lr(sr)}function vr(e,t){if(e===`click`)return lr(t)}function yr(e,t){if(e===`input`||e===`change`)return lr(t)}function br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var xr=typeof Object.is==`function`?Object.is:br;function Sr(e,t){if(xr(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(!be.call(t,i)||!xr(e[i],t[i]))return!1}return!0}function B(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cr(e,t){var n=B(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=B(n)}}function wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=It(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=It(e.document)}return t}function Er(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 Dr=ln&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==It(r)||(r=Or,`selectionStart`in r&&Er(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}),Ar&&Sr(Ar,r)||(Ar=r,r=jd(kr,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Or)))}function Nr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Pr={animationend:Nr(`Animation`,`AnimationEnd`),animationiteration:Nr(`Animation`,`AnimationIteration`),animationstart:Nr(`Animation`,`AnimationStart`),transitionrun:Nr(`Transition`,`TransitionRun`),transitionstart:Nr(`Transition`,`TransitionStart`),transitioncancel:Nr(`Transition`,`TransitionCancel`),transitionend:Nr(`Transition`,`TransitionEnd`)},Fr={},Ir={};ln&&(Ir=document.createElement(`div`).style,`AnimationEvent`in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),`TransitionEvent`in window||delete Pr.transitionend.transition);function Lr(e){if(Fr[e])return Fr[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ir)return Fr[e]=t[n];return e}var Rr=Lr(`animationend`),zr=Lr(`animationiteration`),Br=Lr(`animationstart`),Vr=Lr(`transitionrun`),Hr=Lr(`transitionstart`),Ur=Lr(`transitioncancel`),Wr=Lr(`transitionend`),Gr=new Map,Kr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Kr.push(`scrollEnd`);function qr(e,t){Gr.set(e,t),St(t,[e])}var Jr=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)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[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&&ni(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ri(e)}function ti(e,t){return $r(e,null,null,t),ri(e)}function ni(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-Le(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(e){if(50<hu)throw hu=0,gu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function ai(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 oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(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&65011712,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 li(e,t){e.flags&=65011714;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 ui(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=oi(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return di(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=oi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=oi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=oi(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:ye(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:ye(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-Le(r)-1;r&=~(1<<i),n+=1;var a=32-Le(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-Le(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,Mi=null,V=!1,Ni=null,Pi=!1,Fi=Error(i(519));function Ii(e){throw Hi(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ot]=e,t[st]=r,n){case`dialog`:q(`cancel`,t),q(`close`,t);break;case`iframe`:case`object`:case`embed`:q(`load`,t);break;case`video`:case`audio`:for(n=0;n<Sd.length;n++)q(Sd[n],t);break;case`source`:q(`error`,t);break;case`img`:case`image`:case`link`:q(`error`,t),q(`load`,t);break;case`details`:q(`toggle`,t);break;case`input`:q(`invalid`,t),Bt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:q(`invalid`,t);break;case`textarea`:q(`invalid`,t),Wt(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||Id(t.textContent,n)?(r.popover!=null&&(q(`beforetoggle`,t),q(`toggle`,t)),r.onScroll!=null&&q(`scroll`,t),r.onScrollEnd!=null&&q(`scrollend`,t),r.onClick!=null&&(t.onclick=$t),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:ji=ji.return}}function zi(e){if(e!==ji)return!1;if(!V)return Ri(e),V=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Jd(e.type,e.memoizedProps)),n=!n),n&&Mi&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=pf(e)}else t===27?(t=Mi,ef(e.type)?(e=ff,ff=null,Mi=e):Mi=t):Mi=ji?df(e.stateNode.nextSibling):null;return!0}function Bi(){Mi=ji=null,V=!1}function Vi(){var e=Ni;return e!==null&&(tu===null?tu=e:tu.push.apply(tu,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=ie(null),Wi=null,Gi=null;function Ki(e,t,n){L(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,ae(Ui)}function Ji(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 Yi(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),Ji(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),Ji(s,n,e),s=null}else 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 Xi(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;xr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[tp]:e.push(tp))}a=a.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!xr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $i(e){return ta(Wi,e)}function ea(e,t){return Wi===null&&Qi(e),ta(e,t)}function ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(i(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var na=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ra=t.unstable_scheduleCallback,ia=t.unstable_NormalPriority,aa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function oa(){return{controller:new na,data:new Map,refCount:0}}function sa(e){e.refCount--,e.refCount===0&&ra(ia,function(){e.controller.abort()})}var ca=null,la=0,ua=0,da=null;function fa(e,t){if(ca===null){var n=ca=[];la=0,ua=gd(),da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return la++,t.then(pa,pa),t}function pa(){if(--la===0&&ca!==null){da!==null&&(da.status=`fulfilled`);var e=ca;ca=null,ua=0,da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ma(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 ha=F.S;F.S=function(e,t){iu=Te(),typeof t==`object`&&t&&typeof t.then==`function`&&fa(e,t),ha!==null&&ha(e,t)};var ga=ie(null);function _a(){var e=ga.current;return e===null?Hl.pooledCache:e}function va(e,t){t===null?L(ga,ga.current):L(ga,t.pool)}function ya(){var e=_a();return e===null?null:{parent:aa._currentValue,pool:e}}var ba=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then($t,$t),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then($t,$t);else{if(e=Hl,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,ka(e),e}throw Da=t,ba}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,ba):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===ba||e===Sa)throw Error(i(483))}var Aa=null,ja=0;function Ma(e){var t=ja;return ja+=1,Aa===null&&(Aa=[]),Ta(Aa,e,t)}function Na(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Pa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Fa(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=ci(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|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),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===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ea(i)===t.type)?(t=a(t,n.props),Na(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),Na(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=mi(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=di(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 _:return n=ui(t.type,t.key,t.props,null,e.mode,n),Na(n,t),n.return=e,n;case v:return t=mi(t,e.mode,n),t.return=e,t;case O:return t=Ea(t),f(e,t,n)}if(P(t)||M(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ma(t),n);if(t.$$typeof===C)return f(e,ea(e,t),n);Pa(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 _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ea(n),p(e,t,n,r)}if(P(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ma(n),r);if(n.$$typeof===C)return p(e,t,ea(e,n),r);Pa(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 _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ea(r),m(e,t,n,r,i)}if(P(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ma(r),i);if(r.$$typeof===C)return m(e,t,n,ea(t,r),i);Pa(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),V&&Ei(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 V&&Ei(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(g.key===null?h:g.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)}),V&&Ei(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),V&&Ei(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 V&&Ei(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(v.key===null?g:v.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)}),V&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),Na(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),Na(c,o),c.return=e,e=c)}return s(e);case v: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}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ea(o),b(e,r,o,c)}if(P(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ma(o),c);if(o.$$typeof===C)return b(e,r,ea(e,o),c);Pa(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{ja=0;var i=b(e,t,n,r);return Aa=null,i}catch(t){if(t===ba||t===Sa)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ia=Fa(!0),La=Fa(!1),Ra=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ba(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Ua(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,$e(e,n)}}function Wa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ga=!1;function Ka(){if(Ga){var e=da;if(e!==null)throw e}}function qa(e,t,n,r){Ga=!1;var i=e.updateQueue;Ra=!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?(G&f)===f:(r&f)===f){f!==0&&f===ua&&(Ga=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ra=!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),Yl|=o,e.lanes=o,e.memoizedState=d}}function Ja(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ya(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ja(n[e],t)}var Xa=ie(null),Za=ie(0);function Qa(e,t){e=ql,L(Za,e),L(Xa,t),ql=e|t.baseLanes}function $a(){L(Za,ql),L(Xa,Xa.current)}function eo(){ql=Za.current,ae(Xa),ae(Za)}var to=ie(null),no=null;function ro(e){var t=e.alternate;L(co,co.current&1),L(to,e),no===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(no=e)}function io(e){L(co,co.current),L(to,e),no===null&&(no=e)}function ao(e){e.tag===22?(L(co,co.current),L(to,e),no===null&&(no=e)):oo(e)}function oo(){L(co,co.current),L(to,to.current)}function so(e){ae(to),no===e&&(no=null),ae(co)}var co=ie(0);function lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cf(n)||lf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){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 uo=0,H=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xr(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return uo=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Bs:Vs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){F.H=zs;var t=fo!==null&&fo.next!==null;if(uo=0,po=fo=H=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||ic||(e=e.dependencies,e!==null&&Zi(e)&&(ic=!0))}function To(e,t,n,r){H=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Hs,o=t(n,r)}while(ho);return o}function Eo(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(H.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}uo=0,po=fo=H=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?H.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?H.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw H.alternate===null?Error(i(467)):Error(i(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?H.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=Ta(yo,e,t),t=H,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Bs:Vs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===C)return $i(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Mo(),H.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(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?(uo&f)===f:(G&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===ua&&(d=!0);else if((uo&p)===p){u=u.next,p===ua&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,H.lanes|=p,Yl|=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,H.lanes|=f,Yl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!xr(o,e.memoizedState)&&(ic=!0,d&&(n=da,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 zo(e){var t=jo(),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);xr(o,t.memoizedState)||(ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=H,a=jo(),o=V;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!xr((fo||a).memoizedState,n);if(s&&(a.memoizedState=n,ic=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||uo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=Mo(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xr(e,n)}catch{return!0}}function Go(e){var t=ti(e,2);t!==null&&yu(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){Ie(!0);try{n()}finally{Ie(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(Is(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(V){var n=Hl.formState;if(n!==null){a:{var r=H;if(V){if(Mi){b:{for(var i=Mi,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=df(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=df(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,H,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,H,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),fo,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ba?Sa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=fo;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=Mo(),H.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();H.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(H.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=Mo(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(U&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(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 _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||uo&1073741824&&!(G&261930)?e.memoizedState=t:(e.memoizedState=n,e=vu(),H.lanes|=e,Yl|=e,n)}function Ss(e,t,n,r){return xr(n,t)?n:Xa.current===null?!(uo&42)||uo&1073741824&&!(G&261930)?(ic=!0,e.memoizedState=n):(e=vu(),H.lanes|=e,Yl|=e,t):(e=xs(e,n,r),xr(e,t)||(ic=!0),e)}function Cs(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Fs(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,ma(c,r),_u(e)):Ps(e,t,r,_u(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},_u())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,te,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},_u())}function Os(){return $i(tp)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=_u();e=Va(n);var r=Ha(t,e,n);r!==null&&(yu(r,t,n),Ua(r,t,n)),t={cache:oa()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=_u();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=ei(e,t,n,r),n!==null&&(yu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,_u())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(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,xr(s,o))return $r(e,t,i,0),Hl===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return yu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:gd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&yu(t,e,2)}function Is(e){var t=e.alternate;return e===H||t!==null&&t===H}function Ls(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}var zs={readContext:$i,use:Po,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};zs.useEffectEvent=xo;var Bs={readContext:$i,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){Ie(!0);try{n(t)}finally{Ie(!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=Ms.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,H,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,a=Ao();if(V){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));G&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Hl.identifierPrefix;if(V){var n=Ti,r=wi;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,H)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(U&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:$i,use:Po,useCallback:ys,useContext:$i,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;var Hs={readContext:$i,use:Po,useCallback:ys,useContext:$i,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?xs(n,e,t):Ss(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Hs.useEffectEvent=ps;function Us(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Va(r);i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(yu(t,e,r),Ua(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Va(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ha(e,i,r),t!==null&&(yu(t,e,r),Ua(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_u(),r=Va(n);r.tag=2,t!=null&&(r.callback=t),t=Ha(e,r,n),t!==null&&(yu(t,e,n),Ua(t,e,n))}};function Gs(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?!Sr(n,r)||!Sr(i,a):!0}function Ks(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&&Ws.enqueueReplaceState(t,t.state,null)}function qs(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=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Js(e){Jr(e)}function Ys(e){console.error(e)}function Xs(e){Jr(e)}function Zs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Qs(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 $s(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Zs(e,t)},n}function ec(e){return e=Va(e),e.tag=3,e}function tc(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(){Qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Qs(t,n,r),typeof i!=`function`&&(su===null?su=new Set([this]):su.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function nc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Xi(t,n,a,!0),n=to.current,n!==null){switch(n.tag){case 31:case 13:return no===null?ju():n.alternate===null&&Jl===0&&(Jl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Xu(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?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)),Xu(e,r,a)),!1}throw Error(i(435,n.tag))}return Xu(e,r,a),ju(),!1}if(V)return t=to.current,t===null?(r!==Fi&&(t=Error(i(423),{cause:r}),Hi(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=$s(e.stateNode,r,a),Wa(e,a),Jl!==4&&(Jl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Fi&&(e=Error(i(422),{cause:r}),Hi(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),eu===null?eu=[o]:eu.push(o),Jl!==4&&(Jl=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=$s(n.stateNode,r,e),Wa(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`&&(su===null||!su.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ec(a),tc(a,e,n,r),Wa(n,a),!1}n=n.return}while(n!==null);return!1}var rc=Error(i(461)),ic=!1;function ac(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function oc(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 Qi(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(V&&s&&Oi(t),t.flags|=1,ac(e,t,r,i),t.child)}function sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,cc(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!jc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Sr:n,n(o,r)&&e.ref===t.ref)return Ac(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Sr(a,r)&&e.ref===t.ref)if(ic=!1,t.pendingProps=r=a,jc(e,i))e.flags&131072&&(ic=!0);else return t.lanes=e.lanes,Ac(e,t,i)}return gc(e,t,n,r,i)}function lc(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 dc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&va(t,a===null?null:a.cachePool),a===null?$a():Qa(t,a),ao(t);else return r=t.lanes=536870912,dc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&va(t,null),$a(),oo(t)):(va(t,a.cachePool),Qa(t,a),oo(t),t.memoizedState=null);return ac(e,t,i,n),t.child}function uc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dc(e,t,n,r,i){var a=_a();return a=a===null?null:{parent:aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&va(t,null),$a(),ao(t),e!==null&&Xi(e,t,r,!0),t.childLanes=i,null}function fc(e,t){return t=Tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pc(e,t,n){return Ia(t,e.child,null,n),e=fc(t,t.pendingProps),e.flags|=2,so(t),t.memoizedState=null,e}function mc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=fc(t,r),t.lanes=536870912,uc(null,e);if(io(t),(e=Mi)?(e=sf(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return fc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(io(t),a)if(t.flags&256)t.flags&=-257,t=pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ic||Xi(e,t,n,!1),a=(n&e.childLanes)!==0,ic||a){if(r=Hl,r!==null&&(s=et(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ti(e,s),yu(r,e,s),rc;ju(),t=pc(e,t,n)}else e=o.treeContext,Mi=df(s.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=fc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function gc(e,t,n,r,i){return Qi(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(V&&r&&Oi(t),t.flags|=1,ac(e,t,n,i),t.child)}function _c(e,t,n,r,i,a){return Qi(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!ic?(Oo(e,t,a),Ac(e,t,a)):(V&&r&&Oi(t),t.flags|=1,ac(e,t,n,a),t.child)}function vc(e,t,n,r,i){if(Qi(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=$i(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},za(t),o=n.contextType,a.context=typeof o==`object`&&o?$i(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(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&&Ws.enqueueReplaceState(a,a.state,null),qa(t,r,a,i),Ka(),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=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=$i(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)&&Ks(t,a,r,o),Ra=!1;var f=t.memoizedState;a.state=f,qa(t,r,a,i),Ka(),l=t.memoizedState,s||f!==l||Ra?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=Ra||Gs(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,Ba(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=$i(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)&&Ks(t,a,r,c),Ra=!1,f=t.memoizedState,a.state=f,qa(t,r,a,i),Ka();var p=t.memoizedState;o!==d||f!==p||Ra||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=Ra||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Zi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,hc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ia(t,e.child,null,i),t.child=Ia(t,null,n,i)):ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ac(e,t,i),e}function yc(e,t,n,r){return Bi(),t.flags|=256,ac(e,t,n,r),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:ya()}}function Sc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Ql),e}function Cc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(co.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(V){if(a?ro(t):oo(t),(e=Mi)?(e=sf(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(oo(t),a=t.mode,c=Tc({mode:`hidden`,children:c},a),r=di(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(null,r)):(ro(t),wc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ro(t),t.flags&=-257,t=Ec(e,t,n)):t.memoizedState===null?(oo(t),c=r.fallback,a=t.mode,r=Tc({mode:`visible`,children:r.children},a),c=di(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ia(t,e.child,null,n),r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,t=uc(null,r)):(oo(t),t.child=e.child,t.flags|=128,t=null);else if(ro(t),lf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Hi({value:r,source:null,stack:null}),t=Ec(e,t,n)}else if(ic||Xi(e,t,n,!1),s=(n&e.childLanes)!==0,ic||s){if(s=Hl,s!==null&&(r=et(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ti(e,r),yu(s,e,r),rc;cf(c)||ju(),t=Ec(e,t,n)}else cf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=df(c.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=wc(t,r.children),t.flags|=4096);return t}return a?(oo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,a,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,uc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=xc(n):(a=c.cachePool,a===null?a=ya():(l=aa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(e.child,r)):(ro(t),n=e.child,e=n.sibling,n=ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function wc(e,t){return t=Tc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Tc(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function Ec(e,t,n){return Ia(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ji(e.return,t,n)}function Oc(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 kc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=co.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,L(co,o),ac(e,t,r,n),r=V?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(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`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&lo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oc(t,!0,n,null,a,r);break;case`together`:Oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Xi(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=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Zi(e))):!0}function Mc(e,t,n){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),Ki(t,aa,e.memoizedState.cache),Bi();break;case 27:case 5:de(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,io(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ro(t),e=Ac(e,t,n),e===null?null:e.sibling):Cc(e,t,n):(ro(t),t.flags|=128,null);ro(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Xi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return kc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(co,co.current),r)break;return null;case 22:return t.lanes=0,lc(e,t,n,t.pendingProps);case 24:Ki(t,aa,e.memoizedState.cache)}return Ac(e,t,n)}function Nc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ic=!0;else{if(!jc(e,n)&&!(t.flags&128))return ic=!1,Mc(e,t,n);ic=!!(e.flags&131072)}else ic=!1,V&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=qs(e,r),t.tag=1,t=vc(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===w){t.tag=11,t=oc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=sc(null,t,e,r,n);break a}}throw t=N(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=qs(r,t.pendingProps),vc(e,t,r,a,n);case 3:a:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ba(e,t),qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ki(t,aa,r),r!==o.cache&&Yi(t,[aa],n,!0),Ka(),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=yc(e,t,r,n);break a}else if(r!==a){a=gi(Error(i(424)),t),Hi(a),t=yc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Mi=df(e.firstChild),ji=t,V=!0,Ni=null,Pi=!0,n=La(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),r===a){t=Ac(e,t,n);break a}ac(e,t,r,n)}t=t.child}return t;case 26:return hc(e,t),e===null?(n=Mf(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(n=t.type,e=t.pendingProps,r=Gd(R.current).createElement(n),r[ot]=t,r[st]=e,zd(r,n,e),yt(r),t.stateNode=r):t.memoizedState=Mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return de(t),e===null&&V&&(r=t.stateNode=hf(t.type,t.pendingProps,R.current),ji=t,Pi=!0,a=Mi,ef(t.type)?(ff=a,Mi=df(r.firstChild)):Mi=a),ac(e,t,t.pendingProps.children,n),hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((a=r=Mi)&&(r=af(r,t.type,t.pendingProps,Pi),r===null?a=!1:(t.stateNode=r,ji=t,Mi=df(r.firstChild),Pi=!1,a=!0)),a||Ii(t)),de(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Jd(a,o)?r=null:s!==null&&Jd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),tp._currentValue=a),hc(e,t),ac(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=Mi)&&(n=of(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||Ii(t)),null;case 13:return Cc(e,t,n);case 4:return le(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ia(t,null,r,n):ac(e,t,r,n),t.child;case 11:return oc(e,t,t.type,t.pendingProps,n);case 7:return ac(e,t,t.pendingProps,n),t.child;case 8:return ac(e,t,t.pendingProps.children,n),t.child;case 12:return ac(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ki(t,t.type,r.value),ac(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Qi(t),a=$i(a),r=r(a),t.flags|=1,ac(e,t,r,n),t.child;case 14:return sc(e,t,t.type,t.pendingProps,n);case 15:return cc(e,t,t.type,t.pendingProps,n);case 19:return kc(e,t,n);case 31:return mc(e,t,n);case 22:return lc(e,t,n,t.pendingProps);case 24:return Qi(t),r=$i(aa),e===null?(a=_a(),a===null&&(a=Hl,o=oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},za(t),Ki(t,aa,a)):((e.lanes&n)!==0&&(Ba(e,t),qa(t,null,null,n),Ka()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ki(t,aa,r),r!==a.cache&&Yi(t,[aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ki(t,aa,r))),ac(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Pc(e){e.flags|=4}function Fc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Ou())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function Ic(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t))if(Ou())e.flags|=8192;else throw Da=Ca,xa}function Lc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Je(),e.lanes|=t,$l|=t)}function Rc(e,t){if(!V)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var 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}}function zc(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&65011712,r|=i.flags&65011712,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 Bc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zc(t),null;case 1:return zc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),qi(aa),ue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?Pc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),zc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Pc(t),o===null?(zc(t),Fc(t,a,null,r,n)):(zc(t),Ic(t,o))):o?o===e.memoizedState?(zc(t),t.flags&=-16777217):(Pc(t),zc(t),Ic(t,o)):(e=e.memoizedProps,e!==r&&Pc(t),zc(t),Fc(t,a,e,r,n)),null;case 27:if(fe(t),n=R.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return zc(t),null}e=oe.current,zi(t)?Li(t,e):(e=hf(a,r,n),t.stateNode=e,Pc(t))}return zc(t),null;case 5:if(fe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return zc(t),null}if(o=oe.current,zi(t))Li(t,o);else{var s=Gd(R.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[ot]=t,o[st]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(zd(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&&Pc(t)}}return zc(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=R.current,zi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Id(e.nodeValue,n)),e||Ii(t,!0)}else e=Gd(e).createTextNode(r),e[ot]=t,t.stateNode=e}return zc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(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[ot]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zc(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(so(t),t):(so(t),null);if(t.flags&128)throw Error(i(558))}return zc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=zi(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[ot]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zc(t),a=!1}else a=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(so(t),t):(so(t),null)}return so(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),Lc(t,t.updateQueue),zc(t),null);case 4:return ue(),e===null&&Dd(t.stateNode.containerInfo),zc(t),null;case 10:return qi(t.type),zc(t),null;case 19:if(ae(co),r=t.memoizedState,r===null)return zc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Rc(r,!1);else{if(Jl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=lo(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return L(co,co.current&1|2),V&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>au&&(t.flags|=128,a=!0,Rc(r,!1),t.lanes=4194304)}else{if(!a)if(e=lo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!V)return zc(t),null}else 2*Te()-r.renderingStartTime>au&&n!==536870912&&(t.flags|=128,a=!0,Rc(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)}return r.tail===null?(zc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=co.current,L(co,a?n&1|2:n&1),V&&Ei(t,r.treeForkCount),e);case 22:case 23:return so(t),eo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(zc(t),t.subtreeFlags&6&&(t.flags|=8192)):zc(t),n=t.updateQueue,n!==null&&Lc(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&&ae(ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(aa),zc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Vc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(aa),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(so(t),t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(so(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(co),null;case 4:return ue(),null;case 10:return qi(t.type),null;case 22:case 23:return so(t),eo(),e!==null&&ae(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(aa),null;case 25:return null;default:return null}}function Hc(e,t){switch(ki(t),t.tag){case 3:qi(aa),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&so(t);break;case 13:so(t);break;case 19:ae(co);break;case 10:qi(t.type);break;case 22:case 23:so(t),eo(),e!==null&&ae(ga);break;case 24:qi(aa)}}function Uc(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){Yu(t,t.return,e)}}function Wc(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){Yu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Yu(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ya(t,n)}catch(t){Yu(e,e.return,t)}}}function Kc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Yu(e,t,n)}}function qc(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:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Yu(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Yu(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){Yu(e,t,n)}else n.current=null}function Yc(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){Yu(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Bd(r,e.type,n,t),r[st]=t}catch(t){Yu(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(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&&ef(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 $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$t));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zd(t,r,n),t[ot]=e,t[st]=n}catch(t){Yu(e,e.return,t)}}var nl=!1,rl=!1,il=!1,al=typeof WeakSet==`function`?WeakSet:Set,ol=null;function sl(e,t){if(e=e.containerInfo,Ud=up,e=Tr(e),Er(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Wd={focusedElem:e,selectionRange:n},up=!1,ol=t;ol!==null;)if(t=ol,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ol=e;else for(;ol!==null;){switch(t=ol,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Yu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)rf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:rf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ol=e;break}ol=t.return}}function cl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Cl(e,n),r&4&&Uc(5,n);break;case 1:if(Cl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Yu(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Yu(n,n.return,e)}}r&64&&Gc(n),r&512&&qc(n,n.return);break;case 3:if(Cl(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{Ya(e,t)}catch(e){Yu(n,n.return,e)}}break;case 27:t===null&&r&4&&tl(n);case 26:case 5:Cl(e,n),t===null&&r&4&&Yc(n),r&512&&qc(n,n.return);break;case 12:Cl(e,n);break;case 31:Cl(e,n),r&4&&ml(e,n);break;case 13:Cl(e,n),r&4&&hl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=$u.bind(null,n),uf(e,n))));break;case 22:if(r=n.memoizedState!==null||nl,!r){t=t!==null&&t.memoizedState!==null||rl,i=nl;var a=rl;nl=r,(rl=t)&&!a?Tl(e,n,(n.subtreeFlags&8772)!=0):Cl(e,n),nl=i,rl=a}break;case 30:break;default:Cl(e,n)}}function ll(e){var t=e.alternate;t!==null&&(e.alternate=null,ll(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mt(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 ul=null,dl=!1;function fl(e,t,n){for(n=n.child;n!==null;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(Fe&&typeof Fe.onCommitFiberUnmount==`function`)try{Fe.onCommitFiberUnmount(Pe,n)}catch{}switch(n.tag){case 26:rl||Jc(n,t),fl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:rl||Jc(n,t);var r=ul,i=dl;ef(n.type)&&(ul=n.stateNode,dl=!1),fl(e,t,n),gf(n.stateNode),ul=r,dl=i;break;case 5:rl||Jc(n,t);case 6:if(r=ul,i=dl,ul=null,fl(e,t,n),ul=r,dl=i,ul!==null)if(dl)try{(ul.nodeType===9?ul.body:ul.nodeName===`HTML`?ul.ownerDocument.body:ul).removeChild(n.stateNode)}catch(e){Yu(n,t,e)}else try{ul.removeChild(n.stateNode)}catch(e){Yu(n,t,e)}break;case 18:ul!==null&&(dl?(e=ul,tf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Fp(e)):tf(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,fl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:Wc(2,n,t),rl||Wc(4,n,t),fl(e,t,n);break;case 1:rl||(Jc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Kc(n,t,r)),fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:rl=(r=rl)||n.memoizedState!==null,fl(e,t,n),rl=r;break;default:fl(e,t,n)}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fp(e)}catch(e){Yu(t,t.return,e)}}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fp(e)}catch(e){Yu(t,t.return,e)}}function gl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new al),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new al),t;default:throw Error(i(435,e.tag))}}function _l(e,t){var n=gl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ed.bind(null,e,t);t.then(r,r)}})}function vl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ef(c.type)){ul=c.stateNode,dl=!1;break a}break;case 5:ul=c.stateNode,dl=!1;break a;case 3:case 4:ul=c.stateNode.containerInfo,dl=!0;break a}c=c.return}if(ul===null)throw Error(i(160));pl(o,s,a),ul=null,dl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bl(t,e),t=t.sibling}var yl=null;function bl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vl(t,e),xl(e),r&4&&(Wc(3,e,e.return),Uc(3,e),Wc(5,e,e.return));break;case 1:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&64&&nl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=yl;if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[pt]||o[ot]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),zd(o,r,n),o[ot]=e,yt(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),zd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Wf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),zd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ot]=e,yt(o),r=o}e.stateNode=r}else Gf(a,e.type,e.stateNode);else e.stateNode=zf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(a,e.type,e.stateNode):zf(a,r,e.memoizedProps))}break;case 27:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),n!==null&&r&4&&Xc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),e.flags&32){a=e.stateNode;try{Gt(a,``)}catch(t){Yu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Xc(e,a,n===null?a:n.memoizedProps)),r&1024&&(il=!0);break;case 6:if(vl(t,e),xl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Yu(e,e.return,t)}}break;case 3:if(Uf=null,a=yl,yl=yf(t.containerInfo),vl(t,e),yl=a,xl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fp(t.containerInfo)}catch(t){Yu(e,e.return,t)}il&&(il=!1,Sl(e));break;case 4:r=yl,yl=yf(e.stateNode.containerInfo),vl(t,e),xl(e),yl=r;break;case 12:vl(t,e),xl(e);break;case 31:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 13:vl(t,e),xl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ru=Te()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=nl,d=rl;if(nl=u||a,rl=d||l,vl(t,e),rl=d,nl=u,xl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||nl||rl||wl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Yu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Yu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?nf(m,!0):nf(l.stateNode,!1)}catch(e){Yu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,_l(e,n))));break;case 19:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 30:break;case 21:break;default:vl(t,e),xl(e)}}function xl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Zc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;el(e,Qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Gt(o,``),n.flags&=-33),el(e,Qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;$c(e,Qc(e),s);break;default:throw Error(i(161))}}catch(t){Yu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Cl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)cl(e,t.alternate,t),t=t.sibling}function wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wc(4,t,t.return),wl(t);break;case 1:Jc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Kc(t,t.return,n),wl(t);break;case 27:gf(t.stateNode);case 26:case 5:Jc(t,t.return),wl(t);break;case 22:t.memoizedState===null&&wl(t);break;case 30:wl(t);break;default:wl(t)}e=e.sibling}}function Tl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Tl(i,a,n),Uc(4,a);break;case 1:if(Tl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Yu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ja(c[i],s)}catch(e){Yu(r,r.return,e)}}n&&o&64&&Gc(a),qc(a,a.return);break;case 27:tl(a);case 26:case 5:Tl(i,a,n),n&&r===null&&o&4&&Yc(a),qc(a,a.return);break;case 12:Tl(i,a,n);break;case 31:Tl(i,a,n),n&&o&4&&ml(i,a);break;case 13:Tl(i,a,n),n&&o&4&&hl(i,a);break;case 22:a.memoizedState===null&&Tl(i,a,n),qc(a,a.return);break;case 30:break;default:Tl(i,a,n)}t=t.sibling}}function El(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&&sa(n))}function Dl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e))}function Ol(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kl(e,t,n,r),t=t.sibling}function kl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ol(e,t,n,r),i&2048&&Uc(9,t);break;case 1:Ol(e,t,n,r);break;case 3:Ol(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sa(e)));break;case 12:if(i&2048){Ol(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Yu(t,t.return,e)}}else Ol(e,t,n,r);break;case 31:Ol(e,t,n,r);break;case 13:Ol(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ol(e,t,n,r):(a._visibility|=2,Al(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Ol(e,t,n,r):jl(e,t),i&2048&&El(o,t);break;case 24:Ol(e,t,n,r),i&2048&&Dl(t.alternate,t);break;default:Ol(e,t,n,r)}}function Al(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!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:Al(a,o,s,c,i),Uc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Al(a,o,s,c,i)):u._visibility&2?Al(a,o,s,c,i):jl(a,o),i&&l&2048&&El(o.alternate,o);break;case 24:Al(a,o,s,c,i),i&&l&2048&&Dl(o.alternate,o);break;default:Al(a,o,s,c,i)}t=t.sibling}}function jl(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:jl(n,r),i&2048&&El(r.alternate,r);break;case 24:jl(n,r),i&2048&&Dl(r.alternate,r);break;default:jl(n,r)}t=t.sibling}}var Ml=8192;function Nl(e,t,n){if(e.subtreeFlags&Ml)for(e=e.child;e!==null;)Pl(e,t,n),e=e.sibling}function Pl(e,t,n){switch(e.tag){case 26:Nl(e,t,n),e.flags&Ml&&e.memoizedState!==null&&Jf(n,yl,e.memoizedState,e.memoizedProps);break;case 5:Nl(e,t,n);break;case 3:case 4:var r=yl;yl=yf(e.stateNode.containerInfo),Nl(e,t,n),yl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ml,Ml=16777216,Nl(e,t,n),Ml=r):Nl(e,t,n));break;default:Nl(e,t,n)}}function Fl(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 Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ll(e),e=e.sibling}function Ll(e){switch(e.tag){case 0:case 11:case 15:Il(e),e.flags&2048&&Wc(9,e,e.return);break;case 3:Il(e);break;case 12:Il(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Rl(e)):Il(e);break;default:Il(e)}}function Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wc(8,t,t.return),Rl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Rl(t));break;default:Rl(t)}e=e.sibling}}function zl(e,t){for(;ol!==null;){var n=ol;switch(n.tag){case 0:case 11:case 15:Wc(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:sa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ol=r;else a:for(n=e;ol!==null;){r=ol;var i=r.sibling,a=r.return;if(ll(r),r===n){ol=null;break a}if(i!==null){i.return=a,ol=i;break a}ol=a}}}var Bl={getCacheForType:function(e){var t=$i(aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return $i(aa).controller.signal}},Vl=typeof WeakMap==`function`?WeakMap:Map,U=0,Hl=null,W=null,G=0,K=0,Ul=null,Wl=!1,Gl=!1,Kl=!1,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=null,tu=null,nu=!1,ru=0,iu=0,au=1/0,ou=null,su=null,cu=0,lu=null,uu=null,du=0,fu=0,pu=null,mu=null,hu=0,gu=null;function _u(){return U&2&&G!==0?G&-G:F.T===null?rt():gd()}function vu(){if(Ql===0)if(!(G&536870912)||V){var e=He;He<<=1,!(He&3932160)&&(He=262144),Ql=e}else Ql=536870912;return e=to.current,e!==null&&(e.flags|=32),Ql}function yu(e,t,n){(e===Hl&&(K===2||K===9)||e.cancelPendingCommit!==null)&&(Eu(e,0),Cu(e,G,Ql,!1)),Xe(e,n),(!(U&2)||e!==Hl)&&(e===Hl&&(!(U&2)&&(Xl|=n),Jl===4&&Cu(e,G,Ql,!1)),cd(e))}function bu(e,t,n){if(U&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ke(e,t),a=r?Pu(e,t):Mu(e,t,!0),o=r;do{if(a===0){Gl&&!r&&Cu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Su(n)){a=Mu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=eu;var l=c.current.memoizedState.isDehydrated;if(l&&(Eu(c,s).flags|=256),s=Mu(c,s,!1),s!==2){if(Kl&&!l){c.errorRecoveryDisabledLanes|=o,Xl|=o,a=4;break a}o=tu,tu=a,o!==null&&(tu===null?tu=o:tu.push.apply(tu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Eu(e,0),Cu(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)break;case 6:Cu(r,t,Ql,!Wl);break a;case 2:tu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ru+300-Te(),10<a)){if(Cu(r,t,Ql,!Wl),Ge(r,0,!0)!==0)break a;du=t,r.timeoutHandle=Xd(xu.bind(null,r,n,tu,ou,nu,t,Ql,Xl,$l,Wl,o,`Throttled`,-0,0),a);break a}xu(r,n,tu,ou,nu,t,Ql,Xl,$l,Wl,o,null,-0,0)}}break}while(1);cd(e)}function xu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$t},Pl(t,a,d);var m=(a&62914560)===a?ru-Te():(a&4194048)===a?iu-Te():0;if(m=Xf(d,m),m!==null){du=a,e.cancelPendingCommit=m(Vu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Cu(e,a,o,!l);return}}Vu(e,t,a,n,r,i,o,s,c)}function Su(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(!xr(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 Cu(e,t,n,r){t&=~Zl,t&=~Xl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Le(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Qe(e,n,t)}function wu(){return U&6?!0:(ld(0,!1),!1)}function Tu(){if(W!==null){if(K===0)var e=W.return;else e=W,Gi=Wi=null,ko(e),Aa=null,ja=0,e=W;for(;e!==null;)Hc(e.alternate,e),e=e.return;W=null}}function Eu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Zd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),du=0,Tu(),Hl=e,W=n=ci(e.current,null),G=t,K=0,Ul=null,Wl=!1,Gl=Ke(e,t),Kl=!1,$l=Ql=Zl=Xl=Yl=Jl=0,tu=eu=null,nu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Le(r),a=1<<i;t|=e[i],r&=~a}return ql=t,Qr(),n}function Du(e,t){H=null,F.H=zs,t===ba||t===Sa?(t=Oa(),K=3):t===xa?(t=Oa(),K=4):K=t===rc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ul=t,W===null&&(Jl=1,Zs(e,gi(t,e.current)))}function Ou(){var e=to.current;return e===null?!0:(G&4194048)===G?no===null:(G&62914560)===G||G&536870912?e===no:!1}function ku(){var e=F.H;return F.H=zs,e===null?zs:e}function Au(){var e=F.A;return F.A=Bl,e}function ju(){Jl=4,Wl||(G&4194048)!==G&&to.current!==null||(Gl=!0),!(Yl&134217727)&&!(Xl&134217727)||Hl===null||Cu(Hl,G,Ql,!1)}function Mu(e,t,n){var r=U;U|=2;var i=ku(),a=Au();(Hl!==e||G!==t)&&(ou=null,Eu(e,t)),t=!1;var o=Jl;a:do try{if(K!==0&&W!==null){var s=W,c=Ul;switch(K){case 8:Tu(),o=6;break a;case 3:case 2:case 9:case 6:to.current===null&&(t=!0);var l=K;if(K=0,Ul=null,Ru(e,s,c,l),n&&Gl){o=0;break a}break;default:l=K,K=0,Ul=null,Ru(e,s,c,l)}}Nu(),o=Jl;break}catch(t){Du(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,U=r,F.H=i,F.A=a,W===null&&(Hl=null,G=0,Qr()),o}function Nu(){for(;W!==null;)Iu(W)}function Pu(e,t){var n=U;U|=2;var r=ku(),a=Au();Hl!==e||G!==t?(ou=null,au=Te()+500,Eu(e,t)):Gl=Ke(e,t);a:do try{if(K!==0&&W!==null){t=W;var o=Ul;b:switch(K){case 1:K=0,Ul=null,Ru(e,t,o,1);break;case 2:case 9:if(wa(o)){K=0,Ul=null,Lu(t);break}t=function(){K!==2&&K!==9||Hl!==e||(K=7),cd(e)},o.then(t,t);break a;case 3:K=7;break a;case 4:K=5;break a;case 7:wa(o)?(K=0,Ul=null,Lu(t)):(K=0,Ul=null,Ru(e,t,o,7));break;case 5:var s=null;switch(W.tag){case 26:s=W.memoizedState;case 5:case 27:var c=W;if(s?qf(s):c.stateNode.complete){K=0,Ul=null;var l=c.sibling;if(l!==null)W=l;else{var u=c.return;u===null?W=null:(W=u,zu(u))}break b}}K=0,Ul=null,Ru(e,t,o,5);break;case 6:K=0,Ul=null,Ru(e,t,o,6);break;case 8:Tu(),Jl=6;break a;default:throw Error(i(462))}}Fu();break}catch(t){Du(e,t)}while(1);return Gi=Wi=null,F.H=r,F.A=a,U=n,W===null?(Hl=null,G=0,Qr(),Jl):0}function Fu(){for(;W!==null&&!Ce();)Iu(W)}function Iu(e){var t=Nc(e.alternate,e,ql);e.memoizedProps=e.pendingProps,t===null?zu(e):W=t}function Lu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=_c(n,t,t.pendingProps,t.type,void 0,G);break;case 11:t=_c(n,t,t.pendingProps,t.type.render,t.ref,G);break;case 5:ko(t);default:Hc(n,t),t=W=li(t,ql),t=Nc(n,t,ql)}e.memoizedProps=e.pendingProps,t===null?zu(e):W=t}function Ru(e,t,n,r){Gi=Wi=null,ko(t),Aa=null,ja=0;var i=t.return;try{if(nc(e,i,t,n,G)){Jl=1,Zs(e,gi(n,e.current)),W=null;return}}catch(t){if(i!==null)throw W=i,t;Jl=1,Zs(e,gi(n,e.current)),W=null;return}t.flags&32768?(V||r===1?e=!0:Gl||G&536870912?e=!1:(Wl=e=!0,(r===2||r===9||r===3||r===6)&&(r=to.current,r!==null&&r.tag===13&&(r.flags|=16384))),Bu(t,e)):zu(t)}function zu(e){var t=e;do{if(t.flags&32768){Bu(t,Wl);return}e=t.return;var n=Bc(t.alternate,t,ql);if(n!==null){W=n;return}if(t=t.sibling,t!==null){W=t;return}W=t=e}while(t!==null);Jl===0&&(Jl=5)}function Bu(e,t){do{var n=Vc(e.alternate,e);if(n!==null){n.flags&=32767,W=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){W=e;return}W=e=n}while(e!==null);Jl=6,W=null}function Vu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Ku();while(cu!==0);if(U&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Zr,Ze(e,n,o,s,c,l),e===Hl&&(W=Hl=null,G=0),uu=t,lu=e,du=n,fu=o,pu=a,mu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,td(ke,function(){return qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=U,U|=4;try{sl(e,t,n)}finally{U=s,I.p=a,F.T=r}}cu=1,Hu(),Uu(),Wu()}}function Hu(){if(cu===1){cu=0;var e=lu,t=uu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=U;U|=4;try{bl(t,e);var a=Wd,o=Tr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&wr(s.ownerDocument.documentElement,s)){if(c!==null&&Er(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 _=Cr(s,h),v=Cr(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}}up=!!Ud,Wd=Ud=null}finally{U=i,I.p=r,F.T=n}}e.current=t,cu=2}}function Uu(){if(cu===2){cu=0;var e=lu,t=uu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=U;U|=4;try{cl(e,t.alternate,t)}finally{U=i,I.p=r,F.T=n}}cu=3}}function Wu(){if(cu===4||cu===3){cu=0,we();var e=lu,t=uu,n=du,r=mu;t.subtreeFlags&10256||t.flags&10256?cu=5:(cu=0,uu=lu=null,Gu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(su=null),nt(n),t=t.stateNode,Fe&&typeof Fe.onCommitFiberRoot==`function`)try{Fe.onCommitFiberRoot(Pe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{F.T=t,I.p=i}}du&3&&Ku(),cd(e),i=e.pendingLanes,n&261930&&i&42?e===gu?hu++:(hu=0,gu=e):hu=0,ld(0,!1)}}function Gu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sa(t)))}function Ku(){return Hu(),Uu(),Wu(),qu()}function qu(){if(cu!==5)return!1;var e=lu,t=fu;fu=0;var n=nt(du),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=pu,pu=null;var o=lu,s=du;if(cu=0,uu=lu=null,du=0,U&6)throw Error(i(331));var c=U;if(U|=4,Ll(o.current),kl(o,o.current,s,n),U=c,ld(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{I.p=a,F.T=r,Gu(e,t)}}function Ju(e,t,n){t=gi(n,t),t=$s(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Xe(e,2),cd(e))}function Yu(e,t,n){if(e.tag===3)Ju(e,e,n);else for(;t!==null;){if(t.tag===3){Ju(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(su===null||!su.has(r))){e=gi(n,e),n=ec(2),r=Ha(t,n,2),r!==null&&(tc(n,r,t,e),Xe(r,2),cd(r));break}}t=t.return}}function Xu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vl;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)||(Kl=!0,i.add(n),e=Zu.bind(null,e,t,n),t.then(e,e))}function Zu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Hl===e&&(G&n)===n&&(Jl===4||Jl===3&&(G&62914560)===G&&300>Te()-ru?!(U&2)&&Eu(e,0):Zl|=n,$l===G&&($l=0)),cd(e)}function Qu(e,t){t===0&&(t=Je()),e=ti(e,t),e!==null&&(Xe(e,t),cd(e))}function $u(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qu(e,n)}function ed(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),Qu(e,n)}function td(e,t){return xe(e,t)}var nd=null,rd=null,id=!1,ad=!1,od=!1,sd=0;function cd(e){e!==rd&&e.next===null&&(rd===null?nd=rd=e:rd=rd.next=e),ad=!0,id||(id=!0,hd())}function ld(e,t){if(!od&&ad){od=!0;do for(var n=!1,r=nd;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-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,md(r,a))}else a=G,a=Ge(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(r,a)||(n=!0,md(r,a));r=r.next}while(n);od=!1}}function ud(){dd()}function dd(){ad=id=!1;var e=0;sd!==0&&Yd()&&(e=sd);for(var t=Te(),n=null,r=nd;r!==null;){var i=r.next,a=fd(r,t);a===0?(r.next=null,n===null?nd=i:n.next=i,i===null&&(rd=n)):(n=r,(e!==0||a&3)&&(ad=!0)),r=i}cu!==0&&cu!==5||ld(e,!1),sd!==0&&(sd=0)}function fd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Le(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=G,n=Ge(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(K===2||K===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Se(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ke(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Se(r),nt(n)){case 2:case 8:n=Oe;break;case 32:n=ke;break;case 268435456:n=je;break;default:n=ke}return r=pd.bind(null,e),n=xe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Se(r),e.callbackPriority=2,e.callbackNode=null,2}function pd(e,t){if(cu!==0&&cu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ku()&&e.callbackNode!==n)return null;var r=G;return r=Ge(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(bu(e,r,t),fd(e,Te()),e.callbackNode!=null&&e.callbackNode===n?pd.bind(null,e):null)}function md(e,t){if(Ku())return null;bu(e,t,!0)}function hd(){$d(function(){U&6?xe(De,ud):dd()})}function gd(){if(sd===0){var e=ua;e===0&&(e=Ve,Ve<<=1,!(Ve&261888)&&(Ve=256)),sd=e}return sd}function _d(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Qt(``+e)}function vd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function yd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=_d((i[st]||null).action),o=r.submitter;o&&(t=(t=o[st]||null)?_d(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(sd!==0){var e=o?vd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?vd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var bd=0;bd<Kr.length;bd++){var xd=Kr[bd];qr(xd.toLowerCase(),`on`+(xd[0].toUpperCase()+xd.slice(1)))}qr(Rr,`onAnimationEnd`),qr(zr,`onAnimationIteration`),qr(Br,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Vr,`onTransitionRun`),qr(Hr,`onTransitionStart`),qr(Ur,`onTransitionCancel`),qr(Wr,`onTransitionEnd`),Ct(`onMouseEnter`,[`mouseout`,`mouseover`]),Ct(`onMouseLeave`,[`mouseout`,`mouseover`]),Ct(`onPointerEnter`,[`pointerout`,`pointerover`]),Ct(`onPointerLeave`,[`pointerout`,`pointerover`]),St(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),St(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),St(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),St(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Sd=`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(` `),Cd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Sd));function wd(e,t){t=(t&4)!=0;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){Jr(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){Jr(e)}i.currentTarget=null,a=c}}}}function q(e,t){var n=t[lt];n===void 0&&(n=t[lt]=new Set);var r=e+`__bubble`;n.has(r)||(Od(t,e,2,!1),n.add(r))}function Td(e,t,n){var r=0;t&&(r|=4),Od(n,e,r,t)}var Ed=`_reactListening`+Math.random().toString(36).slice(2);function Dd(e){if(!e[Ed]){e[Ed]=!0,bt.forEach(function(t){t!==`selectionchange`&&(Cd.has(t)||Td(t,!1,e),Td(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ed]||(t[Ed]=!0,Td(`selectionchange`,!1,t))}}function Od(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!un||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 kd(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=ht(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=tn(n),s=[];a:{var c=Gr.get(e);if(c!==void 0){var l=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:l=zn;break;case`focusin`:u=`focus`,l=An;break;case`focusout`:u=`blur`,l=An;break;case`beforeblur`:case`afterblur`:l=An;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=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Vn;break;case Rr:case zr:case Br:l=jn;break;case Wr:l=Hn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Un;break;case`copy`:case`cut`:case`paste`:l=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Bn;break;case`toggle`:case`beforetoggle`:l=Wn}var d=(t&4)!=0,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(Ad(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(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==en&&(u=n.relatedTarget||n.fromElement)&&(ht(u)||u[ct]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ht(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:_t(l),h=u==null?c:_t(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ht(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Md,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Nd(s,c,l,d,!1),u!==null&&f!==null&&Nd(s,f,u,d,!0)}}a:{if(c=r?_t(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ur;else if(ir(c))if(dr)v=yr;else{v=_r;var y=gr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Yt(r.elementType)&&(v=ur):v=vr;if(v&&=v(e,r)){ar(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Vt(c,`number`,c.value)}switch(y=r?_t(r):window,e){case`focusin`:(ir(y)||y.contentEditable===`true`)&&(Or=y,kr=r,Ar=null);break;case`focusout`:Ar=kr=Or=null;break;case`mousedown`:jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:jr=!1,Mr(s,n,i);break;case`selectionchange`:if(Dr)break;case`keydown`:case`keyup`:Mr(s,n,i)}var b;if(Kn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else er?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(er||x!==`onCompositionStart`?x===`onCompositionEnd`&&er&&(b=hn()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,er=!0)),y=jd(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?tr(e,n):nr(e,n))&&(x=jd(r,`onBeforeInput`),0<x.length&&(y=new Nn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),yd(s,e,r,n,i)}wd(s,t)})}function Ad(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jd(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(Ad(e,i,a)),i=cn(e,t),i!=null&&r.push(Ad(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Md(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Nd(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(Ad(n,l,c))):i||(l=cn(n,a),l!=null&&o.push(Ad(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Pd=/\r\n?/g,J=/\u0000|\uFFFD/g;function Fd(e){return(typeof e==`string`?e:``+e).replace(Pd,`
|
|
9
|
+
`).replace(J,``)}function Id(e,t){return t=Fd(t),Fd(e)===t}function Ld(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Gt(e,``+r);break;case`className`:kt(e,`class`,r);break;case`tabIndex`:kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:kt(e,n,r);break;case`style`:Jt(e,r,o);break;case`data`:if(t!==`object`){kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+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}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Ld(e,t,`name`,a.name,a,null),Ld(e,t,`formEncType`,a.formEncType,a,null),Ld(e,t,`formMethod`,a.formMethod,a,null),Ld(e,t,`formTarget`,a.formTarget,a,null)):(Ld(e,t,`encType`,a.encType,a,null),Ld(e,t,`method`,a.method,a,null),Ld(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`onScroll`:r!=null&&q(`scroll`,e);break;case`onScrollEnd`:r!=null&&q(`scrollend`,e);break;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));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=Qt(``+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`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`:q(`beforetoggle`,e),q(`toggle`,e),Ot(e,`popover`,r);break;case`xlinkActuate`:At(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:At(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:At(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:At(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ot(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Xt.get(n)||n,Ot(e,n,r))}}function Rd(e,t,n,r,a,o){switch(n){case`style`:Jt(e,r,o);break;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));e.innerHTML=n}}break;case`children`:typeof r==`string`?Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Gt(e,``+r);break;case`onScroll`:r!=null&&q(`scroll`,e);break;case`onScrollEnd`:r!=null&&q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!xt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[st]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ot(e,n,r)}}}function zd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:q(`error`,e),q(`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:Ld(e,t,o,s,n,null)}}a&&Ld(e,t,`srcSet`,n.srcSet,n,null),r&&Ld(e,t,`src`,n.src,n,null);return;case`input`:q(`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:Ld(e,t,r,d,n,null)}}Bt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in q(`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:Ld(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ht(e,!!r,n,!0):Ht(e,!!r,t,!1);return;case`textarea`:for(s in q(`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:Ld(e,t,s,c,n,null)}Wt(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:Ld(e,t,l,r,n,null)}return;case`dialog`:q(`beforetoggle`,e),q(`toggle`,e),q(`cancel`,e),q(`close`,e);break;case`iframe`:case`object`:q(`load`,e);break;case`video`:case`audio`:for(r=0;r<Sd.length;r++)q(Sd[r],e);break;case`image`:q(`error`,e),q(`load`,e);break;case`details`:q(`toggle`,e);break;case`embed`:case`source`:case`link`:q(`error`,e),q(`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:Ld(e,t,u,r,n,null)}return;default:if(Yt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Rd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ld(e,t,c,r,n,null))}function Bd(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)||Ld(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`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Ld(e,t,p,m,r,f)}}zt(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)||Ld(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`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Ld(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ht(e,!!n,n?[]:``,!1):Ht(e,!!n,t,!0)):Ht(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:Ld(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`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Ld(e,t,s,a,r,o)}Ut(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:Ld(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`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Ld(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)&&Ld(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:Ld(e,t,u,p,r,m)}return;default:if(Yt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Rd(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||Rd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ld(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||Ld(e,t,f,p,r,m)}function Vd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Hd(){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&&Vd(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&&Vd(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 Ud=null,Wd=null;function Gd(e){return e.nodeType===9?e:e.ownerDocument}function Kd(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 qd(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 Jd(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 Y=null;function Yd(){var e=window.event;return e&&e.type===`popstate`?e===Y?!1:(Y=e,!0):(Y=null,!1)}var Xd=typeof setTimeout==`function`?setTimeout:void 0,Zd=typeof clearTimeout==`function`?clearTimeout:void 0,Qd=typeof Promise==`function`?Promise:void 0,$d=typeof queueMicrotask==`function`?queueMicrotask:Qd===void 0?Xd:function(e){return Qd.resolve(null).then(e).catch(X)};function X(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(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),Fp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[pt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body);n=i}while(n);Fp(t)}function nf(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 rf(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`:rf(n),mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(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[pt])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=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(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 df(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 ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(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 hf(e,t,n){switch(t=Gd(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 gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mt(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=I.d;I.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=wu();return e||t}function Sf(e){var t=gt(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Rt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),zd(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Rt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Rt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Rt(n.imageSizes)+`"]`)):i+=`[href="`+Rt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),zd(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Rt(r)+`"][href="`+Rt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=m({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),zd(r,`link`,e),yt(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=vt(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);yt(c),zd(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,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=vt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=m({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),yt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=vt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),yt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=R.current)?yf(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`?(t=Nf(n.href),n=vt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,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=Nf(n.href);var o=vt(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(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(a,e,n,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`?(t=Lf(n),n=vt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Nf(e){return`href="`+Rt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),zd(t,`link`,n),yt(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Rt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Rt(n.href)+`"]`);if(r)return t.instance=r,yt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),yt(r),zd(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,yt(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),yt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),zd(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,yt(a),a):(r=n,(a=_f.get(o))&&(r=m({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),yt(a),zd(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,Bf(r,n.precedence,e));return t.instance}function Bf(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 Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,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[pt]||a[ot]||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 Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(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 qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(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=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,yt(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),yt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),zd(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=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Hd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.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=Zf.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 tp={$$typeof:C,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function np(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=Ye(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ye(0),this.hiddenUpdates=Ye(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},za(a),e}function ip(e){return e?(e=ii,e):ii}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Va(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ha(e,r,t),n!==null&&(yu(n,e,t),Ua(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&yu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=_u();t=tt(t);var n=ti(e,t);n!==null&&yu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,pp(e,t,n,r)}finally{I.p=a,F.T=i}}function fp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,pp(e,t,n,r)}finally{I.p=a,F.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)kd(e,t,r,hp,n),Z(e,r);else if(Dp(i,e,t,n,r))r.stopPropagation();else if(Z(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=gt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=We(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Le(o);s.entanglements[1]|=c,o&=~c}cd(a),!(U&6)&&(au=Te()+500,ld(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&yu(s,a,2),wu(),sp(a,2)}if(a=mp(r),a===null&&kd(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else kd(e,t,r,null,n)}}function mp(e){return e=tn(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=ht(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 hp=e,null}function _p(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`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ee()){case De:return 2;case Oe:return 8;case ke:case Ae:return 32;case je:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`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 Z(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Ep(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=gt(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Dp(e,t,n,r,i){switch(t){case`focusin`:return yp=Ep(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Ep(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Ep(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Ep(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Ep(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function Op(e){var t=ht(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,it(e.priority,function(){lp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,it(e.priority,function(){lp(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 kp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);en=r,n.target.dispatchEvent(r),en=null}else return t=gt(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ap(e,t,n){kp(e)&&n.delete(t)}function jp(){vp=!1,yp!==null&&kp(yp)&&(yp=null),bp!==null&&kp(bp)&&(bp=null),xp!==null&&kp(xp)&&(xp=null),Sp.forEach(Ap),Cp.forEach(Ap)}function Mp(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,jp)))}var Np=null;function Pp(e){Np!==e&&(Np=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Np===e&&(Np=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(gp(r||n)===null)continue;break}var a=gt(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Fp(e){function t(t){return Mp(t,e)}yp!==null&&Mp(yp,e),bp!==null&&Mp(bp,e),xp!==null&&Mp(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[st]||null;if(typeof a==`function`)o||Pp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[st]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Pp(n)}}}function Ip(){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 Lp(e){this._internalRoot=e}Rp.prototype.render=Lp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ap(n,_u(),e,t,null,null)},Rp.prototype.unmount=Lp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),wu(),t[ct]=null}};function Rp(e){this._internalRoot=e}Rp.prototype.unstable_scheduleHydration=function(e){if(e){var t=rt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&Op(e)}};var zp=n.version;if(zp!==`19.2.7`)throw Error(i(527,zp,`19.2.7`));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Bp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Vp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vp.isDisabled&&Vp.supportsFiber)try{Pe=Vp.inject(Bp),Fe=Vp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Js,s=Ys,c=Xs;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=rp(e,1,!1,null,null,n,r,null,o,s,c,Ip),e[ct]=t.current,Dd(e),new Lp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=l(h(),1),b=_(),x=`modulepreload`,S=function(e){return`/`+e},C={},w=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=S(t,n),t=s(t),t in C)return;C[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:x,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},T=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,E=/^[\\/]{2}/;function D(e,t){return t+e.replace(/\\/g,`/`)}var O=`popstate`;function k(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function A(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return P(``,{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:F(t)}return te(t,n,null,e)}function j(e,t){if(e===!1||e==null)throw Error(t)}function M(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ee(){return Math.random().toString(36).substring(2,10)}function N(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 P(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?I(t):t,state:n,key:t&&t.key||r||ee(),mask:i}}function F({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 I(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 te(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=k(e)?e:P(h.location,e,t);n&&n(r,e),l=u()+1;let d=N(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=k(e)?e:P(h.location,e,t);n&&n(r,e),l=u();let i=N(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 ne(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(O,d),c=e,()=>{i.removeEventListener(O,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 ne(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),j(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:F(t);return i=i.replace(/ $/,`%20`),!n&&E.test(i)&&(i=r+i),new URL(i,r)}function re(e,t,n=`/`){return ie(e,t,n,!1)}function ie(e,t,n,r,i){let a=Se((typeof t==`string`?I(t):t).pathname||`/`,n);if(a==null)return null;let o=i??L(e),s=null,c=xe(a);for(let e=0;s==null&&e<o.length;++e)s=_e(o[e],c,r);return s}function ae(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function L(e){let t=oe(e);return R(t),t}function oe(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;j(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=Ae([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(j(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),oe(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:he(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=be(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 se(e.path))a(e,t,!0,n)}),t}function se(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=se(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 R(e){e.sort((e,t)=>e.score===t.score?ge(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ce=/^:[\w-]+$/,le=3,ue=2,de=1,fe=10,pe=-2,me=e=>e===`*`;function he(e,t){let n=e.split(`/`),r=n.length;return n.some(me)&&(r+=pe),t&&(r+=ue),n.filter(e=>!me(e)).reduce((e,t)=>e+(ce.test(t)?le:t===``?de:fe),r)}function ge(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 _e(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?ye(u,l,s.matcher,s.compiledParams):ve(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=ve({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Ae([a,d.pathname]),pathnameBase:Me(Ae([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Ae([a,d.pathnameBase]))}return o}function ve(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=be(e.path,e.caseSensitive,e.end);return ye(e,t,n,r)}function ye(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function be(e,t=!1,n=!0){M(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(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function xe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return M(!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 Se(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 Ce(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?I(e):e,a;return n?(n=ke(n),a=n.startsWith(`/`)?we(n.substring(1),`/`):we(n,t)):a=t,{pathname:a,search:Ne(r),hash:Pe(i)}}function we(e,t){let n=je(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Te(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 Ee(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function De(e){let t=Ee(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Oe(e,t,n,r=!1){let i;typeof e==`string`?i=I(e):(i={...e},j(!i.pathname||!i.pathname.includes(`?`),Te(`?`,`pathname`,`search`,i)),j(!i.pathname||!i.pathname.includes(`#`),Te(`#`,`pathname`,`hash`,i)),j(!i.search||!i.search.includes(`#`),Te(`#`,`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=Ce(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var ke=e=>e.replace(/[\\/]{2,}/g,`/`),Ae=e=>ke(e.join(`/`)),je=e=>e.replace(/\/+$/,``),Me=e=>je(e).replace(/^\/*/,`/`),Ne=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Pe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Fe=class{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 Ie(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Le(e){return Ae(e.map(e=>e.route.path).filter(Boolean))||`/`}var Re=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ze(e,t){let n=e;if(typeof n!=`string`||!T.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Re)try{let e=new URL(window.location.href),r=E.test(n)?new URL(D(n,e.protocol)):new URL(n),a=Se(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{M(!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}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Be=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Be);var Ve=[`GET`,...Be];new Set(Ve);var He=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ue(e){try{return He.includes(new URL(e).protocol)}catch{return!1}}var We=v.createContext(null);We.displayName=`DataRouter`;var Ge=v.createContext(null);Ge.displayName=`DataRouterState`;var Ke=v.createContext(!1);function qe(){return v.useContext(Ke)}var Je=v.createContext({isTransitioning:!1});Je.displayName=`ViewTransition`;var Ye=v.createContext(new Map);Ye.displayName=`Fetchers`;var Xe=v.createContext(null);Xe.displayName=`Await`;var Ze=v.createContext(null);Ze.displayName=`Navigation`;var Qe=v.createContext(null);Qe.displayName=`Location`;var $e=v.createContext({outlet:null,matches:[],isDataRoute:!1});$e.displayName=`Route`;var et=v.createContext(null);et.displayName=`RouteError`;var tt=`REACT_ROUTER_ERROR`,nt=`REDIRECT`,rt=`ROUTE_ERROR_RESPONSE`;function it(e){if(e.startsWith(`${tt}:${nt}:{`))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 at(e){if(e.startsWith(`${tt}:${rt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Fe(t.status,t.statusText,t.data)}catch{}}function ot(e,{relative:t}={}){j(st(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=v.useContext(Ze),{hash:i,pathname:a,search:o}=mt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Ae([n,a])),r.createHref({pathname:s,search:o,hash:i})}function st(){return v.useContext(Qe)!=null}function ct(){return j(st(),`useLocation() may be used only in the context of a <Router> component.`),v.useContext(Qe).location}var lt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ut(e){v.useContext(Ze).static||v.useLayoutEffect(e)}function dt(){let{isDataRoute:e}=v.useContext($e);return e?Nt():ft()}function ft(){j(st(),`useNavigate() may be used only in the context of a <Router> component.`);let e=v.useContext(We),{basename:t,navigator:n}=v.useContext(Ze),{matches:r}=v.useContext($e),{pathname:i}=ct(),a=JSON.stringify(De(r)),o=v.useRef(!1);return ut(()=>{o.current=!0}),v.useCallback((r,s={})=>{if(M(o.current,lt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Oe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Ae([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}v.createContext(null);function pt(){let{matches:e}=v.useContext($e);return e[e.length-1]?.params??{}}function mt(e,{relative:t}={}){let{matches:n}=v.useContext($e),{pathname:r}=ct(),i=JSON.stringify(De(n));return v.useMemo(()=>Oe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ht(e,t){return gt(e,t)}function gt(e,t,n){j(st(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=v.useContext(Ze),{matches:i}=v.useContext($e),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Ft(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
|
|
11
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=ct(),d;if(t){let e=typeof t==`string`?I(t):t;j(c===`/`||e.pathname?.startsWith(c),`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 "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):re(e,{pathname:p});M(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),M(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=Ct(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ae([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Ae([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?v.createElement(Qe.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function _t(){let e=Mt(),t=Ie(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=v.createElement(v.Fragment,null,v.createElement(`p`,null,`💿 Hey developer 👋`),v.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,v.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,v.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),v.createElement(v.Fragment,null,v.createElement(`h2`,null,`Unexpected Application Error!`),v.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?v.createElement(`pre`,{style:i},n):null,o)}var vt=v.createElement(_t,null),yt=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}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=at(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:v.createElement($e.Provider,{value:this.props.routeContext},v.createElement(et.Provider,{value:e,children:this.props.component}));return this.context?v.createElement(xt,{error:e},t):t}};yt.contextType=Ke;var bt=new WeakMap;function xt({children:e,error:t}){let{basename:n}=v.useContext(Ze);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=it(t.digest);if(e){let r=bt.get(t);if(r)throw r;let i=ze(e.location,n),a=i.absoluteURL||i.to;if(Ue(a))throw Error(`Invalid redirect location`);if(Re&&!bt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw bt.set(t,n),n}return v.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function St({routeContext:e,match:t,children:n}){let r=v.useContext(We);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement($e.Provider,{value:e},n)}function Ct(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);j(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:Le(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||vt,o&&(s<0&&c===0?(Ft(`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)),h=()=>{let t;return t=u?f:d?p:n.route.Component?v.createElement(n.route.Component,null):n.route.element?n.route.element:e,v.createElement(St,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?v.createElement(yt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function wt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tt(e){let t=v.useContext(We);return j(t,wt(e)),t}function Et(e){let t=v.useContext(Ge);return j(t,wt(e)),t}function Dt(e){let t=v.useContext($e);return j(t,wt(e)),t}function Ot(e){let t=Dt(e),n=t.matches[t.matches.length-1];return j(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function kt(){return Ot(`useRouteId`)}function At(){let e=Et(`useNavigation`);return v.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function jt(){let{matches:e,loaderData:t}=Et(`useMatches`);return v.useMemo(()=>e.map(e=>ae(e,t)),[e,t])}function Mt(){let e=v.useContext(et),t=Et(`useRouteError`),n=Ot(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Nt(){let{router:e}=Tt(`useNavigate`),t=Ot(`useNavigate`),n=v.useRef(!1);return ut(()=>{n.current=!0}),v.useCallback(async(r,i={})=>{M(n.current,lt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Pt={};function Ft(e,t,n){!t&&!Pt[e]&&(Pt[e]=!0,M(!1,n))}v.memo(It);function It({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return gt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Lt(e){j(!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 Rt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){j(!st(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=v.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=I(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=v.useMemo(()=>{let e=Se(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 M(h!=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.`),h==null?null:v.createElement(Ze.Provider,{value:c},v.createElement(Qe.Provider,{children:t,value:h}))}function zt({children:e,location:t}){return ht(Bt(e),t)}v.Component;function Bt(e,t=[]){let n=[];return v.Children.forEach(e,(e,r)=>{if(!v.isValidElement(e))return;let i=[...t,r];if(e.type===v.Fragment){n.push.apply(n,Bt(e.props.children,i));return}j(e.type===Lt,`[${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>`),j(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Bt(e.props.children,i)),n.push(a)}),n}var Vt=`get`,Ht=`application/x-www-form-urlencoded`;function Ut(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Wt(e){return Ut(e)&&e.tagName.toLowerCase()===`button`}function Gt(e){return Ut(e)&&e.tagName.toLowerCase()===`form`}function Kt(e){return Ut(e)&&e.tagName.toLowerCase()===`input`}function qt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Jt(e,t){return e.button===0&&(!t||t===`_self`)&&!qt(e)}function Yt(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 Xt(e,t){let n=Yt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Zt=null;function Qt(){if(Zt===null)try{new FormData(document.createElement(`form`),0),Zt=!1}catch{Zt=!0}return Zt}var $t=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function en(e){return e!=null&&!$t.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ht}"`),null):e}function tn(e,t){let n,r,i,a,o;if(Gt(e)){let o=e.getAttribute(`action`);r=o?Se(o,t):null,n=e.getAttribute(`method`)||Vt,i=en(e.getAttribute(`enctype`))||Ht,a=new FormData(e)}else if(Wt(e)||Kt(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?Se(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Vt,i=en(e.getAttribute(`formenctype`))||en(o.getAttribute(`enctype`))||Ht,a=new FormData(o,e),!Qt()){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(Ut(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Vt,r=null,i=Ht,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var nn={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},rn=/[&><\u2028\u2029]/g;function an(e){return e.replace(rn,e=>nn[e])}function on(e,t){if(e===!1||e==null)throw Error(t)}function sn(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Se(i.pathname,t)===`/`?i.pathname=`${je(t)}/_root.${r}`:i.pathname=`${je(i.pathname)}.${r}`,i}async function cn(e,t){if(e.id in t)return t[e.id];try{let n=await w(()=>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 ln(e){return e!=null&&typeof e.page==`string`}function un(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 dn(e,t,n){return gn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await cn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(un).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function fn(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 pn(e,t,{includeHydrateFallback:n}={}){return mn(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 mn(e){return[...new Set(e)]}function hn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function gn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!ln(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(hn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function _n(){let e=v.useContext(We);return on(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function vn(){let e=v.useContext(Ge);return on(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var yn=v.createContext(void 0);yn.displayName=`FrameworkContext`;function bn(){let e=v.useContext(yn);return on(e,`You must render this element inside a <HydratedRouter> element`),e}function xn(e,t){let n=v.useContext(yn),[r,i]=v.useState(!1),[a,o]=v.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=v.useRef(null);v.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]),v.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:Sn(s,p),onBlur:Sn(c,m),onMouseEnter:Sn(l,p),onMouseLeave:Sn(u,m),onTouchStart:Sn(d,p)}]:[a,f,{}]:[!1,f,{}]}function Sn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Cn({page:e,...t}){let n=qe(),{nonce:r}=bn(),{router:i}=_n(),a=v.useMemo(()=>re(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?v.createElement(Tn,{page:e,matches:a,...t}):v.createElement(En,{page:e,matches:a,...t})):null}function wn(e){let{manifest:t,routeModules:n}=bn(),[r,i]=v.useState([]);return v.useEffect(()=>{let r=!1;return dn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Tn({page:e,matches:t,...n}){let r=ct(),{future:i}=bn(),{basename:a}=_n(),o=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=sn(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return v.createElement(v.Fragment,null,o.map(e=>v.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function En({page:e,matches:t,...n}){let r=ct(),{future:i,manifest:a,routeModules:o}=bn(),{basename:s}=_n(),{loaderData:c,matches:l}=vn(),u=v.useMemo(()=>fn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=v.useMemo(()=>fn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=sn(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=v.useMemo(()=>pn(d,a),[d,a]),m=wn(d);return v.createElement(v.Fragment,null,f.map(e=>v.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>v.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>v.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Dn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}v.Component;var On=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{On&&(window.__reactRouterVersion=`7.18.1`)}catch{}function kn({basename:e,children:t,useTransitions:n,window:r}){let i=v.useRef();i.current??=A({window:r,v5Compat:!0});let a=i.current,[o,s]=v.useState({action:a.action,location:a.location}),c=v.useCallback(e=>{n===!1?s(e):v.startTransition(()=>s(e))},[n]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(Rt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function An({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=v.useState({action:n.action,location:n.location}),o=v.useCallback(e=>{r===!1?a(e):v.startTransition(()=>a(e))},[r]);return v.useLayoutEffect(()=>n.listen(o),[n,o]),v.createElement(Rt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}An.displayName=`unstable_HistoryRouter`;var jn=v.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:h,navigator:g,useTransitions:_}=v.useContext(Ze),y=typeof l==`string`&&T.test(l),b=ze(l,h);l=b.to;let x=ot(l,{relative:r}),S=ct(),C=null;if(o){let e=Oe(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Ae([h,e.pathname])),C=g.createHref(e)}let[w,E,D]=xn(n,p),O=Rn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function k(t){e&&e(t),t.defaultPrevented||O(t)}let A=!(b.isExternal||i),j=v.createElement(`a`,{...p,...D,href:(A?C:void 0)||b.absoluteURL||x,onClick:A?k:e,ref:Dn(m,E),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?v.createElement(v.Fragment,null,j,v.createElement(Cn,{page:x})):j});jn.displayName=`Link`;var Mn=v.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=mt(a,{relative:c.relative}),d=ct(),f=v.useContext(Ge),{navigator:p,basename:m}=v.useContext(Ze),h=f!=null&&Yn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=Se(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return v.createElement(jn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Mn.displayName=`NavLink`;var Nn=v.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Vt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=v.useContext(Ze),g=Hn(),_=Un(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&T.test(s);return v.createElement(`form`,{ref:m,method:y,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?v.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Nn.displayName=`Form`;function Pn({getKey:e,storageKey:t,...n}){let r=v.useContext(yn),{basename:i}=v.useContext(Ze),a=ct(),o=jt();qn({getKey:e,storageKey:t});let s=v.useMemo(()=>{if(!r||!e)return null;let t=Kn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),v.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${an(JSON.stringify(t||Wn))}, ${an(JSON.stringify(s))})`}})}Pn.displayName=`ScrollRestoration`;function Fn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function In(e){let t=v.useContext(We);return j(t,Fn(e)),t}function Ln(e){let t=v.useContext(Ge);return j(t,Fn(e)),t}function Rn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=dt(),d=ct(),f=mt(e,{relative:o});return v.useCallback(p=>{if(Jt(p,t)){p.preventDefault();let t=n===void 0?F(d)===F(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?v.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function zn(e){M(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=v.useRef(Yt(e)),n=v.useRef(!1),r=ct(),i=v.useMemo(()=>Xt(r.search,n.current?null:t.current),[r.search]),a=dt();return[i,v.useCallback((e,t)=>{let r=Yt(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Bn=0,Vn=()=>`__${String(++Bn)}__`;function Hn(){let{router:e}=In(`useSubmit`),{basename:t}=v.useContext(Ze),n=kt(),r=e.fetch,i=e.navigate;return v.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=tn(e,t);if(a.navigate===!1){let e=a.fetcherKey||Vn();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,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 Un(e,{relative:t}={}){let{basename:n}=v.useContext(Ze),r=v.useContext($e);j(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...mt(e||`.`,{relative:t})},o=ct();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:Ae([n,a.pathname])),F(a)}var Wn=`react-router-scroll-positions`,Gn={};function Kn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Se(e.pathname,n)||e.pathname},t)),i??=e.key,i}function qn({getKey:e,storageKey:t}={}){let{router:n}=In(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Ln(`useScrollRestoration`),{basename:a}=v.useContext(Ze),o=ct(),s=jt(),c=At();v.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Jn(v.useCallback(()=>{if(c.state===`idle`){let t=Kn(o,s,a,e);Gn[t]=window.scrollY}try{sessionStorage.setItem(t||Wn,JSON.stringify(Gn))}catch(e){M(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(v.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Wn);e&&(Gn=JSON.parse(e))}catch{}},[t]),v.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Gn,()=>window.scrollY,e?(t,n)=>Kn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),v.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{M(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Jn(e,t){let{capture:n}=t||{};v.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Yn(e,{relative:t}={}){let n=v.useContext(Je);j(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=In(`useViewTransitionState`),i=mt(e,{relative:t});if(!n.isTransitioning)return!1;let a=Se(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Se(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ve(i.pathname,o)!=null||ve(i.pathname,a)!=null}function Xn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Zn(...e){return t=>{let n=!1,r=e.map(e=>{let r=Xn(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():Xn(e[t],null)}}}}function Qn(...e){return v.useCallback(Zn(...e),e)}function $n(e){let t=v.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];cr(r)&&typeof fr==`function`&&(r=fr(r._payload)),v.Children.forEach(r,e=>{if(or(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;cr(n)&&typeof fr==`function`&&(n=fr(n._payload)),a=rr(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=v.cloneElement(a,void 0,s):!o&&v.Children.count(r)===1&&v.isValidElement(r)&&(a=r);let c=a?ar(a):void 0,l=Qn(n,c);if(!a){if(r||r===0)throw Error(o?dr(e):ur(e));return r}let u=ir(i,a.props??{});return a.type!==v.Fragment&&(u.ref=n?l:c),v.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var er=$n(`Slot`),tr=Symbol.for(`radix.slottable`);function nr(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=tr,t}var rr=(e,t)=>{if(`child`in e.props){let t=e.props.child;return v.isValidElement(t)?v.cloneElement(t,void 0,e.props.children(t.props.children)):null}return v.isValidElement(t)?t:null};function ir(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(` `))}return{...e,...n}}function ar(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)}function or(e){return v.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===tr}var sr=Symbol.for(`react.lazy`);function cr(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===sr&&`_payload`in e&&lr(e._payload)}function lr(e){return typeof e==`object`&&!!e&&`then`in e}var ur=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,dr=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,fr=v.use,pr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),z=o(((e,t)=>{t.exports=pr()}))(),mr=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=$n(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,z.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hr(e,t){e&&y.flushSync(()=>e.dispatchEvent(t))}var gr=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`}),_r=`VisuallyHidden`,vr=v.forwardRef((e,t)=>(0,z.jsx)(mr.span,{...e,ref:t,style:{...gr,...e.style}}));vr.displayName=_r;var yr=vr;function br(e,t=[]){let n=[];function r(t,r){let i=v.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=v.useMemo(()=>o,Object.values(o));return(0,z.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=v.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>v.createContext(e));return function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,xr(i,...t)]}function xr(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function Sr(e){let t=e+`CollectionProvider`,[n,r]=br(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=v.useRef(null),a=v.useRef(new Map).current;return(0,z.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=$n(s),l=v.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Qn(t,a(s,n).collectionRef);return(0,z.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=$n(u),p=v.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=v.useRef(null),s=Qn(t,o),c=a(u,n);return v.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,z.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return v.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}typeof window<`u`&&window.document&&window.document.createElement;function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}var Cr=globalThis?.document?v.useLayoutEffect:()=>{},wr=v.useInsertionEffect||Cr;function Tr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Er({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=v.useRef(e!==void 0);v.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,v.useCallback(t=>{if(s){let n=Dr(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Er({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),i=v.useRef(n),a=v.useRef(t);return wr(()=>{a.current=t},[t]),v.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Dr(e){return typeof e==`function`}function Or(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}var kr=e=>{let{present:t,children:n}=e,r=Ar(t),i=typeof n==`function`?n({present:r.isPresent}):v.Children.only(n),a=Mr(r.ref,Pr(i));return typeof n==`function`||r.isPresent?v.cloneElement(i,{ref:a}):null};kr.displayName=`Presence`;function Ar(e){let[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),a=v.useRef(`none`),o=v.useRef(void 0),[s,c]=Or(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return v.useEffect(()=>{s===`mounted`?(a.current=o.current??Nr(r.current),o.current=void 0):a.current=`none`},[s]),Cr(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Nr(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]),Cr(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Nr(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)})}},s=e=>{e.target===t&&(a.current=Nr(r.current))};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)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:v.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Nr(t)}else r.current=null;n(e)},[])}}function jr(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Mr(...e){let t=v.useRef(e);return t.current=e,v.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=jr(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():jr(n[e],null)}}},[])}function Nr(e){return e?.animationName||`none`}function Pr(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)}var Fr=v.useId||(()=>void 0),Ir=0;function Lr(e){let[t,n]=v.useState(Fr());return Cr(()=>{e||n(e=>e??String(Ir++))},[e]),e||(t?`radix-${t}`:``)}var Rr=v.createContext(void 0);function zr(e){let t=v.useContext(Rr);return e||t||`ltr`}function Br(e){let t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Vr=`DismissableLayer`,Hr=`dismissableLayer.update`,Ur=`dismissableLayer.pointerDownOutside`,Wr=`dismissableLayer.focusOutside`,Gr,Kr=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),qr=v.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=v.useContext(Kr),[d,f]=v.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=v.useState({}),h=Qn(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=_?g.indexOf(_):-1,b=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=v.useRef(!1),w=Qr(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=$r(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?b===g.length-1:!1,D=Br(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return v.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),v.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Gr=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ei(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Gr))}},[d,p,n,u]),v.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ei())},[d,u]),v.useEffect(()=>{let e=()=>m({});return document.addEventListener(Hr,e),()=>document.removeEventListener(Hr,e)},[]),(0,z.jsx)(mr.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:B(e.onFocusCapture,T.onFocusCapture),onBlurCapture:B(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,w.onPointerDownCapture)})});qr.displayName=Vr;var Jr=`DismissableLayerBranch`,Yr=v.forwardRef((e,t)=>{let n=v.useContext(Kr),r=v.useRef(null),i=Qn(t,r);return v.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,z.jsx)(mr.div,{...e,ref:i})});Yr.displayName=Jr;function Xr(){let e=v.useContext(Kr),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}var Zr=()=>!0;function Qr(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Zr}=t,s=Br(e),c=v.useRef(!1),l=v.useRef(!1),u=v.useRef(new Map),d=v.useRef(()=>{});return v.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}function t(){return Array.from(u.current.values()).some(Boolean)}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)}function p(e){l.current&&u.current.set(e.type,!1)}let m=a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||ti(Ur,s,p,{discrete:!0})};if(!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},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:()=>c.current=!0}}function $r(e,t=globalThis?.document){let n=Br(e),r=v.useRef(!1);return v.useEffect(()=>{let e=e=>{e.target&&!r.current&&ti(Wr,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ei(){let e=new CustomEvent(Hr);document.dispatchEvent(e)}function ti(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?hr(i,a):i.dispatchEvent(a)}var ni=`focusScope.autoFocusOnMount`,ri=`focusScope.autoFocusOnUnmount`,ii={bubbles:!1,cancelable:!0},ai=`FocusScope`,oi=v.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=v.useState(null),l=Br(i),u=Br(a),d=v.useRef(null),f=Qn(t,c),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:pi(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||pi(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&pi(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),v.useEffect(()=>{if(s){mi.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(ni,ii);s.addEventListener(ni,l),s.dispatchEvent(t),t.defaultPrevented||(si(_i(li(s)),{select:!0}),document.activeElement===e&&pi(s))}return()=>{s.removeEventListener(ni,l),setTimeout(()=>{let t=new CustomEvent(ri,ii);s.addEventListener(ri,u),s.dispatchEvent(t),t.defaultPrevented||pi(e??document.body,{select:!0}),s.removeEventListener(ri,u),mi.remove(p)},0)}}},[s,l,u,p]);let m=v.useCallback(e=>{if(!n&&!r||p.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]=ci(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&pi(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&pi(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,z.jsx)(mr.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});oi.displayName=ai;function si(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(pi(r,{select:t}),document.activeElement!==n)return}function ci(e){let t=li(e);return[ui(t,e),ui(t.reverse(),e)]}function li(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode: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}});for(;n.nextNode();)t.push(n.currentNode);return t}function ui(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):di(r,{upTo:t})))return r}function di(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function fi(e){return e instanceof HTMLInputElement&&`select`in e}function pi(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fi(e)&&t&&e.select()}}var mi=hi();function hi(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=gi(e,t),e.unshift(t)},remove(t){e=gi(e,t),e[0]?.resume()}}}function gi(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _i(e){return e.filter(e=>e.tagName!==`A`)}var vi=`Portal`,yi=v.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=v.useState(!1);Cr(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?y.createPortal((0,z.jsx)(mr.div,{...r,ref:t}),o):null});yi.displayName=vi;var bi=0,xi=null;function Si(){v.useEffect(()=>{xi||={start:Ci(),end:Ci()};let{start:e,end:t}=xi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),bi++,()=>{bi===1&&(xi?.start.remove(),xi?.end.remove(),xi=null),bi=Math.max(0,bi-1)}},[])}function Ci(){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}var wi=function(){return wi=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},wi.apply(this,arguments)};function Ti(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 Ei(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 Di=`right-scroll-bar-position`,Oi=`width-before-scroll-bar`,ki=`with-scroll-bars-hidden`,Ai=`--removed-body-scroll-bar-size`;function ji(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Mi(e,t){var n=(0,v.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var V=typeof window<`u`?v.useLayoutEffect:v.useEffect,Ni=new WeakMap;function Pi(e,t){var n=Mi(t||null,function(t){return e.forEach(function(e){return ji(e,t)})});return V(function(){var t=Ni.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||ji(e,null)}),i.forEach(function(e){r.has(e)||ji(e,a)})}Ni.set(n,e)},[e]),n}function Fi(e){return e}function Ii(e,t){t===void 0&&(t=Fi);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 Li(e){e===void 0&&(e={});var t=Ii(null);return t.options=wi({async:!0,ssr:!1},e),t}var Ri=function(e){var t=e.sideCar,n=Ti(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return v.createElement(r,wi({},n))};Ri.isSideCarExport=!0;function zi(e,t){return e.useMedium(t),Ri}var Bi=Li(),Vi=function(){},Hi=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Vi,onWheelCapture:Vi,onTouchMoveCapture:Vi}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,y=_===void 0?`div`:_,b=e.gapMode,x=Ti(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Pi([n,t]),w=wi(wi({},x),i);return v.createElement(v.Fragment,null,u&&v.createElement(S,{sideCar:Bi,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),o?v.cloneElement(v.Children.only(s),wi(wi({},w),{ref:C})):v.createElement(y,wi({},w,{className:c,ref:C}),s))});Hi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Hi.classNames={fullWidth:Oi,zeroRight:Di};var Ui,Wi=function(){if(Ui)return Ui;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Gi(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Wi();return t&&e.setAttribute(`nonce`,t),e}function Ki(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qi(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Ji=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Gi())&&(Ki(t,n),qi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yi=function(){var e=Ji();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xi=function(){var e=Yi();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Zi={left:0,top:0,right:0,gap:0},Qi=function(e){return parseInt(e||``,10)||0},$i=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[Qi(n),Qi(r),Qi(i)]},ea=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Zi;var t=$i(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])}},ta=Xi(),na=`data-scroll-locked`,ra=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
12
|
+
.${ki} {
|
|
13
|
+
overflow: hidden ${r};
|
|
14
|
+
padding-right: ${s}px ${r};
|
|
15
|
+
}
|
|
16
|
+
body[${na}] {
|
|
17
|
+
overflow: hidden ${r};
|
|
18
|
+
overscroll-behavior: contain;
|
|
19
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
20
|
+
padding-left: ${i}px;
|
|
21
|
+
padding-top: ${a}px;
|
|
22
|
+
padding-right: ${o}px;
|
|
23
|
+
margin-left:0;
|
|
24
|
+
margin-top:0;
|
|
25
|
+
margin-right: ${s}px ${r};
|
|
26
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.${Di} {
|
|
30
|
+
right: ${s}px ${r};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.${Oi} {
|
|
34
|
+
margin-right: ${s}px ${r};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.${Di} .${Di} {
|
|
38
|
+
right: 0 ${r};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.${Oi} .${Oi} {
|
|
42
|
+
margin-right: 0 ${r};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
body[${na}] {
|
|
46
|
+
${Ai}: ${s}px;
|
|
47
|
+
}
|
|
48
|
+
`},ia=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},aa=function(){v.useEffect(function(){return document.body.setAttribute(na,(ia()+1).toString()),function(){var e=ia()-1;e<=0?document.body.removeAttribute(na):document.body.setAttribute(na,e.toString())}},[])},oa=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;aa();var a=v.useMemo(function(){return ea(i)},[i]);return v.createElement(ta,{styles:ra(a,!t,i,n?``:`!important`)})},sa=!1;if(typeof window<`u`)try{var ca=Object.defineProperty({},"passive",{get:function(){return sa=!0,!0}});window.addEventListener(`test`,ca,ca),window.removeEventListener(`test`,ca,ca)}catch{sa=!1}var la=sa?{passive:!1}:!1,ua=function(e){return e.tagName===`TEXTAREA`},da=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ua(e)&&n[t]===`visible`)},fa=function(e){return da(e,`overflowY`)},pa=function(e){return da(e,`overflowX`)},ma=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),_a(e,r)){var i=va(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ha=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},ga=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},_a=function(e,t){return e===`v`?fa(t):pa(t)},va=function(e,t){return e===`v`?ha(t):ga(t)},ya=function(e,t){return e===`h`&&t===`rtl`?-1:1},ba=function(e,t,n,r,i){var a=ya(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=va(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&_a(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},xa=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Sa=function(e){return[e.deltaX,e.deltaY]},Ca=function(e){return e&&`current`in e?e.current:e},wa=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ta=function(e){return`
|
|
49
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
50
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
51
|
+
`},Ea=0,Da=[];function Oa(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(Ea++)[0],a=v.useState(Xi)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Ei([e.lockRef.current],(e.shards||[]).map(Ca),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=xa(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=ma(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ma(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 ba(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(!(!Da.length||Da[Da.length-1]!==a)){var r=`deltaY`in n?Sa(n):xa(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&wa(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Ca).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ka(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=xa(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,Sa(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,xa(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return Da.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,la),document.addEventListener(`touchmove`,c,la),document.addEventListener(`touchstart`,u,la),function(){Da=Da.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,la),document.removeEventListener(`touchmove`,c,la),document.removeEventListener(`touchstart`,u,la)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:Ta(i)}):null,p?v.createElement(oa,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ka(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Aa=zi(Bi,Oa),ja=v.forwardRef(function(e,t){return v.createElement(Hi,wi({},e,{ref:t,sideCar:Aa}))});ja.classNames=Hi.classNames;var Ma=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Na=new WeakMap,Pa=new WeakMap,Fa={},Ia=0,La=function(e){return e&&(e.host||La(e.parentNode))},Ra=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=La(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})},za=function(e,t,n,r){var i=Ra(t,Array.isArray(e)?e:[e]);Fa[n]||(Fa[n]=new WeakMap);var a=Fa[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=(Na.get(e)||0)+1,l=(a.get(e)||0)+1;Na.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Pa.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(),Ia++,function(){o.forEach(function(e){var t=Na.get(e)-1,i=a.get(e)-1;Na.set(e,t),a.set(e,i),t||(Pa.has(e)||e.removeAttribute(r),Pa.delete(e)),i||e.removeAttribute(n)}),Ia--,Ia||(Na=new WeakMap,Na=new WeakMap,Pa=new WeakMap,Fa={})}},Ba=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ma(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),za(r,i,n,`aria-hidden`)):function(){return null}},Va=`Dialog`,[Ha,Ua]=br(Va),[Wa,Ga]=Ha(Va),Ka=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,u]=Tr({prop:r,defaultProp:i??!1,onChange:a,caller:Va});return(0,z.jsx)(Wa,{scope:t,triggerRef:s,contentRef:c,contentId:Lr(),titleId:Lr(),descriptionId:Lr(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};Ka.displayName=Va;var qa=`DialogTrigger`,Ja=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ga(qa,n),a=Qn(t,i.triggerRef);return(0,z.jsx)(mr.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":mo(i.open),...r,ref:a,onClick:B(e.onClick,i.onOpenToggle)})});Ja.displayName=qa;var Ya=`DialogPortal`,[Xa,Za]=Ha(Ya,{forceMount:void 0}),Qa=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Ga(Ya,t);return(0,z.jsx)(Xa,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,z.jsx)(kr,{present:n||a.open,children:(0,z.jsx)(yi,{asChild:!0,container:i,children:e})}))})};Qa.displayName=Ya;var $a=`DialogOverlay`,eo=v.forwardRef((e,t)=>{let n=Za($a,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Ga($a,e.__scopeDialog);return a.modal?(0,z.jsx)(kr,{present:r||a.open,children:(0,z.jsx)(no,{...i,ref:t})}):null});eo.displayName=$a;var to=$n(`DialogOverlay.RemoveScroll`),no=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ga($a,n),a=Qn(t,Xr());return(0,z.jsx)(ja,{as:to,allowPinchZoom:!0,shards:[i.contentRef],children:(0,z.jsx)(mr.div,{"data-state":mo(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),ro=`DialogContent`,io=v.forwardRef((e,t)=>{let n=Za(ro,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Ga(ro,e.__scopeDialog);return(0,z.jsx)(kr,{present:r||a.open,children:a.modal?(0,z.jsx)(ao,{...i,ref:t}):(0,z.jsx)(oo,{...i,ref:t})})});io.displayName=ro;var ao=v.forwardRef((e,t)=>{let n=Ga(ro,e.__scopeDialog),r=v.useRef(null),i=Qn(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return Ba(e)},[]),(0,z.jsx)(so,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:B(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:B(e.onFocusOutside,e=>e.preventDefault())})}),oo=v.forwardRef((e,t)=>{let n=Ga(ro,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,z.jsx)(so,{...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()}})}),so=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Ga(ro,n);return Si(),(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(oi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,z.jsx)(qr,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":mo(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),co=`DialogTitle`,lo=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ga(co,n);return(0,z.jsx)(mr.h2,{id:i.titleId,...r,ref:t})});lo.displayName=co;var uo=`DialogDescription`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ga(uo,n);return(0,z.jsx)(mr.p,{id:i.descriptionId,...r,ref:t})});H.displayName=uo;var fo=`DialogClose`,po=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ga(fo,n);return(0,z.jsx)(mr.button,{type:`button`,...r,ref:t,onClick:B(e.onClick,()=>i.onOpenChange(!1))})});po.displayName=fo;function mo(e){return e?`open`:`closed`}function ho(e){let t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function go(e){let[t,n]=v.useState(void 0);return Cr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var _o=[`top`,`right`,`bottom`,`left`],vo=Math.min,yo=Math.max,bo=Math.round,xo=Math.floor,So=e=>({x:e,y:e}),Co={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function wo(e,t,n){return yo(e,vo(t,n))}function To(e,t){return typeof e==`function`?e(t):e}function Eo(e){return e.split(`-`)[0]}function Do(e){return e.split(`-`)[1]}function Oo(e){return e===`x`?`y`:`x`}function ko(e){return e===`y`?`height`:`width`}function Ao(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function jo(e){return Oo(Ao(e))}function Mo(e,t,n){n===void 0&&(n=!1);let r=Do(e),i=jo(e),a=ko(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Vo(o)),[o,Vo(o)]}function No(e){let t=Vo(e);return[Po(e),t,Po(t)]}function Po(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Fo=[`left`,`right`],Io=[`right`,`left`],Lo=[`top`,`bottom`],Ro=[`bottom`,`top`];function zo(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Io:Fo:t?Fo:Io;case`left`:case`right`:return t?Lo:Ro;default:return[]}}function Bo(e,t,n,r){let i=Do(e),a=zo(Eo(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Po)))),a}function Vo(e){let t=Eo(e);return Co[t]+e.slice(t.length)}function Ho(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Uo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ho(e)}function Wo(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 Go(e,t,n){let{reference:r,floating:i}=e,a=Ao(t),o=jo(t),s=ko(o),c=Eo(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=Do(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Ko(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}=To(t,e),p=Uo(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Wo(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=Wo(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 qo=50,Jo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Ko},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Go(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<qo&&(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}=Go(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Yo=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}=To(e,t)||{};if(l==null)return{};let d=Uo(u),f={x:n,y:r},p=jo(i),m=ko(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=vo(d[_],T),D=vo(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=wo(E,k,O),j=!c.arrow&&Do(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}}}),Xo=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}=To(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Eo(r),_=Ao(o),v=Eo(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Vo(o)]:No(o)),x=p!==`none`;!d&&x&&b.push(...Bo(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=Mo(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`&&_!==Ao(t))||T.every(e=>Ao(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=Ao(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;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Zo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qo(e){return _o.some(t=>e[t]>=0)}var $o=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=To(e,t);switch(i){case`referenceHidden`:{let e=Zo(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Qo(e)}}}case`escaped`:{let e=Zo(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Qo(e)}}}default:return{}}}}},es=new Set([`left`,`top`]);async function ts(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Eo(n),s=Do(n),c=Ao(n)===`y`,l=es.has(o)?-1:1,u=a&&c?-1:1,d=To(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 ns=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 ts(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}}}}},rs=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}=To(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ao(i),p=Oo(f),m=u[p],h=u[f],g=(e,t)=>wo(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}}}}}},is=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}=To(e,t),u={x:n,y:r},d=Ao(i),f=Oo(d),p=u[f],m=u[d],h=To(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=es.has(Eo(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}}}},as=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}=To(e,t),c=await i.detectOverflow(t,s),l=Eo(n),u=Do(n),d=Ao(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=vo(p-c[m],g),y=vo(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*yo(c.left,c.right):S=p-2*yo(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 os(){return typeof window<`u`}function ss(e){return us(e)?(e.nodeName||``).toLowerCase():`#document`}function cs(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ls(e){return((us(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function us(e){return os()?e instanceof Node||e instanceof cs(e).Node:!1}function ds(e){return os()?e instanceof Element||e instanceof cs(e).Element:!1}function fs(e){return os()?e instanceof HTMLElement||e instanceof cs(e).HTMLElement:!1}function ps(e){return!os()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof cs(e).ShadowRoot}function ms(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ts(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function hs(e){return/^(table|td|th)$/.test(ss(e))}function gs(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var _s=/transform|translate|scale|rotate|perspective|filter/,vs=/paint|layout|strict|content/,ys=e=>!!e&&e!==`none`,bs;function xs(e){let t=ds(e)?Ts(e):e;return ys(t.transform)||ys(t.translate)||ys(t.scale)||ys(t.rotate)||ys(t.perspective)||!Cs()&&(ys(t.backdropFilter)||ys(t.filter))||_s.test(t.willChange||``)||vs.test(t.contain||``)}function Ss(e){let t=Ds(e);for(;fs(t)&&!ws(t);){if(xs(t))return t;if(gs(t))return null;t=Ds(t)}return null}function Cs(){return bs??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),bs}function ws(e){return/^(html|body|#document)$/.test(ss(e))}function Ts(e){return cs(e).getComputedStyle(e)}function Es(e){return ds(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ds(e){if(ss(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ps(e)&&e.host||ls(e);return ps(t)?t.host:t}function Os(e){let t=Ds(e);return ws(t)?(e.ownerDocument||e).body:fs(t)&&ms(t)?t:Os(t)}function ks(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Os(e),i=r===e.ownerDocument?.body,a=cs(r);if(i){let e=As(a);return t.concat(a,a.visualViewport||[],ms(r)?r:[],e&&n?ks(e):[])}else return t.concat(r,ks(r,[],n))}function As(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function js(e){let t=Ts(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=fs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bo(n)!==a||bo(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ms(e){return ds(e)?e:e.contextElement}function Ns(e){let t=Ms(e);if(!fs(t))return So(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=js(t),o=(a?bo(n.width):n.width)/r,s=(a?bo(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ps=So(0);function Fs(e){let t=cs(e);return!Cs()||!t.visualViewport?Ps:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Is(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===cs(e)}function Ls(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ms(e),o=So(1);t&&(r?ds(r)&&(o=Ns(r)):o=Ns(e));let s=Is(a,n,r)?Fs(a):So(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=cs(a),t=ds(r)?cs(r):r,n=e,i=As(n);for(;i&&t!==n;){let e=Ns(i),t=i.getBoundingClientRect(),r=Ts(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=cs(i),i=As(n)}}return Wo({width:u,height:d,x:c,y:l})}function Rs(e,t){let n=Es(e).scrollLeft;return t?t.left+n:Ls(ls(e)).left+n}function zs(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Rs(e,n),y:n.top+t.scrollTop}}function Bs(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=ls(r),s=t?gs(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=So(1),u=So(0),d=fs(r);if((d||!a)&&((ss(r)!==`body`||ms(o))&&(c=Es(r)),d)){let e=Ls(r);l=Ns(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?zs(o,c):So(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 Vs(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Hs(e){let t=Es(e),n=e.ownerDocument.body,r=yo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=yo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Rs(e),o=-t.scrollTop;return Ts(n).direction===`rtl`&&(a+=yo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Us=25;function Ws(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=cs(e),a=ls(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Cs()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Rs(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<=Us&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Gs(e,t){let n=Ls(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ns(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ks(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ws(e,n,t);else if(t===`document`)r=Hs(ls(e));else if(ds(t))r=Gs(t,n);else{let n=Fs(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Wo(r)}function qs(e,t){let n=t.get(e);if(n)return n;let r=ks(e,[],!1).filter(e=>ds(e)&&ss(e)!==`body`),i=null,a=Ts(e).position===`fixed`,o=a?Ds(e):e;for(;ds(o)&&!ws(o);){let e=Ts(o),t=xs(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Ds(o)}return t.set(e,r),r}function Js(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?gs(t)?[]:qs(t,this._c):[].concat(n),r],o=Ks(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=Ks(t,a[e],i);s=yo(n.top,s),c=vo(n.right,c),l=vo(n.bottom,l),u=yo(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ys(e){let{width:t,height:n}=js(e);return{width:t,height:n}}function Xs(e,t,n){let r=fs(t),i=ls(t),a=n===`fixed`,o=Ls(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=So(0);if((r||!a)&&((ss(t)!==`body`||ms(i))&&(s=Es(t)),r)){let e=Ls(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Rs(i));let l=i&&!r&&!a?zs(i,s):So(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 Zs(e){return Ts(e).position===`static`}function Qs(e,t){if(!fs(e)||Ts(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return ls(e)===n&&(n=n.ownerDocument.body),n}function $s(e,t){let n=cs(e);if(gs(e))return n;if(!fs(e)){let t=Ds(e);for(;t&&!ws(t);){if(ds(t)&&!Zs(t))return t;t=Ds(t)}return n}let r=Qs(e,t);for(;r&&hs(r)&&Zs(r);)r=Qs(r,t);return r&&ws(r)&&Zs(r)&&!xs(r)?n:r||Ss(e)||n}var ec=async function(e){let t=this.getOffsetParent||$s,n=this.getDimensions,r=await n(e.floating);return{reference:Xs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tc(e){return Ts(e).direction===`rtl`}var nc={convertOffsetParentRelativeRectToViewportRelativeRect:Bs,getDocumentElement:ls,getClippingRect:Js,getOffsetParent:$s,getElementRects:ec,getClientRects:Vs,getDimensions:Ys,getScale:Ns,isElement:ds,isRTL:tc};function rc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ic(e,t,n){let r=null,i,a=ls(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=xo(d),h=xo(a.clientWidth-(u+f)),g=xo(a.clientHeight-(d+p)),_=xo(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:yo(0,vo(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!rc(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=cs(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function ac(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=Ms(e),u=i||a?[...l?ks(l):[],...t?ks(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?ic(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?Ls(e):null;c&&g();function g(){let t=Ls(e);h&&!rc(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 oc=ns,sc=rs,cc=Xo,lc=as,uc=$o,dc=Yo,fc=is,pc=(e,t,n)=>{let r=new Map,i=n??{},a={...nc,...i.platform,_c:r};return Jo(e,t,{...i,platform:a})},mc=typeof document<`u`?v.useLayoutEffect:function(){};function hc(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(!hc(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)&&!hc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function gc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _c(e,t){let n=gc(e);return Math.round(t*n)/n}function vc(e){let t=v.useRef(e);return mc(()=>{t.current=e}),t}function yc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);hc(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),b=v.useCallback(e=>{e!==w.current&&(w.current=e,h(e))},[]),x=v.useCallback(e=>{e!==T.current&&(T.current=e,_(e))},[]),S=a||m,C=o||g,w=v.useRef(null),T=v.useRef(null),E=v.useRef(u),D=c!=null,O=vc(c),k=vc(i),A=vc(l),j=v.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),pc(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!hc(E.current,t)&&(E.current=t,y.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);mc(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=v.useRef(!1);mc(()=>(M.current=!0,()=>{M.current=!1}),[]),mc(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let ee=v.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),N=v.useMemo(()=>({reference:S,floating:C}),[S,C]),P=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=_c(N.floating,u.x),r=_c(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...gc(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:j,refs:ee,elements:N,floatingStyles:P}),[u,j,ee,N,P])}var bc=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?{}:dc({element:r.current,padding:i}).fn(n):r?dc({element:r,padding:i}).fn(n):{}}}},xc=(e,t)=>{let n=oc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sc=(e,t)=>{let n=sc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cc=(e,t)=>({fn:fc(e).fn,options:[e,t]}),wc=(e,t)=>{let n=cc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tc=(e,t)=>{let n=lc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ec=(e,t)=>{let n=uc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dc=(e,t)=>{let n=bc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Oc=`Arrow`,kc=v.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,z.jsx)(mr.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,z.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});kc.displayName=Oc;var Ac=kc,jc=`Popper`,[Mc,Nc]=br(jc),[Pc,Fc]=Mc(jc),Ic=e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[a,o]=v.useState(void 0);return(0,z.jsx)(Pc,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Ic.displayName=jc;var Lc=`PopperAnchor`,Rc=v.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Fc(Lc,n),o=v.useRef(null),s=a.onAnchorChange,c=Qn(t,v.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=v.useRef(null);v.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Jc(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,z.jsx)(mr.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});Rc.displayName=Lc;var zc=`PopperContent`,[Bc,Vc]=Mc(zc),Hc=v.forwardRef((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=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Fc(zc,n),[_,y]=v.useState(null),b=Qn(t,y),[x,S]=v.useState(null),C=go(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(Kc),altBoundary:k},{refs:j,floatingStyles:M,placement:ee,isPositioned:N,middlewareData:P}=yc({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>ac(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[xc({mainAxis:i+T,alignmentAxis:o}),c&&Sc({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Cc():void 0,...A}),c&&wc({...A}),Tc({...A,apply:({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`)}}),x&&Dc({element:x,padding:s}),qc({arrowWidth:w,arrowHeight:T}),f&&Ec({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),F=g.setPlacementState;Cr(()=>(F(ee),()=>{F(void 0)}),[ee,F]);let[I,te]=Jc(ee),ne=Br(m);Cr(()=>{N&&ne?.()},[N,ne]);let re=P.arrow?.x,ie=P.arrow?.y,ae=P.arrow?.centerOffset!==0,[L,oe]=v.useState();return Cr(()=>{_&&oe(window.getComputedStyle(_).zIndex)},[_]),(0,z.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:N?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:L,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,z.jsx)(Bc,{scope:n,placedSide:I,placedAlign:te,onArrowChange:S,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,z.jsx)(mr.div,{"data-side":I,"data-align":te,...h,ref:b,style:{...h.style,animation:N?void 0:`none`}})})})});Hc.displayName=zc;var Uc=`PopperArrow`,Wc={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Gc=v.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Vc(Uc,n),a=Wc[i.placedSide];return(0,z.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,z.jsx)(Ac,{...r,ref:t,style:{...r.style,display:`block`}})})});Gc.displayName=Uc;function Kc(e){return e!==null}var qc=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]=Jc(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}}}});function Jc(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Yc=Ic,Xc=Rc,Zc=Hc,Qc=Gc,$c=`Label`,el=v.forwardRef((e,t)=>(0,z.jsx)(mr.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));el.displayName=$c;var tl=el;function nl(e,[t,n]){return Math.min(n,Math.max(t,e))}var rl=[` `,`Enter`,`ArrowUp`,`ArrowDown`],il=[` `,`Enter`],al=`Select`,[ol,sl,cl]=Sr(al),[ll,ul]=br(al,[cl,Nc]),dl=Nc(),[fl,pl]=ll(al),[ml,hl]=ll(al),gl=`SelectProvider`;function _l(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=dl(t),[_,y]=v.useState(null),[b,x]=v.useState(null),[S,C]=v.useState(!1),w=zr(l),[T,E]=Tr({prop:r,defaultProp:i??!1,onChange:a,caller:al}),[D,O]=Tr({prop:o,defaultProp:s,onChange:c,caller:al}),k=v.useRef(null),A=v.useRef(D);v.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=()=>O(A.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let j=!_||!!m||!!_.closest(`form`),[M,ee]=v.useState(new Set),N=Lr(),P=Array.from(M).map(e=>e.props.value).join(`;`),F=v.useCallback(e=>{ee(t=>new Set(t).add(e))},[]),I=v.useCallback(e=>{ee(t=>{let n=new Set(t);return n.delete(e),n})},[]),te={required:p,trigger:_,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:N,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:M,nativeSelectKey:P,isFormControl:j};return(0,z.jsx)(Yc,{...g,children:(0,z.jsx)(fl,{scope:t,...te,children:(0,z.jsx)(ol.Provider,{scope:t,children:(0,z.jsx)(ml,{scope:t,onNativeOptionAdd:F,onNativeOptionRemove:I,children:pu(h)?h(te):n})})})})}_l.displayName=gl;var vl=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,z.jsx)(_l,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,z.jsxs)(z.Fragment,{children:[n,e?(0,z.jsx)(fu,{__scopeSelect:t}):null]})})};vl.displayName=al;var yl=`SelectTrigger`,bl=v.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=dl(n),o=pl(yl,n),s=o.disabled||r,c=Qn(t,o.onTriggerChange),l=sl(n),u=v.useRef(`touch`),[d,f,p]=hu(e=>{let t=l().filter(e=>!e.disabled),n=gu(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,z.jsx)(Xc,{asChild:!0,...a,children:(0,z.jsx)(mr.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":mu(o.value)?``:void 0,...i,ref:c,onClick:B(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:B(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:B(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&rl.includes(e.key)&&(m(),e.preventDefault())})})})});bl.displayName=yl;var xl=`SelectValue`,Sl=v.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=pl(xl,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Qn(t,c.onValueNodeChange);Cr(()=>{l(u)},[l,u]);let f=mu(c.value);return(0,z.jsx)(mr.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,z.jsx)(v.Fragment,{children:f?o:a},f?`placeholder`:`value`)})});Sl.displayName=xl;var Cl=`SelectIcon`,wl=v.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,z.jsx)(mr.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});wl.displayName=Cl;var Tl=`SelectPortal`,[El,Dl]=ll(Tl,{forceMount:void 0}),Ol=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,z.jsx)(El,{scope:e.__scopeSelect,forceMount:n,children:(0,z.jsx)(yi,{asChild:!0,...r})})};Ol.displayName=Tl;var kl=`SelectContent`,Al=v.forwardRef((e,t)=>{let n=Dl(kl,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=pl(kl,e.__scopeSelect),[o,s]=v.useState();return Cr(()=>{s(new DocumentFragment)},[]),(0,z.jsx)(kr,{present:r||a.open,children:({present:e})=>e?(0,z.jsx)(Ll,{...i,ref:t}):(0,z.jsx)(jl,{...i,fragment:o})})});Al.displayName=kl;var jl=v.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?y.createPortal((0,z.jsx)(Nl,{scope:n,children:(0,z.jsx)(ol.Slot,{scope:n,children:(0,z.jsx)(`div`,{ref:t,children:r})})}),i):null});jl.displayName=`SelectContentFragment`;var Ml=10,[Nl,Pl]=ll(kl),Fl=`SelectContentImpl`,Il=$n(`SelectContent.RemoveScroll`),Ll=v.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,y=pl(kl,n),[b,x]=v.useState(null),[S,C]=v.useState(null),w=Qn(t,x),[T,E]=v.useState(null),[D,O]=v.useState(null),k=sl(n),[A,j]=v.useState(!1),M=v.useRef(!1);v.useEffect(()=>{if(b)return Ba(b)},[b]),Si();let ee=v.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),N=v.useCallback(()=>ee([T,b]),[ee,T,b]);v.useEffect(()=>{A&&N()},[A,N]);let{onOpenChange:P,triggerPointerDownPosRef:F}=y;v.useEffect(()=>{if(b){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null};return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,P,F]),v.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[I,te]=hu(e=>{let t=k().filter(e=>!e.disabled),n=gu(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ne=v.useCallback((e,t,n)=>{let r=!M.current&&!n;(y.value!==void 0&&y.value===t||r)&&(E(e),r&&(M.current=!0))},[y.value]),re=v.useCallback(()=>b?.focus(),[b]),ie=v.useCallback((e,t,n)=>{let r=!M.current&&!n;(y.value!==void 0&&y.value===t||r)&&O(e)},[y.value]),ae=r===`popper`?Vl:zl,L=ae===Vl?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,z.jsx)(Nl,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ne,selectedItem:T,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:N,selectedItemText:D,position:r,isPositioned:A,searchRef:I,children:(0,z.jsx)(ja,{as:Il,allowPinchZoom:!0,children:(0,z.jsx)(oi,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:B(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,z.jsx)(qr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,z.jsx)(ae,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),..._,...L,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:B(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ee(t)),e.preventDefault()}})})})})})})});Ll.displayName=Fl;var Rl=`SelectItemAlignedPosition`,zl=v.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=pl(kl,n),o=Pl(kl,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=Qn(t,u),f=sl(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:y}=o,b=v.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Ml,d=nl(a,[Ml,Math.max(Ml,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Ml,d=nl(a,[Ml,Math.max(Ml,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Ml*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Ml,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${Ml}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Cr(()=>b(),[b]);let[x,S]=v.useState();return Cr(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,z.jsx)(U,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:v.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]),children:(0,z.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,z.jsx)(mr.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});zl.displayName=Rl;var Bl=`SelectPopperPosition`,Vl=v.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Ml,...a}=e,o=dl(n);return(0,z.jsx)(Zc,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Vl.displayName=Bl;var[U,Hl]=ll(kl,{}),W=`SelectViewport`,G=v.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=Pl(W,n),o=Hl(W,n),s=Qn(t,a.onViewportChange),c=v.useRef(0);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,z.jsx)(ol.Slot,{scope:n,children:(0,z.jsx)(mr.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:B(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Ml*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});G.displayName=W;var K=`SelectGroup`,[Ul,Wl]=ll(K),Gl=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Lr();return(0,z.jsx)(Ul,{scope:n,id:i,children:(0,z.jsx)(mr.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Gl.displayName=K;var Kl=`SelectLabel`,ql=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Wl(Kl,n);return(0,z.jsx)(mr.div,{id:i.id,...r,ref:t})});ql.displayName=Kl;var Jl=`SelectItem`,[Yl,Xl]=ll(Jl),Zl=v.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=pl(Jl,n),c=Pl(Jl,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=Qn(t,Br(e=>c.itemRefCallback?.(e,r,i))),h=Lr(),g=v.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};return(0,z.jsx)(Yl,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,z.jsx)(ol.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,z.jsx)(mr.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:B(o.onFocus,()=>p(!0)),onBlur:B(o.onBlur,()=>p(!1)),onClick:B(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:B(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:B(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:B(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:B(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(il.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});Zl.displayName=Jl;var Ql=`SelectItemText`,$l=v.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=pl(Ql,n),s=Pl(Ql,n),c=Xl(Ql,n),l=hl(Ql,n),[u,d]=v.useState(null),f=Br(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Qn(t,d,c.onItemTextChange,f),m=u?.textContent,h=v.useMemo(()=>(0,z.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Cr(()=>(g(h),()=>_(h)),[g,_,h]),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(mr.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!mu(o.value)?y.createPortal(a.children,o.valueNode):null]})});$l.displayName=Ql;var eu=`SelectItemIndicator`,tu=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Xl(eu,n).isSelected?(0,z.jsx)(mr.span,{"aria-hidden":!0,...r,ref:t}):null});tu.displayName=eu;var nu=`SelectScrollUpButton`,ru=v.forwardRef((e,t)=>{let n=Pl(nu,e.__scopeSelect),r=Hl(nu,e.__scopeSelect),[i,a]=v.useState(!1),o=Qn(t,r.onScrollButtonChange);return Cr(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,z.jsx)(ou,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});ru.displayName=nu;var iu=`SelectScrollDownButton`,au=v.forwardRef((e,t)=>{let n=Pl(iu,e.__scopeSelect),r=Hl(iu,e.__scopeSelect),[i,a]=v.useState(!1),o=Qn(t,r.onScrollButtonChange);return Cr(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,z.jsx)(ou,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});au.displayName=iu;var ou=v.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Pl(`SelectScrollButton`,n),o=v.useRef(null),s=sl(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Cr(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,z.jsx)(mr.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:B(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:B(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:B(i.onPointerLeave,()=>{c()})})}),su=`SelectSeparator`,cu=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,z.jsx)(mr.div,{"aria-hidden":!0,...r,ref:t})});cu.displayName=su;var lu=`SelectArrow`,uu=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=dl(n);return Pl(lu,n).position===`popper`?(0,z.jsx)(Qc,{...i,...r,ref:t}):null});uu.displayName=lu;var du=`SelectBubbleInput`,fu=v.forwardRef(({__scopeSelect:e,...t},n)=>{let r=pl(du,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=v.useRef(null),m=Qn(n,p),h=i??``,g=ho(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return v.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,z.jsxs)(mr.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...gr,...t.style},ref:m,defaultValue:h,children:[mu(i)&&!_?(0,z.jsx)(`option`,{value:``}):null,Array.from(d)]},f)});fu.displayName=du;function pu(e){return typeof e==`function`}function mu(e){return e===``||e===void 0}function hu(e){let t=Br(e),n=v.useRef(``),r=v.useRef(0),i=v.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function gu(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=_u(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function _u(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var[vu,yu]=br(`Tooltip`,[Nc]),bu=Nc(),xu=`TooltipProvider`,Su=700,Cu=`tooltip.open`,[wu,Tu]=vu(xu),Eu=e=>{let{__scopeTooltip:t,delayDuration:n=Su,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=v.useRef(!0),s=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,z.jsx)(wu,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:v.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:v.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:v.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Eu.displayName=xu;var Du=`Tooltip`,[Ou,ku]=vu(Du),Au=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Tu(Du,e.__scopeTooltip),l=bu(t),[u,d]=v.useState(null),f=Lr(),p=v.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=v.useRef(!1),[_,y]=Tr({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Cu))):c.onClose(),a?.(e)},caller:Du}),b=v.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),x=v.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,y(!0)},[y]),S=v.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),C=v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,y(!0),p.current=0},h)},[h,y]);return v.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,z.jsx)(Yc,{...l,children:(0,z.jsx)(Ou,{scope:t,contentId:f,open:_,stateAttribute:b,trigger:u,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayedRef.current?C():x()},[c.isOpenDelayedRef,C,x]),onTriggerLeave:v.useCallback(()=>{m?S():(window.clearTimeout(p.current),p.current=0)},[S,m]),onOpen:x,onClose:S,disableHoverableContent:m,children:n})})};Au.displayName=Du;var ju=`TooltipTrigger`,Mu=v.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=ku(ju,n),a=Tu(ju,n),o=bu(n),s=Qn(t,v.useRef(null),i.onTriggerChange),c=v.useRef(!1),l=v.useRef(!1),u=v.useCallback(()=>c.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,z.jsx)(Xc,{asChild:!0,...o,children:(0,z.jsx)(mr.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:B(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:B(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:B(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:B(e.onBlur,i.onClose),onClick:B(e.onClick,i.onClose)})})});Mu.displayName=ju;var Nu=`TooltipPortal`,[Pu,Fu]=vu(Nu,{forceMount:void 0}),Iu=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=ku(Nu,t);return(0,z.jsx)(Pu,{scope:t,forceMount:n,children:(0,z.jsx)(kr,{present:n||a.open,children:(0,z.jsx)(yi,{asChild:!0,container:i,children:r})})})};Iu.displayName=Nu;var Lu=`TooltipContent`,Ru=v.forwardRef((e,t)=>{let n=Fu(Lu,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=ku(Lu,e.__scopeTooltip);return(0,z.jsx)(kr,{present:r||o.open,children:o.disableHoverableContent?(0,z.jsx)(Uu,{side:i,...a,ref:t}):(0,z.jsx)(zu,{side:i,...a,ref:t})})}),zu=v.forwardRef((e,t)=>{let n=ku(Lu,e.__scopeTooltip),r=Tu(Lu,e.__scopeTooltip),i=v.useRef(null),a=Qn(t,i),[o,s]=v.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{s(null),d(!1)},[d]),p=v.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=qu(r,Ku(r,n.getBoundingClientRect())),a=Ju(t.getBoundingClientRect()),o=Xu([...i,...a]);s(o),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),v.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Yu(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,z.jsx)(Uu,{...e,ref:a})}),[Bu,Vu]=vu(Du,{isInside:!1}),Hu=nr(`TooltipContent`),Uu=v.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=ku(Lu,n),l=bu(n),{onClose:u}=c;return v.useEffect(()=>(document.addEventListener(Cu,u),()=>document.removeEventListener(Cu,u)),[u]),v.useEffect(()=>{if(c.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,z.jsx)(qr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,z.jsxs)(Zc,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.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,z.jsx)(Hu,{children:r}),(0,z.jsx)(Bu,{scope:n,isInside:!0,children:(0,z.jsx)(yr,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});Ru.displayName=Lu;var Wu=`TooltipArrow`,Gu=v.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=bu(n);return Vu(Wu,n).isInside?null:(0,z.jsx)(Qc,{...i,...r,ref:t})});Gu.displayName=Wu;function Ku(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`)}}function qu(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});break}return r}function Ju(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}]}function Yu(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}function Xu(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)),Zu(t)}function Zu(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)}var Qu=Eu;function $u(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=$u(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function ed(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=$u(e))&&(r&&(r+=` `),r+=t);return r}var td=`-`,nd=e=>{let t=od(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(td);return n[0]===``&&n.length!==1&&n.shift(),rd(n,t)||ad(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},rd=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),i=r?rd(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(td);return t.validators.find(({validator:e})=>e(a))?.classGroupId},id=/^\[(.+)\]$/,ad=e=>{if(id.test(e)){let t=id.exec(e)[1],n=t?.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},od=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ud(Object.entries(e.classGroups),n).forEach(([e,n])=>{sd(n,r,e,t)}),r},sd=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:cd(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(ld(e)){sd(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{sd(i,cd(t,e),n,r)})})},cd=(e,t)=>{let n=e;return t.split(td).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},ld=e=>e.isThemeGetter,ud=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,dd=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},fd=`!`,pd=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(fd);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},md=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},hd=e=>({cache:dd(e.cacheSize),parseClassName:pd(e),...nd(e)}),gd=/\s+/,_d=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(gd),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?` `+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=md(c).join(`:`),h=l?m+fd:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function vd(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=yd(t))&&(r&&(r+=` `),r+=n);return r}var yd=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=yd(e[r]))&&(n&&(n+=` `),n+=t);return n};function bd(e,...t){let n,r,i,a=o;function o(o){return n=hd(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=_d(e,n);return i(e,a),a}return function(){return a(vd.apply(null,arguments))}}var xd=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},Sd=/^\[(?:([a-z-]+):)?(.+)\]$/i,Cd=/^\d+\/\d+$/,wd=new Set([`px`,`full`,`screen`]),q=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Td=/\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$/,Ed=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Dd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Od=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kd=e=>jd(e)||wd.has(e)||Cd.test(e),Ad=e=>Ud(e,`length`,Wd),jd=e=>!!e&&!Number.isNaN(Number(e)),Md=e=>Ud(e,`number`,jd),Nd=e=>!!e&&Number.isInteger(Number(e)),Pd=e=>e.endsWith(`%`)&&jd(e.slice(0,-1)),J=e=>Sd.test(e),Fd=e=>q.test(e),Id=new Set([`length`,`size`,`percentage`]),Ld=e=>Ud(e,Id,Gd),Rd=e=>Ud(e,`position`,Gd),zd=new Set([`image`,`url`]),Bd=e=>Ud(e,zd,qd),Vd=e=>Ud(e,``,Kd),Hd=()=>!0,Ud=(e,t,n)=>{let r=Sd.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},Wd=e=>Td.test(e)&&!Ed.test(e),Gd=()=>!1,Kd=e=>Dd.test(e),qd=e=>Od.test(e),Jd=bd(()=>{let e=xd(`colors`),t=xd(`spacing`),n=xd(`blur`),r=xd(`brightness`),i=xd(`borderColor`),a=xd(`borderRadius`),o=xd(`borderSpacing`),s=xd(`borderWidth`),c=xd(`contrast`),l=xd(`grayscale`),u=xd(`hueRotate`),d=xd(`invert`),f=xd(`gap`),p=xd(`gradientColorStops`),m=xd(`gradientColorStopPositions`),h=xd(`inset`),g=xd(`margin`),_=xd(`opacity`),v=xd(`padding`),y=xd(`saturate`),b=xd(`scale`),x=xd(`sepia`),S=xd(`skew`),C=xd(`space`),w=xd(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,J,t],O=()=>[J,t],k=()=>[``,kd,Ad],A=()=>[`auto`,jd,J],j=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],M=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],ee=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],N=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],P=()=>[``,`0`,J],F=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],I=()=>[jd,J];return{cacheSize:500,separator:`:`,theme:{colors:[Hd],spacing:[kd,Ad],blur:[`none`,``,Fd,J],brightness:I(),borderColor:[e],borderRadius:[`none`,``,`full`,Fd,J],borderSpacing:O(),borderWidth:k(),contrast:I(),grayscale:P(),hueRotate:I(),invert:P(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Pd,Ad],inset:D(),margin:D(),opacity:I(),padding:O(),saturate:I(),scale:I(),sepia:P(),skew:I(),space:O(),translate:O()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,J]}],container:[`container`],columns:[{columns:[Fd]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"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`],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:[...j(),J]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,Nd,J]}],basis:[{basis:D()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,J]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:[`first`,`last`,`none`,Nd,J]}],"grid-cols":[{"grid-cols":[Hd]}],"col-start-end":[{col:[`auto`,{span:[`full`,Nd,J]},J]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Hd]}],"row-start-end":[{row:[`auto`,{span:[Nd,J]},J]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,J]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,J]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...N()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...N(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...N(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,J,t]}],"min-w":[{"min-w":[J,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[J,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[Fd]},Fd]}],h:[{h:[J,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[J,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[J,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[J,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,Fd,Ad]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,Md]}],"font-family":[{font:[Hd]}],"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:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,J]}],"line-clamp":[{"line-clamp":[`none`,jd,Md]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,kd,J]}],"list-image":[{"list-image":[`none`,J]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...M(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,kd,Ad]}],"underline-offset":[{"underline-offset":[`auto`,kd,J]}],"text-decoration-color":[{decoration:[e]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:O()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...j(),Rd]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,Ld]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Bd]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...M(),`hidden`]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:M()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[``,...M()]}],"outline-offset":[{"outline-offset":[kd,J]}],"outline-w":[{outline:[kd,Ad]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[kd,Ad]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,Fd,Vd]}],"shadow-color":[{shadow:[Hd]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...ee(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,Fd,J]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,J]}],duration:[{duration:I()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,J]}],delay:[{delay:I()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,J]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Nd,J]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,J]}],accent:[{accent:[`auto`,e]}],appearance:[{appearance:[`none`,`auto`]}],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`,J]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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`,J]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[kd,Ad,Md]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]}}});function Y(...e){return Jd(ed(e))}function Yd({delayDuration:e=0,...t}){return(0,z.jsx)(Qu,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}var Xd=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Zd=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Qd={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},$d=(0,v.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,v.createElement)(`svg`,{ref:c,...Qd,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Zd(`lucide`,i),...s},[...o.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(a)?a:[a]])),X=(e,t)=>{let n=(0,v.forwardRef)(({className:n,...r},i)=>(0,v.createElement)($d,{ref:i,iconNode:t,className:Zd(`lucide-${Xd(e)}`,n),...r}));return n.displayName=`${e}`,n},ef=X(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),tf=X(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),nf=X(`Bell`,[[`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`}]]),rf=X(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),af=X(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),of=X(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),sf=X(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),cf=X(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),lf=X(`CircleAlert`,[[`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`}]]),uf=X(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),df=X(`CircleHelp`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ff=X(`CircleSlash`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]),pf=X(`CircleX`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),mf=X(`Circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),hf=X(`Download`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),gf=X(`EllipsisVertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),_f=X(`Flag`,[[`path`,{d:`M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z`,key:`i9b6wo`}],[`line`,{x1:`4`,x2:`4`,y1:`22`,y2:`15`,key:`1cm3nv`}]]),vf=X(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),yf=X(`House`,[[`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-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`1d0kgt`}]]),bf=X(`Inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),xf=X(`Keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),Sf=X(`LayoutGrid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),Cf=X(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),wf=X(`Loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),Tf=X(`MessagesSquare`,[[`path`,{d:`M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z`,key:`p1xzt8`}],[`path`,{d:`M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1`,key:`1cx29u`}]]),Ef=X(`Network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Df=X(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Of=X(`RefreshCw`,[[`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`}]]),kf=X(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),Af=X(`Settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),jf=X(`ShieldCheck`,[[`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`}]]),Mf=X(`TriangleAlert`,[[`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`}]]),Nf=X(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function Pf(){let e=new Map;return{run(t,n){let r=e.get(t);if(r!==void 0)return r;let i=n().finally(()=>{e.get(t)===i&&e.delete(t)});return e.set(t,i),i},get pending(){return e.size}}}var Ff=Pf(),If=`crtr:relay-token`;function Lf(){try{let e=window.localStorage.getItem(If);return e!==null&&e!==``?e:void 0}catch{return}}function Rf(){let e;try{let t=new URLSearchParams(window.location.search).get(`token`);e=t!==null&&t!==``?t:void 0}catch{e=void 0}if(e!==void 0){try{window.localStorage.setItem(If,e)}catch{}return e}return Lf()}var zf=Rf();async function Bf(e,t){try{let n={"content-type":`application/json`};zf!==void 0&&(n.authorization=`Bearer ${zf}`);let r=await fetch(`/__crtr/source`,{method:`POST`,headers:n,body:JSON.stringify(e),...t===void 0?{}:{signal:t}});return r.ok?await r.json():{ok:!1,stdout:``,stderr:`bridge ${r.status} ${r.statusText}`}}catch(e){return t?.aborted===!0||e instanceof DOMException&&e.name===`AbortError`?{ok:!1,stdout:``,stderr:`aborted`}:{ok:!1,stdout:``,stderr:e instanceof Error?e.message:String(e)}}}async function Vf(e,t,n){return Bf({kind:`exec`,bin:`crtr`,args:e,...t===void 0?{}:{stdin:t}},n)}var Hf=class extends Error{code;constructor(e,t){super(t),this.name=`CommandError`,this.code=e}};function Uf(e){let t=e.stdout.trim();if(t===``)return null;try{let e=JSON.parse(t);if(e&&typeof e==`object`&&typeof e.error==`string`&&typeof e.message==`string`)return{code:e.error,message:e.message}}catch{}return null}async function Wf(e,t,n){let r=await Vf(e,t,n);if(!r.ok)throw new Hf(`bridge`,r.stderr||`bridge request failed`);let i=Uf(r);if(i!==null)throw new Hf(i.code,i.message);if(r.exitCode!==void 0&&r.exitCode!==0){let t=r.stderr.trim()===``?r.stdout.trim():r.stderr;throw new Hf(`bridge`,t===``?`crtr ${e.join(` `)} failed (${r.exitCode})`:t)}if(r.stdout.trim()!==``)try{return JSON.parse(r.stdout)}catch(e){throw new Hf(`bridge`,e instanceof Error?e.message:String(e))}}function Gf(){return Ff.run(`canvas:snapshot`,()=>Wf([`canvas`,`snapshot`,`--json`]))}function Kf(e){return Ff.run(`node:inspect:${e}`,()=>Wf([`node`,`inspect`,`show`,e,`--json`]).then(e=>e.node))}function qf(e){return Ff.run(`node:snapshot:${e}`,()=>Wf([`node`,`inspect`,`snapshot`,e,`--json`]))}function Jf(e){let t=[`node`,`new`,`--kind`,e.kind];return e.mode&&t.push(`--mode`,e.mode),e.root&&t.push(`--root`),e.cwd?.trim()&&t.push(`--cwd`,e.cwd.trim()),e.name?.trim()&&t.push(`--name`,e.name.trim()),e.model?.trim()&&t.push(`--model`,e.model.trim()),e.parent?.trim()&&t.push(`--parent`,e.parent.trim()),t.push(`--json`),Wf(t,e.prompt)}function Yf(e,t){let n=[`node`,`msg`,`--to`,e];return t.tier?.trim()&&n.push(`--tier`,t.tier.trim()),n.push(`--json`),Wf(n,t.body)}function Xf(e,t={}){let n=[`node`,`lifecycle`,`revive`,e];return t.fresh&&n.push(`--fresh`),n.push(`--json`),Wf(n)}function Zf(e){return Wf([`node`,`lifecycle`,`close`,`--node`,e,`--json`])}async function Qf(e,t){let n=await Bf({kind:`file`,path:t});if(!n.ok)throw new Hf(`bridge`,n.stderr||`failed to read ${t}`);return{path:t,content:n.stdout,truncated:!1}}var $f=new Set,ep=!1;function tp(){if(ep)return;ep=!0;let e;try{let t=new URL(`/__crtr/events`,window.location.href);zf!==void 0&&t.searchParams.set(`token`,zf),e=new EventSource(t.toString())}catch{ep=!1;return}e.onmessage=e=>{let t;try{t=JSON.parse(e.data).kind}catch{return}if(t!==void 0)for(let e of $f)e.kinds.includes(t)&&e.refresh()}}function np(e,t){let n=(0,v.useRef)(t);n.current=t,(0,v.useEffect)(()=>{tp();let t={kinds:e,refresh:()=>n.current()};return $f.add(t),()=>{$f.delete(t)}},[e.join(`,`)])}var rp=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},ip=(e=>e?rp(e):rp),ap=e=>e;function op(e,t=ap){let n=v.useSyncExternalStore(e.subscribe,v.useCallback(()=>t(e.getState()),[e,t]),v.useCallback(()=>t(e.getInitialState()),[e,t]));return v.useDebugValue(n),n}var sp=e=>{let t=ip(e),n=e=>op(t,e);return Object.assign(n,t),n},cp=(e=>e?sp(e):sp),lp=cp(e=>({reachable:!0,setReachable:t=>e({reachable:t})})),up=1,dp=`crtr.web.roster.v1`;function fp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function pp(e){return typeof e==`string`}function mp(e){return typeof e==`number`}function hp(e){return fp(e)?pp(e.node_id)&&pp(e.name)&&pp(e.kind)&&(e.mode===`base`||e.mode===`orchestrator`)&&(e.lifecycle===`terminal`||e.lifecycle===`resident`)&&(e.status===`active`||e.status===`idle`||e.status===`done`||e.status===`dead`||e.status===`canceled`)&&pp(e.cwd)&&(e.parent===null||pp(e.parent))&&pp(e.created)&&(e.host_kind===`broker`||e.host_kind===`tmux`)&&typeof e.enterable==`boolean`&&mp(e.attention_count)&&(e.cycles===void 0||mp(e.cycles))&&(e.last_activity===void 0||pp(e.last_activity)):!1}function gp(e){return fp(e)?e.schemaVersion===up&&pp(e.generatedAt)&&mp(e.cachedAt)&&Array.isArray(e.nodes)&&e.nodes.every(hp):!1}function _p(){try{let e=globalThis.localStorage?.getItem(dp);if(e==null)return null;let t=JSON.parse(e);return gp(t)?t:null}catch{return null}}function vp(e,t){let n={schemaVersion:up,nodes:e,generatedAt:t,cachedAt:Date.now()};try{globalThis.localStorage?.setItem(dp,JSON.stringify(n))}catch{}}var yp=3e4,bp=new class{state;listeners=new Set;started=!1;timer=null;constructor(){let e=_p();this.state=e?{nodes:e.nodes,generatedAt:e.generatedAt,loading:!1}:{nodes:[],generatedAt:null,loading:!0}}subscribe=e=>(this.ensureStarted(),this.listeners.add(e),()=>{this.listeners.delete(e)});getState=()=>this.state;refetch=()=>{this.load()};ensureStarted(){if(this.started)return;this.started=!0,this.load(),this.timer=setInterval(()=>void this.load(),yp);let e=()=>{document.visibilityState===`visible`&&this.load()};document.addEventListener(`visibilitychange`,e),window.addEventListener(`focus`,e)}setState(e){this.state=e;for(let e of this.listeners)e()}async load(){try{let e=await Gf();this.setState({nodes:e.nodes,generatedAt:e.generated_at,loading:!1}),vp(e.nodes,e.generated_at),lp.getState().setReachable(!0)}catch{this.state.loading&&this.setState({...this.state,loading:!1}),lp.getState().setReachable(!1)}}};function xp(){let e=(0,v.useSyncExternalStore)(bp.subscribe,bp.getState);return np([`nodes`,`inbox`],bp.refetch),e}var Sp=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Cp=ed,wp=(e,t)=>n=>{if(t?.variants==null)return Cp(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Sp(t)||Sp(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Cp(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Tp=wp(`btn justify-center transition-all outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`primary`,destructive:`danger`,outline:``,secondary:``,ghost:`border-transparent`,link:`border-transparent bg-transparent text-primary underline-offset-4 hover:underline hover:bg-transparent`},size:{default:``,xs:`sm gap-1 text-xs [&_svg:not([class*='size-'])]:size-3`,sm:`sm`,lg:`px-6 py-2.5`,icon:`p-0 size-9`,"icon-xs":`p-0 size-6 [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`p-0 size-8`,"icon-lg":`p-0 size-10`}},defaultVariants:{variant:`default`,size:`default`}});function Z({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,z.jsx)(r?er:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:Y(Tp({variant:t,size:n,className:e})),...i})}function Ep({...e}){return(0,z.jsx)(Ka,{"data-slot":`dialog`,...e})}function Dp({...e}){return(0,z.jsx)(Qa,{"data-slot":`dialog-portal`,...e})}function Op({className:e,...t}){return(0,z.jsx)(eo,{"data-slot":`dialog-overlay`,className:Y(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function kp({className:e,children:t,showCloseButton:n=!0,...r}){return(0,z.jsxs)(Dp,{"data-slot":`dialog-portal`,children:[(0,z.jsx)(Op,{}),(0,z.jsxs)(io,{"data-slot":`dialog-content`,className:Y(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...r,children:[t,n&&(0,z.jsxs)(po,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,z.jsx)(Nf,{}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Ap({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`dialog-header`,className:Y(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function jp({className:e,showCloseButton:t=!1,children:n,...r}){return(0,z.jsxs)(`div`,{"data-slot":`dialog-footer`,className:Y(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,z.jsx)(po,{asChild:!0,children:(0,z.jsx)(Z,{variant:`outline`,children:`Close`})})]})}function Mp({className:e,...t}){return(0,z.jsx)(lo,{"data-slot":`dialog-title`,className:Y(`text-lg leading-none font-semibold`,e),...t})}function Np({className:e,...t}){return(0,z.jsx)(H,{"data-slot":`dialog-description`,className:Y(`text-sm text-muted-foreground`,e),...t})}function Pp({className:e,type:t,...n}){return(0,z.jsx)(`input`,{type:t,"data-slot":`input`,className:Y(`h-9 w-full min-w-0 rounded-md border border-[var(--line)] bg-[oklch(0_0_0/0.25)] px-3 py-1 text-sm text-[var(--ink)] transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-[var(--dim)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,`focus-visible:border-[var(--line2)] focus-visible:ring-[3px] focus-visible:ring-ring/40`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20`,e),...n})}function Fp({className:e,...t}){return(0,z.jsx)(tl,{"data-slot":`label`,className:Y(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function Ip({...e}){return(0,z.jsx)(vl,{"data-slot":`select`,...e})}function Lp({...e}){return(0,z.jsx)(Sl,{"data-slot":`select-value`,...e})}function Rp({className:e,size:t=`default`,children:n,...r}){return(0,z.jsxs)(bl,{"data-slot":`select-trigger`,"data-size":t,className:Y(`flex w-fit items-center justify-between gap-2 rounded-md border border-[var(--line)] bg-[oklch(0.92_0.008_80/0.02)] px-3 py-2 font-mono text-sm text-[var(--ink2)] whitespace-nowrap transition-[color,box-shadow] outline-none cursor-pointer focus-visible:border-[var(--line2)] focus-visible:ring-[3px] focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-[var(--mut)] data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-[var(--mut)]`,e),...r,children:[n,(0,z.jsx)(wl,{asChild:!0,children:(0,z.jsx)(af,{className:`size-4 opacity-50`})})]})}function zp({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,z.jsx)(Ol,{children:(0,z.jsxs)(Al,{"data-slot":`select-content`,className:Y(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,z.jsx)(Vp,{}),(0,z.jsx)(G,{className:Y(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,z.jsx)(Hp,{})]})})}function Bp({className:e,children:t,...n}){return(0,z.jsxs)(Zl,{"data-slot":`select-item`,className:Y(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,z.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,z.jsx)(tu,{children:(0,z.jsx)(rf,{className:`size-4`})})}),(0,z.jsx)($l,{children:t})]})}function Vp({className:e,...t}){return(0,z.jsx)(ru,{"data-slot":`select-scroll-up-button`,className:Y(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,z.jsx)(cf,{className:`size-4`})})}function Hp({className:e,...t}){return(0,z.jsx)(au,{"data-slot":`select-scroll-down-button`,className:Y(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,z.jsx)(af,{className:`size-4`})})}function Up({className:e,...t}){return(0,z.jsx)(`textarea`,{"data-slot":`textarea`,className:Y(`flex field-sizing-content min-h-16 w-full rounded-md border border-[var(--line)] bg-[oklch(0_0_0/0.3)] px-3 py-2 text-sm text-[var(--ink)] transition-[color,box-shadow] outline-none placeholder:text-[var(--dim)] focus-visible:border-[var(--line2)] focus-visible:ring-[3px] focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20`,e),...t})}var Wp=wp(`badge w-fit max-w-full overflow-hidden text-[var(--ink2)] whitespace-nowrap [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:``,secondary:`dead`,destructive:`blocked`,outline:``,ghost:`border-transparent`,link:`border-transparent underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function Gp({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,z.jsx)(n?er:`span`,{"data-slot":`badge`,"data-variant":t,className:Y(Wp({variant:t}),e),...r})}function Kp(e){return e instanceof Hf&&(e.code===`not_found`||e.code===`already_resolved`||e.code===`claimed`)}function qp(e){let t=e.indexOf(`/.crouter/interactions/`);return t>=0?e.slice(0,t):e}function Jp(e){if(e.trim()===``)return{title:``};let t=e.match(/^\s*#{1,6}\s+(.+?)\s*(?:\n|$)/);return t?{title:t[1],body:e.slice(t[0].length).trim()||void 0}:{title:e.trim(),body:e.trim()}}function Yp(e){switch(e){case`notify`:case`validation`:case`decision`:case`context`:case`error`:return e}throw Error(`Unknown deck kind: ${e}`)}function Xp(e){let{title:t,body:n}=Jp(e.prompt);return{id:e.id,title:t||e.id,body:n,kind:Yp(e.kind),options:e.options.map(e=>({id:e.id,label:e.label,...e.description===void 0?{}:{description:e.description}})),multiSelect:e.multiSelect,allowFreetext:e.allow_freetext}}function Zp(e){return{id:e.id,job_id:e.job_id,kind:Yp(e.kind),title:e.title,blocked_since:e.blocked_since,conversation_id:e.conversation_id,conversation_title:e.conversation_title,asking_node_id:e.asking_node_id,asking_node_name:e.asking_node_name,cwd:qp(e.dir),interaction_count:e.interaction_count}}function Qp(e,t){return{id:e.id,job_id:e.job_id??e.id,kind:Yp(e.kind),title:e.title,blocked_since:e.blocked_since,conversation_id:e.conversation_id,conversation_title:e.conversation_title,asking_node_id:e.asking_node_id,asking_node_name:e.asking_node_name,cwd:t,interaction_count:e.interaction_count,interactions:e.interactions.map(Xp)}}function $p(){return Ff.run(`human:list`,async()=>(await Wf([`human`,`list`,`--json`])).items.map(Zp))}async function em(e){let t=await Wf([`human`,`deck`,e,`--json`]),n=(await Kf(t.asking_node_id)).cwd;return Qp(t,n)}async function tm(e,t){let n=JSON.stringify({responses:t.responses}),r=await Wf([`human`,`resolve`,e,`--json`],n);if(r.resolved!==!0)throw new Hf(r.reason===`claimed`?`claimed`:`already_resolved`,r.reason===`claimed`?`That request is already being handled.`:`That request was already handled.`);return{resolved:!0,job_id:r.job_id??e,delivered:r.delivered??!0}}function nm(e){let t=0;for(let n of e)t+=Math.max(0,n.attention_count);return t}function rm(){let{nodes:e}=xp();return nm(e)}function im(){let[e,t]=(0,v.useState)([]),[n,r]=(0,v.useState)(!0),[i,a]=(0,v.useState)(0),o=(0,v.useCallback)(()=>a(e=>e+1),[]);return np([`inbox`,`nodes`],o),(0,v.useEffect)(()=>{let e=!1;return $p().then(n=>{e||(t(n),r(!1))}).catch(()=>{e||r(!1)}),()=>{e=!0}},[i]),{decks:e,loading:n,refetch:o}}function am(e){let{decks:t}=im();return t.filter(t=>t.conversation_id===e)}var om={notify:{icon:nf,label:`Update`},validation:{icon:jf,label:`Approval`},decision:{icon:vf,label:`Decision`},context:{icon:df,label:`Question`},error:{icon:Mf,label:`Problem`}};function sm(e){switch(e){case`notify`:return om.notify;case`validation`:return om.validation;case`decision`:return om.decision;case`context`:return om.context;case`error`:return om.error;default:return om.context}}function cm(e,t=Date.now()){let n=new Date(e).getTime();if(Number.isNaN(n))return``;let r=Math.max(0,Math.round((t-n)/1e3));if(r<60)return`${r}s`;let i=Math.round(r/60);if(i<60)return`${i}m`;let a=Math.round(i/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}var lm=1,um=cp(e=>({toasts:[],push:(t,n=`info`)=>{let r=lm++;e(e=>({toasts:[...e.toasts,{id:r,message:t,tone:n}]})),setTimeout(()=>e(e=>({toasts:e.toasts.filter(e=>e.id!==r)})),4e3)},dismiss:t=>e(e=>({toasts:e.toasts.filter(e=>e.id!==t)}))}));function dm(e,t=`info`){um.getState().push(e,t)}var fm=e=>({"--i":e});async function pm(e,t){let n=(await em(e)).interactions[0];await tm(e,{responses:[t===`ack`?{id:n.id}:{id:n.id,selectedOptionIds:[(t===`yes`?n.options.find(e=>e.id===`yes`)?.id??n.options[0]?.id:n.options.find(e=>e.id===`no`)?.id??n.options[1]?.id)??t]}]})}function mm(){let{decks:e,loading:t}=im(),n=(0,v.useMemo)(()=>[...e].sort((e,t)=>new Date(t.blocked_since).getTime()-new Date(e.blocked_since).getTime()),[e]);return t||n.length===0?null:(0,z.jsxs)(`section`,{className:`needs rv`,style:fm(3),children:[(0,z.jsxs)(`div`,{className:`needs-head`,children:[(0,z.jsx)(_f,{size:14,className:`flag`,"aria-hidden":!0}),(0,z.jsxs)(`span`,{className:`instlabel`,children:[`Needs you — `,n.length,` blocked`]}),(0,z.jsx)(`div`,{className:`rule`})]}),(0,z.jsx)(`div`,{className:`needs-grid`,children:n.map(e=>(0,z.jsx)(hm,{deck:e},e.id))})]})}function hm({deck:e}){let t=dt(),{refetch:n}=im(),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),l=sm(e.kind).label,u=cm(e.blocked_since);e.kind===`decision`&&a===null&&!s&&(async()=>{if(!(e.kind!==`decision`||s||a!==null)){c(!0);try{let t=(await em(e.job_id)).interactions[0]?.options??[];o(t.length<=3?t:[])}catch(e){Kp(e)?(o([]),n()):(console.error(`[needs-you] failed to load decision options:`,e),o([]))}finally{c(!1)}}})();let d=async t=>{if(!r){i(!0);try{await pm(e.job_id,t),dm(`Done — thanks!`,`success`),n()}catch(e){if(Kp(e)){dm(e instanceof Error?e.message:`That request was already handled.`),n();return}console.error(`[needs-you] resolve failed:`,e),dm(`Something went wrong — try again.`)}finally{i(!1)}}},f=async t=>{if(!r){i(!0);try{let r=(await em(e.job_id)).interactions[0];await tm(e.job_id,{responses:[{id:r.id,selectedOptionIds:[t]}]}),dm(`Done — thanks!`,`success`),n()}catch(e){if(Kp(e)){dm(e instanceof Error?e.message:`That request was already handled.`),n();return}console.error(`[needs-you] decision option resolve failed:`,e),dm(`Something went wrong — try again.`)}finally{i(!1)}}},p=e.kind===`decision`&&a!==null&&a.length>0;return(0,z.jsxs)(`div`,{className:`deck`,children:[(0,z.jsxs)(`div`,{className:`deck-meta`,children:[(0,z.jsx)(`span`,{className:`deck-kind`,children:l}),(0,z.jsx)(`span`,{className:`from`,children:e.asking_node_name}),(0,z.jsxs)(`span`,{className:`age`,children:[`blocked `,u]})]}),(0,z.jsx)(`p`,{className:`deck-q line-clamp-2`,children:e.title}),(0,z.jsxs)(`div`,{className:`deck-actions`,children:[e.kind===`notify`&&(0,z.jsx)(Z,{type:`button`,variant:`outline`,size:`sm`,disabled:r,onClick:()=>void d(`ack`),children:`Got it`}),e.kind===`validation`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Z,{type:`button`,size:`sm`,disabled:r,onClick:()=>void d(`yes`),children:`Approve`}),(0,z.jsx)(Z,{type:`button`,variant:`outline`,size:`sm`,disabled:r,onClick:()=>void d(`no`),children:`Reject`})]}),p&&a.map(e=>(0,z.jsx)(Z,{type:`button`,variant:`outline`,size:`sm`,disabled:r,onClick:()=>void f(e.id),children:e.label},e.id)),(0,z.jsxs)(Z,{type:`button`,variant:`ghost`,size:`sm`,disabled:r,onClick:()=>t(`/inbox/${encodeURIComponent(e.job_id)}`),style:{marginLeft:`auto`,color:`var(--dim)`},children:[`open thread `,(0,z.jsx)(tf,{"aria-hidden":!0})]})]})]})}var gm=e=>({"--i":e}),_m=`hosted in a tmux pane — open it in your terminal`;function vm(e){let t=new Map;for(let n of e)t.set(n.node_id,{node:n,children:[]});let n=[];for(let e of t.values()){let r=e.node.parent,i=r?t.get(r):void 0;i?i.children.push(e):n.push(e)}return n}var ym=[`active`,`idle`,`done`,`dead`,`canceled`],bm={query:``,status:`all`,blockedOnly:!1};function xm(e){return e.query.trim()!==``||e.status!==`all`||e.blockedOnly}function Sm(e,t){if(t.status!==`all`&&e.status!==t.status||t.blockedOnly&&e.attention_count<=0)return!1;let n=t.query.trim().toLowerCase();return!(n&&!`${e.name} ${e.kind} ${e.mode} ${e.cwd} ${e.node_id} ${e.status}`.toLowerCase().includes(n))}function Cm(e,t){if(!xm(t))return e;let n=new Map(e.map(e=>[e.node_id,e])),r=new Set;for(let i of e){if(!Sm(i,t))continue;let e=i;for(;e&&!r.has(e.node_id);)r.add(e.node_id),e=e.parent?n.get(e.parent):void 0}return e.filter(e=>r.has(e.node_id))}var wm=new Set([`dead`,`canceled`]);function Tm(e){return wm.has(e.node.status)&&e.children.every(Tm)}function Em(e){return 1+e.children.reduce((e,t)=>e+Em(t),0)}var Dm=3,Om={active:mf,idle:mf,done:uf,dead:ff,canceled:pf};function km(e,t){return t?lf:Om[e]??mf}function Am(e){return e.toLocaleTimeString(`en-GB`,{hour12:!1})}function jm(){let[e,t]=(0,v.useState)(()=>Am(new Date));return(0,v.useEffect)(()=>{let e=setInterval(()=>t(Am(new Date)),1e3);return()=>clearInterval(e)},[]),e}function Mm(){let{nodes:e}=xp(),[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)(0),[a,o]=(0,v.useState)(bm),s=(0,v.useRef)(null),c=jm(),l=e.filter(e=>e.status===`active`).length,u=(0,v.useMemo)(()=>vm(Cm(e,a)),[e,a]);return(0,v.useEffect)(()=>{let e=e=>{if(e.key!==`/`||e.metaKey||e.ctrlKey||e.altKey)return;let t=document.activeElement;t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable||(e.preventDefault(),s.current?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,z.jsxs)(`div`,{className:`in relative z-[1] h-full min-h-0 overflow-auto`,style:{padding:`34px 44px 44px`},children:[(0,z.jsxs)(`div`,{className:`rv flex items-baseline gap-4`,style:gm(1),children:[(0,z.jsx)(`h1`,{className:`text-2xl`,style:{fontWeight:420,letterSpacing:`-0.01em`,fontVariationSettings:`"opsz" 60`,color:`var(--ink)`},children:`Canvas`}),(0,z.jsxs)(`span`,{className:`text-sm`,style:{color:`var(--mut)`},children:[e.length,` `,e.length===1?`node`:`nodes`,l>0&&` · ${l} active`]}),(0,z.jsxs)(`div`,{className:`font-inst text-xs flex items-center gap-2`,style:{marginLeft:`auto`,color:`var(--ink2)`,letterSpacing:`0.1em`},children:[(0,z.jsx)(`span`,{style:{width:`8px`,height:`8px`,borderRadius:`50%`,background:`var(--act)`,animation:`pulse 2.4s ease-out infinite`}}),(0,z.jsx)(`span`,{children:c})]})]}),(0,z.jsxs)(`div`,{className:`rv flex items-center gap-2.5`,style:{margin:`20px 0 22px`,...gm(2)},children:[(0,z.jsxs)(`div`,{className:`search`,children:[(0,z.jsx)(kf,{size:14,className:`opacity-70`,"aria-hidden":!0}),(0,z.jsx)(`input`,{ref:s,value:a.query,onChange:e=>o(t=>({...t,query:e.currentTarget.value})),onKeyDown:e=>{e.key===`Escape`&&(o(e=>({...e,query:``})),e.currentTarget.blur())},placeholder:`Search name, kind, mode, cwd, id…`,"aria-label":`Search nodes`,className:`min-w-0 flex-1 border-0 bg-transparent p-0 text-sm outline-none`,style:{color:`var(--ink)`}}),(0,z.jsx)(`span`,{className:`kbd`,children:`/`})]}),(0,z.jsxs)(`label`,{className:`selectish`,children:[(0,z.jsxs)(`select`,{value:a.status,onChange:e=>o(t=>({...t,status:e.currentTarget.value})),"aria-label":`Filter by status`,className:`cursor-pointer appearance-none border-0 bg-transparent text-sm outline-none`,style:{color:`var(--ink2)`},children:[(0,z.jsx)(`option`,{value:`all`,children:`all statuses`}),ym.map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))]}),(0,z.jsx)(`span`,{className:`car`,children:`▾`})]}),(0,z.jsxs)(`label`,{className:`checkish select-none`,children:[(0,z.jsx)(`span`,{className:`box`,style:a.blockedOnly?{background:`var(--blk)`,borderColor:`var(--blk)`}:void 0}),`blocked`,(0,z.jsx)(`input`,{type:`checkbox`,checked:a.blockedOnly,onChange:e=>o(t=>({...t,blockedOnly:e.currentTarget.checked})),className:`sr-only`})]}),(0,z.jsx)(`button`,{type:`button`,className:`btn primary`,style:{marginLeft:`auto`},onClick:()=>{i(e=>e+1),n(!0)},children:`+ Spawn a node`})]}),(0,z.jsx)(mm,{}),(0,z.jsxs)(`div`,{className:`panel rv`,style:{padding:`6px 0`,...gm(4)},children:[(0,z.jsxs)(`div`,{className:`flex items-center`,style:{padding:`10px 18px 9px`,borderBottom:`1px solid var(--line)`},children:[(0,z.jsx)(`span`,{className:`instlabel`,style:{color:`var(--dim)`},children:`Node forest`}),(0,z.jsx)(`span`,{className:`font-inst text-xs`,style:{marginLeft:`auto`,color:`var(--dim)`,letterSpacing:`0.1em`},children:`sorted · activity`})]}),(0,z.jsx)(`div`,{className:`tree`,children:e.length===0?(0,z.jsx)(`p`,{className:`px-3 py-2 text-sm italic`,style:{color:`var(--mut)`},children:`No nodes on the canvas yet.`}):u.length===0?(0,z.jsx)(`p`,{className:`px-3 py-2 text-sm italic`,style:{color:`var(--mut)`},children:`No matching nodes.`}):u.map(e=>(0,z.jsx)(Nm,{node:e},e.node.node_id))})]}),(0,z.jsx)(Fm,{open:t,onClose:()=>n(!1)},r)]})}function Nm({node:e}){let t=dt(),[n,r]=(0,v.useState)(!1),i=e.node,a=i.attention_count>0,o=wm.has(i.status),s=a?`blocked`:i.status,c=e.children.filter(e=>!Tm(e)),l=e.children.filter(e=>Tm(e)),u=l.reduce((e,t)=>e+Em(t),0),d=u>=Dm,f=d?c:e.children,p=()=>{i.enterable&&t(`/nodes/${encodeURIComponent(i.node_id)}`)};return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:Y(`node-row s-${s}`,o&&`dimmed`),onClick:p,role:i.enterable?`button`:void 0,tabIndex:i.enterable?0:void 0,style:i.enterable?void 0:{cursor:`default`},onKeyDown:e=>{i.enterable&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),p())},children:[(0,z.jsxs)(`div`,{className:`node-id`,children:[(0,z.jsxs)(`div`,{className:`node-l1`,children:[(0,z.jsx)(`span`,{className:`node-name`,children:i.name}),(0,z.jsxs)(`span`,{className:`node-kind`,children:[i.kind,` · `,i.mode]})]}),(0,z.jsxs)(`div`,{className:`node-l2`,children:[(0,z.jsx)(`span`,{className:`node-cwd`,title:i.cwd,children:i.cwd}),i.lifecycle&&(0,z.jsx)(`span`,{className:`node-life`,children:i.lifecycle}),!i.enterable&&(0,z.jsx)(`span`,{className:`node-note`,children:_m})]})]}),(0,z.jsxs)(`div`,{className:`node-right`,children:[a&&(0,z.jsxs)(`span`,{className:`waitflag`,children:[(0,z.jsx)(_f,{size:14,"aria-hidden":!0}),` `,i.attention_count,` waiting on human`]}),(0,z.jsx)(Pm,{status:i.status,blocked:a})]})]}),(f.length>0||d&&u>0)&&(0,z.jsxs)(`div`,{className:`kids`,children:[f.map(e=>(0,z.jsx)(Nm,{node:e},e.node.node_id)),d&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),className:`flex items-center gap-1.5 px-4 py-2 text-xs transition-colors`,style:{color:`var(--dim)`},children:[(0,z.jsx)(sf,{size:14,"aria-hidden":!0,style:{transform:n?`rotate(90deg)`:`none`,transition:`transform 0.15s ease`}}),n?`Hide ${u} closed`:`Show ${u} closed`]}),n&&l.map(e=>(0,z.jsx)(Nm,{node:e},e.node.node_id))]})]})]})}function Pm({status:e,blocked:t}){let n=km(e,t);return(0,z.jsxs)(Gp,{variant:`outline`,className:t?`blocked`:e,children:[(0,z.jsx)(n,{"aria-hidden":!0}),e]})}function Fm({open:e,onClose:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(`developer`),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(``),[y,b]=(0,v.useState)(!1),[x,S]=(0,v.useState)(null);return(0,z.jsx)(Ep,{open:e,onOpenChange:e=>!e&&t(),children:(0,z.jsxs)(kp,{className:`max-w-md overflow-y-auto max-h-[90dvh]`,children:[(0,z.jsx)(Ap,{children:(0,z.jsx)(Mp,{children:`Spawn a node`})}),(0,z.jsxs)(`form`,{id:`spawn-form`,onSubmit:async e=>{if(e.preventDefault(),!n.trim()||!i.trim()){S(`prompt and kind are required`);return}b(!0),S(null);let r={prompt:n.trim(),kind:i.trim(),...o?{mode:o}:{},...c?{root:!0}:{},...u.trim()?{cwd:u.trim()}:{},...f.trim()?{name:f.trim()}:{},...m.trim()?{model:m.trim()}:{},...g.trim()?{parent:g.trim()}:{}};try{await Jf(r),t()}catch(e){console.error(`[spawn] failed:`,e),S(e instanceof Hf?`${e.code}: ${e.message}`:String(e))}finally{b(!1)}},className:`flex flex-col gap-3.5`,children:[(0,z.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,z.jsx)(Fp,{htmlFor:`spawn-prompt`,children:`Prompt`}),(0,z.jsx)(Up,{id:`spawn-prompt`,value:n,onChange:e=>r(e.currentTarget.value),rows:4,required:!0,className:`resize-none`})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,z.jsx)(Fp,{htmlFor:`spawn-kind`,children:`Kind`}),(0,z.jsx)(Pp,{id:`spawn-kind`,value:i,onChange:e=>a(e.currentTarget.value),required:!0})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,z.jsx)(Fp,{htmlFor:`spawn-mode`,children:`Mode`}),(0,z.jsxs)(Ip,{value:o===``?`__none__`:o,onValueChange:e=>s(e===`__none__`?``:e),children:[(0,z.jsx)(Rp,{id:`spawn-mode`,className:`w-full`,children:(0,z.jsx)(Lp,{})}),(0,z.jsxs)(zp,{children:[(0,z.jsx)(Bp,{value:`__none__`,children:`(default)`}),(0,z.jsx)(Bp,{value:`base`,children:`base`}),(0,z.jsx)(Bp,{value:`orchestrator`,children:`orchestrator`})]})]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`input`,{type:`checkbox`,id:`spawn-root`,checked:c,onChange:e=>l(e.currentTarget.checked),className:`size-4 rounded-none border border-input accent-primary`}),(0,z.jsx)(Fp,{htmlFor:`spawn-root`,className:`cursor-pointer`,children:`Resident root node`})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,z.jsx)(Fp,{htmlFor:`spawn-cwd`,children:`cwd`}),(0,z.jsx)(Pp,{id:`spawn-cwd`,value:u,onChange:e=>d(e.currentTarget.value),placeholder:`(inherit)`,className:`font-mono text-sm`})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,z.jsx)(Fp,{htmlFor:`spawn-name`,children:`Name`}),(0,z.jsx)(Pp,{id:`spawn-name`,value:f,onChange:e=>p(e.currentTarget.value),placeholder:`(auto)`})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,z.jsx)(Fp,{htmlFor:`spawn-model`,children:`Model`}),(0,z.jsx)(Pp,{id:`spawn-model`,value:m,onChange:e=>h(e.currentTarget.value),placeholder:`(default)`})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,z.jsx)(Fp,{htmlFor:`spawn-parent`,children:`Parent node id`}),(0,z.jsx)(Pp,{id:`spawn-parent`,value:g,onChange:e=>_(e.currentTarget.value),placeholder:`(this canvas root)`,className:`font-mono text-sm`})]}),x&&(0,z.jsx)(`p`,{className:`text-sm text-destructive`,children:x})]}),(0,z.jsxs)(jp,{children:[(0,z.jsx)(Z,{type:`button`,variant:`outline`,onClick:t,disabled:y,children:`Cancel`}),(0,z.jsx)(Z,{type:`submit`,form:`spawn-form`,disabled:y,children:y?`Spawning…`:`Spawn`})]})]})})}function Im(e){if(!e)return``;let t=e.replace(/\/+$/,``).split(`/`);return t[t.length-1]??``}function Lm(e){let t=e.name?.trim();if(t&&t!==e.kind)return t;let n=Im(e.cwd);return n?`${e.kind} · ${n}`:e.kind}function Rm(e){return e.parent===null&&e.host_kind===`broker`}function zm(e){let t=new Map;for(let n of e){if(n.parent===null)continue;let e=t.get(n.parent);e?e.push(n):t.set(n.parent,[n])}return t}function Bm(e,t){let n=[],r=new Set,i=[e];for(;i.length>0;){let e=i.pop();if(r.has(e.node_id))continue;r.add(e.node_id),n.push(e);let a=t.get(e.node_id);if(a)for(let e of a)i.push(e)}return n}function Vm(e){return e===`done`||e===`dead`||e===`canceled`}function Hm(e){return e.attention_count>0?`blocked`:e.status}function Um(e,t,n){return t>0?`needs-you`:e.status===`active`||n>0?`active`:Vm(e.status)?`done`:`idle`}function Wm(e){switch(e){case`needs-you`:return 0;case`active`:return 1;case`idle`:return 2;case`done`:return 3}}function Gm(e){let t=zm(e),n=[];for(let r of e){if(!Rm(r))continue;let e=Bm(r,t),i=0,a=0;for(let t of e)i+=Math.max(0,t.attention_count),t.node_id!==r.node_id&&t.status===`active`&&(a+=1);n.push({id:r.node_id,title:Lm(r),state:Um(r,i,a),attention:i,activeChildren:a,nodeCount:e.length,...r.cycles===void 0?{}:{cycles:r.cycles},lastActivity:r.last_activity??r.created})}return n.sort((e,t)=>{let n=Wm(e.state)-Wm(t.state);return n===0?t.lastActivity.localeCompare(e.lastActivity):n}),n}function Km(e){switch(e.state){case`needs-you`:return e.attention>1?`${e.attention} things need your input`:`Needs your input`;case`active`:return e.activeChildren>0?`Working — ${e.activeChildren} ${e.activeChildren===1?`task`:`tasks`} in progress`:`Working…`;case`done`:return`Finished`;case`idle`:return`Idle`}}function qm(e,t,n){if(e.key===`Enter`&&!e.shiftKey){if(e.altKey){e.preventDefault();let n=e.currentTarget,r=n.selectionStart??n.value.length,i=n.selectionEnd??r,a=`${n.value.slice(0,r)}\n${n.value.slice(i)}`,o=r+1;t(a),requestAnimationFrame(()=>{n.selectionStart=o,n.selectionEnd=o});return}e.metaKey||e.ctrlKey||(e.preventDefault(),n())}}var Jm=[`Research a topic for me`,`Help me write something`,`Review my code`,`Plan a project`];function Ym(){let{nodes:e,loading:t}=xp(),n=lp(e=>e.reachable),r=(0,v.useMemo)(()=>Gm(e),[e]),[i,a]=(0,v.useState)(!1),[o]=zn();(0,v.useEffect)(()=>{o.get(`new`)!==null&&a(!0)},[o]);let s=!t&&r.length===0;return(0,z.jsxs)(`div`,{className:`mx-auto flex h-full min-h-0 max-w-3xl flex-col px-6 py-8`,children:[(0,z.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-3`,children:[(0,z.jsx)(`h1`,{className:`text-3xl`,style:{fontWeight:460,letterSpacing:`-0.01em`,color:`var(--ink)`},children:`Conversations`}),!s&&!i&&(0,z.jsx)(Z,{size:`lg`,onClick:()=>a(!0),children:`+ New chat`})]}),!n&&(0,z.jsx)(`div`,{className:`mb-4 rounded-lg border px-4 py-2.5 text-sm`,style:{borderColor:`rgba(255,94,54,.3)`,background:`var(--blk-dim)`,color:`var(--ink2)`},children:`Couldn't reach your agents — retrying…`}),(i||s)&&(0,z.jsx)(Xm,{firstRun:s,onCancel:s?void 0:()=>a(!1)}),(0,z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:t?(0,z.jsx)(eh,{}):(0,z.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:r.map(e=>(0,z.jsx)(Zm,{conversation:e},e.id))})})]})}function Xm({firstRun:e,onCancel:t}){let n=dt(),[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(null),l=async()=>{let e=r.trim();if(!(!e||a)){o(!0),c(null);try{let t=await Jf({prompt:e,kind:`general`,mode:`base`,root:!0});n(`/c/${encodeURIComponent(t.node_id)}`)}catch(e){c(e instanceof Hf?e.message:String(e)),o(!1)}}};return(0,z.jsxs)(`div`,{className:`panel mb-6 p-5`,children:[e&&(0,z.jsx)(`p`,{className:`mb-3 text-base`,style:{fontStyle:`italic`,color:`var(--ink2)`},children:`Start a conversation with an agent.`}),(0,z.jsx)(Up,{autoFocus:!0,value:r,onChange:e=>i(e.currentTarget.value),onKeyDown:e=>{qm(e,i,()=>void l())},rows:3,disabled:a,placeholder:`What do you want help with?`,className:`resize-none border-0 bg-transparent px-0 text-base shadow-none focus-visible:ring-0`}),(0,z.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:Jm.map(e=>(0,z.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>i(e),className:`rounded-full border border-border px-3 py-1 text-xs text-muted-foreground transition-colors hover:border-[color:var(--line2)] hover:text-foreground`,children:e},e))}),s&&(0,z.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,children:s}),(0,z.jsxs)(`div`,{className:`mt-4 flex items-center justify-end gap-2`,children:[t&&(0,z.jsx)(Z,{variant:`ghost`,onClick:t,disabled:a,children:`Cancel`}),(0,z.jsx)(Z,{onClick:()=>void l(),disabled:a||!r.trim(),children:a?`Starting…`:`Start chat`})]})]})}function Zm({conversation:e}){let t=dt();return(0,z.jsx)(`li`,{className:`list-none`,children:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>t(`/c/${encodeURIComponent(e.id)}`),className:`panel flex w-full items-center gap-4 px-4 py-3.5 text-left transition-colors hover:bg-[color-mix(in_oklch,var(--ink)_3%,transparent)] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)($m,{state:e.state}),(0,z.jsx)(`span`,{className:`truncate text-sm`,style:{fontWeight:500,color:`var(--ink)`},children:e.title})]}),(0,z.jsx)(`p`,{className:`mt-0.5 truncate text-sm`,style:{color:`var(--mut)`},children:Km(e)})]}),(0,z.jsxs)(`div`,{className:`font-inst flex shrink-0 items-center gap-3 text-xs`,style:{letterSpacing:`0.04em`,color:`var(--mut)`},children:[e.cycles!==void 0&&(0,z.jsxs)(`span`,{title:`cycles`,children:[`⟳ `,e.cycles]}),(0,z.jsxs)(`span`,{title:`nodes in this conversation`,children:[`◦ `,e.nodeCount,` `,e.nodeCount===1?`node`:`nodes`]}),(0,z.jsx)(`span`,{title:`time since last work`,children:th(e.lastActivity)})]})]})})}var Qm={"needs-you":`needs you`,active:`active`,idle:`idle`,done:`done`};function $m({state:e}){let t=e===`needs-you`?`blocked`:e,n=Qm[e];return(0,z.jsx)(`span`,{className:Y(`dot shrink-0`,t),title:n,"aria-label":n})}function eh(){return(0,z.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:[0,1,2,3].map(e=>(0,z.jsxs)(`li`,{className:`panel flex items-center gap-4 px-4 py-3.5`,children:[(0,z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,z.jsx)(`div`,{className:`h-4 w-1/3 animate-pulse rounded bg-muted`}),(0,z.jsx)(`div`,{className:`h-3 w-2/3 animate-pulse rounded bg-muted/70`})]}),(0,z.jsx)(`div`,{className:`h-6 w-16 animate-pulse rounded-full bg-muted`})]},e))})}function th(e){let t=new Date(e).getTime();if(Number.isNaN(t))return``;let n=Math.max(0,Math.round((Date.now()-t)/1e3));if(n<60)return`just now`;let r=Math.round(n/60);if(r<60)return`${r}m ago`;let i=Math.round(r/60);return i<24?`${i}h ago`:`${Math.round(i/24)}d ago`}var nh={active:wf,idle:mf,done:uf,dead:ff,canceled:pf,blocked:lf};function rh({status:e}){return(0,z.jsx)(nh[e]??mf,{className:Y(`!size-3.5`,e===`active`&&`animate-spin`)})}function ih(e,t,n,r){return t===`static`?e.status:n===`down`?`dead`:n===`reconnecting`?`idle`:r?`active`:`idle`}function ah(e){let t=e.store.source===`static`,n=e.store.state?.isStreaming??!1,r=e.detail,i=r?ih(r,e.store.source,e.store.brokerStatus,n):null;return r?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`h2`,{className:Y(oh,`min-w-0 truncate`),title:r.name,children:r.name}),i&&(0,z.jsxs)(Gp,{className:Y(`gap-1.5`,i),children:[(0,z.jsx)(rh,{status:i}),i]}),t&&(0,z.jsx)(`span`,{className:`font-mono text-xs`,style:{color:`var(--idle)`},title:`dormant node — last-known values, not live`,children:`last-known`})]}):(0,z.jsx)(`h2`,{className:oh,children:`…`})}var oh=`con-title text-xl font-medium`;function sh(e){let t=e.store.chrome,n=e.store.source===`static`,r=e.store.state?.isStreaming??!1,i=t.context,a=t.stats,o=t.tokens,s=i&&!n?i.percent:null,c=!n&&a?.cost!==void 0?a.cost:null;return!i&&c===null&&!a&&!o?null:(0,z.jsxs)(`div`,{className:`cluster`,children:[i&&(0,z.jsxs)(`div`,{className:`gauge`,children:[(0,z.jsxs)(`div`,{className:`glabel`,children:[(0,z.jsx)(`span`,{className:`instlabel`,children:`Context`}),(0,z.jsxs)(`span`,{className:`gval`,children:[s===null?`—`:uh(s),s!==null&&(0,z.jsx)(`span`,{className:`u`,children:`%`})]})]}),(0,z.jsx)(`div`,{className:`gbar`,children:(0,z.jsx)(`i`,{style:{width:s===null?`0%`:`${Math.min(100,s)}%`}})}),(0,z.jsxs)(`div`,{className:`gsub`,children:[i.tokens.toLocaleString(),!n&&(0,z.jsxs)(z.Fragment,{children:[` / `,i.window.toLocaleString()]})]})]}),c!==null&&(0,z.jsxs)(`div`,{className:`gauge`,children:[(0,z.jsxs)(`div`,{className:`glabel`,children:[(0,z.jsx)(`span`,{className:`instlabel`,children:`Cost`}),(0,z.jsxs)(`span`,{className:`gval`,children:[(0,z.jsx)(`span`,{className:`u`,style:{marginLeft:0,marginRight:2},children:`$`}),c.toFixed(2)]})]}),(0,z.jsx)(`div`,{className:`gbar`,children:(0,z.jsx)(`i`,{style:{width:`${Math.min(100,c/5*100)}%`}})}),a&&(0,z.jsxs)(`div`,{className:`gsub`,children:[a.turns,` turns`]})]}),(0,z.jsxs)(`div`,{className:`dials`,children:[!n&&a&&c===null&&(0,z.jsx)(ch,{value:String(a.turns),unit:`turns`}),!n&&a&&(0,z.jsx)(ch,{value:`${a.user_messages}/${a.assistant_messages}`,unit:`msgs`}),o&&(0,z.jsx)(ch,{value:`${lh(o.input)} → ${lh(o.output)}`,unit:`tokens`}),!n&&t.tool_calls!==null&&(0,z.jsx)(ch,{value:String(t.tool_calls),unit:`tools`,hot:r})]})]})}function ch({value:e,unit:t,hot:n}){return(0,z.jsx)(`div`,{className:`dial`,children:(0,z.jsxs)(`span`,{className:`dval`,style:n?{color:`var(--act)`}:void 0,children:[e,` `,(0,z.jsx)(`em`,{children:t})]})})}function lh(e){return e>=1e6?`${Math.round(e/1e5)/10}M`:e>=1e3?`${Math.round(e/1e3)}k`:String(e)}function uh(e){return(Math.round(e*10)/10).toFixed(1)}function dh({store:e,detail:t}){let n=e.chrome,r=[],i=n.branch??t?.branch??null;if(i!==null){let e=n.git_status??t?.git_status??null,a=e?.added??0,o=e?.modified??0;r.push((0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,z.jsx)(vf,{className:`size-3.5 shrink-0 opacity-70`}),(0,z.jsx)(`b`,{style:fh,children:i}),a>0&&(0,z.jsxs)(`span`,{style:{color:`var(--act)`,opacity:.8},children:[` +`,a]}),o>0&&(0,z.jsxs)(`span`,{style:{color:`var(--idle)`,opacity:.8},children:[` ~`,o]})]},`branch`))}let a=t?.cwd??null;a!==null&&r.push((0,z.jsx)(`span`,{children:ph(a)},`cwd`));let o=n.model??t?.model??null;o!==null&&r.push((0,z.jsx)(`span`,{children:(0,z.jsx)(`b`,{style:fh,children:o})},`model`));let s=n.context??null;return s!==null&&r.push((0,z.jsxs)(`span`,{children:[`ctx `,(0,z.jsx)(`b`,{style:fh,children:mh(s.tokens)}),` / `,mh(s.window)]},`ctx`)),r.length===0?null:(0,z.jsx)(`div`,{className:`flex min-w-0 items-center gap-5 whitespace-nowrap border-b px-6 py-2 text-xs`,style:{borderColor:`var(--line)`,background:`rgba(0,0,0,.18)`,color:`var(--mut)`},children:r.map((e,t)=>(0,z.jsxs)(v.Fragment,{children:[t>0&&(0,z.jsx)(`span`,{style:{color:`var(--dim)`,opacity:.5},className:`select-none`,children:`·`}),e]},t))})}var fh={color:`var(--ink2)`,fontWeight:400};function ph(e){let t=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)$/);if(t)return`~${t[1]}`;let n=e.split(`/`).filter(Boolean);return n.length<=2?e:`…/${n.slice(-2).join(`/`)}`}function mh(e){return e>=1e6?`${Math.round(e/1e6)}M`:e>=1e3?`${Math.round(e/1e3)}k`:String(e)}function hh(e){let[t,n]=(0,v.useState)(!1),r=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let e=e=>{if(e.key===`Escape`){n(!1);return}if(e.altKey&&e.code===`KeyI`){if(document.activeElement instanceof HTMLTextAreaElement)return;e.preventDefault(),n(e=>!e)}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),t?(0,z.jsx)(`div`,{className:`in fixed inset-0 z-50 flex items-start justify-center pt-22`,style:{background:`rgba(0,0,0,.42)`,backdropFilter:`blur(2px)`},onMouseDown:e=>{r.current?.contains(e.target)||n(!1)},children:(0,z.jsxs)(`div`,{ref:r,className:`panel rv`,style:gh,children:[(0,z.jsxs)(`div`,{style:_h,children:[(0,z.jsx)(`span`,{className:`instlabel`,children:`Instruments`}),(0,z.jsx)(`div`,{style:{flex:1}}),(0,z.jsx)(`span`,{className:`kbd`,children:`⌥i`}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>n(!1),className:`transition-colors`,style:{color:`var(--mut)`},"aria-label":`Close instruments`,children:(0,z.jsx)(Nf,{className:`size-3.5`})})]}),(0,z.jsx)(sh,{store:e.store,detail:e.detail})]})}):null}var gh={minWidth:`min(680px, 92vw)`,overflow:`hidden`,"--i":0},_h={display:`flex`,alignItems:`center`,gap:`10px`,padding:`11px 30px`,borderBottom:`1px solid var(--line)`};function vh(e){let t=new Map;for(let n of e){if(n.parent===null)continue;let e=t.get(n.parent);e?e.push(n):t.set(n.parent,[n])}return t}function yh(e,t){let n=[],r=new Set,i=[{node:e,depth:0}];for(;i.length>0;){let e=i.pop();if(r.has(e.node.node_id))continue;r.add(e.node.node_id),n.push({node:e.node,depth:e.depth});let a=t.get(e.node.node_id)??[];for(let t=a.length-1;t>=0;t--)i.push({node:a[t],depth:e.depth+1})}return n}function bh(e,t){let n=t.get(e),r=new Set;for(;n&&n.parent!==null;){if(r.has(n.node_id))return null;r.add(n.node_id),n=t.get(n.parent)}return n??null}function xh(e,t){let n=new Map(e.map(e=>[e.node_id,e])),r=vh(e),i=bh(t,n),a=i?.node_id??null;return{thisGraph:i===null?[]:yh(i,r),otherGraphs:e.filter(e=>e.parent===null&&e.host_kind===`broker`&&e.node_id!==a&&(e.status===`active`||e.attention_count>0))}}var Sh=new Set([`done`,`dead`,`canceled`]),Ch=`crtr:graphrail-collapsed`;function wh(e){return e.attention_count>0||e.status===`active`}function Th(e,t){let n=new Map(e.map(e=>[e.node.node_id,e.node])),r=new Map;for(let{node:t}of e){if(t.parent===null||!n.has(t.parent))continue;let e=r.get(t.parent);e?e.push(t.node_id):r.set(t.parent,[t.node_id])}let i=new Map,a=e=>{let o=i.get(e);if(o!==void 0)return o;i.set(e,!1);let s=n.get(e),c=e===t||s!==void 0&&wh(s);if(!c){for(let t of r.get(e)??[])if(a(t)){c=!0;break}}return i.set(e,c),c},o=new Set;for(let{node:t}of e)(r.get(t.node_id)?.length??0)>0&&!a(t.node_id)&&o.add(t.node_id);return{children:r,collapsedByDefault:o}}function Eh({currentId:e,onNavigate:t}){let{nodes:n}=xp(),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(()=>{try{return localStorage.getItem(Ch)===`1`}catch{return!1}}),[s,c]=(0,v.useState)({}),{thisGraph:l}=xh(n,e),u=l[0]?.node.node_id??null,{children:d,collapsedByDefault:f}=(0,v.useMemo)(()=>Th(l,e),[l,e]),p=e=>s[e]===void 0?f.has(e):!s[e],m=e=>c(t=>({...t,[e]:p(e)})),h=()=>{o(e=>{let t=!e;try{localStorage.setItem(Ch,t?`1`:`0`)}catch{}return t})},{liveRoots:g,deadRoots:_}=(0,v.useMemo)(()=>{let e=n.filter(e=>e.parent===null&&e.host_kind===`broker`&&e.node_id!==u),t=[],r=[];for(let n of e)(Sh.has(n.status)&&n.attention_count===0?r:t).push(n);let i=(e,t)=>Date.parse(t.created)-Date.parse(e.created),a=e=>e.attention_count>0?0:e.status===`active`?1:2;return t.sort((e,t)=>a(e)-a(t)||i(e,t)),r.sort(i),{liveRoots:t,deadRoots:r}},[n,u]);if((0,v.useEffect)(()=>{let n=n=>{if(!n.altKey||n.key!==`ArrowUp`&&n.key!==`ArrowDown`)return;let r=l.findIndex(t=>t.node.node_id===e);if(r===-1)return;n.preventDefault();let i=n.key===`ArrowUp`?l[r-1]:l[r+1];i&&t(i.node.node_id)};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[l,e,t]),a)return(0,z.jsx)(`aside`,{className:`graphrail rv`,style:Oh,children:(0,z.jsx)(`button`,{type:`button`,onClick:h,title:`Expand graph sidebar`,"aria-label":`Expand graph sidebar`,className:`flex size-6 items-center justify-center rounded-md text-[var(--dim)] transition-colors hover:text-[var(--ink2)]`,children:(0,z.jsx)(sf,{className:`size-4`})})});let y=[],b=null;for(let{node:n,depth:r}of l){if(b!==null){if(r>b)continue;b=null}let i=d.get(n.node_id)??[],a=i.length>0&&p(n.node_id);y.push((0,z.jsx)(Fh,{node:n,depth:r,current:n.node_id===e,hasChildren:i.length>0,collapsed:a,onToggleCollapse:()=>m(n.node_id),onClick:()=>t(n.node_id)},n.node_id)),a&&(b=r)}return(0,z.jsxs)(`aside`,{className:`graphrail rv`,style:Dh,children:[(0,z.jsx)(`div`,{className:`flex items-center justify-end pb-1`,children:(0,z.jsx)(`button`,{type:`button`,onClick:h,title:`Collapse graph sidebar`,"aria-label":`Collapse graph sidebar`,className:`flex size-6 items-center justify-center rounded-md text-[var(--dim)] transition-colors hover:text-[var(--ink2)]`,children:(0,z.jsx)(sf,{className:`size-4 rotate-180`})})}),(0,z.jsx)(kh,{label:`This graph`,chord:`⌥↑↓ to cycle`}),y,l.length===0&&(0,z.jsx)(Ah,{}),(g.length>0||_.length>0)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`gr-gap`}),(0,z.jsx)(kh,{label:`Elsewhere`}),g.map(e=>(0,z.jsx)(Fh,{node:e,depth:0,current:!1,elsewhere:!0,onClick:()=>t(e.node_id)},e.node_id)),_.length>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`mt-1 flex items-center gap-1.5 rounded-md px-3 py-2 text-left text-xs text-[var(--dim)] transition-colors hover:text-[var(--ink2)]`,children:[(0,z.jsx)(sf,{className:Y(`size-3.5 transition-transform`,r&&`rotate-90`)}),r?`Hide`:`Show`,` `,_.length,` finished`]}),r&&_.map(e=>(0,z.jsx)(Fh,{node:e,depth:0,current:!1,elsewhere:!0,onClick:()=>t(e.node_id)},e.node_id))]})]})]})}var Dh={width:`228px`,flex:`none`,display:`flex`,flexDirection:`column`,borderRight:`1px solid var(--line)`,background:`rgba(0,0,0,.16)`,padding:`14px 9px`,overflowY:`auto`,zIndex:1,"--i":2},Oh={width:`36px`,flex:`none`,display:`flex`,flexDirection:`column`,alignItems:`center`,borderRight:`1px solid var(--line)`,background:`rgba(0,0,0,.16)`,padding:`14px 6px`,zIndex:1,"--i":2};function kh({label:e,chord:t}){return(0,z.jsxs)(`div`,{className:`gr-sec`,children:[(0,z.jsx)(`span`,{className:`instlabel`,children:e}),(0,z.jsx)(`div`,{className:`rule`}),t&&(0,z.jsx)(`span`,{title:t,"aria-label":t,className:`flex items-center text-[var(--dim)]`,children:(0,z.jsx)(xf,{className:`size-3.5`})})]})}function Ah(){return(0,z.jsx)(`span`,{className:`px-3 py-1 font-mono text-xs`,style:{color:`var(--dim)`},children:`—`})}function jh(e){let t=Date.now()-Date.parse(e);if(!Number.isFinite(t)||t<0)return``;let n=Math.floor(t/1e3);if(n<60)return`${n}s`;let r=Math.floor(n/60);if(r<60)return`${r}m`;let i=Math.floor(r/60);return i<24?`${i}h`:`${Math.floor(i/24)}d`}function Mh(e){return e.split(`/`).filter(Boolean).at(-1)??e}function Nh(e){let t=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)$/);if(t)return`~${t[1]}`;let n=e.split(`/`).filter(Boolean);return n.length<=2?e:`…/${n.slice(-2).join(`/`)}`}var Ph={active:`s-active`,idle:`s-idle`,done:`s-done`,dead:`s-dead`,canceled:`s-canceled`};function Fh({node:e,depth:t,current:n,elsewhere:r=!1,hasChildren:i=!1,collapsed:a=!1,onToggleCollapse:o,onClick:s}){let c=Sh.has(e.status),l=e.attention_count>0,u=l?`blocked`:e.status,d=jh(e.created),f=t>0?{marginLeft:`${t*12}px`}:void 0,p=(0,z.jsx)(`button`,{type:`button`,onClick:s,className:Y(`node-row text-left`,r?`w-full`:`min-w-0 flex-1`,l?`s-blocked`:Ph[e.status],c&&!l&&`dimmed`,n&&`rounded-md border border-[var(--line2)] bg-[oklch(0.92_0.013_80_/_8%)] shadow-[inset_0_1px_0_var(--raise)]`),children:(0,z.jsxs)(`span`,{className:`node-id`,children:[(0,z.jsxs)(`span`,{className:`node-l1`,children:[(0,z.jsx)(`span`,{className:Y(`node-name truncate`,n&&`font-semibold`),children:r?Mh(e.cwd):e.name}),r?(0,z.jsxs)(`span`,{className:`node-kind truncate`,children:[e.name,` · `,e.kind]}):(0,z.jsx)(`span`,{className:`node-kind`,children:e.kind}),l&&(0,z.jsxs)(Gp,{variant:`destructive`,className:`ml-auto gap-1 text-xs`,children:[(0,z.jsx)(_f,{className:`size-3.5`}),e.attention_count]})]}),(0,z.jsxs)(`span`,{className:`node-l2`,children:[r&&(0,z.jsx)(`span`,{className:`node-cwd`,children:Nh(e.cwd)}),(0,z.jsx)(`span`,{className:Y(`dot`,u),title:u,"aria-label":u}),d&&(0,z.jsx)(`span`,{className:`text-[var(--dim)]`,children:d})]})]})});return r?(0,z.jsx)(`div`,{style:f,children:p}):(0,z.jsxs)(`div`,{className:`flex items-center gap-1`,style:f,children:[i?(0,z.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),o?.()},title:a?`Expand branch`:`Collapse branch`,"aria-label":a?`Expand branch`:`Collapse branch`,className:`flex size-4 flex-none items-center justify-center rounded-sm text-[var(--dim)] transition-colors hover:text-[var(--ink2)]`,children:(0,z.jsx)(sf,{className:Y(`size-3.5 transition-transform`,!a&&`rotate-90`)})}):(0,z.jsx)(`span`,{className:`size-4 flex-none`,"aria-hidden":`true`}),p]})}function Ih(e){let t=e.store.presence,n=e.store.role===`controller`;return(0,z.jsxs)(v.Fragment,{children:[(0,z.jsxs)(`div`,{className:`ctl-state flex shrink-0 items-center gap-1.5 text-xs`,style:{color:`var(--mut)`},children:[`control:`,` `,(0,z.jsx)(`span`,{style:{color:`var(--ink2)`,fontStyle:`italic`},children:n?`you`:t.controller?`another client`:`no one`})]}),n?(0,z.jsx)(`button`,{type:`button`,className:`btn sm shrink-0`,onClick:()=>e.store.releaseControl(),children:`Release control`}):(0,z.jsx)(`button`,{type:`button`,className:`btn primary sm shrink-0`,disabled:!e.store.socketReady,title:e.store.socketReady?void 0:`connecting…`,onClick:()=>e.store.requestControl(),children:`Request control`})]})}function Lh(e){return typeof e==`object`&&!!e}function Rh(e){return typeof e==`string`?e:``}function zh(e){let t=e??``;return/rate.?limit|\b429\b|too many requests|quota/i.test(t)?`rate-limit`:/overloaded|\b529\b|\b503\b|capacity|server.{0,3}busy|temporarily unavailable/i.test(t)?`overloaded`:/invalid_grant|refresh token|unauthori[sz]ed|invalid.?api.?key|authentication failed|\b401\b|\b403\b/i.test(t)?`auth`:/connection|econnreset|etimedout|enotfound|econnrefused|network|fetch failed|socket hang|timed? out|timeout|\bterminated\b|other side closed|premature close/i.test(t)?`connection`:`other`}function Bh(e){let t=Rh(e.code)||Rh(e.errno);return t===``?null:/^(ECONNREFUSED|ECONNRESET|ETIMEDOUT|ENOENT|ENOTFOUND|EAI_AGAIN|EPIPE|EHOSTUNREACH|ENETUNREACH)$/i.test(t)?`connection`:null}function Vh(e){let t=typeof e.status==`number`?e.status:null;return t===null?null:t===401||t===403?`auth`:t===429?`rate-limit`:t===503||t===529||t>=500&&t<=599?`overloaded`:t>=400&&t<=499?`protocol`:null}function Hh(e){let t=typeof e.code==`number`?e.code:null;if(t===null)return null;if(t===1008)return`protocol`;if(t===1006)return`connection`;if(t===1011){let t=Rh(e.reason);return/no running broker/i.test(t)||zh(t)===`connection`?`connection`:`other`}return null}function Uh(e,t){return t===`auth`||t===`protocol`?`fatal`:e===`pi→provider`?t===`connection`||t===`rate-limit`||t===`overloaded`?`auto`:`fatal`:`manual`}function Wh(e){if(typeof e==`string`)return e;if(!Lh(e))return``;let t=[e.message,e.errorMessage,e.reason,e.body,e.statusText];for(let e of t)if(typeof e==`string`&&e!==``)return e;let n=e.error;if(Lh(n)){let e=n.message;if(typeof e==`string`&&e!==``)return e;let t=n.reason;if(typeof t==`string`&&t!==``)return t}return``}function Gh(e,t){if(Lh(t)){let n=Bh(t);if(n!==null)return{kind:n,disposition:Uh(e,n)};let r=Vh(t);if(r!==null)return{kind:r,disposition:Uh(e,r)};let i=Hh(t);if(i!==null)return{kind:i,disposition:Uh(e,i)}}let n=zh(Wh(t));return{kind:n,disposition:Uh(e,n)}}var Kh=class{nodeId;handlers;ws;closedReported=!1;constructor(e,t){this.nodeId=e,this.handlers=t}get url(){let e=location.protocol===`https:`?`wss:`:`ws:`,t=new URL(`/node/${encodeURIComponent(this.nodeId)}`,window.location.href);return t.protocol=e,zf!==void 0&&t.searchParams.set(`token`,zf),t.toString()}connect(){let e;try{e=new WebSocket(this.url)}catch(e){this.reportClose(`transient`,`failed to open ws: ${String(e)}`);return}this.ws=e,e.onopen=()=>this.handlers.onOpen?.(),e.onmessage=e=>this.onMessage(e),e.onclose=e=>{let t=Gh(`browser↔relay`,{code:e.code,reason:e.reason}),n=e.code===1008||t.kind===`protocol`?`invalid`:e.code===1011&&/^no node /.test(e.reason)?`no-node`:e.code===1011&&/^no running broker/.test(e.reason)?`no-broker`:`transient`;this.reportClose(n,e.reason||`closed (${e.code})`)},e.onerror=()=>{}}onMessage(e){if(typeof e.data!=`string`)return;let t;try{t=JSON.parse(e.data)}catch{return}this.handlers.onFrame?.(t)}send(e){let t=this.ws;if(!(t===void 0||t.readyState!==WebSocket.OPEN))try{t.send(JSON.stringify(e))}catch{}}close(){let e=this.ws;if(e!==void 0&&e.readyState<=WebSocket.OPEN)try{e.close()}catch{}}reportClose(e,t){this.closedReported||(this.closedReported=!0,this.ws=void 0,this.handlers.onClose?.(e,t))}},qh=/^From (?:[a-z0-9]+-[a-f0-9]+|system|human) — \d+ update/;function Jh(e){return qh.test(e)}function Yh(e){let t=/^From ([a-z0-9]+-[a-f0-9]+|system|human) — /.exec(e);if(!t)return null;let n=t[1];return typeof n==`string`?n:null}function Xh(){return{messages:[],streamingIndex:null,executingToolIds:new Set,partialToolResults:new Map,isStreaming:!1,activity:null,queued:[]}}function Zh(e){let t=e.content;return typeof t==`string`?t:Array.isArray(t)?t.filter(e=>!!e&&e.type===`text`).map(e=>typeof e.text==`string`?e.text:``).join(``):``}function Qh(e){return tg(e)!==`user`||e.origin||!Jh(Zh(e))?e:{...e,origin:`inbox`}}function $h(){return{role:`assistant`,content:[]}}function eg(e,t){let n=e.messages.map(Qh);if(e.state?.isStreaming!==!0)return{messages:n,streamingIndex:null,executingToolIds:new Set,partialToolResults:new Map,isStreaming:!1,activity:null,queued:[]};let r=n.length-1;if(r>=0&&tg(n[r])===`assistant`)return{messages:n,streamingIndex:r,executingToolIds:new Set,partialToolResults:new Map,isStreaming:!0,activity:`Working…`,queued:[]};let i=t&&t.streamingIndex!==null?t.messages[t.streamingIndex]:void 0,a=i&&tg(i)===`assistant`?i:$h(),o=[...n,a];return{messages:o,streamingIndex:o.length-1,executingToolIds:new Set,partialToolResults:new Map,isStreaming:!0,activity:`Working…`,queued:[]}}function tg(e){return e.role??``}function ng(e){for(let t=e.messages.length-1;t>=0;t--)if(tg(e.messages[t])===`bashExecution`)return t;return null}function rg(e,t,n){let r={role:`bashExecution`,command:t,output:``,exitCode:void 0,cancelled:!1,truncated:!1,excludeFromContext:n,timestamp:Date.now()};return{...e,messages:[...e.messages,r]}}function ig(e,t){let n=ng(e);if(n===null)return e;let r=[...e.messages],i=r[n];return r[n]={...i,output:`${i.output??``}${t}`},{...e,messages:r}}function ag(e,t){let n=ng(e);if(n===null)return e;let r=[...e.messages];return r[n]={...r[n],exitCode:t.exitCode,cancelled:t.cancelled,truncated:t.truncated,fullOutputPath:t.fullOutputPath},{...e,messages:r}}function og(e,t){switch(t.type){case`agent_start`:return{...e,isStreaming:!0,activity:`Working…`};case`agent_end`:return{...e,isStreaming:!1,activity:null,streamingIndex:null,executingToolIds:e.executingToolIds.size?new Set:e.executingToolIds};case`message_start`:{let n=Qh(t.message),r=[...e.messages,n],i=tg(n)===`assistant`,a=e.partialToolResults;if(tg(n)===`toolResult`){let e=n.toolCallId;if(typeof e==`string`&&a.has(e)){let t=new Map(a);t.delete(e),a=t}}return{...e,messages:r,partialToolResults:a,streamingIndex:i?r.length-1:e.streamingIndex}}case`message_update`:{let n=e.streamingIndex;if(n===null){let t=e.messages.length-1;t>=0&&tg(e.messages[t])===`assistant`&&(n=t)}if(n===null)return e;let r=[...e.messages];return r[n]=t.message,{...e,messages:r,streamingIndex:n}}case`message_end`:{if(e.streamingIndex===null)return e;let n=[...e.messages];return n[e.streamingIndex]=t.message,{...e,messages:n,streamingIndex:null}}case`tool_execution_start`:{let n=new Set(e.executingToolIds);return n.add(t.toolCallId),{...e,executingToolIds:n}}case`tool_execution_update`:{let n=new Map(e.partialToolResults);return n.set(t.toolCallId,sg(t.toolCallId,t.toolName,t.partialResult,!1)),{...e,partialToolResults:n}}case`tool_execution_end`:{let n=new Set(e.executingToolIds);n.delete(t.toolCallId);let r=new Map(e.partialToolResults);return r.set(t.toolCallId,sg(t.toolCallId,t.toolName,t.result,t.isError)),{...e,executingToolIds:n,partialToolResults:r}}case`compaction_start`:return{...e,activity:`Compacting context…`};case`compaction_end`:return{...e,activity:e.isStreaming?`Working…`:null};case`auto_retry_start`:return{...e,activity:`Retrying (${t.attempt}/${t.maxAttempts}) in ${Math.ceil(t.delayMs/1e3)}s…`};case`auto_retry_end`:return{...e,activity:e.isStreaming?`Working…`:null};case`queue_update`:return{...e,queued:[...t.steering,...t.followUp]};default:return e}}function sg(e,t,n,r){let i=typeof n==`object`&&n?n:{};return{role:`toolResult`,toolCallId:e,toolName:t,...i,content:Array.isArray(i.content)?i.content:[],isError:r}}var cg=1,lg=new Set([`stop`,`length`,`toolUse`,`error`,`aborted`]),ug=new Set([`off`,`minimal`,`low`,`medium`,`high`,`xhigh`]),dg=200,fg=256*1024,pg=20,mg=8*1024*1024;function hg(e){return{schemaVersion:cg,...e}}function gg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Q(e){return typeof e==`string`}function _g(e){return typeof e==`number`}function vg(e){return typeof e==`boolean`}function yg(e){return!gg(e)||e.type!==`text`||!Q(e.text)?!1:e.textSignature===void 0||Q(e.textSignature)}function bg(e){return gg(e)&&e.type===`image`&&Q(e.data)&&Q(e.mimeType)}function xg(e){return gg(e)&&e.type===`toolCall`&&Q(e.id)&&Q(e.name)&&gg(e.arguments)&&(e.thoughtSignature===void 0||Q(e.thoughtSignature))}function Sg(e){return gg(e)&&_g(e.input)&&_g(e.output)&&_g(e.cacheRead)&&_g(e.cacheWrite)&&_g(e.total)}function Cg(e){return gg(e)&&_g(e.input)&&_g(e.output)&&_g(e.cacheRead)&&_g(e.cacheWrite)&&(e.cacheWrite1h===void 0||_g(e.cacheWrite1h))&&(e.reasoning===void 0||_g(e.reasoning))&&_g(e.totalTokens)&&Sg(e.cost)}function wg(e){return typeof e==`string`&&lg.has(e)}function Tg(e){return typeof e==`string`&&ug.has(e)}function Eg(e){return!gg(e)||!Q(e.message)?!1:(e.name===void 0||Q(e.name))&&(e.stack===void 0||Q(e.stack))&&(e.code===void 0||Q(e.code)||_g(e.code))}function Dg(e){return!gg(e)||!Q(e.type)||!_g(e.timestamp)?!1:(e.error===void 0||Eg(e.error))&&(e.details===void 0||gg(e.details))}function Og(e){return!gg(e)||e.role!==`user`||!_g(e.timestamp)?!1:typeof e.content==`string`||Array.isArray(e.content)&&e.content.every(e=>yg(e)||bg(e))}function kg(e){return!gg(e)||e.role!==`assistant`||!_g(e.timestamp)||!Array.isArray(e.content)||!e.content.every(e=>yg(e)||gg(e)&&e.type===`thinking`&&Q(e.thinking)&&(e.thinkingSignature===void 0||Q(e.thinkingSignature))&&(e.redacted===void 0||vg(e.redacted))||xg(e))?!1:Q(e.api)&&Q(e.provider)&&Q(e.model)&&(e.responseModel===void 0||Q(e.responseModel))&&(e.responseId===void 0||Q(e.responseId))&&(e.diagnostics===void 0||Array.isArray(e.diagnostics)&&e.diagnostics.every(Dg))&&Cg(e.usage)&&wg(e.stopReason)&&(e.errorMessage===void 0||Q(e.errorMessage))}function Ag(e){return!gg(e)||e.role!==`toolResult`||!_g(e.timestamp)?!1:Q(e.toolCallId)&&Q(e.toolName)&&Array.isArray(e.content)&&e.content.every(e=>yg(e)||bg(e))&&vg(e.isError)}function jg(e){return gg(e)&&e.role===`bashExecution`&&Q(e.command)&&Q(e.output)&&_g(e.timestamp)&&(e.exitCode===void 0||_g(e.exitCode))&&vg(e.cancelled)&&vg(e.truncated)&&(e.fullOutputPath===void 0||Q(e.fullOutputPath))&&(e.excludeFromContext===void 0||vg(e.excludeFromContext))}function Mg(e){return Og(e)||kg(e)||Ag(e)||jg(e)}function Ng(e){return!gg(e)||!Q(e.role)?!1:e.role!==`user`&&e.role!==`assistant`&&e.role!==`toolResult`&&e.role!==`bashExecution`}function Pg(e){return Mg(e)||Ng(e)}function Fg(e){return!gg(e)||!Q(e.name)||!Q(e.description)||e.source!==`builtin`&&e.source!==`command`&&e.source!==`template`?!1:(e.location===void 0||e.location===`user`||e.location===`project`||e.location===`path`)&&(e.path===void 0||Q(e.path))&&(e.argument_hint===void 0||Q(e.argument_hint))}function Ig(e){return e===null?!0:gg(e)?Q(e.sessionId)&&(e.sessionFile===null||Q(e.sessionFile))&&(e.model===null||Q(e.model))&&vg(e.isStreaming)&&Tg(e.thinkingLevel)&&(e.steeringMode===`all`||e.steeringMode===`one-at-a-time`)&&(e.followUpMode===`all`||e.followUpMode===`one-at-a-time`)&&(e.sessionName===null||Q(e.sessionName))&&vg(e.autoCompactionEnabled)&&_g(e.pendingMessageCount):!1}function Lg(e,t){return gg(t)?t.schemaVersion===cg&&t.nodeId===e&&Array.isArray(t.messages)&&t.messages.every(Pg)&&Ig(t.sessionState)&&Array.isArray(t.commands)&&t.commands.every(Fg)&&vg(t.isStreaming)&&(t.activity===null||Q(t.activity))&&_g(t.updatedAt)&&(t.source===`broker`||t.source===`static`):!1}function Rg(e){return new TextEncoder().encode(JSON.stringify(e)).length}function zg(e,t,n){let r=e.messages.slice(-t),i={...e,messages:r};for(;r.length>1&&Rg(i)>n;)r=r.slice(1),i={...e,messages:r};return i}function Bg(e){return`crtr.web.transcript.tail.${e}`}function Vg(e){try{let t=globalThis.localStorage?.getItem(Bg(e));if(t==null)return null;let n=JSON.parse(t);return Lg(e,n)?n:null}catch{return null}}function Hg(e){let t=zg(e,pg,fg);try{globalThis.localStorage?.setItem(Bg(e.nodeId),JSON.stringify(t))}catch{}}var Ug=`crtr-web-transcript-cache`,Wg=1,Gg=`entries`;function Kg(){return new Promise((e,t)=>{if(typeof indexedDB>`u`){t(Error(`indexedDB unavailable`));return}let n=indexedDB.open(Ug,Wg);n.onupgradeneeded=()=>{let e=n.result;e.objectStoreNames.contains(Gg)||e.createObjectStore(Gg,{keyPath:`nodeId`}).createIndex(`updatedAt`,`updatedAt`)},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error??Error(`indexedDB open failed`))})}async function qg(e){try{let t=await Kg(),n=await new Promise((n,r)=>{let i=t.transaction(Gg,`readonly`).objectStore(Gg).get(e);i.onsuccess=()=>n(i.result),i.onerror=()=>r(i.error??Error(`indexedDB read failed`))});return t.close(),Lg(e,n)?n:null}catch{return null}}async function Jg(e){let t=[];await new Promise((n,r)=>{let i=e.transaction(Gg,`readonly`).objectStore(Gg).index(`updatedAt`).openCursor();i.onsuccess=()=>{let e=i.result;if(!e){n();return}let r=e.value;t.push({nodeId:r.nodeId,updatedAt:r.updatedAt,size:Rg(r)}),e.continue()},i.onerror=()=>r(i.error??Error(`indexedDB cursor failed`))});let n=t.reduce((e,t)=>e+t.size,0);n<=mg||await new Promise((r,i)=>{let a=e.transaction(Gg,`readwrite`),o=a.objectStore(Gg),s=0;for(;n>mg&&s<t.length;){let e=t[s];o.delete(e.nodeId),n-=e.size,s+=1}a.oncomplete=()=>r(),a.onerror=()=>i(a.error??Error(`indexedDB prune failed`))})}async function Yg(e){let t=zg(e,dg,fg);try{let e=await Kg();await new Promise((n,r)=>{let i=e.transaction(Gg,`readwrite`);i.objectStore(Gg).put(t),i.oncomplete=()=>n(),i.onerror=()=>r(i.error??Error(`indexedDB write failed`))}),await Jg(e),e.close()}catch{}}function Xg(e){return{clientId:e,conn:`connecting`,conv:Xh(),role:`observer`,controllerId:null,session:null,model:void 0,sessionName:void 0,contextTokens:void 0,dialog:null,commands:[],statuses:{},widgets:{},title:void 0,notice:null}}var Zg={"no-broker":`no-broker`,"no-node":`no-node`,invalid:`invalid`,transient:`closed`};function Qg(e){return e===`welcome`||e===`control_changed`||e===`model_changed`||e===`error`||e===`ack`||e===`data`||e===`display_status`||e===`display_widget`||e===`display_title`||e===`bash_start`||e===`bash_output`||e===`bash_end`||e===`extension_ui_request`||e===`extension_ui_dismiss`}function $g(e,t){switch(t.kind){case`connecting`:return e.conn===`connecting`?e:{...e,conn:`connecting`};case`closed`:{let n=Zg[t.closeKind];return e.conn===n?e:{...e,conn:n}}case`notice`:return e.notice===t.text?e:{...e,notice:t.text};case`dismiss-dialog`:return e.dialog===null?e:{...e,dialog:null};case`frame`:return o_(e,t.frame)}}function e_(e,t){return e.name===t.name&&e.description===t.description&&e.source===t.source&&e.location===t.location&&e.path===t.path&&e.argument_hint===t.argument_hint}function t_(e,t){return e.length===t.length&&e.every((e,n)=>e_(e,t[n]))}function n_(e,t){return e===t?!0:e===void 0||t===void 0?!1:e.placement===t.placement&&e.lines.length===t.lines.length&&e.lines.every((e,n)=>e===t.lines[n])}function r_(e){if(e===void 0||e.trim()===``)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>{if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name==`string`&&typeof t.description==`string`&&(t.source===`builtin`||t.source===`command`||t.source===`template`)}):[]}catch{return[]}}function i_(e){return{sessionId:e.sessionId,sessionFile:e.sessionFile??null,model:e.model??null,isStreaming:e.isStreaming,thinkingLevel:e.thinkingLevel,steeringMode:e.steeringMode,followUpMode:e.followUpMode,sessionName:e.sessionName??null,autoCompactionEnabled:e.autoCompactionEnabled,pendingMessageCount:e.pendingMessageCount}}function a_(e){let t=e.messages.length-1,n=e.isStreaming&&t>=0?t:null;return{messages:e.messages,streamingIndex:n,executingToolIds:new Set,partialToolResults:new Map,isStreaming:e.isStreaming,activity:e.activity,queued:[]}}function o_(e,t){if(!Qg(t.type))return{...e,conv:og(e.conv,t)};switch(t.type){case`welcome`:{let n=eg(t.snapshot,e.conv),r=t.controller_id,i=i_(t.snapshot.state);return{...e,conn:`open`,conv:n,controllerId:r,role:r===e.clientId?`controller`:`observer`,session:i,model:i.model??void 0,sessionName:i.sessionName??void 0,contextTokens:t.snapshot.stats?.tokens?.total,dialog:t.pending_dialog??null,commands:[]}}case`control_changed`:return e.controllerId===t.controller_id?e:{...e,controllerId:t.controller_id,role:t.controller_id===e.clientId?`controller`:`observer`};case`model_changed`:{let n=t.model??null;return e.model===t.model&&(e.session===null||e.session.model===n)?e:{...e,model:t.model,session:e.session?{...e.session,model:n}:e.session}}case`error`:{let n=t.code===`not_controller`?`read-only — another viewer is the controller`:t.message||`error: ${t.code}`;return e.notice===n?e:{...e,notice:n}}case`extension_ui_request`:return{...e,dialog:t};case`extension_ui_dismiss`:return e.dialog&&e.dialog.id===t.id?{...e,dialog:null}:e;case`display_status`:{let n=e.statuses[t.key];if(t.text===void 0?n===void 0:n===t.text)return e;let r={...e.statuses};return t.text===void 0?delete r[t.key]:r[t.key]=t.text,{...e,statuses:r}}case`display_widget`:{let n=e.widgets[t.key],r=t.lines===void 0?void 0:{lines:t.lines,placement:t.placement};if(n_(n,r))return e;let i={...e.widgets};return r===void 0?delete i[t.key]:i[t.key]=r,{...e,widgets:i}}case`display_title`:return e.title===t.title?e:{...e,title:t.title};case`ack`:{if(t.for!==`get_commands`)return e;let n=t.ok?r_(t.detail):[];return t_(e.commands,n)?e:{...e,commands:n}}case`bash_start`:return{...e,conv:rg(e.conv,t.command,t.excludeFromContext)};case`bash_output`:return{...e,conv:ig(e.conv,t.chunk)};case`bash_end`:return{...e,conv:ag(e.conv,t)};default:return e}}var s_=1500,c_=800,l_=5e3,u_=10;function d_(e){return Math.min(l_,c_*2**e)}var f_=class e{nodeId;static CACHE_WRITE_DEBOUNCE_MS=500;clientId;actions;pinned=!1;state;listeners=new Set;client=null;gen=0;timer=null;cacheWriteTimer=null;role=`observer`;streaming=!1;cachedUpdatedAt=0;liveAttached=!1;started=!1;noBrokerAttempts=0;constructor(e){this.nodeId=e,this.clientId=crypto.randomUUID(),this.state=Xg(this.clientId);let t=Vg(e);t&&(this.state={...this.state,conv:a_(t),session:t.sessionState,commands:t.commands,model:t.sessionState?.model??void 0,sessionName:t.sessionState?.sessionName??void 0},this.cachedUpdatedAt=t.updatedAt),this.actions=this.buildActions()}subscribe=e=>(this.ensureStarted(),this.listeners.add(e),()=>{this.listeners.delete(e)});getState=()=>this.state;ensureStarted(){this.started||(this.started=!0,this.hydrateFromFullMirror(),this.dial())}hydrateFromFullMirror(){let e=this.gen;qg(this.nodeId).then(t=>{if(e===this.gen&&!this.liveAttached&&!(t===null||t.updatedAt<=this.cachedUpdatedAt)){this.state={...this.state,conv:a_(t),session:t.sessionState,commands:t.commands,model:t.sessionState?.model??void 0,sessionName:t.sessionState?.sessionName??void 0},this.cachedUpdatedAt=t.updatedAt;for(let e of this.listeners)e()}})}focus(){this.ensureStarted(),this.pinned=!0,this.state.conn===`open`&&this.send({type:`request_control`})}background(){this.pinned=!1,this.send({type:`release_control`})}dispose(){this.gen+=1,this.timer&&clearTimeout(this.timer),this.cacheWriteTimer&&(clearTimeout(this.cacheWriteTimer),this.cacheWriteTimer=null,this.flushCacheWrite()),this.client?.close(),this.client=null}dispatch(e){let t=this.state,n=$g(t,e);if(n!==t){this.state=n,this.role=n.role,this.streaming=n.conv.isStreaming,e.kind===`frame`&&e.frame.type===`welcome`&&(this.liveAttached=!0),n.conv!==t.conv&&this.scheduleCacheWrite();for(let e of this.listeners)e()}}scheduleCacheWrite(){this.cacheWriteTimer&&clearTimeout(this.cacheWriteTimer),this.cacheWriteTimer=setTimeout(()=>{this.cacheWriteTimer=null,this.flushCacheWrite()},e.CACHE_WRITE_DEBOUNCE_MS)}flushCacheWrite(){let e=hg({nodeId:this.nodeId,messages:this.state.conv.messages,sessionState:this.state.session,commands:this.state.commands,isStreaming:this.state.conv.isStreaming,activity:this.state.conv.activity,updatedAt:Date.now(),source:`broker`});Hg(e),Yg(e),this.cachedUpdatedAt=e.updatedAt}send(e){this.client?.send(e)}dial(){let e=this.gen,t=new Kh(this.nodeId,{onOpen:()=>{e===this.gen&&t.send({type:`hello`,role:`observer`,client_id:this.clientId})},onFrame:n=>{e===this.gen&&(this.dispatch({kind:`frame`,frame:n}),n.type===`welcome`&&(t.send({type:`get_commands`}),this.pinned&&t.send({type:`request_control`}),this.noBrokerAttempts=0))},onClose:t=>{if(e===this.gen){if(this.dispatch({kind:`closed`,closeKind:t}),t===`transient`)this.timer=setTimeout(()=>{e===this.gen&&(this.dispatch({kind:`connecting`}),this.dial())},s_);else if(t===`no-broker`&&this.noBrokerAttempts<u_){let t=this.noBrokerAttempts;this.noBrokerAttempts+=1,this.timer=setTimeout(()=>{e===this.gen&&this.dial()},d_(t))}}}});this.client=t,t.connect()}buildActions(){return{sendText:e=>{let t=e.trim();if(t!==``){if(this.role!==`controller`){this.dispatch({kind:`notice`,text:`take control before sending`});return}if(t.startsWith(`!`)){let e=t.startsWith(`!!`),n=t.slice(e?2:1).trim();if(n===``)return;this.send({type:`bash`,command:n,excludeFromContext:e});return}this.send(this.streaming?{type:`steer`,text:t}:{type:`prompt`,text:t})}},abort:()=>{this.role===`controller`&&this.send({type:`abort`})},takeControl:()=>this.send({type:`request_control`}),releaseControl:()=>this.send({type:`release_control`}),setModel:e=>this.send({type:`set_model`,model:e}),cycleModel:()=>this.send({type:`cycle_model`}),setThinkingLevel:e=>this.send({type:`set_thinking_level`,level:e}),compact:e=>this.send({type:`compact`,...e?{instructions:e}:{}}),answerDialog:e=>{this.send(e),this.dispatch({kind:`dismiss-dialog`})},cancelDialog:()=>{let e=this.state.dialog?.id;e!==void 0&&this.send({type:`extension_ui_response`,id:e,cancelled:!0}),this.dispatch({kind:`dismiss-dialog`})},reconnect:()=>{this.timer&&clearTimeout(this.timer),this.gen+=1,this.noBrokerAttempts=0,this.client?.close(),this.dispatch({kind:`connecting`}),this.dial()},clearNotice:()=>this.dispatch({kind:`notice`,text:null})}}},p_=4,m_=new class{handles=new Map;mru=[];poolListeners=new Set;warmIdsSnapshot=[];acquire(e){let t=this.handles.get(e);return t||(t=new f_(e),this.handles.set(e,t)),this.touch(e),this.notifyPool(),this.evictExcess(),t}focus(e){this.handles.get(e)?.focus()}background(e){this.handles.get(e)?.background()}subscribe=e=>(this.poolListeners.add(e),()=>{this.poolListeners.delete(e)});getWarmIds=()=>this.warmIdsSnapshot;evict(e){let t=this.handles.get(e);if(!t)return;t.pinned=!1,t.dispose(),this.handles.delete(e);let n=this.mru.indexOf(e);n!==-1&&this.mru.splice(n,1),this.notifyPool()}touch(e){let t=this.mru.indexOf(e);t!==-1&&this.mru.splice(t,1),this.mru.push(e)}evictExcess(){for(let e=0;e<this.mru.length&&this.mru.length>p_;){let t=this.mru[e],n=this.handles.get(t);if(n?.pinned){e+=1;continue}n?.dispose(),this.handles.delete(t),this.mru.splice(e,1),this.notifyPool()}}notifyPool(){this.warmIdsSnapshot=[...this.mru];for(let e of this.poolListeners)e()}};function h_(e){let t=m_.acquire(e);return{state:(0,v.useSyncExternalStore)(t.subscribe,t.getState),actions:t.actions}}var g_={branch:null,model:null,tokens:null,context:null,tool_calls:null,stats:null,git_status:null};function __(e,t){return{sessionId:t.state?.sessionId??e,sessionFile:t.state?.sessionFile??null,model:t.state?.model??null,isStreaming:!1,thinkingLevel:t.state?.thinkingLevel??`off`,steeringMode:t.state?.steeringMode??`all`,followUpMode:t.state?.followUpMode??`all`,sessionName:t.state?.sessionName??null,autoCompactionEnabled:t.state?.autoCompactionEnabled??!1,pendingMessageCount:t.state?.pendingMessageCount??0}}function v_(e){let{state:t,actions:n}=h_(e),r=lp(e=>e.reachable),[i,a]=(0,v.useState)(null);(0,v.useEffect)(()=>{let n=!1;if(t.conn!==`no-broker`){a(null);return}return qf(e).then(t=>{if(n)return;a(t);let r=hg({nodeId:e,messages:eg(t.snapshot).messages,sessionState:__(e,t.snapshot),commands:t.commands,isStreaming:!1,activity:null,updatedAt:Date.now(),source:`static`});Hg(r),Yg(r)}).catch(()=>{n||a(null)}),()=>{n=!0}},[e,t.conn]);let o=t.conn===`no-broker`&&i?.node_id===e?i:null,s=(0,v.useMemo)(()=>o===null?null:eg(o.snapshot),[o]),c=(0,v.useMemo)(()=>t.session===null?null:{...t.session,isStreaming:t.conv.isStreaming},[t.session,t.conv.isStreaming]),l=(0,v.useMemo)(()=>t.conn===`connecting`||t.conn===`closed`?null:o===null?c:__(e,o.snapshot),[e,o,t.conn,c]),u=(0,v.useMemo)(()=>o===null?{...g_,model:t.model??null}:{...g_,model:o.snapshot.state?.model??null},[o,t.model]),d=s?.messages??t.conv.messages,f=s?.partialToolResults??t.conv.partialToolResults,p=s?.executingToolIds??t.conv.executingToolIds,m=s?.queued??t.conv.queued,h=o?.commands??t.commands;return{messages:d,partialToolResults:f,executingToolIds:p,queued:m,state:l,role:t.role,chrome:u,dialog:t.dialog,commands:h,presence:{viewers:0,controller:t.controllerId},brokerStatus:t.conn===`open`?`connected`:t.conn===`closed`||t.conn===`connecting`?`reconnecting`:`down`,source:t.conn===`no-broker`?`static`:`broker`,serverConnected:r,socketReady:t.conn===`open`,error:t.notice?{code:`broker_unavailable`,message:t.notice}:null,reconnect:n.reconnect,prompt:e=>n.sendText(e),steer:e=>n.sendText(e),abort:n.abort,setModel:n.setModel,cycleModel:n.cycleModel,setThinkingLevel:n.setThinkingLevel,compact:n.compact,requestControl:n.takeControl,releaseControl:n.releaseControl,dialogResponse:(e,t)=>n.answerDialog({type:`extension_ui_response`,id:e,...t})}}var y_=400,b_=4e3;function x_(e){return e.dormant&&e.status===`active`&&e.socketReady&&e.attempt<8}function S_(e){return Math.min(b_,y_*2**Math.max(0,e))}var C_=1,w_=400;function T_(e){return`crtr.web.draft.${e}`}function E_(e,t){if(typeof t!=`object`||!t)return!1;let n=t;return n.schemaVersion===C_&&n.nodeId===e&&typeof n.text==`string`&&typeof n.updatedAt==`number`}function D_(e){try{let t=globalThis.localStorage?.getItem(T_(e));if(t==null)return``;let n=JSON.parse(t);return E_(e,n)?n.text:``}catch{return``}}function O_(e,t){let n={schemaVersion:C_,nodeId:e,text:t,updatedAt:Date.now()};try{globalThis.localStorage?.setItem(T_(e),JSON.stringify(n))}catch{}}function k_(e){try{globalThis.localStorage?.removeItem(T_(e))}catch{}}var A_=new Map;function j_(e,t){let n=A_.get(e);n&&clearTimeout(n);let r=setTimeout(()=>{A_.delete(e),t===``?k_(e):O_(e,t)},w_);A_.set(e,r)}function M_(e){let t=A_.get(e);t&&(clearTimeout(t),A_.delete(e))}function N_(e){let t=v_(e),[n,r]=(0,v.useState)(null);(0,v.useEffect)(()=>(m_.focus(e),()=>{m_.background(e)}),[e]);let[i,a]=(0,v.useState)(``);(0,v.useEffect)(()=>{a(D_(e))},[e]),(0,v.useEffect)(()=>{j_(e,i)},[e,i]);let[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),f=t.source===`static`,p=t.brokerStatus===`connected`,m=t.role===`controller`,h=t.state?.isStreaming??!1,g=m&&!f&&p&&t.serverConnected,_=t.commands;(0,v.useEffect)(()=>{let t=!1;return Kf(e).then(e=>{t||r(e)}).catch(e=>{t||l(P_(e))}),()=>{t=!0}},[e]);let y=(0,v.useRef)(0);(0,v.useEffect)(()=>{y.current=0},[e]),(0,v.useEffect)(()=>{if(!x_({dormant:f,status:n?.status,socketReady:t.socketReady,attempt:y.current}))return;let e=y.current;y.current+=1;let r=setTimeout(()=>t.reconnect(),S_(e));return()=>clearTimeout(r)},[f,n?.status,t.socketReady,t.reconnect]);let b=()=>{let n=i.trim();!n||!g||(h?t.steer(n):t.prompt(n),M_(e),k_(e),a(``))};return{store:t,detail:n,input:i,setInput:a,reviving:o,actionError:c,peekedPath:u,setPeekedPath:d,dormant:f,brokerUp:p,isController:m,streaming:h,canDrive:g,commands:_,sendPrimary:b,onInputKeyDown:e=>{qm(e,a,b)},selectCommand:e=>{a(`/${e.name} `)},doRevive:async()=>{s(!0),l(null);try{await Xf(e),t.reconnect()}catch(e){l(P_(e))}finally{s(!1)}},doClose:async()=>{l(null);try{await Zf(e)}catch(e){l(P_(e))}}}}function P_(e){return e instanceof Hf?`${e.code}: ${e.message}`:String(e)}function F_(e){let t=(0,v.useMemo)(()=>{let t=e.query;return t.startsWith(`/`)?t.slice(1).trimStart().toLowerCase():``},[e.query]),n=(0,v.useMemo)(()=>{let n=e.commands;return t?n.filter(e=>e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.source.toLowerCase().includes(t)):n},[t,e.commands]);return e.visible?(0,z.jsx)(`div`,{className:`absolute bottom-full left-0 right-0 z-20 mb-1 max-h-72 overflow-auto border border-border bg-popover`,children:n.length>0?(0,z.jsx)(`ul`,{className:`flex flex-col divide-y divide-border/40`,children:n.map(t=>(0,z.jsxs)(`li`,{className:`flex cursor-pointer flex-wrap items-baseline gap-x-2 gap-y-0.5 px-3 py-2 hover:bg-accent/50`,onClick:()=>e.onSelect(t),children:[(0,z.jsxs)(`span`,{className:`font-mono text-sm font-semibold text-primary`,children:[`/`,t.name]}),t.argument_hint&&(0,z.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground/70`,children:t.argument_hint}),(0,z.jsxs)(`span`,{className:`ml-auto font-mono text-xs text-muted-foreground/50`,children:[t.source,t.location&&(0,z.jsxs)(z.Fragment,{children:[` · `,t.location]})]}),(0,z.jsx)(`span`,{className:`basis-full text-xs text-muted-foreground`,children:t.description})]},t.name))}):(0,z.jsx)(`div`,{className:`px-3 py-2 text-xs italic text-muted-foreground`,children:`no matching commands`})}):null}var I_=new Set([`select`,`confirm`,`input`,`editor`,`notify`]);function L_(e){return I_.has(e.method)}function R_(e){let t=e.store.dialog,n=t&&L_(t)?t:null,r=e.store.role===`controller`;return(0,z.jsx)(Ep,{open:n!==null,children:(0,z.jsx)(kp,{showCloseButton:!1,className:n&&!r?`opacity-90`:void 0,children:n&&(r?(0,z.jsx)(U_,{req:n,store:e.store},n.id):(0,z.jsx)(z_,{req:n},n.id))})})}function z_(e){return(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsx)(`p`,{className:`text-sm font-semibold`,children:`The controller is being prompted`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:H_(e.req)})]})}function B_(e){switch(e){case`error`:return`border-destructive/40 text-destructive`;case`warning`:return`border-warning/40 text-warning`;case`success`:return`border-success/40 text-success`;default:return`border-border text-foreground`}}function V_(e){let t=/https?:\/\/[^\s]+/g;return e.split(`
|
|
52
|
+
`).map((e,n)=>{let r=[],i=0,a;for(;a=t.exec(e);)a.index>i&&r.push(e.slice(i,a.index)),r.push((0,z.jsx)(`a`,{href:a[0],target:`_blank`,rel:`noopener noreferrer`,className:`underline break-all`,children:a[0]},a.index)),i=a.index+a[0].length;return i<e.length&&r.push(e.slice(i)),(0,z.jsxs)(`span`,{children:[n>0&&(0,z.jsx)(`br`,{}),r]},n)})}function H_(e){switch(e.method){case`select`:return`${e.title} — ${e.options.length} options`;case`confirm`:return`${e.title}: ${e.message}`;case`input`:return e.title;case`editor`:return e.title;case`notify`:return e.message}}function U_(e){let t=()=>e.store.dialogResponse(e.req.id,{cancelled:!0});return e.req.method===`select`?(0,z.jsx)(W_,{req:e.req,store:e.store,cancel:t}):(0,z.jsx)(G_,{req:e.req,store:e.store,cancel:t})}function W_(e){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ap,{children:(0,z.jsx)(Mp,{children:e.req.title})}),(0,z.jsx)(`ul`,{className:`flex flex-col gap-2`,children:e.req.options.map(t=>(0,z.jsx)(`li`,{children:(0,z.jsx)(Z,{variant:`secondary`,className:`w-full justify-start`,onClick:()=>e.store.dialogResponse(e.req.id,{value:t}),children:t})},t))}),(0,z.jsx)(jp,{children:(0,z.jsx)(Z,{type:`button`,variant:`secondary`,onClick:e.cancel,children:`Cancel`})})]})}function G_(e){let[t,n]=(0,v.useState)(e.req.method===`editor`?e.req.prefill??``:``);if(e.req.method===`confirm`){let t=e.req;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ap,{children:(0,z.jsx)(Mp,{children:t.title})}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t.message}),(0,z.jsxs)(jp,{children:[(0,z.jsx)(Z,{variant:`secondary`,onClick:()=>e.store.dialogResponse(t.id,{confirmed:!1}),children:`No`}),(0,z.jsx)(Z,{onClick:()=>e.store.dialogResponse(t.id,{confirmed:!0}),children:`Yes`})]})]})}if(e.req.method===`input`||e.req.method===`editor`){let r=e.req;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ap,{children:(0,z.jsx)(Mp,{children:V_(r.title)})}),r.method===`editor`?(0,z.jsx)(Up,{className:`resize-none font-mono text-sm`,rows:8,value:t,onChange:e=>n(e.currentTarget.value),autoFocus:!0}):(0,z.jsx)(Pp,{placeholder:r.placeholder??``,value:t,onChange:e=>n(e.currentTarget.value),autoFocus:!0}),(0,z.jsxs)(jp,{children:[(0,z.jsx)(Z,{type:`button`,variant:`secondary`,onClick:e.cancel,children:`Cancel`}),(0,z.jsx)(Z,{onClick:()=>e.store.dialogResponse(r.id,{value:t}),children:`Submit`})]})]})}if(e.req.method===`notify`){let t=e.req;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:Y(`rounded-none border px-3 py-2 text-sm`,B_(t.notifyType)),children:V_(t.message)}),(0,z.jsx)(jp,{children:(0,z.jsx)(Z,{onClick:()=>e.store.dialogResponse(t.id,{confirmed:!0}),children:`OK`})})]})}return null}function K_(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function q_(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function J_(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var Y_=(e,t)=>Math.abs(e-t)<1.01,X_=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},Z_,Q_=()=>{if(Z_!==void 0)return Z_;if(typeof navigator>`u`)return Z_=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Z_=!0;let e=navigator.maxTouchPoints;return Z_=navigator.platform===`MacIntel`&&e!==void 0&&e>0},$_=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},ev=e=>e,tv=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},nv=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i($_(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i($_(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},rv={passive:!0},iv=typeof window>`u`||`onscrollend`in window,av=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&iv,o=0,s=a?null:X_(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,rv),a&&r.addEventListener(`scrollend`,u,rv),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u)}},ov=(e,t)=>av(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),sv=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},cv=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},lv=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ev,rangeExtractor:tv,onChange:()=>{},measureElement:sv,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=e.start+t;n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=q_(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!Q_()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,rv),e.addEventListener(`touchend`,n,rv),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(Q_()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=q_(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,a,o)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=q_(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o},s)=>{let c=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=this.options.gap,a=e*2,o=this._flatMeasurements;if(!o||o.length<a){let e=new Float64Array(a);o&&l>0&&e.set(o.subarray(0,l*2)),o=e,this._flatMeasurements=o}let s;if(l===0)s=t+n;else{let e=l-1;s=o[e*2]+o[e*2+1]+i}for(let t=l;t<e;t++){let e=r(t),n=c.get(e),a=typeof n==`number`?n:this.options.estimateSize(t);o[t*2]=s,o[t*2+1]=a,s+=a+i}let u=K_(e,o,r);return this.measurementsCache=u,u}let u=this.measurementsCache.slice(0,l),d=Array(a).fill(void 0);for(let e=0;e<l;e++){let t=u[e];t&&(d[t.lane]=e)}for(let i=l;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),s,l,f=o===`estimate`||c.has(e);if(a!==void 0&&this.options.lanes>1){s=a;let e=d[s],r=e===void 0?void 0:u[e];l=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?u[i-1]:this.getFurthestMeasurement(u,i);l=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&f&&this.laneAssignments.set(i,s)}let p=c.get(e),m=typeof p==`number`?p:this.options.estimateSize(i),h=l+m;u[i]={index:i,start:l,size:m,end:h,key:e,lane:s},d[s]=i}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=q_(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=fv(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=q_(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(e<0||e>=this.options.count)return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=t-(this.itemSizeCache.get(i)??n);if(o!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,s=a?this.getTotalSize():0,c=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?r<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(i)||this.scrollDirection!==`backward`):this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},o,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++,a?this.applyScrollAdjustment(this.getTotalSize()-s):c&&this.applyScrollAdjustment(o),this.notify(!1)}},this.getVirtualItems=q_(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return J_(t[uv(0,t.length-1,r?e=>n[e*2]:e=>J_(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){e!==0&&(Q_()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&Y_(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},uv=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function dv(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function fv(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=dv(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=uv(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var pv=typeof document<`u`?v.useLayoutEffect:v.useEffect;function mv({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=v.useReducer(e=>e+1,0)[1],a=v.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}let r=!!e.options.horizontal,i=t.mode===`transform`,o=r?`left`:`top`,s=e.options.scrollMargin,c=e.getVirtualItems();for(let n of c){let a=n.start-s,c=e.elementsCache.get(n.key);c&&t.lastPositions.get(c)!==a&&(t.lastPositions.set(c,a),i?c.style.transform=r?`translate3d(${a}px, 0, 0)`:`translate3d(0, ${a}px, 0)`:c.style[o]=`${a}px`)}},s={...r,onChange:(t,n)=>{var s;let c=a.current,l=!0;if(c.enabled){o(t);let e=t.range,n=c.prevRange;l=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,l&&(c.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}l&&(e&&n?(0,y.flushSync)(i):i()),(s=r.onChange)==null||s.call(r,t,n)}},[c]=v.useState(()=>{let e=new lv(s);return Object.assign(e,{containerRef:t=>{let n=a.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return c.setOptions(s),pv(()=>c._didMount(),[]),pv(()=>c._willUpdate()),pv(()=>{o(c)}),c}function hv(e){return mv({observeElementRect:nv,observeElementOffset:ov,scrollToFn:cv,...e})}var gv={};function _v(e){let t=gv[e];if(t)return t;t=gv[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);t.push(n)}for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t[r]=`%`+(`0`+r.toString(16).toUpperCase()).slice(-2)}return t}function vv(e,t){typeof t!=`string`&&(t=vv.defaultChars);let n=_v(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t=``;for(let r=0,i=e.length;r<i;r+=3){let a=parseInt(e.slice(r+1,r+3),16);if(a<128){t+=n[a];continue}if((a&224)==192&&r+3<i){let n=parseInt(e.slice(r+4,r+6),16);if((n&192)==128){let e=a<<6&1984|n&63;e<128?t+=`��`:t+=String.fromCharCode(e),r+=3;continue}}if((a&240)==224&&r+6<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16);if((n&192)==128&&(i&192)==128){let e=a<<12&61440|n<<6&4032|i&63;e<2048||e>=55296&&e<=57343?t+=`���`:t+=String.fromCharCode(e),r+=6;continue}}if((a&248)==240&&r+9<i){let n=parseInt(e.slice(r+4,r+6),16),i=parseInt(e.slice(r+7,r+9),16),o=parseInt(e.slice(r+10,r+12),16);if((n&192)==128&&(i&192)==128&&(o&192)==128){let e=a<<18&1835008|n<<12&258048|i<<6&4032|o&63;e<65536||e>1114111?t+=`����`:(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(e&1023))),r+=9;continue}}t+=`�`}return t})}vv.defaultChars=`;/?:@&=+$,#`,vv.componentChars=``;var yv={};function bv(e){let t=yv[e];if(t)return t;t=yv[e]=[];for(let e=0;e<128;e++){let n=String.fromCharCode(e);/^[0-9a-z]$/i.test(n)?t.push(n):t.push(`%`+(`0`+e.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function xv(e,t,n){typeof t!=`string`&&(n=t,t=xv.defaultChars),n===void 0&&(n=!0);let r=bv(t),i=``;for(let t=0,a=e.length;t<a;t++){let o=e.charCodeAt(t);if(n&&o===37&&t+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3))){i+=e.slice(t,t+3),t+=2;continue}if(o<128){i+=r[o];continue}if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&t+1<a){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+=`%EF%BF%BD`;continue}i+=encodeURIComponent(e[t])}return i}xv.defaultChars=`;/?:@&=+$,-_.!~*'()#`,xv.componentChars=`-_.!~*'()`;function Sv(e){let t=``;return t+=e.protocol||``,t+=e.slashes?`//`:``,t+=e.auth?e.auth+`@`:``,e.hostname&&e.hostname.indexOf(`:`)!==-1?t+=`[`+e.hostname+`]`:t+=e.hostname||``,t+=e.port?`:`+e.port:``,t+=e.pathname||``,t+=e.search||``,t+=e.hash||``,t}function Cv(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var wv=/^([a-z0-9.+-]+:)/i,Tv=/:[0-9]*$/,Ev=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Dv=[`%`,`/`,`?`,`;`,`#`,`'`,`{`,`}`,`|`,`\\`,`^`,"`",`<`,`>`,`"`,"`",` `,`\r`,`
|
|
53
|
+
`,` `],Ov=[`/`,`?`,`#`],kv=255,Av=/^[+a-z0-9A-Z_-]{0,63}$/,jv=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Mv={javascript:!0,"javascript:":!0},Nv={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Pv(e,t){if(e&&e instanceof Cv)return e;let n=new Cv;return n.parse(e,t),n}Cv.prototype.parse=function(e,t){let n,r,i,a=e;if(a=a.trim(),!t&&e.split(`#`).length===1){let e=Ev.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let o=wv.exec(a);if(o&&(o=o[0],n=o.toLowerCase(),this.protocol=o,a=a.substr(o.length)),(t||o||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)===`//`,i&&!(o&&Mv[o])&&(a=a.substr(2),this.slashes=!0)),!Mv[o]&&(i||o&&!Nv[o])){let e=-1;for(let t=0;t<Ov.length;t++)r=a.indexOf(Ov[t]),r!==-1&&(e===-1||r<e)&&(e=r);let t,n;n=e===-1?a.lastIndexOf(`@`):a.lastIndexOf(`@`,e),n!==-1&&(t=a.slice(0,n),a=a.slice(n+1),this.auth=t),e=-1;for(let t=0;t<Dv.length;t++)r=a.indexOf(Dv[t]),r!==-1&&(e===-1||r<e)&&(e=r);e===-1&&(e=a.length),a[e-1]===`:`&&e--;let i=a.slice(0,e);a=a.slice(e),this.parseHost(i),this.hostname=this.hostname||``;let o=this.hostname[0]===`[`&&this.hostname[this.hostname.length-1]===`]`;if(!o){let e=this.hostname.split(/\./);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n&&!n.match(Av)){let r=``;for(let e=0,t=n.length;e<t;e++)n.charCodeAt(e)>127?r+=`x`:r+=n[e];if(!r.match(Av)){let r=e.slice(0,t),i=e.slice(t+1),o=n.match(jv);o&&(r.push(o[1]),i.unshift(o[2])),i.length&&(a=i.join(`.`)+a),this.hostname=r.join(`.`);break}}}}this.hostname.length>kv&&(this.hostname=``),o&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let s=a.indexOf(`#`);s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));let c=a.indexOf(`?`);return c!==-1&&(this.search=a.substr(c),a=a.slice(0,c)),a&&(this.pathname=a),Nv[n]&&this.hostname&&!this.pathname&&(this.pathname=``),this},Cv.prototype.parseHost=function(e){let t=Tv.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Fv=s({decode:()=>vv,encode:()=>xv,format:()=>Sv,parse:()=>Pv}),Iv=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Lv=/[\0-\x1F\x7F-\x9F]/,Rv=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,zv=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Bv=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Vv=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Hv=s({Any:()=>Iv,Cc:()=>Lv,Cf:()=>Rv,P:()=>zv,S:()=>Bv,Z:()=>Vv}),Uv=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),Wv=new Uint16Array(`Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢`.split(``).map(e=>e.charCodeAt(0))),Gv=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Kv=String.fromCodePoint??function(e){let t=``;return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function qv(e){return e>=55296&&e<=57343||e>1114111?65533:Gv.get(e)??e}var Jv;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(Jv||={});var Yv=32,Xv;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Xv||={});function Zv(e){return e>=Jv.ZERO&&e<=Jv.NINE}function Qv(e){return e>=Jv.UPPER_A&&e<=Jv.UPPER_F||e>=Jv.LOWER_A&&e<=Jv.LOWER_F}function $v(e){return e>=Jv.UPPER_A&&e<=Jv.UPPER_Z||e>=Jv.LOWER_A&&e<=Jv.LOWER_Z||Zv(e)}function ey(e){return e===Jv.EQUALS||$v(e)}var ty;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(ty||={});var ny;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(ny||={});var ry=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=ty.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ny.Strict}startEntity(e){this.decodeMode=e,this.state=ty.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case ty.EntityStart:return e.charCodeAt(t)===Jv.NUM?(this.state=ty.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=ty.NamedEntity,this.stateNamedEntity(e,t));case ty.NumericStart:return this.stateNumericStart(e,t);case ty.NumericDecimal:return this.stateNumericDecimal(e,t);case ty.NumericHex:return this.stateNumericHex(e,t);case ty.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Yv)===Jv.LOWER_X?(this.state=ty.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=ty.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(Zv(r)||Qv(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(Zv(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Jv.SEMI)this.consumed+=1;else if(this.decodeMode===ny.Strict)return 0;return this.emitCodePoint(qv(this.result),this.consumed),this.errors&&(e!==Jv.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Xv.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=ay(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===ny.Attribute&&(i===0||ey(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Xv.VALUE_LENGTH)>>14,i!==0){if(a===Jv.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==ny.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Xv.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Xv.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case ty.NamedEntity:return this.result!==0&&(this.decodeMode!==ny.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ty.NumericDecimal:return this.emitNumericEntity(0,2);case ty.NumericHex:return this.emitNumericEntity(0,3);case ty.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ty.EntityStart:return 0}}};function iy(e){let t=``,n=new ry(e,e=>t+=Kv(e));return function(e,r){let i=0,a=0;for(;(a=e.indexOf(`&`,a))>=0;){t+=e.slice(i,a),n.startEntity(r);let o=n.write(e,a+1);if(o<0){i=a+n.end();break}i=a+o,a=o===0?i+1:i}let o=t+e.slice(i);return t=``,o}}function ay(e,t,n,r){let i=(t&Xv.BRANCH_LENGTH)>>7,a=t&Xv.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var oy=iy(Uv);iy(Wv);function sy(e,t=ny.Legacy){return oy(e,t)}function cy(e){return oy(e,ny.Strict)}var ly=s({arrayReplaceAt:()=>hy,asciiTrim:()=>Ry,assign:()=>my,escapeHtml:()=>Oy,escapeRE:()=>Ay,fromCodePoint:()=>_y,has:()=>py,isMdAsciiPunct:()=>Fy,isPunctChar:()=>Ny,isPunctCharCode:()=>Py,isSpace:()=>jy,isString:()=>dy,isValidEntityCode:()=>gy,isWhiteSpace:()=>My,lib:()=>zy,normalizeReference:()=>Iy,unescapeAll:()=>Cy,unescapeMd:()=>Sy});function uy(e){return Object.prototype.toString.call(e)}function dy(e){return uy(e)===`[object String]`}var fy=Object.prototype.hasOwnProperty;function py(e,t){return fy.call(e,t)}function my(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if(typeof t!=`object`)throw TypeError(t+`must be object`);Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function hy(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function gy(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function _y(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var vy=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,yy=RegExp(vy.source+`|&([a-z#][a-z0-9]{1,31});`,`gi`),by=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function xy(e,t){if(t.charCodeAt(0)===35&&by.test(t)){let n=t[1].toLowerCase()===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return gy(n)?_y(n):e}let n=sy(e);return n===e?e:n}function Sy(e){return e.indexOf(`\\`)<0?e:e.replace(vy,`$1`)}function Cy(e){return e.indexOf(`\\`)<0&&e.indexOf(`&`)<0?e:e.replace(yy,function(e,t,n){return t||xy(e,n)})}var wy=/[&<>"]/,Ty=/[&<>"]/g,Ey={"&":`&`,"<":`<`,">":`>`,'"':`"`};function Dy(e){return Ey[e]}function Oy(e){return wy.test(e)?e.replace(Ty,Dy):e}var ky=/[.?*+^$[\]\\(){}|-]/g;function Ay(e){return e.replace(ky,`\\$&`)}function jy(e){switch(e){case 9:case 32:return!0}return!1}function My(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Ny(e){return zv.test(e)||Bv.test(e)}function Py(e){return Ny(_y(e))}function Fy(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Iy(e){return e=e.trim().replace(/\s+/g,` `),e.toLowerCase().toUpperCase()}function Ly(e){return e===32||e===9||e===10||e===13}function Ry(e){let t=0;for(;t<e.length&&Ly(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Ly(e.charCodeAt(n));n--);return e.slice(t,n+1)}var zy={mdurl:Fv,ucmicro:Hv};function By(e,t,n){let r,i,a,o,s=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<s;){if(a=e.src.charCodeAt(e.pos),a===93&&(r--,r===0)){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),a===91){if(o===e.pos-1)r++;else if(n)return e.pos=c,-1}}let l=-1;return i&&(l=e.pos),e.pos=c,l}function Vy(e,t,n){let r,i=t,a={ok:!1,pos:0,str:``};if(e.charCodeAt(i)===60){for(i++;i<n;){if(r=e.charCodeAt(i),r===10||r===60)return a;if(r===62)return a.pos=i+1,a.str=Cy(e.slice(t+1,i)),a.ok=!0,a;if(r===92&&i+1<n){i+=2;continue}i++}return a}let o=0;for(;i<n&&(r=e.charCodeAt(i),!(r===32||r<32||r===127));){if(r===92&&i+1<n){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(r===40&&(o++,o>32))return a;if(r===41){if(o===0)break;o--}i++}return t===i||o!==0?a:(a.str=Cy(e.slice(t,i)),a.pos=i,a.ok=!0,a)}function Hy(e,t,n,r){let i,a=t,o={ok:!1,can_continue:!1,pos:0,str:``,marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(a>=n)return o;let r=e.charCodeAt(a);if(r!==34&&r!==39&&r!==40)return o;t++,a++,r===40&&(r=41),o.marker=r}for(;a<n;){if(i=e.charCodeAt(a),i===o.marker)return o.pos=a+1,o.str+=Cy(e.slice(t,a)),o.ok=!0,o;if(i===40&&o.marker===41)return o;i===92&&a+1<n&&a++,a++}return o.can_continue=!0,o.str+=Cy(e.slice(t,a)),o}var Uy=s({parseLinkDestination:()=>Vy,parseLinkLabel:()=>By,parseLinkTitle:()=>Hy}),Wy={};Wy.code_inline=function(e,t,n,r,i){let a=e[t];return`<code`+i.renderAttrs(a)+`>`+Oy(a.content)+`</code>`},Wy.code_block=function(e,t,n,r,i){let a=e[t];return`<pre`+i.renderAttrs(a)+`><code>`+Oy(e[t].content)+`</code></pre>
|
|
54
|
+
`},Wy.fence=function(e,t,n,r,i){let a=e[t],o=a.info?Cy(a.info).trim():``,s=``,c=``;if(o){let e=o.split(/(\s+)/g);s=e[0],c=e.slice(2).join(``)}let l;if(l=n.highlight&&n.highlight(a.content,s,c)||Oy(a.content),l.indexOf(`<pre`)===0)return l+`
|
|
55
|
+
`;if(o){let e=a.attrIndex(`class`),t=a.attrs?a.attrs.slice():[];e<0?t.push([`class`,n.langPrefix+s]):(t[e]=t[e].slice(),t[e][1]+=` `+n.langPrefix+s);let r={attrs:t};return`<pre><code${i.renderAttrs(r)}>${l}</code></pre>\n`}return`<pre><code${i.renderAttrs(a)}>${l}</code></pre>\n`},Wy.image=function(e,t,n,r,i){let a=e[t];return a.attrs[a.attrIndex(`alt`)][1]=i.renderInlineAsText(a.children,n,r),i.renderToken(e,t,n)},Wy.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
|
|
56
|
+
`:`<br>
|
|
57
|
+
`},Wy.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
|
|
58
|
+
`:`<br>
|
|
59
|
+
`:`
|
|
60
|
+
`},Wy.text=function(e,t){return Oy(e[t].content)},Wy.html_block=function(e,t){return e[t].content},Wy.html_inline=function(e,t){return e[t].content};function Gy(){this.rules=my({},Wy)}Gy.prototype.renderAttrs=function(e){let t,n,r;if(!e.attrs)return``;for(r=``,t=0,n=e.attrs.length;t<n;t++)r+=` `+Oy(e.attrs[t][0])+`="`+Oy(e.attrs[t][1])+`"`;return r},Gy.prototype.renderToken=function(e,t,n){let r=e[t],i=``;if(r.hidden)return``;r.block&&r.nesting!==-1&&t&&e[t-1].hidden&&(i+=`
|
|
61
|
+
`),i+=(r.nesting===-1?`</`:`<`)+r.tag,i+=this.renderAttrs(r),r.nesting===0&&n.xhtmlOut&&(i+=` /`);let a=!1;if(r.block&&(a=!0,r.nesting===1&&t+1<e.length)){let n=e[t+1];(n.type===`inline`||n.hidden||n.nesting===-1&&n.tag===r.tag)&&(a=!1)}return i+=a?`>
|
|
62
|
+
`:`>`,i},Gy.prototype.renderInline=function(e,t,n){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;i[o]===void 0?r+=this.renderToken(e,a,t):r+=i[o](e,a,t,n,this)}return r},Gy.prototype.renderInlineAsText=function(e,t,n){let r=``;for(let i=0,a=e.length;i<a;i++)switch(e[i].type){case`text`:r+=e[i].content;break;case`image`:r+=this.renderInlineAsText(e[i].children,t,n);break;case`html_inline`:case`html_block`:r+=e[i].content;break;case`softbreak`:case`hardbreak`:r+=`
|
|
63
|
+
`;break;default:}return r},Gy.prototype.render=function(e,t,n){let r=``,i=this.rules;for(let a=0,o=e.length;a<o;a++){let o=e[a].type;o===`inline`?r+=this.renderInline(e[a].children,t,n):i[o]===void 0?r+=this.renderToken(e,a,t,n):r+=i[o](e,a,t,n,this)}return r};function Ky(){this.__rules__=[],this.__cache__=null}Ky.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},Ky.prototype.__compile__=function(){let e=this,t=[``];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))})})},Ky.prototype.at=function(e,t,n){let r=this.__find__(e),i=n||{};if(r===-1)throw Error(`Parser rule not found: `+e);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null},Ky.prototype.before=function(e,t,n,r){let i=this.__find__(e),a=r||{};if(i===-1)throw Error(`Parser rule not found: `+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},Ky.prototype.after=function(e,t,n,r){let i=this.__find__(e),a=r||{};if(i===-1)throw Error(`Parser rule not found: `+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},Ky.prototype.push=function(e,t,n){let r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},Ky.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error(`Rules manager: invalid rule name `+e)}this.__rules__[r].enabled=!0,n.push(e)},this),this.__cache__=null,n},Ky.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},Ky.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(e){let r=this.__find__(e);if(r<0){if(t)return;throw Error(`Rules manager: invalid rule name `+e)}this.__rules__[r].enabled=!1,n.push(e)},this),this.__cache__=null,n},Ky.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function qy(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content=``,this.markup=``,this.info=``,this.meta=null,this.block=!1,this.hidden=!1}qy.prototype.attrIndex=function(e){if(!this.attrs)return-1;let t=this.attrs;for(let n=0,r=t.length;n<r;n++)if(t[n][0]===e)return n;return-1},qy.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},qy.prototype.attrSet=function(e,t){let n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},qy.prototype.attrGet=function(e){let t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},qy.prototype.attrJoin=function(e,t){let n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+` `+t};function Jy(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Jy.prototype.Token=qy;var Yy=/\r\n?|\n/g,Xy=/\0/g;function Zy(e){let t;t=e.src.replace(Yy,`
|
|
64
|
+
`),t=t.replace(Xy,`�`),e.src=t}function Qy(e){let t;e.inlineMode?(t=new e.Token(`inline`,``,0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function $y(e){let t=e.tokens;for(let n=0,r=t.length;n<r;n++){let r=t[n];r.type===`inline`&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function eb(e){return/^<a[>\s]/i.test(e)}function tb(e){return/^<\/a\s*>/i.test(e)}function nb(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!==`inline`||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,i=0;for(let a=r.length-1;a>=0;a--){let o=r[a];if(o.type===`link_close`){for(a--;r[a].level!==o.level&&r[a].type!==`link_open`;)a--;continue}if(o.type===`html_inline`&&(eb(o.content)&&i>0&&i--,tb(o.content)&&i++),!(i>0)&&o.type===`text`&&e.md.linkify.test(o.content)){let i=o.content,s=e.md.linkify.match(i),c=[],l=o.level,u=0;s.length>0&&s[0].index===0&&a>0&&r[a-1].type===`text_special`&&(s=s.slice(1));for(let t=0;t<s.length;t++){let n=s[t].url,r=e.md.normalizeLink(n);if(!e.md.validateLink(r))continue;let a=s[t].text;a=s[t].schema?s[t].schema===`mailto:`&&!/^mailto:/i.test(a)?e.md.normalizeLinkText(`mailto:`+a).replace(/^mailto:/,``):e.md.normalizeLinkText(a):e.md.normalizeLinkText(`http://`+a).replace(/^http:\/\//,``);let o=s[t].index;if(o>u){let t=new e.Token(`text`,``,0);t.content=i.slice(u,o),t.level=l,c.push(t)}let d=new e.Token(`link_open`,`a`,1);d.attrs=[[`href`,r]],d.level=l++,d.markup=`linkify`,d.info=`auto`,c.push(d);let f=new e.Token(`text`,``,0);f.content=a,f.level=l,c.push(f);let p=new e.Token(`link_close`,`a`,-1);p.level=--l,p.markup=`linkify`,p.info=`auto`,c.push(p),u=s[t].lastIndex}if(u<i.length){let t=new e.Token(`text`,``,0);t.content=i.slice(u),t.level=l,c.push(t)}t[n].children=r=hy(r,a,c)}}}}var rb=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ib=/\((c|tm|r)\)/i,ab=/\((c|tm|r)\)/gi,ob={c:`©`,r:`®`,tm:`™`};function sb(e,t){return ob[t.toLowerCase()]}function cb(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&(r.content=r.content.replace(ab,sb)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function lb(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];r.type===`text`&&!t&&rb.test(r.content)&&(r.content=r.content.replace(/\+-/g,`±`).replace(/\.{2,}/g,`…`).replace(/([?!])…/g,`$1..`).replace(/([?!]){4,}/g,`$1$1$1`).replace(/,{2,}/g,`,`).replace(/(^|[^-])---(?=[^-]|$)/gm,`$1—`).replace(/(^|\s)--(?=\s|$)/gm,`$1–`).replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,`$1–`)),r.type===`link_open`&&r.info===`auto`&&t--,r.type===`link_close`&&r.info===`auto`&&t++}}function ub(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type===`inline`&&(ib.test(e.tokens[t].content)&&cb(e.tokens[t].children),rb.test(e.tokens[t].content)&&lb(e.tokens[t].children))}var db=/['"]/,fb=/['"]/g,pb=`’`;function mb(e,t,n,r){e[t]||(e[t]=[]),e[t].push({pos:n,ch:r})}function hb(e,t){let n=``,r=0;t.sort((e,t)=>e.pos-t.pos);for(let i=0;i<t.length;i++){let a=t[i];n+=e.slice(r,a.pos)+a.ch,r=a.pos+1}return n+e.slice(r)}function gb(e,t){let n,r=[],i={};for(let a=0;a<e.length;a++){let o=e[a],s=e[a].level;for(n=r.length-1;n>=0&&!(r[n].level<=s);n--);if(r.length=n+1,o.type!==`text`)continue;let c=o.content,l=0,u=c.length;OUTER:for(;l<u;){fb.lastIndex=l;let o=fb.exec(c);if(!o)break;let d=!0,f=!0;l=o.index+1;let p=o[0]===`'`,m=32;if(o.index-1>=0)m=c.charCodeAt(o.index-1);else for(n=a-1;n>=0&&!(e[n].type===`softbreak`||e[n].type===`hardbreak`);n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let h=32;if(l<u)h=c.charCodeAt(l);else for(n=a+1;n<e.length&&!(e[n].type===`softbreak`||e[n].type===`hardbreak`);n++)if(e[n].content){h=e[n].content.charCodeAt(0);break}let g=Fy(m)||Py(m),_=Fy(h)||Py(h),v=My(m),y=My(h);if(y?d=!1:_&&(v||g||(d=!1)),v?f=!1:g&&(y||_||(f=!1)),h===34&&o[0]===`"`&&m>=48&&m<=57&&(f=d=!1),d&&f&&(d=g,f=_),!d&&!f){p&&mb(i,a,o.index,pb);continue}if(f)for(n=r.length-1;n>=0;n--){let e=r[n];if(r[n].level<s)break;if(e.single===p&&r[n].level===s){e=r[n];let s,c;p?(s=t.md.options.quotes[2],c=t.md.options.quotes[3]):(s=t.md.options.quotes[0],c=t.md.options.quotes[1]),mb(i,a,o.index,c),mb(i,e.token,e.pos,s),r.length=n;continue OUTER}}d?r.push({token:a,pos:o.index,single:p,level:s}):f&&p&&mb(i,a,o.index,pb)}}Object.keys(i).forEach(function(t){e[t].content=hb(e[t].content,i[t])})}function _b(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!==`inline`||!db.test(e.tokens[t].content)||gb(e.tokens[t].children,e)}function vb(e){let t,n,r=e.tokens,i=r.length;for(let e=0;e<i;e++){if(r[e].type!==`inline`)continue;let i=r[e].children,a=i.length;for(t=0;t<a;t++)i[t].type===`text_special`&&(i[t].type=`text`);for(t=n=0;t<a;t++)i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}}var yb=[[`normalize`,Zy],[`block`,Qy],[`inline`,$y],[`linkify`,nb],[`replacements`,ub],[`smartquotes`,_b],[`text_join`,vb]];function bb(){this.ruler=new Ky;for(let e=0;e<yb.length;e++)this.ruler.push(yb[e][0],yb[e][1])}bb.prototype.process=function(e){let t=this.ruler.getRules(``);for(let n=0,r=t.length;n<r;n++)t[n](e)},bb.prototype.State=Jy;function xb(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType=`root`,this.level=0;let i=this.src;for(let e=0,t=0,n=0,r=0,a=i.length,o=!1;t<a;t++){let s=i.charCodeAt(t);if(!o)if(jy(s)){n++,s===9?r+=4-r%4:r++;continue}else o=!0;(s===10||t===a-1)&&(s!==10&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(n),this.sCount.push(r),this.bsCount.push(0),o=!1,n=0,r=0,e=t+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}xb.prototype.push=function(e,t,n){let r=new qy(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},xb.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},xb.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},xb.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t&&jy(this.src.charCodeAt(e));e++);return e},xb.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!jy(this.src.charCodeAt(--e)))return e+1;return e},xb.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},xb.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},xb.prototype.getLines=function(e,t,n,r){if(e>=t)return``;let i=Array(t-e);for(let a=0,o=e;o<t;o++,a++){let e=0,s=this.bMarks[o],c=s,l;for(l=o+1<t||r?this.eMarks[o]+1:this.eMarks[o];c<l&&e<n;){let t=this.src.charCodeAt(c);if(jy(t))t===9?e+=4-(e+this.bsCount[o])%4:e++;else if(c-s<this.tShift[o])e++;else break;c++}e>n?i[a]=Array(e-n+1).join(` `)+this.src.slice(c,l):i[a]=this.src.slice(c,l)}return i.join(``)},xb.prototype.Token=qy;var Sb=65536;function Cb(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function wb(e){let t=[],n=e.length,r=0,i=e.charCodeAt(r),a=!1,o=0,s=``;for(;r<n;)i===124&&(a?(s+=e.substring(o,r-1),o=r):(t.push(s+e.substring(o,r)),s=``,o=r+1)),a=i===92,r++,i=e.charCodeAt(r);return t.push(s+e.substring(o)),t}function Tb(e,t,n,r){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let a=e.bMarks[i]+e.tShift[i];if(a>=e.eMarks[i])return!1;let o=e.src.charCodeAt(a++);if(o!==124&&o!==45&&o!==58||a>=e.eMarks[i])return!1;let s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!jy(s)||o===45&&jy(s))return!1;for(;a<e.eMarks[i];){let t=e.src.charCodeAt(a);if(t!==124&&t!==45&&t!==58&&!jy(t))return!1;a++}let c=Cb(e,t+1),l=c.split(`|`),u=[];for(let e=0;e<l.length;e++){let t=l[e].trim();if(!t){if(e===0||e===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;t.charCodeAt(t.length-1)===58?u.push(t.charCodeAt(0)===58?`center`:`right`):t.charCodeAt(0)===58?u.push(`left`):u.push(``)}if(c=Cb(e,t).trim(),c.indexOf(`|`)===-1||e.sCount[t]-e.blkIndent>=4)return!1;l=wb(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop();let d=l.length;if(d===0||d!==u.length)return!1;if(r)return!0;let f=e.parentType;e.parentType=`table`;let p=e.md.block.ruler.getRules(`blockquote`),m=e.push(`table_open`,`table`,1),h=[t,0];m.map=h;let g=e.push(`thead_open`,`thead`,1);g.map=[t,t+1];let _=e.push(`tr_open`,`tr`,1);_.map=[t,t+1];for(let t=0;t<l.length;t++){let n=e.push(`th_open`,`th`,1);u[t]&&(n.attrs=[[`style`,`text-align:`+u[t]]]);let r=e.push(`inline`,``,0);r.content=l[t].trim(),r.children=[],e.push(`th_close`,`th`,-1)}e.push(`tr_close`,`tr`,-1),e.push(`thead_close`,`thead`,-1);let v,y=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let r=!1;for(let t=0,a=p.length;t<a;t++)if(p[t](e,i,n,!0)){r=!0;break}if(r||(c=Cb(e,i).trim(),!c)||e.sCount[i]-e.blkIndent>=4||(l=wb(c),l.length&&l[0]===``&&l.shift(),l.length&&l[l.length-1]===``&&l.pop(),y+=d-l.length,y>Sb))break;if(i===t+2){let n=e.push(`tbody_open`,`tbody`,1);n.map=v=[t+2,0]}let a=e.push(`tr_open`,`tr`,1);a.map=[i,i+1];for(let t=0;t<d;t++){let n=e.push(`td_open`,`td`,1);u[t]&&(n.attrs=[[`style`,`text-align:`+u[t]]]);let r=e.push(`inline`,``,0);r.content=l[t]?l[t].trim():``,r.children=[],e.push(`td_close`,`td`,-1)}e.push(`tr_close`,`tr`,-1)}return v&&(e.push(`tbody_close`,`tbody`,-1),v[1]=i),e.push(`table_close`,`table`,-1),h[1]=i,e.parentType=f,e.line=i,!0}function Eb(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,i=r;continue}break}e.line=i;let a=e.push(`code_block`,`code`,0);return a.content=e.getLines(t,i,4+e.blkIndent,!1)+`
|
|
65
|
+
`,a.map=[t,e.line],!0}function Db(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;let o=e.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let s=i;i=e.skipChars(i,o);let c=i-s;if(c<3)return!1;let l=e.src.slice(s,i),u=e.src.slice(i,a);if(o===96&&u.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(i=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],i<a&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(i)===o&&!(e.sCount[d]-e.blkIndent>=4)&&(i=e.skipChars(i,o),!(i-s<c)&&(i=e.skipSpaces(i),!(i<a)))){f=!0;break}c=e.sCount[t],e.line=d+ +!!f;let p=e.push(`fence`,`code`,0);return p.info=u,p.content=e.getLines(t+1,d,c,!0),p.markup=l,p.map=[t,e.line],!0}function Ob(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;let s=[],c=[],l=[],u=[],d=e.md.block.ruler.getRules(`blockquote`),f=e.parentType;e.parentType=`blockquote`;let p=!1,m;for(m=t;m<n;m++){let t=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i>=a)break;if(e.src.charCodeAt(i++)===62&&!t){let t=e.sCount[m]+1,n,r;e.src.charCodeAt(i)===32?(i++,t++,r=!1,n=!0):e.src.charCodeAt(i)===9?(n=!0,(e.bsCount[m]+t)%4==3?(i++,t++,r=!1):r=!0):n=!1;let o=t;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<a;){let t=e.src.charCodeAt(i);if(jy(t))t===9?o+=4-(o+e.bsCount[m]+ +!!r)%4:o++;else break;i++}p=i>=a,c.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+ +!!n,l.push(e.sCount[m]),e.sCount[m]=o-t,u.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let r=!1;for(let t=0,i=d.length;t<i;t++)if(d[t](e,m,n,!0)){r=!0;break}if(r){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]=-1}let h=e.blkIndent;e.blkIndent=0;let g=e.push(`blockquote_open`,`blockquote`,1);g.markup=`>`;let _=[t,0];g.map=_,e.md.block.tokenize(e,t,m);let v=e.push(`blockquote_close`,`blockquote`,-1);v.markup=`>`,e.lineMax=o,e.parentType=f,_[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=s[n],e.tShift[n+t]=u[n],e.sCount[n+t]=l[n],e.bsCount[n+t]=c[n];return e.blkIndent=h,!0}function kb(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(a++);if(o!==42&&o!==45&&o!==95)return!1;let s=1;for(;a<i;){let t=e.src.charCodeAt(a++);if(t!==o&&!jy(t))return!1;t===o&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;let c=e.push(`hr`,`hr`,0);return c.map=[t,e.line],c.markup=Array(s+1).join(String.fromCharCode(o)),!0}function Ab(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(r++);return i!==42&&i!==45&&i!==43||r<n&&!jy(e.src.charCodeAt(r))?-1:r}function jb(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=r)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<r&&(a=e.src.charCodeAt(i),!jy(a))?-1:i}function Mb(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&e.tokens[r].type===`paragraph_open`&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Nb(e,t,n,r){let i,a,o,s,c=t,l=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let u=!1;r&&e.parentType===`paragraph`&&e.sCount[c]>=e.blkIndent&&(u=!0);let d,f,p;if((p=jb(e,c))>=0){if(d=!0,o=e.bMarks[c]+e.tShift[c],f=Number(e.src.slice(o,p-1)),u&&f!==1)return!1}else if((p=Ab(e,c))>=0)d=!1;else return!1;if(u&&e.skipSpaces(p)>=e.eMarks[c])return!1;if(r)return!0;let m=e.src.charCodeAt(p-1),h=e.tokens.length;d?(s=e.push(`ordered_list_open`,`ol`,1),f!==1&&(s.attrs=[[`start`,f]])):s=e.push(`bullet_list_open`,`ul`,1);let g=[c,0];s.map=g,s.markup=String.fromCharCode(m);let _=!1,v=e.md.block.ruler.getRules(`list`),y=e.parentType;for(e.parentType=`list`;c<n;){a=p,i=e.eMarks[c];let t=e.sCount[c]+p-(e.bMarks[c]+e.tShift[c]),r=t;for(;a<i;){let t=e.src.charCodeAt(a);if(t===9)r+=4-(r+e.bsCount[c])%4;else if(t===32)r++;else break;a++}let u=a,f;f=u>=i?1:r-t,f>4&&(f=1);let h=t+f;s=e.push(`list_item_open`,`li`,1),s.markup=String.fromCharCode(m);let g=[c,0];s.map=g,d&&(s.info=e.src.slice(o,p-1));let y=e.tight,b=e.tShift[c],x=e.sCount[c],S=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=h,e.tight=!0,e.tShift[c]=u-e.bMarks[c],e.sCount[c]=r,u>=i&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n,!0),(!e.tight||_)&&(l=!1),_=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=S,e.tShift[c]=b,e.sCount[c]=x,e.tight=y,s=e.push(`list_item_close`,`li`,-1),s.markup=String.fromCharCode(m),c=e.line,g[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let C=!1;for(let t=0,r=v.length;t<r;t++)if(v[t](e,c,n,!0)){C=!0;break}if(C)break;if(d){if(p=jb(e,c),p<0)break;o=e.bMarks[c]+e.tShift[c]}else if(p=Ab(e,c),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return s=d?e.push(`ordered_list_close`,`ol`,-1):e.push(`bullet_list_close`,`ul`,-1),s.markup=String.fromCharCode(m),g[1]=c,e.line=c,e.parentType=y,l&&Mb(e,h),!0}function Pb(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules(`reference`),i=e.parentType;e.parentType=`reference`;let a=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,t,n,!0)){a=!0;break}if(e.parentType=i,a)return null}let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];return e.src.slice(i,a+1)}let c=e.src.slice(i,a+1);a=c.length;let l=-1;for(i=1;i<a;i++){let e=c.charCodeAt(i);if(e===91)return!1;if(e===93){l=i;break}else if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(e===92&&(i++,i<a&&c.charCodeAt(i)===10)){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}}if(l<0||c.charCodeAt(l+1)!==58)return!1;for(i=l+2;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!jy(e))break}let u=e.md.helpers.parseLinkDestination(c,i,a);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;i=u.pos;let f=i,p=o,m=i;for(;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!jy(e))break}let h=e.md.helpers.parseLinkTitle(c,i,a);for(;h.can_continue;){let t=s(o);if(t===null)break;c+=t,i=a,a=c.length,o++,h=e.md.helpers.parseLinkTitle(c,i,a,h)}let g;for(i<a&&m!==i&&h.ok?(g=h.str,i=h.pos):(g=``,i=f,o=p);i<a&&jy(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10&&g)for(g=``,i=f,o=p;i<a&&jy(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10)return!1;let _=Iy(c.slice(1,l));return _?r?!0:(e.env.references===void 0&&(e.env.references={}),e.env.references[_]===void 0&&(e.env.references[_]={title:g,href:d}),e.line=o,!0):!1}var Fb=`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(`.`),Ib=RegExp(`^(?:<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),Lb=RegExp(`^(?:<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>)`),Rb=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(`+Fb.join(`|`)+`)(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(Lb.source+`\\s*$`),/^$/,!1]];function zb(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<Rb.length&&!Rb[s][0].test(o);s++);if(s===Rb.length)return!1;if(r)return Rb[s][2];let c=t+1,l=Rb[s][1].test(``);if(!Rb[s][1].test(o)){for(;c<n&&!(e.sCount[c]<e.blkIndent&&(l||!e.isEmpty(c)));c++)if(i=e.bMarks[c]+e.tShift[c],a=e.eMarks[c],o=e.src.slice(i,a),Rb[s][1].test(o)){o.length!==0&&c++;break}}e.line=c;let u=e.push(`html_block`,``,0);return u.map=[t,c],u.content=e.getLines(t,c,e.blkIndent,!0),!0}function Bb(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(o!==35||i>=a)return!1;let s=1;for(o=e.src.charCodeAt(++i);o===35&&i<a&&s<=6;)s++,o=e.src.charCodeAt(++i);if(s>6||i<a&&!jy(o))return!1;if(r)return!0;a=e.skipSpacesBack(a,i);let c=e.skipCharsBack(a,35,i);c>i&&jy(e.src.charCodeAt(c-1))&&(a=c),e.line=t+1;let l=e.push(`heading_open`,`h`+String(s),1);l.markup=`########`.slice(0,s),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=Ry(e.src.slice(i,a)),u.map=[t,e.line],u.children=[];let d=e.push(`heading_close`,`h`+String(s),-1);return d.markup=`########`.slice(0,s),!0}function Vb(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`);if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.parentType;e.parentType=`paragraph`;let a=0,o,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let t=e.bMarks[s]+e.tShift[s],n=e.eMarks[s];if(t<n&&(o=e.src.charCodeAt(t),(o===45||o===61)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=n))){a=o===61?1:2;break}}if(e.sCount[s]<0)continue;let t=!1;for(let i=0,a=r.length;i<a;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}if(!a)return e.parentType=i,!1;let c=Ry(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;let l=e.push(`heading_open`,`h`+String(a),1);l.markup=String.fromCharCode(o),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=c,u.map=[t,e.line-1],u.children=[];let d=e.push(`heading_close`,`h`+String(a),-1);return d.markup=String.fromCharCode(o),e.parentType=i,!0}function Hb(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`),i=e.parentType,a=t+1;for(e.parentType=`paragraph`;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,a,n,!0)){t=!0;break}if(t)break}let o=Ry(e.getLines(t,a,e.blkIndent,!1));e.line=a;let s=e.push(`paragraph_open`,`p`,1);s.map=[t,e.line];let c=e.push(`inline`,``,0);return c.content=o,c.map=[t,e.line],c.children=[],e.push(`paragraph_close`,`p`,-1),e.parentType=i,!0}var Ub=[[`table`,Tb,[`paragraph`,`reference`]],[`code`,Eb],[`fence`,Db,[`paragraph`,`reference`,`blockquote`,`list`]],[`blockquote`,Ob,[`paragraph`,`reference`,`blockquote`,`list`]],[`hr`,kb,[`paragraph`,`reference`,`blockquote`,`list`]],[`list`,Nb,[`paragraph`,`reference`,`blockquote`]],[`reference`,Pb],[`html_block`,zb,[`paragraph`,`reference`,`blockquote`]],[`heading`,Bb,[`paragraph`,`reference`,`blockquote`]],[`lheading`,Vb],[`paragraph`,Hb]];function Wb(){this.ruler=new Ky;for(let e=0;e<Ub.length;e++)this.ruler.push(Ub[e][0],Ub[e][1],{alt:(Ub[e][2]||[]).slice()})}Wb.prototype.tokenize=function(e,t,n){let r=this.ruler.getRules(``),i=r.length,a=e.md.options.maxNesting,o=t,s=!1;for(;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n||e.sCount[o]<e.blkIndent));){if(e.level>=a){e.line=n;break}let t=e.line,c=!1;for(let a=0;a<i;a++)if(c=r[a](e,o,n,!1),c){if(t>=e.line)throw Error(`block rule didn't increment state.line`);break}if(!c)throw Error(`none of the block rules matched`);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),o=e.line,o<n&&e.isEmpty(o)&&(s=!0,o++,e.line=o)}},Wb.prototype.parse=function(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)},Wb.prototype.State=xb;function Gb(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending=``,this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Gb.prototype.pushPending=function(){let e=new qy(`text`,``,0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending=``,e},Gb.prototype.push=function(e,t,n){this.pending&&this.pushPending();let r=new qy(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},Gb.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)==55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)==56320){let t=this.src.charCodeAt(e-2);i=(t&64512)==55296?65536+(t-55296<<10)+(i-56320):65533}else(i&64512)==55296&&(i=65533);let a=e;for(;a<n&&this.src.charCodeAt(a)===r;)a++;let o=a-e,s=a<n?this.src.charCodeAt(a):32;if((s&64512)==55296){let e=this.src.charCodeAt(a+1);s=(e&64512)==56320?65536+(s-55296<<10)+(e-56320):65533}else(s&64512)==56320&&(s=65533);let c=Fy(i)||Py(i),l=Fy(s)||Py(s),u=My(i),d=My(s),f=!d&&(!l||u||c),p=!u&&(!c||d||l);return{can_open:f&&(t||!p||c),can_close:p&&(t||!f||l),length:o}},Gb.prototype.Token=qy;function Kb(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function qb(e,t){let n=e.pos;for(;n<e.posMax&&!Kb(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var Jb=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Yb(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let i=e.pending.match(Jb);if(!i)return!1;let a=i[1],o=e.md.linkify.matchAtStart(e.src.slice(n-a.length));if(!o)return!1;let s=o.url;if(s.length<=a.length)return!1;let c=s.length;for(;c>0&&s.charCodeAt(c-1)===42;)c--;c!==s.length&&(s=s.slice(0,c));let l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,l]],t.markup=`linkify`,t.info=`auto`;let n=e.push(`text`,``,0);n.content=e.md.normalizeLinkText(s);let r=e.push(`link_close`,`a`,-1);r.markup=`linkify`,r.info=`auto`}return e.pos+=s.length-a.length,!0}function Xb(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let t=r-1;for(;t>=1&&e.pending.charCodeAt(t-1)===32;)t--;e.pending=e.pending.slice(0,t),e.push(`hardbreak`,`br`,0)}else e.pending=e.pending.slice(0,-1),e.push(`softbreak`,`br`,0);else e.push(`softbreak`,`br`,0);for(n++;n<i&&jy(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var Zb=[];for(let e=0;e<256;e++)Zb.push(0);`\\!"#$%&'()*+,./:;<=>?@[]^_\`{|}~-`.split(``).forEach(function(e){Zb[e.charCodeAt(0)]=1});function Qb(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push(`hardbreak`,`br`,0),n++;n<r&&(i=e.src.charCodeAt(n),jy(i));)n++;return e.pos=n,!0}if(i===32){if(!t){let t=e.push(`text_special`,``,0);t.content=`\\`,t.markup=`\\`,t.info=`escape`}return e.pos=n,!0}let a=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(a+=e.src[n+1],n++)}let o=`\\`+a;if(!t){let t=e.push(`text_special`,``,0);i<256&&Zb[i]!==0?t.content=a:t.content=o,t.markup=o,t.info=`escape`}return e.pos=n+1,!0}function $b(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let r=n;n++;let i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;let a=e.src.slice(r,n),o=a.length;if(e.backticksScanned&&(e.backticks[o]||0)<=r)return t||(e.pending+=a),e.pos+=o,!0;let s=n,c;for(;(c=e.src.indexOf("`",s))!==-1;){for(s=c+1;s<i&&e.src.charCodeAt(s)===96;)s++;let r=s-c;if(r===o){if(!t){let t=e.push(`code_inline`,`code`,0);t.markup=a,t.content=e.src.slice(n,c).replace(/\n/g,` `).replace(/^ (.+) $/,`$1`)}return e.pos=s,!0}e.backticks[r]=c}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=o,!0}function ex(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;let i=e.scanDelims(e.pos,!0),a=i.length,o=String.fromCharCode(r);if(a<2)return!1;let s;a%2&&(s=e.push(`text`,``,0),s.content=o,a--);for(let t=0;t<a;t+=2)s=e.push(`text`,``,0),s.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function tx(e,t){let n,r=[],i=t.length;for(let a=0;a<i;a++){let i=t[a];if(i.marker!==126||i.end===-1)continue;let o=t[i.end];n=e.tokens[i.token],n.type=`s_open`,n.tag=`s`,n.nesting=1,n.markup=`~~`,n.content=``,n=e.tokens[o.token],n.type=`s_close`,n.tag=`s`,n.nesting=-1,n.markup=`~~`,n.content=``,e.tokens[o.token-1].type===`text`&&e.tokens[o.token-1].content===`~`&&r.push(o.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&e.tokens[i].type===`s_close`;)i++;i--,t!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}function nx(e){let t=e.tokens_meta,n=e.tokens_meta.length;tx(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&tx(e,t[r].delimiters)}var rx={tokenize:ex,postProcess:nx};function ix(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;let i=e.scanDelims(e.pos,r===42);for(let t=0;t<i.length;t++){let t=e.push(`text`,``,0);t.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function ax(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;let i=t[n.end],a=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),s=e.tokens[n.token];s.type=a?`strong_open`:`em_open`,s.tag=a?`strong`:`em`,s.nesting=1,s.markup=a?o+o:o,s.content=``;let c=e.tokens[i.token];c.type=a?`strong_close`:`em_close`,c.tag=a?`strong`:`em`,c.nesting=-1,c.markup=a?o+o:o,c.content=``,a&&(e.tokens[t[r-1].token].content=``,e.tokens[t[n.end+1].token].content=``,r--)}}function ox(e){let t=e.tokens_meta,n=e.tokens_meta.length;ax(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&ax(e,t[r].delimiters)}var sx={tokenize:ix,postProcess:ox};function cx(e,t){let n,r,i,a,o=``,s=``,c=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<d&&e.src.charCodeAt(m)===40){for(l=!1,m++;m<d&&(n=e.src.charCodeAt(m),!(!jy(n)&&n!==10));m++);if(m>=d)return!1;if(c=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?m=i.pos:o=``,c=m;m<d&&(n=e.src.charCodeAt(m),!(!jy(n)&&n!==10));m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<d&&c!==m&&i.ok)for(s=i.str,m=i.pos;m<d&&(n=e.src.charCodeAt(m),!(!jy(n)&&n!==10));m++);}(m>=d||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(e.env.references===void 0)return!1;if(m<d&&e.src.charCodeAt(m)===91?(c=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?r=e.src.slice(c,m++):m=p+1):m=p+1,r||=e.src.slice(f,p),a=e.env.references[Iy(r)],!a)return e.pos=u,!1;o=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let t=e.push(`link_open`,`a`,1),n=[[`href`,o]];t.attrs=n,s&&n.push([`title`,s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push(`link_close`,`a`,-1)}return e.pos=m,e.posMax=d,!0}function lx(e,t){let n,r,i,a,o,s,c,l,u=``,d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(a=m+1,a<f&&e.src.charCodeAt(a)===40){for(a++;a<f&&(n=e.src.charCodeAt(a),!(!jy(n)&&n!==10));a++);if(a>=f)return!1;for(l=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(u=e.md.normalizeLink(s.str),e.md.validateLink(u)?a=s.pos:u=``),l=a;a<f&&(n=e.src.charCodeAt(a),!(!jy(n)&&n!==10));a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&l!==a&&s.ok)for(c=s.str,a=s.pos;a<f&&(n=e.src.charCodeAt(a),!(!jy(n)&&n!==10));a++);else c=``;if(a>=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(e.env.references===void 0)return!1;if(a<f&&e.src.charCodeAt(a)===91?(l=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(l,a++):a=m+1):a=m+1,i||=e.src.slice(p,m),o=e.env.references[Iy(i)],!o)return e.pos=d,!1;u=o.href,c=o.title}if(!t){r=e.src.slice(p,m);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push(`image`,`img`,0),i=[[`src`,u],[`alt`,``]];n.attrs=i,n.children=t,n.content=r,c&&i.push([`title`,c])}return e.pos=a,e.posMax=f,!0}var ux=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,dx=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function fx(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(t===60)return!1;if(t===62)break}let a=e.src.slice(r+1,n);if(dx.test(a)){let n=e.md.normalizeLink(a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}if(ux.test(a)){let n=e.md.normalizeLink(`mailto:`+a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}return!1}function px(e){return/^<a[>\s]/i.test(e)}function mx(e){return/^<\/a\s*>/i.test(e)}function hx(e){let t=e|32;return t>=97&&t<=122}function gx(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!hx(i))return!1;let a=e.src.slice(r).match(Ib);if(!a)return!1;if(!t){let t=e.push(`html_inline`,``,0);t.content=a[0],px(t.content)&&e.linkLevel++,mx(t.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var _x=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,vx=/^&([a-z][a-z0-9]{1,31});/i;function yx(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let r=e.src.slice(n).match(_x);if(r){if(!t){let t=r[1][0].toLowerCase()===`x`?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push(`text_special`,``,0);n.content=gy(t)?_y(t):_y(65533),n.markup=r[0],n.info=`entity`}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(vx);if(r){let n=cy(r[0]);if(n!==r[0]){if(!t){let t=e.push(`text_special`,``,0);t.content=n,t.markup=r[0],t.info=`entity`}return e.pos+=r[0].length,!0}}}return!1}function bx(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,a=[];for(let o=0;o<n;o++){let n=e[o];if(a.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=o),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let s=t[n.marker][(n.open?3:0)+n.length%3],c=r-a[r]-1,l=c;for(;c>s;c-=a[c]+1){let t=e[c];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=c>0&&!e[c-1].open?a[c-1]+1:0;a[o]=o-c+r,a[c]=r,n.open=!1,t.end=o,t.close=!1,l=-1,i=-2;break}}}l!==-1&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=l)}}function xx(e){let t=e.tokens_meta,n=e.tokens_meta.length;bx(e.delimiters);for(let e=0;e<n;e++)t[e]&&t[e].delimiters&&bx(t[e].delimiters)}function Sx(e){let t,n,r=0,i=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}var Cx=[[`text`,qb],[`linkify`,Yb],[`newline`,Xb],[`escape`,Qb],[`backticks`,$b],[`strikethrough`,rx.tokenize],[`emphasis`,sx.tokenize],[`link`,cx],[`image`,lx],[`autolink`,fx],[`html_inline`,gx],[`entity`,yx]],wx=[[`balance_pairs`,xx],[`strikethrough`,rx.postProcess],[`emphasis`,sx.postProcess],[`fragments_join`,Sx]];function Tx(){this.ruler=new Ky;for(let e=0;e<Cx.length;e++)this.ruler.push(Cx[e][0],Cx[e][1]);this.ruler2=new Ky;for(let e=0;e<wx.length;e++)this.ruler2.push(wx[e][0],wx[e][1])}Tx.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(``),r=n.length,i=e.md.options.maxNesting,a=e.cache;if(a[t]!==void 0){e.pos=a[t];return}let o=!1;if(e.level<i){for(let i=0;i<r;i++)if(e.level++,o=n[i](e,!0),e.level--,o){if(t>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}else e.pos=e.posMax;o||e.pos++,a[t]=e.pos},Tx.prototype.tokenize=function(e){let t=this.ruler.getRules(``),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let a=e.pos,o=!1;if(e.level<i){for(let r=0;r<n;r++)if(o=t[r](e,!1),o){if(a>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Tx.prototype.parse=function(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let a=this.ruler2.getRules(``),o=a.length;for(let e=0;e<o;e++)a[e](i)},Tx.prototype.State=Gb;function Ex(e){let t={};e||={},t.src_Any=Iv.source,t.src_Cc=Lv.source,t.src_Z=Vv.source,t.src_P=zv.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join(`|`),t.src_ZCc=[t.src_Z,t.src_Cc].join(`|`);let n=`[><|]`;return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4=`(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)`,t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port=`(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?`,t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e[`---`]?`-(?!--)|`:`-|`}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e[`---`]?`\\-(?!--(?:[^-]|$))(?:-*)|`:`\\-+|`)+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name=`[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}`,t.src_xn=`xn--[a-z0-9\\-]{1,59}`,t.src_domain_root=`(?:`+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain=`(?:`+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy=`(?:`+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${t.src_ZPCc}))((?![$+<=>^\`|\uff5c])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${t.src_ZPCc}))((?![$+<=>^\`|\uff5c])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function Dx(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function Ox(e){return Object.prototype.toString.call(e)}function kx(e){return Ox(e)===`[object String]`}function Ax(e){return Ox(e)===`[object Object]`}function jx(e){return Ox(e)===`[object RegExp]`}function Mx(e){return Ox(e)===`[object Function]`}function Nx(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,`\\$&`)}var Px={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Fx(e){return Object.keys(e||{}).reduce(function(e,t){return e||Px.hasOwnProperty(t)},!1)}var Ix={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,`i`)),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":`http:`,"ftp:":`http:`,"//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=RegExp(`^`+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,`i`)),n.re.no_http.test(r)?t>=3&&e[t-3]===`:`||t>=3&&e[t-3]===`/`?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,`i`)),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},Lx=`a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]`,Rx=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`.split(`|`);function zx(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function Bx(){return function(e,t){t.normalize(e)}}function Vx(e){let t=e.re=Ex(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Lx),n.push(t.src_xn),t.src_tlds=n.join(`|`);function r(e){return e.replace(`%TLDS%`,t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),`i`),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),`ig`),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),`i`),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),`ig`),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),`i`),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),`ig`),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),`i`);let i=[];e.__compiled__={};function a(e,t){throw Error(`(LinkifyIt) Invalid schema "${e}": ${t}`)}Object.keys(e.__schemas__).forEach(function(t){let n=e.__schemas__[t];if(n===null)return;let r={validate:null,link:null};if(e.__compiled__[t]=r,Ax(n)){jx(n.validate)?r.validate=zx(n.validate):Mx(n.validate)?r.validate=n.validate:a(t,n),Mx(n.normalize)?r.normalize=n.normalize:n.normalize?a(t,n):r.normalize=Bx();return}if(kx(n)){i.push(t);return}a(t,n)}),i.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[``]={validate:null,normalize:Bx()};let o=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(Nx).join(`|`);e.re.schema_test=RegExp(`(^|(?!_)(?:[><\uff5c]|${t.src_ZPCc}))(${o})`,`i`),e.re.schema_search=RegExp(`(^|(?!_)(?:[><\uff5c]|${t.src_ZPCc}))(${o})`,`ig`),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,`i`),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,`i`)}function Hx(e,t,n,r){let i=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=i,this.text=i,this.url=i}function Ux(e,t){if(!(this instanceof Ux))return new Ux(e,t);t||Fx(e)&&(t=e,e={}),this.__opts__=Dx({},Px,t),this.__schemas__=Dx({},Ix,e),this.__compiled__={},this.__tlds__=Rx,this.__tlds_replaced__=!1,this.re={},Vx(this)}Ux.prototype.add=function(e,t){return this.__schemas__[e]=t,Vx(this),this},Ux.prototype.set=function(e){return this.__opts__=Dx(this.__opts__,e),this},Ux.prototype.test=function(e){if(!e.length)return!1;let t,n;if(this.re.schema_test.test(e)){for(n=this.re.schema_search,n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__[`http:`]&&e.search(this.re.host_fuzzy_test)>=0&&e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`]&&e.indexOf(`@`)>=0&&e.match(this.re.email_fuzzy)!==null)},Ux.prototype.pretest=function(e){return this.re.pretest.test(e)},Ux.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},Ux.prototype.match=function(e){let t=[],n=[],r=[],i=[],a,o,s;function c(e,t){return e?t?e.index===t.index?e.lastIndex>=t.lastIndex?e:t:e.index<t.index?e:t:e:t}if(!e.length)return null;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;(a=s.exec(e))!==null;)o=this.testSchemaAt(e,a[2],s.lastIndex),o&&n.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+o});if(this.__opts__.fuzzyLink&&this.__compiled__[`http:`])for(s=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,s.lastIndex=0;(a=s.exec(e))!==null;)r.push({schema:``,index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`])for(s=this.re.email_fuzzy_global,s.lastIndex=0;(a=s.exec(e))!==null;)i.push({schema:`mailto:`,index:a.index+a[1].length,lastIndex:a.index+a[0].length});let l=[0,0,0],u=0;for(;;){let a=[n[l[0]],i[l[1]],r[l[2]]],o=c(c(a[0],a[1]),a[2]);if(!o)break;if(o===a[0]?l[0]++:o===a[1]?l[1]++:l[2]++,o.index<u)continue;let s=new Hx(e,o.schema,o.index,o.lastIndex);this.__compiled__[s.schema].normalize(s,this),t.push(s),u=o.lastIndex}return t.length?t:null},Ux.prototype.matchAtStart=function(e){if(!e.length)return null;let t=this.re.schema_at_start.exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new Hx(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__compiled__[r.schema].normalize(r,this),r},Ux.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),Vx(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Vx(this),this)},Ux.prototype.normalize=function(e){e.schema||(e.url=`http://${e.url}`),e.schema===`mailto:`&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)},Ux.prototype.onCompile=function(){};var Wx=2147483647,Gx=36,Kx=1,qx=26,Jx=38,Yx=700,Xx=72,Zx=128,Qx=`-`,$x=/^xn--/,eS=/[^\0-\x7F]/,tS=/[\x2E\u3002\uFF0E\uFF61]/g,nS={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},rS=Gx-Kx,iS=Math.floor,aS=String.fromCharCode;function oS(e){throw RangeError(nS[e])}function sS(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function cS(e,t){let n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(tS,`.`);let i=sS(e.split(`.`),t).join(`.`);return r+i}function lS(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(r&64512)==56320?t.push(((i&1023)<<10)+(r&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}var uS=e=>String.fromCodePoint(...e),dS=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Gx},fS=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},pS=function(e,t,n){let r=0;for(e=n?iS(e/Yx):e>>1,e+=iS(e/t);e>455;r+=Gx)e=iS(e/rS);return iS(r+36*e/(e+Jx))},mS=function(e){let t=[],n=e.length,r=0,i=Zx,a=Xx,o=e.lastIndexOf(Qx);o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&oS(`not-basic`),t.push(e.charCodeAt(n));for(let s=o>0?o+1:0;s<n;){let o=r;for(let t=1,i=Gx;;i+=Gx){s>=n&&oS(`invalid-input`);let o=dS(e.charCodeAt(s++));o>=Gx&&oS(`invalid-input`),o>iS((Wx-r)/t)&&oS(`overflow`),r+=o*t;let c=i<=a?Kx:i>=a+qx?qx:i-a;if(o<c)break;let l=Gx-c;t>iS(Wx/l)&&oS(`overflow`),t*=l}let c=t.length+1;a=pS(r-o,c,o==0),iS(r/c)>Wx-i&&oS(`overflow`),i+=iS(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},hS=function(e){let t=[];e=lS(e);let n=e.length,r=Zx,i=0,a=Xx;for(let n of e)n<128&&t.push(aS(n));let o=t.length,s=o;for(o&&t.push(Qx);s<n;){let n=Wx;for(let t of e)t>=r&&t<n&&(n=t);let c=s+1;n-r>iS((Wx-i)/c)&&oS(`overflow`),i+=(n-r)*c,r=n;for(let n of e)if(n<r&&++i>Wx&&oS(`overflow`),n===r){let e=i;for(let n=Gx;;n+=Gx){let r=n<=a?Kx:n>=a+qx?qx:n-a;if(e<r)break;let i=e-r,o=Gx-r;t.push(aS(fS(r+i%o,0))),e=iS(i/o)}t.push(aS(fS(e,0))),a=pS(i,c,s===o),i=0,++s}++i,++r}return t.join(``)},gS={version:`2.3.1`,ucs2:{decode:lS,encode:uS},decode:mS,encode:hS,toASCII:function(e){return cS(e,function(e){return eS.test(e)?`xn--`+hS(e):e})},toUnicode:function(e){return cS(e,function(e){return $x.test(e)?mS(e.slice(4).toLowerCase()):e})}},_S={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`inline`,`text_join`]},block:{rules:[`paragraph`]},inline:{rules:[`text`],rules2:[`balance_pairs`,`fragments_join`]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`inline`,`text_join`]},block:{rules:[`blockquote`,`code`,`fence`,`heading`,`hr`,`html_block`,`lheading`,`list`,`reference`,`paragraph`]},inline:{rules:[`autolink`,`backticks`,`emphasis`,`entity`,`escape`,`html_inline`,`image`,`link`,`newline`,`text`],rules2:[`balance_pairs`,`emphasis`,`fragments_join`]}}}},vS=/^(vbscript|javascript|file|data):/,yS=/^data:image\/(gif|png|jpeg|webp);/;function bS(e){let t=e.trim().toLowerCase();return!vS.test(t)||yS.test(t)}var xS=[`http:`,`https:`,`mailto:`];function SS(e){let t=Pv(e,!0);if(t.hostname&&(!t.protocol||xS.indexOf(t.protocol)>=0))try{t.hostname=gS.toASCII(t.hostname)}catch{}return xv(Sv(t))}function CS(e){let t=Pv(e,!0);if(t.hostname&&(!t.protocol||xS.indexOf(t.protocol)>=0))try{t.hostname=gS.toUnicode(t.hostname)}catch{}return vv(Sv(t),vv.defaultChars+`%`)}function wS(e,t){if(!(this instanceof wS))return new wS(e,t);t||dy(e)||(t=e||{},e=`default`),this.inline=new Tx,this.block=new Wb,this.core=new bb,this.renderer=new Gy,this.linkify=new Ux,this.validateLink=bS,this.normalizeLink=SS,this.normalizeLinkText=CS,this.utils=ly,this.helpers=my({},Uy),this.options={},this.configure(e),t&&this.set(t)}wS.prototype.set=function(e){return my(this.options,e),this},wS.prototype.configure=function(e){let t=this;if(dy(e)){let t=e;if(e=_S[t],!e)throw Error('Wrong `markdown-it` preset "'+t+`", check name`)}if(!e)throw Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},wS.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): `+r);return this},wS.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): `+r);return this},wS.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},wS.prototype.parse=function(e,t){if(typeof e!=`string`)throw Error(`Input data should be a String`);let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},wS.prototype.render=function(e,t){return t||={},this.renderer.render(this.parse(e,t),this.options,t)},wS.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},wS.prototype.renderInline=function(e,t){return t||={},this.renderer.render(this.parseInline(e,t),this.options,t)};var TS=l(o(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,j=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},M={begin:`\\\\[\\s\\S]`,relevance:0},ee={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[M]},N={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[M]},P={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},F=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},I=F(`//`,`$`),te=F(`/\\*`,`\\*/`),ne=F(`#`,`$`),re=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:M,BINARY_NUMBER_MODE:{scope:`number`,begin:k,relevance:0},BINARY_NUMBER_RE:k,COMMENT:F,C_BLOCK_COMMENT_MODE:te,C_LINE_COMMENT_MODE:I,C_NUMBER_MODE:{scope:`number`,begin:O,relevance:0},C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:ne,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:{begin:`\\.\\s*[a-zA-Z_]\\w*`,relevance:0},NUMBER_MODE:{scope:`number`,begin:D,relevance:0},NUMBER_RE:D,PHRASAL_WORDS_MODE:P,QUOTE_STRING_MODE:N,REGEXP_MODE:{scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[M,{begin:/\[/,end:/\]/,relevance:0,contains:[M]}]},RE_STARTERS_RE:A,SHEBANG:j,TITLE_MODE:{scope:`title`,begin:T,relevance:0},UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:{scope:`title`,begin:E,relevance:0}});function ie(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function ae(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function L(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ie,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function oe(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function se(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function R(e,t){e.relevance===void 0&&(e.relevance=1)}var ce=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},le=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],ue=`keyword`;function de(e,t,n=ue){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,de(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,fe(n[0],n[1])]})}}function fe(e,t){return t?Number(t):+!pe(e)}function pe(e){return le.includes(e.toLowerCase())}var me={},he=e=>{console.error(e)},ge=(e,...t)=>{console.log(`WARN: ${e}`,...t)},_e=(e,t)=>{me[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),me[`${e}/${t}`]=!0)},ve=Error();function ye(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function be(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw he(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),ve;if(typeof e.beginScope!=`object`||e.beginScope===null)throw he(`beginScope must be object`),ve;ye(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function xe(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw he(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),ve;if(typeof e.endScope!=`object`||e.endScope===null)throw he(`endScope must be object`),ve;ye(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function Se(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ce(e){Se(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),be(e),xe(e)}function we(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(C(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[ae,se,Ce,ce].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[L,oe,R].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=de(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ee(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function Te(e){return e?e.endsWithParent||Te(e.starts):!1}function Ee(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Te(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var De=`11.11.1`,Oe=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},ke=i,Ae=a,je=Symbol(`nomatch`),Me=7,Ne=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=ee(n[1]);return t||(ge(s.replace(`{}`,n[1])),ge(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||ee(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(_e(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),_e(`10.7.0`,`Please use highlight(code, options) instead.
|
|
66
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};ne(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,ne(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!A.keywords){M.addText(N);return}let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(N),n=``;for(;t;){n+=N.substring(e,t.index);let r=D.case_insensitive?t[0].toLowerCase():t[0],i=u(A,r);if(i){let[e,a]=i;if(M.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=Me&&(P+=a),e.startsWith(`_`))n+=t[0];else{let n=D.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(N)}n+=N.substring(e),M.addText(n)}function f(){if(N===``)return;let e=null;if(typeof A.subLanguage==`string`){if(!t[A.subLanguage]){M.addText(N);return}e=v(A.subLanguage,N,!0,j[A.subLanguage]),j[A.subLanguage]=e._top}else e=S(N,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(P+=e.relevance),M.__addSublanguage(e._emitter,e.language)}function p(){A.subLanguage==null?d():f(),N=``}function m(e,t){e!==``&&(M.startScope(t),M.addText(e),M.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=D.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(N=i,d(),N=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&M.openNode(D.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(N,D.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),N=``):e.beginScope._multi&&(h(e.beginScope,t),N=``)),A=Object.create(e,{parent:{value:A}}),A}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return A.matcher.regexIndex===0?(N+=e[0],1):(te=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?N+=t:(n.excludeBegin&&(N+=t),p(),!n.returnBegin&&!n.excludeBegin&&(N=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(A,e,r);if(!i)return je;let a=A;A.endScope&&A.endScope._wrap?(p(),m(t,A.endScope._wrap)):A.endScope&&A.endScope._multi?(p(),h(A.endScope,e)):a.skip?N+=t:(a.returnEnd||a.excludeEnd||(N+=t),p(),a.excludeEnd&&(N=t));do A.scope&&M.closeNode(),!A.skip&&!A.subLanguage&&(P+=A.relevance),A=A.parent;while(A!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function w(){let e=[];for(let t=A;t!==D;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>M.openNode(e))}let T={};function E(t,r){let a=r&&r[0];if(N+=t,a==null)return p(),0;if(T.type===`begin`&&r.type===`end`&&T.index===r.index&&a===``){if(N+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=T.rule,t}return 1}if(T=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(A.scope||`<unnamed>`)+`"`);throw e.mode=A,e}else if(r.type===`end`){let e=C(r);if(e!==je)return e}if(r.type===`illegal`&&a===``)return N+=`
|
|
67
|
+
`,1;if(I>1e5&&I>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return N+=a,a.length}let D=ee(e);if(!D)throw he(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let O=we(D),k=``,A=a||O,j={},M=new l.__emitter(l);w();let N=``,P=0,F=0,I=0,te=!1;try{if(D.__emitTokens)D.__emitTokens(n,M);else{for(A.matcher.considerAll();;){I++,te?te=!1:A.matcher.considerAll(),A.matcher.lastIndex=F;let e=A.matcher.exec(n);if(!e)break;let t=E(n.substring(F,e.index),e);F=e.index+t}E(n.substring(F))}return M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:P,illegal:!1,_emitter:M,_top:A}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:ke(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:F,context:n.slice(F-100,F+100),mode:t.mode,resultSoFar:k},_emitter:M};if(o)return{language:e,value:ke(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:A};throw t}}function b(e){let t={value:ke(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(ee).filter(P).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(ee(e.language).supersetOf===t.language)return 1;if(ee(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(ne(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Oe(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),ne(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Ae(l,e)}let E=()=>{k(),_e(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){k(),_e(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let O=!1;function k(){function e(){k()}if(document.readyState===`loading`){O||window.addEventListener(`DOMContentLoaded`,e,!1),O=!0;return}document.querySelectorAll(l.cssSelector).forEach(w)}function A(n,r){let i=null;try{i=r(e)}catch(e){if(he(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)he(e);else throw e;i=c}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&N(i.aliases,{languageName:n})}function j(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function M(){return Object.keys(t)}function ee(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function N(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function P(e){let t=ee(e);return t&&!t.disableAutodetect}function F(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function I(e){F(e),a.push(e)}function te(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function ne(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function ie(e){return _e(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),_e(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:k,highlightElement:w,highlightBlock:ie,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:A,unregisterLanguage:j,listLanguages:M,getLanguage:ee,registerAliases:N,autoDetection:P,inherit:Ae,addPlugin:I,removePlugin:te}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=De,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in re)typeof re[e]==`object`&&n(re[e]);return Object.assign(e,re),e},Pe=Ne({});Pe.newInstance=()=>Ne({}),t.exports=Pe,Pe.HighlightJS=Pe,Pe.default=Pe}))()).default,ES=`[A-Za-z$_][0-9A-Za-z$_]*`,DS=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),OS=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],kS=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),AS=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],jS=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],MS=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],NS=[].concat(jS,kS,AS);function PS(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=ES,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:ES,keyword:DS,literal:OS,built_in:NS,"variable.language":MS},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:`[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...kS,...AS]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...jS,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$[A-Za-z$_][0-9A-Za-z$_]*`,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function FS(e){let t=e.regex,n=PS(e),r=ES,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:ES,keyword:DS.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:OS,built_in:NS.concat(i),"variable.language":MS},l={className:`meta`,begin:`@[A-Za-z$_][0-9A-Za-z$_]*`},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}var IS=`[A-Za-z$_][0-9A-Za-z$_]*`,LS=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),RS=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],zS=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),BS=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],VS=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],HS=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],US=[].concat(VS,zS,BS);function WS(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=IS,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:IS,keyword:LS,literal:RS,built_in:US,"variable.language":HS},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:`[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...zS,...BS]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...VS,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$[A-Za-z$_][0-9A-Za-z$_]*`,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function GS(e){let t={className:`attr`,begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}function KS(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(${[`fish`,`bash`,`zsh`,`sh`,`csh`,`ksh`,`tcsh`,`dash`,`scsh`].join(`|`)})`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function qS(e){return{name:`Shell Session`,aliases:[`console`,`shellsession`],contains:[{className:`meta.prompt`,begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:`bash`}}]}}function JS(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}function YS(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}function XS(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}var ZS=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),QS=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),$S=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),eC=[...QS,...$S],tC=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),nC=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),rC=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),iC=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function aC(e){let t=e.regex,n=ZS(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+nC.join(`|`)+`)`},{begin:`:(:)?(`+rC.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+iC.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:tC.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+eC.join(`|`)+`)\\b`}]}}function oC(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={begin:`^[-\\*]{3,}`,end:`$`},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,r,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function sC(e){let t=`true false yes no null`,n={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},r={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},i={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},a={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,r]},o=e.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),s={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},c={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},l={begin:/\{/,end:/\}/,contains:[c],illegal:`\\n`,relevance:0},u={begin:`\\[`,end:`\\]`,contains:[c],illegal:`\\n`,relevance:0},d=[n,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+![\\w#;/?:@&=+$,.~*'()[\\]]+`},{className:`type`,begin:`!<[\\w#;/?:@&=+$,.~*'()[\\]]+>`},{className:`type`,begin:`![\\w#;/?:@&=+$,.~*'()[\\]]+`},{className:`type`,begin:`!![\\w#;/?:@&=+$,.~*'()[\\]]+`},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},s,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},l,u,i,a],f=[...d];return f.pop(),f.push(o),c.contains=f,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:d}}function cC(e){return{name:`Plain text`,aliases:[`text`,`txt`],disableAutodetect:!0}}function lC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uC(e){if(Array.isArray(e))return e}function dC(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function fC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pC(e,t){return uC(e)||dC(e,t)||mC(e,t)||fC()}function mC(e,t){if(e){if(typeof e==`string`)return lC(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lC(e,t):void 0}}var hC=Object.entries,gC=Object.setPrototypeOf,_C=Object.isFrozen,vC=Object.getPrototypeOf,yC=Object.getOwnPropertyDescriptor,bC=Object.freeze,xC=Object.seal,SC=Object.create,CC=typeof Reflect<`u`&&Reflect,wC=CC.apply,TC=CC.construct;bC||=function(e){return e},xC||=function(e){return e},wC||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},TC||=function(e){return new e(...[...arguments].slice(1))};var EC=KC(Array.prototype.forEach),DC=KC(Array.prototype.lastIndexOf),OC=KC(Array.prototype.pop),kC=KC(Array.prototype.push),AC=KC(Array.prototype.splice),jC=Array.isArray,MC=KC(String.prototype.toLowerCase),NC=KC(String.prototype.toString),PC=KC(String.prototype.match),FC=KC(String.prototype.replace),IC=KC(String.prototype.indexOf),LC=KC(String.prototype.trim),RC=KC(Number.prototype.toString),zC=KC(Boolean.prototype.toString),BC=typeof BigInt>`u`?null:KC(BigInt.prototype.toString),VC=typeof Symbol>`u`?null:KC(Symbol.prototype.toString),HC=KC(Object.prototype.hasOwnProperty),UC=KC(Object.prototype.toString),WC=KC(RegExp.prototype.test),GC=qC(TypeError);function KC(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return wC(e,t,n)}}function qC(e){return function(){return TC(e,[...arguments])}}function $(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:MC;if(gC&&gC(e,null),!jC(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(_C(t)||(t[r]=e),i=e)}e[i]=!0}return e}function JC(e){for(let t=0;t<e.length;t++)HC(e,t)||(e[t]=null);return e}function YC(e){let t=SC(null);for(let r of hC(e)){var n=pC(r,2);let i=n[0],a=n[1];HC(e,i)&&(jC(a)?t[i]=JC(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=YC(a):t[i]=a)}return t}function XC(e){switch(typeof e){case`string`:return e;case`number`:return RC(e);case`boolean`:return zC(e);case`bigint`:return BC?BC(e):`0`;case`symbol`:return VC?VC(e):`Symbol()`;case`undefined`:return UC(e);case`function`:case`object`:{if(e===null)return UC(e);let t=e,n=ZC(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:UC(e)}return UC(e)}default:return UC(e)}}function ZC(e,t){for(;e!==null;){let n=yC(e,t);if(n){if(n.get)return KC(n.get);if(typeof n.value==`function`)return KC(n.value)}e=vC(e)}function n(){return null}return n}function QC(e){try{return WC(e,``),!0}catch{return!1}}var $C=bC(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),ew=bC(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),tw=bC([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),nw=bC([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),rw=bC(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),iw=bC([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),aw=bC([`#text`]),ow=bC(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),sw=bC(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),cw=bC(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),lw=bC([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),uw=xC(/{{[\w\W]*|^[\w\W]*}}/g),dw=xC(/<%[\w\W]*|^[\w\W]*%>/g),fw=xC(/\${[\w\W]*/g),pw=xC(/^data-[\-\w.\u00B7-\uFFFF]+$/),mw=xC(/^aria-[\-\w]+$/),hw=xC(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gw=xC(/^(?:\w+script|data):/i),_w=xC(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vw=xC(/^html$/i),yw=xC(/^[a-z][.\w]*(-[.\w]+)+$/i),bw=xC(/<[/\w!]/g),xw=xC(/<[/\w]/g),Sw=xC(/<\/no(script|embed|frames)/i),Cw=xC(/\/>/i),ww={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Tw=function(){return typeof window>`u`?null:window},Ew=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Dw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ow=function(e,t,n,r){return HC(e,t)&&jC(e[t])?$(r.base?YC(r.base):{},e[t],r.transform):n};function kw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tw(),t=e=>kw(e);if(t.version=`3.4.12`,t.removed=[],!e||!e.document||e.document.nodeType!==ww.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=ZC(d,`cloneNode`),p=ZC(d,`remove`),m=ZC(d,`nextSibling`),h=ZC(d,`childNodes`),g=ZC(d,`parentNode`),_=ZC(d,`shadowRoot`),v=ZC(d,`attributes`),y=o&&o.prototype?ZC(o.prototype,`nodeType`):null,b=o&&o.prototype?ZC(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C,w=!1,T=0,E=function(){if(T>0)throw GC(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},D=function(e){E(),T++;try{return x.createHTML(e)}finally{T--}},O=function(e){E(),T++;try{return x.createScriptURL(e)}finally{T--}},k=function(){return w||=(C=Ew(u,i),!0),C},A=n,j=A.implementation,M=A.createNodeIterator,ee=A.createDocumentFragment,N=A.getElementsByTagName,P=r.importNode,F=Dw();t.isSupported=typeof hC==`function`&&typeof g==`function`&&j&&j.createHTMLDocument!==void 0;let I=uw,te=dw,ne=fw,re=pw,ie=mw,ae=gw,L=_w,oe=yw,se=hw,R=null,ce=$({},[...$C,...ew,...tw,...rw,...aw]),le=null,ue=$({},[...ow,...sw,...cw,...lw]),de=Object.seal(SC(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),fe=null,pe=null,me=Object.seal(SC(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),he=!0,ge=!0,_e=!1,ve=!0,ye=!1,be=!0,xe=!1,Se=!1,Ce=null,we=null,Te=!1,Ee=!1,De=!1,Oe=!1,ke=!0,Ae=!1,je=`user-content-`,Me=!0,Ne=!1,Pe={},Fe=null,Ie=$({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Le=null,Re=$({},[`audio`,`video`,`img`,`source`,`image`,`track`]),ze=null,Be=$({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ve=`http://www.w3.org/1998/Math/MathML`,He=`http://www.w3.org/2000/svg`,Ue=`http://www.w3.org/1999/xhtml`,We=Ue,Ge=!1,Ke=null,qe=$({},[Ve,He,Ue],NC),Je=bC([`mi`,`mo`,`mn`,`ms`,`mtext`]),Ye=$({},Je),Xe=bC([`annotation-xml`]),Ze=$({},Xe),Qe=$({},[`title`,`style`,`font`,`a`,`script`]),$e=null,et=[`application/xhtml+xml`,`text/html`],tt=null,nt=null,rt=n.createElement(`form`),it=function(e){return e instanceof RegExp||e instanceof Function},at=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(nt&&nt===e)return;(!e||typeof e!=`object`)&&(e={}),e=YC(e),$e=et.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,tt=$e===`application/xhtml+xml`?NC:MC,R=Ow(e,`ALLOWED_TAGS`,ce,{transform:tt}),le=Ow(e,`ALLOWED_ATTR`,ue,{transform:tt}),Ke=Ow(e,`ALLOWED_NAMESPACES`,qe,{transform:NC}),ze=Ow(e,`ADD_URI_SAFE_ATTR`,Be,{transform:tt,base:Be}),Le=Ow(e,`ADD_DATA_URI_TAGS`,Re,{transform:tt,base:Re}),Fe=Ow(e,`FORBID_CONTENTS`,Ie,{transform:tt}),fe=Ow(e,`FORBID_TAGS`,YC({}),{transform:tt}),pe=Ow(e,`FORBID_ATTR`,YC({}),{transform:tt}),Pe=HC(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?YC(e.USE_PROFILES):e.USE_PROFILES:!1,he=e.ALLOW_ARIA_ATTR!==!1,ge=e.ALLOW_DATA_ATTR!==!1,_e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ve=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ye=e.SAFE_FOR_TEMPLATES||!1,be=e.SAFE_FOR_XML!==!1,xe=e.WHOLE_DOCUMENT||!1,Ee=e.RETURN_DOM||!1,De=e.RETURN_DOM_FRAGMENT||!1,Oe=e.RETURN_TRUSTED_TYPE||!1,Te=e.FORCE_BODY||!1,ke=e.SANITIZE_DOM!==!1,Ae=e.SANITIZE_NAMED_PROPS||!1,Me=e.KEEP_CONTENT!==!1,Ne=e.IN_PLACE||!1,se=QC(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:hw,We=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ue,Ye=HC(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?YC(e.MATHML_TEXT_INTEGRATION_POINTS):$({},Je),Ze=HC(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?YC(e.HTML_INTEGRATION_POINTS):$({},Xe);let t=HC(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?YC(e.CUSTOM_ELEMENT_HANDLING):SC(null);if(de=SC(null),HC(t,`tagNameCheck`)&&it(t.tagNameCheck)&&(de.tagNameCheck=t.tagNameCheck),HC(t,`attributeNameCheck`)&&it(t.attributeNameCheck)&&(de.attributeNameCheck=t.attributeNameCheck),HC(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(de.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),xC(de),ye&&(ge=!1),De&&(Ee=!0),Pe&&(R=$({},aw),le=SC(null),Pe.html===!0&&($(R,$C),$(le,ow)),Pe.svg===!0&&($(R,ew),$(le,sw),$(le,lw)),Pe.svgFilters===!0&&($(R,tw),$(le,sw),$(le,lw)),Pe.mathMl===!0&&($(R,rw),$(le,cw),$(le,lw))),me.tagCheck=null,me.attributeCheck=null,HC(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?me.tagCheck=e.ADD_TAGS:jC(e.ADD_TAGS)&&(R===ce&&(R=YC(R)),$(R,e.ADD_TAGS,tt))),HC(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?me.attributeCheck=e.ADD_ATTR:jC(e.ADD_ATTR)&&(le===ue&&(le=YC(le)),$(le,e.ADD_ATTR,tt))),HC(e,`ADD_URI_SAFE_ATTR`)&&jC(e.ADD_URI_SAFE_ATTR)&&$(ze,e.ADD_URI_SAFE_ATTR,tt),HC(e,`FORBID_CONTENTS`)&&jC(e.FORBID_CONTENTS)&&(Fe===Ie&&(Fe=YC(Fe)),$(Fe,e.FORBID_CONTENTS,tt)),HC(e,`ADD_FORBID_CONTENTS`)&&jC(e.ADD_FORBID_CONTENTS)&&(Fe===Ie&&(Fe=YC(Fe)),$(Fe,e.ADD_FORBID_CONTENTS,tt)),Me&&(R[`#text`]=!0),xe&&$(R,[`html`,`head`,`body`]),R.table&&($(R,[`tbody`]),delete fe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw GC(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw GC(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=x;x=e.TRUSTED_TYPES_POLICY;try{S=D(``)}catch(e){throw x=t,e}}else e.TRUSTED_TYPES_POLICY===null?(x=void 0,S=``):(x===void 0&&(x=k()),x&&typeof S==`string`&&(S=D(``)));bC&&bC(e),nt=e},ot=$({},[...ew,...tw,...nw]),st=$({},[...rw,...iw]),ct=function(e,t,n){return t.namespaceURI===Ue?e===`svg`:t.namespaceURI===Ve?e===`svg`&&(n===`annotation-xml`||Ye[n]):!!ot[e]},lt=function(e,t,n){return t.namespaceURI===Ue?e===`math`:t.namespaceURI===He?e===`math`&&Ze[n]:!!st[e]},ut=function(e,t,n){return t.namespaceURI===He&&!Ze[n]||t.namespaceURI===Ve&&!Ye[n]?!1:!st[e]&&(Qe[e]||!ot[e])},dt=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:We,tagName:`template`});let n=MC(e.tagName),r=MC(t.tagName);return Ke[e.namespaceURI]?e.namespaceURI===He?ct(n,t,r):e.namespaceURI===Ve?lt(n,t,r):e.namespaceURI===Ue?ut(n,t,r):!!($e===`application/xhtml+xml`&&Ke[e.namespaceURI]):!1},ft=function(e){kC(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw GC(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},pt=function(e){gt(e);let t=h(e);if(t){let e=[];EC(t,t=>{kC(e,t)}),EC(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},mt=function(e,n){try{kC(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{kC(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(Ee||De)try{ft(n)}catch{}else try{n.setAttribute(e,``)}catch{}},ht=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||le[tt(i)]))try{e.removeAttribute(i)}catch{}}},gt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(y?y(e):e.nodeType)===ww.element&&ht(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},_t=function(e){if(!be)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=y?y(e):e.nodeType;if(n===ww.processingInstruction||n===ww.comment&&WC(xw,e.data)){try{p(e)}catch{}continue}if(n===ww.element){let t=e,n=tt(b?b(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&n!==`label`&&n!==`output`&&t.removeAttribute(`for`)}catch{}}let r=h(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},vt=function(e){let t=null,r=null;if(Te)e=`<remove></remove>`+e;else{let t=PC(e,/^[\r\n\t ]+/);r=t&&t[0]}$e===`application/xhtml+xml`&&We===Ue&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?D(e):e;if(We===Ue)try{t=new l().parseFromString(i,$e)}catch{}if(!t||!t.documentElement){t=j.createDocument(We,`template`,null);try{t.documentElement.innerHTML=Ge?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),We===Ue?N.call(t,xe?`html`:`body`)[0]:xe?t.documentElement:a},yt=function(e){return M.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},bt=function(e){return e=FC(e,I,` `),e=FC(e,te,` `),e=FC(e,ne,` `),e},xt=function(e){e.normalize();let t=M.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=bt(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&EC(r,e=>{Ct(e.content)&&xt(e.content)})},St=function(e){let t=b?b(e):null;return typeof t!=`string`||tt(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},Ct=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===ww.documentFragment}catch{return!1}},wt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function Tt(e,n,r){e.length!==0&&EC(e,e=>{e.call(t,n,r,nt)})}let Et=function(e,t){return!!(be&&e.hasChildNodes()&&!wt(e.firstElementChild)&&WC(bw,e.textContent)&&WC(bw,e.innerHTML)||be&&e.namespaceURI===Ue&&t===`style`&&wt(e.firstElementChild)||e.nodeType===ww.processingInstruction||be&&e.nodeType===ww.comment&&WC(xw,e.data))},Dt=function(e,t){if(!fe[t]&&jt(t)&&(de.tagNameCheck instanceof RegExp&&WC(de.tagNameCheck,t)||de.tagNameCheck instanceof Function&&de.tagNameCheck(t)))return!1;if(Me&&!Fe[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=Ne?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return ft(e),!0},Ot=function(e,n){if(Tt(F.beforeSanitizeElements,e,null),e!==n&&g(e)===null)return!0;if(St(e))return ft(e),!0;let r=tt(b?b(e):e.nodeName);if(Tt(F.uponSanitizeElement,e,{tagName:r,allowedTags:R}),e!==n&&g(e)===null)return!0;if(Et(e,r))return ft(e),!0;if(fe[r]||!(me.tagCheck instanceof Function&&me.tagCheck(r))&&!R[r]){let t=Dt(e,r);return t===!1&&Tt(F.afterSanitizeElements,e,null),t}if((y?y(e):e.nodeType)===ww.element&&!dt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&WC(Sw,e.innerHTML))return ft(e),!0;if(ye&&e.nodeType===ww.text){let n=bt(e.textContent);e.textContent!==n&&(kC(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Tt(F.afterSanitizeElements,e,null),!1},kt=function(e,t,r){if(pe[t]||be&&t===`patchsrc`||be&&t===`for`&&e!==`label`&&e!==`output`||ke&&(t===`id`||t===`name`)&&(r in n||r in rt))return!1;let i=le[t]||me.attributeCheck instanceof Function&&me.attributeCheck(t,e);if(!(ge&&WC(re,t))&&!(he&&WC(ie,t))){if(!i){if(!(jt(e)&&(de.tagNameCheck instanceof RegExp&&WC(de.tagNameCheck,e)||de.tagNameCheck instanceof Function&&de.tagNameCheck(e))&&(de.attributeNameCheck instanceof RegExp&&WC(de.attributeNameCheck,t)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(t,e))||t===`is`&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&WC(de.tagNameCheck,r)||de.tagNameCheck instanceof Function&&de.tagNameCheck(r))))return!1}else if(!ze[t]&&!WC(se,FC(r,L,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&IC(r,`data:`)===0&&Le[e])&&!(_e&&!WC(ae,FC(r,L,``)))&&r)return!1}return!0},At=$({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),jt=function(e){return!At[MC(e)]&&WC(oe,e)},Mt=function(e,t,n,r){if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return D(r);case`TrustedScriptURL`:return O(r)}return r},Nt=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),St(e)?ft(e):OC(t.removed)}catch{mt(n,e)}},Pt=function(e){Tt(F.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||St(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:le,forceKeepAttr:void 0},r=t.length,i=tt(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=tt(o),u=c,d=o===`value`?u:LC(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Tt(F.uponSanitizeAttribute,e,n),d=n.attrValue,Ae&&(l===`id`||l===`name`)&&IC(d,je)!==0&&(mt(o,e),d=je+d),be&&WC(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){mt(o,e);continue}if(l===`attributename`&&PC(d,`href`)){mt(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){mt(o,e);continue}if(!ve&&WC(Cw,d)){mt(o,e);continue}if(ye&&(d=bt(d)),!kt(i,l,d)){mt(o,e);continue}d=Mt(i,l,s,d),d!==u&&Nt(e,o,s,d)}}Tt(F.afterSanitizeAttributes,e,null)},Ft=function(e){let t=null,n=yt(e);for(Tt(F.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Tt(F.uponSanitizeShadowNode,t,null),Ot(t,e),Pt(t),Ct(t.content)&&Ft(t.content),(y?y(t):t.nodeType)===ww.element){let e=_(t);Ct(e)&&(It(e),Ft(e))}Tt(F.afterSanitizeShadowDOM,e,null)},It=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Ft(e.shadow);continue}let n=e.node,r=(y?y(n):n.nodeType)===ww.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&tt(e)===`template`){let e=n.content;Ct(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);Ct(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ge=!e,Ge&&(e=`<!-->`),typeof e!=`string`&&!wt(e)&&(e=XC(e),typeof e!=`string`))throw GC(`dirty is not a string, aborting`);if(!t.isSupported)return e;Se?(R=Ce,le=we):at(n),(F.uponSanitizeElement.length>0||F.uponSanitizeAttribute.length>0)&&(R=YC(R)),F.uponSanitizeAttribute.length>0&&(le=YC(le)),t.removed=[];let c=Ne&&typeof e!=`string`&&wt(e);if(c){_t(e);let t=b?b(e):e.nodeName;if(typeof t==`string`){let n=tt(t);if(!R[n]||fe[n])throw pt(e),GC(`root node is forbidden and cannot be sanitized in-place`)}if(St(e))throw pt(e),GC(`root node is clobbered and cannot be sanitized in-place`);try{It(e)}catch(t){throw pt(e),t}}else if(wt(e))i=vt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===ww.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),It(a);else{if(!Ee&&!ye&&!xe&&e.indexOf(`<`)===-1)return x&&Oe?D(e):e;if(i=vt(e),!i)return Ee?null:Oe?S:``}i&&Te&&ft(i.firstChild);let l=c?e:i,u=yt(l);try{for(;o=u.nextNode();)Ot(o,l),Pt(o),Ct(o.content)&&Ft(o.content)}catch(n){throw c&&(pt(e),EC(t.removed,e=>{e.element&>(e.element)})),n}if(c)return EC(t.removed,e=>{e.element&>(e.element)}),ye&&xt(e),e;if(Ee){if(ye&&xt(i),De)for(s=ee.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(le.shadowroot||le.shadowrootmode)&&(s=P.call(r,s,!0)),s}let d=xe?i.outerHTML:i.innerHTML;return xe&&R[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&WC(vw,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
69
|
+
`+d),ye&&(d=bt(d)),x&&Oe?D(d):d},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};at(e),Se=!0,Ce=R,we=le},t.clearConfig=function(){nt=null,Se=!1,Ce=null,we=null,x=C,S=``},t.isValidAttribute=function(e,t,n){nt||at({});let r=tt(e),i=tt(t);return kt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&HC(F,e)&&kC(F[e],t)},t.removeHook=function(e,t){if(HC(F,e)){if(t!==void 0){let n=DC(F[e],t);return n===-1?void 0:AC(F[e],n,1)[0]}return OC(F[e])}},t.removeHooks=function(e){HC(F,e)&&(F[e]=[])},t.removeAllHooks=function(){F=Dw()},t}var Aw=kw(),jw=null;function Mw(){return jw||(jw=Aw(globalThis.window??globalThis),jw.addHook(`afterSanitizeAttributes`,e=>{let t=e;t.tagName===`A`&&t.getAttribute?.(`target`)&&t.setAttribute(`rel`,`noopener noreferrer`)}),jw)}function Nw(e){return Mw().sanitize(e,{FORBID_TAGS:[`style`,`form`,`input`,`button`,`textarea`,`object`,`embed`],FORBID_ATTR:[`style`],ALLOW_DATA_ATTR:!1,USE_PROFILES:{html:!0},ADD_DATA_URI_TAGS:[`img`]})}function Pw(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}var Fw=!1;function Iw(){Fw||(Fw=!0,TS.registerLanguage(`typescript`,FS),TS.registerLanguage(`javascript`,WS),TS.registerLanguage(`json`,GS),TS.registerLanguage(`bash`,KS),TS.registerLanguage(`shell`,qS),TS.registerLanguage(`python`,JS),TS.registerLanguage(`diff`,YS),TS.registerLanguage(`xml`,XS),TS.registerLanguage(`css`,aC),TS.registerLanguage(`markdown`,oC),TS.registerLanguage(`yaml`,sC),TS.registerLanguage(`plaintext`,cC),TS.registerAliases([`ts`,`tsx`],{languageName:`typescript`}),TS.registerAliases([`js`,`jsx`,`mjs`,`cjs`],{languageName:`javascript`}),TS.registerAliases([`sh`,`zsh`,`console`],{languageName:`bash`}),TS.registerAliases([`py`],{languageName:`python`}),TS.registerAliases([`html`,`xhtml`,`svg`],{languageName:`xml`}),TS.registerAliases([`yml`],{languageName:`yaml`}),TS.registerAliases([`md`],{languageName:`markdown`}),TS.registerAliases([`text`,`txt`],{languageName:`plaintext`}))}function Lw(e,t){if(Iw(),t&&TS.getLanguage(t))try{return TS.highlight(e,{language:t,ignoreIllegals:!0}).value}catch{}return Rw.utils.escapeHtml(e)}var Rw=new wS({html:!1,linkify:!0,breaks:!1,highlight(e,t){let n=Lw(e,(t||``).toLowerCase()),r=t?`language-${t} hljs`:`hljs`;return`<pre class="hljs"><code class="${Rw.utils.escapeHtml(r)}">${n}</code></pre>`}});function zw(e){return Iw(),Nw(Rw.render(e??``))}function Bw(e,t){Iw();let n=Lw(e??``,(t||``).toLowerCase()),r=t?`language-${t} hljs`:`hljs`;return Nw(`<pre class="hljs"><code class="${Rw.utils.escapeHtml(r)}">${n}</code></pre>`)}var Vw=`crtr:transcript-detail`,Hw=[`focused`,`standard`,`verbose`];function Uw(){try{let e=localStorage.getItem(Vw);if(e===`focused`||e===`standard`||e===`verbose`)return e}catch{}return`standard`}var Ww=Uw(),Gw=new Set;function Kw(){for(let e of Gw)e()}function qw(e){if(e!==Ww){Ww=e;try{localStorage.setItem(Vw,e)}catch{}Kw()}}function Jw(){qw(Hw[(Hw.indexOf(Ww)+1)%Hw.length])}function Yw(e){return Gw.add(e),()=>{Gw.delete(e)}}typeof window<`u`&&window.addEventListener(`storage`,e=>{if(e.key!==Vw)return;let t=Uw();t!==Ww&&(Ww=t,Kw())});function Xw(){return(0,v.useSyncExternalStore)(Yw,()=>Ww,()=>Ww)}var Zw=[`[&_pre]:overflow-auto [&_pre]:p-[12px_14px] [&_pre]:rounded-none [&_pre]:border [&_pre]:border-[var(--line)] [&_pre]:bg-[var(--panel2)]`,`[&_pre_code]:text-[var(--ink2)]`,`[&_code]:font-mono [&_code]:text-xs`,`[&_:not(pre)>code]:bg-[var(--panel2)] [&_:not(pre)>code]:text-[var(--ink2)] [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:rounded-none`,`[&_a]:text-[var(--bone)] [&_a]:underline [&_a]:decoration-dotted`].join(` `),Qw={focused:`leading-relaxed`,standard:`leading-relaxed`,verbose:`leading-relaxed`};function $w({text:e,inProgress:t}){let n=(0,v.useMemo)(()=>t?``:zw(e??``),[t,e]),r=Qw[Xw()];return(0,z.jsx)(`div`,{className:Y(`prose`,r),children:t?(0,z.jsx)(`div`,{className:`whitespace-pre-wrap`,dangerouslySetInnerHTML:{__html:Pw(e??``)}}):(0,z.jsx)(`div`,{className:Y(Zw,r),dangerouslySetInnerHTML:{__html:n}})})}function eT({thinking:e,inProgress:t}){let n=Xw(),[r,i]=(0,v.useState)(!1),a=t||r||n===`verbose`,o=n===`focused`?`Thought`:`Thinking`;return(0,z.jsxs)(`div`,{className:Y(`thinking`,a&&`open`),children:[(0,z.jsxs)(`div`,{className:`think-toggle`,onClick:()=>i(e=>!e),children:[o,t?`…`:``]}),(0,z.jsx)(`div`,{className:`think-body whitespace-pre-wrap`,dangerouslySetInnerHTML:{__html:Pw(e)}})]})}var tT=new Set([`image/png`,`image/jpeg`,`image/jpg`,`image/gif`,`image/webp`,`image/svg+xml`,`image/avif`,`image/bmp`]);function nT({image:e}){let t=(e.mimeType||``).toLowerCase();return(0,z.jsx)(`img`,{className:`block max-w-[min(100%,520px)] max-h-[26rem] rounded-md my-1.5 object-contain`,src:`data:${tT.has(t)?t:`image/png`};base64,${e.data??``}`,alt:`image content`,loading:`lazy`,decoding:`async`})}var rT=new Set(`.md,.txt,.json,.ts,.tsx,.js,.mjs,.cjs,.css,.html,.htm,.yaml,.yml,.toml,.log,.sh,.py,.rb,.go,.rs,.java,.c,.cpp,.h,.env,.gitignore`.split(`,`));function iT(e){if(!e.startsWith(`/`))return!1;let t=e.split(`/`).filter(Boolean);if(t.length<2)return!1;let n=t[t.length-1],r=n.lastIndexOf(`.`);if(r<1)return!1;let i=n.slice(r).toLowerCase();return rT.has(i)}function aT(e){let t=/\/[a-zA-Z0-9_.\-/]+\.[a-zA-Z0-9]+/g,n=[],r;for(;(r=t.exec(e))!==null;)iT(r[0])&&n.push(r[0]);return[...new Set(n)]}var oT=(0,v.createContext)({peekedPath:null,onPeek:()=>{}});function sT(){return(0,v.useContext)(oT)}var cT=`[&_pre]:overflow-auto [&_pre]:p-[10px_12px] [&_pre]:rounded-md [&_pre]:bg-muted [&_code]:font-mono [&_code]:text-xs [&_:not(pre)>code]:bg-muted [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:rounded [&_p]:my-[0.4em] [&_a]:text-primary`,lT=`m-0 px-3 py-2 bg-[#0c0f13] text-[#d6dde6] font-mono text-xs whitespace-pre-wrap overflow-auto max-h-[26rem]`,uT=`px-3 py-2 opacity-50 text-xs italic`,dT={bash:`❯`,shell:`❯`,sh:`❯`,run:`❯`,terminal:`❯`,read:`≣`,read_file:`≣`,cat:`≣`,view:`≣`,edit:`✎`,str_replace:`✎`,apply_patch:`✎`,write:`✚`,write_file:`✚`,create:`✚`,grep:`⌕`,search:`⌕`,rg:`⌕`,web_search:`◎`,websearch:`◎`,web:`◎`,fetch:`⤓`,curl:`⤓`,http:`⤓`};function fT(e){return dT[(e||``).toLowerCase()]??`◆`}var pT={bash:`bash`,shell:`bash`,sh:`bash`,run:`bash`,terminal:`bash`,read:`read`,read_file:`read`,cat:`read`,view:`read`,grep:`read`,search:`read`,rg:`read`,edit:`write`,str_replace:`write`,apply_patch:`write`,write:`write`,write_file:`write`,create:`write`,web_search:`web`,websearch:`web`,web:`web`,fetch:`web`,curl:`web`,http:`web`};function mT(e){return pT[(e||``).toLowerCase()]??`other`}function hT(e){return e?e.content.filter(e=>e.type===`text`).map(e=>e.text).join(``):``}function gT(e){return e?e.content.filter(e=>e.type===`image`):[]}function _T(e){if(!e||Object.keys(e).length===0)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function vT(e){let t=e.arguments??{},n=e=>typeof t[e]==`string`?t[e]:void 0;return n(`command`)??n(`cmd`)??n(`path`)??n(`file_path`)??n(`filename`)??n(`pattern`)??n(`query`)??``}function yT({call:e,subtitle:t,inProgress:n,isError:r,children:i}){let a=t??vT(e),o=e.name,s=Xw(),{peekedPath:c,onPeek:l}=sT(),u=s===`verbose`||s===`standard`&&n,[d,f]=(0,v.useState)(null),p=d??u;return(0,z.jsxs)(`div`,{className:Y(`tool`,p&&`open`,r&&`tool-error`),"data-fam":mT(e.name),children:[(0,z.jsxs)(`div`,{className:`tool-head`,onClick:()=>f(!p),children:[(0,z.jsx)(`span`,{className:`tool-glyph`,children:fT(e.name)}),(0,z.jsx)(`span`,{className:`tool-name`,children:o}),a&&(0,z.jsx)(`span`,{className:`tool-arg`,children:iT(a)?(0,z.jsx)(`span`,{className:Y(`filelink`,c===a&&`peeked`),onClick:e=>{e.stopPropagation(),l(a)},children:a}):a}),(0,z.jsx)(`span`,{className:`ml-auto shrink-0 flex items-center`,children:(0,z.jsx)(`span`,{className:Y(`dot`,n?`active`:r?`error`:`done`),title:n?`running`:r?`error`:`done`,"aria-label":n?`running`:r?`error`:`done`})}),(0,z.jsx)(af,{className:Y(`size-3.5 text-[var(--dim)] transition-transform`,!p&&`-rotate-90`)})]}),(0,z.jsx)(`div`,{className:`tool-body`,children:i})]})}function bT({result:e}){let t=gT(e);return t.length===0?null:(0,z.jsx)(z.Fragment,{children:t.map((e,t)=>(0,z.jsx)(`div`,{className:`px-3 py-1`,children:(0,z.jsx)(nT,{image:e})},t))})}function xT(e){let t=e.command??e.cmd??e.script;return typeof t==`string`?t:``}function ST(e){let t=xT(e.call.arguments??{}),n=hT(e.result),r=e.inProgress,i=e.isError;return(0,z.jsxs)(yT,{call:e.call,subtitle:``,inProgress:r,isError:i,children:[(0,z.jsxs)(`pre`,{className:Y(lT,i&&`text-[#ff9b8a]`),children:[t&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{style:{opacity:.6},children:`$ `}),(0,z.jsx)(`span`,{dangerouslySetInnerHTML:{__html:Pw(t)}}),`
|
|
70
|
+
`]}),(0,z.jsx)(`span`,{dangerouslySetInnerHTML:{__html:Pw(n)}}),r&&(0,z.jsx)(`span`,{className:`inline-block size-2 rounded-full bg-[#7fb3ff] ml-1.5 animate-pulse`})]}),(0,z.jsx)(bT,{result:e.result})]})}var CT={ts:`ts`,tsx:`tsx`,js:`js`,jsx:`jsx`,mjs:`js`,cjs:`js`,json:`json`,sh:`bash`,bash:`bash`,zsh:`bash`,py:`python`,diff:`diff`,patch:`diff`,html:`html`,htm:`html`,xml:`xml`,svg:`xml`,css:`css`,scss:`css`,md:`markdown`,markdown:`markdown`,yml:`yaml`,yaml:`yaml`};function wT(e){let t=/\.([a-z0-9]+)$/i.exec(e||``);return t&&CT[t[1].toLowerCase()]||``}function TT(e){let t=vT(e.call),n=hT(e.result),r=n?Bw(n,wT(t)):``,i=e.inProgress;return(0,z.jsxs)(yT,{call:e.call,inProgress:i,isError:e.isError,children:[n?(0,z.jsx)(`div`,{className:cT,style:{padding:`4px 8px`},dangerouslySetInnerHTML:{__html:r}}):!i&&(0,z.jsx)(`div`,{className:`px-3 py-2 opacity-50 text-xs italic`,children:`no content`}),(0,z.jsx)(bT,{result:e.result})]})}var ET=1e6;function DT(e,t){let n=(e??``).split(`
|
|
71
|
+
`),r=(t??``).split(`
|
|
72
|
+
`),i=n.length,a=r.length;if((i+1)*(a+1)>ET){let e=[];for(let t of n)e.push({kind:`del`,text:t});for(let t of r)e.push({kind:`add`,text:t});return e}let o=Array.from({length:i+1},()=>Array(a+1).fill(0));for(let e=i-1;e>=0;e--)for(let t=a-1;t>=0;t--)o[e][t]=n[e]===r[t]?o[e+1][t+1]+1:Math.max(o[e+1][t],o[e][t+1]);let s=[],c=0,l=0;for(;c<i&&l<a;)n[c]===r[l]?(s.push({kind:`ctx`,text:n[c]}),c++,l++):o[c+1][l]>=o[c][l+1]?(s.push({kind:`del`,text:n[c]}),c++):(s.push({kind:`add`,text:r[l]}),l++);for(;c<i;)s.push({kind:`del`,text:n[c++]});for(;l<a;)s.push({kind:`add`,text:r[l++]});return s}function OT(e,t){for(let n of t)if(typeof e[n]==`string`)return e[n];return``}function kT(e){let t=e.call.arguments??{},n=OT(t,[`old_string`,`oldText`,`old`,`before`,`search`]),r=OT(t,[`new_string`,`newText`,`new`,`after`,`replace`]),i=DT(n,r),a=hT(e.result),o=e.isError;return(0,z.jsxs)(yT,{call:e.call,subtitle:vT(e.call),inProgress:e.inProgress,isError:o,children:[n||r?(0,z.jsx)(`div`,{className:`m-0 font-mono text-xs overflow-auto max-h-[28rem]`,children:i.map((e,t)=>(0,z.jsx)(`div`,{className:Y(`px-3 whitespace-pre-wrap`,e.kind===`add`&&`bg-[rgba(46,160,67,0.18)] text-[#aef0bf]`,e.kind===`del`&&`bg-[rgba(192,57,43,0.18)] text-[#ffb4ab]`,e.kind===`ctx`&&`opacity-70`),dangerouslySetInnerHTML:{__html:(e.kind===`add`?`+ `:e.kind===`del`?`- `:` `)+Pw(e.text)}},t))}):(0,z.jsx)(`div`,{className:uT,children:`no diff available`}),a&&(0,z.jsx)(`div`,{className:Y(`m-0 px-3 py-2 bg-[#0c0f13] text-[#d6dde6] font-mono text-xs whitespace-pre-wrap overflow-auto max-h-[26rem]`,o&&`text-[#ff9b8a]`),dangerouslySetInnerHTML:{__html:Pw(a)}}),(0,z.jsx)(bT,{result:e.result})]})}var AT={ts:`ts`,tsx:`tsx`,js:`js`,jsx:`jsx`,json:`json`,sh:`bash`,py:`python`,html:`html`,xml:`xml`,css:`css`,md:`markdown`,yml:`yaml`,yaml:`yaml`};function jT(e,t){for(let n of t)if(typeof e[n]==`string`)return e[n];return``}function MT(e){let t=e.call.arguments??{},n=vT(e.call),r=jT(t,[`content`,`contents`,`text`,`body`,`new_string`,`file_text`]),i=hT(e.result),a=e.isError,o=(()=>{if(!r)return``;let e=/\.([a-z0-9]+)$/i.exec(n),t=e&&AT[e[1].toLowerCase()]||``;return Bw(r,t)})();return(0,z.jsxs)(yT,{call:e.call,subtitle:n,inProgress:e.inProgress,isError:a,children:[r?(0,z.jsx)(`div`,{className:cT,style:{padding:`4px 8px`},dangerouslySetInnerHTML:{__html:o}}):(0,z.jsx)(`div`,{className:uT,children:`no content`}),i&&(0,z.jsx)(`div`,{className:Y(`m-0 px-3 py-2 bg-[#0c0f13] text-[#d6dde6] font-mono text-xs whitespace-pre-wrap overflow-auto max-h-[26rem]`,a&&`text-[#ff9b8a]`),dangerouslySetInnerHTML:{__html:Pw(i)}}),(0,z.jsx)(bT,{result:e.result})]})}function NT(e){let t=e.pattern??e.query??e.regex??e.search;return typeof t==`string`?t:``}function PT(e){let t=NT(e.call.arguments??{}),n=hT(e.result),r=n?n.split(`
|
|
73
|
+
`).filter(e=>e.length>0):[],i=e.inProgress;return(0,z.jsxs)(yT,{call:e.call,subtitle:t,inProgress:i,isError:e.isError,children:[r.length>0?(0,z.jsx)(`div`,{className:`m-0 font-mono text-xs overflow-auto max-h-[28rem]`,children:r.map((e,t)=>(0,z.jsx)(`div`,{className:`px-3 py-1 font-mono text-xs opacity-85`,dangerouslySetInnerHTML:{__html:Pw(e)}},t))}):!i&&(0,z.jsx)(`div`,{className:`px-3 py-2 opacity-50 text-xs italic`,children:`no matches`}),(0,z.jsx)(bT,{result:e.result})]})}function FT(e){let t=_T(e.call.arguments),n=hT(e.result),r=e.isError,i=e.inProgress;return(0,z.jsxs)(yT,{call:e.call,inProgress:i,isError:r,children:[t&&(0,z.jsx)(`pre`,{className:`m-0 px-3 py-2 bg-[#11161c] font-mono text-xs whitespace-pre-wrap overflow-auto max-h-60 border-b border-[#222b35]`,children:t}),n&&(0,z.jsx)(`div`,{className:Y(`[&_pre]:overflow-auto [&_pre]:p-[10px_12px] [&_pre]:rounded-md [&_pre]:bg-muted [&_code]:font-mono [&_code]:text-xs [&_:not(pre)>code]:bg-muted [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:rounded [&_p]:my-[0.4em] [&_a]:text-primary`,r&&`text-[#ff9b8a]`),style:{padding:`8px 11px`},dangerouslySetInnerHTML:{__html:zw(n)}}),(0,z.jsx)(bT,{result:e.result}),!t&&!n&&!i&&(0,z.jsx)(`div`,{className:`px-3 py-2 opacity-50 text-xs italic`,children:`no output`})]})}var IT={bash:ST,shell:ST,sh:ST,run:ST,terminal:ST,read:TT,read_file:TT,cat:TT,view:TT,edit:kT,str_replace:kT,apply_patch:kT,write:MT,write_file:MT,create:MT,grep:PT,search:PT,rg:PT};function LT(e){return IT[(e||``).toLowerCase()]??FT}Object.keys(IT);function RT({message:e,isLastAssistant:t,streaming:n,resultFor:r,executingToolIds:i}){let a=e.role;return a===`user`?e.origin===`inbox`?(0,z.jsx)(JT,{message:e}):(0,z.jsx)(`div`,{className:`text-sm leading-[1.55] break-words`,children:(0,z.jsx)(UT,{message:e})}):a===`assistant`?(0,z.jsx)(`div`,{className:`text-sm leading-[1.55] break-words`,children:(0,z.jsx)(WT,{message:e,isLastAssistant:t,streaming:n,resultFor:r,executingToolIds:i})}):a===`toolResult`?(0,z.jsx)(`div`,{className:`text-sm leading-[1.55] break-words`,children:(0,z.jsx)(qT,{message:e})}):a===`bashExecution`?(0,z.jsx)(`div`,{className:`text-sm leading-[1.55] break-words`,children:(0,z.jsx)(VT,{message:e})}):a===`custom`&&e.customType===zT?(0,z.jsx)(BT,{message:e}):null}var zT=`crtr-cycle-divider`;function BT({message:e}){let t=typeof e.content==`string`?e.content:`yielded — new cycle begins`;return(0,z.jsxs)(`div`,{className:`flex items-center gap-3 my-1`,style:{opacity:.55},children:[(0,z.jsx)(`div`,{className:`h-px flex-1`,style:{background:`var(--line2)`}}),(0,z.jsx)(`span`,{className:`text-xs text-[var(--dim)] whitespace-nowrap`,children:t}),(0,z.jsx)(`div`,{className:`h-px flex-1`,style:{background:`var(--line2)`}})]})}function VT({message:e}){let t=e.excludeFromContext?`!!`:`!`,n=e.exitCode===void 0&&!e.cancelled;return(0,z.jsxs)(`div`,{className:`font-mono text-xs rounded border border-[var(--border,#333)] overflow-hidden`,children:[(0,z.jsxs)(`div`,{className:`px-2 py-1 bg-[var(--surface-raised,#1a1a1a)] flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`opacity-60 select-none`,children:t}),(0,z.jsx)(`span`,{className:`whitespace-pre-wrap break-all`,children:e.command}),n&&(0,z.jsx)(`span`,{className:`ml-auto opacity-50`,children:`running…`}),e.cancelled&&(0,z.jsx)(`span`,{className:`ml-auto opacity-70`,children:`cancelled`}),!n&&!e.cancelled&&e.exitCode!==0&&(0,z.jsxs)(`span`,{className:`ml-auto opacity-70`,children:[`exit `,e.exitCode]})]}),e.output!==``&&(0,z.jsx)(`pre`,{className:`px-2 py-1 whitespace-pre-wrap break-all m-0`,children:e.output}),e.truncated&&(0,z.jsx)(`div`,{className:`px-2 py-1 opacity-50`,children:`output truncated`})]})}function HT({text:e}){return(0,z.jsxs)(`div`,{className:`queued`,children:[(0,z.jsxs)(`div`,{className:`tag`,children:[(0,z.jsx)(`span`,{className:`select-none`,children:`⋯`}),(0,z.jsx)(`span`,{children:`queued`})]}),(0,z.jsx)(`div`,{className:`whitespace-pre-wrap`,children:e})]})}function UT({message:e}){let t=e.content;return(0,z.jsx)(`div`,{className:`user`,children:typeof t==`string`?(0,z.jsx)(`div`,{className:`whitespace-pre-wrap`,children:t}):t.map((e,t)=>e.type===`text`?(0,z.jsx)(`div`,{className:`whitespace-pre-wrap`,children:e.text},t):e.type===`image`?(0,z.jsx)(nT,{image:e},t):null)})}function WT({message:e,isLastAssistant:t,streaming:n,resultFor:r,executingToolIds:i}){let a=e.content,o=e=>t&&n&&e===a.length-1,s=a.some(e=>e.type===`toolCall`),c=e.stopReason,l=!s&&(c===`error`||c===`aborted`);return(0,z.jsxs)(z.Fragment,{children:[a.map((e,t)=>e.type===`text`?(0,z.jsx)($w,{text:e.text,inProgress:o(t)},t):e.type===`thinking`?(0,z.jsx)(eT,{thinking:e.thinking,inProgress:o(t)},t):e.type===`toolCall`?(0,z.jsx)(KT,{call:e,streaming:n,resultFor:r,executingToolIds:i},t):null),l&&(0,z.jsx)(GT,{stopReason:c,errorMessage:e.errorMessage})]})}function GT({stopReason:e,errorMessage:t}){let n=e===`aborted`?t&&t!==`Request was aborted`?t:`Operation aborted`:`Error: ${t||`Unknown error`}`;return(0,z.jsxs)(`div`,{className:`msg-error`,children:[(0,z.jsx)(`span`,{className:`ic`,"aria-hidden":`true`,children:`⚠`}),(0,z.jsx)(`span`,{className:`txt`,children:n})]})}function KT({call:e,streaming:t,resultFor:n,executingToolIds:r}){let i=LT(e.name),a=n(e.id);return(0,z.jsx)(i,{call:e,result:a,inProgress:t&&r.has(e.id),isError:a?.isError??!1})}function qT({message:e}){return(0,z.jsx)(LT(e.toolName),{call:{type:`toolCall`,id:e.toolCallId,name:e.toolName,arguments:{}},result:e,inProgress:!1,isError:e.isError})}function JT({message:e}){let{onPeek:t,peekedPath:n}=sT(),r=typeof e.content==`string`?e.content:e.content.filter(e=>e.type===`text`).map(e=>typeof e.text==`string`?e.text:``).join(``),i=Yh(r),a=aT(r);function o(e){if(a.length===0)return(0,z.jsx)(`span`,{className:`whitespace-pre-wrap`,children:e});let r=[],i=e,o=0;for(let e of a){let a=i.indexOf(e);if(a===-1)continue;a>0&&r.push((0,z.jsx)(`span`,{className:`whitespace-pre-wrap`,children:i.slice(0,a)},o++));let s=n===e;r.push((0,z.jsx)(`span`,{onClick:n=>{n.stopPropagation(),t(e)},className:[`filelink text-xs`,s&&`peeked`].filter(Boolean).join(` `),children:e},o++)),i=i.slice(a+e.length)}return i&&r.push((0,z.jsx)(`span`,{className:`whitespace-pre-wrap`,children:i},o++)),(0,z.jsx)(z.Fragment,{children:r})}return(0,z.jsxs)(`div`,{className:`inbound`,children:[(0,z.jsx)(`span`,{className:`ic select-none`,children:`◍`}),(0,z.jsxs)(`div`,{className:`body`,children:[(0,z.jsxs)(`div`,{className:`src`,children:[(0,z.jsx)(`span`,{children:`inbox`}),i&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{children:`·`}),(0,z.jsxs)(`span`,{children:[`from `,i]})]})]}),o(r)]})]})}function YT({messages:e,partialToolResults:t,executingToolIds:n,queued:r,streaming:i,bottomInsetPx:a=0,keyboardOpen:o=!1,composerHeightPx:s}){let c=Xw(),l=(0,v.useMemo)(()=>{let n=new Map,r=new Set,i;for(let t of e)if(t.role===`assistant`){i=t;for(let e of t.content)e.type===`toolCall`&&r.add(e.id)}else t.role===`toolResult`&&n.set(t.toolCallId,t);for(let[e,r]of t)n.has(e)||n.set(e,r);let a=e.filter(e=>!(e.role===`toolResult`&&r.has(e.toolCallId))),o=0,s=a.map(e=>e.role===`user`&&e.origin!==`inbox`?(o+=1,`turn ${o}`):null);return{visible:a,resultMap:n,lastAssistant:i,turnLabels:s}},[e,t]),u=l.visible,d=e=>l.resultMap.get(e),f=(0,v.useRef)(null),p=(0,v.useRef)(!0),m=(0,v.useRef)(!1),h=hv({count:u.length,getScrollElement:()=>f.current,estimateSize:()=>96,overscan:10}),g=()=>{if(m.current)return;let e=f.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight;p.current=t<48},_=(e=8)=>{let t=f.current;if(!t||!p.current){m.current=!1;return}m.current=!0,t.scrollTop=t.scrollHeight,requestAnimationFrame(e>0?()=>_(e-1):()=>{m.current=!1})};return(0,v.useEffect)(()=>{p.current&&(u.length>0||r.length>0)&&queueMicrotask(()=>_())},[u,i,r,a,o,s]),(0,z.jsxs)(`div`,{ref:f,className:`flex min-h-0 flex-1 flex-col overflow-auto py-2`,style:a>0?{paddingBottom:`${a}px`}:void 0,onScroll:g,children:[(0,z.jsx)(`div`,{className:`relative w-full`,style:{height:`${h.getTotalSize()}px`},children:h.getVirtualItems().map(e=>{let t=u[e.index];return t?(0,z.jsxs)(`div`,{"data-index":e.index,ref:h.measureElement,className:`px-3.5 py-1.5 box-border`,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:[l.turnLabels[e.index]&&(0,z.jsxs)(`div`,{className:`flex items-center gap-3 mt-2.5 mb-3.5`,children:[c!==`focused`&&(0,z.jsx)(`span`,{className:`font-inst text-xs tracking-[0.16em] uppercase text-[var(--dim)]`,children:l.turnLabels[e.index]}),(0,z.jsx)(`div`,{className:`flex-1 h-px bg-[var(--line2)]`})]}),(0,z.jsx)(RT,{executingToolIds:n,message:t,isLastAssistant:t===l.lastAssistant,streaming:i,resultFor:d})]},e.key):null})}),r.length>0&&(0,z.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:r.map((e,t)=>(0,z.jsx)(`div`,{className:`px-3.5 py-1.5 box-border`,children:(0,z.jsx)(HT,{text:e})},t))})]})}var XT={notify:`Your agent has an update`,validation:`Your agent needs your approval`,decision:`Your agent needs a decision`,context:`Your agent needs more from you`,error:`Your agent hit a problem`};function ZT({conversationId:e}){let t=am(e),[n]=zn(),r=ct(),i=n.get(`ask`);return t.length===0?null:(0,z.jsx)(`div`,{className:`flex flex-col gap-2 border-b border-primary/20 bg-primary/5 px-4 py-3`,children:t.map(e=>(0,z.jsx)(QT,{deck:e,highlighted:i!==null&&e.job_id===i,navKey:r.key},e.id))})}function QT({deck:e,highlighted:t=!1,navKey:n}){let r=(0,v.useRef)(null);(0,v.useEffect)(()=>{t&&r.current?.scrollIntoView({behavior:`smooth`,block:`center`})},[t,n]);let i=dt(),{refetch:a}=im(),[o,s]=(0,v.useState)(!1),c=sm(e.kind).icon,l=e.kind===`notify`||e.kind===`validation`,u=async t=>{if(!o){s(!0);try{let n=(await em(e.job_id)).interactions[0],r=t===`ack`?{id:n.id}:{id:n.id,selectedOptionIds:[(t===`yes`?n.options.find(e=>e.id===`yes`)?.id??n.options[0]?.id:n.options.find(e=>e.id===`no`)?.id??n.options[1]?.id)??t]};await tm(e.job_id,{responses:[r]}),dm(`Done — thanks!`,`success`),a()}catch(e){if(Kp(e)){dm(e instanceof Error?e.message:`That request was already handled.`),a();return}dm(`Something went wrong — try again.`)}finally{s(!1)}}};return(0,z.jsxs)(`div`,{ref:r,className:`flex items-center gap-3 ${t?`rounded-md ring-2 ring-primary ring-offset-2 ring-offset-background`:``}`,children:[(0,z.jsx)(`span`,{className:`inline-flex size-7 shrink-0 items-center justify-center rounded-lg bg-primary/15 text-primary`,children:(0,z.jsx)(c,{className:`size-4`})}),(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`p`,{className:`truncate text-sm font-medium`,children:XT[e.kind]??XT.context}),(0,z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:e.title})]}),e.kind===`notify`&&(0,z.jsxs)(Z,{size:`sm`,disabled:o,onClick:()=>void u(`ack`),children:[(0,z.jsx)(rf,{className:`mr-1 size-3.5`}),` Got it`]}),e.kind===`validation`&&(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(Z,{size:`sm`,disabled:o,onClick:()=>void u(`yes`),children:`Approve`}),(0,z.jsx)(Z,{size:`sm`,variant:`outline`,disabled:o,onClick:()=>void u(`no`),children:`Reject`})]}),!l&&(0,z.jsxs)(Z,{size:`sm`,variant:`secondary`,onClick:()=>i(`/inbox/${encodeURIComponent(e.job_id)}`),children:[`Review `,(0,z.jsx)(tf,{className:`ml-1 size-3.5`})]})]})}var $T=[`[&_h1]:text-xl [&_h1]:font-medium [&_h1]:leading-[1.3] [&_h1]:mb-4 [&_h1]:text-[var(--ink)]`,`[&_h2]:text-base [&_h2]:font-medium [&_h2]:mb-3 [&_h2]:mt-4 [&_h2]:text-[var(--ink)]`,`[&_p]:text-xs [&_p]:leading-[1.65] [&_p]:text-[var(--ink2)] [&_p]:mb-3`,`[&_ul]:list-none [&_ol]:list-none`,`[&_li]:relative [&_li]:pl-5 [&_li]:pb-3.5 [&_li]:text-xs [&_li]:leading-[1.65] [&_li]:text-[var(--ink2)]`,`[&_li]:before:content-[''] [&_li]:before:absolute [&_li]:before:left-[2px] [&_li]:before:top-[8px] [&_li]:before:size-1.5 [&_li]:before:border [&_li]:before:border-[var(--mut)] [&_li]:before:rounded-[2px] [&_li]:before:rotate-45`,`[&_b]:text-[var(--ink)] [&_b]:font-semibold [&_strong]:text-[var(--ink)] [&_strong]:font-semibold`,`[&_pre]:overflow-auto [&_pre]:p-[10px_12px] [&_pre]:rounded-md [&_pre]:bg-[oklch(0_0_0/0.28)] [&_pre]:text-xs`,`[&_code]:font-mono [&_code]:text-xs`,`[&_a]:text-[var(--bone)] [&_a]:underline [&_a]:decoration-dotted`].join(` `);function eE({nodeId:e,path:t,onClose:n,className:r}){let[i,a]=(0,v.useState)(`pretty`),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null);return(0,v.useEffect)(()=>{t&&(s(!0),l(null),d(null),Qf(e,t).then(e=>{d(e),s(!1)}).catch(e=>{l(e instanceof Error?e.message:String(e)),s(!1)}))},[e,t]),(0,v.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&n()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t,n]),t?(0,z.jsxs)(`div`,{className:Y(`relative z-[1] flex h-full w-[21.5rem] shrink-0 flex-col border-l border-[var(--line)] bg-[var(--panel)]`,r),children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 px-3.5 py-3 border-b border-[var(--line)]`,children:[(0,z.jsx)(`span`,{className:`text-xs text-[var(--done)] shrink-0`,children:`◆`}),(0,z.jsx)(`span`,{className:`font-mono text-xs text-[var(--ink2)] flex-1 truncate`,style:{direction:`rtl`,textAlign:`left`,unicodeBidi:`plaintext`},title:t,children:t}),(0,z.jsxs)(`div`,{className:`flex gap-1.5 shrink-0`,children:[(0,z.jsx)(tE,{on:i===`pretty`,onClick:()=>a(`pretty`),children:`Pretty`}),(0,z.jsx)(tE,{on:i===`raw`,onClick:()=>a(`raw`),children:`Raw`}),(0,z.jsx)(tE,{onClick:n,"aria-label":`Close file peek`,children:`✕`})]})]}),(0,z.jsxs)(`div`,{className:`flex-1 overflow-auto px-5 py-5`,children:[o&&(0,z.jsx)(`div`,{className:`flex items-center justify-center h-16 text-[var(--dim)] text-xs`,children:(0,z.jsx)(`span`,{className:`animate-pulse`,children:`Loading…`})}),c&&(0,z.jsx)(`div`,{className:`text-xs text-[var(--blk)]`,children:c}),u&&!o&&(0,z.jsxs)(z.Fragment,{children:[u.truncated&&(0,z.jsx)(`div`,{className:`mb-3 text-xs text-[var(--dim)]`,children:`File truncated — showing partial content`}),i===`raw`?(0,z.jsx)(`pre`,{className:`text-xs font-mono text-[var(--ink2)] whitespace-pre-wrap break-all leading-[1.7]`,children:u.content}):(0,z.jsx)(nE,{content:u.content})]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 border-t border-[var(--line)] px-3.5 py-2.5 text-xs text-[var(--dim)]`,children:[`any file path in the stream opens here`,(0,z.jsx)(`span`,{className:`kbd ml-auto`,children:`esc`})]})]}):null}function tE({on:e,onClick:t,children:n,...r}){return(0,z.jsx)(`button`,{type:`button`,onClick:t,className:Y(`font-mono text-xs px-2 py-1 border transition-all duration-[0.12s] cursor-pointer`,e?`text-[var(--bone-ink)] bg-[var(--bone)] border-[var(--bone)]`:`text-[var(--mut)] bg-transparent border-[var(--line)] hover:text-[var(--ink)] hover:border-[var(--line2)]`),...r,children:n})}function nE({content:e}){if(e.startsWith(`---
|
|
74
|
+
`)||e.startsWith(`---\r
|
|
75
|
+
`)){let t=e.indexOf(`
|
|
76
|
+
---
|
|
77
|
+
`,4);if(t!==-1){let n=e.slice(4,t),r=e.slice(t+5),i=n.split(`
|
|
78
|
+
`).map(e=>{let t=e.indexOf(`:`);return t<1?null:{key:e.slice(0,t).trim(),val:e.slice(t+1).trim()}}).filter(Boolean);return(0,z.jsxs)(z.Fragment,{children:[i.length>0&&(0,z.jsx)(`div`,{className:`fm-chips`,children:i.map(({key:e,val:t})=>(0,z.jsxs)(`span`,{className:`fm-chip`,children:[e,` `,(0,z.jsx)(`b`,{children:t})]},e))}),(0,z.jsx)(`div`,{className:$T,dangerouslySetInnerHTML:{__html:zw(r)}})]})}}return(0,z.jsx)(`div`,{className:$T,dangerouslySetInnerHTML:{__html:zw(e)}})}var rE=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`],iE=e=>({"--i":e}),aE={borderBottom:`1px solid var(--line)`,background:`linear-gradient(180deg, rgba(33,31,25,.7), rgba(20,19,16,0))`};function oE(e){let t=dt(),{store:n,detail:r,input:i,setInput:a,reviving:o,actionError:s,peekedPath:c,setPeekedPath:l,dormant:u,brokerUp:d,isController:f,streaming:p,canDrive:m,commands:h,sendPrimary:g,onInputKeyDown:_,selectCommand:y,doRevive:b,doClose:x}=N_(e.id);return(0,v.useEffect)(()=>{let e=e=>{!e.altKey||e.metaKey||e.ctrlKey||e.code!==`KeyD`||document.activeElement instanceof HTMLTextAreaElement||(e.preventDefault(),Jw())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,z.jsx)(oT.Provider,{value:{peekedPath:c,onPeek:l},children:(0,z.jsxs)(`div`,{className:`in flex h-full min-h-0 flex-col`,children:[(0,z.jsxs)(`div`,{className:Y(`con-head rv flex shrink-0 items-center gap-3 px-6 py-4`,u&&`opacity-80`),style:{...aE,...iE(1)},children:[(0,z.jsxs)(`button`,{type:`button`,onClick:()=>t(`/`),className:`flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-[var(--ink)]`,children:[(0,z.jsx)(of,{className:`size-4`}),`Conversations`]}),(0,z.jsx)(ah,{store:n,detail:r}),(0,z.jsx)(`div`,{className:`flex-1`}),(0,z.jsx)(cE,{}),(0,z.jsx)(Ih,{store:n})]}),(0,z.jsx)(`div`,{className:`rv`,style:iE(2),children:(0,z.jsx)(dh,{store:n,detail:r})}),(0,z.jsx)(uE,{state:n.brokerStatus,dormant:u}),n.error&&(0,z.jsxs)(`div`,{className:`border-b border-destructive/30 bg-destructive/15 px-4 py-2 text-sm text-destructive`,children:[n.error.code,`: `,n.error.message]}),s&&(0,z.jsx)(`div`,{className:`border-b border-destructive/30 bg-destructive/15 px-4 py-2 text-sm text-destructive`,children:s}),(0,z.jsx)(ZT,{conversationId:e.id}),(0,z.jsxs)(`div`,{className:`streamwrap relative flex min-h-0 flex-1 overflow-hidden`,children:[(0,z.jsx)(Eh,{currentId:e.id,onNavigate:e=>t(`/nodes/${e}`)}),(0,z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,z.jsx)(`main`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:(0,z.jsx)(YT,{messages:n.messages,partialToolResults:n.partialToolResults,executingToolIds:n.executingToolIds,queued:n.queued,streaming:p})}),u?(0,z.jsx)(fE,{id:e.id,reviving:o,onRevive:b,onClose:x}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(dE,{store:n,canDrive:m,streaming:p,onClose:x}),(0,z.jsxs)(`div`,{className:`relative flex shrink-0 flex-col gap-2 border-t border-border px-4 py-3`,children:[(0,z.jsx)(F_,{commands:h,query:i,visible:i.startsWith(`/`),onSelect:y}),(0,z.jsx)(Up,{className:`resize-none font-mono text-sm`,value:i,onChange:e=>a(e.currentTarget.value),onKeyDown:_,disabled:!m,placeholder:lE(f,d),rows:3}),(0,z.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,z.jsx)(pE,{id:e.id}),(0,z.jsx)(Z,{variant:`default`,onClick:g,disabled:!m||!i.trim(),children:p?`Steer`:`Send`})]})]})]})]}),(0,z.jsx)(eE,{nodeId:e.id,path:c,onClose:()=>l(null)})]}),(0,z.jsx)(hh,{store:n,detail:r}),(0,z.jsx)(R_,{store:n})]})})}var sE=[{value:`focused`,label:`Focused`},{value:`standard`,label:`Standard`},{value:`verbose`,label:`Verbose`}];function cE(){let e=Xw();return(0,z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,title:`Transcript detail — Focused / Standard / Verbose (⌥D to cycle)`,children:[(0,z.jsx)(`span`,{className:`instlabel`,children:`Detail`}),(0,z.jsxs)(Ip,{value:e,onValueChange:e=>qw(e),children:[(0,z.jsx)(Rp,{size:`sm`,className:`text-sm`,"aria-label":`Transcript detail`,children:(0,z.jsx)(Lp,{})}),(0,z.jsx)(zp,{children:sE.map(e=>(0,z.jsx)(Bp,{value:e.value,children:e.label},e.value))})]})]})}function lE(e,t){return e?t?`Type a prompt, or / for commands…`:`broker is down — input is frozen`:`observer — request control to drive this session`}function uE({state:e,dormant:t}){return t||e!==`down`&&e!==`reconnecting`?null:(0,z.jsx)(`div`,{className:[`broker-banner border px-4 py-2 text-sm`,e===`down`?`bg-destructive/15 text-destructive border-destructive/30`:`bg-warning/15 border-warning/30`].join(` `),children:e===`down`?`Broker is down — history frozen, input disabled. Waiting for auto-revive…`:`Reconnecting to the broker…`})}function dE({store:e,canDrive:t,streaming:n,onClose:r}){let[i,a]=(0,v.useState)(null),o=i??e.state?.thinkingLevel??`medium`;return(0,z.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 border-t border-border px-4 py-2`,children:[(0,z.jsx)(Z,{variant:`secondary`,size:`sm`,disabled:!t||!n,onClick:()=>e.abort(),children:`Abort`}),(0,z.jsxs)(`label`,{className:`tiny-sel relative`,"aria-disabled":!t,children:[`thinking `,(0,z.jsx)(`b`,{children:o}),(0,z.jsx)(af,{className:`size-3.5`}),(0,z.jsx)(`select`,{disabled:!t,value:o,onChange:t=>{let n=t.currentTarget.value;a(n),e.setThinkingLevel(n)},"aria-label":`Thinking level`,className:`absolute inset-0 cursor-pointer opacity-0`,children:rE.map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))})]}),(0,z.jsx)(Z,{variant:`ghost`,size:`sm`,disabled:!t,onClick:()=>e.cycleModel(),children:`Cycle model`}),(0,z.jsx)(Z,{variant:`ghost`,size:`sm`,disabled:!t,onClick:()=>e.compact(),children:`Compact`}),(0,z.jsx)(Z,{variant:`destructive`,size:`sm`,className:`ml-auto`,onClick:r,children:`Close node`})]})}function fE({id:e,reviving:t,onRevive:n,onClose:r}){return(0,z.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 border-t border-border px-4 py-3`,children:[(0,z.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:`This node is dormant (read-only). Revive to drive it live.`}),(0,z.jsx)(pE,{id:e}),(0,z.jsx)(Z,{variant:`default`,disabled:t,onClick:n,children:t?`Revive…`:`Revive`}),(0,z.jsx)(Z,{variant:`destructive`,onClick:r,children:`Close node`})]})}function pE({id:e}){let[t,n]=(0,v.useState)(!1);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Z,{variant:`secondary`,onClick:()=>n(!0),children:`Message (inbox)`}),(0,z.jsx)(mE,{id:e,open:t,onOpenChange:n})]})}function mE({id:e,open:t,onOpenChange:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(null);return(0,v.useEffect)(()=>{t&&(i(``),o(``),u(null))},[t]),(0,z.jsx)(Ep,{open:t,onOpenChange:n,children:(0,z.jsxs)(kp,{children:[(0,z.jsxs)(Ap,{children:[(0,z.jsx)(Mp,{children:`Send an inbox message`}),(0,z.jsx)(Np,{children:`A directive deliverable to any node, including a dormant one.`})]}),(0,z.jsxs)(`form`,{onSubmit:async t=>{if(t.preventDefault(),r.trim()){c(!0),u(null);try{let t=await Yf(e,{body:r.trim(),...a.trim()?{tier:a.trim()}:{}});u(`delivered=${String(t.delivered)} revived=${String(t.revived)}`),i(``)}catch(e){u(P_(e))}finally{c(!1)}}},className:`flex flex-col gap-3`,children:[(0,z.jsx)(Up,{value:r,onChange:e=>i(e.currentTarget.value),rows:4,required:!0,placeholder:`Message body…`}),(0,z.jsxs)(`label`,{className:`flex flex-col gap-1 text-sm`,children:[`tier`,(0,z.jsx)(`input`,{className:`rounded border bg-transparent px-2 py-1 text-sm`,value:a,onChange:e=>o(e.currentTarget.value),placeholder:`(default)`})]}),l&&(0,z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:l}),(0,z.jsxs)(jp,{children:[(0,z.jsx)(Z,{type:`button`,variant:`secondary`,onClick:()=>n(!1),disabled:s,children:`Close`}),(0,z.jsx)(Z,{type:`submit`,variant:`default`,disabled:s,children:s?`Sending…`:`Send`})]})]})]})})}function hE(e){e.key===`Enter`&&e.stopPropagation()}function gE(e){return!e.canDrive&&!e.store.serverConnected?`broker is down — input is frozen`:e.canDrive?`Type a prompt. Enter makes a new line; Send submits.`:`observer — request control in More to drive`}function _E({screen:e,onMetricsChange:t}){let n=(0,v.useRef)(null),r=(0,v.useRef)(null),i=(0,v.useRef)(null),a=(0,v.useRef)(!1),o=(0,v.useRef)(0),s=(0,v.useRef)({height:0,keyboardHeight:0,keyboardOpen:!1}),c=(0,v.useMemo)(()=>(e,r=o.current)=>{a.current=e,o.current=r;let c=Math.ceil(n.current?.getBoundingClientRect().height??0),l={height:c,keyboardHeight:r,keyboardOpen:e},u=i.current??document.querySelector(`.mobile-shell-root`);i.current=u,u&&u.style.setProperty(`--composer-height`,`${c}px`),(s.current.height!==l.height||s.current.keyboardHeight!==l.keyboardHeight||s.current.keyboardOpen!==l.keyboardOpen)&&(s.current=l,t(l))},[t]),l=(0,v.useMemo)(()=>e=>{let t=i.current??document.querySelector(`.mobile-shell-root`);if(i.current=t,!t)return;let n=window.visualViewport,r=n&&e?Math.max(0,Math.round(window.innerHeight-(n.height+n.offsetTop))):0,a=n?Math.max(0,Math.round(n.offsetTop)):0;t.style.setProperty(`--kb-height`,`${r}px`),t.style.setProperty(`--vv-offset`,`${a}px`),t.dataset.keyboardOpen=e||r>0?`true`:`false`,c(e||r>0,r)},[c]);return(0,v.useLayoutEffect)(()=>{let e=r.current;e&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,180)}px`,c(a.current))},[e.input,c]),(0,v.useEffect)(()=>{let e=document.querySelector(`.mobile-shell-root`);if(i.current=e,!e)return;let t=()=>{let e=window.visualViewport,t=e?window.innerHeight-(e.height+e.offsetTop)>0:a.current;l(t)},o=window.visualViewport,s=()=>{o||l(!0)},u=()=>{o||l(!1)},d=r.current;d?.addEventListener(`focus`,s),d?.addEventListener(`blur`,u);let f=()=>t();o&&(o.addEventListener(`resize`,f),o.addEventListener(`scroll`,f)),window.addEventListener(`resize`,f),t();let p=typeof ResizeObserver>`u`?null:new ResizeObserver(()=>c(a.current));return p&&n.current&&p.observe(n.current),()=>{d?.removeEventListener(`focus`,s),d?.removeEventListener(`blur`,u),window.removeEventListener(`resize`,f),o&&(o.removeEventListener(`resize`,f),o.removeEventListener(`scroll`,f)),p?.disconnect(),e&&(e.style.setProperty(`--kb-height`,`0px`),e.style.setProperty(`--vv-offset`,`0px`),e.style.setProperty(`--composer-height`,`0px`),delete e.dataset.keyboardOpen)}},[c,l]),(0,z.jsxs)(`div`,{ref:n,className:`mobile-composer shrink-0 border-t border-border bg-[var(--panel)] px-3 py-3`,children:[(0,z.jsx)(Up,{ref:r,className:`mobile-composer-textarea resize-none rounded-xl border-border bg-[rgba(0,0,0,.16)] font-mono text-sm leading-5 text-[var(--ink)] placeholder:text-[var(--dim)]`,rows:2,value:e.input,placeholder:gE(e),onChange:t=>{e.setInput(t.currentTarget.value),requestAnimationFrame(()=>c(a.current))},onKeyDown:hE}),(0,z.jsxs)(`div`,{className:`mt-3 flex items-center gap-2`,children:[e.streaming&&(0,z.jsx)(Z,{type:`button`,variant:`secondary`,size:`sm`,disabled:!e.canDrive,onClick:()=>e.store.abort(),children:`Stop`}),(0,z.jsx)(Z,{type:`button`,size:`sm`,className:`flex-1`,disabled:!e.canDrive||!e.input.trim(),onClick:()=>e.sendPrimary(),children:e.streaming?`Steer`:`Send`})]}),!e.store.serverConnected&&(0,z.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`Offline — draft saved locally.`}),e.store.serverConnected&&!e.canDrive&&(0,z.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`Request control in More to drive this thread.`})]})}var vE={live:`border-success/25 bg-success/10 text-success`,working:`border-success/25 bg-success/10 text-success`,idle:`border-border bg-transparent text-muted-foreground`,"needs-you":`border-warning/30 bg-warning/10 text-warning`,done:`border-border bg-transparent text-muted-foreground`,reconnecting:`border-warning/30 bg-warning/10 text-warning`,offline:`border-destructive/30 bg-destructive/10 text-destructive`};function yE({title:e,statusLabel:t,statusTone:n,onBack:r,onOpenOverflow:i}){return(0,z.jsxs)(`header`,{className:`flex shrink-0 items-center gap-2 border-b px-3 py-2 [border-color:var(--line)] [background:var(--panel)]`,children:[(0,z.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Back to conversations`,className:`flex size-8 shrink-0 items-center justify-center rounded-full border border-border bg-transparent text-[var(--ink2)] transition-colors hover:text-[var(--ink)]`,children:(0,z.jsx)(of,{className:`size-4`})}),(0,z.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,z.jsx)(`h1`,{className:`truncate text-base font-medium text-[var(--ink)]`,children:e})}),t&&(0,z.jsxs)(`span`,{className:Y(`inline-flex max-w-[44vw] items-center gap-1.5 rounded-full border px-2 py-1 text-xs font-medium`,vE[n]),children:[n===`working`||n===`reconnecting`?(0,z.jsx)(Cf,{className:`size-3.5 shrink-0 animate-spin`}):(0,z.jsx)(`span`,{className:`size-2 shrink-0 rounded-full`,style:{background:n===`live`?`var(--success)`:n===`needs-you`?`var(--warning)`:n===`offline`?`var(--destructive)`:`var(--dim)`}}),(0,z.jsx)(`span`,{className:`truncate`,children:t})]}),(0,z.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`More thread actions`,className:`flex size-8 shrink-0 items-center justify-center rounded-full border border-border bg-transparent text-[var(--ink2)] transition-colors hover:text-[var(--ink)]`,children:(0,z.jsx)(gf,{className:`size-4`})})]})}var bE=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`];function xE({open:e,screen:t,onClose:n}){let[r,i]=(0,v.useState)(t.store.state?.thinkingLevel??`medium`);return(0,v.useEffect)(()=>{i(t.store.state?.thinkingLevel??`medium`)},[t.store.state?.thinkingLevel]),(0,v.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&n()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,n]),e?(0,z.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Thread actions`,className:`fixed inset-0 z-50 flex items-end bg-black/45 backdrop-blur-[2px]`,onMouseDown:e=>{e.target===e.currentTarget&&n()},children:(0,z.jsxs)(`section`,{className:`max-h-[88vh] w-full overflow-auto rounded-t-3xl border-t border-border bg-[var(--panel)] shadow-2xl shadow-black/40`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-border px-4 py-3`,children:[(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`p`,{className:`instlabel`,children:`Thread actions`}),(0,z.jsx)(`p`,{className:`truncate text-sm text-[var(--ink)]`,children:t.detail?.name?.trim()||`Thread`})]}),(0,z.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Close thread actions`,className:`flex size-8 items-center justify-center rounded-full border border-border bg-transparent text-[var(--ink2)] transition-colors hover:text-[var(--ink)]`,children:(0,z.jsx)(Nf,{className:`size-4`})})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-4 px-4 pt-4 pb-[max(1rem,env(safe-area-inset-bottom))]`,children:[(0,z.jsxs)(`section`,{className:`space-y-3`,children:[(0,z.jsx)(`p`,{className:`instlabel`,children:`Control`}),(0,z.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:(0,z.jsx)(Ih,{store:t.store})})]}),(0,z.jsxs)(`section`,{className:`space-y-3`,children:[(0,z.jsx)(`p`,{className:`instlabel`,children:`Session`}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(Z,{type:`button`,variant:`secondary`,size:`sm`,onClick:()=>t.store.cycleModel(),disabled:!t.canDrive,children:`Cycle model`}),(0,z.jsx)(Z,{type:`button`,variant:`secondary`,size:`sm`,onClick:()=>t.store.compact(),disabled:!t.canDrive,children:`Compact`}),(0,z.jsx)(Z,{type:`button`,variant:`destructive`,size:`sm`,onClick:()=>void t.doClose(),children:`Close node`}),t.dormant&&(0,z.jsx)(Z,{type:`button`,size:`sm`,onClick:()=>void t.doRevive(),disabled:t.reviving,children:t.reviving?`Reviving…`:`Revive`})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`instlabel`,children:`Thinking`}),(0,z.jsxs)(Ip,{value:r,onValueChange:e=>{let n=e;i(n),t.store.setThinkingLevel(n)},disabled:!t.canDrive,children:[(0,z.jsx)(Rp,{size:`sm`,className:`min-w-36 text-sm`,children:(0,z.jsx)(Lp,{placeholder:`Thinking`})}),(0,z.jsx)(zp,{children:bE.map(e=>(0,z.jsx)(Bp,{value:e,children:e},e))})]})]})]}),(0,z.jsxs)(`section`,{className:`space-y-2`,children:[(0,z.jsx)(`p`,{className:`instlabel`,children:`Context`}),(0,z.jsx)(`div`,{className:`overflow-hidden rounded-2xl border border-border bg-[rgba(0,0,0,.12)]`,children:(0,z.jsx)(dh,{store:t.store,detail:t.detail})})]}),(0,z.jsxs)(`section`,{className:`space-y-2`,children:[(0,z.jsx)(`p`,{className:`instlabel`,children:`Instruments`}),(0,z.jsx)(`div`,{className:`panel overflow-hidden p-3`,children:(0,z.jsx)(sh,{store:t.store,detail:t.detail})})]})]})]})}):null}function SE({id:e}){let t=dt(),n=N_(e),{nodes:r}=xp(),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)({height:0,keyboardHeight:0,keyboardOpen:!1}),c=(0,v.useCallback)(e=>{s(t=>t.height===e.height&&t.keyboardHeight===e.keyboardHeight&&t.keyboardOpen===e.keyboardOpen?t:e)},[]),l=(0,v.useMemo)(()=>Gm(r),[r]),u=(0,v.useMemo)(()=>xh(r,e).thisGraph[0]?.node.node_id??e,[e,r]),d=(0,v.useMemo)(()=>l.find(e=>e.id===u)??null,[l,u]),f=n.detail?.name?.trim()||n.detail?.kind?.trim()||`Conversation`,{label:p,tone:m}=(0,v.useMemo)(()=>CE(n,d),[d,n]),h=n.store.messages.length===0,g=wE(n,d),_=(0,v.useMemo)(()=>({peekedPath:n.peekedPath,onPeek:n.setPeekedPath}),[n.peekedPath,n.setPeekedPath]);return(0,z.jsx)(oT.Provider,{value:_,children:(0,z.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,children:[(0,z.jsx)(yE,{title:f,statusLabel:p,statusTone:m,onBack:()=>t(`/`),onOpenOverflow:()=>a(!0)}),n.actionError&&(0,z.jsx)(`div`,{className:`border-b border-destructive/30 bg-destructive/10 px-4 py-2 text-sm text-destructive`,children:n.actionError}),n.store.error&&!n.actionError&&(0,z.jsx)(`div`,{className:`border-b border-warning/30 bg-warning/10 px-4 py-2 text-sm text-warning`,children:n.store.error.message}),(0,z.jsx)(ZT,{conversationId:u}),(0,z.jsxs)(`main`,{className:`relative flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,z.jsx)(YT,{messages:n.store.messages,partialToolResults:n.store.partialToolResults,executingToolIds:n.store.executingToolIds,queued:n.store.queued,streaming:n.streaming,bottomInsetPx:o.keyboardHeight,keyboardOpen:o.keyboardOpen,composerHeightPx:o.height}),h&&(0,z.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center px-8 text-center text-sm text-muted-foreground`,children:(0,z.jsxs)(`div`,{className:`max-w-sm space-y-2 rounded-2xl border border-border bg-[rgba(0,0,0,.14)] px-4 py-3 shadow-lg shadow-black/20`,children:[(0,z.jsx)(`p`,{className:`font-medium text-[var(--ink)]`,children:g}),(0,z.jsx)(`p`,{children:n.store.serverConnected?`Waiting for the thread to load…`:`Drafts stay local while the broker reconnects.`})]})})]}),(0,z.jsx)(_E,{screen:n,onMetricsChange:c}),(0,z.jsx)(R_,{store:n.store}),(0,z.jsx)(xE,{open:i,screen:n,onClose:()=>a(!1)}),n.peekedPath&&(0,z.jsx)(`div`,{className:`fixed inset-0 z-40 flex justify-end bg-black/45 backdrop-blur-[2px]`,onMouseDown:e=>{e.target===e.currentTarget&&n.setPeekedPath(null)},children:(0,z.jsx)(eE,{nodeId:e,path:n.peekedPath,onClose:()=>n.setPeekedPath(null),className:`w-full max-w-[100vw]`})})]})})}function CE(e,t){if(e.store.brokerStatus===`down`)return{label:`Offline`,tone:`offline`};if(e.store.brokerStatus===`reconnecting`)return{label:`Reconnecting…`,tone:`reconnecting`};if(e.streaming)return{label:`Working…`,tone:`working`};if(e.store.source===`static`){if(!t)return{label:`Cached`,tone:`idle`};switch(t.state){case`needs-you`:return{label:`Needs you`,tone:`needs-you`};case`active`:return{label:`Active`,tone:`live`};case`idle`:return{label:`Idle`,tone:`idle`};case`done`:return{label:`Done`,tone:`done`}}}return{label:`Live`,tone:`live`}}function wE(e,t){return e.store.brokerStatus===`down`?`Couldn’t reach your thread yet — retrying quietly.`:e.store.brokerStatus===`reconnecting`?`Reconnecting to your thread…`:e.store.source===`static`?t?.state===`needs-you`?`Cached thread — waiting for your reply.`:`Cached thread — connecting to the live broker.`:`Loading conversation…`}function TE(){let{decks:e,loading:t}=im();return(0,z.jsxs)(`div`,{className:`mx-auto flex h-full min-h-0 max-w-3xl flex-col px-6 py-8`,children:[(0,z.jsxs)(`div`,{className:`mb-6 flex items-center gap-3`,children:[(0,z.jsx)(`h1`,{className:`text-3xl`,style:{fontWeight:460,letterSpacing:`-0.01em`,color:`var(--ink)`},children:`Inbox`}),e.length>0&&(0,z.jsx)(`span`,{className:`font-inst text-xs`,style:{fontWeight:600,color:`#ff8260`,background:`var(--blk-dim)`,border:`1px solid rgba(255,94,54,.35)`,padding:`1.5px 7px`,borderRadius:`99px`},children:e.length})]}),(0,z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:t?(0,z.jsx)(kE,{}):e.length===0?(0,z.jsx)(OE,{}):(0,z.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:e.map(e=>(0,z.jsx)(EE,{deck:e},e.id))})})]})}function EE({deck:e}){let t=dt(),n=sm(e.kind),r=n.icon;return(0,z.jsx)(`li`,{className:`list-none`,children:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>t(`/inbox/${encodeURIComponent(e.job_id)}`),className:`panel flex w-full items-start gap-4 px-4 py-3.5 text-left transition-colors hover:bg-[color-mix(in_oklch,var(--ink)_3%,transparent)] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[(0,z.jsx)(`span`,{className:`mt-0.5 inline-flex size-9 shrink-0 items-center justify-center rounded-lg`,style:{border:`1px solid var(--line)`,color:`var(--ink2)`,background:`color-mix(in oklch, var(--ink) 4%, transparent)`},title:n.label,children:(0,z.jsx)(r,{className:`size-4.5`})}),(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,z.jsx)(`span`,{className:`truncate text-sm`,style:{fontWeight:500,color:`var(--ink)`},children:e.title}),(0,z.jsx)(`span`,{className:`instlabel shrink-0`,children:n.label})]}),e.subtitle&&(0,z.jsx)(`p`,{className:`mt-0.5 truncate text-sm`,style:{color:`var(--mut)`},children:e.subtitle}),(0,z.jsx)(DE,{deck:e,className:`mt-1.5`})]}),(0,z.jsx)(`span`,{className:`font-inst shrink-0 text-xs`,style:{letterSpacing:`0.08em`,color:`var(--mut)`},title:`waiting ${cm(e.blocked_since)}`,children:cm(e.blocked_since)})]})})}function DE({deck:e,className:t}){return(0,z.jsxs)(`div`,{className:Y(`flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs`,t),children:[(0,z.jsxs)(`span`,{className:`text-muted-foreground`,children:[`in `,(0,z.jsx)(`span`,{className:`font-medium text-foreground/80`,children:e.conversation_title})]}),(0,z.jsx)(`span`,{className:`text-muted-foreground/40`,children:`·`}),(0,z.jsxs)(jn,{to:`/nodes/${encodeURIComponent(e.asking_node_id)}`,onClick:e=>e.stopPropagation(),className:`font-mono text-muted-foreground hover:text-primary hover:underline`,title:e.cwd,children:[e.asking_node_name,` (`,e.asking_node_id,`)`]}),(0,z.jsx)(`span`,{className:`text-muted-foreground/40`,children:`·`}),(0,z.jsx)(`span`,{className:`font-mono text-muted-foreground/60`,title:e.cwd,children:e.cwd})]})}function OE(){return(0,z.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center py-16 text-center`,children:[(0,z.jsx)(`p`,{className:`text-2xl`,style:{fontStyle:`italic`,color:`var(--ink)`},children:`You're all caught up.`}),(0,z.jsx)(`p`,{className:`mt-1.5 text-sm`,style:{color:`var(--mut)`},children:`Nothing needs your input right now.`})]})}function kE(){return(0,z.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:[0,1,2].map(e=>(0,z.jsxs)(`li`,{className:`panel flex items-center gap-4 px-4 py-3.5`,children:[(0,z.jsx)(`div`,{className:`size-9 shrink-0 animate-pulse rounded-lg bg-muted`}),(0,z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,z.jsx)(`div`,{className:`h-4 w-1/3 animate-pulse rounded-none bg-muted`}),(0,z.jsx)(`div`,{className:`h-3 w-2/3 animate-pulse rounded-none bg-muted/70`})]})]},e))})}function AE({deckId:e}){let t=dt(),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!0),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)({}),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(0);(0,v.useEffect)(()=>{let n=!1;return r(null),l({}),s(null),d(!1),a(!0),em(e).then(e=>{n||(r(e),l(Object.fromEntries(e.interactions.map(e=>[e.id,{id:e.id}]))),a(!1))}).catch(e=>{if(!n){if(Kp(e)){dm(e instanceof Hf?e.message:`That request was already handled.`),t(`/inbox`,{replace:!0});return}s(e instanceof Error?e:Error(`Failed to load deck.`)),a(!1)}}),()=>{n=!0}},[e,t,f]);let m=(e,t)=>l(n=>({...n,[e]:{...n[e],id:e,...t}}));if(i)return(0,z.jsx)(UE,{});if(o)return(0,z.jsx)(jE,{error:o,onRetry:()=>p(e=>e+1),onBack:()=>t(`/inbox`)});if(!n)return(0,z.jsx)(UE,{});let h=async e=>{if(u)return;d(!0);let r=Object.values(e??c).map(({selectedOptionId:e,...t})=>t);try{await tm(n.job_id,{responses:r}),dm(`Done — thanks!`,`success`),t(`/inbox`,{replace:!0})}catch(e){if(Kp(e)){dm(e instanceof Hf?e.message:`That request was already handled.`),t(`/inbox`,{replace:!0});return}dm(e instanceof Hf?e.message:`Something went wrong — try again.`),d(!1)}},g=n.interactions.length===1?n.interactions[0]:null,_=sm(n.kind).icon;return(0,z.jsxs)(`div`,{className:`mx-auto flex h-full min-h-0 max-w-2xl flex-col px-6 py-8`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:()=>t(`/inbox`),className:`mb-4 inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground`,children:[(0,z.jsx)(ef,{className:`size-4`}),` Inbox`]}),(0,z.jsxs)(`header`,{className:`mb-5 flex items-start gap-3`,children:[(0,z.jsx)(`span`,{className:`mt-0.5 inline-flex size-10 shrink-0 items-center justify-center rounded-lg`,style:{border:`1px solid var(--line)`,color:`var(--ink2)`,background:`color-mix(in oklch, var(--ink) 4%, transparent)`},children:(0,z.jsx)(_,{className:`size-5`})}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`h1`,{className:`text-2xl`,style:{fontWeight:460,letterSpacing:`-0.01em`,color:`var(--ink)`},children:n.title}),n.subtitle&&(0,z.jsx)(`p`,{className:`mt-0.5 text-sm`,style:{color:`var(--mut)`},children:n.subtitle}),(0,z.jsx)(DE,{deck:n,className:`mt-2`})]})]}),(0,z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:(0,z.jsx)(`div`,{className:`flex flex-col gap-6`,children:n.interactions.map(e=>(0,z.jsx)(PE,{interaction:e,answer:c[e.id]??{id:e.id},onChange:t=>m(e.id,t),conversationId:n.conversation_id,busy:u,onResolveWith:g?t=>void h({[e.id]:t}):void 0},e.id))})}),!ME(g)&&(0,z.jsxs)(`footer`,{className:`mt-6 flex shrink-0 items-center justify-end gap-2 border-t border-border pt-4`,children:[(0,z.jsx)(Z,{variant:`ghost`,onClick:()=>t(`/inbox`),disabled:u,children:`Cancel`}),(0,z.jsx)(Z,{onClick:()=>void h(),disabled:u||!NE(n,c),children:u?`Sending…`:`Submit`})]})]})}function jE({error:e,onRetry:t,onBack:n}){return(0,z.jsx)(`div`,{className:`mx-auto flex h-full min-h-0 max-w-2xl flex-col justify-center px-6 py-8`,children:(0,z.jsxs)(`section`,{className:`panel p-5`,children:[(0,z.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Couldn’t load the deck`}),(0,z.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:e.message}),(0,z.jsxs)(`div`,{className:`mt-4 flex gap-2`,children:[(0,z.jsx)(Z,{onClick:t,children:`Retry`}),(0,z.jsx)(Z,{variant:`ghost`,onClick:n,children:`Back to inbox`})]})]})})}function ME(e){return e!==null&&(e.kind===`notify`||e.kind===`validation`)}function NE(e,t){return e.interactions.every(e=>{let n=t[e.id];if(!n)return!1;if(e.kind===`notify`||e.kind===`error`)return!0;let r=!!n.selectedOptionIds?.length||!!n.freetext?.trim();return e.options.length===0&&!e.allowFreetext||r})}function PE({interaction:e,answer:t,onChange:n,conversationId:r,busy:i,onResolveWith:a}){switch(e.kind){case`notify`:return(0,z.jsx)(RE,{interaction:e,onGotIt:()=>a?.({id:e.id}),direct:!!a});case`validation`:return(0,z.jsx)(zE,{interaction:e,answer:t,onChange:n,busy:i,onResolveWith:a});case`context`:return(0,z.jsx)(VE,{interaction:e,answer:t,onChange:n});case`error`:return(0,z.jsx)(HE,{interaction:e,answer:t,onChange:n,conversationId:r});default:return(0,z.jsx)(BE,{interaction:e,answer:t,onChange:n})}}function FE({body:e}){return e?(0,z.jsx)(`div`,{className:`prose prose-sm max-w-none text-sm text-foreground/85 dark:prose-invert`,dangerouslySetInnerHTML:{__html:Nw(zw(e))}}):null}function IE({children:e,className:t}){return(0,z.jsx)(`section`,{className:Y(`panel p-5`,t),children:e})}function LE({it:e}){return(0,z.jsxs)(`div`,{className:`mb-3`,children:[(0,z.jsx)(`h2`,{className:`text-base font-semibold`,children:e.title}),e.subtitle&&(0,z.jsx)(`p`,{className:`mt-0.5 text-sm text-muted-foreground`,children:e.subtitle})]})}function RE({interaction:e,onGotIt:t,direct:n}){return(0,z.jsxs)(IE,{children:[(0,z.jsx)(LE,{it:e}),(0,z.jsx)(FE,{body:e.body}),n&&(0,z.jsx)(`div`,{className:`mt-4 flex justify-end`,children:(0,z.jsxs)(Z,{onClick:t,children:[(0,z.jsx)(rf,{className:`mr-1.5 size-4`}),` Got it`]})})]})}function zE({interaction:e,answer:t,onChange:n,busy:r,onResolveWith:i}){let a=e.options.find(e=>e.id===`yes`)??e.options[0],o=e.options.find(e=>e.id===`no`)??e.options[1],s=r=>{let a={...t,id:e.id,selectedOptionIds:[r]};i?i(a):n({selectedOptionIds:[r],selectedOptionId:void 0})};return(0,z.jsxs)(IE,{children:[(0,z.jsx)(LE,{it:e}),(0,z.jsx)(FE,{body:e.body}),(0,z.jsxs)(`div`,{className:`mt-4 flex flex-col gap-3`,children:[(0,z.jsx)(Up,{rows:2,value:t.freetext??``,onChange:e=>n({freetext:e.currentTarget.value}),placeholder:e.freetextLabel??`Add a comment (optional)`,className:`resize-none text-sm`}),(0,z.jsxs)(`div`,{className:`flex gap-3`,children:[(0,z.jsx)(Z,{className:`flex-1`,size:`lg`,disabled:r,onClick:()=>a&&s(a.id),children:a?.label??`Approve`}),(0,z.jsx)(Z,{className:`flex-1`,size:`lg`,variant:`outline`,disabled:r,onClick:()=>o&&s(o.id),children:o?.label??`Reject`})]}),!i&&t.selectedOptionIds?.[0]&&(0,z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Selected: `,e.options.find(e=>e.id===t.selectedOptionIds?.[0])?.label]})]})]})}function BE({interaction:e,answer:t,onChange:n}){let r=new Set(t.selectedOptionIds??[]),i=t=>{if(e.multiSelect){let e=new Set(r);e.has(t)?e.delete(t):e.add(t),n({selectedOptionIds:[...e],selectedOptionId:void 0})}else n({selectedOptionIds:[t],selectedOptionId:void 0})};return(0,z.jsxs)(IE,{children:[(0,z.jsx)(LE,{it:e}),(0,z.jsx)(FE,{body:e.body}),(0,z.jsx)(`ul`,{className:`mt-4 flex flex-col gap-2`,children:e.options.map(t=>{let n=r.has(t.id);return(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>i(t.id),className:Y(`flex w-full items-start gap-3 rounded-xl border px-4 py-3 text-left transition-colors`,n?`border-primary bg-primary/5 ring-1 ring-primary`:`border-border hover:border-primary/40 hover:bg-accent/40`),children:[(0,z.jsx)(`span`,{className:Y(`mt-0.5 flex size-4 shrink-0 items-center justify-center border`,e.multiSelect?`rounded`:`rounded-full`,n?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground/40`),children:n&&(0,z.jsx)(rf,{className:`size-3`})}),(0,z.jsxs)(`span`,{className:`min-w-0`,children:[(0,z.jsx)(`span`,{className:`block text-sm font-medium`,children:t.label}),t.description&&(0,z.jsx)(`span`,{className:`mt-0.5 block text-xs text-muted-foreground`,children:t.description})]})]})},t.id)})}),e.allowFreetext&&(0,z.jsx)(Up,{rows:2,value:t.freetext??``,onChange:e=>n({freetext:e.currentTarget.value}),placeholder:e.freetextLabel??`Anything else? (optional)`,className:`mt-3 resize-none text-sm`})]})}function VE({interaction:e,answer:t,onChange:n}){let r=t.selectedOptionIds?.[0];return(0,z.jsxs)(IE,{children:[(0,z.jsx)(LE,{it:e}),e.body&&(0,z.jsxs)(`div`,{className:`mb-4 rounded-xl border border-border p-3`,style:{background:`color-mix(in oklch, var(--ink) 3%, transparent)`},children:[(0,z.jsx)(`p`,{className:`instlabel mb-1.5`,children:`Why we're asking`}),(0,z.jsx)(FE,{body:e.body})]}),e.options.length>0&&(0,z.jsx)(`ul`,{className:`mb-3 flex flex-col gap-2`,children:e.options.map(e=>(0,z.jsx)(`li`,{children:(0,z.jsx)(`button`,{type:`button`,onClick:()=>n({selectedOptionIds:[e.id],selectedOptionId:void 0}),className:Y(`flex w-full items-start gap-3 rounded-xl border px-4 py-3 text-left transition-colors`,r===e.id?`border-primary bg-primary/5 ring-1 ring-primary`:`border-border hover:border-primary/40 hover:bg-accent/40`),children:(0,z.jsxs)(`span`,{className:`min-w-0`,children:[(0,z.jsx)(`span`,{className:`block text-sm font-medium`,children:e.label}),e.description&&(0,z.jsx)(`span`,{className:`mt-0.5 block text-xs text-muted-foreground`,children:e.description})]})})},e.id))}),(e.allowFreetext||e.options.length===0)&&(0,z.jsx)(Up,{autoFocus:!0,rows:3,value:t.freetext??``,onChange:e=>n({freetext:e.currentTarget.value}),placeholder:e.freetextLabel??`Your answer`,className:`resize-none text-sm`})]})}function HE({interaction:e,answer:t,onChange:n,conversationId:r}){let i=dt();return(0,z.jsxs)(IE,{className:`border-destructive/30`,children:[(0,z.jsx)(LE,{it:e}),(0,z.jsx)(FE,{body:e.body}),(0,z.jsxs)(`div`,{className:`mt-4 flex flex-col gap-2`,children:[e.options.map(e=>(0,z.jsx)(`button`,{type:`button`,onClick:()=>n({selectedOptionIds:[e.id],selectedOptionId:void 0}),className:Y(`flex w-full items-start gap-3 rounded-xl border px-4 py-3 text-left transition-colors`,t.selectedOptionIds?.[0]===e.id?`border-primary bg-primary/5 ring-1 ring-primary`:`border-border hover:border-primary/40 hover:bg-accent/40`),children:(0,z.jsxs)(`span`,{className:`min-w-0`,children:[(0,z.jsx)(`span`,{className:`block text-sm font-medium`,children:e.label}),e.description&&(0,z.jsx)(`span`,{className:`mt-0.5 block text-xs text-muted-foreground`,children:e.description})]})},e.id)),(0,z.jsx)(`button`,{type:`button`,onClick:()=>i(`/c/${encodeURIComponent(r)}`),className:`flex w-full items-center gap-2 rounded-xl border border-border px-4 py-3 text-left text-sm font-medium transition-colors hover:border-primary/40 hover:bg-accent/40`,children:`Take over — open the conversation`})]})]})}function UE(){return(0,z.jsxs)(`div`,{className:`mx-auto flex h-full max-w-2xl flex-col gap-5 px-6 py-8`,children:[(0,z.jsx)(`div`,{className:`h-4 w-16 animate-pulse rounded-none bg-muted`}),(0,z.jsx)(`div`,{className:`h-7 w-1/2 animate-pulse rounded-none bg-muted`}),(0,z.jsx)(`div`,{className:`h-40 w-full animate-pulse rounded-2xl bg-muted/60`})]})}var WE=`crtr-push-token-v1`,GE=`/__push-token`;async function KE(e){if(typeof caches>`u`)return;let t=await caches.open(WE);if(e===void 0||e===``){await t.delete(GE);return}await t.put(GE,new Response(e))}function qE(){let e={"content-type":`application/json`};return zf!==void 0&&(e.authorization=`Bearer ${zf}`),e}function JE(){return typeof window<`u`&&`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window}function YE(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}async function XE(){let e=await fetch(`/__crtr/push/vapid-public-key`,{headers:qE()});if(!e.ok)throw Error(`could not load the push key (${e.status})`);return(await e.json()).publicKey}async function ZE(e){let t=await fetch(`/__crtr/push/subscribe`,{method:`POST`,headers:qE(),body:JSON.stringify(e.toJSON())});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`subscribe failed (${t.status})`)}}async function QE(){if(!JE())return`unsupported`;if(Notification.permission===`denied`)return`denied`;let e=await navigator.serviceWorker.getRegistration();return e===void 0||await e.pushManager.getSubscription()===null?`unsubscribed`:`subscribed`}async function $E(){if(!JE())throw Error(`push notifications are not supported in this browser`);if(await Notification.requestPermission()!==`granted`)throw Error(`notification permission was not granted`);let e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();if(t!==null){await KE(zf);try{await ZE(t)}catch(e){throw await t.unsubscribe().catch(()=>{}),await KE(void 0).catch(()=>{}),e}return}let n=await XE(),r=await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:YE(n)});try{await KE(zf)}catch(e){throw await r.unsubscribe().catch(()=>{}),e}try{await ZE(r)}catch(e){throw await r.unsubscribe().catch(()=>{}),await KE(void 0).catch(()=>{}),e}}async function eD(){if(!JE())return;let e=await navigator.serviceWorker.getRegistration();if(e===void 0)return;let t=await e.pushManager.getSubscription();if(t===null)return;let n=t.endpoint;await t.unsubscribe(),await KE(void 0).catch(()=>{});try{await fetch(`/__crtr/push/subscribe`,{method:`DELETE`,headers:qE(),body:JSON.stringify({endpoint:n})})}catch{}}function tD(){let[e,t]=(0,v.useState)(()=>JE()?`unsubscribed`:`unsupported`),[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(null),o=(0,v.useCallback)(()=>{QE().then(t)},[]);return(0,v.useEffect)(()=>{o()},[o]),{status:e,busy:n,error:i,enable:(0,v.useCallback)(()=>{r(!0),a(null),$E().catch(e=>a(e instanceof Error?e.message:String(e))).then(o).finally(()=>r(!1))},[o]),disable:(0,v.useCallback)(()=>{r(!0),a(null),eD().catch(e=>a(e instanceof Error?e.message:String(e))).then(o).finally(()=>r(!1))},[o])}}function nD(){let[e,t]=(0,v.useState)(()=>document.documentElement.classList.contains(`dark`));return(0,z.jsxs)(`div`,{className:`mx-auto flex h-full min-h-0 max-w-2xl flex-col gap-8 overflow-auto px-6 py-8`,children:[(0,z.jsx)(`h1`,{className:`text-3xl`,style:{fontWeight:460,letterSpacing:`-0.01em`,color:`var(--ink)`},children:`Settings`}),(0,z.jsxs)(`section`,{className:`space-y-2.5`,children:[(0,z.jsx)(`h2`,{className:`instlabel`,children:`Appearance`}),(0,z.jsxs)(`p`,{className:`text-sm`,style:{color:`var(--mut)`},children:[e?`Dark theme`:`Light theme`,` is active.`]}),(0,z.jsxs)(Z,{variant:`outline`,onClick:()=>{let e=document.documentElement,n=!e.classList.contains(`dark`);e.classList.toggle(`dark`,n),e.classList.toggle(`light`,!n),t(n)},children:[`Switch to `,e?`light`:`dark`]})]}),(0,z.jsx)(rD,{})]})}function rD(){let{status:e,busy:t,error:n,enable:r,disable:i}=tD();return(0,z.jsxs)(`section`,{className:`space-y-2.5`,children:[(0,z.jsx)(`h2`,{className:`instlabel`,children:`Notifications`}),e===`unsupported`&&(0,z.jsx)(`p`,{className:`text-sm`,style:{color:`var(--mut)`},children:`Notifications aren’t supported in this browser.`}),e===`denied`&&(0,z.jsx)(`p`,{className:`text-sm`,style:{color:`var(--mut)`},children:`Notifications off — enable them for this site in your browser/OS settings.`}),e===`unsubscribed`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-sm`,style:{color:`var(--mut)`},children:`Get a push when an agent needs you or finishes, even when this tab is closed.`}),(0,z.jsx)(Z,{variant:`outline`,onClick:r,disabled:t,children:`Enable notifications`})]}),e===`subscribed`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-sm`,style:{color:`var(--mut)`},children:`Notifications are on for this browser.`}),(0,z.jsx)(Z,{variant:`outline`,onClick:i,disabled:t,children:`Disable notifications`})]}),n!==null&&(0,z.jsx)(`p`,{className:`text-sm`,style:{color:`var(--warning)`},children:n})]})}var iD=`(max-width: 767px)`;function aD(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(iD).matches}function oD(){let[e,t]=(0,v.useState)(aD);return(0,v.useEffect)(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(iD),n=e=>t(e.matches);return t(e.matches),e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e}function sD(e,t,n){let r=new URLSearchParams;t!==void 0&&t!==``&&r.set(`ask`,t),n!==void 0&&n!==``&&r.set(`token`,n);let i=r.toString();return`/c/${encodeURIComponent(e)}${i===``?``:`?${i}`}`}function cD(){let{id:e}=pt();return oD()?(0,z.jsx)(SE,{id:e??``},e):(0,z.jsx)(oE,{id:e??``},e)}function lD(){let{deckId:e}=pt();return(0,z.jsx)(AE,{deckId:e??``})}function uD(){return(0,z.jsxs)(zt,{children:[(0,z.jsx)(Lt,{path:`/`,element:(0,z.jsx)(Ym,{})}),(0,z.jsx)(Lt,{path:`/canvas`,element:(0,z.jsx)(Mm,{})}),(0,z.jsx)(Lt,{path:`/nodes/:id`,element:(0,z.jsx)(cD,{})}),(0,z.jsx)(Lt,{path:`/c/:id`,element:(0,z.jsx)(cD,{})}),(0,z.jsx)(Lt,{path:`/inbox`,element:(0,z.jsx)(TE,{})}),(0,z.jsx)(Lt,{path:`/inbox/:deckId`,element:(0,z.jsx)(lD,{})}),(0,z.jsx)(Lt,{path:`/settings`,element:(0,z.jsx)(nD,{})}),(0,z.jsx)(Lt,{path:`*`,element:(0,z.jsx)(Ym,{})})]})}function dD(){let e=dt();return(0,v.useEffect)(()=>{if(!(`serviceWorker`in navigator))return;let t=t=>{let n=t.data;if(n?.type!==`crtr-deep-link`||typeof n.conversationId!=`string`)return;let r=typeof n.askId==`string`?n.askId:void 0;e(sD(n.conversationId,r,zf))};return navigator.serviceWorker.addEventListener(`message`,t),()=>navigator.serviceWorker.removeEventListener(`message`,t)},[e]),null}function fD(){return lp(e=>e.reachable)?null:(0,z.jsx)(`div`,{role:`status`,className:`fixed inset-x-0 top-0 z-50 bg-warning/90 px-4 py-1.5 text-center text-sm font-medium text-background`,children:`Reconnecting…`})}function pD(e){e(`/?new=1`)}var mD=[{id:`conversations`,label:`Conversations`,path:`/`},{id:`canvas`,label:`Canvas`,path:`/canvas`},{id:`inbox`,label:`Inbox`,path:`/inbox`},{id:`settings`,label:`Settings`,path:`/settings`}],hD={conversations:Tf,canvas:Ef,inbox:bf,settings:Af};function gD({compact:e}){let t=dt();return(0,z.jsxs)(`aside`,{"aria-label":`Primary`,style:e?{width:58}:void 0,className:Y(`flex flex-none flex-col gap-0.5 py-4 [border-right:1px_solid_var(--line)] [background:linear-gradient(180deg,rgba(20,19,16,.6),rgba(20,19,16,.2))]`,e?`items-center`:`w-57 px-3`),children:[(0,z.jsxs)(jn,{to:`/`,title:`crouter`,className:Y(`flex items-center no-underline [color:var(--ink)]`,e?`justify-center pt-1 pb-4`:`gap-2.5 px-2.5 pt-1 pb-4 text-base font-medium tracking-[.01em]`),children:[(0,z.jsx)(`span`,{className:`font-inst flex flex-none items-center justify-center rounded-md text-xs font-bold [background:var(--bone)] [color:var(--bone-ink)]`,style:{width:22,height:22},children:`cr`}),!e&&`crouter`]}),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>pD(t),title:`New chat (⌘⇧O)`,"aria-label":`New chat`,className:Y(`flex items-center rounded-lg font-medium transition-all [color:var(--bone-ink)] [background:var(--bone)] hover:[background:var(--ink)]`,e?`mb-1 size-9 justify-center`:`mb-1.5 h-9 gap-2.5 px-3 text-sm`),children:[(0,z.jsx)(Df,{size:e?18:16,className:`flex-none`,"aria-hidden":!0}),!e&&(0,z.jsx)(`span`,{children:`New chat`})]}),mD.map(t=>{let n=hD[t.id]??Tf;return(0,z.jsxs)(Mn,{to:t.path,end:t.path===`/`,title:e?t.label:void 0,className:({isActive:t})=>Y(`relative flex items-center no-underline transition-all`,e?`size-9 justify-center rounded-lg border border-transparent opacity-75`:`h-9 gap-2.5 rounded-lg border border-transparent px-3 text-sm font-medium`,t?`[color:var(--ink)] opacity-100 [background:rgba(232,228,216,.06)] [border-color:var(--line)] [box-shadow:inset_0_1px_0_var(--raise)]`:`[color:var(--ink2)] hover:opacity-100 hover:[color:var(--ink)] hover:[background:rgba(232,228,216,.04)]`),children:[(0,z.jsx)(n,{size:18,className:e?void 0:`flex-none opacity-75`,"aria-hidden":!0}),!e&&(0,z.jsx)(`span`,{children:t.label}),t.id===`inbox`&&(0,z.jsx)(_D,{compact:e})]},t.id)}),(0,z.jsx)(`div`,{className:`flex-1`})]})}function _D({compact:e}){let t=rm();return t<=0?null:e?(0,z.jsx)(`span`,{className:`absolute right-[5px] top-[5px] size-2.5 rounded-full [background:var(--blk)] [box-shadow:0_0_10px_rgba(255,94,54,.55)] [animation:pulse-hot_1.6s_ease-out_infinite]`}):(0,z.jsx)(`span`,{className:`font-inst ml-auto rounded-full border px-2 py-0.5 text-xs font-semibold [color:#ff8260] [background:var(--blk-dim)] [border-color:rgba(255,94,54,.35)]`,children:t})}function vD(e,t){let n=(0,v.useRef)(e),r=(0,v.useRef)(t);n.current=e,r.current=t,(0,v.useEffect)(()=>{let e=e=>{let t=document.activeElement;t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement||t instanceof HTMLElement&&t.isContentEditable||n.current(e)&&(e.preventDefault(),r.current(e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[])}function yD({open:e,onClose:t}){let{nodes:n}=xp(),r=dt(),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(0),c=(0,v.useRef)(null),l=(0,v.useMemo)(()=>{let e=n.filter(e=>e.enterable).map(e=>({id:e.node_id,title:Lm(e),dot:Hm(e),kind:e.kind,last:e.last_activity??e.created}));e.sort((e,t)=>t.last.localeCompare(e.last));let t=i.trim().toLowerCase();return t?e.filter(e=>e.title.toLowerCase().includes(t)||e.kind.toLowerCase().includes(t)):e},[n,i]);if((0,v.useEffect)(()=>{e&&(a(``),s(0),c.current?.focus())},[e]),(0,v.useEffect)(()=>{s(e=>Math.min(e,Math.max(0,l.length-1)))},[l.length]),!e)return null;let u=e=>{e&&(r(`/c/${encodeURIComponent(e.id)}`),t())};return(0,z.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center px-4 pt-24`,style:{background:`var(--scrim)`},onClick:t,children:(0,z.jsxs)(`div`,{className:`panel w-full max-w-xl overflow-hidden p-0`,onClick:e=>e.stopPropagation(),onKeyDown:e=>{e.key===`Escape`?(e.preventDefault(),t()):e.key===`ArrowDown`?(e.preventDefault(),s(e=>Math.min(e+1,l.length-1))):e.key===`ArrowUp`?(e.preventDefault(),s(e=>Math.max(e-1,0))):e.key===`Enter`&&(e.preventDefault(),u(l[o]))},children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 border-b px-4 py-3`,style:{borderColor:`var(--line)`},children:[(0,z.jsx)(`span`,{className:`instlabel`,style:{color:`var(--dim)`},children:`Jump to`}),(0,z.jsx)(`input`,{ref:c,value:i,onChange:e=>a(e.currentTarget.value),placeholder:`Search conversations…`,className:`flex-1 bg-transparent text-sm outline-none`,style:{color:`var(--ink)`}}),(0,z.jsx)(`span`,{className:`kbd`,children:`esc`})]}),(0,z.jsx)(`ul`,{className:`max-h-80 overflow-auto py-1`,children:l.length===0?(0,z.jsx)(`li`,{className:`px-4 py-3 text-sm italic`,style:{color:`var(--mut)`},children:`no live nodes`}):l.map((e,t)=>(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>u(e),onMouseEnter:()=>s(t),className:Y(`flex w-full items-center gap-2.5 px-4 py-2 text-left transition-colors`,t===o&&`bg-[color-mix(in_oklch,var(--ink)_6%,transparent)]`),children:[(0,z.jsx)(`span`,{className:Y(`dot shrink-0`,e.dot)}),(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,style:{color:`var(--ink)`},children:e.title}),(0,z.jsx)(`span`,{className:`font-inst shrink-0 text-xs`,style:{letterSpacing:`0.04em`,color:`var(--mut)`},children:e.kind})]})},e.id))})]})})}var bD=/^\/(nodes|c)\//;function xD({children:e}){let t=ct(),n=dt(),[r,i]=(0,v.useState)(!1);return vD((0,v.useCallback)(e=>(e.metaKey||e.ctrlKey)&&e.shiftKey&&!e.altKey&&e.code===`KeyO`,[]),(0,v.useCallback)(()=>pD(n),[n])),vD((0,v.useCallback)(e=>(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey&&e.code===`KeyK`,[]),(0,v.useCallback)(()=>i(e=>!e),[])),(0,z.jsxs)(`div`,{className:`flex h-full min-h-0`,children:[(0,z.jsx)(gD,{compact:bD.test(t.pathname)}),(0,z.jsx)(`main`,{className:`min-h-0 flex-1 overflow-hidden`,children:e}),(0,z.jsx)(yD,{open:r,onClose:()=>i(!1)})]})}var SD=/^\/(?:c|nodes)\/([^/]+)\/?$/;function CD(e){let t=SD.exec(e);if(!t)return null;let n=t[1];return n===void 0?null:decodeURIComponent(n)}var wD=[{id:`home`,label:`Home`,path:`/`,icon:yf},{id:`inbox`,label:`Inbox`,path:`/inbox`,icon:bf}];function TD(){let e=dt();return(0,z.jsxs)(`nav`,{"aria-label":`Primary`,className:`mobile-bottom-nav flex flex-none items-stretch gap-1 border-t px-2 pt-1 [border-color:var(--line)] [background:var(--panel)]`,children:[wD.map(e=>(0,z.jsxs)(Mn,{to:e.path,end:e.path===`/`,className:({isActive:e})=>Y(`relative flex flex-1 flex-col items-center gap-0.5 rounded-lg py-1.5 text-xs font-medium no-underline transition-all`,e?`[color:var(--ink)] opacity-100`:`[color:var(--ink2)] opacity-75`),children:[(0,z.jsx)(e.icon,{size:20,"aria-hidden":!0}),(0,z.jsx)(`span`,{children:e.label}),e.id===`inbox`&&(0,z.jsx)(ED,{})]},e.id)),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>pD(e),"aria-label":`New chat`,className:`flex flex-1 flex-col items-center gap-0.5 rounded-lg py-1.5 text-xs font-medium [color:var(--ink2)]`,children:[(0,z.jsx)(`span`,{className:`flex size-7 items-center justify-center rounded-full [background:var(--bone)] [color:var(--bone-ink)]`,children:(0,z.jsx)(Df,{size:18,"aria-hidden":!0})}),(0,z.jsx)(`span`,{children:`New`})]})]})}function ED(){let e=rm();return e<=0?null:(0,z.jsx)(`span`,{className:`font-inst absolute right-2 top-0 min-w-4 rounded-full border px-1 text-center text-xs font-semibold [color:#ff8260] [background:var(--blk-dim)] [border-color:rgba(255,94,54,.35)]`,children:e})}function DD(){return typeof window>`u`?!1:window.matchMedia?.(`(display-mode: standalone)`).matches===!0||window.navigator.standalone===!0}function OD(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(DD);(0,v.useEffect)(()=>{let e=e=>{e.preventDefault(),t(e)},n=()=>{r(!0),t(null)};return window.addEventListener(`beforeinstallprompt`,e),window.addEventListener(`appinstalled`,n),()=>{window.removeEventListener(`beforeinstallprompt`,e),window.removeEventListener(`appinstalled`,n)}},[]);let i=(0,v.useCallback)(async()=>{e!==null&&(await e.prompt(),await e.userChoice,t(null))},[e]);return{canInstall:e!==null&&!n,promptInstall:i}}function kD(){let{canInstall:e,promptInstall:t}=OD(),[n,r]=(0,v.useState)(!1);return!e||n?null:(0,z.jsxs)(`div`,{className:`flex flex-none items-center gap-3 border-t px-3 py-2 text-sm [border-color:var(--line)] [background:var(--panel)] [color:var(--ink)]`,children:[(0,z.jsx)(`span`,{className:`flex-1`,children:`Install crouter for quick, full-screen access.`}),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>void t(),className:`flex items-center gap-1 rounded-md px-2 py-1 text-xs font-semibold [background:var(--bone)] [color:var(--bone-ink)]`,children:[(0,z.jsx)(hf,{size:14,"aria-hidden":!0}),`Install`]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>r(!0),"aria-label":`Dismiss install prompt`,className:`[color:var(--ink2)]`,children:(0,z.jsx)(Nf,{size:14,"aria-hidden":!0})})]})}function AD(e){let t=(0,v.useSyncExternalStore)(m_.subscribe,m_.getWarmIds),{nodes:n}=xp();return(0,v.useMemo)(()=>{let r=t.includes(e)?t:[...t,e],i=new Map(n.map(e=>[e.node_id,e]));return r.map(e=>{let t=i.get(e);return{nodeId:e,title:t?Lm(t):e,dot:t?Hm(t):`idle`}})},[t,n,e])}function jD(e,t,n){let r=e.findIndex(e=>e.nodeId===t);return r===-1?null:e[n===`next`?r+1:r-1]?.nodeId??null}function MD(e,t){let n=e.findIndex(e=>e.nodeId===t);if(n===-1)return null;let r=e[n+1];if(r)return r.nodeId;let i=e[n-1];return i?i.nodeId:null}var ND=48,PD=1.5,FD=24;function ID(e){if(e.scrolled||e.startX<FD)return null;let t=e.endX-e.startX,n=e.endY-e.startY;return Math.abs(t)<ND||Math.abs(t)<Math.abs(n)*PD?null:t<0?`next`:`prev`}function LD(e,t){return t>-48?!1:Math.abs(t)>=Math.abs(e)*PD}function RD({open:e,activeId:t,onClose:n}){let r=dt(),{nodes:i}=xp(),a=rm(),[o,s]=(0,v.useState)(``),c=(0,v.useMemo)(()=>Gm(i),[i]),l=(0,v.useMemo)(()=>{let e=o.trim().toLowerCase();return e?c.filter(t=>t.title.toLowerCase().includes(e)):c},[c,o]);if((0,v.useEffect)(()=>{e&&s(``)},[e]),(0,v.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&n()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,n]),!e)return null;let u=e=>{r(e),n()};return(0,z.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Switch conversation`,className:`fixed inset-0 z-50 flex items-end bg-black/45 backdrop-blur-[2px]`,onMouseDown:e=>{e.target===e.currentTarget&&n()},children:(0,z.jsxs)(`section`,{className:`flex max-h-[88vh] w-full flex-col overflow-hidden rounded-t-3xl border-t border-border bg-[var(--panel)] shadow-2xl shadow-black/40`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-border px-4 py-3`,children:[(0,z.jsx)(`p`,{className:`instlabel flex-1`,children:`Conversations`}),(0,z.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Close switcher`,className:`flex size-8 shrink-0 items-center justify-center rounded-full border border-border bg-transparent text-[var(--ink2)] transition-colors hover:text-[var(--ink)]`,children:(0,z.jsx)(Nf,{className:`size-4`})})]}),(0,z.jsx)(`div`,{className:`border-b border-border px-4 py-2`,children:(0,z.jsx)(`input`,{value:o,onChange:e=>s(e.currentTarget.value),placeholder:`Search conversations\\u2026`,className:`w-full bg-transparent text-sm outline-none [color:var(--ink)] placeholder:[color:var(--dim)]`})}),(0,z.jsxs)(`ul`,{className:`min-h-0 flex-none overflow-auto border-b border-border py-1`,children:[(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>u(`/`),className:`flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-[color-mix(in_oklch,var(--ink)_6%,transparent)]`,children:[(0,z.jsx)(yf,{className:`size-4 shrink-0 [color:var(--ink2)]`,"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`text-sm [color:var(--ink)]`,children:`Home`})]})}),(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>u(`/inbox`),className:`flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-[color-mix(in_oklch,var(--ink)_6%,transparent)]`,children:[(0,z.jsx)(bf,{className:`size-4 shrink-0 [color:var(--ink2)]`,"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`flex-1 text-sm [color:var(--ink)]`,children:`Inbox`}),a>0&&(0,z.jsx)(`span`,{className:`font-inst rounded-full border px-1.5 text-xs font-semibold [color:#ff8260] [background:var(--blk-dim)] [border-color:rgba(255,94,54,.35)]`,children:a})]})})]}),(0,z.jsx)(`ul`,{className:`min-h-0 flex-1 overflow-auto py-1 pb-[max(0.5rem,env(safe-area-inset-bottom))]`,children:l.length===0?(0,z.jsx)(`li`,{className:`px-4 py-3 text-sm italic [color:var(--mut)]`,children:`no conversations`}):l.map(e=>(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{type:`button`,onClick:()=>u(`/c/${encodeURIComponent(e.id)}`),className:Y(`flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-[color-mix(in_oklch,var(--ink)_6%,transparent)]`,e.id===t&&`bg-[color-mix(in_oklch,var(--ink)_6%,transparent)]`),children:[(0,z.jsx)(`span`,{className:Y(`dot shrink-0`,e.state===`needs-you`?`blocked`:e.state),"aria-hidden":!0}),(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`span`,{className:`block truncate text-sm [color:var(--ink)]`,children:e.title}),(0,z.jsx)(`span`,{className:`block truncate text-xs [color:var(--mut)]`,children:Km(e)})]})]})},e.id))})]})})}var zD=4;function BD({activeId:e}){let t=dt(),n=AD(e),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(null),s=(0,v.useRef)(null),c=(0,v.useRef)(null),l=n=>{n!==e&&t(`/c/${encodeURIComponent(n)}`)},u=r=>{if(o(null),r===e){let e=MD(n,r);t(e?`/c/${encodeURIComponent(e)}`:`/`)}m_.evict(r)};return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`nav`,{"aria-label":`Panes`,className:`mobile-pane-bar flex flex-none items-stretch gap-1.5 border-t px-2 pt-1.5 [border-color:var(--line)] [background:var(--panel)]`,onTouchStart:e=>{let t=e.touches[0];t&&(c.current={x:t.clientX,y:t.clientY,scrollLeft:s.current?.scrollLeft??0})},onTouchEnd:r=>{let i=c.current;if(c.current=null,!i)return;let a=r.changedTouches[0];if(!a)return;let o=Math.abs((s.current?.scrollLeft??0)-i.scrollLeft)>zD,l=ID({startX:i.x,startY:i.y,endX:a.clientX,endY:a.clientY,scrolled:o});if(!l)return;let u=jD(n,e,l);u&&t(`/c/${encodeURIComponent(u)}`)},children:[(0,z.jsx)(`button`,{type:`button`,onClick:()=>i(!0),"aria-label":`Switch conversation`,className:`flex size-9 shrink-0 items-center justify-center self-center rounded-full border border-border bg-transparent text-[var(--ink2)] transition-colors hover:text-[var(--ink)]`,children:(0,z.jsx)(Sf,{className:`size-4`,"aria-hidden":!0})}),(0,z.jsx)(`div`,{ref:s,className:`flex min-w-0 flex-1 items-center gap-1.5 overflow-x-auto pb-1.5`,children:n.map(t=>(0,z.jsx)(UD,{entry:t,active:t.nodeId===e,revealed:a===t.nodeId,onReveal:()=>o(t.nodeId),onDismissReveal:()=>o(null),onSelect:()=>l(t.nodeId),onClose:()=>u(t.nodeId)},t.nodeId))}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>pD(t),"aria-label":`New chat`,className:`mb-1.5 flex size-9 shrink-0 items-center justify-center self-center rounded-full [background:var(--bone)] [color:var(--bone-ink)]`,children:(0,z.jsx)(Df,{className:`size-4`,"aria-hidden":!0})})]}),(0,z.jsx)(RD,{open:r,activeId:e,onClose:()=>i(!1)})]})}var VD=480,HD=8;function UD({entry:e,active:t,revealed:n,onReveal:r,onDismissReveal:i,onSelect:a,onClose:o}){let s=(0,v.useRef)(null),c=(0,v.useRef)(null),l=(0,v.useRef)(!1),u=()=>{c.current&&=(clearTimeout(c.current),null)};return(0,z.jsxs)(`button`,{type:`button`,onTouchStart:e=>{let t=e.touches[0];t&&(s.current={x:t.clientX,y:t.clientY},l.current=!1,u(),c.current=setTimeout(()=>{l.current=!0,r()},VD))},onTouchMove:e=>{let t=s.current,n=e.touches[0];!t||!n||Math.hypot(n.clientX-t.x,n.clientY-t.y)>HD&&u()},onTouchEnd:e=>{u();let t=s.current;s.current=null;let n=e.changedTouches[0];if(!(!t||!n)){if(l.current){e.preventDefault();return}LD(n.clientX-t.x,n.clientY-t.y)&&(e.preventDefault(),o())}},onClick:()=>n?i():a(),"aria-label":n?`Close ${e.title}`:e.title,className:Y(`relative flex shrink-0 items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors`,t?`border-[color:var(--line2)] [background:var(--panel2)] [color:var(--ink)]`:`border-border bg-transparent [color:var(--ink2)]`),children:[(0,z.jsx)(`span`,{className:Y(`dot shrink-0`,e.dot),"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`max-w-32 truncate`,children:e.title}),n&&(0,z.jsx)(`span`,{role:`button`,tabIndex:0,onClick:e=>{e.stopPropagation(),o()},"aria-label":`Close ${e.title}`,className:`ml-0.5 flex size-4 shrink-0 items-center justify-center rounded-full [background:var(--destructive)] text-white`,children:(0,z.jsx)(Nf,{className:`size-3`,"aria-hidden":!0})})]})}function WD({children:e}){let t=CD(ct().pathname);return(0,z.jsxs)(`div`,{className:`mobile-shell-root flex flex-col overflow-hidden`,children:[(0,z.jsx)(`main`,{className:`min-h-0 flex-1 overflow-hidden`,children:e}),t===null?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(kD,{}),(0,z.jsx)(TD,{})]}):(0,z.jsx)(BD,{activeId:t},t)]})}function GD({children:e}){return oD()?(0,z.jsx)(WD,{children:e}):(0,z.jsx)(xD,{children:e})}var KD=`false`,qD=`false`,JD=KD===`true`,YD=qD===`true`;function XD(e={}){let{immediate:t=!1,onNeedReload:n,onNeedRefresh:r,onOfflineReady:i,onRegistered:a,onRegisteredSW:o,onRegisterError:s}=e,c,l,u,d=async(e=!0)=>{await l,JD||u?.()};async function f(){if(`serviceWorker`in navigator){if(c=await w(async()=>{let{Workbox:e}=await import(`./workbox-window.prod.es5-Bd17z0YL.js`);return{Workbox:e}},[]).then(({Workbox:e})=>new e(`/sw.js`,{scope:`/`,type:`classic`})).catch(e=>{s?.(e)}),!c)return;if(u=()=>{c?.messageSkipWaiting()},!YD)if(JD)c.addEventListener(`activated`,e=>{(e.isUpdate||e.isExternal)&&(n?n():window.location.reload())}),c.addEventListener(`installed`,e=>{e.isUpdate||i?.()});else{let e=!1,t=()=>{e=!0,c?.addEventListener(`controlling`,e=>{e.isUpdate&&(n?n():window.location.reload())}),r?.()};c.addEventListener(`installed`,n=>{n.isUpdate===void 0?n.isExternal===void 0?!e&&i?.():n.isExternal?t():!e&&i?.():n.isUpdate||i?.()}),c.addEventListener(`waiting`,t)}c.register({immediate:t}).then(e=>{o?o(`/sw.js`,e):a?.(e)}).catch(e=>{s?.(e)})}}return l=f(),d}function ZD(e={}){let{immediate:t=!0,onNeedReload:n,onNeedRefresh:r,onOfflineReady:i,onRegistered:a,onRegisteredSW:o,onRegisterError:s}=e,[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),[f]=(0,v.useState)(()=>XD({immediate:t,onNeedReload:n,onOfflineReady(){d(!0),i?.()},onNeedRefresh(){l(!0),r?.()},onRegistered:a,onRegisteredSW:o,onRegisterError:s}));return{needRefresh:[c,l],offlineReady:[u,d],updateServiceWorker:f}}function QD(){let{needRefresh:[e,t],offlineReady:[n,r],updateServiceWorker:i}=ZD({onRegisterError(e){console.warn(`crtr web: service worker registration failed`,e)}});return(0,v.useEffect)(()=>{n&&(dm(`App ready to work offline`,`success`),r(!1))},[n,r]),{needRefresh:e,dismiss:()=>t(!1),refresh:()=>void i(!0)}}function $D(){let{needRefresh:e,dismiss:t,refresh:n}=QD();return e?(0,z.jsx)(`div`,{className:`pwa-update-banner px-3`,children:(0,z.jsxs)(`div`,{className:`pointer-events-auto flex items-center gap-3 rounded-lg border px-3 py-2 text-sm shadow-md [border-color:var(--line)] [background:var(--panel)] [color:var(--ink)]`,children:[(0,z.jsx)(`span`,{children:`Update ready`}),(0,z.jsxs)(`button`,{type:`button`,onClick:n,className:`flex items-center gap-1 rounded-md px-2 py-1 text-xs font-semibold [background:var(--bone)] [color:var(--bone-ink)]`,children:[(0,z.jsx)(Of,{size:14,"aria-hidden":!0}),`Refresh`]}),(0,z.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Dismiss update prompt`,className:`[color:var(--ink2)]`,children:(0,z.jsx)(Nf,{size:14,"aria-hidden":!0})})]})}):null}function eO(){let e=um(e=>e.toasts),t=um(e=>e.dismiss);return e.length===0?null:(0,z.jsx)(`div`,{className:`pointer-events-none fixed inset-x-0 bottom-4 z-50 flex flex-col items-center gap-2`,children:e.map(e=>(0,z.jsx)(`button`,{type:`button`,onClick:()=>t(e.id),className:Y(`pointer-events-auto border px-4 py-2 font-mono text-sm transition-opacity`,e.tone===`success`?`border-success/40 bg-success/10 text-success`:`border-border bg-card text-foreground`),children:e.message},e.id))})}function tO(){return(0,z.jsx)(kn,{children:(0,z.jsxs)(Yd,{delayDuration:300,children:[(0,z.jsx)(fD,{}),(0,z.jsx)(dD,{}),(0,z.jsx)(GD,{children:(0,z.jsx)(uD,{})}),(0,z.jsx)($D,{}),(0,z.jsx)(eO,{})]})})}document.documentElement.classList.add(`dark`),document.documentElement.classList.remove(`light`);var nO=document.getElementById(`root`);if(!nO)throw Error(`crtr web: #root element not found in index.html`);(0,b.createRoot)(nO).render((0,z.jsx)(v.StrictMode,{children:(0,z.jsx)(tO,{})}));
|