@knpkv/codecommit-web 0.11.0 → 0.11.2
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/client/assets/index-DHUFjL8d.css +1 -0
- package/dist/client/assets/index-DSDtEnV5.js +90 -0
- package/dist/client/index.html +2 -2
- package/dist/main.js +4 -2
- package/dist/main.js.map +1 -1
- package/dist/server/Api.d.ts +56 -56
- package/dist/server/Server.d.ts.map +1 -1
- package/dist/server/Server.js +2 -1
- package/dist/server/Server.js.map +1 -1
- package/dist/server/handlers/accounts-live.d.ts +1 -1
- package/dist/server/handlers/accounts-live.d.ts.map +1 -1
- package/dist/server/handlers/audit-live.d.ts +1 -1
- package/dist/server/handlers/audit-live.d.ts.map +1 -1
- package/dist/server/handlers/config-live.d.ts +1 -1
- package/dist/server/handlers/config-live.d.ts.map +1 -1
- package/dist/server/handlers/config-live.js +8 -5
- package/dist/server/handlers/config-live.js.map +1 -1
- package/dist/server/handlers/events-live.d.ts +1 -1
- package/dist/server/handlers/events-live.d.ts.map +1 -1
- package/dist/server/handlers/events-live.js +8 -2
- package/dist/server/handlers/events-live.js.map +1 -1
- package/dist/server/handlers/notifications-live.d.ts +1 -1
- package/dist/server/handlers/notifications-live.d.ts.map +1 -1
- package/dist/server/handlers/notifications-live.js +3 -2
- package/dist/server/handlers/notifications-live.js.map +1 -1
- package/dist/server/handlers/permissions-live.d.ts +1 -1
- package/dist/server/handlers/permissions-live.d.ts.map +1 -1
- package/dist/server/handlers/permissions-live.js +2 -1
- package/dist/server/handlers/permissions-live.js.map +1 -1
- package/dist/server/handlers/prs-live.d.ts +1 -1
- package/dist/server/handlers/prs-live.d.ts.map +1 -1
- package/dist/server/handlers/prs-live.js +17 -12
- package/dist/server/handlers/prs-live.js.map +1 -1
- package/dist/server/handlers/sandbox-live.d.ts +1 -1
- package/dist/server/handlers/sandbox-live.d.ts.map +1 -1
- package/dist/server/handlers/sandbox-live.js +3 -2
- package/dist/server/handlers/sandbox-live.js.map +1 -1
- package/dist/server/handlers/stats-live.d.ts +1 -1
- package/dist/server/handlers/stats-live.d.ts.map +1 -1
- package/dist/server/handlers/subscriptions-live.d.ts +1 -1
- package/dist/server/handlers/subscriptions-live.d.ts.map +1 -1
- package/dist/tooling/production-prototype-boundary.d.ts +6 -0
- package/dist/tooling/production-prototype-boundary.d.ts.map +1 -0
- package/dist/tooling/production-prototype-boundary.js +21 -0
- package/dist/tooling/production-prototype-boundary.js.map +1 -0
- package/package.json +15 -15
- package/dist/client/assets/index-Dv7jNWIj.js +0 -90
- package/dist/client/assets/index-olbvD6Ke.css +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
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 N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(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+=N(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+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function 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:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(e){return e})||[]},only:function(e){if(!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 N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?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?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(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 L(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function ae(e,t){re++,ne[re]=e.current,e.current=t}var oe=ie(null),se=ie(null),ce=ie(null),le=ie(null);function ue(e,t){switch(ae(ce,t),ae(se,e),ae(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(oe),ae(oe,e)}function de(){L(oe),L(se),L(ce)}function fe(e){e.memoizedState!==null&&ae(le,e);var t=oe.current,n=tf(t,e.type);t!==n&&(ae(se,e),ae(oe,n))}function pe(e){se.current===e&&(L(oe),L(se)),le.current===e&&(L(le),dp._currentValue=te)}var me,he;function ge(e){if(me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||``,he=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+me+e+he}var _e=!1;function ve(e,t){if(!e||_e)return``;_e=!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{_e=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ge(n):``}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge(`Lazy`);case 13:return e.child!==t&&t!==null?ge(`Suspense Fallback`):ge(`Suspense`);case 19:return ge(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return ge(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do t+=ye(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var xe=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(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 Ke(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=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(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 qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(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 Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(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-Re(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&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(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 rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=I.p;return e===0?(e=window.event,e===void 0?32:Dp(e.type)):e}function at(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wf(e);e!==null;){if(n=e[st])return n;e=wf(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function yt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function bt(e){e[mt]=!0}var xt=new Set,St={};function Ct(e,t){wt(e,t),wt(e+`Capture`,t)}function wt(e,t){for(St[e]=t,e=0;e<t.length;e++)xt.add(t[e])}var Tt=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]*$`),Et={},Dt={};function Ot(e){return xe.call(Dt,e)?!0:xe.call(Et,e)?!1:Tt.test(e)?Dt[e]=!0:(Et[e]=!0,!1)}function kt(e,t,n){if(Ot(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 At(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 jt(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 Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(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 Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Lt(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 Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(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=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(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=``+Mt(s):e.removeAttribute(`name`)}function Vt(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)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(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),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(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=``+Mt(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 Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(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=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=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 Jt(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||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(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&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(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 Zt=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`]]),Qt=/^[\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 $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(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="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ct]||null;if(!a)throw Error(i(90));Bt(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&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(Au(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.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 hn=i.slice(e,1<r?1-r:void 0)}function _n(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 vn(){return!0}function yn(){return!1}function bn(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)?vn:yn,this.isPropagationStopped=yn,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=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=bn(xn),Cn=m({},xn,{view:0,detail:0}),wn=bn(Cn),Tn,En,Dn,On=m({},Cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zn,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!==Dn&&(Dn&&e.type===`mousemove`?(Tn=e.screenX-Dn.screenX,En=e.screenY-Dn.screenY):En=Tn=0,Dn=e),Tn)},movementY:function(e){return`movementY`in e?e.movementY:En}}),kn=bn(On),An=bn(m({},On,{dataTransfer:0})),jn=bn(m({},Cn,{relatedTarget:0})),Mn=bn(m({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),Nn=bn(m({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Pn=bn(m({},xn,{data:0})),Fn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},In={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`},Ln={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ln[e])?!!t[e]:!1}function zn(){return Rn}var Bn=bn(m({},Cn,{key:function(e){if(e.key){var t=Fn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?In[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zn,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Vn=bn(m({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Hn=bn(m({},Cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zn})),Un=bn(m({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wn=bn(m({},On,{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})),Gn=bn(m({},xn,{newState:0,oldState:0})),Kn=[9,13,27,32],qn=un&&`CompositionEvent`in window,Jn=null;un&&`documentMode`in document&&(Jn=document.documentMode);var Yn=un&&`TextEvent`in window&&!Jn,Xn=un&&(!qn||Jn&&8<Jn&&11>=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!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 Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={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 ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Rd(t,`onChange`),0<t.length&&(n=new Sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,cr=null;function lr(e){Ad(e,0)}function ur(e){if(It(vt(e)))return e}function dr(e,t){if(e===`change`)return t}var fr=!1;if(un){var pr;if(un){var mr=`oninput`in document;if(!mr){var hr=document.createElement(`div`);hr.setAttribute(`oninput`,`return;`),mr=typeof hr.oninput==`function`}pr=mr}else pr=!1;fr=pr&&(!document.documentMode||9<document.documentMode)}function gr(){sr&&(sr.detachEvent(`onpropertychange`,_r),cr=sr=null)}function _r(e){if(e.propertyName===`value`&&ur(cr)){var t=[];or(t,cr,e,nn(e)),cn(lr,t)}}function vr(e,t,n){e===`focusin`?(gr(),sr=t,cr=n,sr.attachEvent(`onpropertychange`,_r)):e===`focusout`&&gr()}function yr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ur(cr)}function br(e,t){if(e===`click`)return ur(t)}function xr(e,t){if(e===`input`||e===`change`)return ur(t)}function Sr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Cr=typeof Object.is==`function`?Object.is:Sr;function wr(e,t){if(Cr(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(!xe.call(t,i)||!Cr(e[i],t[i]))return!1}return!0}function Tr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Er(e,t){var n=Tr(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=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(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=Lt(e.document)}return t}function kr(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 Ar=un&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Lt(r)||(r=jr,`selectionStart`in r&&kr(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}),Nr&&wr(Nr,r)||(Nr=r,r=Rd(Mr,`onSelect`),0<r.length&&(t=new Sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Ir(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Lr={animationend:Ir(`Animation`,`AnimationEnd`),animationiteration:Ir(`Animation`,`AnimationIteration`),animationstart:Ir(`Animation`,`AnimationStart`),transitionrun:Ir(`Transition`,`TransitionRun`),transitionstart:Ir(`Transition`,`TransitionStart`),transitioncancel:Ir(`Transition`,`TransitionCancel`),transitionend:Ir(`Transition`,`TransitionEnd`)},Rr={},zr={};un&&(zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),`TransitionEvent`in window||delete Lr.transitionend.transition);function Br(e){if(Rr[e])return Rr[e];if(!Lr[e])return e;var t=Lr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zr)return Rr[e]=t[n];return e}var Vr=Br(`animationend`),Hr=Br(`animationiteration`),Ur=Br(`animationstart`),Wr=Br(`transitionrun`),Gr=Br(`transitionstart`),Kr=Br(`transitioncancel`),qr=Br(`transitionend`),Jr=new Map,Yr=`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(` `);Yr.push(`scrollEnd`);function Xr(e,t){Jr.set(e,t),Ct(t,[e])}var Zr=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)},Qr=[],$r=0,ei=0;function ti(){for(var e=$r,t=ei=$r=0;t<e;){var n=Qr[t];Qr[t++]=null;var r=Qr[t];Qr[t++]=null;var i=Qr[t];Qr[t++]=null;var a=Qr[t];if(Qr[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&&ai(n,i,a)}}function ni(e,t,n,r){Qr[$r++]=e,Qr[$r++]=t,Qr[$r++]=n,Qr[$r++]=r,ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ri(e,t,n,r){return ni(e,t,n,r),oi(e)}function ii(e,t){return ni(e,null,null,t),oi(e)}function ai(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-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function oi(e){if(50<xu)throw xu=0,Su=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function ci(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 li(e,t,n,r){return new ci(e,t,n,r)}function ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var n=e.alternate;return n===null?(n=li(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 fi(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 pi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ui(e)&&(s=1);else if(typeof e==`string`)s=np(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=li(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return mi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=li(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=li(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=li(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=li(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function mi(e,t,n,r){return e=li(7,e,r,t),e.lanes=n,e}function hi(e,t,n){return e=li(6,e,null,t),e.lanes=n,e}function gi(e){var t=li(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=li(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var bi=[],xi=0,Si=null,Ci=0,wi=[],Ti=0,Ei=null,Di=1,Oi=``;function ki(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Ai(e,t,n){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Ei=e;var r=Di;e=Oi;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Di=1<<32-Re(t)+i|n<<i|r,Oi=a+e}else Di=1<<a|n<<i|r,Oi=e}function ji(e){e.return!==null&&(ki(e,1),Ai(e,1,0))}function Mi(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Oi=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null}function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Di=t.id,Oi=t.overflow,Ei=e}var Pi=null,Fi=null,Ii=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Ki(yi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:jd(`cancel`,t),jd(`close`,t);break;case`iframe`:case`object`:case`embed`:jd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Od.length;n++)jd(Od[n],t);break;case`source`:jd(`error`,t);break;case`img`:case`image`:case`link`:jd(`error`,t),jd(`load`,t);break;case`details`:jd(`toggle`,t);break;case`input`:jd(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:jd(`invalid`,t);break;case`textarea`:jd(`invalid`,t),Gt(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||Wd(t.textContent,n)?(r.popover!=null&&(jd(`beforetoggle`,t),jd(`toggle`,t)),r.onScroll!=null&&jd(`scroll`,t),r.onScrollEnd!=null&&jd(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(Pi=e.return;Pi;)switch(Pi.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Pi=Pi.return}}function Ui(e){if(e!==Pi)return!1;if(!Ii)return Hi(e),Ii=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||nf(e.type,e.memoizedProps)),n=!n),n&&Fi&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=Cf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=Cf(e)}else t===27?(t=Fi,df(e.type)?(e=Sf,Sf=null,Fi=e):Fi=t):Fi=Pi?xf(e.stateNode.nextSibling):null;return!0}function Wi(){Fi=Pi=null,Ii=!1}function Gi(){var e=Li;return e!==null&&(su===null?su=e:su.push.apply(su,e),Li=null),e}function Ki(e){Li===null?Li=[e]:Li.push(e)}var qi=ie(null),Ji=null,Yi=null;function Xi(e,t,n){ae(qi,t._currentValue),t._currentValue=n}function Zi(e){e._currentValue=qi.current,L(qi)}function Qi(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 $i(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),Qi(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),Qi(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 ea(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;Cr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===le.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[dp]:e.push(dp))}a=a.return}e!==null&&$i(t,e,n,r),t.flags|=262144}function ta(e){for(e=e.firstContext;e!==null;){if(!Cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function na(e){Ji=e,Yi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ra(e){return ia(Ji,e)}function R(e,t){return Ji===null&&na(e),ia(e,t)}function ia(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yi===null){if(e===null)throw Error(i(308));Yi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yi=Yi.next=t;return n}var aa=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()})}},oa=t.unstable_scheduleCallback,sa=t.unstable_NormalPriority,ca={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function la(){return{controller:new aa,data:new Map,refCount:0}}function ua(e){e.refCount--,e.refCount===0&&oa(sa,function(){e.controller.abort()})}var da=null,z=0,fa=0,pa=null;function ma(e,t){if(da===null){var n=da=[];z=0,fa=Sd(),pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return z++,t.then(ha,ha),t}function ha(){if(--z===0&&da!==null){pa!==null&&(pa.status=`fulfilled`);var e=da;da=null,fa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ga(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var _a=F.S;F.S=function(e,t){uu=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&ma(e,t),_a!==null&&_a(e,t)};var va=ie(null);function ya(){var e=va.current;return e===null?Gl.pooledCache:e}function ba(e,t){t===null?ae(va,va.current):ae(va,t.pool)}function xa(){var e=ya();return e===null?null:{parent:ca._currentValue,pool:e}}var Sa=Error(i(460)),Ca=Error(i(474)),wa=Error(i(542)),Ta={then:function(){}};function Ea(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Da(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Gl,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,ja(e),e}throw ka=t,Sa}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ka=e,Sa):e}}var ka=null;function Aa(){if(ka===null)throw Error(i(459));var e=ka;return ka=null,e}function ja(e){if(e===Sa||e===wa)throw Error(i(483))}var Ma=null,Na=0;function Pa(e){var t=Na;return Na+=1,Ma===null&&(Ma=[]),Da(Ma,e,t)}function Fa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ia(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 La(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=di(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=hi(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&&Oa(i)===t.type)?(t=a(t,n.props),Fa(t,n),t.return=e,t):(t=pi(n.type,n.key,n.props,null,e.mode,r),Fa(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=_i(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=mi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=hi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=pi(t.type,t.key,t.props,null,e.mode,n),Fa(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case O:return t=Oa(t),f(e,t,n)}if(P(t)||M(t))return t=mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Pa(t),n);if(t.$$typeof===C)return f(e,R(e,t),n);Ia(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=Oa(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,Pa(n),r);if(n.$$typeof===C)return p(e,t,R(e,n),r);Ia(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=Oa(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,Pa(r),i);if(r.$$typeof===C)return m(e,t,n,R(t,r),i);Ia(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),Ii&&ki(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 Ii&&ki(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)}),Ii&&ki(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),Ii&&ki(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 Ii&&ki(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)}),Ii&&ki(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&&Oa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Fa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),Fa(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=_i(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Oa(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,Pa(o),c);if(o.$$typeof===C)return b(e,r,R(e,o),c);Ia(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=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=b(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function Va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ha(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 Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Wl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function Ga(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,et(e,n)}}function Ka(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 qa=!1;function Ja(){if(qa){var e=pa;if(e!==null)throw e}}function Ya(e,t,n,r){qa=!1;var i=e.updateQueue;Ba=!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?(ql&f)===f:(r&f)===f){f!==0&&f===fa&&(qa=!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:Ba=!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),tu|=o,e.lanes=o,e.memoizedState=d}}function Xa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xa(n[e],t)}var Qa=ie(null),$a=ie(0);function eo(e,t){e=$l,ae($a,e),ae(Qa,t),$l=e|t.baseLanes}function to(){ae($a,$l),ae(Qa,Qa.current)}function no(){$l=$a.current,L(Qa),L($a)}var ro=ie(null),io=null;function ao(e){var t=e.alternate;ae(uo,uo.current&1),ae(ro,e),io===null&&(t===null||Qa.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){ae(uo,uo.current),ae(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(ae(uo,uo.current),ae(ro,e),io===null&&(io=e)):co(e)}function co(){ae(uo,uo.current),ae(ro,ro.current)}function lo(e){L(ro),io===e&&(io=null),L(uo)}var uo=ie(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||vf(n)||yf(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 po=0,mo=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Cr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return po=a,mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Us:Ws,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){F.H=Hs;var t=ho!==null&&ho.next!==null;if(po=0,go=ho=mo=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&ta(e)&&(sc=!0))}function Oo(e,t,n,r){mo=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Gs,o=t(n,r)}while(vo);return o}function ko(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(mo.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}po=0,go=ho=mo=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?mo.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=mo.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?mo.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw mo.alternate===null?Error(i(467)):Error(i(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?mo.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=Da(So,e,t),t=mo,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Us:Ws),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return ra(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=mo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=mo.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=Fo(),mo.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 zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),ho,e)}function Vo(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?(po&f)===f:(ql&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===fa&&(d=!0);else if((po&p)===p){u=u.next,p===fa&&(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,mo.lanes|=p,tu|=p;f=u.action,yo&&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,mo.lanes|=f,tu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Cr(o,e.memoizedState)&&(sc=!0,d&&(n=pa,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 Ho(e){var t=Po(),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);Cr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=mo,a=Po(),o=Ii;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Cr((ho||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,ms(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),Gl===null)throw Error(i(349));o||po&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=mo.updateQueue,t===null?(t=Fo(),mo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cr(e,n)}catch{return!0}}function Jo(e){var t=ii(e,2);t!==null&&Tu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,ho,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(zs(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,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(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),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(Ii){var n=Gl.formState;if(n!==null){a:{var r=mo;if(Ii){if(Fi){b:{for(var i=Fi,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=xf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Fi=xf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Is.bind(null,mo,r),r.dispatch=n,r=Yo(!1),a=Rs.bind(null,mo,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,mo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),ho,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Sa?wa:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(mo.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=ho;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=mo.updateQueue,t===null&&(t=Fo(),mo.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 us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();mo.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function fs(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(mo.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function ps(e,t){ds(8390656,8,e,t)}function ms(e,t){fs(2048,8,e,t)}function hs(e){mo.flags|=4;var t=mo.updateQueue;if(t===null)t=Fo(),mo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gs(e){var t=Po().memoizedState;return hs({ref:t,nextImpl:e}),function(){if(Wl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function _s(e,t){return fs(4,2,e,t)}function vs(e,t){return fs(4,4,e,t)}function ys(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 bs(e,t,n){n=n==null?null:n.concat([e]),fs(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function ws(e,t,n){return n===void 0||po&1073741824&&!(ql&261930)?e.memoizedState=t:(e.memoizedState=n,e=wu(),mo.lanes|=e,tu|=e,n)}function Ts(e,t,n,r){return Cr(n,t)?n:Qa.current===null?!(po&42)||po&1073741824&&!(ql&261930)?(sc=!0,e.memoizedState=n):(e=wu(),mo.lanes|=e,tu|=e,t):(e=ws(e,n,r),Cr(e,t)||(sc=!0),e)}function Es(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,Rs(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,ga(c,r),Cu(e)):Ls(e,t,r,Cu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},Cu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,te,n===null?Ds:function(){return As(e),n(r)})}function ks(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:zo,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},Cu())}function js(){return ra(dp)}function Ms(){return Po().memoizedState}function Ns(){return Po().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Cu();e=Ua(n);var r=Wa(t,e,n);r!==null&&(Tu(r,t,n),Ga(r,t,n)),t={cache:la()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=Cu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=ri(e,t,n,r),n!==null&&(Tu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,Cu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(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,Cr(s,o))return ni(e,t,i,0),Gl===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return Tu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:Sd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=ri(e,n,r,2),t!==null&&Tu(t,e,2)}function zs(e){var t=e.alternate;return e===mo||t!==null&&t===mo}function Bs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Hs={readContext:ra,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Hs.useEffectEvent=wo;var Us={readContext:ra,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:ra,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){Le(!0);try{n(t)}finally{Le(!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=Fs.bind(null,mo,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,mo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,mo,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=mo,a=No();if(Ii){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Gl===null)throw Error(i(349));ql&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ps(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Gl.identifierPrefix;if(Ii){var n=Oi,r=Di;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,mo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ps.bind(null,mo)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(Wl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:ra,use:Lo,useCallback:Ss,useContext:ra,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:xs,useDeferredValue:function(e,t){return Ts(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Ws.useEffectEvent=gs;var Gs={readContext:ra,use:Lo,useCallback:Ss,useContext:ra,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:xs,useDeferredValue:function(e,t){var n=Po();return ho===null?ws(n,e,t):Ts(n,ho.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Gs.useEffectEvent=gs;function Ks(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 qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ua(r);i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(Tu(t,e,r),Ga(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ua(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(Tu(t,e,r),Ga(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Cu(),r=Ua(n);r.tag=2,t!=null&&(r.callback=t),t=Wa(e,r,n),t!==null&&(Tu(t,e,n),Ga(t,e,n))}};function Js(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?!wr(n,r)||!wr(i,a):!0}function Ys(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&&qs.enqueueReplaceState(t,t.state,null)}function Xs(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 Zs(e){Zr(e)}function Qs(e){console.error(e)}function $s(e){Zr(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){return n=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=Ua(e),e.tag=3,e}function ic(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(pu===null?pu=new Set([this]):pu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ea(t,n,a,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Lu():n.alternate===null&&eu===0&&(eu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),nd(e,r,a)),!1;case 22:return n.flags|=65536,r===Ta?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)),nd(e,r,a)),!1}throw Error(i(435,n.tag))}return nd(e,r,a),Lu(),!1}if(Ii)return t=ro.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Ki(yi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=yi(r,n),a=nc(e.stateNode,r,a),Ka(e,a),eu!==4&&(eu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Ki(yi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=yi(o,n),ou===null?ou=[o]:ou.push(o),eu!==4&&(eu=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),Ka(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`&&(pu===null||!pu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),Ka(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?za(t,null,n,r):Ra(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return na(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!sc?(jo(e,t,i),Mc(e,t,i)):(Ii&&s&&ji(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Nc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?wr:n,n(o,r)&&e.ref===t.ref)return Mc(e,t,i)}return t.flags|=1,e=di(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wr(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Nc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Mc(e,t,i)}return yc(e,t,n,r,i)}function fc(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 mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ba(t,a===null?null:a.cachePool),a===null?to():eo(t,a),so(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),to(),co(t)):(ba(t,a.cachePool),eo(t,a),co(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=ya();return a=a===null?null:{parent:ca._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),to(),so(t),e!==null&&ea(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Dc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ra(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,lo(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ii){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(oo(t),(e=Fi)?(e=_f(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||ea(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=Gl,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ii(e,s),Tu(r,e,s),oc;Lu(),t=gc(e,t,n)}else e=o.treeContext,Fi=xf(s.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=hc(t,r),t.flags|=4096;return t}return e=di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(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 yc(e,t,n,r,i){return na(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!sc?(jo(e,t,i),Mc(e,t,i)):(Ii&&r&&ji(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return na(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!sc?(jo(e,t,a),Mc(e,t,a)):(Ii&&r&&ji(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(na(t),t.stateNode===null){var a=si,o=n.contextType;typeof o==`object`&&o&&(a=ra(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Va(t),o=n.contextType,a.context=typeof o==`object`&&o?ra(o):si,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(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&&qs.enqueueReplaceState(a,a.state,null),Ya(t,r,a,i),Ja(),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=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=si,typeof u==`object`&&u&&(o=ra(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)&&Ys(t,a,r,o),Ba=!1;var f=t.memoizedState;a.state=f,Ya(t,r,a,i),Ja(),l=t.memoizedState,s||f!==l||Ba?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Ba||Js(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,Ha(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=si,typeof l==`object`&&l&&(c=ra(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)&&Ys(t,a,r,c),Ba=!1,f=t.memoizedState,a.state=f,Ya(t,r,a,i),Ja();var p=t.memoizedState;o!==d||f!==p||Ba||e!==null&&e.dependencies!==null&&ta(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Ba||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ta(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,vc(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=Ra(t,e.child,null,i),t.child=Ra(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Mc(e,t,i),e}function Sc(e,t,n,r){return Wi(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:xa()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=iu),e}function B(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:(uo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ii){if(a?ao(t):co(t),(e=Fi)?(e=_f(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return yf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(co(t),a=t.mode,c=Dc({mode:`hidden`,children:c},a),r=mi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(ao(t),Ec(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=Oc(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,a=t.mode,r=Dc({mode:`visible`,children:r.children},a),c=mi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ra(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(t),yf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ki({value:r,source:null,stack:null}),t=Oc(e,t,n)}else if(sc||ea(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=Gl,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ii(e,r),Tu(s,e,r),oc;vf(c)||Lu(),t=Oc(e,t,n)}else vf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Fi=xf(c.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=Ec(t,r.children),t.flags|=4096);return t}return a?(co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=di(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=mi(c,a,n,null),c.flags|=2):c=di(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(a=c.cachePool,a===null?a=xa():(l=ca._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(ao(t),n=e.child,e=n.sibling,n=di(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 Ec(e,t){return t=Dc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Dc(e,t){return e=li(22,e,null,t),e.lanes=0,e}function Oc(e,t,n){return Ra(t,e.child,null,n),e=Ec(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qi(e.return,t,n)}function Ac(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 jc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=uo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,ae(uo,o),cc(e,t,r,n),r=Ii?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kc(e,n,t);else if(e.tag===19)kc(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&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ac(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&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ac(t,!0,n,null,a,r);break;case`together`:Ac(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Mc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ea(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=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Nc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ta(e))):!0}function Pc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Xi(t,ca,e.memoizedState.cache),Wi();break;case 27:case 5:fe(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Xi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=Mc(e,t,n),e===null?null:e.sibling):B(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return jc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ae(uo,uo.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:Xi(t,ca,e.memoizedState.cache)}return Mc(e,t,n)}function Fc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Nc(e,n)&&!(t.flags&128))return sc=!1,Pc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,Ii&&t.flags&1048576&&Ai(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e==`function`)ui(e)?(r=Xs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=lc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),xc(e,t,r,a,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ha(e,t),Ya(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Xi(t,ca,r),r!==o.cache&&$i(t,[ca],n,!0),Ja(),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=Sc(e,t,r,n);break a}else if(r!==a){a=yi(Error(i(424)),t),Ki(a),t=Sc(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(Fi=xf(e.firstChild),Pi=t,Ii=!0,Li=null,Ri=!0,n=za(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wi(),r===a){t=Mc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=Hf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ii||(n=t.type,e=t.pendingProps,r=$d(ce.current).createElement(n),r[st]=t,r[ct]=e,qd(r,n,e),bt(r),t.stateNode=r):t.memoizedState=Hf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&Ii&&(r=t.stateNode=Tf(t.type,t.pendingProps,ce.current),Pi=t,Ri=!0,a=Fi,df(t.type)?(Sf=a,Fi=xf(r.firstChild)):Fi=a),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ii&&((a=r=Fi)&&(r=hf(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,Pi=t,Fi=xf(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),fe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,nf(a,o)?r=null:s!==null&&nf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),dp._currentValue=a),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&Ii&&((e=n=Fi)&&(n=gf(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Pi=t,Fi=null,e=!0)),e||Bi(t)),null;case 13:return B(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ra(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Xi(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,na(t),a=ra(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return jc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return na(t),r=ra(ca),e===null?(a=ya(),a===null&&(a=Gl,o=la(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Va(t),Xi(t,ca,a)):((e.lanes&n)!==0&&(Ha(e,t),Ya(t,null,null,n),Ja()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Xi(t,ca,r),r!==a.cache&&$i(t,[ca],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Xi(t,ca,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ic(e){e.flags|=4}function Lc(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(Pu())e.flags|=8192;else throw ka=Ta,Ca}else e.flags&=-16777217}function Rc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!rp(t))if(Pu())e.flags|=8192;else throw ka=Ta,Ca}function zc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,au|=t)}function Bc(e,t){if(!Ii)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 Vc(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 Hc(e,t,n){var r=t.pendingProps;switch(Mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vc(t),null;case 1:return Vc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Zi(ca),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?Ic(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi())),Vc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ic(t),o===null?(Vc(t),Lc(t,a,null,r,n)):(Vc(t),Rc(t,o))):o?o===e.memoizedState?(Vc(t),t.flags&=-16777217):(Ic(t),Vc(t),Rc(t,o)):(e=e.memoizedProps,e!==r&&Ic(t),Vc(t),Lc(t,a,e,r,n)),null;case 27:if(pe(t),n=ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Vc(t),null}e=oe.current,Ui(t)?Vi(t,e):(e=Tf(a,r,n),t.stateNode=e,Ic(t))}return Vc(t),null;case 5:if(pe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Vc(t),null}if(o=oe.current,Ui(t))Vi(t,o);else{var s=$d(ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[st]=t,o[ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(qd(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&&Ic(t)}}return Vc(t),Lc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ce.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Pi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Wd(e.nodeValue,n)),e||Bi(t,!0)}else e=$d(e).createTextNode(r),e[st]=t,t.stateNode=e}return Vc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[st]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vc(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(i(558))}return Vc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[st]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vc(t),a=!1}else a=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(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),zc(t,t.updateQueue),Vc(t),null);case 4:return de(),e===null&&Pd(t.stateNode.containerInfo),Vc(t),null;case 10:return Zi(t.type),Vc(t),null;case 19:if(L(uo),r=t.memoizedState,r===null)return Vc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Bc(r,!1);else{if(eu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Bc(r,!1),e=o.updateQueue,t.updateQueue=e,zc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return ae(uo,uo.current&1|2),Ii&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>du&&(t.flags|=128,a=!0,Bc(r,!1),t.lanes=4194304)}else{if(!a)if(e=fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,zc(t,e),Bc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ii)return Vc(t),null}else 2*Ee()-r.renderingStartTime>du&&n!==536870912&&(t.flags|=128,a=!0,Bc(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?(Vc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=uo.current,ae(uo,a?n&1|2:n&1),Ii&&ki(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Vc(t),t.subtreeFlags&6&&(t.flags|=8192)):Vc(t),n=t.updateQueue,n!==null&&zc(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&&L(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Zi(ca),Vc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Uc(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(ca),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(uo),null;case 4:return de(),null;case 10:return Zi(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&L(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zi(ca),null;case 25:return null;default:return null}}function Wc(e,t){switch(Mi(t),t.tag){case 3:Zi(ca),de();break;case 26:case 27:case 5:pe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:L(uo);break;case 10:Zi(t.type);break;case 22:case 23:lo(t),no(),e!==null&&L(va);break;case 24:Zi(ca)}}function Gc(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){td(t,t.return,e)}}function Kc(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){td(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){td(t,t.return,e)}}function qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Za(t,n)}catch(t){td(e,e.return,t)}}}function Jc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){td(e,t,n)}}function Yc(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){td(e,t,n)}}function Xc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){td(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){td(e,t,n)}else n.current=null}function Zc(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){td(e,e.return,t)}}function Qc(e,t,n){try{var r=e.stateNode;Jd(r,e.type,n,t),r[ct]=t}catch(t){td(e,e.return,t)}}function $c(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&df(e.type)||e.tag===4}function el(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||$c(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&&df(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 tl(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=en));else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(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&&df(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);qd(t,r,n),t[st]=e,t[ct]=n}catch(t){td(e,e.return,t)}}var il=!1,al=!1,ol=!1,sl=typeof WeakSet==`function`?WeakSet:Set,cl=null;function ll(e,t){if(e=e.containerInfo,Zd=bp,e=Or(e),kr(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(Qd={focusedElem:e,selectionRange:n},bp=!1,cl=t;cl!==null;)if(t=cl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,cl=e;else for(;cl!==null;){switch(t=cl,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=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){td(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)mf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:mf(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,cl=e;break}cl=t.return}}function ul(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Tl(e,n),r&4&&Gc(5,n);break;case 1:if(Tl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){td(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){td(n,n.return,e)}}r&64&&qc(n),r&512&&Yc(n,n.return);break;case 3:if(Tl(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{Za(e,t)}catch(e){td(n,n.return,e)}}break;case 27:t===null&&r&4&&rl(n);case 26:case 5:Tl(e,n),t===null&&r&4&&Zc(n),r&512&&Yc(n,n.return);break;case 12:Tl(e,n);break;case 31:Tl(e,n),r&4&&gl(e,n);break;case 13:Tl(e,n),r&4&&_l(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ad.bind(null,n),bf(e,n))));break;case 22:if(r=n.memoizedState!==null||il,!r){t=t!==null&&t.memoizedState!==null||al,i=il;var a=al;il=r,(al=t)&&!a?Dl(e,n,(n.subtreeFlags&8772)!=0):Tl(e,n),il=i,al=a}break;case 30:break;default:Tl(e,n)}}function dl(e){var t=e.alternate;t!==null&&(e.alternate=null,dl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(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 fl=null,pl=!1;function ml(e,t,n){for(n=n.child;n!==null;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:al||Xc(n,t),ml(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:al||Xc(n,t);var r=fl,i=pl;df(n.type)&&(fl=n.stateNode,pl=!1),ml(e,t,n),Ef(n.stateNode),fl=r,pl=i;break;case 5:al||Xc(n,t);case 6:if(r=fl,i=pl,fl=null,ml(e,t,n),fl=r,pl=i,fl!==null)if(pl)try{(fl.nodeType===9?fl.body:fl.nodeName===`HTML`?fl.ownerDocument.body:fl).removeChild(n.stateNode)}catch(e){td(n,t,e)}else try{fl.removeChild(n.stateNode)}catch(e){td(n,t,e)}break;case 18:fl!==null&&(pl?(e=fl,ff(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kp(e)):ff(fl,n.stateNode));break;case 4:r=fl,i=pl,fl=n.stateNode.containerInfo,pl=!0,ml(e,t,n),fl=r,pl=i;break;case 0:case 11:case 14:case 15:Kc(2,n,t),al||Kc(4,n,t),ml(e,t,n);break;case 1:al||(Xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Jc(n,t,r)),ml(e,t,n);break;case 21:ml(e,t,n);break;case 22:al=(r=al)||n.memoizedState!==null,ml(e,t,n),al=r;break;default:ml(e,t,n)}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kp(e)}catch(e){td(t,t.return,e)}}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kp(e)}catch(e){td(t,t.return,e)}}function vl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sl),t;default:throw Error(i(435,e.tag))}}function yl(e,t){var n=vl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=od.bind(null,e,t);t.then(r,r)}})}function bl(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(df(c.type)){fl=c.stateNode,pl=!1;break a}break;case 5:fl=c.stateNode,pl=!1;break a;case 3:case 4:fl=c.stateNode.containerInfo,pl=!0;break a}c=c.return}if(fl===null)throw Error(i(160));hl(o,s,a),fl=null,pl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sl(t,e),t=t.sibling}var xl=null;function Sl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:bl(t,e),Cl(e),r&4&&(Kc(3,e,e.return),Gc(3,e),Kc(5,e,e.return));break;case 1:bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),r&64&&il&&(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=xl;if(bl(t,e),Cl(e),r&512&&(al||n===null||Xc(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[mt]||o[st]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),qd(o,r,n),o[st]=e,bt(o),r=o;break a;case`link`:var s=ep(`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),qd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=ep(`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),qd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[st]=e,bt(o),r=o}e.stateNode=r}else tp(a,e.type,e.stateNode);else e.stateNode=Yf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?tp(a,e.type,e.stateNode):Yf(a,r,e.memoizedProps))}break;case 27:bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),n!==null&&r&4&&Qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){td(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(ol=!0);break;case 6:if(bl(t,e),Cl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){td(e,e.return,t)}}break;case 3:if($f=null,a=xl,xl=kf(t.containerInfo),bl(t,e),xl=a,Cl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kp(t.containerInfo)}catch(t){td(e,e.return,t)}ol&&(ol=!1,wl(e));break;case 4:r=xl,xl=kf(e.stateNode.containerInfo),bl(t,e),Cl(e),xl=r;break;case 12:bl(t,e),Cl(e);break;case 31:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 13:bl(t,e),Cl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(lu=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=il,d=al;if(il=u||a,al=d||l,bl(t,e),al=d,il=u,Cl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||il||al||El(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){td(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){td(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?pf(m,!0):pf(l.stateNode,!1)}catch(e){td(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,yl(e,n))));break;case 19:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 30:break;case 21:break;default:bl(t,e),Cl(e)}}function Cl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if($c(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;nl(e,el(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),nl(e,el(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;tl(e,el(e),s);break;default:throw Error(i(161))}}catch(t){td(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Tl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ul(e,t.alternate,t),t=t.sibling}function El(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Kc(4,t,t.return),El(t);break;case 1:Xc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Jc(t,t.return,n),El(t);break;case 27:Ef(t.stateNode);case 26:case 5:Xc(t,t.return),El(t);break;case 22:t.memoizedState===null&&El(t);break;case 30:El(t);break;default:El(t)}e=e.sibling}}function Dl(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:Dl(i,a,n),Gc(4,a);break;case 1:if(Dl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){td(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++)Xa(c[i],s)}catch(e){td(r,r.return,e)}}n&&o&64&&qc(a),Yc(a,a.return);break;case 27:rl(a);case 26:case 5:Dl(i,a,n),n&&r===null&&o&4&&Zc(a),Yc(a,a.return);break;case 12:Dl(i,a,n);break;case 31:Dl(i,a,n),n&&o&4&&gl(i,a);break;case 13:Dl(i,a,n),n&&o&4&&_l(i,a);break;case 22:a.memoizedState===null&&Dl(i,a,n),Yc(a,a.return);break;case 30:break;default:Dl(i,a,n)}t=t.sibling}}function Ol(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&&ua(n))}function kl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ua(e))}function Al(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jl(e,t,n,r),t=t.sibling}function jl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Al(e,t,n,r),i&2048&&Gc(9,t);break;case 1:Al(e,t,n,r);break;case 3:Al(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&&ua(e)));break;case 12:if(i&2048){Al(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){td(t,t.return,e)}}else Al(e,t,n,r);break;case 31:Al(e,t,n,r);break;case 13:Al(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Al(e,t,n,r):(a._visibility|=2,Ml(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Al(e,t,n,r):Nl(e,t),i&2048&&Ol(o,t);break;case 24:Al(e,t,n,r),i&2048&&kl(t.alternate,t);break;default:Al(e,t,n,r)}}function Ml(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:Ml(a,o,s,c,i),Gc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ml(a,o,s,c,i)):u._visibility&2?Ml(a,o,s,c,i):Nl(a,o),i&&l&2048&&Ol(o.alternate,o);break;case 24:Ml(a,o,s,c,i),i&&l&2048&&kl(o.alternate,o);break;default:Ml(a,o,s,c,i)}t=t.sibling}}function Nl(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:Nl(n,r),i&2048&&Ol(r.alternate,r);break;case 24:Nl(n,r),i&2048&&kl(r.alternate,r);break;default:Nl(n,r)}t=t.sibling}}var Pl=8192;function Fl(e,t,n){if(e.subtreeFlags&Pl)for(e=e.child;e!==null;)Il(e,t,n),e=e.sibling}function Il(e,t,n){switch(e.tag){case 26:Fl(e,t,n),e.flags&Pl&&e.memoizedState!==null&&ip(n,xl,e.memoizedState,e.memoizedProps);break;case 5:Fl(e,t,n);break;case 3:case 4:var r=xl;xl=kf(e.stateNode.containerInfo),Fl(e,t,n),xl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Pl,Pl=16777216,Fl(e,t,n),Pl=r):Fl(e,t,n));break;default:Fl(e,t,n)}}function Ll(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 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];cl=r,Vl(r,e)}Ll(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zl(e),e=e.sibling}function zl(e){switch(e.tag){case 0:case 11:case 15:Rl(e),e.flags&2048&&Kc(9,e,e.return);break;case 3:Rl(e);break;case 12:Rl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bl(e)):Rl(e);break;default:Rl(e)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cl=r,Vl(r,e)}Ll(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kc(8,t,t.return),Bl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Bl(t));break;default:Bl(t)}e=e.sibling}}function Vl(e,t){for(;cl!==null;){var n=cl;switch(n.tag){case 0:case 11:case 15:Kc(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:ua(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cl=r;else a:for(n=e;cl!==null;){r=cl;var i=r.sibling,a=r.return;if(dl(r),r===n){cl=null;break a}if(i!==null){i.return=a,cl=i;break a}cl=a}}}var Hl={getCacheForType:function(e){var t=ra(ca),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ra(ca).controller.signal}},Ul=typeof WeakMap==`function`?WeakMap:Map,Wl=0,Gl=null,Kl=null,ql=0,Jl=0,Yl=null,Xl=!1,Zl=!1,Ql=!1,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=null,su=null,cu=!1,lu=0,uu=0,du=1/0,fu=null,pu=null,mu=0,hu=null,gu=null,_u=0,vu=0,yu=null,bu=null,xu=0,Su=null;function Cu(){return Wl&2&&ql!==0?ql&-ql:F.T===null?it():Sd()}function wu(){if(iu===0)if(!(ql&536870912)||Ii){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),iu=e}else iu=536870912;return e=ro.current,e!==null&&(e.flags|=32),iu}function Tu(e,t,n){(e===Gl&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)&&(Mu(e,0),ku(e,ql,iu,!1)),Ze(e,n),(!(Wl&2)||e!==Gl)&&(e===Gl&&(!(Wl&2)&&(nu|=n),eu===4&&ku(e,ql,iu,!1)),md(e))}function Eu(e,t,n){if(Wl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||qe(e,t),a=r?Bu(e,t):Ru(e,t,!0),o=r;do{if(a===0){Zl&&!r&&ku(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Ou(n)){a=Ru(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=ou;var l=c.current.memoizedState.isDehydrated;if(l&&(Mu(c,s).flags|=256),s=Ru(c,s,!1),s!==2){if(Ql&&!l){c.errorRecoveryDisabledLanes|=o,nu|=o,a=4;break a}o=su,su=a,o!==null&&(su===null?su=o:su.push.apply(su,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Mu(e,0),ku(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:ku(r,t,iu,!Xl);break a;case 2:su=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=lu+300-Ee(),10<a)){if(ku(r,t,iu,!Xl),Ke(r,0,!0)!==0)break a;_u=t,r.timeoutHandle=of(Du.bind(null,r,n,su,fu,cu,t,iu,nu,au,Xl,o,`Throttled`,-0,0),a);break a}Du(r,n,su,fu,cu,t,iu,nu,au,Xl,o,null,-0,0)}}break}while(1);md(e)}function Du(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:en},Il(t,a,d);var m=(a&62914560)===a?lu-Ee():(a&4194048)===a?uu-Ee():0;if(m=op(d,m),m!==null){_u=a,e.cancelPendingCommit=m(qu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),ku(e,a,o,!l);return}}qu(e,t,a,n,r,i,o,s,c)}function Ou(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(!Cr(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 ku(e,t,n,r){t&=~ru,t&=~nu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function Au(){return Wl&6?!0:(hd(0,!1),!1)}function ju(){if(Kl!==null){if(Jl===0)var e=Kl.return;else e=Kl,Yi=Ji=null,Mo(e),Ma=null,Na=0,e=Kl;for(;e!==null;)Wc(e.alternate,e),e=e.return;Kl=null}}function Mu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,sf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),_u=0,ju(),Gl=e,Kl=n=di(e.current,null),ql=t,Jl=0,Yl=null,Xl=!1,Zl=qe(e,t),Ql=!1,au=iu=ru=nu=tu=eu=0,su=ou=null,cu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return $l=t,ti(),n}function Nu(e,t){mo=null,F.H=Hs,t===Sa||t===wa?(t=Aa(),Jl=3):t===Ca?(t=Aa(),Jl=4):Jl=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Yl=t,Kl===null&&(eu=1,ec(e,yi(t,e.current)))}function Pu(){var e=ro.current;return e===null?!0:(ql&4194048)===ql?io===null:(ql&62914560)===ql||ql&536870912?e===io:!1}function Fu(){var e=F.H;return F.H=Hs,e===null?Hs:e}function Iu(){var e=F.A;return F.A=Hl,e}function Lu(){eu=4,Xl||(ql&4194048)!==ql&&ro.current!==null||(Zl=!0),!(tu&134217727)&&!(nu&134217727)||Gl===null||ku(Gl,ql,iu,!1)}function Ru(e,t,n){var r=Wl;Wl|=2;var i=Fu(),a=Iu();(Gl!==e||ql!==t)&&(fu=null,Mu(e,t)),t=!1;var o=eu;a:do try{if(Jl!==0&&Kl!==null){var s=Kl,c=Yl;switch(Jl){case 8:ju(),o=6;break a;case 3:case 2:case 9:case 6:ro.current===null&&(t=!0);var l=Jl;if(Jl=0,Yl=null,Wu(e,s,c,l),n&&Zl){o=0;break a}break;default:l=Jl,Jl=0,Yl=null,Wu(e,s,c,l)}}zu(),o=eu;break}catch(t){Nu(e,t)}while(1);return t&&e.shellSuspendCounter++,Yi=Ji=null,Wl=r,F.H=i,F.A=a,Kl===null&&(Gl=null,ql=0,ti()),o}function zu(){for(;Kl!==null;)Hu(Kl)}function Bu(e,t){var n=Wl;Wl|=2;var r=Fu(),a=Iu();Gl!==e||ql!==t?(fu=null,du=Ee()+500,Mu(e,t)):Zl=qe(e,t);a:do try{if(Jl!==0&&Kl!==null){t=Kl;var o=Yl;b:switch(Jl){case 1:Jl=0,Yl=null,Wu(e,t,o,1);break;case 2:case 9:if(Ea(o)){Jl=0,Yl=null,Uu(t);break}t=function(){Jl!==2&&Jl!==9||Gl!==e||(Jl=7),md(e)},o.then(t,t);break a;case 3:Jl=7;break a;case 4:Jl=5;break a;case 7:Ea(o)?(Jl=0,Yl=null,Uu(t)):(Jl=0,Yl=null,Wu(e,t,o,7));break;case 5:var s=null;switch(Kl.tag){case 26:s=Kl.memoizedState;case 5:case 27:var c=Kl;if(s?rp(s):c.stateNode.complete){Jl=0,Yl=null;var l=c.sibling;if(l!==null)Kl=l;else{var u=c.return;u===null?Kl=null:(Kl=u,Gu(u))}break b}}Jl=0,Yl=null,Wu(e,t,o,5);break;case 6:Jl=0,Yl=null,Wu(e,t,o,6);break;case 8:ju(),eu=6;break a;default:throw Error(i(462))}}Vu();break}catch(t){Nu(e,t)}while(1);return Yi=Ji=null,F.H=r,F.A=a,Wl=n,Kl===null?(Gl=null,ql=0,ti(),eu):0}function Vu(){for(;Kl!==null&&!we();)Hu(Kl)}function Hu(e){var t=Fc(e.alternate,e,$l);e.memoizedProps=e.pendingProps,t===null?Gu(e):Kl=t}function Uu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,ql);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,ql);break;case 5:Mo(t);default:Wc(n,t),t=Kl=fi(t,$l),t=Fc(n,t,$l)}e.memoizedProps=e.pendingProps,t===null?Gu(e):Kl=t}function Wu(e,t,n,r){Yi=Ji=null,Mo(t),Ma=null,Na=0;var i=t.return;try{if(ac(e,i,t,n,ql)){eu=1,ec(e,yi(n,e.current)),Kl=null;return}}catch(t){if(i!==null)throw Kl=i,t;eu=1,ec(e,yi(n,e.current)),Kl=null;return}t.flags&32768?(Ii||r===1?e=!0:Zl||ql&536870912?e=!1:(Xl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ku(t,e)):Gu(t)}function Gu(e){var t=e;do{if(t.flags&32768){Ku(t,Xl);return}e=t.return;var n=Hc(t.alternate,t,$l);if(n!==null){Kl=n;return}if(t=t.sibling,t!==null){Kl=t;return}Kl=t=e}while(t!==null);eu===0&&(eu=5)}function Ku(e,t){do{var n=Uc(e.alternate,e);if(n!==null){n.flags&=32767,Kl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Kl=e;return}Kl=e=n}while(e!==null);eu=6,Kl=null}function qu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Qu();while(mu!==0);if(Wl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ei,Qe(e,n,o,s,c,l),e===Gl&&(Kl=Gl=null,ql=0),gu=t,hu=e,_u=n,vu=o,yu=a,bu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,sd(Ae,function(){return $u(),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=Wl,Wl|=4;try{ll(e,t,n)}finally{Wl=s,I.p=a,F.T=r}}mu=1,Ju(),Yu(),Xu()}}function Ju(){if(mu===1){mu=0;var e=hu,t=gu,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=Wl;Wl|=4;try{Sl(t,e);var a=Qd,o=Or(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Dr(s.ownerDocument.documentElement,s)){if(c!==null&&kr(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 _=Er(s,h),v=Er(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}}bp=!!Zd,Qd=Zd=null}finally{Wl=i,I.p=r,F.T=n}}e.current=t,mu=2}}function Yu(){if(mu===2){mu=0;var e=hu,t=gu,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=Wl;Wl|=4;try{ul(e,t.alternate,t)}finally{Wl=i,I.p=r,F.T=n}}mu=3}}function Xu(){if(mu===4||mu===3){mu=0,Te();var e=hu,t=gu,n=_u,r=bu;t.subtreeFlags&10256||t.flags&10256?mu=5:(mu=0,gu=hu=null,Zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(pu=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,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}}_u&3&&Qu(),md(e),i=e.pendingLanes,n&261930&&i&42?e===Su?xu++:(xu=0,Su=e):xu=0,hd(0,!1)}}function Zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ua(t)))}function Qu(){return Ju(),Yu(),Xu(),$u()}function $u(){if(mu!==5)return!1;var e=hu,t=vu;vu=0;var n=rt(_u),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=yu,yu=null;var o=hu,s=_u;if(mu=0,gu=hu=null,_u=0,Wl&6)throw Error(i(331));var c=Wl;if(Wl|=4,zl(o.current),jl(o,o.current,s,n),Wl=c,hd(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,o)}catch{}return!0}finally{I.p=a,F.T=r,Zu(e,t)}}function ed(e,t,n){t=yi(n,t),t=nc(e.stateNode,t,2),e=Wa(e,t,2),e!==null&&(Ze(e,2),md(e))}function td(e,t,n){if(e.tag===3)ed(e,e,n);else for(;t!==null;){if(t.tag===3){ed(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(pu===null||!pu.has(r))){e=yi(n,e),n=rc(2),r=Wa(t,n,2),r!==null&&(ic(n,r,t,e),Ze(r,2),md(r));break}}t=t.return}}function nd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ul;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)||(Ql=!0,i.add(n),e=rd.bind(null,e,t,n),t.then(e,e))}function rd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Gl===e&&(ql&n)===n&&(eu===4||eu===3&&(ql&62914560)===ql&&300>Ee()-lu?!(Wl&2)&&Mu(e,0):ru|=n,au===ql&&(au=0)),md(e)}function id(e,t){t===0&&(t=Ye()),e=ii(e,t),e!==null&&(Ze(e,t),md(e))}function ad(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function od(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),id(e,n)}function sd(e,t){return Se(e,t)}var cd=null,ld=null,ud=!1,dd=!1,fd=!1,pd=0;function md(e){e!==ld&&e.next===null&&(ld===null?cd=ld=e:ld=ld.next=e),dd=!0,ud||(ud=!0,xd())}function hd(e,t){if(!fd&&dd){fd=!0;do for(var n=!1,r=cd;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-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,bd(r,a))}else a=ql,a=Ke(r,r===Gl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,bd(r,a));r=r.next}while(n);fd=!1}}function gd(){_d()}function _d(){dd=ud=!1;var e=0;pd!==0&&af()&&(e=pd);for(var t=Ee(),n=null,r=cd;r!==null;){var i=r.next,a=vd(r,t);a===0?(r.next=null,n===null?cd=i:n.next=i,i===null&&(ld=n)):(n=r,(e!==0||a&3)&&(dd=!0)),r=i}mu!==0&&mu!==5||hd(e,!1),pd!==0&&(pd=0)}function vd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Gl,n=ql,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),rt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=yd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function yd(e,t){if(mu!==0&&mu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Qu()&&e.callbackNode!==n)return null;var r=ql;return r=Ke(e,e===Gl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Eu(e,r,t),vd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?yd.bind(null,e):null)}function bd(e,t){if(Qu())return null;Eu(e,t,!0)}function xd(){lf(function(){Wl&6?Se(Oe,gd):_d()})}function Sd(){if(pd===0){var e=fa;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),pd=e}return pd}function Cd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function wd(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 Td(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Cd((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?Cd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(pd!==0){var e=o?wd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?wd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Ed=0;Ed<Yr.length;Ed++){var Dd=Yr[Ed];Xr(Dd.toLowerCase(),`on`+(Dd[0].toUpperCase()+Dd.slice(1)))}Xr(Vr,`onAnimationEnd`),Xr(Hr,`onAnimationIteration`),Xr(Ur,`onAnimationStart`),Xr(`dblclick`,`onDoubleClick`),Xr(`focusin`,`onFocus`),Xr(`focusout`,`onBlur`),Xr(Wr,`onTransitionRun`),Xr(Gr,`onTransitionStart`),Xr(Kr,`onTransitionCancel`),Xr(qr,`onTransitionEnd`),wt(`onMouseEnter`,[`mouseout`,`mouseover`]),wt(`onMouseLeave`,[`mouseout`,`mouseover`]),wt(`onPointerEnter`,[`pointerout`,`pointerover`]),wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ct(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Od=`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(` `),kd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Od));function Ad(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){Zr(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){Zr(e)}i.currentTarget=null,a=c}}}}function jd(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Fd(t,e,2,!1),n.add(r))}function Md(e,t,n){var r=0;t&&(r|=4),Fd(n,e,r,t)}var Nd=`_reactListening`+Math.random().toString(36).slice(2);function Pd(e){if(!e[Nd]){e[Nd]=!0,xt.forEach(function(t){t!==`selectionchange`&&(kd.has(t)||Md(t,!1,e),Md(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nd]||(t[Nd]=!0,Md(`selectionchange`,!1,t))}}function Fd(e,t,n,r){switch(Dp(t)){case 2:var i=xp;break;case 8:i=Sp;break;default:i=Cp}n=i.bind(null,t,n,e),i=void 0,!dn||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 Id(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=gt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),s=[];a:{var c=Jr.get(e);if(c!==void 0){var l=Sn,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:l=Bn;break;case`focusin`:u=`focus`,l=jn;break;case`focusout`:u=`blur`,l=jn;break;case`beforeblur`:case`afterblur`:l=jn;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=kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=An;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Hn;break;case Vr:case Hr:case Ur:l=Mn;break;case qr:l=Un;break;case`scroll`:case`scrollend`:l=wn;break;case`wheel`:l=Wn;break;case`copy`:case`cut`:case`paste`:l=Nn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Vn;break;case`toggle`:case`beforetoggle`:l=Gn}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=ln(m,p),g!=null&&d.push(Ld(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!==tn&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))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?gt(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=kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Vn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:vt(l),h=u==null?c:vt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,gt(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=zd,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&&Bd(s,c,l,d,!1),u!==null&&f!==null&&Bd(s,f,u,d,!0)}}a:{if(c=r?vt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=dr;else if(ar(c))if(fr)v=xr;else{v=yr;var y=vr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=dr):v=br;if(v&&=v(e,r)){or(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?vt(r):window,e){case`focusin`:(ar(y)||y.contentEditable===`true`)&&(jr=y,Mr=r,Nr=null);break;case`focusout`:Nr=Mr=jr=null;break;case`mousedown`:Pr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Pr=!1,Fr(s,n,i);break;case`selectionchange`:if(Ar)break;case`keydown`:case`keyup`:Fr(s,n,i)}var b;if(qn)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 tr?$n(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Xn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,tr=!0)),y=Rd(r,x),0<y.length&&(x=new Pn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=er(n),b!==null&&(x.data=b)))),(b=Yn?nr(e,n):rr(e,n))&&(x=Rd(r,`onBeforeInput`),0<x.length&&(y=new Pn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Td(s,e,r,n,i)}Ad(s,t)})}function Ld(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Rd(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=ln(e,n),i!=null&&r.unshift(Ld(e,i,a)),i=ln(e,t),i!=null&&r.push(Ld(e,i,a))),e.tag===3)return r;e=e.return}return[]}function zd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Bd(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=ln(n,a),l!=null&&o.unshift(Ld(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(Ld(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Vd=/\r\n?/g,Hd=/\u0000|\uFFFD/g;function Ud(e){return(typeof e==`string`?e:``+e).replace(Vd,`
|
|
9
|
+
`).replace(Hd,``)}function Wd(e,t){return t=Ud(t),Ud(e)===t}function Gd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(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=$t(``+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`&&Gd(e,t,`name`,a.name,a,null),Gd(e,t,`formEncType`,a.formEncType,a,null),Gd(e,t,`formMethod`,a.formMethod,a,null),Gd(e,t,`formTarget`,a.formTarget,a,null)):(Gd(e,t,`encType`,a.encType,a,null),Gd(e,t,`method`,a.method,a,null),Gd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`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=$t(``+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`:jd(`beforetoggle`,e),jd(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(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=Zt.get(n)||n,kt(e,n,r))}}function Kd(e,t,n,r,a,o){switch(n){case`style`:Yt(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`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!St.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[ct]||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,``):kt(e,n,r)}}}function qd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:jd(`error`,e),jd(`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:Gd(e,t,o,s,n,null)}}a&&Gd(e,t,`srcSet`,n.srcSet,n,null),r&&Gd(e,t,`src`,n.src,n,null);return;case`input`:jd(`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:Gd(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in jd(`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:Gd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in jd(`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:Gd(e,t,s,c,n,null)}Gt(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:Gd(e,t,l,r,n,null)}return;case`dialog`:jd(`beforetoggle`,e),jd(`toggle`,e),jd(`cancel`,e),jd(`close`,e);break;case`iframe`:case`object`:jd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Od.length;r++)jd(Od[r],e);break;case`image`:jd(`error`,e),jd(`load`,e);break;case`details`:jd(`toggle`,e);break;case`embed`:case`source`:case`link`:jd(`error`,e),jd(`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:Gd(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Kd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Gd(e,t,c,r,n,null))}function Jd(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)||Gd(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&&Gd(e,t,p,m,r,f)}}Bt(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)||Gd(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&&Gd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(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:Gd(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&&Gd(e,t,s,a,r,o)}Wt(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:Gd(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:Gd(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)&&Gd(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:Gd(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Kd(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||Kd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Gd(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||Gd(e,t,f,p,r,m)}function Yd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Xd(){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&&Yd(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&&Yd(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 Zd=null,Qd=null;function $d(e){return e.nodeType===9?e:e.ownerDocument}function ef(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 tf(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 nf(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 rf=null;function af(){var e=window.event;return e&&e.type===`popstate`?e===rf?!1:(rf=e,!0):(rf=null,!1)}var of=typeof setTimeout==`function`?setTimeout:void 0,sf=typeof clearTimeout==`function`?clearTimeout:void 0,cf=typeof Promise==`function`?Promise:void 0,lf=typeof queueMicrotask==`function`?queueMicrotask:cf===void 0?of:function(e){return cf.resolve(null).then(e).catch(uf)};function uf(e){setTimeout(function(){throw e})}function df(e){return e===`head`}function ff(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),Kp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Ef(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Ef(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Ef(e.ownerDocument.body);n=i}while(n);Kp(t)}function pf(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 mf(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`:mf(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function hf(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[mt])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=xf(e.nextSibling),e===null)break}return null}function gf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=xf(e.nextSibling),e===null))return null;return e}function _f(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=xf(e.nextSibling),e===null))return null;return e}function vf(e){return e.data===`$?`||e.data===`$~`}function yf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function bf(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 xf(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 Sf=null;function Cf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return xf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function wf(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 Tf(e,t,n){switch(t=$d(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 Ef(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var Df=new Map,Of=new Set;function kf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Af=I.d;I.d={f:jf,r:Mf,D:Ff,C:If,L:Lf,m:Rf,X:Bf,S:zf,M:Vf};function jf(){var e=Af.f(),t=Au();return e||t}function Mf(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?As(t):Af.r(e)}var Nf=typeof document>`u`?null:document;function Pf(e,t,n){var r=Nf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Of.has(i)||(Of.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),qd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Ff(e){Af.D(e),Pf(`dns-prefetch`,e,null)}function If(e,t){Af.C(e,t),Pf(`preconnect`,e,t)}function Lf(e,t,n){Af.L(e,t,n);var r=Nf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Uf(e);break;case`script`:a=qf(e)}Df.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Df.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Wf(a))||t===`script`&&r.querySelector(Jf(a))||(t=r.createElement(`link`),qd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Rf(e,t){Af.m(e,t);var n=Nf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=qf(e)}if(!Df.has(a)&&(e=m({rel:`modulepreload`,href:e},t),Df.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Jf(a)))return}r=n.createElement(`link`),qd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function zf(e,t,n){Af.S(e,t,n);var r=Nf;if(r&&e){var i=yt(r).hoistableStyles,a=Uf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Wf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Df.get(a))&&Zf(e,n);var c=o=r.createElement(`link`);bt(c),qd(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,Xf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Bf(e,t){Af.X(e,t);var n=Nf;if(n&&e){var r=yt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=m({src:e,async:!0},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),bt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t){Af.M(e,t);var n=Nf;if(n&&e){var r=yt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),bt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t,n,r){var a=(a=ce.current)?kf(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=Uf(n.href),n=yt(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=Uf(n.href);var o=yt(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(Wf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Df.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},Df.set(e,n),o||Kf(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=qf(n),n=yt(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 Uf(e){return`href="`+zt(e)+`"`}function Wf(e){return`link[rel="stylesheet"][`+e+`]`}function Gf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Kf(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}),qd(t,`link`,n),bt(t),e.head.appendChild(t))}function qf(e){return`[src="`+zt(e)+`"]`}function Jf(e){return`script[async]`+e}function Yf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(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`),bt(r),qd(r,`style`,a),Xf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Uf(n.href);var o=e.querySelector(Wf(a));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;r=Gf(n),(a=Df.get(a))&&Zf(r,a),o=(e.ownerDocument||e).createElement(`link`),bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),qd(o,`link`,r),t.state.loading|=4,Xf(o,n.precedence,e),t.instance=o;case`script`:return o=qf(n.src),(a=e.querySelector(Jf(o)))?(t.instance=a,bt(a),a):(r=n,(a=Df.get(o))&&(r=m({},n),Qf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),bt(a),qd(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,Xf(r,n.precedence,e));return t.instance}function Xf(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 Zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var $f=null;function ep(e,t,n){if($f===null){var r=new Map,i=$f=new Map;i.set(n,r)}else i=$f,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[mt]||a[st]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function tp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function np(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 rp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ip(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=Uf(r.href),a=t.querySelector(Wf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=sp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Gf(r),(i=Df.get(i))&&Zf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),qd(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=sp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ap=0;function op(e,t){return e.stylesheets&&e.count===0&&lp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ap===0&&(ap=62500*Xd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ap?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function sp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cp=null;function lp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cp=new Map,t.forEach(up,e),cp=null,sp.call(e))}function up(e,t){if(!(t.state.loading&4)){var n=cp.get(e);if(n)var r=n.get(null);else{n=new Map,cp.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=sp.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 dp={$$typeof:C,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function fp(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=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(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 pp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new fp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=li(3,null,null,t),e.current=a,a.stateNode=e,t=la(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Va(a),e}function mp(e){return e?(e=si,e):si}function hp(e,t,n,r,i,a){i=mp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ua(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Wa(e,r,t),n!==null&&(Tu(n,e,t),Ga(n,e,t))}function gp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _p(e,t){gp(e,t),(e=e.alternate)&&gp(e,t)}function vp(e){if(e.tag===13||e.tag===31){var t=ii(e,67108864);t!==null&&Tu(t,e,67108864),_p(e,67108864)}}function yp(e){if(e.tag===13||e.tag===31){var t=Cu();t=nt(t);var n=ii(e,t);n!==null&&Tu(n,e,t),_p(e,t)}}var bp=!0;function xp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,Cp(e,t,n,r)}finally{I.p=a,F.T=i}}function Sp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,Cp(e,t,n,r)}finally{I.p=a,F.T=i}}function Cp(e,t,n,r){if(bp){var i=wp(r);if(i===null)Id(e,t,r,Tp,n),Ip(e,r);else if(Rp(i,e,t,n,r))r.stopPropagation();else if(Ip(e,r),t&4&&-1<Fp.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}md(a),!(Wl&6)&&(du=Ee()+500,hd(0,!1))}}break;case 31:case 13:s=ii(a,2),s!==null&&Tu(s,a,2),Au(),_p(a,2)}if(a=wp(r),a===null&&Id(e,t,r,Tp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Id(e,t,r,null,n)}}function wp(e){return e=nn(e),Ep(e)}var Tp=null;function Ep(e){if(Tp=null,e=gt(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 Tp=e,null}function Dp(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(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me:return 268435456;default:return 32}default:return 32}}var Op=!1,kp=null,Ap=null,jp=null,Mp=new Map,Np=new Map,Pp=[],Fp=`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 Ip(e,t){switch(e){case`focusin`:case`focusout`:kp=null;break;case`dragenter`:case`dragleave`:Ap=null;break;case`mouseover`:case`mouseout`:jp=null;break;case`pointerover`:case`pointerout`:Mp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Np.delete(t.pointerId)}}function Lp(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=_t(t),t!==null&&vp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rp(e,t,n,r,i){switch(t){case`focusin`:return kp=Lp(kp,e,t,n,r,i),!0;case`dragenter`:return Ap=Lp(Ap,e,t,n,r,i),!0;case`mouseover`:return jp=Lp(jp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Mp.set(a,Lp(Mp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Np.set(a,Lp(Np.get(a)||null,e,t,n,r,i)),!0}return!1}function zp(e){var t=gt(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,at(e.priority,function(){yp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,at(e.priority,function(){yp(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 Bp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=_t(n),t!==null&&vp(t),e.blockedOn=n,!1;t.shift()}return!0}function Vp(e,t,n){Bp(e)&&n.delete(t)}function Hp(){Op=!1,kp!==null&&Bp(kp)&&(kp=null),Ap!==null&&Bp(Ap)&&(Ap=null),jp!==null&&Bp(jp)&&(jp=null),Mp.forEach(Vp),Np.forEach(Vp)}function Up(e,n){e.blockedOn===n&&(e.blockedOn=null,Op||(Op=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hp)))}var Wp=null;function Gp(e){Wp!==e&&(Wp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wp===e&&(Wp=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(Ep(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kp(e){function t(t){return Up(t,e)}kp!==null&&Up(kp,e),Ap!==null&&Up(Ap,e),jp!==null&&Up(jp,e),Mp.forEach(t),Np.forEach(t);for(var n=0;n<Pp.length;n++){var r=Pp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Pp.length&&(n=Pp[0],n.blockedOn===null);)zp(n),n.blockedOn===null&&Pp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ct]||null;if(typeof a==`function`)o||Gp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(Ep(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gp(n)}}}function qp(){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 Jp(e){this._internalRoot=e}Yp.prototype.render=Jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;hp(n,Cu(),e,t,null,null)},Yp.prototype.unmount=Jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hp(e.current,2,null,e,null,null),Au(),t[lt]=null}};function Yp(e){this._internalRoot=e}Yp.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pp.length&&t!==0&&t<Pp[n].priority;n++);Pp.splice(n,0,e),n===0&&zp(e)}};var Xp=n.version;if(Xp!==`19.2.7`)throw Error(i(527,Xp,`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 Zp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qp.isDisabled&&Qp.supportsFiber)try{Fe=Qp.inject(Zp),Ie=Qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Zs,s=Qs,c=$s;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=pp(e,1,!1,null,null,n,r,null,o,s,c,qp),e[lt]=t.current,Pd(e),new Jp(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=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,y=/^[\\/]{2}/;function b(e,t){return t+e.replace(/\\/g,`/`)}var x=`popstate`;function S(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function C(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return O(``,{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:k(t)}return j(t,n,null,e)}function w(e,t){if(e===!1||e==null)throw Error(t)}function T(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function E(){return Math.random().toString(36).substring(2,10)}function D(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 O(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?A(t):t,state:n,key:t&&t.key||r||E(),mask:i}}function k({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 A(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 j(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=S(e)?e:O(h.location,e,t);n&&n(r,e),l=u()+1;let d=D(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=S(e)?e:O(h.location,e,t);n&&n(r,e),l=u();let i=D(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 M(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(x,d),c=e,()=>{i.removeEventListener(x,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 M(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),w(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:k(t);return i=i.replace(/ $/,`%20`),!n&&y.test(i)&&(i=r+i),new URL(i,r)}var N=l(d(),1),ee=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},P=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function F(e){return P.has(e)}var I=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function te(e){return I.has(e)}function ne(e){return e.index===!0}function re(e){let t={};return e.Component&&Object.assign(t,{element:N.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:N.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:N.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function ie(e,t=re,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(w(e.index!==!0||!e.children,`Cannot specify children on an index route`),w(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ne(e)){let n={...e,id:s};return r[s]=L(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=L(n,t(n)),e.children&&(n.children=ie(e.children,t,o,r,i)),n}})}function L(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ae(e,t,n=`/`){return oe(e,t,n,!1)}function oe(e,t,n,r,i){let a=Oe((typeof t==`string`?A(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ce(e),s=null,c=De(a);for(let e=0;s==null&&e<o.length;++e)s=Ce(o[e],c,r);return s}function se(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function ce(e){let t=le(e);return de(t),t}function le(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;w(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=Re([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(w(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),le(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:xe(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Ee(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 ue(e.path))a(e,t,!0,n)}),t}function ue(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=ue(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 de(e){e.sort((e,t)=>e.score===t.score?Se(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var fe=/^:[\w-]+$/,pe=/^:[\w-]+/,me=3.5,he=3,ge=2,_e=1,ve=10,ye=-2,be=e=>e===`*`;function xe(e,t){let n=e.split(`/`),r=n.length;return n.some(be)&&(r+=ye),t&&(r+=ge),n.filter(e=>!be(e)).reduce((e,t)=>e+(fe.test(t)?he:pe.test(t)?me:t===``?_e:ve),r)}function Se(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 Ce(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?Te(u,l,s.matcher,s.compiledParams):we(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=we({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Re([a,d.pathname]),pathnameBase:Be(Re([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Re([a,d.pathnameBase]))}return o}function we(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ee(e.path,e.caseSensitive,e.end);return Te(e,t,n,r)}function Te(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 Ee(e,t=!1,n=!0){T(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)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function De(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return T(!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 Oe(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 ke({basename:e,pathname:t}){return t===`/`?e:Re([e,t])}var Ae=e=>v.test(e);function je(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?A(e):e,a;return n?(n=Le(n),a=n.startsWith(`/`)?Me(n.substring(1),`/`):Me(n,t)):a=t,{pathname:a,search:Ve(r),hash:He(i)}}function Me(e,t){let n=ze(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ne(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 Pe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Fe(e){let t=Pe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ie(e,t,n,r=!1){let i;typeof e==`string`?i=A(e):(i={...e},w(!i.pathname||!i.pathname.includes(`?`),Ne(`?`,`pathname`,`search`,i)),w(!i.pathname||!i.pathname.includes(`#`),Ne(`#`,`pathname`,`hash`,i)),w(!i.search||!i.search.includes(`#`),Ne(`#`,`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=je(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Le=e=>e.replace(/[\\/]{2,}/g,`/`),Re=e=>Le(e.join(`/`)),ze=e=>e.replace(/\/+$/,``),Be=e=>ze(e).replace(/^\/*/,`/`),Ve=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,He=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ue=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],We=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ge(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ke(e){return Re(e.map(e=>e.route.path).filter(Boolean))||`/`}function qe(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?A(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var Je=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ye(e,t){let n=e;if(typeof n!=`string`||!v.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Je)try{let e=new URL(window.location.href),r=y.test(n)?new URL(b(n,e.protocol)):new URL(n),a=Oe(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{T(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Xe=Symbol(`Uninstrumented`),Ze=new WeakMap;function Qe(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>it(await at(n.lazy,void 0,()=>e(...t),ot))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>it(await at(n[`lazy.middleware`],void 0,()=>t(...e),ot))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>it(await at(n[`lazy.loader`],void 0,()=>t(...e),ot))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>it(await at(n[`lazy.action`],void 0,()=>t(...e),ot))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=et(t.loader),i=async(...t)=>it(await at(n.loader,st(t[0]),()=>e(...t),ot));e.hydrate===!0&&(i.hydrate=!0),tt(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=et(t.action),i=async(...t)=>it(await at(n.action,st(t[0]),()=>e(...t),ot));tt(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=et(e),r=async(...e)=>it(await at(n.middleware,st(e[0]),()=>t(...e),ot));return tt(r,t),r})),r}function $e(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=et(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?k(i):`.`,...ct(e,a??{})};return it(await at(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=nt(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...ot(e),meta:o})))};tt(r,t),e.navigate=r}if(n.fetch.length>0){let t=et(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return it(await at(n.fetch,{href:o??`.`,fetcherKey:i,...ct(e,s??{})},async()=>{let n=nt(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...ot(e),meta:c})))};tt(r,t),e.fetch=r}return e}function et(e){return e[Xe]??e}function tt(e,t){e[Xe]=t}function nt(e,t){return Ze.set(e,t),()=>{Ze.get(e)===t&&Ze.delete(e)}}function rt(e){let t=Ze.get(e);return Ze.delete(e),t}function it(e){if(e.type===`error`)throw e.value;return e.value}async function at(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=at(e,t,n,r,i,a-1),await s,w(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function ot(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function st(e){let{request:t,context:n,params:r}=e;return{...e,request:lt(t),params:{...r},context:ut(n)}}function ct(e,t){return{currentUrl:k(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function lt(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function ut(e){return{get:t=>e.get(t)}}var dt=[`POST`,`PUT`,`PATCH`,`DELETE`],ft=new Set(dt),pt=[`GET`,...dt],mt=new Set(pt),ht=new Set([301,302,303,307,308]),gt=new Set([307,308]),_t={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},bt=`remix-router-transitions`,xt=Symbol(`ResetLoaderData`),St=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=ce(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=ce(e)}setHmrRoutes(e){this.#n=e,this.#r=ce(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function Ct(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;w(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...Qe(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new St(ie(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Bt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=oe(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=dn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=un(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&st(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=st(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Ot(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=kt(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,E={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:_t,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},D=`POP`,k=null,j=!1,N,P=!1,F=new Map,I=null,te=!1,ne=!1,re=new Set,L=new Map,ae=0,ce=-1,le=new Map,ue=new Set,de=new Map,fe=new Map,pe=new Set,me=new Map,he,ge=null;function _e(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(he){he(),he=void 0;return}T(me.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=et({currentLocation:E.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{he=e});e.history.go(r*-1),Ze(i,{state:`blocked`,location:n,proceed(){Ze(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(E.blockers);e.set(i,yt),be({blockers:e})}}),k?.resolve(),k=null;return}return we(t,n)}),n){In(t,F);let e=()=>Ln(t,F);t.addEventListener(`pagehide`,e),I=()=>t.removeEventListener(`pagehide`,e)}return E.initialized||we(`POP`,E.location,{initialHydration:!0}),C}function ve(){d&&d(),I&&I(),f.clear(),N&&N.abort(),E.fetchers.forEach((e,t)=>He(E.fetchers,t)),E.blockers.forEach((e,t)=>Xe(t))}function ye(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(E,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function be(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),E={...E,...e};let n=[],r=[];E.fetchers.forEach((e,t)=>{e.state===`idle`&&(pe.has(t)?n.push(t):r.push(t))}),pe.forEach(e=>{!E.fetchers.has(e)&&!L.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(E,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>He(E.fetchers,e)),r.forEach(e=>E.fetchers.delete(e))}function xe(t,n,{flushSync:r}={}){let i=E.actionData!=null&&E.navigation.formMethod!=null&&En(E.navigation.formMethod)&&E.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?E.actionData:null;let o=n.loaderData?sn(E.loaderData,n.loaderData,n.matches||[],n.errors):E.loaderData,c=E.blockers;c.size>0&&!te&&(c=new Map(c),c.forEach((e,t)=>c.set(t,yt)));let l=!te&&ot(t,n.matches||E.matches),u=j===!0||E.navigation.formMethod!=null&&En(E.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),te||D===`POP`||(D===`PUSH`?e.history.push(t,t.state):D===`REPLACE`&&e.history.replace(t,t.state));let d;if(D===`POP`){let e=F.get(E.location.pathname);e&&e.has(t.pathname)?d={currentLocation:E.location,nextLocation:t}:F.has(t.pathname)&&(d={currentLocation:t,nextLocation:E.location})}else if(P){let e=F.get(E.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),F.set(E.location.pathname,e)),d={currentLocation:E.location,nextLocation:t}}be({...n,actionData:a,loaderData:o,historyAction:D,location:t,initialized:!0,renderFallback:!1,navigation:_t,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),D=`POP`,j=!1,P=!1,te=!1,ne=!1,k?.resolve(),k=null,ge?.resolve(),ge=null}async function Se(t,n){if(k?.resolve(),k=null,typeof t==`number`){k||=Rn();let n=k.promise;return e.history.go(t),n}let r=rt(C),{path:i,submission:a,error:o}=Et(!1,Tt(E.location,E.matches,c,t,n?.fromRouteId,n?.relative),n),s;n?.mask&&(s={pathname:``,search:``,hash:``,...typeof n.mask==`string`?A(n.mask):{...E.location.mask,...n.mask}});let l=E.location,u=O(l,i,n&&n.state,void 0,s);u={...u,...e.history.encodeLocation(u)};let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&En(a.formMethod)&&a.formAction===E.location.pathname+E.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=et({currentLocation:l,nextLocation:u,historyAction:f});if(h){Ze(h,{state:`blocked`,location:u,proceed(){Ze(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),Se(t,n)},reset(){let e=new Map(E.blockers);e.set(h,yt),be({blockers:e})}});return}await we(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function Ce(){ge||=Rn(),Le(),be({revalidation:`loading`});let e=ge.promise;return E.navigation.state===`submitting`?e:E.navigation.state===`idle`?(we(E.historyAction,E.location,{startUninterruptedRevalidation:!0}),e):(we(D||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:P===!0}),e)}async function we(t,n,r){N&&N.abort(),N=null,D=t,te=(r&&r.startUninterruptedRevalidation)===!0,at(E.location,E.matches),j=(r&&r.preventScrollReset)===!0,P=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&E.matches&&E.matches.length>0&&!y?E.matches:oe(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&E.initialized&&!ne&&mn(E.location,n)&&!(r&&r.submission&&En(r.submission.formMethod))){xe(n,{matches:a},{flushSync:o});return}let l=st(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),r?.instrumentationNavigateMetaReceiver){let t=kn(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=tt(n.pathname);xe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;N=new AbortController;let d=tn(e.history,n,N.signal,r&&r.submission),f=e.getContext?await e.getContext():new ee,p;if(r&&r.pendingError)p=[ln(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&En(r.submission.formMethod)){let i=await Te(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(yn(t)&&Ge(t.error)&&t.error.status===404){N=null,xe(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=jn(n,a,t,r.submission),o=!1,l.active=!1,d=tn(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Ee(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(N=null,xe(n,{matches:h||a,...cn(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Te(t,n,i,l,u,d,f,p,m={}){if(Le(),be({navigation:Mn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await ct(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=un(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=ln(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=tt(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=On(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:dn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Fe(t,n,Kt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(bn(h)){let n;return n=m&&m.replace!=null?m.replace:en(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===E.location.pathname+E.location.search,await Pe(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(yn(h)){let e=ln(l,g.route.id);return(m&&m.replace)!==!0&&(D=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function Ee(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||jn(n,i,l,p),x=p||m||An(b),S=!te&&!g;if(d){if(S){let e=De(v);be({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ct(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=un(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=ln(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=tt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=Dt(t,u,a,o,e.history,E,i,x,n,g?[]:r,g===!0,ne,re,pe,de,ue,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(ce=++ae,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(E.fetchers),t=qe(e);return xe(n,{matches:i,loaderData:{},errors:v&&yn(v[1])?{[v[0]]:v[1].error}:null,...cn(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=De(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=ke(T)),be(e,{flushSync:_})}T.forEach(e=>{We(e.key),e.controller&&L.set(e.key,e.controller)});let D=()=>T.forEach(e=>We(e.key));N&&N.signal.addEventListener(`abort`,D);let{loaderResults:O,fetcherResults:k}=await Ie(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener(`abort`,D),T.forEach(e=>L.delete(e.key));let A=fn(O);if(A)return await Pe(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=fn(k),A)return ue.add(A.key),await Pe(t,A.result,!0,{replace:h}),{shortCircuited:!0};let j=new Map(E.fetchers),{loaderData:M,errors:ee}=on(E,i,O,v,T,k,j);g&&E.errors&&(ee={...E.errors,...ee});let P=qe(j),F=Je(ce,j),I=P||F||T.length>0;return{matches:i,loaderData:M,errors:ee,...I?{workingFetchers:j}:{}}}function De(e){if(e&&!yn(e[1]))return{[e[0]]:e[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function ke(e){let t=new Map(E.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Nn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function je(t,n,r,i){We(t);let a=(i&&i.flushSync)===!0,o=rt(C),l=s.activeRoutes,u=Tt(E.location,E.matches,c,r,n,i?.relative),d=oe(l,u,c,!1,s.branches),f=st(d,l,u);if(f.active&&f.matches&&(d=f.matches),o&&o(kn(e.history,u,d)),!d){ze(t,n,dn(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Et(!0,u,i);if(h){ze(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new ee,_=(i&&i.preventScrollReset)===!0;if(m&&En(m.formMethod)){await Me(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate);return}de.set(t,{routeId:n,path:p}),await Ne(t,n,p,d,g,f.active,a,_,m)}async function Me(t,n,i,l,u,d,f,p,m,h){Le(),de.delete(t),Re(t,Pn(m,E.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=tn(e.history,i,g.signal,m);if(d){let e=await ct(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){ze(t,n,e.error,{flushSync:f});return}else if(e.matches)l=e.matches;else{ze(t,n,dn(404,{pathname:i}),{flushSync:f});return}}let v=On(l,i);if(!v.route.action&&!v.route.lazy){ze(t,n,dn(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}L.set(t,g);let y=ae,b=Kt(a,o,_,i,l,v,r,u),x=await Fe(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){L.get(t)===g&&L.delete(t);return}if(pe.has(t)){if(bn(S)||yn(S)){Re(t,Fn(void 0));return}}else{if(bn(S))if(L.delete(t),ce>y){Re(t,Fn(void 0));return}else return ue.add(t),Re(t,Nn(m)),Pe(_,S,!1,{fetcherSubmission:m,preventScrollReset:p});if(yn(S)){ze(t,n,S.error);return}}let C=E.navigation.location||E.location,T=tn(e.history,C,g.signal),O=s.activeRoutes,k=E.navigation.state===`idle`?E.matches:oe(O,E.navigation.location,c,!1,s.branches);w(k,`Didn't find any matches after fetcher action`);let A=++ae;le.set(t,A);let{dsMatches:j,revalidatingFetchers:M}=Dt(T,u,a,o,e.history,E,k,m,C,r,!1,ne,re,pe,de,ue,O,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),ee=Nn(m,S.data),P=new Map(E.fetchers);P.set(t,ee),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=Nn(void 0,n?n.data:void 0);P.set(t,r),We(t),e.controller&&L.set(t,e.controller)}),be({fetchers:P});let F=()=>M.forEach(e=>We(e.key));g.signal.addEventListener(`abort`,F);let{loaderResults:I,fetcherResults:te}=await Ie(j,M,T,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,F),le.delete(t),L.delete(t),M.forEach(e=>L.delete(e.key));let ie=E.fetchers.has(t),se=e=>{if(!ie)return e;let n=new Map(e.fetchers);return n.set(t,Fn(S.data)),{...e,fetchers:n}},fe=fn(I);if(fe)return E=se(E),Pe(T,fe.result,!1,{preventScrollReset:p});if(fe=fn(te),fe)return ue.add(fe.key),E=se(E),Pe(T,fe.result,!1,{preventScrollReset:p});let me=new Map(E.fetchers);ie&&me.set(t,Fn(S.data));let{loaderData:he,errors:ge}=on(E,k,I,void 0,M,te,me);Je(A,me),E.navigation.state===`loading`&&A>ce?(w(D,`Expected pending action`),N&&N.abort(),xe(E.navigation.location,{matches:k,loaderData:he,errors:ge,fetchers:me})):(be({errors:ge,loaderData:sn(E.loaderData,he,k,ge),fetchers:me}),ne=!1)}async function Ne(t,n,i,s,c,l,u,d,f){let p=E.fetchers.get(t);Re(t,Nn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=tn(e.history,i,m.signal);if(l){let e=await ct(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){ze(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{ze(t,n,dn(404,{pathname:i}),{flushSync:u});return}}let g=On(s,i);L.set(t,m);let _=ae,v=await Fe(h,i,Kt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(L.get(t)===m&&L.delete(t),!h.signal.aborted){if(pe.has(t)){Re(t,Fn(void 0));return}if(bn(y))if(ce>_){Re(t,Fn(void 0));return}else{ue.add(t),await Pe(h,y,!1,{preventScrollReset:d});return}if(yn(y)){ze(t,n,y.error);return}Re(t,Fn(y.data))}}async function Pe(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(k?.resolve(),k=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ne=!0);let d=i.response.headers.get(`Location`);w(d,`Expected a Location header on the redirect Response`),d=en(d,new URL(r.url),c,e.history);let f=O(E.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Ae(d)){let n=M(t,d,!0);e=n.origin!==t.location.origin||Oe(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}N=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=E.navigation;!o&&!s&&m&&h&&g&&(o=An(E.navigation));let _=o||s;gt.has(i.response.status)&&_&&En(_.formMethod)?await we(p,f,{submission:{..._,formAction:d},preventScrollReset:l||j,enableViewTransition:a?P:void 0}):await we(p,f,{overrideNavigation:jn(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||j,enableViewTransition:a?P:void 0})}async function Fe(e,t,n,r,i){let a,o={};try{a=await qt(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!En(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!E.loaderData.hasOwnProperty(e.route.id)&&(!E.errors||!E.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(vn(r)){let i=r.result;o[t]={type:`redirect`,response:Zt(i,e,t,n,c)}}else o[t]=await Xt(r);return o}async function Ie(e,t,n,r,i){let a=Fe(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Fe(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:dn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Le(){ne=!0,de.forEach((e,t)=>{L.has(t)&&re.add(t),We(t)})}function Re(e,t,n={}){let r=new Map(E.fetchers);r.set(e,t),be({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function ze(e,t,n,r={}){let i=ln(E.matches,t),a=new Map(E.fetchers);He(a,e),be({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Be(e){return fe.set(e,(fe.get(e)||0)+1),pe.has(e)&&pe.delete(e),E.fetchers.get(e)||vt}function Ve(e,t){We(e,t?.reason),Re(e,Fn(null))}function He(e,t){let n=E.fetchers.get(t);L.has(t)&&!(n&&n.state===`loading`&&le.has(t))&&We(t),de.delete(t),le.delete(t),ue.delete(t),pe.delete(t),re.delete(t),e.delete(t)}function Ue(e){let t=(fe.get(e)||0)-1;t<=0?(fe.delete(e),pe.add(e)):fe.set(e,t),be({fetchers:new Map(E.fetchers)})}function We(e,t){let n=L.get(e);n&&(n.abort(t),L.delete(e))}function Ke(e,t){for(let n of e){let e=t.get(n);w(e,`Expected fetcher: ${n}`);let r=Fn(e.data);t.set(n,r)}}function qe(e){let t=[],n=!1;for(let r of ue){let i=e.get(r);w(i,`Expected fetcher: ${r}`),i.state===`loading`&&(ue.delete(r),t.push(r),n=!0)}return Ke(t,e),n}function Je(e,t){let n=[];for(let[r,i]of le)if(i<e){let e=t.get(r);w(e,`Expected fetcher: ${r}`),e.state===`loading`&&(We(r),le.delete(r),n.push(r))}return Ke(n,t),n.length>0}function Ye(e,t){let n=E.blockers.get(e)||yt;return me.get(e)!==t&&me.set(e,t),n}function Xe(e){E.blockers.delete(e),me.delete(e)}function Ze(e,t){let n=E.blockers.get(e)||yt;w(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(E.blockers);r.set(e,t),be({blockers:r})}function et({currentLocation:e,nextLocation:t,historyAction:n}){if(me.size===0)return;me.size>1&&T(!1,`A router only supports one blocker at a time`);let r=Array.from(me.entries()),[i,a]=r[r.length-1],o=E.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function tt(e){let t=dn(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=un(n);return{notFoundMatches:r,route:i,error:t}}function nt(e,t,n){if(m=e,g=t,h=n||null,!_&&E.navigation===_t){_=!0;let e=ot(E.location,E.matches);e!=null&&be({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function it(e,t){return h&&h(e,t.map(e=>se(e,E.loaderData)))||e.key}function at(e,t){if(m&&g){let n=it(e,t);m[n]=g()}}function ot(e,t){if(m){let n=it(e,t),r=m[n];if(typeof r==`number`)return r}return null}function st(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:oe(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:oe(n,r,c,!0,e)}}return{active:!1,matches:null}}async function ct(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||Nt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=oe(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=oe(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&<(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=oe(s.activeRoutes,n,c,!0,u),!f||lt(l,f))return{type:`success`,matches:null};l=f}}function lt(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function ut(e){o={},s.setHmrRoutes(ie(e,a,void 0,o))}function dt(e,t,n=!1){Nt(e,t,s,o,a,n),s.hasHMRRoutes||be({})}return C={get basename(){return c},get future(){return u},get state(){return E},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:_e,subscribe:ye,enableScrollRestoration:nt,navigate:Se,fetch:je,revalidate:Ce,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Be,resetFetcher:Ve,deleteFetcher:Ue,dispose:ve,getBlocker:Ye,deleteBlocker:Xe,patchRoutes:dt,_internalFetchControllers:L,_internalSetRoutes:ut,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){be(e)}},e.instrumentations&&(C=$e(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function wt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Tt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Ie(r||`.`,Fe(o),Oe(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Dn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=ke({basename:n,pathname:c.pathname})),k(c)}function Et(e,t,n){if(!n||!wt(n))return{path:t};if(n.formMethod&&!Tn(n.formMethod))return{path:t,error:dn(405,{method:n.formMethod})};let r=()=>({path:t,error:dn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=pn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!En(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!En(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}w(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=nn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=nn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=rn(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=rn(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(En(c.formMethod))return{path:t,submission:c};let l=A(t);return e&&l.search&&Dn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:k(l),submission:c}}function Dt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?yn(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&yn(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=Ke(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!Ot(s))f=!1;else if(u){let{shouldLoad:e}=kt(s,a.loaderData,a.errors);f=e}else At(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Gt(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?jt(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return Gt(n,r,e,c,k,i,l,t,Mt(i,m),m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=oe(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=On(b,e.path),C=new AbortController,w=tn(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Kt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Kt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};Mt(S,a)&&(T=Kt(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function Ot(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function kt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Ot(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function At(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function jt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Mt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Nt(e,t,n,r,i,a){let o;if(e){let t=r[e];w(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Pt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ie(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=ie([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Pt(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Pt(e,t)))??!1:!1}var Ft=new WeakMap,It=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(w(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Ft.get(i);o||(o={},Ft.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=F(e),n=i[e]!==void 0;if(t)T(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)T(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Lt=new WeakMap;function Rt(e,t,n,r,i){let a=n[e.id];if(w(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Lt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{w(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=te(e),o=a[e]!==void 0;i?T(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?T(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Lt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=It({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function zt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Bt(e){return e.matches.some(e=>e.route.middleware)?Vt(e,()=>zt(e)):zt(e)}function Vt(e,t){return Ht(e,t,e=>{if(wn(e))throw e;return e},gn,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[ln(r,a).route.id]:{type:`error`,result:t}}}}}async function Ht(e,t,n,r,i){let{matches:a,...o}=e;return await Ut(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Ut(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Ut(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Wt(e,t,n,r,i){let a=It({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Rt(r.route,En(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Gt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Wt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Mt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Mt(a,{...l,defaultShouldRevalidate:e}):Mt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!En(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(En(n.method)||!p)?Jt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Kt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Gt(e,t,n,r,Ke(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Wt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function qt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:qe(t,n),pattern:Ke(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Vt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Jt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=En(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:qe(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a)if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw dn(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}else if(t)c=await f(t);else{let t=new URL(e.url);throw dn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Yt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Xt(e){let{result:t,type:n}=e;if(Sn(t)){let e;try{e=await Yt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new We(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?xn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:hn(t),statusCode:Ge(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ge(t)?t.status:void 0}:xn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Zt(e,t,n,r,i){let a=e.headers.get(`Location`);if(w(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Ae(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Tt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Qt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function $t(e){try{return Qt.includes(new URL(e).protocol)}catch{return!1}}function en(e,t,n,r){if(Ae(e)){let r=e,i=y.test(r)?new URL(b(r,t.protocol)):new URL(r);if($t(i.toString()))throw Error(`Invalid redirect location`);let a=Oe(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Le(i.pathname)+i.search+i.hash}try{if($t(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function tn(e,t,n,r){let i=e.createURL(pn(t)).toString(),a={signal:n};if(r&&En(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=nn(r.formData):a.body=r.formData}return new Request(i,a)}function nn(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function rn(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function an(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&yn(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(w(!bn(f),`Cannot handle redirect results in processLoaderData`),yn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=ln(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=xt),c||(c=!0,s=Ge(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function on(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=an(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(w(s,`Did not find corresponding fetcher result`),yn(s)){let t=ln(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(bn(s))w(!1,`Unhandled fetcher revalidation redirect`);else{let e=Fn(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function sn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==xt).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function cn(e){return e?yn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ln(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function un(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function dn(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new We(e||500,o,Error(s),!0)}function fn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(bn(r))return{key:n,result:r}}}function pn(e){return k({...typeof e==`string`?A(e):e,hash:``})}function mn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function hn(e){return new We(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function gn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&_n(t))}function _n(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function vn(e){return Sn(e.result)&&ht.has(e.result.status)}function yn(e){return e.type===`error`}function bn(e){return(e&&e.type)===`redirect`}function xn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Sn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Cn(e){return ht.has(e)}function wn(e){return Sn(e)&&Cn(e.status)&&e.headers.has(`Location`)}function Tn(e){return mt.has(e.toUpperCase())}function En(e){return ft.has(e.toUpperCase())}function Dn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function On(e,t){let n=typeof t==`string`?A(t).search:t.search;if(e[e.length-1].route.index&&Dn(n||``))return e[e.length-1];let r=Pe(e);return r[r.length-1]}function kn(e,t,n){return{url:qe(e.createURL(t),t),pattern:n?Ke(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function An(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function jn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Mn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Nn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Pn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Fn(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function In(e,t){try{let n=e.sessionStorage.getItem(bt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Ln(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(bt,JSON.stringify(n))}catch(e){T(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Rn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var zn=N.createContext(null);zn.displayName=`DataRouter`;var Bn=N.createContext(null);Bn.displayName=`DataRouterState`;var Vn=N.createContext(!1);function Hn(){return N.useContext(Vn)}var Un=N.createContext({isTransitioning:!1});Un.displayName=`ViewTransition`;var Wn=N.createContext(new Map);Wn.displayName=`Fetchers`;var Gn=N.createContext(null);Gn.displayName=`Await`;var Kn=N.createContext(null);Kn.displayName=`Navigation`;var qn=N.createContext(null);qn.displayName=`Location`;var Jn=N.createContext({outlet:null,matches:[],isDataRoute:!1});Jn.displayName=`Route`;var Yn=N.createContext(null);Yn.displayName=`RouteError`;var Xn=`REACT_ROUTER_ERROR`,Zn=`REDIRECT`,Qn=`ROUTE_ERROR_RESPONSE`;function $n(e){if(e.startsWith(`${Xn}:${Zn}:{`))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 er(e){if(e.startsWith(`${Xn}:${Qn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new We(t.status,t.statusText,t.data)}catch{}}function tr(e,{relative:t}={}){w(nr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=N.useContext(Kn),{hash:i,pathname:a,search:o}=ur(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Re([n,a])),r.createHref({pathname:s,search:o,hash:i})}function nr(){return N.useContext(qn)!=null}function rr(){return w(nr(),`useLocation() may be used only in the context of a <Router> component.`),N.useContext(qn).location}var ir=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ar(){let{isDataRoute:e}=N.useContext(Jn);return e?Or():or()}function or(){w(nr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=N.useContext(zn),{basename:t,navigator:n}=N.useContext(Kn),{matches:r}=N.useContext(Jn),{pathname:i}=rr(),a=JSON.stringify(Fe(r)),o=N.useRef(!1);return N.useLayoutEffect(()=>{o.current=!0}),N.useCallback((r,s={})=>{if(T(o.current,ir),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ie(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Re([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var sr=N.createContext(null);function cr(e){let t=N.useContext(Jn).outlet;return N.useMemo(()=>t&&N.createElement(sr.Provider,{value:e},t),[t,e])}function lr(){let{matches:e}=N.useContext(Jn);return e[e.length-1]?.params??{}}function ur(e,{relative:t}={}){let{matches:n}=N.useContext(Jn),{pathname:r}=rr(),i=JSON.stringify(Fe(n));return N.useMemo(()=>Ie(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function dr(e,t,n){w(nr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=N.useContext(Kn),{matches:i}=N.useContext(Jn),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=rr(),l;if(t){let e=typeof t==`string`?A(t):t;w(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ae(e,{pathname:d}),p=vr(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Re([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:Re([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?N.createElement(qn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function fr(){let e=Dr(),t=Ge(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return N.createElement(N.Fragment,null,N.createElement(`h2`,null,`Unexpected Application Error!`),N.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?N.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var pr=N.createElement(fr,null),mr=class extends N.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Vn;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=er(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:N.createElement(Jn.Provider,{value:this.props.routeContext},N.createElement(Yn.Provider,{value:e,children:this.props.component}));return this.context?N.createElement(gr,{error:e},t):t}},hr=new WeakMap;function gr({children:e,error:t}){let{basename:n}=N.useContext(Kn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=$n(t.digest);if(e){let r=hr.get(t);if(r)throw r;let i=Ye(e.location,n),a=i.absoluteURL||i.to;if($t(a))throw Error(`Invalid redirect location`);if(Je&&!hr.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 hr.set(t,n),n}return N.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function _r({routeContext:e,match:t,children:n}){let r=N.useContext(zn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),N.createElement(Jn.Provider,{value:e},n)}function vr(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);w(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:Ke(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||pr,o&&(s<0&&c===0?(Ar(`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?N.createElement(n.route.Component,null):n.route.element?n.route.element:e,N.createElement(_r,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?N.createElement(mr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function yr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function br(e){let t=N.useContext(zn);return w(t,yr(e)),t}function xr(e){let t=N.useContext(Bn);return w(t,yr(e)),t}function Sr(e){let t=N.useContext(Jn);return w(t,yr(e)),t}function Cr(e){let t=Sr(e),n=t.matches[t.matches.length-1];return w(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function wr(){return Cr(`useRouteId`)}function Tr(){let e=xr(`useNavigation`);return N.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Er(){let{matches:e,loaderData:t}=xr(`useMatches`);return N.useMemo(()=>e.map(e=>se(e,t)),[e,t])}function Dr(){let e=N.useContext(Yn),t=xr(`useRouteError`),n=Cr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Or(){let{router:e}=br(`useNavigate`),t=Cr(`useNavigate`),n=N.useRef(!1);return N.useLayoutEffect(()=>{n.current=!0}),N.useCallback(async(r,i={})=>{T(n.current,ir),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var kr={};function Ar(e,t,n){!t&&!kr[e]&&(kr[e]=!0,T(!1,n))}var jr={};function Mr(e,t){!e&&!jr[t]&&(jr[t]=!0,console.warn(t))}var Nr=[`HydrateFallback`,`hydrateFallbackElement`],Pr=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Fr({router:e,flushSync:t,onError:n,useTransitions:r}){r=Hn()||r;let[i,a]=N.useState(e.state),[o,s]=(0,N.useOptimistic)(i),[c,l]=N.useState(),[u,d]=N.useState({isTransitioning:!1}),[f,p]=N.useState(),[m,h]=N.useState(),[g,_]=N.useState(),v=N.useRef(new Map),y=N.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Ke(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Mr(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Mr(g==null||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):N.startTransition(()=>{r===!0&&s(e=>Ir(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);N.useLayoutEffect(()=>e.subscribe(y),[e,y]),N.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Pr)},[u]),N.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):N.startTransition(()=>{r===!0&&s(e=>Ir(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),N.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),N.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=N.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),x=e.basename||`/`,S=N.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return N.createElement(N.Fragment,null,N.createElement(zn.Provider,{value:S},N.createElement(Bn.Provider,{value:o},N.createElement(Wn.Provider,{value:v.current},N.createElement(Un.Provider,{value:u},N.createElement(Vr,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},N.createElement(Lr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Ir(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Lr=N.memo(Rr);function Rr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return dr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function zr({to:e,replace:t,state:n,relative:r}){w(nr(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=N.useContext(Kn);T(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=N.useContext(Jn),{pathname:o}=rr(),s=ar(),c=Ie(e,Fe(a),o,r===`path`),l=JSON.stringify(c);return N.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Br(e){return cr(e.context)}function Vr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){w(!nr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=N.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=A(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=N.useMemo(()=>{let e=Oe(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 T(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:N.createElement(Kn.Provider,{value:c},N.createElement(qn.Provider,{children:t,value:h}))}N.Component;var Hr=`application/x-www-form-urlencoded`;function Ur(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Wr(e){return Ur(e)&&e.tagName.toLowerCase()===`button`}function Gr(e){return Ur(e)&&e.tagName.toLowerCase()===`form`}function Kr(e){return Ur(e)&&e.tagName.toLowerCase()===`input`}function qr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Jr(e,t){return e.button===0&&(!t||t===`_self`)&&!qr(e)}function Yr(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 Xr(e,t){let n=Yr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Zr=null;function Qr(){if(Zr===null)try{new FormData(document.createElement(`form`),0),Zr=!1}catch{Zr=!0}return Zr}var $r=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ei(e){return e!=null&&!$r.has(e)?(T(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Hr}"`),null):e}function ti(e,t){let n,r,i,a,o;if(Gr(e)){let o=e.getAttribute(`action`);r=o?Oe(o,t):null,n=e.getAttribute(`method`)||`get`,i=ei(e.getAttribute(`enctype`))||Hr,a=new FormData(e)}else if(Wr(e)||Kr(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?Oe(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=ei(e.getAttribute(`formenctype`))||ei(o.getAttribute(`enctype`))||Hr,a=new FormData(o,e),!Qr()){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(Ur(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Hr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function ni(e,t){if(e===!1||e==null)throw Error(t)}var ri={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},ii=/[&><\u2028\u2029]/g;function ai(e){return e.replace(ii,e=>ri[e])}function oi(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}var si=`modulepreload`,ci=function(e){return`/`+e},li={},ui=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=ci(t,n),t=s(t),t in li)return;li[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`:si,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)})};async function di(e,t){if(e.id in t)return t[e.id];try{let n=await ui(()=>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 fi(e){return e!=null&&typeof e.page==`string`}function pi(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 mi(e,t,n){return yi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await di(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(pi).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function hi(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 gi(e,t,{includeHydrateFallback:n}={}){return _i(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 _i(e){return[...new Set(e)]}function vi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function yi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!fi(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(vi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function bi(){let e=N.useContext(zn);return ni(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function xi(){let e=N.useContext(Bn);return ni(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Si=N.createContext(void 0);Si.displayName=`FrameworkContext`;function Ci(){let e=N.useContext(Si);return ni(e,`You must render this element inside a <HydratedRouter> element`),e}function wi(e,t){let n=N.useContext(Si),[r,i]=N.useState(!1),[a,o]=N.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=N.useRef(null);N.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]),N.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:Ti(s,p),onBlur:Ti(c,m),onMouseEnter:Ti(l,p),onMouseLeave:Ti(u,m),onTouchStart:Ti(d,p)}]:[a,f,{}]:[!1,f,{}]}function Ti(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ei({page:e,...t}){let n=Hn(),{nonce:r}=Ci(),{router:i}=bi(),a=N.useMemo(()=>ae(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?N.createElement(Oi,{page:e,matches:a,...t}):N.createElement(ki,{page:e,matches:a,...t})):null}function Di(e){let{manifest:t,routeModules:n}=Ci(),[r,i]=N.useState([]);return N.useEffect(()=>{let r=!1;return mi(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Oi({page:e,matches:t,...n}){let r=rr(),i=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=oi(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return N.createElement(N.Fragment,null,i.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function ki({page:e,matches:t,...n}){let r=rr(),{manifest:i,routeModules:a}=Ci(),{loaderData:o,matches:s}=xi(),c=N.useMemo(()=>hi(e,t,s,i,r,`data`),[e,t,s,i,r]),l=N.useMemo(()=>hi(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=oi(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=N.useMemo(()=>gi(l,i),[l,i]),f=Di(l);return N.createElement(N.Fragment,null,u.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>N.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>N.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ai(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var ji=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ji&&(window.__reactRouterVersion=`8.3.0`)}catch{}function Mi(e,t){return Ct({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:C({window:t?.window}),hydrationData:t?.hydrationData||Ni(),routes:e,mapRouteProperties:re,hydrationRouteProperties:Nr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Ni(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Pi(e.errors)}),e}function Pi(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new We(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&Ue.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}function Fi({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=N.useState({action:n.action,location:n.location}),o=N.useCallback(e=>{r===!1?a(e):N.startTransition(()=>a(e))},[r]);return N.useLayoutEffect(()=>n.listen(o),[n,o]),N.createElement(Vr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Fi.displayName=`unstable_HistoryRouter`;var Ii=N.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:_}=N.useContext(Kn),y=typeof l==`string`&&v.test(l),b=Ye(l,h);l=b.to;let x=tr(l,{relative:r}),S=rr(),C=null;if(o){let e=Ie(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Re([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=wi(n,p),D=Ui(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=N.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Ai(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?N.createElement(N.Fragment,null,A,N.createElement(Ei,{page:x})):A});Ii.displayName=`Link`;var Li=N.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=ur(a,{relative:c.relative}),d=rr(),f=N.useContext(Bn),{navigator:p,basename:m}=N.useContext(Kn),h=f!=null&&ea(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Oe(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return N.createElement(Ii,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Li.displayName=`NavLink`;var Ri=N.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=N.useContext(Kn),g=qi(),_=Ji(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&v.test(s);return N.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?N.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Ri.displayName=`Form`;function zi({getKey:e,storageKey:t,...n}){let r=N.useContext(Si),{basename:i}=N.useContext(Kn),a=rr(),o=Er();Qi({getKey:e,storageKey:t});let s=N.useMemo(()=>{if(!r||!e)return null;let t=Zi(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),N.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ai(JSON.stringify(t||Yi))}, ${ai(JSON.stringify(s))})`}})}zi.displayName=`ScrollRestoration`;function Bi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vi(e){let t=N.useContext(zn);return w(t,Bi(e)),t}function Hi(e){let t=N.useContext(Bn);return w(t,Bi(e)),t}function Ui(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=ar(),d=rr(),f=ur(e,{relative:o});return N.useCallback(p=>{if(Jr(p,t)){p.preventDefault();let t=n===void 0?k(d)===k(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?N.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Wi(e){T(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=N.useRef(Yr(e)),n=N.useRef(!1),r=rr(),i=N.useMemo(()=>Xr(r.search,n.current?null:t.current),[r.search]),a=ar();return[i,N.useCallback((e,t)=>{let r=Yr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Gi=0,Ki=()=>`__${String(++Gi)}__`;function qi(){let{router:e}=Vi(`useSubmit`),{basename:t}=N.useContext(Kn),n=wr(),r=e.fetch,i=e.navigate;return N.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ti(e,t);a.navigate===!1?await r(a.fetcherKey||Ki(),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}):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 Ji(e,{relative:t}={}){let{basename:n}=N.useContext(Kn),r=N.useContext(Jn);w(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ur(e||`.`,{relative:t})},o=rr();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:Re([n,a.pathname])),k(a)}var Yi=`react-router-scroll-positions`,Xi={};function Zi(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Oe(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Qi({getKey:e,storageKey:t}={}){let{router:n}=Vi(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Hi(`useScrollRestoration`),{basename:a}=N.useContext(Kn),o=rr(),s=Er(),c=Tr();N.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),$i(N.useCallback(()=>{if(c.state===`idle`){let t=Zi(o,s,a,e);Xi[t]=window.scrollY}try{sessionStorage.setItem(t||Yi,JSON.stringify(Xi))}catch(e){T(!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`&&(N.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Yi);e&&(Xi=JSON.parse(e))}catch{}},[t]),N.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Xi,()=>window.scrollY,e?(t,n)=>Zi(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),N.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{T(!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 $i(e,t){let{capture:n}=t||{};N.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function ea(e,{relative:t}={}){let n=N.useContext(Un);w(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Vi(`useViewTransitionState`),i=ur(e,{relative:t});if(!n.isTransitioning)return!1;let a=Oe(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Oe(n.nextLocation.pathname,r)||n.nextLocation.pathname;return we(i.pathname,o)!=null||we(i.pathname,a)!=null}var ta=l(_(),1),na={dockerDismissed:`codecommit-docker-dismissed`,grantedDismissed:`codecommit-granted-dismissed`,theme:`codecommit-theme`,desktopNotifications:`codecommit:desktopNotifications`,reminders:`codecommit:reminders`,reminderInterval:`codecommit:reminderInterval`},ra=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),R=o(((e,t)=>{t.exports=ra()}))(),ia=(0,N.createContext)({theme:`system`,setTheme:()=>{}}),aa=()=>{let e=localStorage.getItem(na.theme);return e===`dark`||e===`light`||e===`system`?e:`system`};function oa({children:e}){let[t,n]=(0,N.useState)(aa),r=(0,N.useCallback)(e=>{localStorage.setItem(na.theme,e),n(e)},[]);return(0,N.useEffect)(()=>{let e=document.documentElement,n=t===`system`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:t;e.classList.remove(`dark`,`light`),e.classList.add(n)},[t]),(0,N.useEffect)(()=>{if(t!==`system`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>{let t=document.documentElement;t.classList.remove(`dark`,`light`),t.classList.add(e.matches?`dark`:`light`)};return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[t]),(0,R.jsx)(ia,{value:{theme:t,setTheme:r},children:e})}function sa(){return(0,N.useContext)(ia)}var ca=l(h(),1),la=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let e=0,r=t.length;e<r;e++)n=t[e](n);return n}}},ua={pipe(){return la(this,arguments)}},da=function(){function e(){}return e.prototype=ua,e}(),z=function(e,t){if(typeof e==`function`)return function(){return e(arguments)?t.apply(this,arguments):e=>t(e,...arguments)};switch(e){case 0:case 1:throw RangeError(`Invalid arity ${e}`);case 2:return function(e,n){return arguments.length>=2?t(e,n):function(n){return t(n,e)}};case 3:return function(e,n,r){return arguments.length>=3?t(e,n,r):function(r){return t(r,e,n)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let n=arguments;return function(e){return t(e,...n)}}}},fa=e=>e,pa=e=>()=>e,ma=pa(!0),ha=pa(!1),ga=pa(null),_a=pa(void 0),va=_a;function ya(e,...t){return la(e,t)}function ba(e,t,n,r,i,a,o,s,c){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return a(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return o(a(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return s(o(a(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return c(s(o(a(i(r(n(t(e.apply(this,arguments)))))))))}}}function xa(e){let t=new WeakMap;return n=>{if(t.has(n))return t.get(n);let r=e(n);return t.set(n,r),r}}var Sa=e=>{let t=new Set(Reflect.ownKeys(e));if(e.constructor===Object)return t;e instanceof Error&&t.delete(`stack`);let n=Object.getPrototypeOf(e),r=n;for(;r!==null&&r!==Object.prototype;){let e=Reflect.ownKeys(r);for(let n=0;n<e.length;n++)t.add(e[n]);r=Object.getPrototypeOf(r)}return t.has(`constructor`)&&typeof e.constructor==`function`&&n===e.constructor.prototype&&t.delete(`constructor`),t},Ca=new WeakSet;function wa(e){return typeof e==`string`}function Ta(e){return typeof e==`number`}function Ea(e){return typeof e==`boolean`}function Da(e){return typeof e==`symbol`}function Oa(e){return wa(e)||Ta(e)||Da(e)}function ka(e){return typeof e==`function`}function Aa(e){return e!==void 0}function ja(e){return e!=null}function Ma(e){return!1}function Na(e){return!0}function Pa(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Fa(e){return typeof e==`object`&&!!e||ka(e)}var Ia=z(2,(e,t)=>Fa(e)&&t in e),La=z(2,(e,t)=>Ia(e,`_tag`)&&e._tag===t);function Ra(e){return e instanceof Error}var za=`~effect/interfaces/Hash`,Ba=e=>{switch(typeof e){case`number`:return Ga(e);case`bigint`:return Ka(e.toString(10));case`boolean`:return Ka(String(e));case`symbol`:return Ka(String(e));case`string`:return Ka(e);case`undefined`:return Ka(`undefined`);case`function`:case`object`:if(e===null)return Ka(`null`);if(e instanceof Date)return Ka(e.toISOString());if(e instanceof RegExp)return Ka(e.toString());{if(Ca.has(e))return Va(e);if(eo.has(e))return eo.get(e);let t=no(e,()=>Wa(e)?e[za]():typeof e==`function`?Va(e):Array.isArray(e)||ArrayBuffer.isView(e)?Xa(e):e instanceof Map?Za(e):e instanceof Set?Qa(e):Ja(e));return eo.set(e,t),t}default:throw Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},Va=e=>($a.has(e)||$a.set(e,Ga(Math.floor(Math.random()*(2**53-1)))),$a.get(e)),Ha=z(2,(e,t)=>e*53^t),Ua=e=>e&3221225471|e>>>1&1073741824,Wa=e=>Ia(e,za),Ga=e=>{if(e!==e)return Ka(`NaN`);if(e===1/0)return Ka(`Infinity`);if(e===-1/0)return Ka(`-Infinity`);let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return Ua(t)},Ka=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return Ua(t)},qa=(e,t)=>{let n=12289;for(let r of t)n^=Ha(Ba(r),Ba(e[r]));return Ua(n)},Ja=e=>qa(e,Sa(e)),Ya=(e,t)=>n=>{let r=e;for(let e of n)r^=t(e);return Ua(r)},Xa=Ya(6151,Ba),Za=Ya(Ka(`Map`),([e,t])=>Ha(Ba(e),Ba(t))),Qa=Ya(Ka(`Set`),Ba),$a=new WeakMap,eo=new WeakMap,to=new WeakSet;function no(e,t){if(to.has(e))return Ka(`[Circular]`);to.add(e);let n=t();return to.delete(e),n}var ro=`~effect/interfaces/Equal`;function io(){return arguments.length===1?e=>ao(e,arguments[0]):ao(arguments[0],arguments[1])}function ao(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=typeof e;return n===typeof t?n===`number`&&e!==e&&t!==t?!0:n!==`object`&&n!==`function`||Ca.has(e)||Ca.has(t)?!1:uo(e,t,lo):!1}function oo(e,t,n){let r=so.has(e),i=co.has(t);if(r&&i)return!0;if(r||i)return!1;so.add(e),co.add(t);let a=n();return so.delete(e),co.delete(t),a}var so=new WeakSet,co=new WeakSet;function lo(e,t){if(Ba(e)!==Ba(t))return!1;if(e instanceof Date)return t instanceof Date&&e.toISOString()===t.toISOString();if(e instanceof RegExp)return t instanceof RegExp&&e.toString()===t.toString();let n=bo(e),r=bo(t);if(n!==r)return!1;let i=n&&r;return typeof e==`function`&&!i?!1:oo(e,t,()=>i?e[ro](t):Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:po(e,t):ArrayBuffer.isView(e)?!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength?!1:mo(e,t):e instanceof Map?!(t instanceof Map)||e.size!==t.size?!1:_o(e,t):e instanceof Set?!(t instanceof Set)||e.size!==t.size?!1:yo(e,t):ho(e,t))}function uo(e,t,n){let r=fo.get(e);if(!r)r=new WeakMap,fo.set(e,r);else if(r.has(t))return r.get(t);let i=n(e,t);r.set(t,i);let a=fo.get(t);return a||(a=new WeakMap,fo.set(t,a)),a.set(e,i),i}var fo=new WeakMap;function po(e,t){for(let n=0;n<e.length;n++)if(!ao(e[n],t[n]))return!1;return!0}function mo(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ho(e,t){let n=Sa(e),r=Sa(t);if(n.size!==r.size)return!1;for(let i of n)if(!r.has(i)||!ao(e[i],t[i]))return!1;return!0}function go(e,t){return function(n,r){for(let[i,a]of n){let n=!1;for(let[o,s]of r)if(e(i,o)&&t(a,s)){n=!0;break}if(!n)return!1}return!0}}var _o=go(ao,ao);function vo(e){return function(t,n){for(let r of t){let t=!1;for(let i of n)if(e(r,i)){t=!0;break}if(!t)return!1}return!0}}var yo=vo(ao),bo=e=>Ia(e,ro),xo=()=>io,So=Symbol.for(`~effect/Redactable`),Co=e=>Ia(e,So);function wo(e){return Co(e)?To(e):e}function To(e){return e[So](globalThis[`~effect/Fiber/currentFiber`]?.context??Do)}var Eo=`~effect/Fiber/currentFiber`,Do={"~effect/Context":{},mapUnsafe:new Map,pipe(){return la(this,arguments)}};function Oo(e,t){let n=t?.space??0,r=new WeakSet,i=n?typeof n==`number`?` `.repeat(n):n:``,a=e=>i.repeat(e),o=(e,t)=>{let n=e?.constructor;return n&&n!==Object.prototype.constructor&&n.name?`${n.name}(${t})`:t},s=e=>{try{return Reflect.ownKeys(e)}catch{return[`[ownKeys threw]`]}};function c(e,n=0){if(Array.isArray(e)){if(r.has(e))return ko;if(r.add(e),!i||e.length<=1)return`[${e.map(e=>c(e,n)).join(`,`)}]`;let t=e.map(e=>c(e,n+1)).join(`,
|
|
10
|
+
`+a(n+1));return`[\n${a(n+1)}${t}\n${a(n)}]`}if(e instanceof Date)return Mo(e);if(!t?.ignoreToString&&Ia(e,`toString`)&&typeof e.toString==`function`&&e.toString!==Object.prototype.toString&&e.toString!==Array.prototype.toString){let t=No(e);return e instanceof Error&&e.cause?`${t} (cause: ${c(e.cause,n)})`:t}if(typeof e==`string`)return JSON.stringify(e);if(typeof e==`number`||e==null||typeof e==`boolean`||typeof e==`symbol`)return String(e);if(typeof e==`bigint`)return String(e)+`n`;if(typeof e==`object`||typeof e==`function`){if(r.has(e))return ko;if(r.add(e),So in e)return Oo(To(e));if(Symbol.iterator in e)return`${e.constructor.name}(${c(Array.from(e),n)})`;let t=s(e);if(!i||t.length<=1){let r=`{${t.map(t=>`${Ao(t)}:${c(e[t],n)}`).join(`,`)}}`;return o(e,r)}let l=`{\n${t.map(t=>`${a(n+1)}${Ao(t)}: ${c(e[t],n+1)}`).join(`,
|
|
11
|
+
`)}\n${a(n)}}`;return o(e,l)}return String(e)}return c(e,0)}var ko=`[Circular]`;function Ao(e){return typeof e==`string`?JSON.stringify(e):String(e)}function jo(e){return e.map(e=>`[${Ao(e)}]`).join(``)}function Mo(e){try{return e.toISOString()}catch{return`Invalid Date`}}function No(e){try{let t=e.toString();return typeof t==`string`?t:String(t)}catch{return`[toString threw]`}}function Po(e,t){let n=[];return JSON.stringify(e,function(e,t){let r=wo(t);if(typeof r!=`object`||!r)return r;for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(!n.includes(r))return n.push(r),r},t?.space)}var Fo=Symbol.for(`nodejs.util.inspect.custom`),Io=e=>{try{if(Ia(e,`toJSON`)&&ka(e.toJSON)&&e.toJSON.length===0)return e.toJSON();if(Array.isArray(e))return e.map(Io)}catch{return`[toJSON threw]`}return wo(e)},Lo={toJSON(){return Io(this)},[Fo](){return this.toJSON()},toString(){return Oo(this.toJSON())}},Ro=class{[Fo](){return this.toJSON()}toString(){return Oo(this.toJSON())}},zo=class e{called=!1;self;constructor(e){this.self=e}next(e){return this.called?{value:e,done:!0}:(this.called=!0,{value:this.self,done:!1})}[Symbol.iterator](){return new e(this.self)}},Bo=(()=>{let e=`~effect/Utils/internal`,t={[e]:e=>e()},n={[e]:e=>{try{return e()}finally{}}};return t[e](()=>Error().stack)?.includes(e)===!0?t[e]:n[e]})(),Vo=`~effect/Effect`,Ho=`~effect/Exit`,Uo={_A:fa,_E:fa,_R:fa},Wo=`${Vo}/identifier`,Go=`${Vo}/args`,Ko=`${Vo}/evaluate`,qo=`${Vo}/successCont`,Jo=`${Vo}/failureCont`,Yo=`${Vo}/ensureCont`,Xo=Symbol.for(`effect/Effect/Yield`),Zo={pipe(){return la(this,arguments)},toJSON(){return{...this}},toString(){return Oo(this.toJSON(),{ignoreToString:!0,space:2})},[Fo](){return this.toJSON()}},Qo={[Vo]:Uo,...Zo,[Symbol.iterator](){return new zo(this)},toJSON(){return{_id:`Effect`,op:this[Wo],...Go in this?{args:this[Go]}:void 0}}},$o=e=>Ia(e,Vo),es=e=>Ia(e,Ho),ts=`~effect/Cause`,ns=`~effect/Cause/Reason`,rs=e=>Ia(e,ts),is=e=>Ia(e,ns),as=class{[ts];reasons;constructor(e){this[ts]=ts,this.reasons=e}pipe(){return la(this,arguments)}toJSON(){return{_id:`Cause`,failures:this.reasons.map(e=>e.toJSON())}}toString(){return`Cause(${Oo(this.reasons)})`}[Fo](){return this.toJSON()}[ro](e){return rs(e)&&this.reasons.length===e.reasons.length&&this.reasons.every((t,n)=>io(t,e.reasons[n]))}[za](){return Xa(this.reasons)}},os=new WeakMap,ss=class{[ns];annotations;_tag;constructor(e,t,n){if(this[ns]=ns,this._tag=e,t!==cs&&typeof n==`object`&&n&&t.size>0){let e=os.get(n);e&&(t=new Map([...e,...t])),os.set(n,t)}this.annotations=t}annotate(e,t){if(e.mapUnsafe.size===0)return this;let n=new Map(this.annotations);e.mapUnsafe.forEach((e,r)=>{t?.overwrite!==!0&&n.has(r)||n.set(r,e)});let r=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return r.annotations=n,r}pipe(){return la(this,arguments)}toString(){return Oo(this)}[Fo](){return this.toString()}},cs=new Map,ls=class extends ss{error;constructor(e,t=cs){super(`Fail`,t,e),this.error=e}toString(){return`Fail(${Oo(this.error)})`}toJSON(){return{_tag:`Fail`,error:this.error}}[ro](e){return gs(e)&&io(this.error,e.error)&&io(this.annotations,e.annotations)}[za](){return Ha(Ka(this._tag))(Ha(Ba(this.error))(Ba(this.annotations)))}},us=e=>new as(e),ds=new as([]),fs=e=>new as([new ls(e)]),ps=class extends ss{defect;constructor(e,t=cs){super(`Die`,t,e),this.defect=e}toString(){return`Die(${Oo(this.defect)})`}toJSON(){return{_tag:`Die`,defect:this.defect}}[ro](e){return _s(e)&&io(this.defect,e.defect)&&io(this.annotations,e.annotations)}[za](){return Ha(Ka(this._tag))(Ha(Ba(this.defect))(Ba(this.annotations)))}},ms=e=>new as([new ps(e)]),hs=z(e=>rs(e[0]),(e,t,n)=>t.mapUnsafe.size===0?e:new as(e.reasons.map(e=>e.annotate(t,n)))),gs=e=>e._tag===`Fail`,_s=e=>e._tag===`Die`,vs=e=>e._tag===`Interrupt`;function ys(e){return Ds(`Effect.evaluate: Not implemented`)}var bs=e=>({...Qo,[Wo]:e.op,[Ko]:e[Ko]??ys,[qo]:e[qo],[Jo]:e[Jo],[Yo]:e[Yo]}),xs=e=>{let t=bs(e);return function(){let n=Object.create(t);return n[Go]=e.single===!1?arguments:arguments[0],n}},Ss=e=>{let t={...bs(e),[Ho]:Ho,_tag:e.op,get[e.prop](){return this[Go]},toString(){return`${e.op}(${Oo(this[Go])})`},toJSON(){return{_id:`Exit`,_tag:e.op,[e.prop]:this[Go]}},[ro](e){return es(e)&&e._tag===this._tag&&io(this[Go],e[Go])},[za](){return Ha(Ka(e.op),Ba(this[Go]))}};return function(e){let n=Object.create(t);return n[Go]=e,n}},Cs=Ss({op:`Success`,prop:`value`,[Ko](e){let t=e.getCont(qo);return t?t[qo](this[Go],e,this):e.yieldWith(this)}}),ws={key:`effect/Cause/StackTrace`},Ts=Ss({op:`Failure`,prop:`cause`,[Ko](e){let t=this[Go],n=!1;e.currentStackFrame&&(t=hs(t,{mapUnsafe:new Map([[ws.key,e.currentStackFrame]])}),n=!0);let r=e.getCont(Jo);for(;e.interruptible&&e._interruptedCause&&r;)r=e.getCont(Jo);return r?r[Jo](t,e,n?void 0:this):e.yieldWith(n?this:Ts(t))}}),Es=e=>Ts(fs(e)),Ds=e=>Ts(ms(e)),Os=xs({op:`WithFiber`,[Ko](e){return this[Go](e)}}),ks=function(){class e extends globalThis.Error{}let t=bs({op:`YieldableError`,[Ko](){return Es(this)}});return delete t.toString,Object.assign(e.prototype,t),e}(),As=function(){let e=Symbol.for(`effect/Data/Error/plainArgs`);return class extends ks{constructor(t){super(t?.message,t?.cause?{cause:t.cause}:void 0),t&&(Object.assign(this,t),Object.defineProperty(this,e,{value:t,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}(),js=e=>{class t extends As{_tag=e}return t.prototype.name=e,t},Ms=`~effect/Cause/NoSuchElementError`,Ns=class extends js(`NoSuchElementError`){[Ms]=Ms;constructor(e){super({message:e})}},Ps=`~effect/Cause/Done`,Fs=e=>Ia(e,Ps),Is={[Ps]:Ps,_tag:`Done`,value:void 0},Ls=e=>e===void 0?Is:{[Ps]:Ps,_tag:`Done`,value:e},Rs=Es(Is),zs=e=>e===void 0?Rs:Es(Ls(e)),Bs=e=>bs({op:e.label,[Ko]:e.evaluate}),Vs=Object.getOwnPropertyDescriptor,Hs=Object.prototype.hasOwnProperty,Us=Object.isExtensible,Ws=(()=>{let e=Vs(Error,`stackTraceLimit`);return e===void 0?Us(Error):Hs.call(e,`writable`)?e.writable===!0:e.set!==void 0})(),Gs=()=>Error.stackTraceLimit,Ks=e=>{Ws&&(Error.stackTraceLimit=e)},qs=e=>(t,n)=>t===n||e(t,n),Js=(e,t)=>e===t,Ys=()=>Js;function Xs(e){return qs((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e[r](t[r],n[r]))return!1;return!0})}function Zs(e){return qs((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0})}var Qs=`~effect/data/Option`,$s={[Qs]:{_A:e=>e},...Zo,[Symbol.iterator](){return new zo(this)}},ec=Object.defineProperty(Object.assign(Object.create($s),{_tag:`Some`,_op:`Some`,[ro](e){return rc(e)&&ac(e)&&io(this.value,e.value)},[za](){return Ha(Ba(this._tag))(Ba(this.value))},toString(){return`some(${Oo(this.value)})`},toJSON(){return{_id:`Option`,_tag:this._tag,value:Io(this.value)}}}),"valueOrUndefined",{get(){return this.value}}),tc=Ba(`None`),nc=Object.assign(Object.create($s),{_tag:`None`,_op:`None`,valueOrUndefined:void 0,[ro](e){return rc(e)&&ic(e)},[za](){return tc},toString(){return`none()`},toJSON(){return{_id:`Option`,_tag:this._tag}}}),rc=e=>Ia(e,Qs),ic=e=>e._tag===`None`,ac=e=>e._tag===`Some`,oc=Object.create(nc),sc=e=>{let t=Object.create(ec);return t.value=e,t},cc=`~effect/data/Result`,lc={[cc]:{_A:e=>e,_E:e=>e},...Zo,[Symbol.iterator](){return new zo(this)}},uc=Object.assign(Object.create(lc),{_tag:`Success`,_op:`Success`,[ro](e){return fc(e)&&mc(e)&&io(this.success,e.success)},[za](){return Ha(Ba(this._tag))(Ba(this.success))},toString(){return`success(${Oo(this.success)})`},toJSON(){return{_id:`Result`,_tag:this._tag,value:Io(this.success)}}}),dc=Object.assign(Object.create(lc),{_tag:`Failure`,_op:`Failure`,[ro](e){return fc(e)&&pc(e)&&io(this.failure,e.failure)},[za](){return Ha(Ba(this._tag))(Ba(this.failure))},toString(){return`failure(${Oo(this.failure)})`},toJSON(){return{_id:`Result`,_tag:this._tag,failure:Io(this.failure)}}}),fc=e=>Ia(e,cc),pc=e=>e._tag===`Failure`,mc=e=>e._tag===`Success`,hc=e=>{let t=Object.create(dc);return t.failure=e,t},gc=e=>{let t=Object.create(uc);return t.success=e,t};function _c(e){return(t,n)=>t===n?0:e(t,n)}var vc=_c((e,t)=>globalThis.Number.isNaN(e)&&globalThis.Number.isNaN(t)?0:globalThis.Number.isNaN(e)?-1:globalThis.Number.isNaN(t)?1:e<t?-1:1),yc=z(2,(e,t)=>_c((n,r)=>e(t(n),t(r)))),bc=yc(vc,e=>e.getTime()),xc=e=>z(2,(t,n)=>e(t,n)===-1),Sc=e=>z(2,(t,n)=>e(t,n)===1),Cc=e=>z(2,(t,n)=>e(t,n)!==1),wc=e=>z(2,(t,n)=>e(t,n)!==-1),Tc=()=>oc,B=sc,Ec=rc,Dc=ic,Oc=ac,kc=z(2,(e,{onNone:t,onSome:n})=>Dc(e)?t():n(e.value)),Ac=z(2,(e,t)=>Dc(e)?t():e.value),jc=z(2,(e,t)=>Dc(e)?t():e),Mc=e=>e==null?Tc():B(e),Nc=Ac(ga),Pc=Ac(_a),Fc=z(2,(e,t)=>{if(Oc(e))return e.value;throw t()}),Ic=z(2,(e,t)=>Dc(e)?Tc():B(t(e.value))),Lc=z(2,(e,t)=>Dc(e)?Tc():t(e.value)),Rc=z(2,(e,t)=>Dc(e)?Tc():Mc(t(e.value))),zc=z(2,(e,t)=>Dc(e)?Tc():t(e.value)?B(e.value):Tc()),Bc=e=>qs((t,n)=>Dc(t)?Dc(n):!Dc(n)&&e(t.value,n.value)),Vc=`~effect/Context/Service`,Hc=function(){let e=Gs();Ks(2);let t=Error();Ks(e);function n(){}let r=n;return Object.setPrototypeOf(r,Uc),Object.defineProperty(r,"stack",{get(){return t.stack}}),arguments.length>0?(r.key=arguments[0],arguments[1]?.defaultValue&&(r[Wc]=Wc,r.defaultValue=arguments[1].defaultValue),r):function(e,t){return r.key=e,t?.make&&(r.make=t.make),r}},Uc={[Vc]:Vc,...Bs({label:`Service`,evaluate(e){return Cs(tl(e.context,this))}}),toJSON(){return{_id:`Service`,key:this.key,stack:this.stack}},of(e){return e},context(e){return Zc(this,e)},use(e){return Os(t=>e(tl(t.context,this)))},useSync(e){return Os(t=>Cs(e(tl(t.context,this))))}},Wc=`~effect/Context/Reference`,Gc=`~effect/Context`,Kc=e=>{let t=Object.create(qc);return t.mapUnsafe=e,t.mutable=!1,t},qc={...Zo,[Gc]:{_Services:e=>e},toJSON(){return{_id:`Context`,services:Array.from(this.mapUnsafe).map(([e,t])=>({key:e,value:t}))}},[ro](e){if(!Jc(e)||this.mapUnsafe.size!==e.mapUnsafe.size)return!1;for(let t of this.mapUnsafe.keys())if(!e.mapUnsafe.has(t)||!io(this.mapUnsafe.get(t),e.mapUnsafe.get(t)))return!1;return!0},[za](){return Ga(this.mapUnsafe.size)}},Jc=e=>Ia(e,Gc),Yc=()=>Xc,Xc=Kc(new Map),Zc=(e,t)=>Kc(new Map([[e.key,t]])),Qc=z(3,(e,t,n)=>cl(e,e=>{e.set(t.key,n)})),$c=z(2,(e,t)=>e.mapUnsafe.get(t.key)),el=z(2,(e,t)=>{if(!e.mapUnsafe.has(t.key)){if(Wc in t)return il(t);throw al(t)}return e.mapUnsafe.get(t.key)}),tl=el,nl=(e,t)=>e.mapUnsafe.has(t.key)?e.mapUnsafe.get(t.key):il(t),rl=`~effect/Context/defaultValue`,il=e=>rl in e?e[rl]:e[rl]=e.defaultValue(),al=e=>{let t=Error(`Service not found${e.key?`: ${String(e.key)}`:``}`);if(e.stack){let n=e.stack.split(`
|
|
12
|
+
`);if(n.length>2){let e=n[2].match(/at (.*)/);e&&(t.message+=` (defined at ${e[1]})`)}}if(t.stack){let e=t.stack.split(`
|
|
13
|
+
`);e.splice(1,3),t.stack=e.join(`
|
|
14
|
+
`)}return t},ol=z(2,(e,t)=>e.mapUnsafe.size===0?t:t.mapUnsafe.size===0?e:cl(e,e=>{t.mapUnsafe.forEach((t,n)=>e.set(n,t))})),sl=(...e)=>{let t=new Map;for(let n=0;n<e.length;n++)e[n].mapUnsafe.forEach((e,n)=>{t.set(n,e)});return Kc(t)},cl=(e,t)=>{if(e.mutable)return t(e.mapUnsafe),e;let n=new Map(e.mapUnsafe);return t(n),Kc(n)},ll=Hc,ul=e=>e.length>0,dl=gc,fl=hc,pl=e=>{if(ka(e))try{return dl(e())}catch(e){return fl(e)}else try{return dl(e.try())}catch(t){return fl(e.catch(t))}},ml=fc,hl=pc,gl=mc,_l=z(2,(e,{onFailure:t,onSuccess:n})=>hl(e)?t(e.failure):n(e.success)),vl=Xs,yl=z(2,(e,t)=>Object.hasOwn(e,t)),bl=z(2,(e,t)=>{let n={...e};for(let r of xl(e))n[r]=t(e[r],r);return n}),xl=e=>Object.keys(e),Sl=e=>z(2,(t,n)=>{for(let r of xl(t))if(!yl(n,r)||!e(t[r],n[r]))return!1;return!0}),Cl=e=>{let t=Sl(e);return(e,n)=>t(e,n)&&t(n,e)},wl=globalThis.Array,Tl=e=>wl.isArray(e)?e:wl.from(e),El=e=>wl.isArray(e)?e:[e],Dl=z(2,(e,t)=>[...e,t]),Ol=z(2,(e,t)=>Tl(e).concat(Tl(t)));wl.isArray;var kl=ul,Al=ul;function jl(e,t){return e<0||e>=t.length}var Ml=z(2,(e,t)=>{let n=Math.floor(t);if(jl(n,e))throw Error(`Index out of bounds: ${n}`);return e[n]})(0),Nl=e=>e[e.length-1],Pl=e=>e.slice(1),Fl=z(3,(e,t,n)=>{let r=Tl(e),i=Tl(t);return Al(r)?Al(i)?Vl(n)(Ol(r,i)):r:i}),Il=z(2,(e,t)=>Fl(e,t,xo())),Ll=()=>[],Rl=e=>[e],zl=z(2,(e,t)=>e.map(t)),Bl=Zs,Vl=z(2,(e,t)=>{let n=Tl(e);if(Al(n)){let e=[Ml(n)],r=Pl(n);for(let n of r)e.every(e=>!t(n,e))&&e.push(n);return e}return[]}),Hl=`~effect/time/Duration`,Ul=BigInt(0),Wl=BigInt(1),Gl=BigInt(1e3),Kl=e=>BigInt(e<0?Math.ceil(e-.5):Math.floor(e+.5)),ql=e=>Kl(e*1e6),Jl=(e,t)=>e.includes(`.`)?Kl(Number(e)*Number(t)):BigInt(e)*t,Yl=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,Xl=e=>{switch(typeof e){case`number`:return lu(e);case`bigint`:return cu(e);case`string`:{if(e===`Infinity`)return ou;if(e===`-Infinity`)return su;let t=Yl.exec(e);if(!t)break;let[n,r,i]=t;if(i===`nano`||i===`nanos`)return cu(Jl(r,Wl));if(i===`micro`||i===`micros`)return cu(Jl(r,Gl));let a=Number(r);switch(i){case`milli`:case`millis`:return lu(a);case`second`:case`seconds`:return uu(a);case`minute`:case`minutes`:return du(a);case`hour`:case`hours`:return fu(a);case`day`:case`days`:return pu(a);case`week`:case`weeks`:return mu(a)}break}case`object`:{if(e===null)break;if(Hl in e)return e;if(Array.isArray(e))return e.length!==2||!e.every(Ta)?Zl(e):Number.isNaN(e[0])||Number.isNaN(e[1])?au:e[0]===-1/0||e[1]===-1/0?su:e[0]===1/0||e[1]===1/0?ou:nu(Kl(e[0]*1e9+e[1]));let t=e,n=0;return t.weeks&&(n+=t.weeks*6048e5),t.days&&(n+=t.days*864e5),t.hours&&(n+=t.hours*36e5),t.minutes&&(n+=t.minutes*6e4),t.seconds&&(n+=t.seconds*1e3),t.milliseconds&&(n+=t.milliseconds),!t.microseconds&&!t.nanoseconds?nu(n):nu(Kl(n*1e6+(t.microseconds??0)*1e3+(t.nanoseconds??0)))}}return Zl(e)},Zl=e=>{throw Error(`Invalid Input: ${e}`)},Ql={_tag:`Millis`,millis:0},$l={_tag:`Infinity`},eu={_tag:`NegativeInfinity`},tu={[Hl]:Hl,[za](){return Ja(this.value)},[ro](e){return ru(e)&&xu(this,e)},toString(){switch(this.value._tag){case`Infinity`:return`Infinity`;case`NegativeInfinity`:return`-Infinity`;case`Nanos`:return`${this.value.nanos} nanos`;case`Millis`:return`${this.value.millis} millis`}},toJSON(){switch(this.value._tag){case`Millis`:return{_id:`Duration`,_tag:`Millis`,millis:this.value.millis};case`Nanos`:return{_id:`Duration`,_tag:`Nanos`,nanos:String(this.value.nanos)};case`Infinity`:return{_id:`Duration`,_tag:`Infinity`};case`NegativeInfinity`:return{_id:`Duration`,_tag:`NegativeInfinity`}}},[Fo](){return this.toJSON()},pipe(){return la(this,arguments)}},nu=e=>{let t=Object.create(tu);return typeof e==`number`?isNaN(e)||e===0||Object.is(e,-0)?t.value=Ql:Number.isFinite(e)?Number.isInteger(e)?t.value={_tag:`Millis`,millis:e}:t.value={_tag:`Nanos`,nanos:ql(e)}:t.value=e>0?$l:eu:e===Ul?t.value=Ql:t.value={_tag:`Nanos`,nanos:e},t},ru=e=>Ia(e,Hl),iu=e=>e.value._tag!==`Infinity`&&e.value._tag!==`NegativeInfinity`,au=nu(0),ou=nu(1/0),su=nu(-1/0),cu=e=>nu(e),lu=e=>nu(e),uu=e=>nu(e*1e3),du=e=>nu(e*6e4),fu=e=>nu(e*36e5),pu=e=>nu(e*864e5),mu=e=>nu(e*6048e5),hu=e=>vu(Xl(e),{onMillis:fa,onNanos:e=>Number(e)/1e6,onInfinity:()=>1/0,onNegativeInfinity:()=>-1/0}),gu=e=>vu(Xl(e),{onMillis:e=>e/36e5,onNanos:e=>Number(e)/36e11,onInfinity:()=>1/0,onNegativeInfinity:()=>-1/0}),_u=e=>{let t=Xl(e);switch(t.value._tag){case`Infinity`:case`NegativeInfinity`:throw Error(`Cannot convert infinite duration to nanos`);case`Nanos`:return t.value.nanos;case`Millis`:return ql(t.value.millis)}},vu=z(2,(e,t)=>{switch(e.value._tag){case`Millis`:return t.onMillis(e.value.millis);case`Nanos`:return t.onNanos(e.value.nanos);case`Infinity`:return t.onInfinity();case`NegativeInfinity`:return(t.onNegativeInfinity??t.onInfinity)()}}),yu=z(3,(e,t,n)=>e.value._tag===`Infinity`||e.value._tag===`NegativeInfinity`||t.value._tag===`Infinity`||t.value._tag===`NegativeInfinity`?n.onInfinity(e,t):e.value._tag===`Millis`?t.value._tag===`Millis`?n.onMillis(e.value.millis,t.value.millis):n.onNanos(_u(e),t.value.nanos):n.onNanos(e.value.nanos,_u(t))),bu=(e,t)=>yu(e,t,{onMillis:(e,t)=>e===t,onNanos:(e,t)=>e===t,onInfinity:(e,t)=>e.value._tag===t.value._tag}),xu=z(2,(e,t)=>bu(e,t)),Su=z(2,(e,t)=>n=>{let r=e(n);if(hl(r))return fl(n);let i=t(r.success);return hl(i)?fl(n):i}),Cu=e=>t=>{let n=e(t);return hl(n)?Tc():B(n.success)},wu=ll(`effect/Scheduler`,{defaultValue:()=>new Du}),Tu=`setImmediate`in globalThis?e=>{let t=globalThis.setImmediate(e);return()=>globalThis.clearImmediate(t)}:e=>{let t=setTimeout(e,0);return()=>clearTimeout(t)},Eu=class{buckets=[];scheduleTask(e,t){let n=this.buckets,r=n.length,i,a=0;for(;a<r&&!(n[a][0]>t);a++)i=n[a];i&&i[0]===t?i[1].push(e):a===r?n.push([t,[e]]):n.splice(a,0,[t,[e]])}drain(){let e=this.buckets;return this.buckets=[],e}},Du=class{executionMode;setImmediate;constructor(e=`async`,t=Tu){this.executionMode=e,this.setImmediate=t}shouldYield(e){return e.currentOpCount>=e.maxOpsBeforeYield}makeDispatcher(){return new Ou(this.setImmediate)}},Ou=class{tasks=new Eu;running=void 0;setImmediate;constructor(e=Tu){this.setImmediate=e}scheduleTask(e,t){this.tasks.scheduleTask(e,t),this.running===void 0&&(this.running=this.setImmediate(this.afterScheduled))}afterScheduled=()=>{this.running=void 0,this.runTasks()};runTasks(){let e=this.tasks.drain();for(let t=0;t<e.length;t++){let n=e[t][1];for(let e=0;e<n.length;e++)n[e]()}}flush(){for(;this.tasks.buckets.length>0;)this.running!==void 0&&(this.running(),this.running=void 0),this.runTasks()}},ku=ll(`effect/Scheduler/MaxOpsBeforeYield`,{defaultValue:()=>2048}),Au=ll(`effect/Scheduler/PreventSchedulerYield`,{defaultValue:()=>!1}),ju=`effect/Tracer/ParentSpan`,Mu=class extends Hc()(ju){},Nu=e=>e,Pu=ll(`effect/Tracer/DisablePropagation`,{defaultValue:ha}),Fu=ll(`effect/Tracer/CurrentTraceLevel`,{defaultValue:()=>`Info`}),Iu=ll(`effect/Tracer/MinimumTraceLevel`,{defaultValue:()=>`All`}),Lu=`effect/Tracer`,Ru=ll(Lu,{defaultValue:()=>Nu({span:e=>new zu(e)})}),zu=class{_tag=`Span`;spanId;traceId=`native`;sampled;name;parent;annotations;links;startTime;kind;status;attributes;events=[];constructor(e){this.name=e.name,this.parent=e.parent,this.annotations=e.annotations,this.links=e.links,this.startTime=e.startTime,this.kind=e.kind,this.sampled=e.sampled,this.status={_tag:`Started`,startTime:e.startTime},this.attributes=new Map,this.traceId=Pc(e.parent)?.traceId??Bu(32),this.spanId=Bu(16)}end(e,t){this.status={_tag:`Ended`,endTime:e,exit:t,startTime:this.status.startTime}}attribute(e,t){this.attributes.set(e,t)}event(e,t,n){this.events.push([e,t,n??{}])}addLinks(e){this.links.push(...e)}},Bu=function(){return function(e){let t=``;for(let n=0;n<e;n++)t+=`abcdef0123456789`.charAt(Math.floor(Math.random()*16));return t}}(),Vu=`effect/observability/Metric/FiberRuntimeMetricsKey`,Hu=ll(`effect/References/CurrentConcurrency`,{defaultValue:()=>`unbounded`}),Uu=ll(`effect/References/CurrentStackFrame`,{defaultValue:_a}),Wu=ll(`effect/References/TracerEnabled`,{defaultValue:ma}),Gu=ll(`effect/References/TracerTimingEnabled`,{defaultValue:ma}),Ku=ll(`effect/References/TracerSpanAnnotations`,{defaultValue:()=>({})}),qu=ll(`effect/References/TracerSpanLinks`,{defaultValue:()=>[]}),Ju=ll(`effect/References/CurrentLogLevel`,{defaultValue:()=>`Info`}),Yu=ll(`effect/References/MinimumLogLevel`,{defaultValue:()=>`Info`}),Xu=e=>{if(e?.captureStackTrace===!1||e?.captureStackTrace!==void 0&&typeof e.captureStackTrace!=`boolean`)return e;let t=Gs();Ks(3);let n=Error();return Ks(t),{...e,captureStackTrace:Zu(()=>n.stack)}},Zu=(e=>t=>{let n;return()=>{if(n!==void 0)return n;let r=t();if(!r)return;let i=r.split(`
|
|
15
|
+
`);if(i[e]!==void 0)return n=i[e].trim(),n}})(3),Qu=class extends ss{fiberId;constructor(e,t=cs){super(`Interrupt`,t,`Interrupted`),this.fiberId=e}toString(){return`Interrupt(${this.fiberId})`}toJSON(){return{_tag:`Interrupt`,fiberId:this.fiberId}}[ro](e){return vs(e)&&this.fiberId===e.fiberId&&this.annotations===e.annotations}[za](){return Ha(Ka(`${this._tag}:${this.fiberId}`))(Va(this.annotations))}},$u=e=>new Qu(e),ed=e=>new as([new Qu(e)]),td=e=>{for(let t=0;t<e.reasons.length;t++){let n=e.reasons[t];if(n._tag===`Fail`)return dl(n.error)}return fl(e)},nd=Cu(td),rd=e=>{let t=e.reasons.find(_s);return t?dl(t.defect):fl(e)},id=e=>e.reasons.some(vs),ad=e=>{let t;for(let n=0;n<e.reasons.length;n++){let r=e.reasons[n];r._tag===`Interrupt`&&(t??=new Set,r.fiberId!==void 0&&t.add(r.fiberId))}return t?dl(t):fl(e)},od=z(2,(e,t)=>{if(e.reasons.length===0)return t;if(t.reasons.length===0)return e;let n=new as(Il(e.reasons,t.reasons));return io(e,n)?e:n}),sd=z(2,(e,t)=>{let n=!1,r=e.reasons.map(e=>gs(e)?(n=!0,new ls(t(e.error))):e);return n?us(r):e}),cd=e=>{let t={Fail:[],Die:[],Interrupt:[]};for(let n=0;n<e.reasons.length;n++)t[e.reasons[n]._tag].push(e.reasons[n]);return t},ld=e=>{let t=cd(e);return t.Fail.length>0?t.Fail[0].error:t.Die.length>0?t.Die[0].defect:t.Interrupt.length>0?new globalThis.Error(`All fibers interrupted without error`):new globalThis.Error(`Empty cause`)},ud=`~effect/Fiber/dev`,dd={_A:fa,_E:fa},fd={id:0},pd=()=>globalThis[Eo],md=class{constructor(e,t=!0){this[ud]=dd,this.setContext(e),this.id=++fd.id,this.currentOpCount=0,this.currentLoopCount=0,this.interruptible=t,this._stack=[],this._observers=[],this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0,this.runtimeMetrics?.recordFiberStart(this.context)}[ud];id;interruptible;currentOpCount;currentLoopCount;_stack;_observers;_exit;_currentExit;_children;_interruptedCause;_yielded;context;currentScheduler;currentTracerContext;currentSpan;currentLogLevel;minimumLogLevel;currentStackFrame;runtimeMetrics;maxOpsBeforeYield;currentPreventYield;_dispatcher=void 0;get currentDispatcher(){return this._dispatcher??=this.currentScheduler.makeDispatcher()}getRef(e){return nl(this.context,e)}addObserver(e){return this._exit?(e(this._exit),va):(this._observers.push(e),()=>{let t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)})}interruptUnsafe(e,t){if(this._exit)return;let n=ed(e);this.currentStackFrame&&(n=hs(n,Zc(ws,this.currentStackFrame))),t&&(n=hs(n,t)),this._interruptedCause=this._interruptedCause?od(this._interruptedCause,n):n,this.interruptible&&this.evaluate(Td(this._interruptedCause))}pollUnsafe(){return this._exit}evaluate(e){if(this._exit)return;if(this._yielded!==void 0){let e=this._yielded;this._yielded=void 0,e()}let t=this.runLoop(e);if(t===Xo)return;let n=hd.interruptChildren&&hd.interruptChildren(this);if(n!==void 0)return this.evaluate(nf(n,()=>t));this._exit=t,this.runtimeMetrics?.recordFiberEnd(this.context,this._exit);for(let e=0;e<this._observers.length;e++)this._observers[e](t);this._observers.length=0}runLoop(e){let t=globalThis[Eo];globalThis[Eo]=this;let n=!1,r=e;this.currentOpCount=0;let i=++this.currentLoopCount;try{for(;;){if(this.currentOpCount++,!n&&!this.currentPreventYield&&this.currentScheduler.shouldYield(this)){n=!0;let e=r;r=nf(Ad,()=>e)}if(r=this.currentTracerContext?this.currentTracerContext(r,this):r[Ko](this),i!==this.currentLoopCount)return Xo;if(r===Xo){let e=this._yielded;return Ho in e?(this._yielded=void 0,e):Xo}}}catch(e){return Ia(r,Ko)?this.runLoop(Ds(e)):Ds(`Fiber.runLoop: Not a valid effect: ${String(r)}`)}finally{globalThis[Eo]=t}}getCont(e){for(;;){let t=this._stack.pop();if(!t)return;let n=t[Yo]&&t[Yo](this);if(n)return n[e]=n,n;if(t[e])return t}}yieldWith(e){return this._yielded=e,Xo}children(){return this._children??=new Set}pipe(){return la(this,arguments)}setContext(e){this.context=e;let t=this.getRef(wu);t!==this.currentScheduler&&(this.currentScheduler=t,this._dispatcher=void 0),this.currentSpan=e.mapUnsafe.get(ju),this.currentLogLevel=this.getRef(Ju),this.minimumLogLevel=this.getRef(Yu),this.currentStackFrame=e.mapUnsafe.get(Uu.key),this.maxOpsBeforeYield=this.getRef(ku),this.currentPreventYield=this.getRef(Au),this.runtimeMetrics=e.mapUnsafe.get(Vu);let n=e.mapUnsafe.get(Lu);this.currentTracerContext=n?n.context:void 0}get currentSpanLocal(){return this.currentSpan?._tag===`Span`?this.currentSpan:void 0}},hd={interruptChildren:void 0},gd=e=>{if(!e.currentStackFrame)return;let t=new Map;return t.set(ws.key,e.currentStackFrame),Kc(t)},_d=e=>{let t=e;return t._exit?wd(t._exit):Ud(n=>t._exit?n(wd(t._exit)):Dd(e.addObserver(e=>n(wd(e)))))},vd=e=>Ud(t=>{let n=e[Symbol.iterator](),r=[],i;function a(){let e=n.next();for(;!e.done;){if(e.value._exit){r.push(e.value._exit),e=n.next();continue}i=e.value.addObserver(e=>{r.push(e),a()});return}t(wd(r))}return a(),Dd(()=>i?.())}),yd=e=>{let t=e;return t._exit?t._exit:Ud(n=>t._exit?n(t._exit):Dd(e.addObserver(n)))},bd=e=>Ud(t=>{let n=Array.from(e);if(n.length===0)return t(wd(Ll()));let r=Array(n.length),i=Ll(),a=0,o=!1;for(let e=0;e<n.length&&!o;e++)i.push(n[e].addObserver(s=>{if(a++,s._tag===`Failure`)return o=!0,i.forEach(e=>e()),t(s);r[e]=s.value,a===n.length&&t(wd(r))}))}),xd=e=>Os(t=>Sd(e,t.id)),Sd=z(e=>Ia(e[0],ud),(e,t,n)=>Os(r=>{let i=gd(r);return i=i&&n?ol(i,n):i??n,e.interruptUnsafe(t,i),tf(_d(e))})),Cd=e=>Os(t=>{let n=gd(t);for(let r of e)r.interruptUnsafe(t.id,n);return tf(vd(e))}),wd=Cs,Td=Ts,Ed=Es,Dd=xs({op:`Sync`,[Ko](e){let t=this[Go](),n=e.getCont(qo);return n?n[qo](t,e):e.yieldWith(Cs(t))}}),Od=xs({op:`Suspend`,[Ko](e){return this[Go]()}}),kd=_l({onFailure:Ed,onSuccess:wd}),Ad=xs({op:`Yield`,[Ko](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(hf)},this[Go]??0),e.yieldWith(()=>{t=!0})}})(0),jd=e=>wd(B(e)),Md=wd(Tc()),Nd=e=>Od(()=>Td(Bo(e))),Pd=e=>Ds(e),Fd=e=>Od(()=>Ed(Bo(e))),Id=wd(void 0),Ld=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new sm(e,`An error occurred in Effect.try`):e.catch;return Od(()=>{try{return wd(Bo(t))}catch(e){return Ed(Bo(()=>n(e)))}})},Rd=e=>Vd(function(t,n){Bo(()=>e(n)).then(e=>t(wd(e)),e=>t(Pd(e)))},e.length!==0),zd=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new sm(e,`An error occurred in Effect.tryPromise`):e.catch;return Vd(function(e,r){let i=t=>{try{e(Ed(Bo(()=>n(t))))}catch(t){e(Pd(t))}};try{Bo(()=>t(r)).then(t=>e(wd(t)),i)}catch(e){i(e)}},t.length!==0)},Bd=e=>Os(t=>e(t.id)),Vd=xs({op:`Async`,single:!1,[Ko](e){let t=Bo(()=>this[Go][0].bind(e.currentScheduler)),n=!1,r=!1,i=this[Go][1]?new AbortController:void 0,a=t(t=>{n||(n=!0,r?e.evaluate(t):r=t)},i?.signal);return r===!1?(r=!0,e._yielded=()=>{n=!0},i===void 0&&a===void 0||e._stack.push(Hd(()=>(n=!0,i?.abort(),a??hf))),Xo):r}}),Hd=xs({op:`AsyncFinalizer`,[Yo](e){e.interruptible&&(e.interruptible=!1,e._stack.push(gp))},[Jo](e,t){return id(e)?nf(this[Go](),()=>Td(e)):Td(e)}}),Ud=e=>Vd(e,e.length>=2),Wd=Ud(va),Gd=(...e)=>Od(()=>Xd(e.length===1?e[0]():e[1].call(e[0].self))),Kd=(e,...t)=>{let n=t.length===0?function(){return Od(()=>Xd(e.apply(this,arguments)))}:function(){let n=Od(()=>Xd(e.apply(this,arguments)));for(let e=0;e<t.length;e++)n=t[e](n,...arguments);return n};return qd(e.length,n)},qd=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),Jd=(e,...t)=>qd(e.length,t.length===0?function(){return Yd(()=>e.apply(this,arguments))}:function(){let n=Yd(()=>e.apply(this,arguments));for(let e of t)n=e(n);return n}),Yd=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return wd(r.value);let i=r.value;if(i&&i._tag===`Success`){n=i.value;continue}else if(i&&i._tag===`Failure`)return r.value;else{let n=!0;return Od(()=>n?(n=!1,nf(r.value,e=>Xd(t,e))):Od(()=>Xd(e())))}}}catch(e){return Pd(e)}},Xd=xs({op:`Iterator`,single:!1,[qo](e,t){let n=this[Go][0];for(;;){let r=n.next(e);if(r.done)return wd(r.value);if(!af(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[Ko](e){return this[qo](this[Go][1],e)}}),Zd=z(2,(e,t)=>{let n=wd(t);return nf(e,e=>n)}),Qd=e=>cf(e,B),$d=z(2,(e,t)=>nf(e,e=>$o(t)?t:Bo(()=>t(e)))),ef=z(2,(e,t)=>nf(e,e=>Zd($o(t)?t:Bo(()=>t(e)),e))),tf=e=>nf(e,e=>hf),nf=z(2,(e,t)=>{let n=Object.create(rf);return n[Go]=e,n[qo]=t.length===1?t:e=>t(e),n}),rf=bs({op:`OnSuccess`,[Ko](e){return e._stack.push(this),this[Go]}}),af=e=>Ho in e,of=z(2,(e,t)=>af(e)?e._tag===`Success`?t(e.value):e:nf(e,t)),sf=e=>nf(e,fa),cf=z(2,(e,t)=>nf(e,e=>wd(Bo(()=>t(e))))),lf=z(2,(e,t)=>af(e)?gf(e,t):cf(e,t)),uf=z(2,(e,t)=>af(e)?_f(e,t):Ff(e,t)),df=z(2,(e,t)=>af(e)?vf(e,t):If(e,t)),ff=e=>Ts(ed(e)),pf=e=>e._tag===`Success`,mf=e=>e._tag===`Failure`?dl(e.cause):fl(e),hf=Cs(void 0),gf=z(2,(e,t)=>e._tag===`Success`?Cs(t(e.value)):e),_f=z(2,(e,t)=>{if(e._tag===`Success`)return e;let n=td(e.cause);return hl(n)?e:Es(t(n.success))}),vf=z(2,(e,t)=>{if(e._tag===`Success`)return Cs(t.onSuccess(e.value));let n=td(e.cause);return hl(n)?e:Es(t.onFailure(n.success))}),yf=z(2,(e,t)=>pf(e)?t:e),bf=e=>{let t=[];for(let n of e)n._tag===`Failure`&&t.push(...n.cause.reasons);return t.length===0?hf:Ts(us(t))},xf=z(2,(e,t)=>Os(n=>{let r=n.context,i=t(r);return r===i?e:(n.setContext(i),ip(e,()=>{n.setContext(r)}))})),Sf=z(3,(e,t,n)=>xf(e,e=>{let r=el(e,t),i=n(r);return r===i?e:Qc(e,t,i)})),Cf=()=>wf,wf=Os(e=>wd(e.context)),Tf=e=>Os(t=>e(t.context)),Ef=z(2,(e,t)=>af(e)?e:xf(e,ol(t))),Df=function(){return arguments.length===1?z(2,(e,t)=>Of(e,arguments[0],t)):z(3,(e,t,n)=>Of(e,t,n)).apply(this,arguments)},Of=(e,t,n)=>xf(e,e=>e.mapUnsafe.get(t.key)===n?e:Qc(e,t,n)),kf=z(2,(e,t)=>nf(t,t=>t?Qd(e):Md)),Af=z(e=>$o(e[0]),(e,t)=>bp({while:ma,body:pa(t?.disableYield?e:nf(e,e=>Ad)),step:va})),jf=z(2,(e,t)=>{let n=Object.create(Mf);return n[Go]=e,n[Jo]=t.length===1?t:e=>t(e),n}),Mf=bs({op:`OnFailure`,[Ko](e){return e._stack.push(this),this[Go]}}),Nf=z(3,(e,t,n)=>jf(e,e=>{let r=t(e);return hl(r)?Td(r.failure):Bo(()=>n(r.success,e))})),Pf=z(2,(e,t)=>Nf(e,td,e=>t(e))),Ff=z(2,(e,t)=>Pf(e,e=>Fd(()=>t(e)))),If=z(2,(e,t)=>zf(e,{onFailure:e=>Fd(()=>t.onFailure(e)),onSuccess:e=>Dd(()=>t.onSuccess(e))})),Lf=z(2,(e,t)=>{let n=Object.create(Rf);return n[Go]=e,n[qo]=t.onSuccess.length===1?t.onSuccess:e=>t.onSuccess(e),n[Jo]=t.onFailure.length===1?t.onFailure:e=>t.onFailure(e),n}),Rf=bs({op:`OnSuccessAndFailure`,[Ko](e){return e._stack.push(this),this[Go]}}),zf=z(2,(e,t)=>Lf(e,{onFailure:e=>{let n=e.reasons.find(gs);return n?Bo(()=>t.onFailure(n.error)):Td(e)},onSuccess:t.onSuccess})),Bf=e=>af(e)?Cs(e):Vf(e),Vf=xs({op:`Exit`,[Ko](e){return e._stack.push(this),this[Go]},[qo](e,t,n){return wd(n??Cs(e))},[Jo](e,t,n){return wd(n??Ts(e))}}),Hf=`~effect/Scope`,Uf=`~effect/Scope/Closeable`,Wf=Hc(`effect/Scope`),Gf=(e,t)=>Od(()=>Kf(e,t)??Id),Kf=(e,t)=>{if(e.state._tag===`Closed`)return;let n={_tag:`Closed`,exit:t};if(e.state._tag===`Empty`){e.state=n;return}let{finalizers:r}=e.state;if(e.state=n,r.size!==0)return r.size===1?r.values().next().value(t):qf(e,r,t)},qf=Kd(function*(e,t,n){let r=[],i=[],a=Array.from(t.values()),o=pd();for(let t=a.length-1;t>=0;t--){let s=a[t];e.strategy===`sequential`?r.push(yield*Bf(s(n))):i.push(Ep(o,s(n),!0,!0,`inherit`))}return i.length>0&&(r=yield*vd(i)),yield*bf(r)}),Jf=(e,t)=>{let n=$f(t);if(e.state._tag===`Closed`)return n.state=e.state,n;let r={};return Zf(e,r,e=>Gf(n,e)),Zf(n,r,t=>Dd(()=>Qf(e,r))),n},Yf=(e,t)=>Od(()=>e.state._tag===`Closed`?t(e.state.exit):(Zf(e,{},t),Id)),Xf=(e,t)=>Yf(e,pa(t)),Zf=(e,t,n)=>{e.state._tag===`Empty`?e.state={_tag:`Open`,finalizers:new Map([[t,n]])}:e.state._tag===`Open`&&e.state.finalizers.set(t,n)},Qf=(e,t)=>{e.state._tag===`Open`&&e.state.finalizers.delete(t)},$f=(e=`sequential`)=>({[Uf]:Uf,[Hf]:Hf,strategy:e,state:ep}),ep={_tag:`Empty`},tp=Wf,np=Df(Wf),rp=e=>Od(()=>{let t=$f();return ap(e(t),e=>Od(()=>Kf(t,e)??Id))}),ip=xs({op:`OnExit`,single:!1,[Ko](e){return e._stack.push(this),this[Go][0]},[Yo](e){e.interruptible&&this[Go][2]!==!0&&(e._stack.push(gp),e.interruptible=!1)},[qo](e,t,n){n??=Cs(e);let r=this[Go][1](n);return r?nf(r,e=>n):n},[Jo](e,t,n){n??=Ts(e);let r=this[Go][1](n);return r?nf(r,e=>n):n}}),ap=z(2,ip),op=z(3,(e,t,n)=>ap(e,e=>{let r=t(e);return hl(r)?Id:n(r.success,e)})),sp=z(2,(e,t)=>op(e,mf,t)),cp=z(3,(e,t,n)=>ap(e,e=>{if(e._tag!==`Failure`)return Id;let r=t(e.cause);return hl(r)?Id:n(r.success,e.cause)})),lp=z(2,(e,t)=>cp(ad,t)(e)),up=z(2,(e,t)=>Dd(()=>{let n=hu(Xl(t)),r=Number.isFinite(n),i=Up(!1),a=0,o=!1,s,c=nf(i.await,()=>s);return[Os(t=>{let l=t.getRef($p),u=r?l.currentTimeMillisUnsafe():0;return o||u<a?s??c:(o=!0,i.closeUnsafe(),s=void 0,ap(e,e=>Dd(()=>{o=!1,a=l.currentTimeMillisUnsafe()+n,s=e,i.openUnsafe()})))}),Dd(()=>{a=0,i.closeUnsafe(),s=void 0})]})),dp=z(2,(e,t)=>cf(up(e,t),e=>e[0])),fp=e=>dp(e,ou),pp=Os(e=>Td(ed(e.id))),mp=e=>Os(t=>t.interruptible?(t.interruptible=!1,t._stack.push(gp),e):e),hp=xs({op:`SetInterruptible`,[Yo](e){if(e.interruptible=this[Go],e._interruptedCause&&e.interruptible)return()=>Td(e._interruptedCause)}}),gp=hp(!0),_p=hp(!1),vp=e=>Os(t=>t.interruptible?e:(t.interruptible=!0,t._stack.push(_p),t._interruptedCause?Td(t._interruptedCause):e)),yp=e=>Os(t=>t.interruptible?(t.interruptible=!1,t._stack.push(gp),e(vp)):e(fa)),bp=xs({op:`While`,[qo](e,t){return this[Go].step(e),this[Go].while()?(t._stack.push(this),this[Go].body()):hf},[Ko](e){return this[Go].while()?(e._stack.push(this),this[Go].body()):hf}}),xp=z(e=>typeof e[1]==`function`,(e,t,n)=>Os(r=>{let i=n?.concurrency===`inherit`?r.getRef(Hu):n?.concurrency??1,a=i===`unbounded`?1/0:Math.max(1,i);if(a===1)return Sp(e,t,n);let o=Tl(e),s=o.length;if(s===0)return n?.discard?Id:wd([]);let c=n?.discard?void 0:Array(s),l=Tp({f:t,out:c},o,{concurrency:a});return l?Zd(l,c):wd(c)})),Sp=(e,t,n)=>Od(()=>{let r=n?.discard?void 0:[],i=e[Symbol.iterator](),a=i.next(),o=0;return Zd(bp({while:()=>!a.done,body:()=>t(a.value,o++),step:e=>{r&&r.push(e),a=i.next()}}),r)}),Cp=e=>{let t=e.onItem,n=e.step;return(e,r,i)=>{let a=i?.start??0,o=i?.end??r.length,s=i?.concurrency??1,c=i?.orderedStep===!0&&s>1,l=!1,u,d,f,p=!1,m,h,g=a,_=c?Array(o):void 0,v=(t,i,a)=>{if(!c)return n(e,t,i,a);if(m)return m;for(_[a]=i;g<o;){let t=_[g];if(t===void 0)return;_[g]=void 0;let i=g++,a=n(e,r[i],t,i);if(a)return a}},y=()=>{let n=!1;for(;!m&&a<o;a++){let i=r[a],o=h??t(e,i,a);if(af(o)){if(m=v(i,o,a),m)break}else if(s===1)return nf(Bf(o),e=>(m=v(i,e,a),a++,m??y()??Id));else if(u){h=void 0;let e=Ep(u,o,!0,!0,`inherit`);if(e._exit){if(m=v(i,e._exit,a),m)break;continue}d?d.add(e):d=new Set([e]);let t=a;if(e.addObserver(r=>{if(d.delete(e),m){if(!p&&r._tag===`Failure`)for(let e of r.cause.reasons)if(e._tag===`Interrupt`)continue;else m._tag===`Failure`?m.cause.reasons.push(e):m=Ts(us([e]))}else{let e=v(i,r,t);e&&(m=e._tag===`Failure`?Ts(us(e.cause.reasons.slice())):e,y())}if(n){let e=y();e&&f(e)}else l&&d.size===0&&f(m??Id)}),d.size<s)continue;n=!0,a++;return}else return Ud(e=>{u=pd(),h=o,f=e;let t=y();return t?e(t):Od(()=>(m=hf,p=!0,d?Cd(d):Id))})}if(l=!0,m){if(d&&d.size>0){let e=gd(u);d.forEach(t=>t.interruptUnsafe(u.id,e));return}if(f||m._tag===`Failure`)return m}else if(f)if(d)d.size===0&&f(Id);else return hf};return y()}},wp=()=>Cp,Tp=Cp({onItem(e,t,n){return e.f(t,n)},step(e,t,n,r){if(n._tag===`Failure`)return n;e.out&&(e.out[r]=n.value)}}),Ep=(e,t,n=!1,r=!1,i=!1)=>{let a=i===`inherit`?e.interruptible:!i,o=new md(e.context,a);return n?o.evaluate(t):e.currentDispatcher.scheduleTask(()=>o.evaluate(t),0),!r&&!o._exit&&(e.children().add(o),o.addObserver(()=>e._children.delete(o))),o},Dp=z(e=>$o(e[0]),(e,t)=>Os(n=>wd(Ep(n,e,t?.startImmediately,!0,t?.uninterruptible)))),Op=z(e=>$o(e[0]),(e,t,n)=>Os(r=>{let i=Ep(r,e,n?.startImmediately,!0,n?.uninterruptible);if(!i._exit)if(t.state._tag!==`Closed`){let e={};Zf(t,e,()=>Bd(e=>e===i.id?Id:xd(i))),i.addObserver(()=>Qf(t,e))}else i.interruptUnsafe(r.id,gd(r));return wd(i)})),kp=e=>(t,n)=>{let r=new md(n?.scheduler?Qc(e,wu,n.scheduler):e,n?.uninterruptible!==!0);if(r.evaluate(t),r._exit)return r;if(n?.signal)if(n.signal.aborted)r.interruptUnsafe();else{let e=()=>r.interruptUnsafe();n.signal.addEventListener(`abort`,e,{once:!0}),r.addObserver(()=>n.signal.removeEventListener(`abort`,e))}return n?.onFiberStart&&n.onFiberStart(r),r},Ap=z(2,(e,t)=>{if(e._exit)return e;if(t.state._tag===`Closed`)return e.interruptUnsafe(e.id),e;let n={};return Zf(t,n,()=>xd(e)),e.addObserver(()=>Qf(t,n)),e}),jp=kp(Yc()),Mp=e=>{let t=kp(e);return(e,n)=>{let r=t(e,n);return n?.onExit&&r.addObserver(n.onExit),e=>r.interruptUnsafe(e)}},Np=e=>{let t=kp(e);return(e,n)=>{let r=t(e,n);return new Promise(e=>{r.addObserver(t=>e(t))})}},Pp=Np(Yc()),Fp=(e=>{let t=Np(e);return(e,n)=>t(e,n).then(e=>{if(e._tag===`Failure`)throw ld(e.cause);return e.value})})(Yc()),Ip=e=>{let t=kp(e);return e=>{if(af(e))return e;let n=new Du(`sync`),r=t(e,{scheduler:n});return r.currentDispatcher?.flush(),r._exit??Ds(new am(r))}},Lp=Ip(Yc()),Rp=e=>{let t=Ip(e);return e=>{let n=t(e);if(n._tag===`Failure`)throw ld(n.cause);return n.value}},zp=Rp(Yc()),Bp=wd(!0),Vp=wd(!1),Hp=class{waiters=[];scheduled=!1;_isOpen;constructor(e){this._isOpen=e}scheduleUnsafe(e){return this.scheduled||this.waiters.length===0?Bp:(this.scheduled=!0,e.currentDispatcher.scheduleTask(this.flushWaiters,0),Bp)}flushWaiters=()=>{this.scheduled=!1;let e=this.waiters;this.waiters=[];for(let t=0;t<e.length;t++)e[t](hf)};open=Os(e=>this._isOpen?Vp:(this._isOpen=!0,this.scheduleUnsafe(e)));release=Os(e=>this._isOpen?Vp:this.scheduleUnsafe(e));openUnsafe(){return this._isOpen?!1:(this._isOpen=!0,this.flushWaiters(),!0)}await=Ud(e=>this._isOpen?e(Id):(this.waiters.push(e),Dd(()=>{let t=this.waiters.indexOf(e);t!==-1&&this.waiters.splice(t,1)})));closeUnsafe(){return this._isOpen?(this._isOpen=!1,!0):!1}close=Dd(()=>this.closeUnsafe());whenOpen=e=>nf(this.await,()=>e);isOpen(){return this._isOpen}},Up=e=>new Hp(e??!1),Wp=BigInt(0),Gp={_tag:`Span`,spanId:`noop`,traceId:`noop`,sampled:!1,status:{_tag:`Ended`,startTime:Wp,endTime:Wp,exit:hf},attributes:new Map,links:[],kind:`internal`,attribute(){},event(){},end(){},addLinks(){}},Kp=e=>Object.assign(Object.create(Gp),e),qp=e=>e?tl(e.annotations,Pu)?e._tag===`Span`?qp(Pc(e.parent)):Tc():B(e):Tc(),Jp=(e,t,n)=>{let r=!e.getRef(Wu)||n?.annotations&&tl(n.annotations,Pu),i=n?.parent===void 0?n?.root?Tc():qp(e.currentSpan):B(n.parent),a;if(r)a=Kp({name:t,parent:i,annotations:Qc(n?.annotations??Yc(),Pu,!0)});else{let r=e.getRef(Ru),o=e.getRef($p),s=e.getRef(Gu),c=e.getRef(Ku),l=e.getRef(qu),u=n?.level??e.getRef(Fu),d=n?.links===void 0?l.slice():[...l,...n.links];a=r.span({name:t,parent:i,annotations:n?.annotations??Yc(),links:d,startTime:s?o.currentTimeNanosUnsafe():BigInt(0),kind:n?.kind??`internal`,root:n?.root??Dc(i),sampled:n?.sampled??(Oc(i)&&i.value.sampled===!1?!1:!cm(e.getRef(Iu),u))});for(let[e,t]of Object.entries(c))a.attribute(e,t);if(n?.attributes!==void 0)for(let[e,t]of Object.entries(n.attributes))a.attribute(e,t)}return a},Yp=(e,t)=>(t=typeof t==`function`?t:_a,Sf(Uu,n=>({name:e,stack:t,parent:n}))),Xp=(e,...t)=>{let n=t.length===1?void 0:t[0],r=t[t.length-1];return Os(t=>{let i=Jp(t,e,n),a=t.getRef($p);return ap(Bo(()=>r(i)),e=>Dd(()=>{i.status._tag!==`Ended`&&i.end(a.currentTimeNanosUnsafe(),e)}))})},Zp=Df(Mu),Qp=function(){let e=$o(arguments[0]),t=e?arguments[1]:arguments[0],n=e?arguments[2]:arguments[1],r=fa;return t._tag===`Span`&&(n=Xu(n),r=Yp(t.name,n?.captureStackTrace)),e?Zp(r(arguments[0]),t):e=>Zp(r(e),t)},$p=ll(`effect/Clock`,{defaultValue:()=>new tm}),em=2**31-1,tm=class{currentTimeMillisUnsafe(){return Date.now()}currentTimeMillis=Dd(()=>this.currentTimeMillisUnsafe());currentTimeNanosUnsafe(){return rm()}currentTimeNanos=Dd(()=>this.currentTimeNanosUnsafe());sleep(e){return this.sleepMillis(hu(e))}sleepMillis(e){return e<=0?Ad:Number.isFinite(e)?Ud(t=>{let n=e>em?this.sleepMillis(e-em):Id,r=setTimeout(()=>t(n),Math.min(e,em));return Dd(()=>clearTimeout(r))}):Wd}},nm=function(){let e=BigInt(1e6);if(typeof performance>`u`||performance.now===void 0)return()=>BigInt(Date.now())*e;let t;return()=>(t??=BigInt(Date.now())*e-BigInt(Math.round(performance.now()*1e6)),t+BigInt(Math.round(performance.now()*1e6)))}(),rm=function(){let e=typeof process==`object`&&`hrtime`in process&&typeof process.hrtime.bigint==`function`?process.hrtime:void 0;if(!e)return nm;let t=BigInt(Date.now())*BigInt(1e6)-e.bigint();return()=>t+e.bigint()}();js(`TimeoutError`),js(`IllegalArgumentError`),js(`ExceededCapacityError`);var im=`~effect/Cause/AsyncFiberError`,am=class extends js(`AsyncFiberError`){[im]=im;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}},om=`~effect/Cause/UnknownError`,sm=class extends js(`UnknownError`){[om]=om;constructor(e,t){super({message:t,cause:e})}},cm=Sc(yc(vc,e=>{switch(e){case`All`:return-(2**53-1);case`Fatal`:return 5e4;case`Error`:return 4e4;case`Warn`:return 3e4;case`Info`:return 2e4;case`Debug`:return 1e4;case`Trace`:return 0;case`None`:return 2**53-1}})),lm={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};lm.gray,lm.blue,lm.green,lm.yellow,lm.red,lm.bgBrightRed,lm.black;var um=rs,dm=is,fm=gs,pm=us,mm=ds,hm=fs,gm=ed,_m=e=>new ls(e),vm=e=>new ps(e),ym=$u,bm=sd,xm=od,Sm=ld,Cm=td,wm=nd,Tm=rd,Em=id,Dm=ad,Om=Ns,km=Fs,Am=zs;Hc()(`effect/Cause/StackTrace`),Hc()(`effect/Cause/InterruptorStackTrace`);var jm=es,Mm=Cs,Nm=Ts,Pm=Es,Fm=hf,Im=pf,Lm={"~effect/Deferred":{_A:fa,_E:fa},pipe(){return la(this,arguments)}},Rm=()=>{let e=Object.create(Lm);return e.resumes=void 0,e.effect=void 0,e},zm=e=>Ud(t=>e.effect?t(e.effect):(e.resumes??=[],e.resumes.push(t),Dd(()=>{let n=e.resumes.indexOf(t);e.resumes.splice(n,1)}))),Bm=z(2,(e,t)=>Dd(()=>Um(e,t))),Vm=z(2,(e,t)=>Bm(e,Ts(t))),Hm=z(2,(e,t)=>Vm(e,ed(t))),Um=(e,t)=>{if(e.effect)return!1;if(e.effect=t,e.resumes){for(let n=0;n<e.resumes.length;n++)e.resumes[n](t);e.resumes=void 0}return!0},Wm=Wf,Gm=$f,Km=np,qm=Yf,Jm=Xf,Ym=Jf,Xm=Gf,Zm=`~effect/Layer`,Qm=`~effect/Layer/MemoMap`,$m=(e,t)=>(e.observers++,$d(Yf(t,t=>e.finalizer(t)),e.effect)),eh={[Zm]:{_ROut:fa,_E:fa,_RIn:fa},pipe(){return la(this,arguments)}},th=e=>{let t=Object.create(eh);return t.build=e,t},nh=e=>th((t,n)=>{let r=Ym(n);return ap(e(t,r),e=>e._tag===`Failure`?Xm(r,e):Id)}),rh=e=>{let t=nh((n,r)=>n.getOrElseMemoize(t,r,e));return t},ih=(e,t,n,r)=>{let i=Gm(),a=Rm(),o={observers:1,effect:zm(a),finalizer:n=>Od(()=>(o.observers--,o.observers===0?(e.map.delete(t),Xm(i,n)):Id))};return e.map.set(t,o),Yf(n,o.finalizer).pipe(nf(()=>r(e,i)),ap(e=>(o.effect=e,Bm(a,e))))},ah=class{get[Qm](){return Qm}parent;constructor(e){this.parent=e}map=new Map;get(e,t){let n=this.map.get(e);return n?$m(n,t):this.parent?.get(e,t)}getOrElseMemoize(e,t,n){return this.get(e,t)||ih(this,e,t,n)}},oh=()=>new ah,sh=e=>new ah(e),ch=class e extends Hc()(`effect/Layer/CurrentMemoMap`){static forkOrCreate(t){let n=$c(t,e);return n?sh(n):oh()}},lh=z(3,(e,t,n)=>Df(cf(e.build(t,n),Qc(ch,t)),ch,t)),uh=function(){return arguments.length===1?e=>dh(Zc(arguments[0],e)):dh(Zc(arguments[0],arguments[1]))},dh=e=>th(pa(wd(e))),fh=function(){return arguments.length===1?e=>ph(arguments[0],e):ph(arguments[0],arguments[1])},ph=(e,t)=>mh(cf(t,t=>Zc(e,t))),mh=e=>rh((t,n)=>Km(e,n)),hh=e=>mh(Zd(e,Yc())),gh=(e,t,n)=>{let r=Ym(n,`parallel`);return xp(e,e=>e.build(t,Ym(r,`sequential`)),{concurrency:e.length}).pipe(cf(e=>sl(...e)))},_h=(...e)=>nh((t,n)=>gh(e,t,n)),vh=z(2,(e,t)=>_h(e,...Array.isArray(t)?t:[t])),yh=(e,t,n)=>nh((r,i)=>nf(Array.isArray(t)?gh(t,r,i):t.build(r,i),t=>e.build(r,i).pipe(Ef(t),cf(e=>n(e,t))))),bh=z(2,(e,t)=>yh(e,t,fa)),xh=z(2,(e,t)=>yh(e,t,(e,t)=>ol(t,e))),Sh=class extends da{constructor(e){super(),e&&Object.assign(this,e)}},Ch=e=>class extends Sh{_tag=e},wh=()=>new Proxy({},{get(e,t,n){return t===`$is`?La:t===`$match`?Th:e=>({...e,_tag:t})}});function Th(){if(arguments.length===1){let e=arguments[0];return function(t){return e[t._tag](t)}}let e=arguments[0];return arguments[1][e._tag](e)}var Eh=js,Dh=`~effect/time/DateTime`,Oh=`~effect/time/DateTime/TimeZone`,kh={[Dh]:Dh,pipe(){return la(this,arguments)},[Fo](){return this.toString()},toJSON(){return jh(this).toJSON()}};({...kh}),{...kh};var Ah={[Oh]:Oh,[Fo](){return this.toString()}};({...Ah}),{...Ah};var jh=e=>new Date(e.epochMilliseconds),Mh=z(2,(e,t)=>Nf(e,Ih,e=>t(e))),Nh=e=>e.reasons.some(Ph),Ph=e=>e._tag===`Fail`&&km(e.error),Fh=Su(Cm,e=>km(e)?dl(e):fl(e)),Ih=Su(Cm,e=>km(e)?dl(e.value):fl(e)),Lh=e=>{let t=Fh(e);return hl(t)?Nm(t.failure):Mm(t.success.value)},Rh=$o,zh=xp,Bh=bp,Vh=Rd,Hh=zd,V=wd,Uh=Md,Wh=jd,Gh=Od,Kh=Dd,qh=Id,Jh=Ud,Yh=Wd,Xh=Gd,Zh=Ed,Qh=Td,$h=Nd,eg=Pd,tg=Ld,ng=Os,rg=kd,ig=nf,ag=sf,og=$d,sg=ef,cg=Bf,lg=cf,ug=Zd,dg=tf,fg=Pf,pg=jf,mg=kf,hg=Lf,gg=Cf,_g=Tf,vg=Ef,yg=xf,bg=Df,xg=tp,Sg=rp,Cg=sp,wg=ap,Tg=fp,Eg=pp,Dg=lp,Og=mp,kg=yp,Ag=Af,jg=Xp,Mg=Qp,Ng=Op,Pg=Dp,Fg=jp,Ig=kp,Lg=Mp,Rg=Fp,zg=Pp,Bg=zp,Vg=Rp,Hg=Lp,Ug=Kd;Hc()(`effect/Effect/Transaction`);var Wg=lf,Gg=uf,Kg=df,qg=of,Jg=Jd,Yg=`~effect/collections/Chunk`;function Xg(e,t,n,r,i){for(let a=t;a<Math.min(e.length,t+i);a++)n[r+a-t]=e[a];return n}var Zg=[],Qg=e=>qs((t,n)=>t.length===n.length&&c_(t).every((t,r)=>e(t,u_(n,r)))),$g=Qg(io),e_={[Yg]:{_A:e=>e},toString(){return`Chunk(${Oo(c_(this))})`},toJSON(){return{_id:`Chunk`,values:Io(c_(this))}},[Fo](){return this.toJSON()},[ro](e){return n_(e)&&$g(this,e)},[za](){return Xa(c_(this))},[Symbol.iterator](){switch(this.backing._tag){case`IArray`:return this.backing.array[Symbol.iterator]();case`IEmpty`:return Zg[Symbol.iterator]();default:return c_(this)[Symbol.iterator]()}},pipe(){return la(this,arguments)}},t_=e=>{let t=Object.create(e_);switch(t.backing=e,e._tag){case`IEmpty`:t.length=0,t.depth=0,t.left=t,t.right=t;break;case`IConcat`:t.length=e.left.length+e.right.length,t.depth=1+Math.max(e.left.depth,e.right.depth),t.left=e.left,t.right=e.right;break;case`IArray`:t.length=e.array.length,t.depth=0,t.left=r_,t.right=r_;break;case`ISingleton`:t.length=1,t.depth=0,t.left=r_,t.right=r_;break;case`ISlice`:t.length=e.length,t.depth=e.chunk.depth+1,t.left=r_,t.right=r_;break}return t},n_=e=>Ia(e,Yg),r_=t_({_tag:`IEmpty`}),i_=()=>r_,a_=e=>t_({_tag:`ISingleton`,a:e}),o_=e=>n_(e)?e:l_(Tl(e)),s_=(e,t,n)=>{switch(e.backing._tag){case`IArray`:Xg(e.backing.array,0,t,n,e.length);break;case`IConcat`:s_(e.left,t,n),s_(e.right,t,n+e.left.length);break;case`ISingleton`:t[n]=e.backing.a;break;case`ISlice`:{let r=0,i=n;for(;r<e.length;)t[i]=u_(e,r),r+=1,i+=1;break}}},c_=e=>{switch(e.backing._tag){case`IEmpty`:return Zg;case`IArray`:return e.backing.array;default:{let t=Array(e.length);return s_(e,t,0),e.backing={_tag:`IArray`,array:t},e.left=r_,e.right=r_,e.depth=0,t}}},l_=e=>e.length===0?i_():e.length===1?a_(e[0]):t_({_tag:`IArray`,array:e}),u_=z(2,(e,t)=>{let n=Math.floor(t);switch(e.backing._tag){case`IEmpty`:throw Error(`Index out of bounds: ${n}`);case`ISingleton`:if(t!==0)throw Error(`Index out of bounds: ${n}`);return e.backing.a;case`IArray`:if(n>=e.length||n<0)throw Error(`Index out of bounds: ${n}`);return e.backing.array[n];case`IConcat`:return n<e.left.length?u_(e.left,n):u_(e.right,n-e.left.length);case`ISlice`:return u_(e.backing.chunk,n+e.backing.offset)}}),d_=e=>e.length,f_=yd,p_=bd,m_=xd,h_=pd,g_=Ap,__=Up,v_=Symbol.for(`effect/MutableList/Empty`),y_=()=>({head:void 0,tail:void 0,length:0}),b_=()=>({array:[],mutable:!0,offset:0,next:void 0}),x_=(e,t)=>{e.tail?e.tail.mutable||(e.tail.next=b_(),e.tail=e.tail.next):e.head=e.tail=b_(),e.tail.array.push(t),e.length++},S_=e=>{e.head=e.tail=void 0,e.length=0},C_=(e,t)=>{if(t<=0||!e.head)return[];if(t=Math.min(t,e.length),t===e.length&&e.head?.offset===0&&!e.head.next){let t=e.head.array;return S_(e),t}let n=Array(t),r=0,i=e.head;for(;i;){for(;i.offset<i.array.length;)if(n[r++]=i.array[i.offset],i.mutable&&(i.array[i.offset]=void 0),i.offset++,r===t)return e.head=i,e.length-=t,e.length===0&&S_(e),n;i=i.next}return S_(e),n},w_=e=>C_(e,e.length),T_=e=>{if(!e.head)return v_;let t=e.head.array[e.head.offset];return e.head.mutable&&(e.head.array[e.head.offset]=void 0),e.head.offset++,e.length--,e.head.offset===e.head.array.length&&(e.head.next?e.head=e.head.next:S_(e)),t},E_=(e,t)=>{let n=[],r=e.head;for(;r;){for(let e=r.offset;e<r.array.length;e++)t(r.array[e],e)&&n.push(r.array[e]);r=r.next}e.head=e.tail={array:n,mutable:!0,offset:0,next:void 0},e.length=n.length},D_=(e,t)=>E_(e,e=>e!==t),O_=`~effect/MutableRef`,k_={[O_]:O_,...Zo,toJSON(){return{_id:`MutableRef`,current:Io(this.current)}}},A_=e=>{let t=Object.create(k_);return t.current=e,t},j_=z(2,(e,t)=>(e.current=t,e)),M_=`~effect/PubSub/Subscription`,N_=z(2,(e,t)=>e.shutdownFlag.current?!1:e.pubsub.publish(t)?(e.strategy.completeSubscribersUnsafe(e.pubsub,e.subscribers),!0):!1),P_=e=>Og(_g(t=>{let n=tl(t,Wm),r=Ym(e.scope),i=R_(e.pubsub,e.subscribers,e.strategy);return Jm(r,F_(i)).pipe(og(qm(n,e=>Xm(r,e))),ug(i))})),F_=e=>Og(ng(t=>(j_(e.shutdownFlag,!0),zh(w_(e.pollers),e=>Hm(e,t.id),{discard:!0,concurrency:`unbounded`}).pipe(sg(()=>Kh(()=>{e.subscribers.delete(e.subscription),e.subscription.unsubscribe(),e.strategy.onPubSubEmptySpaceUnsafe(e.pubsub,e.subscribers)})),mg(e.shutdownHook.open),dg)))),I_=e=>Gh(function t(n){if(e.shutdownFlag.current)return Eg;let r=e.pollers.length===0?e.subscription.pollUpTo(1/0):[];return n&&(r=n.concat(r)),e.strategy.onPubSubEmptySpaceUnsafe(e.pubsub,e.subscribers),e.replayWindow.remaining>0?V(e.replayWindow.takeAll().concat(r)):kl(r)?V(r):ig(L_(e),e=>t([e]))}),L_=e=>{let t=Rm(),n=e.subscribers.get(e.subscription);return n||(n=new Set,e.subscribers.set(e.subscription,n)),n.add(e.pollers),x_(e.pollers,t),e.strategy.completePollersUnsafe(e.pubsub,e.subscribers,e.subscription,e.pollers),Dg(zm(t),()=>(D_(e.pollers,t),qh))},R_=(e,t,n)=>new z_(e,t,e.subscribe(),y_(),__(!1),A_(!1),n,e.replayWindow()),z_=class{[M_]={_A:fa};pubsub;subscribers;subscription;pollers;shutdownHook;shutdownFlag;strategy;replayWindow;constructor(e,t,n,r,i,a,o,s){this.pubsub=e,this.subscribers=t,this.subscription=n,this.pollers=r,this.shutdownHook=i,this.shutdownFlag=a,this.strategy=o,this.replayWindow=s}pipe(){return la(this,arguments)}},B_=`~effect/Queue`,V_=`~effect/Queue/Enqueue`,H_=`~effect/Queue/Dequeue`,U_={_A:fa,_E:fa},W_={[B_]:U_,[V_]:U_,[H_]:U_,...Zo,toJSON(){return{_id:`effect/Queue`,state:this.state._tag,size:nv(this)}}},G_=e=>Os(t=>{let n=Object.create(W_);return n.dispatcher=t.currentDispatcher,n.capacity=e?.capacity??1/0,n.strategy=e?.strategy??`suspend`,n.messages=y_(),n.scheduleRunning=!1,n.state={_tag:`Open`,takers:new Set,offers:new Set,awaiters:new Set},wd(n)}),K_=e=>G_({capacity:e}),q_=(e,t)=>Od(()=>{if(e.state._tag!==`Open`)return rv;if(e.messages.length>=e.capacity)switch(e.strategy){case`dropping`:return rv;case`suspend`:return e.capacity<=0&&e.state.takers.size>0?(x_(e.messages,t),sv(e),iv):uv(e,t);case`sliding`:return T_(e.messages),x_(e.messages,t),iv}return x_(e.messages,t),cv(e),iv}),J_=(e,t)=>e.state._tag===`Open`?e.messages.length>=e.capacity?e.strategy===`sliding`?(T_(e.messages),x_(e.messages,t),!0):e.capacity<=0&&e.state.takers.size>0?(x_(e.messages,t),sv(e),!0):!1:(x_(e.messages,t),cv(e),!0):!1,Y_=z(2,(e,t)=>Dd(()=>X_(e,t))),X_=(e,t)=>{if(e.state._tag!==`Open`)return!1;let n=yf(Ts(t),av);return e.state.offers.size===0&&e.messages.length===0?(pv(e,n),!0):(e.state={...e.state,_tag:`Closing`,exit:n},!0)},Z_=e=>Dd(()=>{if(e.state._tag===`Done`)return!0;S_(e.messages);let t=e.state.offers;if(pv(e,e.state._tag===`Open`?ov:e.state.exit),t.size>0){for(let e of t)e._tag===`Single`?e.resume(rv):e.resume(Cs(e.remaining.slice(e.offset)));t.clear()}return!0}),Q_=e=>$_(e,1,1/0),$_=(e,t,n)=>Od(()=>lv(e,t,n)??$d(fv(e),$_(e,1,n))),ev=e=>Od(()=>tv(e)??$d(fv(e),ev(e))),tv=e=>{if(e.state._tag===`Done`)return e.state.exit;if(e.messages.length>0){let t=T_(e.messages);return dv(e),Cs(t)}else if(e.capacity<=0&&e.state.offers.size>0){e.capacity=1,dv(e),e.capacity=0;let t=T_(e.messages);return dv(e),Cs(t)}},nv=e=>e.state._tag===`Done`?0:e.messages.length,rv=Cs(!1),iv=Cs(!0),av=Es(Ls()),ov=ff(),sv=e=>{if(e.scheduleRunning=!1,!(e.state._tag===`Done`||e.state.takers.size===0)){for(let t of e.state.takers)if(e.state.takers.delete(t),t(hf),e.messages.length===0)break}},cv=e=>{e.scheduleRunning||e.state._tag===`Done`||e.state.takers.size===0||(e.scheduleRunning=!0,e.dispatcher.scheduleTask(()=>sv(e),0))},lv=(e,t,n)=>{if(e.state._tag===`Done`)return e.state.exit;if(n<=0||t<=0)return Cs([]);if(e.capacity<=0&&e.state.offers.size>0){e.capacity=1,dv(e),e.capacity=0;let t=[T_(e.messages)];return dv(e),Cs(t)}if(t=Math.min(t,e.capacity||1),t<=e.messages.length){let t=C_(e.messages,n);return dv(e),Cs(t)}},uv=(e,t)=>Ud(n=>{if(e.state._tag!==`Open`)return n(rv);let r={_tag:`Single`,message:t,resume:n};return e.state.offers.add(r),Dd(()=>{e.state._tag===`Open`&&e.state.offers.delete(r)})}),dv=e=>{if(e.state._tag===`Done`)return Nh(e.state.exit.cause);if(e.state.offers.size===0)return e.state._tag===`Closing`&&e.messages.length===0?(pv(e,e.state.exit),Nh(e.state.exit.cause)):!1;let t=e.capacity-e.messages.length;for(let n of e.state.offers)if(t===0)break;else if(n._tag===`Single`)x_(e.messages,n.message),t--,n.resume(iv),e.state.offers.delete(n);else{for(;n.offset<n.remaining.length;n.offset++){if(t===0)return!1;x_(e.messages,n.remaining[n.offset]),t--}n.resume(Cs([])),e.state.offers.delete(n)}return!1},fv=e=>Ud(t=>e.state._tag===`Done`?t(e.state.exit):(e.state.takers.add(t),Dd(()=>{e.state._tag!==`Done`&&e.state.takers.delete(t)}))),pv=(e,t)=>{if(e.state._tag===`Done`)return;let n=e.state;e.state={_tag:`Done`,exit:t};for(let e of n.takers)e(t);n.takers.clear();for(let e of n.awaiters)e(t);n.awaiters.clear()},mv=e=>new hv(e),hv=class{waiters=new Set;taken=0;permits;constructor(e){this.permits=e}get free(){return this.permits-this.taken}take(e){let t=Od(()=>this.free<e?Ud(n=>{if(this.free>=e)return n(t);let r=()=>{this.free<e||(this.waiters.delete(r),n(t))};return this.waiters.add(r),Dd(()=>{this.waiters.delete(r)})}):(this.taken+=e,wd(e)));return t}updateTakenUnsafe(e,t){return this.taken=t(this.taken),this.waiters.size>0&&e.currentDispatcher.scheduleTask(()=>{let e=this.waiters.values(),t=e.next();for(;t.done===!1&&this.free>0;)t.value(),t=e.next()},0),this.free}updateTaken(e){return Os(t=>wd(this.updateTakenUnsafe(t,e)))}resize(e){return Os(t=>(this.permits=e,this.free<0||this.updateTakenUnsafe(t,e=>e),Id))}release(e){return this.updateTaken(t=>t-e)}get releaseAll(){return this.updateTaken(e=>0)}withPermits(e){return t=>yp(n=>nf(n(this.take(e)),e=>ip(n(t),()=>{this.updateTakenUnsafe(pd(),t=>t-e)},!0)))}withPermit=this.withPermits(1);withPermitsIfAvailable(e){return t=>yp(n=>this.free<e?Md:(this.taken+=e,ip(n(Qd(t)),()=>{this.updateTakenUnsafe(pd(),t=>t-e)},!0)))}},gv=`~effect/Channel`,_v=e=>Ia(e,gv),vv={[gv]:{_Env:fa,_InErr:fa,_InElem:fa,_OutErr:fa,_OutElem:fa},pipe(){return la(this,arguments)}},yv=e=>{let t=Object.create(vv);return t.transform=(t,n)=>pg(e(t,n),e=>V(Qh(e))),t},bv=(e,t)=>yv((n,r)=>ig(Cv(e)(n,r),e=>t(e,r))),xv=e=>yv((t,n)=>e),Sv=e=>yv(Ug(function*(t,n){let r=Ym(n),i=e=>Xm(r,Lh(e));return Cg(yield*Cg(e(t,n,r),i),i)})),Cv=e=>e.transform,wv=(e,t,n)=>G_({capacity:n?.bufferSize,strategy:n?.strategy}).pipe(sg(t=>Jm(e,Z_(t))),sg(n=>Ng(Km(t(n),e),e))),Tv=(e,t)=>yv((n,r)=>lg(wv(r,e,t),Q_)),Ev=e=>yv((t,n)=>Gh(()=>Cv(e())(t,n))),Dv=xv(V(Am())),Ov=e=>xv(V(Zh(e))),kv=e=>xv(V(Q_(e))),Av=e=>xv(V(Dg(I_(e),()=>Am()))),jv=e=>Bv(lg(P_(e),Av)),Mv=z(2,(e,t)=>bv(e,e=>Kh(()=>{let n=0;return lg(e,e=>t(e,n++))}))),Nv=e=>e===void 0||e!==`unbounded`&&e<=1,Pv=z(e=>_v(e[0]),(e,t,n)=>Nv(n?.concurrency)?Fv(e,t):Iv(e,t,n)),Fv=(e,t)=>yv((n,r)=>{let i=0;return lg(Cv(e)(n,r),ig(e=>t(e,i++)))}),Iv=(e,t,n)=>Sv(Ug(function*(r,i,a){let o=0,s=yield*Cv(e)(r,i),c=n.concurrency===`unbounded`?2**53-1:n.concurrency,l=yield*K_(0);yield*Jm(a,Z_(l));let u=Ig(yield*gg()),d=g_(a);if(n.unordered){let e=mv(c),n=pa(e.release(1)),r=hg({onFailure:e=>ig(Y_(l,e),n),onSuccess:e=>ig(q_(l,e),n)});yield*e.take(1).pipe(ig(()=>s),ig(e=>(d(u(r(t(e,o++)))),qh)),Ag({disableYield:!0}),pg(t=>e.withPermits(c-1)(Y_(l,t))),Ng(a))}else{let e=yield*K_(c-2);yield*Jm(a,Z_(l)),yield*ev(e).pipe(ag,ig(e=>q_(l,e)),Ag({disableYield:!0}),pg(e=>Y_(l,e)),Ng(a));let n,r=e=>{e._tag!==`Success`&&(n=e.cause,X_(l,e.cause))};yield*s.pipe(ig(i=>{if(n)return Qh(n);let a=u(t(i,o++));return d(a),a.addObserver(r),q_(e,f_(a))}),Ag({disableYield:!0}),pg(t=>q_(e,Nm(t)).pipe(og(Y_(e,t)))),Ng(a))}return ev(l)})),Lv=e=>bv(e,e=>{let t,n=0;return V(Gh(function r(){if(t===void 0)return ig(e,e=>{switch(e.length){case 0:return r();case 1:return V(e[0]);default:return t=e,V(e[n++])}});let i=t[n++];return n>=t.length&&(t=void 0,n=0),V(i)}))}),Rv=z(2,(e,t)=>bv(e,e=>V(ig(e,function n(r){let i=[];for(let e=0;e<r.length;e++)t(r[e])&&i.push(r[e]);return Al(i)?V(i):ig(e,n)})))),zv=z(2,(e,t)=>yv((n,r)=>ig(Cv(e)(n,r),e=>Cv(t)(e,r)))),Bv=e=>yv((t,n)=>{let r;return V(Gh(()=>r||e.pipe(Km(n),ig(e=>Cv(e)(t,n)),ig(e=>r=e))))}),Vv=z(2,(e,t)=>Sv((n,r,i)=>qm(i,t).pipe(og(Cv(e)(n,r))))),Hv=z(2,(e,t)=>Vv(e,e=>t)),Uv=(e,t,n)=>Gh(()=>{let r=Gm();return Mh(ig(Cv(e)(Am(),r),t),n||V).pipe(wg(e=>Xm(r,e)))}),Wv=z(2,(e,t)=>yv((n,r)=>lg(vg(Cv(e)(n,r),t),vg(t)))),Gv=z(2,(e,t)=>Uv(e,e=>Ag(ig(e,t),{disableYield:!0}))),Kv=Ug(function*(e){let t=mv(1),n=yield*gg(),r=tl(n,Wm);return(yield*Cv(e)(Am(),r)).pipe(vg(n),t.withPermits(1))},pg(e=>V(Qh(e)))),qv=(e,t)=>Cv(e)(Am(),t),Jv=`~effect/collections/MutableHashMap`,Yv={[Jv]:Jv,[Symbol.iterator](){return this.backing[Symbol.iterator]()},toString(){return`MutableHashMap(${Oo(Array.from(this))})`},toJSON(){return{_id:`MutableHashMap`,values:Io(Array.from(this))}},[Fo](){return this.toJSON()},pipe(){return la(this,arguments)}},Xv=()=>{let e=Object.create(Yv);return e.backing=new Map,e.buckets=new Map,e},Zv=z(2,(e,t)=>{if(e.backing.has(t))return B(e.backing.get(t));if($v(t))return Tc();let n=Qv.get(e);if(n!==void 0)return e.backing.has(n)?B(e.backing.get(n)):Tc();let r=Ba(t),i=e.buckets.get(r);return i===void 0?Tc():ey(e,i,t)}),Qv=new WeakMap,$v=e=>typeof e!=`object`&&typeof e!=`function`,ey=(e,t,n)=>{for(let r=0,i=t.length;r<i;r++)if(io(n,t[r])){let i=t[r];return Qv.set(n,i),B(e.backing.get(i))}return Tc()},ty=z(3,(e,t,n)=>{if(e.backing.has(t)||$v(t))return e.backing.set(t,n),e;let r=Qv.get(e);if(r!==void 0&&e.backing.has(r))return e.backing.set(r,n),e;let i=Ba(t),a=e.buckets.get(i);return a===void 0?(e.buckets.set(i,[t]),e.backing.set(t,n),e):(r=ny(a,t),r===void 0&&(a.push(t),r=t),e.backing.set(r,n),e)}),ny=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(io(t,e[n]))return Qv.set(t,e[n]),e[n]},ry=z(2,(e,t)=>{if($v(t))return e.backing.delete(t),e;let n=Qv.get(e)??t,r=Ba(n),i=e.buckets.get(r);if(i===void 0)return e;for(let t=0,r=i.length;t<r;t++){let r=i[t];if(r===n||io(n,r)){e.backing.delete(r),i.splice(t,1);break}}return i.length===0&&e.buckets.delete(r),e}),iy=`~effect/BigDecimal`,ay={[iy]:iy,[za](){let e=fy(this);return Ha(Ba(e.value),Ga(e.scale))},[ro](e){return oy(e)&&gy(this,e)},toString(){return`BigDecimal(${_y(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[Fo](){return this.toJSON()},pipe(){return la(this,arguments)}},oy=e=>Ia(e,iy),sy=(e,t)=>{let n=Object.create(ay);return n.value=e,n.scale=t,n},cy=(e,t)=>{if(e!==ly&&e%uy===ly)throw RangeError(`Value must be normalized`);let n=sy(e,t);return n.normalized=n,n},ly=BigInt(0),uy=BigInt(10),dy=cy(ly,0),fy=e=>{if(e.normalized===void 0)if(e.value===ly)e.normalized=dy;else{let t=`${e.value}`,n=0;for(let e=t.length-1;e>=0&&t[e]===`0`;e--)n++;n===0&&(e.normalized=e),e.normalized=cy(BigInt(t.substring(0,t.length-n)),e.scale-n)}return e.normalized},py=z(2,(e,t)=>t>e.scale?sy(e.value*uy**BigInt(t-e.scale),t):t<e.scale?sy(e.value/uy**BigInt(e.scale-t),t):e),my=e=>e.value<ly?sy(-e.value,e.scale):e,hy=qs((e,t)=>e.scale>t.scale?py(t,e.scale).value===e.value:e.scale<t.scale?py(e,t.scale).value===t.value:e.value===t.value),gy=z(2,(e,t)=>hy(e,t)),_y=e=>{let t=fy(e);if(Math.abs(t.scale)>=16)return vy(t);let n=t.value<ly,r=n?`${t.value}`.substring(1):`${t.value}`,i,a;if(t.scale>=r.length)i=`0`,a=`0`.repeat(t.scale-r.length)+r;else{let e=r.length-t.scale;if(e>r.length){let t=e-r.length;i=`${r}${`0`.repeat(t)}`,a=``}else a=r.slice(e),i=r.slice(0,e)}let o=a===``?i:`${i}.${a}`;return n?`-${o}`:o},vy=e=>{if(yy(e))return`0e+0`;let t=fy(e),n=`${my(t).value}`,r=n.slice(0,1),i=n.slice(1),a=`${by(t)?`-`:``}${r}`;i!==``&&(a+=`.${i}`);let o=i.length-t.scale;return`${a}e${o>=0?`+`:``}${o}`},yy=e=>e.value===ly,by=e=>e.value<ly;Hc()(`effect/DateTime/CurrentTimeZone`);var xy=`~effect/encoding/EncodingError`,Sy=class extends Eh(`EncodingError`){[xy]=xy},Cy=e=>Dy(typeof e==`string`?Ty.encode(e):e),wy=e=>{let t=Ey(e),n=t.length;if(n%4!=0)return fl(new Sy({kind:`Decode`,module:`Base64`,input:t,message:`Length must be a multiple of 4, but is ${n}`}));let r=t.indexOf(`=`);if(r!==-1&&(r<n-2||r===n-2&&t[n-1]!==`=`))return fl(new Sy({kind:`Decode`,module:`Base64`,input:t,message:`Found a '=' character, but it is not at the end`}));try{let e=t.endsWith(`==`)?2:+!!t.endsWith(`=`),r=new Uint8Array(n/4*3-e);for(let e=0,i=0;e<n;e+=4,i+=3){let n=Oy(t.charCodeAt(e))<<18|Oy(t.charCodeAt(e+1))<<12|Oy(t.charCodeAt(e+2))<<6|Oy(t.charCodeAt(e+3));r[i]=n>>16,r[i+1]=n>>8&255,r[i+2]=n&255}return dl(r)}catch(e){return fl(new Sy({kind:`Decode`,module:`Base64`,input:t,message:e instanceof Error?e.message:`Invalid input`}))}},Ty=new TextEncoder,Ey=e=>e.replace(/[\n\r]/g,``),Dy=e=>{let t=e.length,n=``,r;for(r=2;r<t;r+=3)n+=ky[e[r-2]>>2],n+=ky[(e[r-2]&3)<<4|e[r-1]>>4],n+=ky[(e[r-1]&15)<<2|e[r]>>6],n+=ky[e[r]&63];return r===t+1&&(n+=ky[e[r-2]>>2],n+=ky[(e[r-2]&3)<<4],n+=`==`),r===t&&(n+=ky[e[r-2]>>2],n+=ky[(e[r-2]&3)<<4|e[r-1]>>4],n+=ky[(e[r-1]&15)<<2],n+=`=`),n};function Oy(e){if(e>=Ay.length)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);let t=Ay[e];if(t===255)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);return t}var ky=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),Ay=[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62,255,255,255,63,52,53,54,55,56,57,58,59,60,61,255,255,255,0,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];function jy(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}function My(e){return t=>jy(t)?.[e]}var Ny=My(`identifier`),Py=My(`brands`),Fy=xa(e=>{let t=Ny(e);return typeof t==`string`?t:e.getExpected(Fy)});function Iy(e,t,n){return t===`__proto__`?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n,e}var Ly=new WeakMap,Ry=`~effect/data/Redacted`,zy=e=>Ia(e,Ry),By=(e,t)=>{let n=Object.create(Vy);return t?.label&&(n.label=t.label),Ly.set(n,e),n},Vy={[Ry]:{_A:e=>e},label:void 0,...Zo,toJSON(){return this.toString()},toString(){return`<redacted${wa(this.label)?`:`+this.label:``}>`},[za](){return Ba(Ly.get(this))},[ro](e){return zy(e)&&io(Ly.get(this),Ly.get(e))}},Hy=`~effect/SchemaIssue/Issue`;function Uy(e){return Ia(e,Hy)}var Wy=class{[Hy]=Hy;toString(){return db(this)}},Gy=class extends Wy{_tag=`Filter`;actual;filter;issue;constructor(e,t,n){super(),this.actual=e,this.filter=t,this.issue=n}},Ky=class extends Wy{_tag=`Encoding`;ast;actual;issue;constructor(e,t,n){super(),this.ast=e,this.actual=t,this.issue=n}},qy=class extends Wy{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},Jy=class extends Wy{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},Yy=class extends Wy{_tag=`UnexpectedKey`;ast;actual;constructor(e,t){super(),this.ast=e,this.actual=t}},Xy=class extends Wy{_tag=`Composite`;ast;actual;issues;constructor(e,t,n){super(),this.ast=e,this.actual=t,this.issues=n}},Zy=class extends Wy{_tag=`InvalidType`;ast;actual;constructor(e,t){super(),this.ast=e,this.actual=t}},Qy=class extends Wy{_tag=`InvalidValue`;actual;annotations;constructor(e,t){super(),this.actual=e,this.annotations=t}},$y=class extends Wy{_tag=`Forbidden`;actual;annotations;constructor(e,t){super(),this.actual=e,this.annotations=t}},eb=class extends Wy{_tag=`AnyOf`;ast;actual;issues;constructor(e,t,n){super(),this.ast=e,this.actual=t,this.issues=n}},tb=class extends Wy{_tag=`OneOf`;ast;actual;successes;constructor(e,t,n){super(),this.ast=e,this.actual=t,this.successes=n}};function nb(e,t){if(Uy(t))return t;if(typeof t==`string`)return new Qy(B(e),{message:t});let n=typeof t.issue==`string`?new Qy(B(e),{message:t.issue}):t.issue;return new qy(t.path,n)}function rb(e,t){if(t!==void 0)return typeof t==`boolean`?t?void 0:new Qy(B(e)):nb(e,t)}function ib(e,t,n){return Array.isArray(n)?Al(n)?n.length===1?nb(e,n[0]):new Xy(t,B(e),zl(n,t=>nb(e,t))):void 0:rb(e,n)}var ab=e=>{let t=pb(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return sb(Fy(e.ast),hb(e.actual));case`InvalidValue`:return`Invalid data ${hb(e.actual)}`;case`MissingKey`:return`Missing key`;case`UnexpectedKey`:return`Unexpected key with value ${Oo(e.actual)}`;case`Forbidden`:return`Forbidden operation`;case`OneOf`:return`Expected exactly one member to match the input ${Oo(e.actual)}`}},ob=e=>pb(e.issue)??pb(e);function sb(e,t){return`Expected ${e}, got ${t}`}function cb(e,t,n,r){switch(e._tag){case`Filter`:{let i=r(e);if(i!==void 0)return[{path:t,message:i}];switch(e.issue._tag){case`InvalidValue`:return[{path:t,message:sb(lb(e.filter),Oo(e.actual))}];default:return cb(e.issue,t,n,r)}}case`Encoding`:return cb(e.issue,t,n,r);case`Pointer`:return cb(e.issue,[...t,...e.path],n,r);case`Composite`:return e.issues.flatMap(e=>cb(e,t,n,r));case`AnyOf`:{let i=pb(e);return e.issues.length===0?i===void 0?[{path:t,message:sb(Fy(e.ast),Oo(e.actual))}]:[{path:t,message:i}]:e.issues.flatMap(e=>cb(e,t,n,r))}default:return[{path:t,message:n(e)}]}}function lb(e){let t=e.annotations?.expected;if(typeof t==`string`)return t;switch(e._tag){case`Filter`:return`<filter>`;case`FilterGroup`:return e.checks.map(e=>lb(e)).join(` & `)}}function ub(){return e=>cb(e,[],ab,ob).map(fb).join(`
|
|
16
|
+
`)}var db=ub();function fb(e){let t=e.message;if(e.path&&e.path.length>0){let n=jo(e.path);t+=`\n at ${n}`}return t}function pb(e){switch(e._tag){case`InvalidType`:case`OneOf`:case`Composite`:case`AnyOf`:return mb(e.ast.annotations);case`InvalidValue`:case`Forbidden`:return mb(e.annotations);case`MissingKey`:return mb(e.annotations,`messageMissingKey`);case`UnexpectedKey`:return mb(e.ast.annotations,`messageUnexpectedKey`);case`Filter`:return mb(e.filter.annotations);case`Encoding`:return pb(e.issue)}}function mb(e,t=`message`){let n=e?.[t];if(typeof n==`string`)return n}function hb(e){return Dc(e)?`no value provided`:Oo(e.value)}function gb(e){let t;for(let n of e.reasons){if(!fm(n)||!Uy(n.error))return;t??=n.error}return t}function _b(e,t){let n=gb(e);if(n===void 0)throw Error(t,{cause:e});return n}var vb=class e extends da{run;constructor(e){super(),this.run=e}map(t){return new e((e,n)=>this.run(e,n).pipe(Wg(Ic(t))))}compose(t){return bb(this)?t:bb(t)?this:new e((e,n)=>this.run(e,n).pipe(qg(e=>t.run(e,n))))}},yb=new vb(V);function bb(e){return e.run===yb.run}function xb(){return yb}function Sb(e){return new vb((t,n)=>Dc(t)?Uh:e(t.value,n))}function Cb(e){return Tb(Ic(e))}function wb(e){return Sb((t,n)=>e(t,n).pipe(Wg(B)))}function Tb(e){return new vb(t=>V(e(t)))}function Eb(){return new vb(()=>Uh)}function Db(e){return new vb(t=>{let n=zc(t,Aa);return Oc(n)?V(n):Wg(e,B)})}function Ob(){return Cb(globalThis.String)}function kb(){return Cb(globalThis.Number)}function Ab(){return Cb(e=>new globalThis.Date(e))}function jb(e){return Sb(t=>tg({try:()=>B(JSON.parse(t,e?.reviver)),catch:e=>new Qy(B(t),{message:globalThis.String(e)})}))}function Mb(e){return Sb(t=>tg({try:()=>B(JSON.stringify(t,e?.replacer,e?.space)),catch:e=>new Qy(B(t),{message:globalThis.String(e)})}))}function Nb(){return Cb(Cy)}function Pb(){return wb(e=>Gg(rg(wy(e)),t=>new Qy(B(e),{message:t.message})))}var Fb=`~effect/SchemaTransformation/Transformation`,Ib=class e{[Fb]=Fb;_tag=`Transformation`;decode;encode;constructor(e,t){this.decode=e,this.encode=t}flip(){return new e(this.encode,this.decode)}compose(t){return new e(this.decode.compose(t.decode),t.encode.compose(this.encode))}};function Lb(e){return Ia(e,Fb)}var Rb=e=>Lb(e)?e:new Ib(e.decode,e.encode);function zb(e){return new Ib(wb(e.decode),wb(e.encode))}function Bb(e){return new Ib(Cb(e.decode),Cb(e.encode))}var Vb=new Ib(xb(),xb());function Hb(){return Vb}var Ub=new Ib(kb(),Ob()),Wb=new Ib(Ab(),Cb(Mo)),Gb=e=>Pa(e)&&typeof e.message==`string`,Kb=e=>{let t=Object.hasOwn(e,`cause`)?Error(e.message,{cause:Xb(e.cause)}):Error(e.message);return typeof e.name==`string`&&e.name!==`Error`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t},qb=e=>{try{let t=Po(e);return t===void 0?Oo(e):JSON.parse(t)}catch{return Oo(e)}},Jb=(e,t,n)=>{let r={name:e.name,message:typeof e.message==`string`?e.message:``};return t?.includeStack&&typeof e.stack==`string`&&(r.stack=e.stack),!t?.excludeCause&&e.cause!==void 0&&(r.cause=n(e.cause)),r},Yb=e=>{let t=new WeakSet,n=r=>{if(Ra(r)){if(t.has(r))return`[Circular]`;t.add(r);let i=Jb(r,e,n);return t.delete(r),i}return qb(r)};return n},Xb=e=>Gb(e)?Kb(e):e,Zb=e=>Bb({decode:Xb,encode:Yb(e)}),Qb=new Ib(Pb(),Nb()),$b=new Ib(jb(),Mb());function ex(e){return t=>t._tag===e}var tx=ex(`Declaration`),nx=ex(`Null`),rx=ex(`Void`),ix=ex(`Never`),ax=ex(`Literal`),ox=ex(`UniqueSymbol`),sx=ex(`Arrays`),cx=ex(`Objects`),lx=ex(`Union`),ux=ex(`Suspend`),dx=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},fx={},px=class{isOptional;isMutable;defaultValue;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.defaultValue=n,this.annotations=r}},mx=`~effect/Schema`,hx=class{[mx]=mx;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},gx=class e extends hx{_tag=`Declaration`;typeParameters;run;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o}getParser(){let e=this.run(this.typeParameters);return(t,n)=>Dc(t)?Uh:Wg(e(t.value,this,n),B)}_rebuild(t,n,r){let i=TS(this.typeParameters,t);return i===this.typeParameters&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.run,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},_x=new class extends hx{_tag=`Null`;getParser(){return zS(this,null)}getExpected(){return`null`}},vx=class extends hx{_tag=`Undefined`;getParser(){return zS(this,void 0)}toCodecJson(){return hS(this,[yx])}getExpected(){return`undefined`}},yx=new dx(_x,new Ib(Cb(()=>void 0),Cb(()=>null))),bx=new vx,xx=new class extends hx{_tag=`Void`;getParser(){return BS(void 0)}toCodecJson(){return hS(this,[yx])}getExpected(){return`void`}},Sx=new class extends hx{_tag=`Never`;getParser(){return VS(this,Ma)}getExpected(){return`never`}},Cx=new class extends hx{_tag=`Unknown`;getParser(){return VS(this,Na)}getExpected(){return`unknown`}},wx=class extends hx{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${Oo(e)}`);this.literal=e}getParser(){return zS(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?Tx(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:Tx(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function Tx(e){let t=globalThis.String(e.literal);return hS(e,[new dx(new wx(t),new Ib(Cb(()=>e.literal),Cb(()=>t)))])}var Ex=new class extends hx{_tag=`String`;getParser(){return VS(this,wa)}matchPart(e,t){return HS(this,e,t)}getExpected(){return`string`}},Dx=class extends hx{_tag=`Number`;getParser(){return VS(this,Ta)}matchKey(e,t){return this._match(KS,e,t)}matchPart(e,t){return this._match(GS,e,t)}_match(e,t,n){return e.test(t)?HS(this,globalThis.Number(t),n):void 0}toCodecJson(){return this.checks&&(Ox(this.checks,`isFinite`)||Ox(this.checks,`isInt`))?this:hS(this,[aS])}toCodecStringTree(){return this.checks&&(Ox(this.checks,`isFinite`)||Ox(this.checks,`isInt`))?hS(this,[YS]):hS(this,[XS])}getExpected(){return`number`}};function Ox(e,t){return e.some(e=>{switch(e._tag){case`Filter`:return e.annotations?.meta?._tag===t;case`FilterGroup`:return Ox(e.checks,t)}})}var kx=new Dx,Ax=new class extends hx{_tag=`Boolean`;getParser(){return VS(this,Ea)}getExpected(){return`boolean`}},jx=class e extends hx{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=t.findIndex(NS);if(c!==-1&&(t.slice(c+1).some(e=>!NS(e))||n.length>1))throw Error(`A required element cannot follow an optional element. ts(1257)`);if(n.length>1&&n.slice(1).some(NS))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e){let t=this,n=t.elements.map(t=>({ast:t,parser:e(t)})),r=t.rest.map(t=>({ast:t,parser:e(t)})),i=n.length,[a,...o]=r,s=o.length;function c(e,t){return t<i?n[t]:t>=e?o[t-e]:a}return Jg(function*(e,n){if(e._tag===`None`)return e;let r=e.value;if(!Array.isArray(r))return yield*Zh(new Zy(t,e));let a=r.length,o={ast:t,getParser:c,oinput:e,len:a,tailThreshold:Nx(a,i,s),output:new globalThis.Array(a),issues:void 0,options:n},l=Mx(o,r,{concurrency:Px(n?.concurrency)?.concurrency,end:t.rest.length===0?i:Math.max(a,i+s)});if(l&&(yield*l),t.rest.length===0&&a>i)for(let s=i;s<=a-1;s++){let i=new qy([s],new Yy(t,r[s]));if(n.errors===`all`)o.issues?o.issues.push(i):o.issues=[i];else return yield*Zh(new Xy(t,e,[i]))}return o.issues?yield*Zh(new Xy(t,e,o.issues)):B(o.output)})}_rebuild(t,n,r){let i=TS(this.elements,t),a=TS(this.rest,t);return i===this.elements&&a===this.rest&&n===this.checks&&r===this.encodingChecks?this:new e(this.isMutable,i,a,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}},Mx=wp()({onItem(e,t,n){let r=n<e.len?B(t):Tc();return e.getParser(e.tailThreshold,n).parser(r,e.options)},step(e,t,n,r){if(n._tag===`Failure`)return Fx(e,e.ast,r,n);if(n.value._tag===`Some`)e.output[r]=n.value.value;else{let t=e.getParser(e.tailThreshold,r);if(NS(t.ast))return;let n=new qy([r],new Jy(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return Pm(new Xy(e.ast,e.oinput,[n]))}}});function Nx(e,t,n){return Math.max(t,e-n)}var Px=e=>(e=e===`unbounded`?1/0:e??1,e>1?{concurrency:e}:void 0),Fx=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=gb(r.cause);if(i===void 0)return Nm(bm(r.cause,r=>new Xy(t,e.oinput,[new qy([n],r)])));let a=new qy([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return Pm(new Xy(t,e.oinput,[a]))},Ix=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function Lx(e,t,n=fx){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(US(FS(t)))}var Rx=class{name;type;constructor(e,t){this.name=e,this.type=t}},zx=class e{decode;encode;constructor(e,t){this.decode=e,this.encode=t}flip(){return new e(this.encode,this.decode)}};function Bx(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(Bx);default:return!1}}function Vx(e){return Bx(e)&&Bx(FS(e))}var Hx=class{parameter;type;merge;constructor(e,t,n){if(!Vx(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,this.merge=n,NS(t)&&!RS(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},Ux=class e extends hx{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o;let s=e.map(e=>e.name).filter((e,t,n)=>n.indexOf(e)!==t);if(s.length>0)throw Error(`Duplicate identifiers: ${JSON.stringify(s)}. ts(2300)`)}getParser(e){let t=this,n=[],r=new Set,i=[];for(let a of t.propertySignatures)n.push(a.name),r.add(a.name),i.push({ps:a,parser:e(a.type),name:a.name,type:a.type});let a=t.indexSignatures.length;if(t.propertySignatures.length===0&&t.indexSignatures.length===0)return VS(t,ja);let o=a>0?wp()({onItem:Jg(function*(n,[i,a]){let o=e(US(a.parameter))(B(i),n.options),s=af(o)?o:yield*cg(o);if(s._tag===`Failure`){let e=Fx(n,t,i,s);e&&(yield*e);return}let c=B(n.input[i]),l=e(a.type)(c,n.options),u=af(l)?l:yield*cg(l);if(u._tag===`Failure`){let e=Fx(n,t,i,u);e&&(yield*e);return}else if(s.value._tag===`Some`&&u.value._tag===`Some`){let e=s.value.value;if(r.has(i)||r.has(e))return;let t=u.value.value;if(a.merge&&a.merge.decode&&Object.hasOwn(n.out,e)){let[r,i]=a.merge.decode.combine([e,n.out[e]],[e,t]);Iy(n.out,r,i)}else Iy(n.out,e,t)}}),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return Jg(function*(e,s){if(e._tag===`None`)return e;let c=e.value;if(!(typeof c==`object`&&c&&!Array.isArray(c)))return yield*Zh(new Zy(t,e));let l={},u={ast:t,oinput:e,input:c,out:l,issues:void 0,options:s},d=s.errors===`all`,f=s.onExcessProperty===`error`,p=s.onExcessProperty===`preserve`,m;if(t.indexSignatures.length===0&&(f||p)){m=Reflect.ownKeys(c);for(let n=0;n<m.length;n++){let i=m[n];if(!r.has(i))if(f){let n=new qy([i],new Yy(t,c[i]));if(d){u.issues?u.issues.push(n):u.issues=[n];continue}else return yield*Zh(new Xy(t,e,[n]))}else Iy(l,i,c[i])}}let h=Px(s?.concurrency),g=Wx(u,i,h);if(g&&(yield*g),o){let e=Ll();for(let n=0;n<a;n++){let r=t.indexSignatures[n],i=Lx(c,r.parameter,s);for(let t=0;t<i.length;t++){let n=i[t];e.push([n,r])}}let n=o(u,e,h);n&&(yield*n)}if(u.issues)return yield*Zh(new Xy(t,e,u.issues));if(s.propertyOrder===`original`){let e=(m??Reflect.ownKeys(c)).concat(n),t={};for(let n of e)Object.hasOwn(l,n)&&Iy(t,n,l[n]);return B(t)}return B(l)})}_rebuild(t,n,r,i,a){let o=TS(this.propertySignatures,e=>{let n=t(e.type);return n===e.type?e:new Rx(e.name,n)}),s=TS(this.indexSignatures,e=>{let i=n(e.parameter),a=t(e.type),o=r?e.merge?.flip():e.merge;return i===e.parameter&&a===e.type&&o===e.merge?e:new Hx(i,a,o)});return o===this.propertySignatures&&s===this.indexSignatures&&i===this.checks&&a===this.encodingChecks?this:new e(o,s,this.annotations,i,void 0,this.context,a)}flip(e){return this._rebuild(e,e,!0,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,!1,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}},Wx=wp()({onItem(e,t){let n=Object.hasOwn(e.input,t.name)?B(e.input[t.name]):Tc();return t.parser(n,e.options)},step(e,t,n){if(n._tag===`Failure`)return Fx(e,e.ast,t.name,n);if(n.value._tag===`Some`)Iy(e.out,t.name,n.value.value);else if(!NS(t.type)){let n=new qy([t.name],new Jy(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}else return Pm(new Xy(e.ast,e.oinput,[n]))}}});function Gx(e,t){return e?t?[...e,...t]:e:t}function Kx(e,t,n){return new Ux(Reflect.ownKeys(e).map(t=>new Rx(t,e[t].ast)),[],n,t)}function qx(e){return e.ast}function Jx(e,t=void 0){return new jx(!1,e.map(e=>e.ast),[],void 0,t)}function Yx(e,t,n){return new nS(e.map(qx),t,void 0,n)}function Xx(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`object`,`array`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(Xx)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function Zx(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[`~sentinels`];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!NS(t)){if(ax(t))return[{key:e.name,literal:t.literal}];if(ox(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>ax(e)&&!NS(e)?[{key:t,literal:e.literal}]:[]);case`Suspend`:return Zx(e.thunk())}}var Qx=new WeakMap;function $x(e){let t=Qx.get(e);if(t)return t;t={};for(let n=0;n<e.length;n++){let r=e[n],i=FS(r);if(ix(i))continue;let a=Xx(i),o=Zx(i);t.byType??={};for(let e of a)(t.byType[e]??=[]).push(n);if(o.length>0){t.bySentinel??=new Map;for(let{key:e,literal:r}of o){let i=t.bySentinel.get(e);i||t.bySentinel.set(e,i=new Map);let a=i.get(r);a||i.set(r,a=[]),a.push(n)}}else{t.otherwise??={};for(let e of a)(t.otherwise[e]??=[]).push(n)}}return Qx.set(e,t),t}function eS(e){return t=>{let n=FS(t);return n._tag===`Literal`?n.literal===e:n._tag!==`UniqueSymbol`||n.symbol===e}}function tS(e,t){let n=$x(t),r=e===null?`null`:Array.isArray(e)?`array`:typeof e;if(n.bySentinel){let i=n.otherwise?.[r]??[];if(r===`object`||r===`array`){let r=new Set(i);for(let[t,i]of n.bySentinel)if(Object.hasOwn(e,t)){let n=i.get(e[t]);if(n)for(let e of n)r.add(e)}return Array.from(r).sort((e,t)=>e-t).map(e=>t[e]).filter(eS(e))}return i.map(e=>t[e])}return(n.byType?.[r]??[]).map(e=>t[e]).filter(eS(e))}var nS=class e extends hx{_tag=`Union`;types;mode;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.mode=t,this.encodingChecks=o}getParser(e){let t=this;return(n,r)=>{if(n._tag===`None`)return V(n);let i=n.value,a=tS(i,t.types),o={ast:t,recur:e,oinput:n,input:i,out:void 0,successes:[],issues:void 0,options:r},s=Px(r?.concurrency),c=rS(o,a,s?{...s,orderedStep:!0}:void 0);return c?ig(c,e=>o.out?V(o.out):Zh(new eb(t,i,o.issues??[]))):o.out?V(o.out):Zh(new eb(t,i,o.issues??[]))}}_rebuild(t,n,r){let i=TS(this.types,t);return i===this.types&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.mode,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=FS(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(ax);if(t.length>0)return`${oS(n.isMutable)}[ ${t.map(t=>e(t)+sS(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>ax(e.type));if(t.length>0)return`{ ${t.map(t=>`${oS(t.type.context?.isMutable)}${Ao(t.name)}${sS(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}},rS=wp()({onItem(e,t){return e.recur(t)(e.oinput,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=gb(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.ast.mode===`oneOf`)return e.successes.push(t),Pm(new tb(e.ast,e.input,e.successes));if(e.out=n.value,e.successes.push(t),e.ast.mode===`anyOf`)return Fm}}}),iS=new nS([new wx(`Infinity`),new wx(`-Infinity`),new wx(`NaN`)],`anyOf`),aS=new dx(new nS([kx,iS],`anyOf`),new Ib(kb(),Cb(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function oS(e){return e?``:`readonly `}function sS(e){return e?`?`:``}function cS(e){let t=!1,n;return()=>t?n:(n=e(),t=!0,n)}var lS=class e extends hx{_tag=`Suspend`;thunk;constructor(e,t,n,r,i){if(n!==void 0)throw Error(`Cannot add checks to Suspend`);super(t,void 0,r,i),this.thunk=cS(e)}getParser(e){return e(this.thunk())}recur(t){return new e(()=>t(this.thunk()),this.annotations,void 0,void 0,this.context)}getExpected(e){return e(this.thunk())}},uS=class e extends da{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(t){return new e(this.run,{...this.annotations,...t},this.aborted)}abort(){return new e(this.run,this.annotations,!0)}and(e,t){return new dS([this,e],t)}},dS=class e extends da{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(t){return new e(this.checks,{...this.annotations,...t})}and(t,n){return new e([this,t],n)}};function fS(e,t,n=!1){return new uS((t,n,r)=>ib(t,n,e(t,n,r)),t,n)}function pS(e,t){let n=e.source;return fS(t=>e.test(t),{expected:`a string matching the RegExp ${n}`,meta:{_tag:`isPattern`,regExp:e},arbitrary:{constraint:{patterns:[e.source]}},...t})}function mS(e,t){let n=Object.getOwnPropertyDescriptors(e);return t(n),Object.create(Object.getPrototypeOf(e),n)}function hS(e,t){return e.encoding===t?e:mS(e,e=>{e.encoding.value=t})}function gS(e,t){return e.context===t?e:mS(e,e=>{e.context.value=t})}function _S(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return vS(e,Dl(e.checks.slice(0,-1),n.annotate(t)))}return mS(e,e=>{e.annotations.value={...e.annotations.value,...t}})}function vS(e,t){if(e._tag===`Suspend`&&t!==void 0)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:mS(e,e=>{e.checks.value=t})}function yS(e,t){return vS(e,Gx(e.checks,t))}function bS(e,t){let n=e,r=n[n.length-1],i=t(r.to);return i===r.to?e:Dl(e.slice(0,e.length-1),new dx(i,r.transformation))}function xS(e){return t=>t.encoding?hS(t,bS(t.encoding,e)):t}function SS(e){function t(n){return n.encoding?hS(n,bS(n.encoding,t)):e(n)}return xa(t)}function CS(e,t,n){let r=new dx(e,t);return hS(n,n.encoding?[...n.encoding,r]:[r])}function wS(e,t){let n=Py(e);return _S(e,{brands:n?[...n,t]:[t]})}function TS(e,t){let n=!1,r=Array(e.length);for(let i=0;i<e.length;i++){let a=e[i],o=t(a);o!==a&&(n=!0),r[i]=o}return n?r:e}function ES(e,t){return gS(e,e.context?new px(e.context.isOptional,e.context.isMutable,e.context.defaultValue,{...e.context.annotations,...t}):new px(!1,!1,void 0,t))}var DS=xS(OS);function OS(e){return DS(gS(e,e.context?e.context.isOptional===!1?new px(!0,e.context.isMutable,e.context.defaultValue,e.context.annotations):e.context:new px(!0,!1)))}function kS(e,t){let n=[new dx(Cx,new Ib(Db(t),xb()))];return gS(e,e.context?new px(e.context.isOptional,e.context.isMutable,n,e.context.annotations):new px(!1,!1,n))}function AS(e,t,n){return CS(e,n,t)}function jS(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:Oa(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function MS(e,t,n){let{literals:r,parameters:i}=jS(e);return new Ux(r.map(e=>new Rx(e,t)),i.map(e=>new Hx(e,t,n)))}function NS(e){return e.context?.isOptional??!1}var PS=xa(e=>{if(e.encoding)return PS(hS(e,void 0));let t=e,n=t.recur?.(PS)??t,r=n.encodingChecks;return r?mS(n,t=>{t.encodingChecks.value=void 0,n===e&&(t.checks.value=Gx(n.checks,r))}):n}),FS=xa(e=>PS(LS(e)));function IS(e,t){let n=t,r=n.length,i=n[r-1],a=[new dx(LS(hS(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new dx(LS(n[e-1].to),n[e].transformation.flip()));let o=LS(i.to);return o.encoding?hS(o,[...o.encoding,...a]):hS(o,a)}var LS=xa(e=>{if(e.encoding)return IS(e,e.encoding);let t=e;return t.flip?.(LS)??t.recur?.(LS)??t});function RS(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(RS);default:return!1}}function zS(e,t){let n=Wh(t);return r=>r._tag===`None`?Uh:r.value===t?n:Zh(new Zy(e,r))}function BS(e){let t=Wh(e);return e=>e._tag===`None`?Uh:t}function VS(e,t){return n=>n._tag===`None`?Uh:t(n.value)?V(n):Zh(new Zy(e,n))}function HS(e,t,n){if(n?.disableChecks||e.checks===void 0)return t;let r=[];return ZS(e.checks,t,r,e,n),r.length===0?t:void 0}var US=SS(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(US)}}),WS=SS(e=>{switch(e._tag){default:return e;case`Symbol`:case`UniqueSymbol`:return e.toCodecStringTree();case`Union`:return e.recur(WS)}}),GS=new globalThis.RegExp(`^${Ix}$`),KS=new globalThis.RegExp(`(?:${Ix}|Infinity|-Infinity|NaN)`);function qS(e){return pS(GS,{expected:`a string representing a finite number`,meta:{_tag:`isStringFinite`,regExp:GS},...e})}var JS=yS(Ex,[qS()]),YS=new dx(JS,Ub),XS=new dx(new nS([JS,iS],`anyOf`),Ub);function ZS(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`)ZS(o.checks,t,n,r,i);else{let e=o.run(t,r,i);if(e&&(n.push(new Gy(t,o,e)),o.aborted||i?.errors!==`all`))return}}}var QS=`~effect/Schema/Class`,$S=`~structural`,eC=My,tC=Ny;function nC(e){let t=new Set,n=new Set;return r(e);function r(e){if(e===null||typeof e==`string`||typeof e==`boolean`)return!0;if(typeof e==`number`)return globalThis.Number.isFinite(e);if(typeof e!=`object`||e===void 0||t.has(e))return!1;if(n.has(e))return!0;let i=Array.isArray(e);if(!i){let t=Object.getPrototypeOf(e);if(t!==null&&Object.getPrototypeOf(t)!==null)return!1}t.add(e);let a=i?e.every(r):Object.keys(e).every(t=>r(e[t]));return t.delete(e),a&&n.add(e),a}}var rC=new gx([],()=>(e,t)=>nC(e)?V(e):Zh(new Zy(t,B(e))),{typeConstructor:{_tag:`effect/Json`},generation:{runtime:`Schema.Json`,Type:`Schema.Json`},expected:`JSON value`,toCodecJson:()=>new dx(Cx,Hb()),toArbitrary:()=>e=>e.jsonValue()}),iC=new dx(_x,new Ib(xb(),Cb(()=>null))),aC=new dx(rC,Hb());function oC(e){let t=new Set;return n(e);function n(e){return e===void 0||typeof e==`string`?!0:typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Array.isArray(e)?e.every(n):Object.keys(e).every(t=>n(e[t])))}}var sC=new dx(new gx([],()=>(e,t)=>oC(e)?V(e):Zh(new Zy(t,B(e))),{expected:`StringTree`}),Hb()),cC=e=>e,lC=z(2,(e,t)=>e===void 0?void 0:t(e)),uC=xa(e=>{switch(e._tag){case`Declaration`:{let t=e.annotations?.[QS];if(ka(t)){let n=t(e.typeParameters),r=uC(n.to);return hS(e,r===n.to?[n]:[new dx(r,n.transformation)])}return e}case`Objects`:case`Arrays`:return e.recur(e=>{let t=e.context?.defaultValue;return t?hS(uC(e),t):uC(e)});case`Suspend`:return e.recur(uC);default:return e}});function dC(e){let t=yC(uC(PS(e.ast)));return(e,n)=>t(e,n?.disableChecks?n?.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions)}function fC(e){let t=dC(e);return(e,n)=>{let r=Hg(t(e,n));return Im(r)?B(r.value):(_b(r.cause,`Option adapter can only return none for schema issues`),Tc())}}function pC(e){let t=dC(e);return(e,n)=>{let r=Hg(t(e,n));if(Im(r))return r.value;let i=_b(r.cause,`Constructor adapter can only throw schema issues`);throw Error(i.toString(),{cause:i})}}function mC(e,t){let n=yC(e.ast);return t===void 0?n:(e,r)=>n(e,vC(t,r))}function hC(e,t){return xC(mC(e,t))}var gC=hC;function _C(e,t){let n=yC(LS(e.ast));return t===void 0?n:(e,r)=>n(e,vC(t,r))}var vC=(e,t)=>t===void 0?e:{...e,...t};function yC(e){let t=CC(e);return(e,n)=>qg(t(B(e),n??fx),e=>e._tag===`None`?Zh(new Qy(e)):V(e.value))}function bC(e){return(t,n)=>Hg(e(t,n))}function xC(e){let t=bC(e);return(e,n)=>{let r=t(e,n);return Im(r)?B(r.value):(_b(r.cause,`Option adapter can only return none for schema issues`),Tc())}}function SC(e,t){return pg(e,e=>$h(()=>bm(e,t)))}var CC=xa(e=>{let t,n=e.checks,r=e.encoding,i=r,a=i?.length??0,o=e.encodingChecks,s=(n?n[n.length-1].annotations:e.annotations)?.parseOptions;if(!e.context&&!r&&!n&&!o)return(n,r)=>(t??=e.getParser(CC),s&&(r={...r,...s}),t(n,r));let c=sx(e)||cx(e)||tx(e)&&e.typeParameters.length>0,l=n&&c?n.filter(e=>e.annotations?.[$S]):void 0;return(r,c)=>{s&&(c={...c,...s});let u;if(i){for(let e=a-1;e>=0;e--){let t=i[e],n=t.to,a=CC(n);if(u=u?qg(u,e=>a(e,c)):a(r,c),t.transformation._tag===`Transformation`){let e=t.transformation.decode;u=qg(u,t=>e.run(t,c))}else u=t.transformation.decode(u,c)}u=SC(u,t=>new Ky(e,r,t))}t??=e.getParser(CC);let d=r=>{let i=t(r,c);return o&&!c?.disableChecks&&(i=qg(i,t=>{if(Oc(r)&&Oc(t)){let t=[];if(ZS(o,r.value,t,e,c),kl(t))return Zh(new Xy(e,r,t))}return V(t)})),n&&!c?.disableChecks&&(c?.errors===`all`&&l&&l.length>0&&Oc(r)&&(i=SC(i,t=>{let n=[];return ZS(l,r.value,n,e,c),kl(n)?t._tag===`Composite`&&t.ast===e?new Xy(e,t.actual,[...t.issues,...n]):new Xy(e,r,[t,...n]):t})),i=qg(i,t=>{if(Oc(t)){let r=t.value,i=[];if(ZS(n,r,i,e,c),kl(i))return Zh(new Xy(e,t,i))}return V(t)})),i};return u?qg(u,d):d(r)}}),wC=`~effect/SchemaError/SchemaError`,TC=class extends Eh(`SchemaError`){[wC]=wC;constructor(e){super({issue:e})}get message(){return this.issue.toString()}toString(){return`SchemaError(${this.message})`}};function EC(e){return Ia(e,wC)}var DC=`~effect/Schema/Schema`,OC={[DC]:DC,pipe(){return la(this,arguments)},annotate(e){return this.rebuild(_S(this.ast,e))},annotateKey(e){return this.rebuild(ES(this.ast,e))},check(...e){return this.rebuild(yS(this.ast,e))}};function kC(e,t){let n=Object.create(OC);t&&Object.assign(n,t),n.ast=e,n.rebuild=e=>kC(e,t);let r=dC(n);return n.makeEffect=(e,t)=>AC(r(e,t)),n.make=pC(n),n.makeOption=fC(n),n}function AC(e){return pg(e,e=>$h(()=>bm(e,e=>new TC(e))))}var jC=NC(MC);function MC(e){switch(e._tag){case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}}function NC(e){return t=>{let n=new Map;for(let e=0;e<t.length;e++)n.set(FS(t[e]),e);let r=[...t].sort((t,r)=>{t=FS(t),r=FS(r);let i=e(t),a=e(r);return i===a?n.get(t)-n.get(r):i-a});return r.some((e,n)=>e!==t[n])?r:t}}var PC=DC;function FC(){return(e,t,n)=>qC(new gx(e.map(qx),e=>t(e.map(e=>qC(e))),n))}function IC(e,t){return FC()([],()=>(t,n)=>e(t)?V(t):Zh(new Zy(n,B(t))),t)}function LC(e,t){let n=mC(e,t);return(e,t)=>AC(n(e,t))}var RC=LC;function zC(e,t){let n;for(let r of e.reasons){if(!fm(r)||!EC(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function BC(e){let t=Hg(e);if(Im(t))return t.value;throw zC(t.cause,`Sync adapter can only throw schema errors`)}var VC=gC;function HC(e,t){let n=LC(e,t);return(e,t)=>BC(n(e,t))}var UC=HC;function WC(e,t){let n=_C(e,t);return(e,t)=>AC(n(e,t))}function GC(e,t){let n=WC(e,t);return(e,t)=>BC(n(e,t))}var KC=GC,qC=kC;function JC(e){return Ia(e,PC)&&e[PC]===PC}var YC=cC(e=>qC(OS(e.ast),{schema:e})),H=cC(e=>YC(mw(e))),XC=cC(e=>qC(PS(e.ast),{schema:e})),ZC=cC(e=>qC(FS(e.ast),{schema:e}));function QC(e){let t=qC(new wx(e),{literal:e,transform(n){return t.pipe(vw(QC(n),{decode:Cb(()=>n),encode:Cb(()=>e)}))}});return t}var $C=qC(Sx),ew=qC(Cx),tw=qC(_x),nw=qC(bx),U=qC(Ex),W=qC(kx),rw=qC(Ax),iw=qC(xx);function aw(e,t){return qC(e,{fields:t,mapFields(e,t){let n=e(this.fields);return aw(Kx(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function G(e){return aw(Kx(e,void 0),e)}function ow(e,t,n){let r=n?.keyValueCombiner?.decode||n?.keyValueCombiner?.encode?new zx(n.keyValueCombiner.decode,n.keyValueCombiner.encode):void 0;return qC(MS(e.ast,t.ast,r),{key:e,value:t})}function sw(e,t){return qC(e,{elements:t,mapElements(e,t){let n=e(this.elements);return sw(Jx(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function cw(e){return sw(Jx(e),e)}var K=cC(e=>qC(new jx(!1,[],[e.ast]),{value:e})),lw=cC(e=>qC(new jx(!1,[e.ast],[e.ast]),{value:e}));function uw(e,t){return qC(e,{members:t,mapMembers(e,t){let n=e(this.members);return uw(Yx(n,this.ast.mode,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function dw(e,t){return uw(Yx(e,t?.mode??`anyOf`,void 0),e)}function fw(e){let t=e.map(QC);return qC(Yx(t,`anyOf`,void 0),{literals:e,members:t,mapMembers(e){return dw(e(this.members))},pick(e){return fw(e)},transform(e){return dw(t.map((t,n)=>t.transform(e[n])))}})}var pw=cC(e=>dw([e,tw])),mw=cC(e=>dw([e,nw]));function hw(e){return qC(new lS(()=>e().ast))}function gw(...e){return t=>t.check(...e)}function _w(e){return t=>qC(wS(t.ast,e),{schema:t,identifier:e})}function vw(e,t){return n=>qC(AS(n.ast,e.ast,t?Rb(t):Hb()),{from:n,to:e})}function yw(e,t){return n=>t?vw(n,t)(e):vw(n)(e)}function bw(e){return t=>qC(kS(t.ast,xw(e)),{schema:t})}function xw(e){return pg(e,e=>$h(()=>bm(e,e=>e.issue)))}function Sw(e,t){let n=t?.encodingStrategy===`omit`?Eb():xb();return t=>YC(ZC(t)).pipe(vw(t,{decode:Db(xw(e)),encode:n}))}function Cw(e,t){return n=>XC(n).pipe(Sw(e,t),yw(YC(n)))}function ww(e,t){let n=t?.encodingStrategy===`omit`?Eb():xb();return t=>H(ZC(t)).pipe(vw(t,{decode:Db(xw(e)),encode:n}))}function Tw(e,t){return n=>XC(n).pipe(ww(e,t),yw(H(n)))}function Ew(e){return QC(e).pipe(bw(V(e)))}function Dw(e,t){return G({_tag:Ew(e),...t})}function Ow(e,t){return IC(t=>t instanceof e,t)}function kw(){return(e,t)=>new dx(e.ast,Rb(t))}var Aw=fS,jw=pS;function Mw(e){return Aw(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,meta:{_tag:`isFinite`},arbitrary:{constraint:{noInfinity:!0,noNaN:!0}},...e})}function Nw(e){let t=wc(e.order),n=e.formatter??Oo;return(r,i)=>Aw(e=>t(e,r),{expected:`a value greater than or equal to ${n(r)}`,arbitrary:{constraint:{ordered:{order:e.order,minimum:r}}},...e.annotate?.(r),...i})}function Pw(e){let t=wc(e.order),n=Sc(e.order),r=Cc(e.order),i=xc(e.order),a=e.formatter??Oo;return(o,s)=>{let c=o.exclusiveMinimum?n:t,l=o.exclusiveMaximum?i:r;return Aw(e=>c(e,o.minimum)&&l(e,o.maximum),{expected:`a value between ${a(o.minimum)}${o.exclusiveMinimum?` (excluded)`:``} and ${a(o.maximum)}${o.exclusiveMaximum?` (excluded)`:``}`,arbitrary:{constraint:{ordered:{order:e.order,minimum:o.minimum,maximum:o.maximum,...o.exclusiveMinimum&&{exclusiveMinimum:!0},...o.exclusiveMaximum&&{exclusiveMaximum:!0}}}},...e.annotate?.(o),...s})}}var Fw=Nw({order:vc,annotate:e=>({meta:{_tag:`isGreaterThanOrEqualTo`,minimum:e}})}),Iw=Pw({order:vc,annotate:e=>({meta:{_tag:`isBetween`,...e}})});function Lw(e){return qC(FC()([e],([e])=>(t,n,r)=>Ec(t)?Dc(t)?Uh:Kg(mC(e)(t.value,r),{onSuccess:B,onFailure:e=>new Xy(n,B(t),[new qy([`value`],e)])}):Zh(new Zy(n,B(t))),{typeConstructor:{_tag:`effect/Option`},generation:{runtime:`Schema.Option(?)`,Type:`Option.Option<?>`,importDeclaration:`import * as Option from "effect/Option"`},expected:`Option`,toCodec:([e])=>kw()(dw([G({_tag:QC(`Some`),value:e}),G({_tag:QC(`None`)})]),Bb({decode:e=>e._tag===`None`?Tc():B(e.value),encode:e=>Oc(e)?{_tag:`Some`,value:e.value}:{_tag:`None`}})),toArbitrary:([e])=>(t,n)=>{let r=t.constant(Tc());return Xw(t,n,r,t.oneof(r,e.arbitrary.map(B)))},toEquivalence:([e])=>Bc(e),toFormatter:([e])=>kc({onNone:()=>`none()`,onSome:t=>`some(${e(t)})`})}).ast,{value:e})}function Rw(e,t){return qC(FC()([e,t],([e,t])=>(n,r,i)=>{if(!dm(n))return Zh(new Zy(r,B(n)));switch(n._tag){case`Fail`:return Kg(mC(e)(n.error,i),{onSuccess:_m,onFailure:e=>new Xy(r,B(n),[new qy([`error`],e)])});case`Die`:return Kg(mC(t)(n.defect,i),{onSuccess:vm,onFailure:e=>new Xy(r,B(n),[new qy([`defect`],e)])});case`Interrupt`:return V(n)}},{typeConstructor:{_tag:`effect/Cause/Failure`},generation:{runtime:`Schema.CauseReason(?, ?)`,Type:`Cause.Failure<?, ?>`,importDeclaration:`import * as Cause from "effect/Cause"`},expected:`Cause.Failure`,toCodec:([e,t])=>kw()(dw([G({_tag:QC(`Fail`),error:e}),G({_tag:QC(`Die`),defect:t}),G({_tag:QC(`Interrupt`),fiberId:mw(oT)})]),Bb({decode:e=>{switch(e._tag){case`Fail`:return _m(e.error);case`Die`:return vm(e.defect);case`Interrupt`:return ym(e.fiberId)}},encode:fa})),toArbitrary:([e,t])=>zw(e,t),toEquivalence:([e,t])=>Bw(e,t),toFormatter:([e,t])=>Vw(e,t)}).ast,{error:e,defect:t})}function zw(e,t){return(n,r)=>{let i=n.constant(ym());return Xw(n,r,i,n.oneof(i,n.integer({min:1}).map(ym),e.arbitrary.map(e=>_m(e)),t.arbitrary.map(e=>vm(e))))}}function Bw(e,t){return(n,r)=>{if(n._tag!==r._tag)return!1;switch(n._tag){case`Fail`:return e(n.error,r.error);case`Die`:return t(n.defect,r.defect);case`Interrupt`:return n.fiberId===r.fiberId}}}function Vw(e,t){return n=>{switch(n._tag){case`Fail`:return`Fail(${e(n.error)})`;case`Die`:return`Die(${t(n.defect)})`;case`Interrupt`:return`Interrupt`}}}function Hw(e,t){return qC(FC()([e,t],([e,t])=>{let n=K(Rw(e,t));return(e,t,r)=>um(e)?Kg(mC(n)(e.reasons,r),{onSuccess:pm,onFailure:n=>new Xy(t,B(e),[new qy([`failures`],n)])}):Zh(new Zy(t,B(e)))},{typeConstructor:{_tag:`effect/Cause`},generation:{runtime:`Schema.Cause(?, ?)`,Type:`Cause.Cause<?, ?>`,importDeclaration:`import * as Cause from "effect/Cause"`},expected:`Cause`,toCodec:([e,t])=>kw()(K(Rw(e,t)),Bb({decode:pm,encode:({reasons:e})=>e})),toArbitrary:([e,t])=>Uw(e,t),toEquivalence:([e,t])=>Ww(e,t),toFormatter:([e,t])=>Gw(e,t)}).ast,{error:e,defect:t})}function Uw(e,t){return(n,r)=>{let i=zw(e,t)(n,r);return Xw(n,r,n.constant(mm),n.array(i.arbitrary).map(pm))}}function Ww(e,t){let n=Zs(Bw(e,t));return(e,t)=>n(e.reasons,t.reasons)}function Gw(e,t){let n=Vw(e,t);return e=>`Cause([${e.reasons.map(n).join(`, `)}])`}var Kw=e=>e?.includeStack===!0|(e?.excludeCause===!0?2:0),qw=e=>{switch(e){case 0:return;case 1:return{includeStack:!0};case 2:return{excludeCause:!0};case 3:return{includeStack:!0,excludeCause:!0}}},Jw=[];function Yw(e){let t=Kw(e),n=Jw[t];if(n!==void 0)return n;let r=NT.pipe(vw(ew,Zb(qw(t))));return Jw[t]=r,r}function Xw(e,t,n,r){return{arbitrary:n===void 0||t.recursion===void 0?r:e.oneof(t.recursion,n,r),terminal:n}}function Zw(e,t,n,r){return r===void 0?e.array(t,n):e.uniqueArray(t,{...n,comparator:r})}function Qw(e,t,n,r,i,a){let o=t.constraint,s=o===void 0||o.minLength===void 0&&o.maxLength===void 0?void 0:{...o.minLength===void 0?{}:{minLength:o.minLength},...o.maxLength===void 0?{}:{maxLength:o.maxLength}};if(s?.minLength!==void 0&&s.maxLength!==void 0&&s.minLength>s.maxLength)throw new globalThis.Error(`Unable to derive an arbitrary for size constraints`);let c=s?.minLength??0,l=Xw(e,t,c===0?e.constant([]):r===void 0?void 0:Zw(e,r,{...s,maxLength:c},a),Zw(e,n,s,a));return{arbitrary:l.arbitrary.map(i),terminal:l.terminal?.map(i)}}function $w(e){return qC(FC()([e],([e])=>{let t=K(e);return(e,n,r)=>n_(e)?Kg(mC(t)(Tl(e),r),{onSuccess:o_,onFailure:t=>new Xy(n,B(e),[new qy([`values`],t)])}):Zh(new Zy(n,B(e)))},{typeConstructor:{_tag:`effect/Chunk`},generation:{runtime:`Schema.Chunk(?)`,Type:`Chunk.Chunk<?>`},expected:`Chunk`,toCodec:([e])=>kw()(K(e),Bb({decode:o_,encode:Tl})),toArbitrary:([e])=>(t,n)=>Qw(t,n,e.arbitrary,e.terminal,o_),toEquivalence:([e])=>Qg(e),toFormatter:([e])=>t=>{let n=d_(t);return n===0?`Chunk(0) {}`:`Chunk(${n}) { ${globalThis.Array.from(t).sort().map(t=>`${e(t)}`).join(`, `)} }`}}).ast,{value:e})}globalThis.RegExp,globalThis.URL;function eT(e,t,n,r){let i={...n};if(delete i.valid,(n?.valid||e?.valid)&&(i.noInvalidDate=!0),t?.minimum!==void 0){let e=r===void 0?t.minimum:r(t.minimum),n=t.exclusiveMinimum?new globalThis.Date(e.getTime()+1):e;(i.min===void 0||n.getTime()>i.min.getTime())&&(i.min=n)}if(t?.maximum!==void 0){let e=r===void 0?t.maximum:r(t.maximum),n=t.exclusiveMaximum?new globalThis.Date(e.getTime()-1):e;(i.max===void 0||n.getTime()<i.max.getTime())&&(i.max=n)}return i}var tT=U.annotate({expected:`a string in ISO 8601 format that will be decoded as a Date`}),nT=Ow(globalThis.Date,{typeConstructor:{_tag:`Date`},generation:{runtime:`Schema.Date`,Type:`globalThis.Date`},expected:`Date`,toCodecJson:()=>kw()(tT,Wb),toArbitrary:()=>(e,t)=>e.date(eT(t?.constraint,t?.constraint?.ordered?.order===bc?t.constraint.ordered:void 0))}),rT=tT.pipe(vw(nT,Wb)),iT=aT(ew);function aT(e){let t=tC(e.ast);return U.annotate({identifier:t===void 0?void 0:`${t}JsonString`,expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`,contentSchema:FS(e.ast)}).pipe(vw(e,$b))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams;var oT=W.check(Mw()),sT=U.annotate({expected:`a string that will be decoded as a number`}).pipe(vw(W,Ub)),cT=U.annotate({expected:`a base64 encoded string that will be decoded as Uint8Array`,format:`byte`,contentEncoding:`base64`}),lT=Ow(globalThis.Uint8Array,{typeConstructor:{_tag:`Uint8Array`},generation:{runtime:`Schema.Uint8Array`,Type:`globalThis.Uint8Array`},expected:`Uint8Array`,toCodecJson:()=>kw()(cT,Qb),toArbitrary:()=>e=>e.uint8Array()}),uT=globalThis.Symbol.for(`immer-draftable`),dT={};function fT(e,t,n,r,i){let a=hT(n,t,r),o=mT(t),s=class extends e{constructor(...[e,t]){let r=t?.[`~payload`],i=r?.token===dT?r.value:n.make(e??{},t);super(i,{...t,disableChecks:!0,"~payload":{token:dT,value:i}})}static[PC]=PC;get[o](){return o}static[uT]=!0;static identifier=t;static fields=n.fields;static get ast(){return a(this).ast}static pipe(){return la(this,arguments)}static rebuild(e){return a(this).rebuild(e)}static make(e,t){return new this(e,t)}static makeOption(e,t){return fC(a(this))(e??{},t)}static makeEffect(e,t){return a(this).makeEffect(e??{},t)}static annotate(e){return this.rebuild(_S(this.ast,e))}static annotateKey(e){return this.rebuild(ES(this.ast,e))}static check(...e){return this.rebuild(yS(this.ast,e))}static extend(e){return(t,r)=>{let a=gT(t)?t:G(t),o={...n.fields,...a.fields},s=Kx(o,n.ast.checks,{identifier:e});return fT(this,e,aw(yS(s,a.ast.checks),o),r,i)}}static mapFields(e,t){return n.mapFields(e,t)}};return i!==void 0&&Object.assign(s.prototype,i(t)),s}function pT(e){return new Ib(Cb(t=>new e(t)),xb())}function mT(e){return`~effect/Schema/Class/${e}`}function hT(e,t,n){let r;return i=>{if(r!==void 0)return r;let a=pT(i);return r=vw(qC(new gx([e.ast],()=>(e,n)=>e instanceof i||Ia(e,mT(t))?V(e):Zh(new Zy(n,B(e))),{identifier:t,[QS]:([e])=>new dx(e,a),toCodec:([e])=>new dx(e.ast,a),toArbitrary:([e])=>()=>({arbitrary:e.arbitrary.map(e=>new i(e)),terminal:e.terminal?.map(e=>new i(e))}),toFormatter:([e])=>t=>`${i.identifier}(${e(t)})`,"~sentinels":Zx(e.ast),...n})),a)(e)}}function gT(e){return JC(e)}var _T=e=>(t,n)=>fT(Sh,e,gT(t)?t:G(t),n,e=>({toString(){return`${e}(${Oo({...this})})`}})),vT=e=>(t,n)=>fT(As,e,gT(t)?t:G(t),n,e=>({name:e})),yT=e=>(t,n,r)=>{let i=gT(n)?n.mapFields(e=>({_tag:Ew(t),...e}),{unsafePreserveChecks:!0}):Dw(t,n);return vT(e??t)(i,r)};function bT(e){return qC(xT(e.ast),{schema:e})}var xT=SS(e=>{let t=ST(e,xT);return t!==e&&NS(e)?DS(t):t});function ST(e,t){switch(e._tag){case`Declaration`:{let n=e.annotations?.toCodecJson??e.annotations?.toCodec;if(ka(n)){let r=n(tx(e)?e.typeParameters.map(e=>kC(FS(e))):[]),i=t(r.to);return hS(e,i===r.to?[r]:[new dx(i,r.transformation)])}return hS(e,[iC])}case`Unknown`:case`ObjectKeyword`:return hS(e,[aC]);case`Undefined`:case`Void`:case`Literal`:case`Number`:return e.toCodecJson();case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e});return e.recur(t,WS);case`Union`:{let n=jC(e.types);return n===e.types?e.recur(t):new nS(n,e.mode,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}function CT(e){return qC(jT(e.ast),{schema:e})}function wT(e){switch(e._tag){case`Null`:case`Boolean`:case`Number`:case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}}var TT=NC(wT);function ET(e,t,n){switch(e._tag){case`Declaration`:{let r=e.annotations?.toCodecJson??e.annotations?.toCodec;if(ka(r)){let n=r(tx(e)?e.typeParameters.map(e=>qC(t(FS(e)))):[]),i=t(n.to);return hS(e,i===n.to?[n]:[new dx(i,n.transformation)])}return n(e)}case`Null`:return hS(e,[DT]);case`Boolean`:return hS(e,[OT]);case`Unknown`:case`ObjectKeyword`:return hS(e,[sC]);case`Enum`:case`Number`:case`Literal`:case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e});return e.recur(t,WS);case`Union`:{let n=TT(e.types);return n===e.types?e.recur(t):new nS(n,e.mode,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}var DT=new dx(new wx(`null`),new Ib(Cb(()=>null),Cb(()=>`null`))),OT=new dx(new nS([new wx(`true`),new wx(`false`)],`anyOf`),new Ib(Cb(e=>e===`true`),Ob())),kT=`~effect/Schema/SERIALIZER_ENSURE_ARRAY`,AT=e=>lx(e)&&e.annotations?.[kT]===!0,jT=SS(e=>{if(AT(e))return e;let t=ET(e,jT,e=>hS(e,[MT]));return t!==e&&NS(e)?DS(t):t}),MT=new dx(bx,new Ib(xb(),Cb(()=>void 0))),NT=qC(rC),PT=`~effect/Stream`,FT={_R:fa,_E:fa,_A:fa},IT={[PT]:FT,pipe(){return la(this,arguments)}},LT=e=>{let t=Object.create(IT);return t.channel=e,t},RT=`~effect/Stream`,zT=e=>Ia(e,RT),BT=LT,VT=(e,t)=>BT(yv((n,r)=>ig(qv(e.channel,r),e=>t(e,r)))),HT=e=>e.channel,UT=(e,t)=>BT(Tv(e,t)),WT=BT(Dv),GT=e=>BT(Ev(()=>e().channel)),KT=e=>BT(Ov(e)),qT=e=>BT(kv(e)),JT=e=>BT(jv(e)),YT=e=>BT(yv(Ug(function*(t,n){let r=e.evaluate().getReader();return yield*Jm(n,e.releaseLockOnEnd?Kh(()=>r.releaseLock()):Vh(()=>r.cancel().catch(va))),ig(Hh({try:()=>r.read(),catch:t=>e.onError(t)}),({done:e,value:t})=>e?Am():V(Rl(t)))}))),XT=e=>BT(Bv(lg(e,HT))),ZT=z(2,(e,t)=>GT(()=>{let n=0;return BT(Mv(e.channel,zl(e=>t(e,n++))))})),QT=z(e=>zT(e[0]),(e,t,n)=>e.channel.pipe(Lv,Pv(t,n),Mv(Rl),BT)),$T=z(2,(e,t)=>BT(Rv(HT(e),t))),eE=z(2,(e,t)=>BT(zv(e.channel,t))),tE=z(e=>zT(e[0]),(e,t)=>GT(()=>{let n=new TextDecoder(t?.encoding);return ZT(e,e=>n.decode(e,{stream:!0}))})),nE=z(2,(e,t)=>BT(Hv(e.channel,t))),rE=z(2,(e,t)=>BT(Wv(e.channel,t))),iE=z(2,(e,t)=>Gv(e.channel,t)),aE=e=>Kv(e.channel),oE=z(e=>zT(e[0]),(e,t,n)=>{let r,i,a=__(!1);return new ReadableStream({start(n){i=Fg(vg(iE(e,e=>a.whenOpen(Kh(()=>{a.closeUnsafe();for(let t=0;t<e.length;t++)n.enqueue(e[t]);r(),r=void 0}))),t)),i.addObserver(e=>{e._tag===`Failure`?n.error(Sm(e.cause)):n.close()})},pull(){return new Promise(e=>{r=e,a.openUnsafe()})},cancel(){if(i)return Rg(dg(m_(i)))}},n?.strategy)}),sE=z(e=>zT(e[0]),(e,t)=>lg(gg(),n=>oE(e,n,t))),cE=`~effect/SubscriptionRef`,lE=e=>Ia(e,cE);({...Zo});var uE=e=>JT(e.pubsub),dE=e=>Kh(()=>e.value),fE=(e,t)=>{e.value=t,N_(e.pubsub,t)},pE=z(2,(e,t)=>e.semaphore.withPermit(Kh(()=>fE(e,t)))),mE=BigInt(1024);mE*mE*mE*mE*mE,Hc()(`effect/platform/FileSystem/WatchBackend`);var hE=class extends Hc()(`effect/reactivity/Reactivity`){},gE=Kh(()=>{let e=new Map,t=t=>{SE(t,t=>{let n=e.get(t);n!==void 0&&n.forEach(e=>e())})},n=e=>_g(n=>{let r=n.mapUnsafe.get(_E.key);return r?SE(e,e=>{r.add(e)}):t(e),qh}),r=(e,t)=>sg(t,n(e)),i=(t,n)=>{let r=[];return SE(t,t=>{r.push(t);let i=e.get(t);i===void 0&&(i=new Set,e.set(t,i)),i.add(n)}),()=>{for(let t=0;t<r.length;t++){let i=e.get(r[t]);i.delete(n),i.size===0&&e.delete(r[t])}}},a=(e,t)=>Xh(function*(){let n=yield*gg(),r=tl(n,Wm),a=yield*G_(),o=ba(Ig(n),g_(r)),s=!1,c=!1,l=e=>{e._tag===`Failure`?X_(a,e.cause):J_(a,e.value),c?(c=!1,o(t).addObserver(l)):s=!1};function u(){if(s){c=!0;return}s=!0,o(t).addObserver(l)}return yield*Jm(r,Kh(i(e,u))),u(),a});return hE.of({mutation:r,query:a,stream:(e,t)=>a(e,t).pipe(lg(qT),XT),invalidateUnsafe:t,invalidate:n,registerUnsafe:i,withBatch:t=>Gh(()=>{let n=new Set;return t.pipe(bg(_E,n),wg(t=>Kh(()=>{n.forEach(t=>{let n=e.get(t);n!==void 0&&n.forEach(e=>e())})})))})})}),_E=class extends Hc()(`effect/reactivity/Reactivity/PendingInvalidation`){},vE=z(2,(e,t)=>hE.use(n=>n.mutation(t,e))),yE=e=>hE.use(t=>t.invalidate(e)),bE=fh(hE)(gE);function xE(e){switch(typeof e){case`string`:case`number`:case`bigint`:case`boolean`:return String(e);default:return Ba(e)}}var SE=(e,t)=>{if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(xE(e[n]));return}for(let n in e){t(n);let r=e[n];for(let e=0;e<r.length;e++)t(`${n}:${xE(r[e])}`)}},CE=`~effect/reactivity/AsyncResult`,wE=e=>Ia(e,CE),TE={[CE]:{E:fa,A:fa},pipe(){return la(this,arguments)},[ro](e){if(this._tag!==e._tag||this.waiting!==e.waiting)return!1;switch(this._tag){case`Initial`:return!0;case`Success`:return io(this.value,e.value);case`Failure`:return io(this.cause,e.cause)}},[za](){let e=Ka(`${this._tag}:${this.waiting}`);return this._tag===`Initial`?e:Ha(e)(this._tag===`Success`?Ba(this.value):Ba(this.cause))}},EE=(e,t)=>e._tag===`Success`?ME(e.value):FE(e.cause,{previous:t}),DE=e=>e._tag===`None`?AE(!0):LE(e.value),OE=e=>e._tag===`Initial`,kE=e=>e._tag!==`Initial`,AE=(e=!1)=>{let t=Object.create(TE);return t._tag=`Initial`,t.waiting=e,t},jE=e=>e._tag===`Success`,ME=(e,t)=>{let n=Object.create(TE);return n._tag=`Success`,n.value=e,n.waiting=t?.waiting??!1,n.timestamp=t?.timestamp??Date.now(),n},NE=e=>e._tag===`Failure`,PE=(e,t)=>{let n=Object.create(TE);return n._tag=`Failure`,n.cause=e,n.previousSuccess=t?.previousSuccess??Tc(),n.waiting=t?.waiting??!1,n},FE=(e,t)=>PE(e,{previousSuccess:Lc(t.previous,e=>jE(e)?B(e):NE(e)?e.previousSuccess:Tc()),waiting:t.waiting}),IE=(e,t)=>FE(hm(e),t),LE=(e,t)=>{if(e.waiting)return t?.touch?RE(e):e;let n=Object.assign(Object.create(TE),e);return n.waiting=!0,t?.touch&&jE(n)&&(n.timestamp=Date.now()),n},RE=e=>jE(e)?ME(e.value,{waiting:e.waiting}):e,zE=(e,t)=>e._tag===`Failure`?FE(e.cause,{previous:t,waiting:e.waiting}):e,BE=e=>e._tag===`Success`?B(e.value):e._tag===`Failure`?Ic(e.previousSuccess,e=>e.value):Tc(),VE=e=>Fc(BE(e),()=>new Om(`AsyncResult.getOrThrow: no value found`)),HE=e=>{switch(e._tag){case`Success`:return Mm(e.value);case`Failure`:return Nm(e.cause);default:return Pm(new Om)}},UE=e=>new WE(e),WE=class{constructor(e){this.result=e}result;output=Tc();when(e,t){if(Dc(this.output)&&e(this.result)){let e=t(this.result);Oc(e)&&(this.output=e)}return this}pipe(){return la(this,arguments)}onWaiting(e){return this.when(e=>e.waiting,t=>B(e(t)))}onInitialOrWaiting(e){return this.when(e=>OE(e)||e.waiting,t=>B(e(t)))}onInitial(e){return this.when(OE,t=>B(e(t)))}onSuccess(e){return this.when(jE,t=>B(e(t.value,t)))}onFailure(e){return this.when(NE,t=>B(e(t.cause,t)))}onError(e){return this.onErrorIf(ma,e)}onErrorIf(e,t){return this.when(NE,n=>wm(n.cause).pipe(zc(e),Ic(e=>t(e,n))))}onErrorTag(e,t){return this.onErrorIf(t=>Ia(t,`_tag`)&&(Array.isArray(e)?e.includes(t._tag):t._tag===e),t)}onDefect(e){return this.when(NE,t=>{let n=Tm(t.cause);return hl(n)?Tc():B(e(n.success,t))})}onInterrupt(e){return this.when(NE,t=>{let n=Dm(t.cause);return hl(n)?Tc():B(e(n.success,t))})}orElse(e){return Ac(this.output,e)}orNull(){return Nc(this.output)}render(){if(Oc(this.output))return this.output.value;if(NE(this.result))throw Sm(this.result.cause);return null}exhaustive(){return this.render()}},GE=e=>{let t=e.success??$C,n=e.error??$C,r=FC()([t,Hw(n,Yw())],([e,t])=>(n,r,i)=>{if(!wE(n))return Zh(new Zy(r,B(n)));switch(n._tag){case`Initial`:return V(n);case`Success`:return Kg(mC(e)(n.value,i),{onSuccess:e=>ME(e,n),onFailure:e=>new Xy(r,B(n),[new qy([`value`],e)])});case`Failure`:{let a=n.previousSuccess.pipe(Ic(t=>Kg(mC(e)(t.value,i),{onSuccess:e=>B(ME(e,t)),onFailure:e=>new Xy(r,B(n),[new qy([`previousSuccess`,`value`],e)])})),Ac(()=>Uh)),o=Gg(mC(t)(n.cause,i),e=>new Xy(r,B(n),[new qy([`cause`],e)]));return qg(a,e=>Wg(o,t=>PE(t,{previousSuccess:e,waiting:n.waiting})))}}},{expected:`AsyncResult`,toCodec([e,t]){let n=Dw(`Success`,{value:e,waiting:rw,timestamp:W});return kw()(dw([Dw(`Initial`,{waiting:rw}),n,Dw(`Failure`,{cause:t,previousSuccess:Lw(n),waiting:rw})]),Bb({decode:e=>{switch(e._tag){case`Initial`:return AE(e.waiting);case`Success`:return ME(e.value,{waiting:e.waiting,timestamp:e.timestamp});case`Failure`:return PE(e.cause,{previousSuccess:Ic(e.previousSuccess,e=>ME(e.value,e)),waiting:e.waiting})}},encode(e){switch(e._tag){case`Initial`:return{_tag:`Initial`,waiting:e.waiting};case`Success`:return{_tag:`Success`,value:e.value,waiting:e.waiting,timestamp:e.timestamp};case`Failure`:return{_tag:`Failure`,cause:e.cause,previousSuccess:e.previousSuccess,waiting:e.waiting}}}}))},toEquivalence:xo,toFormatter:([e,t])=>n=>{switch(n._tag){case`Success`:return`AsyncResult.Success(${e(n.value)}, ${n.waiting}, ${n.timestamp})`;case`Failure`:return`AsyncResult.Failure(${t(n.cause)}, ${n.waiting})`;case`Initial`:return`AsyncResult.Initial(${n.waiting}, ${n.waiting})`}}});return Object.assign(r,{success:t,error:n})},KE=`~effect/reactivity/AtomRegistry`,qE=e=>Ia(e,KE),JE=e=>new tD(e?.initialValues,e?.scheduleTask,e?.timeoutResolution,e?.defaultIdleTTL),YE=Hc(KE),XE=z(e=>qE(e[0]),(e,t,n)=>{let r=n?.suspendOnWaiting??!1;return Jh(n=>{let i=e.get(t);if(i._tag!==`Initial`&&!(r&&i.waiting))return n(HE(i));let a=e.subscribe(t,e=>{e._tag!==`Initial`&&!(r&&e.waiting)&&(n(HE(e)),a())});return Kh(a)})}),ZE={immediate:!0},QE=e=>{e()},$E=`~effect-atom/atom/Atom/Serializable`,eD=e=>$E in e?e[$E].key:e,tD=class{[KE];timeoutResolution;defaultIdleTTL;scheduler;schedulerAsync;dispatcher;onNodeAdded;onNodeRemoved;constructor(e,t,n,r){if(this[KE]=KE,this.scheduler=new Du(`sync`,t),this.schedulerAsync=new Du(`async`,t),this.dispatcher=this.schedulerAsync.makeDispatcher(),this.defaultIdleTTL=r,n===void 0&&r!==void 0?this.timeoutResolution=Math.round(r/2):this.timeoutResolution=n??1e3,e!==void 0)for(let[t,n]of e){let e=t;for(;e.initialValueTarget;)e=e.initialValueTarget;this.ensureNode(e).setInitialValue(n)}}nodes=new Map;preloadedSerializable=new Map;timeoutBuckets=new Map;nodeTimeoutBucket=new Map;disposed=!1;getNodes(){return this.nodes}get(e){return this.ensureNode(e).value()}set(e,t){e.write(this.ensureNode(e).writeContext,t)}setSerializable(e,t){this.preloadedSerializable.set(e,t)}modify(e,t){let n=this.ensureNode(e),r=t(n.value());return e.write(n.writeContext,r[1]),r[0]}update(e,t){let n=this.ensureNode(e);e.write(n.writeContext,t(n.value()))}refresh=e=>{e.refresh===void 0?this.invalidateAtom(e):e.refresh(this.refresh)};subscribe(e,t,n){let r=this.ensureNode(e);n?.immediate&&t(r.value());let i=r.subscribe(function(){t(r._value)});return()=>{i(),r.canBeRemoved&&this.scheduleNodeRemoval(r)}}mount(e){return this.subscribe(e,va,ZE)}atomHasTtl(e){return!e.keepAlive&&e.idleTTL!==0&&(e.idleTTL!==void 0||this.defaultIdleTTL!==void 0)}ensureNode(e){let t=eD(e),n=this.nodes.get(t);if(n===void 0?(n=this.createNode(e),this.nodes.set(t,n),this.onNodeAdded?.(n)):this.atomHasTtl(e)&&this.removeNodeTimeout(n),typeof t==`string`&&this.preloadedSerializable.has(t)){let r=this.preloadedSerializable.get(t);this.preloadedSerializable.delete(t);let i=e[$E].decode(r);n.setValue(i)}return n}createNode(e){if(this.disposed)throw Error(`Cannot access Atom ${e}: registry is disposed`);return e.keepAlive||this.scheduleAtomRemoval(e),new iD(this,e)}invalidateAtom=e=>{this.ensureNode(e).invalidate()};scheduleAtomRemoval(e){this.dispatcher.scheduleTask(()=>{let t=this.nodes.get(eD(e));t!==void 0&&t.canBeRemoved&&this.removeNode(t)},0)}scheduleNodeRemoval(e){this.dispatcher.scheduleTask(()=>{e.canBeRemoved&&this.removeNode(e)},0)}removeNode(e){this.atomHasTtl(e.atom)?this.setNodeTimeout(e):(this.nodes.delete(eD(e.atom)),e.remove(),this.onNodeRemoved?.(e))}setNodeTimeout(e){if(this.nodeTimeoutBucket.has(e))return;let t=e.atom.idleTTL??this.defaultIdleTTL;if(this.#e!==null&&(t-=this.#e,t<=0)){this.nodes.delete(eD(e.atom)),e.remove(),this.onNodeRemoved?.(e);return}let n=Math.ceil(t/this.timeoutResolution)*this.timeoutResolution,r=Date.now()+n,i=r-r%this.timeoutResolution+this.timeoutResolution,a=this.timeoutBuckets.get(i);a===void 0&&(a=[new Set,setTimeout(()=>this.sweepBucket(i),i-Date.now())],this.timeoutBuckets.set(i,a)),a[0].add(e),this.nodeTimeoutBucket.set(e,i)}removeNodeTimeout(e){let t=this.nodeTimeoutBucket.get(e);if(t===void 0)return;this.nodeTimeoutBucket.delete(e),this.scheduleNodeRemoval(e);let[n,r]=this.timeoutBuckets.get(t);n.delete(e),n.size===0&&(clearTimeout(r),this.timeoutBuckets.delete(t))}#e=null;sweepBucket(e){let t=this.timeoutBuckets.get(e)[0];this.timeoutBuckets.delete(e),t.forEach(e=>{this.nodeTimeoutBucket.delete(e),e.canBeRemoved&&(this.nodes.delete(eD(e.atom)),this.onNodeRemoved?.(e),this.#e=e.atom.idleTTL??this.defaultIdleTTL,e.remove(),this.#e=null)})}reset(){this.timeoutBuckets.forEach(([,e])=>clearTimeout(e)),this.timeoutBuckets.clear(),this.nodeTimeoutBucket.clear(),this.nodes.forEach(e=>{e.remove(),this.onNodeRemoved?.(e)}),this.nodes.clear()}dispose(){this.disposed=!0,this.reset()}},nD={alive:1,initialized:2,waitingForValue:4},rD={uninitialized:nD.alive|nD.waitingForValue,stale:nD.alive|nD.initialized|nD.waitingForValue,valid:nD.alive|nD.initialized,removed:0},iD=class{constructor(e,t){this.registry=e,this.atom=t,this.writeContext=new cD(e,this)}registry;atom;state=rD.uninitialized;lifetime;writeContext;preserveInitialValueOnBuild=!1;parents=new Set;previousParents;children=new Set;listeners=new Set;skipInvalidation=!1;currentState(){switch(this.state){case rD.uninitialized:return`uninitialized`;case rD.stale:return`stale`;case rD.valid:return`valid`;default:return`removed`}}get canBeRemoved(){return!this.atom.keepAlive&&this.listeners.size===0&&this.children.size===0&&this.state!==0}_value=void 0;value(){if((this.state&nD.waitingForValue)!==0){this.lifetime=sD(this);let e=this.atom.read(this.lifetime);if((this.state&nD.waitingForValue)!==0&&(this.preserveInitialValueOnBuild?(this.preserveInitialValueOnBuild=!1,this.state=rD.valid):this.setValue(e)),this.previousParents){let e=this.previousParents;this.previousParents=void 0;for(let t of e)t.removeChild(this),t.canBeRemoved&&this.registry.scheduleNodeRemoval(t)}}return this._value}valueOption(){return(this.state&nD.initialized)===0?Tc():B(this._value)}setInitialValue(e){if((this.state&nD.initialized)===0){this.preserveInitialValueOnBuild=!0,this.state=rD.stale,this._value=e,uD.phase===lD.collect?uD.notify.add(this):this.notify();return}this.setValue(e)}setValue(e){if((this.state&nD.initialized)===0){this.state=rD.valid,this._value=e,uD.phase===lD.collect?uD.notify.add(this):this.notify();return}this.state=rD.valid,!Object.is(this._value,e)&&(this._value=e,this.skipInvalidation?this.skipInvalidation=!1:this.invalidateChildren(),this.listeners.size>0&&(uD.phase===lD.collect?uD.notify.add(this):this.notify()))}addParent(e){this.parents.add(e),this.previousParents!==void 0&&(this.previousParents.delete(e),this.previousParents.size===0&&(this.previousParents=void 0)),e.children.has(this)||(e.children.add(this),e.skipInvalidation&&=!1)}removeChild(e){this.children.delete(e)}invalidate(){this.state===rD.valid&&(this.state=rD.stale,this.disposeLifetime()),uD.phase===lD.collect?uD.stale.push(this):this.atom.lazy&&this.listeners.size===0&&!aD(this.children)?(this.invalidateChildren(),this.skipInvalidation=!0):this.value()}invalidateChildren(){if(this.children.size===0)return;let e=this.children;this.children=new Set;for(let t of e)t.invalidate()}notify(){this.listeners.forEach(QE),uD.phase===lD.commit&&uD.notify.delete(this)}disposeLifetime(){this.lifetime!==void 0&&(this.lifetime.dispose(),this.lifetime=void 0),this.parents.size!==0&&(this.previousParents=this.parents,this.parents=new Set)}remove(){if(this.state=rD.removed,this.listeners.clear(),this.lifetime===void 0||(this.disposeLifetime(),this.previousParents===void 0))return;let e=this.previousParents;this.previousParents=void 0;for(let t of e)t.removeChild(this),t.canBeRemoved&&this.registry.removeNode(t)}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}};function aD(e){if(e.size===0)return!1;let t=e,n,r=0;for(;t!==void 0;){for(let e of t)if(!e.atom.lazy||e.listeners.size>0)return!0;else e.children.size>0&&(n===void 0?n=[e.children]:n.push(e.children));t=n?.[r++]}return!1}var oD={get registry(){return this.node.registry},addFinalizer(e){if(this.disposed)return e();this.finalizers??=[],this.finalizers.push(e)},get(e){if(this.disposed)return this.node.registry.get(e);let t=this.node.registry.ensureNode(e);return this.node.addParent(t),t.value()},result(e,t){if(this.disposed||this.isFn)return this.resultOnce(e,t);let n=this.get(e);if(t?.suspendOnWaiting&&n.waiting)return Yh;switch(n._tag){case`Initial`:return Yh;case`Failure`:return Nm(n.cause);case`Success`:return V(n.value)}},resultOnce(e,t){return Jh(n=>{let r=this.once(e);if(r._tag!==`Initial`&&!(t?.suspendOnWaiting&&r.waiting))return n(HE(r));let i=this.node.registry.subscribe(e,e=>{e._tag===`Initial`||t?.suspendOnWaiting&&e.waiting||(i(),n(HE(e)))},{immediate:!1});return Kh(i)})},setResult(e,t){return this.disposed?Yh:(this.node.registry.set(e,t),this.resultOnce(e,{suspendOnWaiting:!0}))},some(e){if(this.disposed||this.isFn)return this.someOnce(e);let t=this.get(e);return t._tag===`None`?Yh:V(t.value)},someOnce(e){return Jh(t=>{let n=this.once(e);if(Oc(n))return t(V(n.value));let r=this.node.registry.subscribe(e,e=>{Dc(e)||(r(),t(V(e.value)))},{immediate:!1});return Kh(r)})},once(e){return this.node.registry.get(e)},self(){return this.disposed?Tc():this.node.valueOption()},refresh(e){this.disposed||this.node.registry.refresh(e)},refreshSelf(){this.disposed||this.node.invalidate()},mount(e){this.disposed||this.addFinalizer(this.node.registry.mount(e))},subscribe(e,t,n){this.disposed||this.addFinalizer(this.node.registry.subscribe(e,t,n))},setSelf(e){this.disposed||this.node.setValue(e)},set(e,t){this.disposed||this.node.registry.set(e,t)},stream(e,t){return this.disposed?WT:UT(n=>Kh(()=>{this.subscribe(e,e=>J_(n,e),{immediate:!t?.withoutInitialValue})}))},streamResult(e,t){return this.stream(e,t).pipe($T(kE),QT(e=>e._tag===`Success`?V(e.value):Qh(e.cause)))},dispose(){if(this.disposed=!0,this.finalizers===void 0)return;let e=this.finalizers;this.finalizers=void 0;for(let t=e.length-1;t>=0;t--)e[t]()}},sD=e=>{function t(n){if(t.disposed||t.isFn)return e.registry.get(n);let r=e.registry.ensureNode(n),i=r.value();return e.addParent(r),i}return Object.setPrototypeOf(t,oD),t.isFn=!1,t.disposed=!1,t.finalizers=void 0,t.node=e,t},cD=class{constructor(e,t){this.registry=e,this.node=t}registry;node;get(e){return this.registry.get(e)}set(e,t){return this.registry.set(e,t)}setSelf(e){return this.node.setValue(e)}refreshSelf(){return this.node.invalidate()}},lD={disabled:0,collect:1,commit:2},uD={phase:lD.disabled,depth:0,stale:[],notify:new Set};function dD(e){uD.phase=lD.collect,uD.depth++;try{if(e(),uD.depth===1){for(let e=0;e<uD.stale.length;e++)fD(uD.stale[e]);uD.phase=lD.commit;for(let e of uD.notify)e.notify();uD.notify.clear()}}finally{uD.depth--,uD.depth===0&&(uD.phase=lD.disabled,uD.stale=[])}}function fD(e){if(e.state!==rD.valid){for(let t of e.parents)t.state!==rD.valid&&fD(t);e.state!==rD.valid&&e.value()}}var pD=`~effect/reactivity/Atom`,mD=e=>Ia(e,pD),hD=`~effect/reactivity/Atom/Writable`,gD=z(2,(e,t)=>{let n=Xl(t),r=iu(n);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!r,idleTTL:r?hu(n):void 0})}),_D=gD(0),vD={[pD]:pD,...Zo,toJSON(){return{_id:`Atom`,keepAlive:this.keepAlive,lazy:this.lazy,label:this.label}}},yD={...vD,atom(e,t){let n=DD(e,t);return CD(e=>{let t=e.self(),r=e(this);return r._tag===`Success`?n(e,r.value):zE(r,t)})},fn(e,t){return arguments.length===0?(e,t)=>bD(this,e,t):bD(this,e,t)},pull(e,t){let n=_D(AD(0));return UD(n,CD(r=>{let i=r.self(),a=r(this);return a._tag===`Success`?MD(r,HD(r,n,e,t),AE(!0),a.value):zE(a,i)}))},subscriptionRef(e){return RD(_D(CD(t=>{let n=t.self(),r=t(this);if(r._tag!==`Success`)return zE(r,n);let i=typeof e==`function`?e(t):e;return lE(i)?i:MD(t,i,AE(!0),r.value)})),(e,t)=>LD(e,t,VE(e(this))))}},bD=(e,t,n)=>{let[r,i,a]=VD(n?.reactivityKeys?(e,r)=>{let i=t(e,r);return Rh(i)?vE(i,n.reactivityKeys):nE(i,yE(n.reactivityKeys))}:t,n);return wD(t=>{t.get(a);let n=t.self(),i=t.get(e);return i._tag===`Success`?r(t,i.value):zE(i,n)},i)},xD={...vD,[hD]:hD},SD=e=>hD in e,CD=(e,t)=>{let n=Object.create(vD);return n.keepAlive=!1,n.lazy=!0,n.read=e,n.refresh=t,n},wD=(e,t,n)=>{let r=Object.create(xD);return r.keepAlive=!1,r.lazy=!0,r.read=e,r.write=t,r.refresh=n,r};function TD(e,t){e.setSelf(t)}var ED=(e,t)=>{let n=DD(e,t);return`~effect/reactivity/Atom`in n?n:CD(n)},DD=(e,t)=>{if(typeof e==`function`&&!Rh(e)&&!zT(e)){let n=e;return function(e,r){let i=n(e);switch(typeof i){case`function`:case`object`:return i===null?i:OD in i?jD(e,i,t,r):kD in i?FD(e,i,t,r):i;default:return i}}}else if(Rh(e))return function(n,r){return jD(n,e,t,r)};else if(zT(e))return function(n,r){return FD(n,e,t,r)};return AD(e)},OD=`~effect/Effect`,kD=`~effect/Stream`,AD=e=>wD(function(t){return e},TD),jD=(e,t,n,r)=>MD(e,t,n?.initialValue===void 0?AE():ME(n.initialValue),r,n?.uninterruptible);function MD(e,t,n,r=Yc(),i=!1){let a=e.self(),o=Gm();e.addFinalizer(()=>{Ig(r)(Xm(o,Fm))});let s=new Map(r.mapUnsafe);s.set(Wm.key,o),s.set(YE.key,e.registry),s.set(wu.key,e.registry.scheduler);let c,l=!1,u=ND(Kc(s),t,function(t){c=EE(t,a),l&&e.setSelf(c)},i);return l=!0,u!==void 0&&e.addFinalizer(u),c===void 0?a._tag===`Some`?DE(a):LE(n):c}function ND(e,t,n,r=!1){if(jm(t)){n(t);return}let i=Ig(e)(t);i.currentDispatcher?.flush();let a=i.pollUnsafe();if(a){n(a);return}let o=i.addObserver(n);function s(){o(),r||i.interruptUnsafe()}return s}var PD=(e=>{let t=bE;function n(r){let i=Object.create(yD);i.keepAlive=!1,i.lazy=!0,i.refresh=void 0,i.factory=n;let a=GD(CD(typeof r==`function`?e=>xh(r(e),t):()=>xh(r,t)));return i.layer=a,i.read=function(t){let n=t(a);return jD(t,ig(xg,t=>lh(n,e.memoMap,t)),{uninterruptible:!0})},i}n.memoMap=e.memoMap,n.addGlobalLayer=e=>{t=xh(t,bh(e,bE))};let r=_D(ED(_g(t=>lh(bE,e.memoMap,tl(t,Wm))).pipe(lg(tl(hE)))));return n.withReactivity=e=>t=>KD(t,n=>{let i=VE(n(r));return n.addFinalizer(i.registerUnsafe(e,()=>{n.refresh(t)})),n.subscribe(t,e=>n.setSelf(e)),n.once(t)},{initialValueTarget:t}),n})({memoMap:oh()});PD.withReactivity;var FD=(e,t,n,r)=>ID(e,t,n?.initialValue===void 0?AE():ME(n.initialValue),r);function ID(e,t,n,r=Yc()){let i=e.self();r=Qc(r,YE,e.registry);let a=Sg(n=>ig(qv(t.channel,n),t=>Bh({while:ma,body:()=>t,step(t){e.setSelf(ME(Nl(t),{waiting:!0}))}}))).pipe(pg(t=>(Nh(t)?ya(e.self(),Lc(BE),kc({onNone:()=>e.setSelf(IE(new Om,{previous:e.self()})),onSome:t=>e.setSelf(ME(t))})):e.setSelf(FE(t,{previous:e.self()})),qh))),o=new Map(r.mapUnsafe);o.set(YE.key,e.registry),o.set(wu.key,e.registry.scheduler);let s=ND(Kc(o),a,va,!1);return s!==void 0&&e.addFinalizer(s),i._tag===`Some`?DE(i):LE(n)}var LD=(e,t,n=Yc())=>lE(t)?(e.addFinalizer(uE(t).pipe(iE(t=>{for(let n=0;n<t.length;n++)e.setSelf(t[n]);return qh}),Lg(n))),Vg(n)(dE(t))):t._tag===`Success`?ID(e,uE(t.value),AE(!0),n):t,RD=(e,t)=>{function n(t,n){let r=t.get(e);lE(r)?Bg(pE(r,n)):jE(r)&&Bg(pE(r.value,n))}return wD(n=>{let r=n(e);return lE(r)||jE(r)?t(n,r):r},n)},zD=Symbol.for(`effect/reactivity/atom/Atom/Reset`),BD=Symbol.for(`effect/reactivity/atom/Atom/Interrupt`);function VD(e,t){let n=_D(AD([0,void 0])),r=t?.initialValue===void 0?AE():ME(t.initialValue),i=t?.concurrent?_D(CD(e=>{let t=new Set;return e.addFinalizer(()=>t.forEach(e=>e.interruptUnsafe())),t})):void 0;function a(t,a){let o=i?t(i):void 0;t.isFn=!0;let[s,c]=t.get(n);if(s===0)return r;if(c===BD)return FE(gm(),{previous:t.self()});let l=e(c,t);return OD in l?(o&&(l=ig(Pg(l,{startImmediately:!0}),e=>(o.add(e),e.addObserver(()=>o.delete(e)),lg(p_(o),e=>e[0])))),MD(t,l,r,a,!1)):ID(t,l,r,a)}function o(e,t){YD(()=>{t===zD?e.set(n,[0,void 0]):t===BD?e.set(n,[e.get(n)[0]+1,BD]):e.set(n,[e.get(n)[0]+1,t]),e.refreshSelf()})}return[a,o,n]}var HD=(e,t,n,r)=>ig(aE(typeof n==`function`?n(e):n),n=>{let i=h_().context,a=Ll(),o=hg(n,{onFailure(e){return Nh(e)?Al(a)?V({done:!0,items:a}):Zh(new Om(`Atom.pull: no items`)):Qh(e)},onSuccess(e){let t;return r?.disableAccumulation?t=e:(t=Ol(a,e),a=t),V({done:!1,items:t})}}),s=new Set;return e.addFinalizer(()=>{for(let e of s)e()}),e.once(t),e.subscribe(t,()=>{e.setSelf(DE(e.self()));let t;t=ND(i,o,n=>{t&&s.delete(t);let r=EE(n,e.self()),i=s.size>0;e.setSelf(i?LE(r):r)}),t&&s.add(t)}),o}),UD=(e,t)=>wD(t.read,function(t,n){t.set(e,t.get(e)+1)}),WD=typeof WeakRef>`u`||typeof FinalizationRegistry>`u`?e=>{let t=Xv();return function(n){let r=Zv(t,n);if(r._tag===`Some`)return r.value;let i=e(n);return ty(t,n,i),i}}:e=>{let t=Xv(),n=new FinalizationRegistry(e=>{ry(t,e)});return function(r){let i=Zv(t,r).pipe(Rc(e=>e.deref()));if(i._tag===`Some`)return i.value;let a=e(r);return ty(t,r,new WeakRef(a)),n.register(a,r),a}},GD=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!0}),KD=z(e=>mD(e[0]),(e,t,n)=>{let r=_D(SD(e)?wD(n=>t(n,e),function(t,n){t.set(e,n)},e.refresh??function(t){t(e)}):CD(n=>t(n,e),e.refresh??function(t){t(e)}));return n?.initialValueTarget&&(r.initialValueTarget=qD(n.initialValueTarget)),r}),qD=e=>{let t=e;for(;t.initialValueTarget;)t=t.initialValueTarget;return t},JD=z(2,(e,t)=>KD(e,n=>t(n(e)))),YD=dD,XD=`~effect-atom/atom/Atom/Serializable`,ZD=z(2,(e,t)=>{let n=bT(t.schema);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,label:e.label??[t.key,Error().stack?.split(`
|
|
17
|
+
`)[5]??``],[XD]:{key:t.key,encode:KC(n),decode:UC(n)}})}),QD=`~effect-atom/atom/Atom/ServerValue`,$D=z(2,(e,t)=>`~effect-atom/atom/Atom/ServerValue`in e?e[QD](e=>t.get(e)):t.get(e)),eO=l(p(),1);function tO(e){let t=eO.unstable_scheduleCallback(4,e);return()=>eO.unstable_cancelCallback(t)}var nO=N.createContext(JE({scheduleTask:tO,defaultIdleTTL:400})),rO=new WeakMap;function iO(e,t){let n=rO.get(e);n===void 0&&(n=new WeakMap,rO.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i={subscribe(n){return e.subscribe(t,n)},snapshot(){return e.get(t)},getServerSnapshot(){return $D(t,e)}};return n.set(t,i),i}function aO(e,t){let n=iO(e,t);return N.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}var oO=(e,t)=>{let n=N.useContext(nO);return t?aO(n,N.useMemo(()=>JD(e,t),[e,t])):aO(n,e)};function sO(e,t){N.useEffect(()=>e.mount(t),[t,e])}function cO(e,t,n){return n?.mode===`promise`||n?.mode===`promiseExit`?N.useCallback(r=>{e.set(t,r);let i=zg(XE(e,t,{suspendOnWaiting:!0}));return n.mode===`promise`?i.then(lO):i},[e,t,n.mode]):N.useCallback(n=>{e.set(t,typeof n==`function`?n(e.get(t)):n)},[e,t])}var lO=e=>{if(Im(e))return e.value;throw Sm(e.cause)},uO=(e,t)=>{let n=N.useContext(nO);return sO(n,e),cO(n,e,t)},dO=(e,t)=>{let n=N.useContext(nO);return[aO(n,e),cO(n,e,t)]};function fO(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var pO=e=>{switch(e){case`success`:return gO;case`info`:return vO;case`warning`:return _O;case`error`:return yO;default:return null}},mO=Array(12).fill(0),hO=({visible:e,className:t})=>N.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},N.createElement(`div`,{className:`sonner-spinner`},mO.map((e,t)=>N.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),gO=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},N.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),_O=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},N.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),vO=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},N.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),yO=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},N.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),bO=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},N.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),N.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),xO=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},SO=1,CO=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:SO++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0||e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],N.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(TO(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||SO++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},wO=(e,t)=>{let n=t?.id||SO++;return CO.addToast({title:e,...t,id:n}),n},TO=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,EO=Object.assign(wO,{success:CO.success,info:CO.info,warning:CO.warning,error:CO.error,custom:CO.custom,message:CO.message,promise:CO.promise,dismiss:CO.dismiss,loading:CO.loading},{getHistory:()=>CO.toasts,getToasts:()=>CO.getActiveToasts()});fO(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function DO(e){return e.label!==void 0}var OO=3,kO=`24px`,AO=`16px`,jO=4e3,MO=356,NO=14,PO=45,FO=200;function IO(...e){return e.filter(Boolean).join(` `)}function LO(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var RO=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=N.useState(null),[O,k]=N.useState(null),[A,j]=N.useState(!1),[M,ee]=N.useState(!1),[P,F]=N.useState(!1),[I,te]=N.useState(!1),[ne,re]=N.useState(!1),[ie,L]=N.useState(0),[ae,oe]=N.useState(0),se=N.useRef(n.duration||y||jO),ce=N.useRef(null),le=N.useRef(null),ue=c===0,de=c+1<=o,fe=n.type,pe=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,ge=N.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),_e=N.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ve=N.useMemo(()=>n.duration||y||jO,[n.duration,y]),ye=N.useRef(0),be=N.useRef(0),xe=N.useRef(0),Se=N.useRef(null),[Ce,we]=b.split(`-`),Te=N.useMemo(()=>s.reduce((e,t,n)=>n>=ge?e:e+t.height,0),[s,ge]),Ee=xO(),De=n.invert||t,Oe=fe===`loading`;be.current=N.useMemo(()=>ge*x+Te,[ge,Te]),N.useEffect(()=>{se.current=ve},[ve]),N.useEffect(()=>{j(!0)},[]),N.useEffect(()=>{let e=le.current;if(e){let t=e.getBoundingClientRect().height;return oe(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),N.useLayoutEffect(()=>{if(!A)return;let e=le.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,oe(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let ke=N.useCallback(()=>{ee(!0),L(be.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},FO)},[n,d,a,be]);N.useEffect(()=>{if(n.promise&&fe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Ee?(()=>{if(xe.current<ye.current){let e=new Date().getTime()-ye.current;se.current-=e}xe.current=new Date().getTime()})():se.current!==1/0&&(ye.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),ke()},se.current)),()=>clearTimeout(e)},[u,i,n,fe,Ee,ke]),N.useEffect(()=>{n.delete&&(ke(),n.onDismiss==null||n.onDismiss.call(n,n))},[ke,n.delete]);function Ae(){return w?.loading?N.createElement(`div`,{className:IO(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":fe===`loading`},w.loading):N.createElement(hO,{className:IO(C?.loader,n?.classNames?.loader),visible:fe===`loading`})}let je=n.icon||w?.[fe]||pO(fe);return N.createElement(`li`,{tabIndex:0,ref:le,className:IO(_,me,C?.toast,n?.classNames?.toast,C?.default,C?.[fe],n?.classNames?.[fe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":ne,"data-removed":M,"data-visible":de,"data-y-position":Ce,"data-x-position":we,"data-index":c,"data-front":ue,"data-swiping":P,"data-dismissible":pe,"data-type":fe,"data-invert":De,"data-swipe-out":I,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?ie:be.current}px`,"--initial-height":S?`auto`:`${ae}px`,...m,...n.style},onDragEnd:()=>{F(!1),D(null),Se.current=null},onPointerDown:e=>{e.button!==2&&(Oe||!pe||(ce.current=new Date,L(be.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),Se.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(I||!pe)return;Se.current=null;let e=Number(le.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(le.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ce.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=PO||a>.11){L(be.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),ke(),te(!0);return}else{var o,s;(o=le.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=le.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}re(!1),F(!1),D(null)},onPointerMove:t=>{var n,r;if(!Se.current||!pe||window.getSelection()?.toString().length>0)return;let i=t.clientY-Se.current.y,a=t.clientX-Se.current.x,o=e.swipeDirections??LO(b);!E&&(Math.abs(a)>1||Math.abs(i)>1)&&D(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(E===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&re(!0),(n=le.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=le.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},_e&&!n.jsx&&fe!==`loading`?N.createElement(`button`,{"aria-label":T,"data-disabled":Oe,"data-close-button":!0,onClick:Oe||!pe?()=>{}:()=>{ke(),n.onDismiss==null||n.onDismiss.call(n,n)},className:IO(C?.closeButton,n?.classNames?.closeButton)},w?.close??bO):null,(fe||n.icon||n.promise)&&n.icon!==null&&(w?.[fe]!==null||n.icon)?N.createElement(`div`,{"data-icon":``,className:IO(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ae():null,n.type===`loading`?null:je):null,N.createElement(`div`,{"data-content":``,className:IO(C?.content,n?.classNames?.content)},N.createElement(`div`,{"data-title":``,className:IO(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?N.createElement(`div`,{"data-description":``,className:IO(v,he,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),N.isValidElement(n.cancel)?n.cancel:n.cancel&&DO(n.cancel)?N.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{DO(n.cancel)&&pe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),ke())},className:IO(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,N.isValidElement(n.action)?n.action:n.action&&DO(n.action)?N.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{DO(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&ke())},className:IO(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function zO(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function BO(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?AO:kO;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var VO=N.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=OO,toastOptions:g,dir:_=zO(),gap:v=NO,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=N.useState([]),C=N.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=N.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[T,E]=N.useState([]),[D,O]=N.useState(!1),[k,A]=N.useState(!1),[j,M]=N.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),ee=N.useRef(null),P=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),F=N.useRef(null),I=N.useRef(!1),te=N.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||CO.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return N.useEffect(()=>CO.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{ca.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),N.useEffect(()=>{if(d!==`system`){M(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?M(`dark`):M(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{M(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{M(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),N.useEffect(()=>{x.length<=1&&O(!1)},[x]),N.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;O(!0),(t=ee.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===ee.current||ee.current?.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),N.useEffect(()=>{if(ee.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,I.current=!1)}},[ee.current]),N.createElement(`section`,{ref:t,"aria-label":`${b} ${P}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?N.createElement(`ol`,{key:t,dir:_===`auto`?zO():_,tabIndex:-1,ref:ee,className:c,"data-sonner-toaster":!0,"data-sonner-theme":j,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${MO}px`,"--gap":`${v}px`,...m,...BO(l,u)},onBlur:e=>{I.current&&!e.currentTarget.contains(e.relatedTarget)&&(I.current=!1,F.current&&=(F.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||I.current||(I.current=!0,F.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{k||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||A(!0)},onPointerUp:()=>A(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>N.createElement(RO,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:k,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:te,toasts:C.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:E,expandByDefault:o,gap:v,expanded:D,swipeDirections:e.swipeDirections}))):null}))}),HO=e=>()=>{let t=RC(lw(e));return yv((e,n)=>V(ig(e,e=>t(e))))},UO={"~effect/match/Match/Matcher":{_input:fa,_filters:fa,_result:fa,_return:fa},_tag:`ValueMatcher`,add(e){return gl(this.value)?this:e._tag===`When`&&e.guard(this.provided)===!0||e._tag===`Not`&&e.guard(this.provided)===!1?WO(this.provided,dl(e.evaluate(this.provided))):this},pipe(){return la(this,arguments)}};function WO(e,t){let n=Object.create(UO);return n.provided=e,n.value=t,n}var GO=(e,t)=>({_tag:`When`,guard:e,evaluate:t}),KO=e=>{if(typeof e==`function`)return e;if(Array.isArray(e)){let t=e.map(KO),n=t.length;return e=>{if(!Array.isArray(e))return!1;for(let r=0;r<n;r++)if(t[r](e[r])===!1)return!1;return!0}}else if(typeof e==`object`&&e){let t=Object.entries(e).map(([e,t])=>[e,KO(t)]),n=t.length;return e=>{if(typeof e!=`object`||!e)return!1;for(let r=0;r<n;r++){let[n,i]=t[r];if(!(n in e)||i(e[n])===!1)return!1}return!0}}return t=>t===e},qO=e=>WO(e,fl(e)),JO=(e,t)=>n=>n.add(GO(KO(e),t)),YO=e=>t=>{let n=XO(t);return ml(n)?n._tag===`Success`?n.success:e(n.failure):t=>{let r=n(t);return gl(r)?r.success:e(r.failure)}},XO=e=>{if(e._tag===`ValueMatcher`)return e.value;let t=e.cases.length;if(t===1){let t=e.cases[0];return e=>t._tag===`When`&&t.guard(e)===!0||t._tag===`Not`&&t.guard(e)===!1?dl(t.evaluate(e)):fl(e)}return n=>{for(let r=0;r<t;r++){let t=e.cases[r];if(t._tag===`When`&&t.guard(n)===!0||t._tag===`Not`&&t.guard(n)===!1)return dl(t.evaluate(n))}return fl(n)}},ZO=qO,QO=JO,$O=YO,ek=`~effect/http/Cookies`,tk=`~effect/http/Cookies/Cookie`;Eh(`CookieError`);var nk={[ek]:ek,...Lo,toJSON(){return{_id:`effect/Cookies`,cookies:bl(this.cookies,e=>e.toJSON())}},pipe(){return la(this,arguments)}},rk=e=>{let t=Object.create(nk);return t.cookies=e,t},ik=e=>{let t={};for(let n of e)t[n.name]=n;return rk(t)},ak=e=>{let t=typeof e==`string`?[e]:e,n=[];for(let e of t){let t=ok(e.trim());t&&n.push(t)}return ik(n)};function ok(e){let t=e.split(`;`).map(e=>e.trim()).filter(e=>e!==``);if(t.length===0)return;let n=t[0].indexOf(`=`);if(n===-1)return;let r=t[0].slice(0,n);if(!sk.test(r))return;let i=t[0].slice(n+1),a=lk(i);if(t.length===1)return Object.assign(Object.create(ck),{name:r,value:a,valueEncoded:i});let o={};for(let e=1;e<t.length;e++){let n=t[e],r=n.indexOf(`=`),i=r===-1?n:n.slice(0,r).trim(),a=r===-1?void 0:n.slice(r+1).trim();switch(i.toLowerCase()){case`domain`:{if(a===void 0)break;let e=a.trim().replace(/^\./,``);e&&(o.domain=e);break}case`expires`:{if(a===void 0)break;let e=new Date(a);isNaN(e.getTime())||(o.expires=e);break}case`max-age`:{if(a===void 0)break;let e=parseInt(a,10);isNaN(e)||(o.maxAge=uu(e));break}case`path`:if(a===void 0)break;a[0]===`/`&&(o.path=a);break;case`priority`:if(a===void 0)break;switch(a.toLowerCase()){case`low`:o.priority=`low`;break;case`medium`:o.priority=`medium`;break;case`high`:o.priority=`high`;break}break;case`httponly`:o.httpOnly=!0;break;case`secure`:o.secure=!0;break;case`partitioned`:o.partitioned=!0;break;case`samesite`:if(a===void 0)break;switch(a.toLowerCase()){case`lax`:o.sameSite=`lax`;break;case`strict`:o.sameSite=`strict`;break;case`none`:o.sameSite=`none`;break}break}}return Object.assign(Object.create(ck),{name:r,value:a,valueEncoded:i,options:Object.keys(o).length>0?o:void 0})}var sk=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ck={[tk]:tk,...Lo,toJSON(){return{_id:`effect/Cookies/Cookie`,name:this.name,value:this.value,options:this.options}}},lk=e=>{try{return decodeURIComponent(e)}catch{return e}},uk=Symbol.for(`~effect/http/Headers`),dk=Object.defineProperties(Object.create(null),{[uk]:{value:uk},[So]:{value(e){return xk(this,tl(e,Sk))}},toJSON:{value(){return wo(this)}},[ro]:{value(e){return pk(this,e)}},[za]:{value(){return Ja(this)}},toString:{value:Lo.toString},[Fo]:{value:Lo[Fo]}}),fk=e=>Object.assign(Object.create(dk),e),pk=Cl(Ys()),mk=Object.create(dk),hk=e=>{if(e===void 0)return mk;if(Symbol.iterator in e){let t=Object.create(dk);for(let[n,r]of e)t[n.toLowerCase()]=r;return t}let t=Object.create(dk);for(let[n,r]of Object.entries(e))Array.isArray(r)?t[n.toLowerCase()]=r.join(`, `):r!==void 0&&(t[n.toLowerCase()]=r);return t},gk=e=>Object.setPrototypeOf(e,dk),_k=z(3,(e,t,n)=>{let r=fk(e);return r[t.toLowerCase()]=n,r}),vk=z(2,(e,t)=>fk({...e,...hk(t)})),yk=z(2,(e,t)=>{let n=fk(e);return Object.assign(n,t),n}),bk=z(2,(e,t)=>{let n=fk(e);return delete n[t.toLowerCase()],n}),xk=z(2,(e,t)=>{let n={...e},r=t=>{if(typeof t==`string`){let r=t.toLowerCase();r in e&&(n[r]=By(e[r]))}else for(let r in e)t.test(r)&&(n[r]=By(e[r]))};if(Array.isArray(t))for(let e=0;e<t.length;e++)r(t[e]);else r(t);return n}),Sk=ll(`effect/Headers/CurrentRedactedNames`,{defaultValue:()=>[`authorization`,`cookie`,`set-cookie`,`x-api-key`]}),Ck=`~effect/http/HttpClientError`,wk=e=>Ia(e,Ck),Tk=class extends Eh(`HttpClientError`){constructor(e){`cause`in e.reason?super({...e,cause:e.reason.cause}):super(e)}[Ck]=Ck;get request(){return this.reason.request}get response(){return`response`in this.reason?this.reason.response:void 0}get message(){return this.reason.message}},Ek=e=>e.endsWith(`Error`)?e.slice(0,-5):e,Dk=(e,t,n)=>t?`${e}: ${t} (${n})`:`${e} error (${n})`,Ok=class extends Eh(`TransportError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return Dk(Ek(this._tag),this.description,this.methodAndUrl)}};Eh(`EncodeError`);var kk=class extends Eh(`InvalidUrlError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return Dk(Ek(this._tag),this.description,this.methodAndUrl)}},Ak=class extends Eh(`StatusCodeError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return Dk(Ek(this._tag),this.description,e)}},jk=class extends Eh(`DecodeError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return Dk(Ek(this._tag),this.description,e)}},Mk=class extends Eh(`EmptyBodyError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return Dk(Ek(this._tag),this.description,e)}};vT(Ck)({_tag:Ew(`HttpError`),kind:fw([`EncodeError`,`DecodeError`,`TransportError`,`InvalidUrlError`,`StatusCodeError`,`EmptyBodyError`]),cause:H(Yw())});var Nk=`~effect/http/UrlParams`,Pk=e=>Ia(e,Nk),Fk={...Zo,[Nk]:Nk,[Symbol.iterator](){return this.params[Symbol.iterator]()},toJSON(){return{_id:`UrlParams`,params:Object.fromEntries(this.params)}},[ro](e){return zk(this,e)},[za](){return Xa(this.params.flat())}},Ik=e=>{let t=Object.create(Fk);return t.params=e,t},Lk=e=>{if(Pk(e))return e;let t=Rk(e),n=[];for(let e=0;e<t.length;e++)if(Array.isArray(t[e][0])){let[r,i]=t[e];n.push([`${r[0]}[${r.slice(1).join(`][`)}]`,i])}else n.push(t[e]);return Ik(n)},Rk=e=>{let t=typeof e[Symbol.iterator]==`function`?Tl(e):Object.entries(e),n=[];for(let[e,r]of t)if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]!==void 0&&n.push([e,String(r[t])]);else if(typeof r==`object`){let t=Rk(r);for(let[r,i]of t)n.push([[e,...typeof r==`string`?[r]:r],i])}else r!==void 0&&n.push([e,String(r)]);return n},zk=qs((e,t)=>Bk(e.params,t.params)),Bk=Bl(vl([Ys(),Ys()])),Vk=IC(Pk,{typeConstructor:{_tag:`effect/http/UrlParams`},generation:{runtime:`UrlParams.UrlParamsSchema`,Type:`UrlParams.UrlParams`,Encoded:`typeof UrlParams.UrlParamsSchema["Encoded"]`,importDeclaration:`import * as UrlParams from "effect/unstable/http/UrlParams"`},expected:`UrlParams`,toEquivalence:()=>zk,toCodec:()=>kw()(K(cw([U,U])),Bb({decode:Ik,encode:e=>e.params}))}),Hk=Ik([]),Uk=z(2,(e,t)=>Ik(t(e.params))),Wk=z(2,(e,t)=>{let n=Lk(t),r=n.params,i=new Set;for(let e=0;e<r.length;e++)i.add(r[e][0]);for(let t=0;t<e.params.length;t++)i.has(e.params[t][0])||r.push(e.params[t]);return n}),Gk=z(2,(e,t)=>Uk(e,Ol(Lk(t).params))),Kk=e=>new URLSearchParams(Lk(e).params).toString(),qk=Vk.pipe(vw(ow(U,dw([U,lw(U)])),Bb({decode:e=>{let t={};for(let[n,r]of e.params){let e=t[n];e===void 0?t[n]=r:typeof e==`string`?t[n]=[e,r]:e.push(r)}return t},encode:Lk}))),Jk=`~effect/http/HttpBody`,Yk=e=>Ia(e,Jk);Eh(`HttpBodyError`);var Xk=class{[Jk];constructor(){this[Jk]=Jk}[Fo](){return this.toJSON()}toString(){return Oo(this,{ignoreToString:!0})}},Zk=new class extends Xk{_tag=`Empty`;toJSON(){return{_id:`effect/HttpBody`,_tag:`Empty`}}},Qk=class extends Xk{_tag=`Uint8Array`;body;contentType;contentLength;constructor(e,t,n){super(),this.body=e,this.contentType=t,this.contentLength=n}toJSON(){return{_id:`effect/HttpBody`,_tag:`Uint8Array`,body:this.contentType.startsWith(`text/`)||this.contentType.endsWith(`json`)?new TextDecoder().decode(this.body):`Uint8Array(${this.body.length})`,contentType:this.contentType,contentLength:this.contentLength}}},$k=(e,t)=>new Qk(e,t??`application/octet-stream`,e.length),eA=new TextEncoder,tA=(e,t)=>$k(eA.encode(e),t??`text/plain`),nA=(e,t)=>tA(Kk(Lk(e)),t??`application/x-www-form-urlencoded`),rA=class extends Xk{_tag=`FormData`;contentType=void 0;contentLength=void 0;formData;constructor(e){super(),this.formData=e}toJSON(){return{_id:`effect/HttpBody`,_tag:`FormData`,formData:this.formData}}},iA=e=>new rA(e),aA=e=>e!==`GET`&&e!==`HEAD`&&e!==`OPTIONS`&&e!==`TRACE`,oA=[[`GET`,`get`],[`POST`,`post`],[`PUT`,`put`],[`DELETE`,`del`],[`PATCH`,`patch`],[`HEAD`,`head`],[`OPTIONS`,`options`],[`TRACE`,`trace`]],sA=class extends Eh(`UrlError`){},cA=(e,t,n)=>pl({try:()=>{let r=new URL(e,lA());for(let e=0;e<t.params.length;e++){let[n,i]=t.params[e];i!==void 0&&r.searchParams.append(n,i)}return n!==void 0&&(r.hash=n),r},catch:e=>new sA({cause:e})}),lA=()=>{if(`location`in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname},uA=`~effect/http/HttpClientRequest`,dA={[uA]:uA,...Lo,toJSON(){return{_id:`HttpClientRequest`,method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:wo(this.headers),body:this.body.toJSON()}},pipe(){return la(this,arguments)}};function fA(e,t,n,r,i,a){let o=Object.create(dA);return o.method=e,o.url=t,o.urlParams=n,o.hash=r,o.headers=i,o.body=a,o}var pA=fA(`GET`,``,Hk,Tc(),mk,Zk),mA=e=>(t,n)=>hA(pA,{method:e,url:t,...n??void 0}),hA=z(2,(e,t)=>{let n=e;return t.method&&(n=gA(n,t.method)),t.url&&(n=xA(n,t.url)),t.headers&&(n=vA(n,t.headers)),t.urlParams&&(n=wA(n,t.urlParams)),t.hash&&(n=EA(n,t.hash)),t.body&&(n=DA(n,t.body)),t.accept&&(n=yA(n,t.accept)),t.acceptJson&&(n=bA(n)),n}),gA=z(2,(e,t)=>fA(t,e.url,e.urlParams,e.hash,e.headers,e.body)),_A=z(3,(e,t,n)=>fA(e.method,e.url,e.urlParams,e.hash,_k(e.headers,t,n),e.body)),vA=z(2,(e,t)=>fA(e.method,e.url,e.urlParams,e.hash,vk(e.headers,t),e.body)),yA=z(2,(e,t)=>_A(e,`Accept`,t)),bA=yA(`application/json`),xA=z(2,(e,t)=>{if(typeof t==`string`)return fA(e.method,t,e.urlParams,e.hash,e.headers,e.body);let n=new URL(t.toString()),r=Lk(n.searchParams),i=Mc(n.hash===``?void 0:n.hash.slice(1));return n.search=``,n.hash=``,fA(e.method,n.toString(),r,i,e.headers,e.body)}),SA=z(2,(e,t)=>t===``?e:fA(e.method,CA(t,e.url),e.urlParams,e.hash,e.headers,e.body)),CA=(e,t)=>{let n=e.endsWith(`/`),r=t.startsWith(`/`);return n&&r?e+t.slice(1):!n&&!r?e+`/`+t:e+t},wA=z(2,(e,t)=>fA(e.method,e.url,Wk(e.urlParams,t),e.hash,e.headers,e.body)),TA=z(2,(e,t)=>fA(e.method,e.url,Gk(e.urlParams,t),e.hash,e.headers,e.body)),EA=z(2,(e,t)=>fA(e.method,e.url,e.urlParams,B(t),e.headers,e.body)),DA=z(2,(e,t)=>{let n=e.headers;return t._tag===`Empty`||t._tag===`FormData`?n=bk(bk(n,`Content-Type`),`Content-length`):(t.contentType&&(n=_k(n,`content-type`,t.contentType)),t.contentLength!==void 0&&(n=_k(n,`content-length`,t.contentLength.toString()))),fA(e.method,e.url,e.urlParams,e.hash,n,t)}),OA=z(2,(e,t)=>DA(e,iA(t))),kA=`~effect/http/HttpIncomingMessage`,AA=(e,t)=>{let n=e.headers[`content-type`]??``,r;if(n.includes(`application/json`))try{r=Bg(e.json)}catch{}else if(n.includes(`text/`)||n.includes(`urlencoded`))try{r=Bg(e.text)}catch{}let i={...t,headers:wo(e.headers),remoteAddress:e.remoteAddress};return r!==void 0&&(i.body=r),i},jA=`~effect/http/HttpClientResponse`,MA=(e,t)=>new PA(e,t),NA=z(2,(e,t)=>{let n=e.status;return t[n]?t[n](e):n>=200&&n<300&&t[`2xx`]?t[`2xx`](e):n>=300&&n<400&&t[`3xx`]?t[`3xx`](e):n>=400&&n<500&&t[`4xx`]?t[`4xx`](e):n>=500&&n<600&&t[`5xx`]?t[`5xx`](e):t.orElse(e)}),PA=class extends Ro{[kA];[jA];request;source;constructor(e,t){super(),this.request=e,this.source=t,this[kA]=kA,this[jA]=jA}toJSON(){return AA(this,{_id:`HttpClientResponse`,request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get headers(){return hk(this.source.headers)}cachedCookies;get cookies(){return this.cachedCookies?this.cachedCookies:this.cachedCookies=ak(this.source.headers.getSetCookie())}get remoteAddress(){return Tc()}get stream(){return this.source.body?YT({evaluate:()=>this.source.body,onError:e=>new Tk({reason:new jk({request:this.request,response:this,cause:e})})}):KT(new Tk({reason:new Mk({request:this.request,response:this,description:`can not create stream from empty body`})}))}get json(){return ig(this.text,e=>tg({try:()=>e===``?null:JSON.parse(e),catch:e=>new Tk({reason:new jk({request:this.request,response:this,cause:e})})}))}textBody;get text(){return this.textBody?this.textBody:(this.textBody=Hh({try:()=>this.source.text(),catch:e=>new Tk({reason:new jk({request:this.request,response:this,cause:e})})}).pipe(Tg,Bg),this.arrayBufferBody=lg(this.textBody,e=>new TextEncoder().encode(e).buffer),this.textBody)}get urlParamsBody(){return ig(this.text,e=>tg({try:()=>Lk(new URLSearchParams(e)),catch:e=>new Tk({reason:new jk({request:this.request,response:this,cause:e})})}))}formDataBody;get formData(){return this.formDataBody??=Hh({try:()=>this.source.formData(),catch:e=>new Tk({reason:new jk({request:this.request,response:this,cause:e})})}).pipe(Tg,Bg)}arrayBufferBody;get arrayBuffer(){return this.arrayBufferBody?this.arrayBufferBody:(this.arrayBufferBody=Hh({try:()=>this.source.arrayBuffer(),catch:e=>new Tk({reason:new jk({request:this.request,response:this,cause:e})})}).pipe(Tg,Bg),this.textBody=lg(this.arrayBufferBody,e=>new TextDecoder().decode(e)),this.arrayBufferBody)}pipe(){return la(this,arguments)}},FA=e=>gk({b3:`${e.traceId}-${e.spanId}-${e.sampled?`1`:`0`}${kc(e.parent,{onNone:()=>``,onSome:e=>`-${e.spanId}`})}`,traceparent:`00-${e.traceId}-${e.spanId}-${e.sampled?`01`:`00`}`}),IA=`~effect/http/HttpClient`,LA=Hc(`effect/HttpClient`),RA=z(2,(e,t)=>zA(n=>t(e.postprocess(n)),e.preprocess)),zA=(e,t)=>{let n=Object.create(BA);return n.preprocess=t,n.postprocess=e,n.execute=function(n){return e(t(n))},n},BA={[IA]:IA,pipe(){return la(this,arguments)},...Lo,toJSON(){return{_id:`effect/HttpClient`}},...Object.fromEntries(oA.map(([e,t])=>[t,function(t,n){return this.execute(mA(e)(t,n))}]))},VA=e=>zA(t=>ig(t,t=>ng(n=>{let r=JA.get(t),i=r??new AbortController,a=cA(t.url,t.urlParams,Pc(t.hash));if(hl(a))return Zh(new Tk({reason:new kk({request:t,cause:a.failure})}));let o=a.success;if(n.getRef(Pu)||n.getRef(UA)(t)){let a=e(t,o,i.signal,n);return r?a:kg(e=>hg(e(a),{onSuccess(e){return qA.register(e,i),V(new YA(e,i))},onFailure(e){return Em(e)&&i.abort(),Qh(e)}}))}return jg(n.getRef(GA)(t),{kind:`client`},a=>{a.attribute(`http.request.method`,t.method),a.attribute(`server.address`,o.origin),o.port!==``&&a.attribute(`server.port`,+o.port),a.attribute(`url.full`,o.toString()),a.attribute(`url.path`,o.pathname),a.attribute(`url.scheme`,o.protocol.slice(0,-1));let s=o.search.slice(1);s!==``&&a.attribute(`url.query`,s);let c=n.getRef(Sk),l=xk(t.headers,c);for(let e in l)a.attribute(`http.request.header.${e}`,String(l[e]));return t=n.getRef(WA)?vA(t,FA(a)):t,kg(s=>s(e(t,o,i.signal,n)).pipe(Mg(a,{captureStackTrace:!1}),hg({onSuccess:e=>{a.attribute(`http.response.status_code`,e.status);let t=xk(e.headers,c);for(let e in t)a.attribute(`http.response.header.${e}`,String(t[e]));return r?V(e):(qA.register(e,i),V(new YA(e,i)))},onFailure(e){return!r&&Em(e)&&i.abort(),Qh(e)}})))})})),V),HA=z(2,(e,t)=>zA(e.postprocess,n=>lg(e.preprocess(n),t))),UA=ll(`effect/http/HttpClient/TracerDisabledWhen`,{defaultValue:()=>ha}),WA=ll(`effect/HttpClient/TracerPropagationEnabled`,{defaultValue:ma}),GA=ll(`effect/http/HttpClient/SpanNameGenerator`,{defaultValue:()=>e=>`http.client ${e.method}`}),KA=e=>fh(LA)(_g(t=>lg(e,e=>RA(e,yg(e=>ol(t,e)))))),qA=(()=>{if(`FinalizationRegistry`in globalThis&&globalThis.FinalizationRegistry){let e=new FinalizationRegistry(e=>{e.abort()});return{register(t,n){e.register(t,n,t)},unregister(t){e.unregister(t)}}}let e=new Map;return{register(t,n){e.set(t,setTimeout(()=>n.abort(),5e3))},unregister(t){let n=e.get(t);n!==void 0&&(clearTimeout(n),e.delete(t))}}})(),JA=new WeakMap,YA=class{original;controller;constructor(e,t){this.original=e,this.controller=t}[jA]=jA;[kA]=kA;applyInterrupt(e){return Gh(()=>(qA.unregister(this.original),Dg(e,()=>Kh(()=>{this.controller.abort()}))))}get request(){return this.original.request}get status(){return this.original.status}get headers(){return this.original.headers}get cookies(){return this.original.cookies}get remoteAddress(){return this.original.remoteAddress}get formData(){return this.applyInterrupt(this.original.formData)}get text(){return this.applyInterrupt(this.original.text)}get json(){return this.applyInterrupt(this.original.json)}get urlParamsBody(){return this.applyInterrupt(this.original.urlParamsBody)}get arrayBuffer(){return this.applyInterrupt(this.original.arrayBuffer)}get stream(){return GT(()=>(qA.unregister(this.original),nE(this.original.stream,Kh(()=>{this.controller.abort()}))))}toJSON(){return this.original.toJSON()}[Fo](){return this.original[Fo]()}pipe(){return la(this,arguments)}},XA=ll(`effect/http/FetchHttpClient/Fetch`,{defaultValue:()=>globalThis.fetch}),ZA=class extends Hc()(`effect/http/FetchHttpClient/RequestInit`){},QA=KA(V(VA((e,t,n,r)=>{let i=r.getRef(XA),a=r.context.mapUnsafe.get(ZA.key)??{},o=a.headers?yk(hk(a.headers),e.headers):e.headers;o[`content-length`]&&(o=bk(o,`content-length`));let s=r=>lg(Hh({try:()=>i(t,{...a,method:e.method,headers:o,body:r,duplex:e.body._tag===`Stream`?`half`:void 0,signal:n}),catch:t=>new Tk({reason:new Ok({request:e,cause:t})})}),t=>MA(e,t));switch(e.body._tag){case`Raw`:case`Uint8Array`:return s(e.body.body);case`FormData`:return s(e.body.formData);case`Stream`:return ig(sE(e.body.stream),s)}return s(void 0)})));({...Zo}),Eh(`HttpServerError`),Eh(`RequestParseError`),Eh(`RouteNotFound`),Eh(`InternalError`),Eh(`ResponseError`),Eh(`ServeError`),Hc()(`effect/http/HttpServerError/ClientAbort`);var $A;(function(e){e[e.key=0]=`key`,e[e.whitespace=1]=`whitespace`,e[e.value=2]=`value`})($A||={});var ej;(function(e){e[e.headers=0]=`headers`,e[e.body=1]=`body`})(ej||={}),Eh(`MultipartError`);var tj=Hc(`effect/http/HttpServerRequest`);Hc()(`effect/http/ParsedSearchParams`);var nj=new WeakSet,rj=e=>ng(t=>{let n=el(t.context,tj);return nj.add(n.source),e}),ij=Hc(`effect/http/HttpRouter`);Hc()(`effect/http/HttpRouter/RouteContext`);var aj=e=>e.endsWith(`/`)?e.slice(0,-1):e,oj=z(2,(e,t)=>(t=aj(t),e===`*`?`${t}/*`:e===`/`?t:t+e)),sj=`~effect/http/HttpRouter/Middleware`,cj=function(){return arguments.length===0?lj:lj(arguments[0],arguments[1])},lj=(e,t)=>t?.global?hh(Xh(function*(){let t=yield*ij,n=Rh(e)?yield*e:e;yield*t.addGlobalMiddleware(n)})):new fj(Rh(e)?mh(lg(e,e=>Kc(new Map([[dj,e]])))):dh(Kc(new Map([[dj,e]])))),uj=0,dj=`effect/http/HttpRouter/MiddlewareFn`,fj=class e{[sj]={};layerFn;dependencies;constructor(e,t){this.layerFn=e,this.dependencies=t;let n=`effect/http/HttpRouter/Middleware-${++uj}`;this.layer=mh(Xh({self:this},function*(){let e=yield*gg(),t=[e.mapUnsafe.get(dj)];if(this.dependencies){let n=yield*ch,r=tl(e,Wm),i=yield*lh(this.dependencies,n,r);t.push(...mj(i))}return Kc(new Map([[n,t]]))})).pipe(bh(this.layerFn))}layer;combine(t){return new e(this.layerFn,this.dependencies?xh(this.dependencies,t.layer):t.layer)}},pj=new WeakMap,mj=e=>{let t=pj.get(e);if(t)return t;let n=Ll(),r=0;for(let[t,i]of e.mapUnsafe)t.startsWith(`effect/http/HttpRouter/Middleware-`)&&(n.push(i),i.length>r&&(r=i.length));if(n.length===0)t=[];else{let e=new Set;for(let t=r-1;t>=0;t--)for(let r of n)t<r.length&&e.add(r[t]);t=Tl(e).reverse()}return pj.set(e,t),t};cj(rj).layer;var hj=()=>yv((e,t)=>Kh(()=>{let t=[],n,r=_j(e=>{e._tag===`Retry`?n=e:t.push(e)}),i=ig(e,e=>{for(let t=0;t<e.length;t++)r.feed(e[t]);return qh});return Gh(function e(){if(kl(t)){let e=t;return t=[],V(e)}else if(n)return Zh(n);return ig(i,e)})})),gj=e=>zv(hj(),HO(bj.pipe(vw(e)))());function _j(e){let t,n,r,i,a,o,s,c;return l(),{feed:u,reset:l};function l(){t=!0,n=``,r=0,i=-1,a=void 0,s=void 0,c=``}function u(e){n=n?n+e:e,t&&yj(n)&&(n=n.slice(vj.length)),t=!1;let a=n.length,o=0,s=!1;for(;o<a;){s&&=(n[o]===`
|
|
18
|
+
`&&++o,!1);let e=-1,t=i,c;for(let i=r;e<0&&i<a;++i)c=n[i],c===`:`&&t<0?t=i-o:c===`\r`?(s=!0,e=i-o):c===`
|
|
19
|
+
`&&(e=i-o);if(e<0){r=a-o,i=t;break}else r=0,i=-1;d(n,o,t,e),o+=e+1}o===a?n=``:o>0&&(n=n.slice(o))}function d(t,n,r,i){if(i===0){c.length>0&&(e({_tag:`Event`,id:a,event:s??`message`,data:c.slice(0,-1)}),c=``,a=void 0),s=void 0;return}let l=r<0,u=t.slice(n,n+(l?i:r)),d=0;d=l?i:t[n+r+1]===` `?r+2:r+1;let f=n+d,p=i-d,m=t.slice(f,f+p).toString();if(u===`data`)c+=m?`${m}\n`:`
|
|
20
|
+
`;else if(u===`event`)s=m;else if(u===`id`&&!m.includes(`\0`))a=m,o=m;else if(u===`retry`){let t=parseInt(m,10);Number.isNaN(t)||e(new Sj({duration:lu(t),lastEventId:o}))}}}var vj=[239,187,191];function yj(e){return vj.every((t,n)=>e.charCodeAt(n)===t)}var bj=G({id:H(U),event:U,data:U}),xj=`~effect/encoding/Sse/Retry`,Sj=class e extends Ch(`Retry`){[xj]=xj;static is(e){return Ia(e,xj)}static filter(t){return e.is(t)?dl(t):fl(t)}},Cj={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,OK:200,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511},wj=`~effect/httpapi/HttpApiSchema/Stream`;function Tj(e){let t=typeof e==`string`?Cj[e]:e;return e=>e.annotate({httpApiStatus:t})}var Ej=(e=>iw.pipe(Tj(e)))(204),Dj=e=>JC(e)&&Ia(e,wj),Oj=e=>Dj(e)&&e._tag===`StreamSse`,kj=e=>Dj(e)&&e._tag===`StreamUint8Array`;function Aj(e,t){return e.annotate({"~httpApiEncoding":{_tag:t._tag,contentType:t.contentType??jj(t._tag)}})}function jj(e){switch(e){case`Multipart`:return`multipart/form-data`;case`Json`:return`application/json`;case`FormUrlEncoded`:return`application/x-www-form-urlencoded`;case`Uint8Array`:return`application/octet-stream`;case`Text`:return`text/plain`}}function Mj(e){return t=>Aj(t,{_tag:`FormUrlEncoded`,...e})}var Nj=e=>{if(rx(e)||rx(FS(e)))return!0;let t=e.encoding?.[0].to;return t!==void 0&&rx(t)},Pj=eC(`~httpApiEncoding`),Fj=eC(`httpApiStatus`),Ij={_tag:`Json`,contentType:`application/json`},Lj={_tag:`FormUrlEncoded`,contentType:`application/x-www-form-urlencoded`};function Rj(e){return Pj(e)??Ij}function zj(e,t){return Pj(e)||(aA(t)?Ij:Lj)}function Bj(e){let t=Rj(e);if(t._tag===`Multipart`)throw Error(`Multipart is not supported in response`);return t}function Vj(e){return Fj(e)??200}function Hj(e){return Vj(e.ast)}function Uj(e){return Fj(e)??500}function Wj(e){let t=e.toLowerCase().trim(),n=t.indexOf(`;`);return n===-1?t:t.slice(0,n).trim()}var Gj=`~effect/httpapi/HttpApiEndpoint`;function Kj(e){let t=[];for(let{schemas:n}of e.payload.values())t.push(...n);return t}function qj(e){let t=Array.from(e.success);return kl(t)?t:[Ej]}function Jj(e){let t=new Set(e.error);for(let n of e.middlewares){let e=n;for(let n of e.error)t.add(n)}return Array.from(t)}var Yj={[Gj]:Gj,pipe(){return la(this,arguments)},prefix(e){return Zj({...Xj(this),path:oj(this.path,e)})},middleware(e){return Zj({...Xj(this),middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return Zj({...Xj(this),annotations:Qc(this.annotations,e,t)})},annotateMerge(e){return Zj({...Xj(this),annotations:ol(this.annotations,e)})}},Xj=e=>({identifier:e.identifier,path:e.path,method:e.method,params:e.params,query:e.query,headers:e.headers,payload:e.payload,success:e.success,error:e.error,annotations:e.annotations,middlewares:e.middlewares});function Zj(e){function t(){}return Object.setPrototypeOf(t,Yj),Object.assign(t,e)}var Qj=e=>(t,n,r)=>{let i=r?.disableCodecs??!1,a=i?fa:CT;return Zj({identifier:t,path:n,method:e,params:$j(r?.params,a),query:$j(r?.query,a),headers:$j(r?.headers,a),payload:eM(r?.payload,e,i),success:nM(r?.success,e,i),error:rM(r?.error,i),annotations:Yc(),middlewares:new Set})};function $j(e,t){if(e!==void 0)return JC(e)?t(e):t(G(e))}function eM(e,t,n){let r=new Map;if(e===void 0)return r;let i=Array.isArray(e)?e:JC(e)?[e]:[G(e).pipe(Mj())],a=n?fa:dM;for(let e of i){let n=zj(e.ast,t),i=Wj(n.contentType),o=r.get(i);if(o){if(o.encoding._tag!==n._tag)throw Error(`Multiple payload encodings for content-type: ${n.contentType}`);if(o.encoding._tag===`Multipart`)throw Error(`Multiple multipart payloads for content-type: ${n.contentType}`);o.schemas.push(a(e,t))}else r.set(i,{encoding:n,schemas:[a(e,t)]})}return r}var tM=`effect/httpapi/stream/failure`;function nM(e,t,n){if(e===void 0)return new Set;let r=El(e);return iM(r,t),new Set(n?r:r.map(e=>Dj(e)?e:uM(e)))}function rM(e,t){if(e===void 0)return new Set;let n=El(e);for(let e of n)if(Dj(e))throw Error(`Streaming schemas are not supported in error responses`);return new Set(t?n:n.map(uM))}function iM(e,t){let n=new Map;for(let r of e)if(Dj(r)){oM(r,t);let e=Hj(r),i=aM(n,e);if(i.stream!==void 0)throw Error(`Multiple streaming success responses for status: ${e}`);if(i.noContent)throw Error(`Cannot combine no-content and streaming success responses for status: ${e}`);if(i.bufferedContentTypes.has(Wj(r.contentType)))throw Error(`Cannot combine buffered and streaming success responses for status ${e} and content-type: ${r.contentType}`);n.set(e,{...i,stream:r})}else{let e=Vj(r.ast),t=aM(n,e),i=Nj(r.ast);if(t.stream!==void 0){if(i)throw Error(`Cannot combine no-content and streaming success responses for status: ${e}`);let n=Bj(r.ast);if(Wj(n.contentType)===Wj(t.stream.contentType))throw Error(`Cannot combine buffered and streaming success responses for status ${e} and content-type: ${n.contentType}`)}i||t.bufferedContentTypes.add(Wj(Bj(r.ast).contentType)),t.noContent=t.noContent||i}}function aM(e,t){let n=e.get(t);return n===void 0&&(n={bufferedContentTypes:new Set,noContent:!1},e.set(t,n)),n}function oM(e,t){if(t===`HEAD`)throw Error(`HEAD endpoints cannot declare streaming success responses`);if(Oj(e)&&sM(e.events.ast))throw Error(`SSE event name is reserved: ${tM}`)}function sM(e){return cM(FS(e),new Set)}function cM(e,t){if(t.has(e))return!1;if(t.add(e),lx(e))return e.types.some(e=>cM(e,t));if(ux(e))return cM(e.thunk(),t);if(!cx(e))return!1;let n=e.propertySignatures.find(e=>e.name===`event`);return n!==void 0&&lM(n.type,t)}function lM(e,t){if(t.has(e))return!1;t.add(e);let n=FS(e);return n===e?ax(e)?e.literal===tM:lx(e)?e.types.some(e=>lM(e,t)):ux(e)?lM(e.thunk(),t):!1:lM(n,t)}function uM(e){switch(Bj(e.ast)._tag){case`Json`:return bT(e);case`FormUrlEncoded`:return CT(e);case`Text`:case`Uint8Array`:return e}}function dM(e,t){switch(zj(e.ast,t)._tag){case`Json`:return bT(e);case`FormUrlEncoded`:return CT(e);case`Text`:case`Uint8Array`:case`Multipart`:return e}}var fM=Qj(`GET`),pM=Qj(`POST`),mM=Qj(`PUT`),hM=Qj(`DELETE`),gM=`~effect/httpapi/HttpApi`,_M={[gM]:gM,pipe(){return la(this,arguments)},add(...e){let t={...this.groups};for(let n of e)Iy(t,n.identifier,n);return yM({...vM(this),groups:t})},addHttpApi(e){let t={...this.groups};for(let n in e.groups){let r=e.groups[n];Iy(t,n,r.annotateMerge(ol(e.annotations,r.annotations)))}return yM({...vM(this),groups:t})},prefix(e){return yM({...vM(this),groups:bl(this.groups,t=>t.prefix(e))})},middleware(e){return yM({...vM(this),groups:bl(this.groups,t=>t.middleware(e))})},annotate(e,t){return yM({...vM(this),annotations:Qc(this.annotations,e,t)})},annotateMerge(e){return yM({...vM(this),annotations:ol(this.annotations,e)})}},vM=e=>({identifier:e.identifier,groups:e.groups,annotations:e.annotations}),yM=e=>{function t(){}return Object.setPrototypeOf(t,_M),Object.assign(t,e)},bM=e=>yM({identifier:e,groups:{},annotations:Yc()}),xM=(e,t)=>{let n=Object.values(e.groups);for(let r of n){let n=ol(e.annotations,r.annotations);t.onGroup({group:r,mergedAnnotations:n});let i=Object.values(r.endpoints);for(let e of i)t.predicate&&!t.predicate({endpoint:e,group:r})||t.onEndpoint({group:r,endpoint:e,middleware:e.middlewares,mergedAnnotations:ol(n,e.annotations),successes:SM(qj(e),Vj),errors:SM(Jj(e),Uj)})}},SM=(e,t)=>{let n=new Map;return e.forEach(r),n;function r(e){if(Dj(e))return;let r=e.ast,i=t(r),a=n.get(i);a===void 0?n.set(i,[e]):a.push(e)}};Hc()(`effect/httpapi/HttpApi/AdditionalSchemas`);var CM=(e,t)=>Xh(function*(){let n=yield*gg(),r=t.httpClient.pipe(t?.baseUrl===void 0?fa:HA(SA(t.baseUrl.toString())));function i(e,t,a,o,s){if(s===-1)return r.execute(a);let c=n.mapUnsafe.get(o[s]);return c===void 0?i(e,t,a,o,s-1):c({endpoint:t,group:e,request:a,next(n){return i(e,t,n,o,s-1)}})}xM(e,{predicate:t?.predicate,onGroup(e){t.onGroup?.(e)},onEndpoint(e){let{group:n,endpoint:r,errors:a,successes:o}=e,s=DM(r.path),c={orElse:UM},l=NA(c),u=new Map;for(let[e,t]of a.entries()){let n=jM(t);for(let[t,r]of n.entries())kM(u,e,t,OM(r))}for(let[e,t]of u.entries()){let n=AM(t);c[e]=e=>ig(pg(n(e),t=>Qh(xm(hm(new Tk({reason:new Ak({request:e.request,response:e})})),t))),Zh)}let d=new Map;for(let[e,t]of o.entries()){let n=jM(t);for(let[t,r]of n.entries())kM(d,e,t,OM(r))}for(let e of PM(r))kM(d,Hj(e),e.contentType,FM(e));for(let[e,t]of d.entries())c[e]=AM(t);let f=lC(r.params,WC),p=Kj(r),m=kl(p)?aA(r.method)?WC(GM(p,r.method)):WC(dw(p)):void 0,h=lC(r.headers,WC),g=lC(r.query,WC),_=Array.from(e.middleware,e=>`${e.key}/Client`),v=Ug(function*(e){let a=mA(r.method)(r.path);if(e!==void 0){if(f!==void 0){let t=yield*f(e.params);a=xA(a,s(t))}if(m!==void 0)if(aA(r.method))if(e.payload instanceof FormData)a=OA(a,e.payload);else{let t=yield*m(e.payload);a=DA(a,t)}else{let t=yield*m(e.payload);a=TA(a,t)}if(h!==void 0){let t=yield*h(e.headers);a=vA(a,t)}if(g!==void 0){let t=yield*g(e.query);a=TA(a,t)}}let o=yield*i(n,r,a,_,_.length-1);if(e?.responseMode===`response-only`)return o;let c=yield*t.transformResponse===void 0?l(o):t.transformResponse(l(o));return e?.responseMode===`decoded-and-response`?[c,o]:c});t.onEndpoint({...e,endpointFn:v})}})}),wM=(e,t)=>ig(LA,n=>TM(e,{...t,httpClient:t?.transformClient?t.transformClient(n):n})),TM=(e,t)=>{let n={};return CM(e,{...t,onGroup({group:e}){e.topLevel||Iy(n,e.identifier,{})},onEndpoint({endpoint:e,endpointFn:t,group:r}){Iy(r.topLevel?n:n[r.identifier],e.identifier,t)}}).pipe(ug(n))},EM=/(\/?):(\w+)(\?)?/g,DM=e=>EM.test(e)?(EM.lastIndex=0,t=>(EM.lastIndex=0,e.replace(EM,(e,n,r,i)=>{let a=t[r];if(a===void 0){if(i!==void 0)return``;throw Error(`Missing path parameter: ${r}`)}return`${n}${encodeURIComponent(a)}`}))):t=>e;function OM(e){let t=RC(HM(e));return e=>ig(e.arrayBuffer,t)}function kM(e,t,n,r){let i=Wj(n),a=e.get(t);a===void 0?e.set(t,[{contentType:i,decode:r}]):a.push({contentType:i,decode:r})}function AM(e){let t=e[0];return e.length===1&&t!==void 0?t.decode:t=>{let n=Wj(t.headers[`content-type`]??``),r=e.find(e=>e.contentType===n);return r===void 0?MM(t,n,e):r.decode(t)}}function jM(e){let t=new Map;for(let n of e){let e=Nj(n.ast)?``:Wj(Bj(n.ast).contentType),r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}return t}function MM(e,t,n){let r=Array.from(new Set(n.map(e=>e.contentType))).join(`, `);return Zh(new Tk({reason:new jk({request:e.request,response:e,description:`Unsupported response content-type for status ${e.status}: ${t||`<missing>`}. Expected one of: ${r}`})}))}var NM=`effect/httpapi/stream/failure`;function PM(e){let t=[];for(let n of e.success)Dj(n)&&t.push(n);return t}function FM(e){let t=kj(e)?void 0:{declaration:e,decoder:IM(e)};return e=>lg(gg(),n=>rE(t===void 0?e.stream:LM(e.stream,t.declaration,t.decoder),n))}function IM(e){return gj(dw([G({event:QC(NM),data:aT(bT(Hw(e.error,Yw())))}),e.events]))}function LM(e,t,n){let r=VT(e.pipe(tE,eE(n)),e=>Kh(()=>{let t;return Gh(()=>t===void 0?ig(e,e=>{for(let n=0;n<e.length;n++){let r=e[n];if(r.event===NM&&um(r.data)){if(n===0)return Qh(r.data);t=r.data,e=e.slice(0,n);break}}return V(e)}):Qh(t))}));return t.sseMode===`data`?ZT(r,e=>e.data):r}var RM=Ow(globalThis.ArrayBuffer,{expected:`ArrayBuffer`}),zM=RM.pipe(vw(lT,Bb({decode(e){return new Uint8Array(e)},encode(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}}))),BM=RM.pipe(vw(U,Bb({decode(e){return new TextDecoder().decode(e)},encode(e){let t=new TextEncoder().encode(e);return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}}))),VM=BM.pipe(vw(dw([QC(``).pipe(vw(nw,Bb({decode:()=>void 0,encode:()=>``}))),iT])));function HM(e){return dw(e.map(t));function t(e){switch(Bj(e.ast)._tag){case`Json`:{let t=nx(FS(e.ast));return VM.pipe(vw(e,t?Bb({decode:e=>e===void 0?null:e,encode:e=>e===null?void 0:e}):void 0))}case`FormUrlEncoded`:return BM.pipe(vw(qk),vw(e));case`Uint8Array`:return zM.pipe(vw(e));case`Text`:return BM.pipe(vw(e))}}}var UM=e=>Zh(new Tk({reason:new jk({request:e.request,response:e})})),WM=IC(Yk);function GM(e,t){return dw(e.map(e=>qM(e,t)))}var KM=new WeakMap;function qM(e,t){let n=e.ast,r=KM.get(n);if(r!==void 0)return r;let i=zj(n,t),a=WM.pipe(vw(e,zb({decode(e){return Zh(new $y(B(e),{message:`Encode only schema`}))},encode(e){switch(i._tag){case`Multipart`:return Zh(new $y(B(e),{message:`Payload must be a FormData`}));case`Json`:try{return V(tA(JSON.stringify(e),i.contentType))}catch(t){return Zh(new Qy(B(e),{message:globalThis.String(t)}))}case`Text`:return typeof e==`string`?V(tA(e,i.contentType)):Zh(new Qy(B(e),{message:`Expected a string`}));case`FormUrlEncoded`:return Pa(e)?V(nA(Lk(e),i.contentType)):Zh(new Qy(B(e),{message:`Expected a record`}));case`Uint8Array`:return e instanceof Uint8Array?V($k(e,i.contentType)):Zh(new Qy(B(e),{message:`Expected a Uint8Array`}))}}})));return KM.set(n,a),a}var JM=()=>(e,t)=>{let n=Hc()(e),r=fh(n,wM(t.api,t));n.runtime=(t.runtime??PD)(typeof t.httpClient==`function`?e=>bh(r,t.httpClient(e)):bh(r,t.httpClient));let i=fg(e=>EC(e)||wk(e)?eg(e):Zh(e)),a=t.api.groups,o=WD(({endpoint:e,group:t,responseMode:r})=>{let o=n.runtime.fn()(Ug(function*(a){let o=yield*n,s=i(o[t][e]({...a,responseMode:r}));return yield*a.reactivityKeys?vE(s,a.reactivityKeys):s}));if(r===`decoded-only`){let n=a[t].endpoints[e];return ZD(o,{key:`AtomHttpApi:mutation:${t}:${e}`,schema:GE({success:dw(qj(n)),error:dw(Jj(n))})})}return o});n.mutation=(e,t,n)=>o({group:e,endpoint:t,responseMode:n?.responseMode??`decoded-only`});let s=WD(e=>{let t=n.runtime.atom(n.use(t=>i(t[e.group][e.endpoint](e))));if(e.responseMode===`decoded-only`&&e.serializationKey){let n=a[e.group].endpoints[e.endpoint];t=ZD(t,{key:`AtomHttpApi:${e.group}:${e.endpoint}:${e.serializationKey}`,schema:GE({success:dw(qj(n)),error:dw(Jj(n))})})}return e.timeToLive&&(t=iu(e.timeToLive)?gD(t,e.timeToLive):GD(t)),e.reactivityKeys?n.runtime.factory.withReactivity(e.reactivityKeys)(t):t});return n.query=(e,t,n)=>{let r={group:e,endpoint:t,params:n.params,query:n.query,payload:n.payload,headers:n.headers,responseMode:n.responseMode??`decoded-only`,reactivityKeys:n.reactivityKeys,timeToLive:n.timeToLive?Xl(n.timeToLive):void 0,serializationKey:n.serializationKey};return s(r)},n},YM=U.pipe(_w(`PullRequestId`)),XM=U.pipe(_w(`RepositoryName`)),ZM=U.pipe(_w(`AwsProfileName`)),QM=U.pipe(_w(`AwsRegion`)),$M=U.pipe(_w(`CommentId`)),eN=U.pipe(_w(`SandboxId`)),tN=fw([`OPEN`,`CLOSED`,`MERGED`]),nN=fw([`error`,`info`,`warning`,`success`]),rN=fw([`idle`,`loading`,`error`]),iN=fw([`creating`,`cloning`,`starting`,`running`,`stopping`,`stopped`,`error`]),aN=class extends _T(`Account`)({profile:ZM,region:QM,awsAccountId:H(U),repoAccountId:H(U)}){},oN=class extends _T(`ApprovalRule`)({ruleName:U,requiredApprovals:W,poolMembers:K(U),poolMemberArns:K(U).pipe(Cw(V([]))),satisfied:rw,fromTemplate:H(U)}){},sN=class extends _T(`PullRequest`)({id:YM,title:U,description:H(U),author:U,repositoryName:XM,creationDate:nT,lastModifiedDate:nT,link:U,account:aN,status:tN,sourceBranch:U,destinationBranch:U,isMergeable:rw,isApproved:rw,commentCount:H(W),healthScore:H(W),fetchedAt:H(nT),approvedBy:K(U),approvedByArns:K(U).pipe(Cw(V([]))),commentedBy:K(U),filesChanged:H(W),approvalRules:K(oN).pipe(Cw(V([])))}){get consoleUrl(){return uN(this.account.region,this.repositoryName,this.id)}},cN=(e,t)=>{let n=e=>e.trim().toLowerCase(),r=e=>{let t=n(e).split(/[/:]/).filter(e=>e.length>0);return t[t.length-1]??``},i=n(e),a=n(t);if(i===``||a===``)return!1;if(i===a)return!0;let o=r(e),s=r(t);return o!==``&&o===s},lN=(e,t)=>!t||e.approvedBy.some(e=>cN(t,e))?!1:e.approvalRules.some(e=>!e.satisfied&&e.poolMembers.some(e=>cN(t,e))),uN=(e,t,n)=>`https://${e}.console.aws.amazon.com/codesuite/codecommit/repositories/${t}/pull-requests/${n}?region=${e}`;_T(`Sandbox`)({id:eN,pullRequestId:YM,awsAccountId:U,repositoryName:XM,sourceBranch:U,containerId:H(U),port:H(W),workspacePath:U,status:iN,error:H(U),createdAt:nT,lastActivityAt:nT}),_T(`PRComment`)({id:$M,content:U,author:U,creationDate:nT,inReplyTo:H($M),deleted:rw,filePath:H(U),lineNumber:H(W)});var dN=G({root:G({id:U,content:U,author:U,creationDate:U,inReplyTo:H(U),deleted:rw,filePath:H(U),lineNumber:H(W)}),replies:K(hw(()=>dN))}),fN=G({filePath:H(U),beforeCommitId:H(U),afterCommitId:H(U),comments:K(dN)}),pN=fw([`new_comment`,`comment_edited`,`comment_deleted`,`approval_changed`,`approval_requested`,`review_reminder`,`merge_changed`,`title_changed`,`description_changed`,`pr_merged`,`pr_closed`,`pr_reopened`]);_T(`PersistentNotification`)({id:W,pullRequestId:YM,awsAccountId:U,type:pN,message:U,createdAt:nT,read:rw}),wh(),_T(`NotificationItem`)({type:nN,title:U,message:U,timestamp:nT,profile:YC(U)});var mN=G({author:U,prCount:W}),hN=G({author:U,commentCount:W}),gN=G({author:U,approvalCount:W}),_N=G({id:U,title:U,author:U,repositoryName:U,commentCount:W,awsAccountId:U}),vN=G({small:W,medium:W,large:W,extraLarge:W}),yN=G({filesAdded:W,filesModified:W,filesDeleted:W}),bN=G({author:U,avgFilesChanged:W,prCount:W}),xN=G({id:U,title:U,author:U,repositoryName:U,daysSinceActivity:W,awsAccountId:U}),SN=G({topContributorShare:W,uniqueContributors:W}),CN=G({prId:U,prTitle:U,author:U,repositoryName:U,awsAccountId:U,durationMs:W,fromLabel:U,toLabel:U}),wN=G({week:U,weekStart:U,weekEnd:U,dataAvailableSince:pw(U),prsCreated:W,prsMerged:W,prsClosed:W,totalComments:W,topContributors:K(mN),topReviewers:K(hN),topApprovers:K(gN),medianTimeToMerge:pw(W),medianTimeToFirstReview:pw(W),medianTimeToAddressFeedback:pw(W),mergeTimeDetails:K(CN),firstReviewDetails:K(CN),feedbackDetails:K(CN),mostActivePRs:K(_N),prSizeDistribution:vN,avgDiffSize:pw(yN),diffSizeByContributor:K(bN),stalePRs:K(xN),reviewCoverage:pw(W),approvalRate:pw(W),busFactor:pw(SN),availableRepos:K(U),availableAuthors:K(U),availableAccounts:K(U)}),TN=`~effect/httpapi/HttpApiGroup`,EN={[TN]:TN,add(...e){let t={...this.endpoints};for(let n of e)Iy(t,n.identifier,n);return ON({...DN(this),endpoints:t})},prefix(e){return ON({...DN(this),endpoints:bl(this.endpoints,t=>t.prefix(e))})},middleware(e){return ON({...DN(this),endpoints:bl(this.endpoints,t=>t.middleware(e))})},annotateMerge(e){return ON({...DN(this),annotations:ol(this.annotations,e)})},annotate(e,t){return ON({...DN(this),annotations:Qc(this.annotations,e,t)})},annotateEndpointsMerge(e){return ON({...DN(this),endpoints:bl(this.endpoints,t=>t.annotateMerge(e))})},annotateEndpoints(e,t){return ON({...DN(this),endpoints:bl(this.endpoints,n=>n.annotate(e,t))})},pipe(){return la(this,arguments)}},DN=e=>({identifier:e.identifier,topLevel:e.topLevel,endpoints:e.endpoints,annotations:e.annotations}),ON=e=>{function t(){}return Object.setPrototypeOf(t,EN),t.key=`effect/httpapi/HttpApiGroup/${e.identifier}`,Object.assign(t,e)},kN=(e,t)=>ON({identifier:e,topLevel:t?.topLevel??!1,endpoints:{},annotations:Yc()}),AN=class extends yT()(`ApiError`,{message:U}){},jN=G({id:U,awsAccountId:U,accountProfile:U,accountRegion:U,title:U,description:pw(U),author:U,repositoryName:U,creationDate:U,lastModifiedDate:U,status:U,sourceBranch:U,destinationBranch:U,isMergeable:W,isApproved:W,commentCount:pw(W),link:U,fetchedAt:U}),MN=G({id:W,pullRequestId:U,awsAccountId:U,type:U,title:U,profile:U,message:U,createdAt:U,read:W}),NN=class extends kN(`prs`).add(fM(`list`,`/`,{success:$w(sN)})).add(pM(`refresh`,`/refresh`,{success:U})).add(fM(`search`,`/search`,{query:G({q:U,limit:H(sT.pipe(gw(Iw({minimum:1,maximum:50})))),offset:H(sT.pipe(gw(Fw(0))))}),success:G({items:K(jN),total:W,hasMore:rw}),error:AN})).add(pM(`refreshSingle`,`/:awsAccountId/:prId/refresh`,{params:G({awsAccountId:U,prId:YM}),success:U,error:AN})).add(pM(`create`,`/`,{payload:G({repositoryName:U,title:U,description:H(U),sourceBranch:U,destinationBranch:U,account:aN}),success:U,error:AN})).add(pM(`open`,`/open`,{payload:G({profile:U,link:U.pipe(gw(Aw(e=>/^https:\/\/[\w-]+\.console\.aws\.amazon\.com\//.test(e))))}),success:U,error:AN})).add(fM(`comments`,`/comments`,{query:G({pullRequestId:U,repositoryName:U,profile:ZM,region:QM}),success:K(fN),error:AN})).add(pM(`createApprovalRule`,`/approval-rules`,{payload:G({pullRequestId:U,approvalRuleName:U,requiredApprovals:W,poolMembers:K(U),account:aN}),success:U,error:AN})).add(mM(`updateApprovalRule`,`/approval-rules`,{payload:G({pullRequestId:U,approvalRuleName:U,requiredApprovals:W,poolMembers:K(U),account:aN}),success:U,error:AN})).add(hM(`deleteApprovalRule`,`/approval-rules`,{payload:G({pullRequestId:U,approvalRuleName:U,account:aN}),success:U,error:AN})).prefix(`/api/prs`){},PN=class extends kN(`events`).add(fM(`stream`,`/`,{success:U})).prefix(`/api/events`){},FN=G({hostPath:U,containerPath:U,readonly:rw}),IN=G({image:U,extensions:K(U),setupCommands:K(U),env:ow(U,U),volumeMounts:K(FN),cloneDepth:W}),LN=G({accounts:K(G({profile:U,regions:K(U),enabled:rw})),autoDetect:rw,autoRefresh:rw,refreshIntervalSeconds:W,currentUser:H(U),sandbox:H(IN)}),RN=G({path:U,exists:rw,modifiedAt:H(U)}),zN=G({path:U,sizeBytes:W,exists:rw,modifiedAt:H(U)}),BN=G({status:fw([`valid`,`missing`,`corrupted`]),path:U,errors:K(U)}),VN=G({accounts:K(G({profile:U,regions:K(U),enabled:rw})),autoDetect:rw,autoRefresh:rw,refreshIntervalSeconds:W,sandbox:H(IN)}),HN=G({backupPath:H(U),config:LN}),UN=class extends kN(`config`).add(fM(`list`,`/`,{success:LN})).add(fM(`path`,`/path`,{success:RN,error:AN})).add(fM(`database`,`/database`,{success:zN,error:AN})).add(fM(`validate`,`/validate`,{success:BN,error:AN})).add(pM(`save`,`/save`,{payload:VN,success:U,error:AN})).add(pM(`reset`,`/reset`,{success:HN,error:AN})).prefix(`/api/config`){},WN=class extends kN(`accounts`).add(fM(`list`,`/`,{success:$w(aN)})).prefix(`/api/accounts`){},GN=G({awsAccountId:U,pullRequestId:YM}),KN=G({awsAccountId:U,pullRequestId:U}),qN=class extends kN(`subscriptions`).add(pM(`subscribe`,`/subscribe`,{payload:GN,success:U,error:AN})).add(pM(`unsubscribe`,`/unsubscribe`,{payload:GN,success:U,error:AN})).add(fM(`list`,`/`,{success:K(KN)})).prefix(`/api/subscriptions`){},JN=G({items:K(MN),nextCursor:H(W)}),YN=class extends kN(`notifications`).add(fM(`list`,`/`,{query:G({limit:H(sT.pipe(gw(Iw({minimum:1,maximum:100})))),cursor:H(sT),filter:H(fw([`system`,`prs`])),unreadOnly:H(sT)}),success:JN})).add(fM(`count`,`/count`,{success:G({unread:W})})).add(pM(`markRead`,`/read`,{payload:G({id:W}),success:U})).add(pM(`markUnread`,`/unread`,{payload:G({id:W}),success:U})).add(pM(`markAllRead`,`/read-all`,{success:U})).add(pM(`ssoLogin`,`/sso-login`,{payload:G({profile:ZM}),success:U,error:AN})).add(pM(`ssoLogout`,`/sso-logout`,{success:U,error:AN})).prefix(`/api/notifications`){},XN=G({id:U,pullRequestId:U,awsAccountId:U,repositoryName:U,sourceBranch:U,containerId:pw(U),port:pw(W),status:iN,statusDetail:pw(U),logs:pw(U),error:pw(U),createdAt:U,lastActivityAt:U}),ZN=G({pullRequestId:YM,awsAccountId:U,repositoryName:U,sourceBranch:U,profile:ZM,region:U}),QN=G({sandboxId:eN}),$N=class extends kN(`sandbox`).add(pM(`create`,`/`,{payload:ZN,success:XN,error:AN})).add(fM(`list`,`/`,{success:K(XN),error:AN})).add(fM(`get`,`/:sandboxId`,{params:QN,success:XN,error:AN})).add(pM(`stop`,`/:sandboxId/stop`,{params:QN,success:U,error:AN})).add(pM(`restart`,`/:sandboxId/restart`,{params:QN,success:U,error:AN})).add(hM(`delete`,`/:sandboxId`,{params:QN,success:U,error:AN})).prefix(`/api/sandbox`){},eP=class extends kN(`stats`).add(fM(`get`,`/`,{query:G({week:U.pipe(gw(jw(/^\d{4}-W\d{2}$/))),repo:H(U),author:H(U),account:H(U)}),success:wN,error:AN})).add(pM(`sync`,`/sync`,{payload:G({week:U.pipe(gw(jw(/^\d{4}-W\d{2}$/)))}),success:U,error:AN})).prefix(`/api/stats`){},tP=fw([`always_allow`,`allow`,`deny`]),nP=G({operation:U,state:tP,category:fw([`read`,`write`]),description:U}),rP=G({id:W,timestamp:U,operation:U,accountProfile:U,region:U,permissionState:U,context:U,durationMs:pw(W)}),iP=class extends kN(`permissions`).add(pM(`respond`,`/respond`,{payload:G({id:U,response:fw([`allow_once`,`always_allow`,`deny`])}),success:U,error:AN})).add(fM(`list`,`/`,{success:K(nP)})).add(pM(`update`,`/update`,{payload:G({operation:U,state:tP}),success:U,error:AN})).add(pM(`reset`,`/reset`,{success:U})).add(fM(`auditSettings`,`/audit`,{success:G({enabled:rw,retentionDays:W})})).add(pM(`updateAuditSettings`,`/audit`,{payload:G({enabled:H(rw),retentionDays:H(W)}),success:U,error:AN})).prefix(`/api/permissions`){},aP=class extends kN(`audit`).add(fM(`list`,`/`,{query:G({limit:H(sT.pipe(gw(Iw({minimum:1,maximum:200})))),offset:H(sT.pipe(gw(Fw(0)))),operation:H(U),accountProfile:H(U),permissionState:H(U),from:H(U),to:H(U),search:H(U)}),success:G({items:K(rP),total:W,nextCursor:H(W)}),error:AN})).add(fM(`export`,`/export`,{query:G({from:H(U),to:H(U)}),success:K(rP),error:AN})).add(hM(`clear`,`/`,{success:G({deleted:W}),error:AN})).prefix(`/api/audit`){},oP=class extends bM(`CodeCommitApi`).add(NN).add(PN).add(UN).add(WN).add(YN).add(qN).add($N).add(eP).add(iP).add(aP){},sP=vh(QA,uh(Hc(`@knpkv/codecommit-web/AtomHttpApiRuntimeMarker`),void 0)),cP=JM()(`ApiClient`,{api:oP,baseUrl:`/`,httpClient:sP});cP.runtime;var lP={pullRequests:[],accounts:[],status:`idle`};cP.query(`prs`,`list`,{reactivityKeys:[`prs`],timeToLive:`30 seconds`});var uP=cP.query(`config`,`list`,{reactivityKeys:[`config`],timeToLive:`30 seconds`});cP.query(`accounts`,`list`,{reactivityKeys:[`accounts`],timeToLive:`60 seconds`});var dP=cP.mutation(`prs`,`refresh`),fP=cP.mutation(`prs`,`open`),pP=cP.query(`config`,`path`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),mP=cP.query(`config`,`database`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),hP=cP.query(`config`,`validate`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),gP=cP.mutation(`config`,`save`),_P=cP.mutation(`config`,`reset`),vP=cP.mutation(`notifications`,`ssoLogin`),yP=cP.mutation(`notifications`,`ssoLogout`),bP=cP.query(`subscriptions`,`list`,{reactivityKeys:[`subscriptions`],timeToLive:`5 seconds`}),xP=cP.mutation(`subscriptions`,`subscribe`),SP=cP.mutation(`subscriptions`,`unsubscribe`);cP.query(`notifications`,`list`,{query:{},reactivityKeys:[`notifications`],timeToLive:`10 seconds`}),cP.query(`notifications`,`count`,{reactivityKeys:[`notifications`],timeToLive:`10 seconds`});var CP=cP.mutation(`notifications`,`list`),wP=cP.mutation(`notifications`,`markRead`),TP=cP.mutation(`notifications`,`markUnread`),EP=cP.mutation(`notifications`,`markAllRead`);cP.query(`sandbox`,`list`,{reactivityKeys:[`sandbox`],timeToLive:`5 seconds`});var DP=cP.mutation(`sandbox`,`create`),OP=cP.mutation(`sandbox`,`stop`),kP=cP.mutation(`sandbox`,`restart`),AP=cP.mutation(`sandbox`,`delete`),jP=cP.mutation(`stats`,`sync`);cP.mutation(`prs`,`search`);var MP=cP.mutation(`prs`,`refreshSingle`),NP=cP.mutation(`prs`,`createApprovalRule`),PP=cP.mutation(`prs`,`updateApprovalRule`);cP.mutation(`prs`,`deleteApprovalRule`);var FP=cP.query(`permissions`,`list`,{reactivityKeys:[`permissions`],timeToLive:`30 seconds`}),IP=cP.mutation(`permissions`,`respond`),LP=cP.mutation(`permissions`,`update`),RP=cP.mutation(`permissions`,`reset`),zP=cP.query(`permissions`,`auditSettings`,{reactivityKeys:[`permissions`],timeToLive:`30 seconds`}),BP=cP.mutation(`permissions`,`updateAuditSettings`),VP=cP.mutation(`audit`,`list`),HP=cP.mutation(`audit`,`export`),UP=cP.mutation(`audit`,`clear`),WP=ED(lP).pipe(GD);function GP(e){let t=(0,N.useRef)(e);t.current=e;let n=(0,N.useRef)([]),r=(0,N.useRef)(new Set);return{notify:(0,N.useCallback)(e=>{if(e.id!=null){if(r.current.has(e.id))return;if(r.current.add(e.id),r.current.size>500){let e=[...r.current];r.current=new Set(e.slice(e.length-250))}}if(typeof Notification>`u`||Notification.permission!==`granted`)return;try{if(localStorage.getItem(na.desktopNotifications)!==`true`)return}catch{return}let i=new Notification(e.title||`CodeCommit`,{body:e.message,icon:`/favicon.ico`});i.addEventListener(`click`,()=>{window.focus(),i.close();let n=e.awsAccountId&&e.pullRequestId?`/accounts/${e.awsAccountId}/prs/${e.pullRequestId}`:`/notifications`;t.current?.(n)}),n.current.push(i),setTimeout(()=>{n.current=n.current.filter(e=>e!==i)},3e4)},[])}}var KP=3600*1e3;function qP(e,t){try{let n=localStorage.getItem(e);return n===null?t:n===`true`}catch{return t}}function JP(e,t){try{let n=localStorage.getItem(e);return n===null?t:Number(n)||t}catch{return t}}function YP(e){let t=(0,N.useRef)(e);t.current=e,(0,N.useEffect)(()=>{let e=null,n=()=>{let t=JP(na.reminderInterval,KP);e=setTimeout(r,t)},r=()=>{qP(na.reminders,!0)&&t.current>0&&(EO(`You have ${t.current} PR${t.current>1?`s`:``} awaiting your review`,{duration:1e4}),typeof Notification<`u`&&Notification.permission===`granted`&&qP(na.desktopNotifications,!1)&&new Notification(`Review Reminder`,{body:`${t.current} PR${t.current>1?`s`:``} awaiting your review`,icon:`/favicon.ico`,tag:`review-reminder`})),n()};return n(),()=>{e&&clearTimeout(e)}},[])}var XP=G({id:U,title:U,description:H(U),author:U,repositoryName:U,creationDate:rT,lastModifiedDate:rT,link:U,account:G({profile:U,region:U,awsAccountId:H(U),repoAccountId:H(U)}),status:tN,sourceBranch:U,destinationBranch:U,isMergeable:rw,isApproved:rw,commentCount:H(W),healthScore:H(W),fetchedAt:H(rT),approvedBy:K(U).pipe(Tw(V([]))),approvedByArns:K(U).pipe(Tw(V([]))),commentedBy:K(U).pipe(Tw(V([]))),filesChanged:H(W),approvalRules:K(G({ruleName:U,requiredApprovals:W,poolMembers:K(U),poolMemberArns:K(U).pipe(Tw(V([]))),satisfied:rw,fromTemplate:H(U)})).pipe(Tw(V([])))}),ZP=G({id:W,pullRequestId:U,awsAccountId:U,type:U,title:U,profile:U,message:U,createdAt:U,read:W}),QP=G({id:U,pullRequestId:U,awsAccountId:U,repositoryName:U,sourceBranch:U,containerId:pw(U),port:pw(W),status:U,statusDetail:pw(U),logs:pw(U),error:pw(U),createdAt:U,lastActivityAt:U}),$P=HC(aT(G({pullRequests:K(XP),accounts:K(G({profile:U,region:U,enabled:rw})),status:rN,statusDetail:H(U),error:H(U),lastUpdated:H(rT),currentUser:H(U),pendingReviewCount:W.pipe(Tw(V(0))),unreadNotificationCount:H(W),notifications:H(G({items:K(ZP),nextCursor:H(W)})),sandboxes:H(K(QP)),permissionPrompt:H(G({id:U,operation:U,category:U,context:U}))}))),eF=HC(ZM),tF=HC(QM),nF=HC(sN),rF=e=>({items:e.items,...e.nextCursor===void 0?{}:{nextCursor:e.nextCursor}}),iF=e=>{let t=e.notifications===void 0?void 0:rF(e.notifications);return{pullRequests:e.pullRequests.map(e=>nF(e)),accounts:e.accounts.map(e=>({profile:eF(e.profile),region:tF(e.region),enabled:e.enabled})),status:e.status,pendingReviewCount:e.pendingReviewCount,...e.statusDetail===void 0?{}:{statusDetail:e.statusDetail},...e.error===void 0?{}:{error:e.error},...e.lastUpdated===void 0?{}:{lastUpdated:e.lastUpdated},...e.currentUser===void 0?{}:{currentUser:e.currentUser},...e.unreadNotificationCount===void 0?{}:{unreadNotificationCount:e.unreadNotificationCount},...t===void 0?{}:{notifications:t},...e.sandboxes===void 0?{}:{sandboxes:e.sandboxes},...e.permissionPrompt===void 0?{}:{permissionPrompt:e.permissionPrompt}}};function aF(e,t,n){let r=(0,N.useRef)(e);r.current=e;let i=(0,N.useRef)(t);i.current=t;let a=(0,N.useRef)(n);a.current=n;let[o,s]=(0,N.useState)(`disconnected`),c=(0,N.useRef)(0);return(0,N.useEffect)(()=>{let e=null,t=0,n=null,o=()=>{e=new EventSource(`/api/events/`),e.onopen=()=>{t=0,s(`connected`)},e.onmessage=e=>{try{let t=iF($P(e.data)),n=t.notifications?.items??[],o=new Set([`title_changed`,`description_changed`]);if(c.current>0)for(let e of n)e.id>c.current&&!o.has(e.type)&&(EO(e.title||`New notification`,{id:`notif-${e.id}`,description:e.message,duration:8e3,action:e.awsAccountId&&e.pullRequestId?{label:`View`,onClick:()=>i.current?.(`/accounts/${e.awsAccountId}/prs/${e.pullRequestId}`)}:{label:`View`,onClick:()=>i.current?.(`/notifications`)}}),a.current?.({id:e.id,type:e.type,title:e.title||`CodeCommit`,message:e.message,awsAccountId:e.awsAccountId,pullRequestId:e.pullRequestId}));if(n.length>0){let e=Math.max(...n.map(e=>e.id));e>c.current&&(c.current=e)}r.current(t)}catch{}},e.onerror=()=>{if(e?.close(),t>=50){s(`disconnected`);return}s(`reconnecting`);let r=Math.min(1e3*2**t,3e4);n=setTimeout(()=>{t++,o()},r)}};return o(),()=>{e?.close(),n&&clearTimeout(n)}},[]),o}var oF=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),sF=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),cF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),lF=e=>{let t=cF(e);return t.charAt(0).toUpperCase()+t.slice(1)},uF={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`},dF=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},fF=(0,N.createContext)({}),pF=()=>(0,N.useContext)(fF),mF=(0,N.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=pF()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,N.createElement)(`svg`,{ref:c,...uF,width:t??l??uF.width,height:t??l??uF.height,stroke:e??f,strokeWidth:m,className:oF(`lucide`,p,i),...!a&&!dF(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,N.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),q=(e,t)=>{let n=(0,N.forwardRef)(({className:n,...r},i)=>(0,N.createElement)(mF,{ref:i,iconNode:t,className:oF(`lucide-${sF(lF(e))}`,`lucide-${e}`,n),...r}));return n.displayName=lF(e),n},hF=q(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),gF=q(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),_F=q(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),vF=q(`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`}]]),yF=q(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),bF=q(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),xF=q(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),SF=q(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),CF=q(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),wF=q(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),TF=q(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),EF=q(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),DF=q(`circle-alert`,[[`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`}]]),OF=q(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),kF=q(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),AF=q(`circle-x`,[[`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`}]]),jF=q(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),MF=q(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),NF=q(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),PF=q(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),FF=q(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),IF=q(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),LF=q(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),RF=q(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),zF=q(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),BF=q(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),VF=q(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),HF=q(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),UF=q(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),WF=q(`layout-list`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]),GF=q(`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`}]]),KF=q(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),qF=q(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),JF=q(`mail-open`,[[`path`,{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`,key:`1jhwl8`}],[`path`,{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`,key:`1qfld7`}]]),YF=q(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),XF=q(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),ZF=q(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),QF=q(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),$F=q(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),eI=q(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),tI=q(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),nI=q(`refresh-cw`,[[`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`}]]),rI=q(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),iI=q(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),aI=q(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),oI=q(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),sI=q(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),cI=q(`shield-check`,[[`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`}]]),lI=q(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),uI=q(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),dI=q(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),fI=q(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),pI=q(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),mI=q(`triangle-alert`,[[`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`}]]),hI=q(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),gI=q(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),_I=[`account`,`author`,`approver`,`commenter`,`scope`,`repo`,`status`,`size`],vI=ED(!1).pipe(GD),yI=[`accounts`,`refresh`,`sandbox`,`notifications`,`permissions`,`audit`,`theme`,`config`,`about`];ED(`accounts`).pipe(GD);var bI=1,xI=.9,SI=.8,CI=.17,wI=.1,TI=.999,EI=.9999,DI=.99,OI=/[\\\/_+.#"@\[\(\{&]/,kI=/[\\\/_+.#"@\[\(\{&]/g,AI=/[\s-]/,jI=/[\s-]/g;function MI(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?bI:DI;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=MI(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=bI:OI.test(e.charAt(l-1))?(d*=SI,p=e.slice(i,l-1).match(kI),p&&i>0&&(d*=TI**+p.length)):AI.test(e.charAt(l-1))?(d*=xI,m=e.slice(i,l-1).match(jI),m&&i>0&&(d*=TI**+m.length)):(d*=CI,i>0&&(d*=TI**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=EI)),(d<wI&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=MI(e,t,n,r,l+1,a+2,o),f*wI>d&&(d=f*wI)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function NI(e){return e.toLowerCase().replace(jI,` `)}function PI(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,MI(e,t,NI(e),NI(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function J(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}function FI(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function II(...e){return t=>{let n=!1,r=e.map(e=>{let r=FI(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():FI(e[t],null)}}}}function LI(...e){return N.useCallback(II(...e),e)}function RI(e,t=[]){let n=[];function r(t,r){let i=N.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=N.useMemo(()=>o,Object.values(o));return(0,R.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=N.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=>N.createContext(e));return function(n){let r=n?.[e]||t;return N.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,zI(i,...t)]}function zI(...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 N.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var BI=globalThis?.document?N.useLayoutEffect:()=>{},VI=N.useId||(()=>void 0),HI=0;function UI(e){let[t,n]=N.useState(VI());return BI(()=>{e||n(e=>e??String(HI++))},[e]),e||(t?`radix-${t}`:``)}var WI=N.useInsertionEffect||BI;function GI({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=KI({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=N.useRef(e!==void 0);N.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,N.useCallback(t=>{if(s){let n=qI(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function KI({defaultProp:e,onChange:t}){let[n,r]=N.useState(e),i=N.useRef(n),a=N.useRef(t);return WI(()=>{a.current=t},[t]),N.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function qI(e){return typeof e==`function`}function JI(e){let t=N.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];nL(r)&&typeof oL==`function`&&(r=oL(r._payload)),N.Children.forEach(r,e=>{if(eL(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;nL(n)&&typeof oL==`function`&&(n=oL(n._payload)),a=ZI(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=N.cloneElement(a,void 0,s):!o&&N.Children.count(r)===1&&N.isValidElement(r)&&(a=r);let c=a?$I(a):void 0,l=LI(n,c);if(!a){if(r||r===0)throw Error(o?aL(e):iL(e));return r}let u=QI(i,a.props??{});return a.type!==N.Fragment&&(u.ref=n?l:c),N.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var YI=JI(`Slot`),XI=Symbol.for(`radix.slottable`),ZI=(e,t)=>{if(`child`in e.props){let t=e.props.child;return N.isValidElement(t)?N.cloneElement(t,void 0,e.props.children(t.props.children)):null}return N.isValidElement(t)?t:null};function QI(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 $I(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 eL(e){return N.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===XI}var tL=Symbol.for(`react.lazy`);function nL(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===tL&&`_payload`in e&&rL(e._payload)}function rL(e){return typeof e==`object`&&!!e&&`then`in e}var iL=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,aL=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,oL=N.use,sL=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=JI(`Primitive.${t}`),r=N.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,R.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cL(e,t){e&&ca.flushSync(()=>e.dispatchEvent(t))}function lL(e){let t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>((...e)=>t.current?.(...e)),[])}var uL=`DismissableLayer`,dL=`dismissableLayer.update`,fL=`dismissableLayer.pointerDownOutside`,pL=`dismissableLayer.focusOutside`,mL,hL=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),gL=N.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=N.useContext(hL),[d,f]=N.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=N.useState({}),h=LI(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=N.useRef(!1),C=xL(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:N.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=SL(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=lL(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return N.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),N.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(mL=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),CL(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=mL))}},[d,p,n,u]),N.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),CL())},[d,u]),N.useEffect(()=>{let e=()=>m({});return document.addEventListener(dL,e),()=>document.removeEventListener(dL,e)},[]),(0,R.jsx)(sL.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:J(e.onFocusCapture,w.onFocusCapture),onBlurCapture:J(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,C.onPointerDownCapture)})});gL.displayName=uL;var _L=`DismissableLayerBranch`,vL=N.forwardRef((e,t)=>{let n=N.useContext(hL),r=N.useRef(null),i=LI(t,r);return N.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,R.jsx)(sL.div,{...e,ref:i})});vL.displayName=_L;function yL(){let e=N.useContext(hL),[t,n]=N.useState(null);return N.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}var bL=()=>!0;function xL(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=bL}=t,s=lL(e),c=N.useRef(!1),l=N.useRef(!1),u=N.useRef(new Map),d=N.useRef(()=>{});return N.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||wL(fL,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 SL(e,t=globalThis?.document){let n=lL(e),r=N.useRef(!1);return N.useEffect(()=>{let e=e=>{e.target&&!r.current&&wL(pL,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 CL(){let e=new CustomEvent(dL);document.dispatchEvent(e)}function wL(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?cL(i,a):i.dispatchEvent(a)}var TL=`focusScope.autoFocusOnMount`,EL=`focusScope.autoFocusOnUnmount`,DL={bubbles:!1,cancelable:!0},OL=`FocusScope`,kL=N.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=N.useState(null),l=lL(i),u=lL(a),d=N.useRef(null),f=LI(t,c),p=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:IL(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||IL(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&IL(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]),N.useEffect(()=>{if(s){LL.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(TL,DL);s.addEventListener(TL,l),s.dispatchEvent(t),t.defaultPrevented||(AL(BL(ML(s)),{select:!0}),document.activeElement===e&&IL(s))}return()=>{s.removeEventListener(TL,l),setTimeout(()=>{let t=new CustomEvent(EL,DL);s.addEventListener(EL,u),s.dispatchEvent(t),t.defaultPrevented||IL(e??document.body,{select:!0}),s.removeEventListener(EL,u),LL.remove(p)},0)}}},[s,l,u,p]);let m=N.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]=jL(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&IL(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&IL(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,R.jsx)(sL.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});kL.displayName=OL;function AL(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(IL(r,{select:t}),document.activeElement!==n)return}function jL(e){let t=ML(e);return[NL(t,e),NL(t.reverse(),e)]}function ML(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 NL(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):PL(r,{upTo:t})))return r}function PL(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 FL(e){return e instanceof HTMLInputElement&&`select`in e}function IL(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&FL(e)&&t&&e.select()}}var LL=RL();function RL(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=zL(e,t),e.unshift(t)},remove(t){e=zL(e,t),e[0]?.resume()}}}function zL(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function BL(e){return e.filter(e=>e.tagName!==`A`)}var VL=`Portal`,HL=N.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=N.useState(!1);BI(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ca.createPortal((0,R.jsx)(sL.div,{...r,ref:t}),o):null});HL.displayName=VL;function UL(e,t){return N.useReducer((e,n)=>t[e][n]??e,e)}var WL=e=>{let{present:t,children:n}=e,r=GL(t),i=typeof n==`function`?n({present:r.isPresent}):N.Children.only(n),a=qL(r.ref,YL(i));return typeof n==`function`||r.isPresent?N.cloneElement(i,{ref:a}):null};WL.displayName=`Presence`;function GL(e){let[t,n]=N.useState(),r=N.useRef(null),i=N.useRef(e),a=N.useRef(`none`),o=N.useRef(void 0),[s,c]=UL(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return N.useEffect(()=>{s===`mounted`?(a.current=o.current??JL(r.current),o.current=void 0):a.current=`none`},[s]),BI(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=JL(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]),BI(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=JL(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=JL(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:N.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=JL(t)}else r.current=null;n(e)},[])}}function KL(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function qL(...e){let t=N.useRef(e);return t.current=e,N.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=KL(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():KL(n[e],null)}}},[])}function JL(e){return e?.animationName||`none`}function YL(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 XL=0,ZL=null;function QL(){N.useEffect(()=>{ZL||={start:$L(),end:$L()};let{start:e,end:t}=ZL;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),XL++,()=>{XL===1&&(ZL?.start.remove(),ZL?.end.remove(),ZL=null),XL=Math.max(0,XL-1)}},[])}function $L(){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 eR=function(){return eR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},eR.apply(this,arguments)};function tR(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 nR(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 rR=`right-scroll-bar-position`,iR=`width-before-scroll-bar`,aR=`with-scroll-bars-hidden`,oR=`--removed-body-scroll-bar-size`;function sR(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function cR(e,t){var n=(0,N.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 lR=typeof window<`u`?N.useLayoutEffect:N.useEffect,uR=new WeakMap;function dR(e,t){var n=cR(t||null,function(t){return e.forEach(function(e){return sR(e,t)})});return lR(function(){var t=uR.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||sR(e,null)}),i.forEach(function(e){r.has(e)||sR(e,a)})}uR.set(n,e)},[e]),n}function fR(e){return e}function pR(e,t){t===void 0&&(t=fR);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 mR(e){e===void 0&&(e={});var t=pR(null);return t.options=eR({async:!0,ssr:!1},e),t}var hR=function(e){var t=e.sideCar,n=tR(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 N.createElement(r,eR({},n))};hR.isSideCarExport=!0;function gR(e,t){return e.useMedium(t),hR}var _R=mR(),vR=function(){},yR=N.forwardRef(function(e,t){var n=N.useRef(null),r=N.useState({onScrollCapture:vR,onWheelCapture:vR,onTouchMoveCapture:vR}),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,v=_===void 0?`div`:_,y=e.gapMode,b=tR(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=dR([n,t]),C=eR(eR({},b),i);return N.createElement(N.Fragment,null,u&&N.createElement(x,{sideCar:_R,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?N.cloneElement(N.Children.only(s),eR(eR({},C),{ref:S})):N.createElement(v,eR({},C,{className:c,ref:S}),s))});yR.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},yR.classNames={fullWidth:iR,zeroRight:rR};var bR,xR=function(){if(bR)return bR;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function SR(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=xR();return t&&e.setAttribute(`nonce`,t),e}function CR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wR(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var TR=function(){var e=0,t=null;return{add:function(n){e==0&&(t=SR())&&(CR(t,n),wR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ER=function(){var e=TR();return function(t,n){N.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},DR=function(){var e=ER();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},OR={left:0,top:0,right:0,gap:0},kR=function(e){return parseInt(e||``,10)||0},AR=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[kR(n),kR(r),kR(i)]},jR=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return OR;var t=AR(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])}},MR=DR(),NR=`data-scroll-locked`,PR=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
21
|
+
.${aR} {
|
|
22
|
+
overflow: hidden ${r};
|
|
23
|
+
padding-right: ${s}px ${r};
|
|
24
|
+
}
|
|
25
|
+
body[${NR}] {
|
|
26
|
+
overflow: hidden ${r};
|
|
27
|
+
overscroll-behavior: contain;
|
|
28
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
29
|
+
padding-left: ${i}px;
|
|
30
|
+
padding-top: ${a}px;
|
|
31
|
+
padding-right: ${o}px;
|
|
32
|
+
margin-left:0;
|
|
33
|
+
margin-top:0;
|
|
34
|
+
margin-right: ${s}px ${r};
|
|
35
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.${rR} {
|
|
39
|
+
right: ${s}px ${r};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.${iR} {
|
|
43
|
+
margin-right: ${s}px ${r};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.${rR} .${rR} {
|
|
47
|
+
right: 0 ${r};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.${iR} .${iR} {
|
|
51
|
+
margin-right: 0 ${r};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
body[${NR}] {
|
|
55
|
+
${oR}: ${s}px;
|
|
56
|
+
}
|
|
57
|
+
`},FR=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},IR=function(){N.useEffect(function(){return document.body.setAttribute(NR,(FR()+1).toString()),function(){var e=FR()-1;e<=0?document.body.removeAttribute(NR):document.body.setAttribute(NR,e.toString())}},[])},LR=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;IR();var a=N.useMemo(function(){return jR(i)},[i]);return N.createElement(MR,{styles:PR(a,!t,i,n?``:`!important`)})},RR=!1;if(typeof window<`u`)try{var zR=Object.defineProperty({},"passive",{get:function(){return RR=!0,!0}});window.addEventListener(`test`,zR,zR),window.removeEventListener(`test`,zR,zR)}catch{RR=!1}var BR=RR?{passive:!1}:!1,VR=function(e){return e.tagName===`TEXTAREA`},HR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!VR(e)&&n[t]===`visible`)},UR=function(e){return HR(e,`overflowY`)},WR=function(e){return HR(e,`overflowX`)},GR=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),JR(e,r)){var i=YR(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},KR=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},qR=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},JR=function(e,t){return e===`v`?UR(t):WR(t)},YR=function(e,t){return e===`v`?KR(t):qR(t)},XR=function(e,t){return e===`h`&&t===`rtl`?-1:1},ZR=function(e,t,n,r,i){var a=XR(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=YR(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&JR(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},QR=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$R=function(e){return[e.deltaX,e.deltaY]},ez=function(e){return e&&`current`in e?e.current:e},tz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nz=function(e){return`
|
|
58
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
59
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
60
|
+
`},rz=0,iz=[];function az(e){var t=N.useRef([]),n=N.useRef([0,0]),r=N.useRef(),i=N.useState(rz++)[0],a=N.useState(DR)[0],o=N.useRef(e);N.useEffect(function(){o.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=nR([e.lockRef.current],(e.shards||[]).map(ez),!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=N.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=QR(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=GR(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=GR(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 ZR(h,t,e,h===`h`?s:c,!0)},[]),c=N.useCallback(function(e){var n=e;if(!(!iz.length||iz[iz.length-1]!==a)){var r=`deltaY`in n?$R(n):QR(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&tz(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(ez).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=N.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:oz(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=N.useCallback(function(e){n.current=QR(e),r.current=void 0},[]),d=N.useCallback(function(t){l(t.type,$R(t),t.target,s(t,e.lockRef.current))},[]),f=N.useCallback(function(t){l(t.type,QR(t),t.target,s(t,e.lockRef.current))},[]);N.useEffect(function(){return iz.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,BR),document.addEventListener(`touchmove`,c,BR),document.addEventListener(`touchstart`,u,BR),function(){iz=iz.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,BR),document.removeEventListener(`touchmove`,c,BR),document.removeEventListener(`touchstart`,u,BR)}},[]);var p=e.removeScrollBar,m=e.inert;return N.createElement(N.Fragment,null,m?N.createElement(a,{styles:nz(i)}):null,p?N.createElement(LR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function oz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var sz=gR(_R,az),cz=N.forwardRef(function(e,t){return N.createElement(yR,eR({},e,{ref:t,sideCar:sz}))});cz.classNames=yR.classNames;var lz=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},uz=new WeakMap,dz=new WeakMap,fz={},pz=0,mz=function(e){return e&&(e.host||mz(e.parentNode))},hz=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=mz(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})},gz=function(e,t,n,r){var i=hz(t,Array.isArray(e)?e:[e]);fz[n]||(fz[n]=new WeakMap);var a=fz[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=(uz.get(e)||0)+1,l=(a.get(e)||0)+1;uz.set(e,c),a.set(e,l),o.push(e),c===1&&i&&dz.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(),pz++,function(){o.forEach(function(e){var t=uz.get(e)-1,i=a.get(e)-1;uz.set(e,t),a.set(e,i),t||(dz.has(e)||e.removeAttribute(r),dz.delete(e)),i||e.removeAttribute(n)}),pz--,pz||(uz=new WeakMap,uz=new WeakMap,dz=new WeakMap,fz={})}},_z=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||lz(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),gz(r,i,n,`aria-hidden`)):function(){return null}},vz=`Dialog`,[yz,eee]=RI(vz),[bz,xz]=yz(vz),Sz=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=N.useRef(null),c=N.useRef(null),[l,u]=GI({prop:r,defaultProp:i??!1,onChange:a,caller:vz});return(0,R.jsx)(bz,{scope:t,triggerRef:s,contentRef:c,contentId:UI(),titleId:UI(),descriptionId:UI(),open:l,onOpenChange:u,onOpenToggle:N.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};Sz.displayName=vz;var Cz=`DialogTrigger`,wz=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=xz(Cz,n),a=LI(t,i.triggerRef);return(0,R.jsx)(sL.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Wz(i.open),...r,ref:a,onClick:J(e.onClick,i.onOpenToggle)})});wz.displayName=Cz;var Tz=`DialogPortal`,[Ez,Dz]=yz(Tz,{forceMount:void 0}),Oz=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=xz(Tz,t);return(0,R.jsx)(Ez,{scope:t,forceMount:n,children:N.Children.map(r,e=>(0,R.jsx)(WL,{present:n||a.open,children:(0,R.jsx)(HL,{asChild:!0,container:i,children:e})}))})};Oz.displayName=Tz;var kz=`DialogOverlay`,Az=N.forwardRef((e,t)=>{let n=Dz(kz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=xz(kz,e.__scopeDialog);return a.modal?(0,R.jsx)(WL,{present:r||a.open,children:(0,R.jsx)(Mz,{...i,ref:t})}):null});Az.displayName=kz;var jz=JI(`DialogOverlay.RemoveScroll`),Mz=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=xz(kz,n),a=LI(t,yL());return(0,R.jsx)(cz,{as:jz,allowPinchZoom:!0,shards:[i.contentRef],children:(0,R.jsx)(sL.div,{"data-state":Wz(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),Nz=`DialogContent`,Pz=N.forwardRef((e,t)=>{let n=Dz(Nz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=xz(Nz,e.__scopeDialog);return(0,R.jsx)(WL,{present:r||a.open,children:a.modal?(0,R.jsx)(Fz,{...i,ref:t}):(0,R.jsx)(Iz,{...i,ref:t})})});Pz.displayName=Nz;var Fz=N.forwardRef((e,t)=>{let n=xz(Nz,e.__scopeDialog),r=N.useRef(null),i=LI(t,n.contentRef,r);return N.useEffect(()=>{let e=r.current;if(e)return _z(e)},[]),(0,R.jsx)(Lz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault())})}),Iz=N.forwardRef((e,t)=>{let n=xz(Nz,e.__scopeDialog),r=N.useRef(!1),i=N.useRef(!1);return(0,R.jsx)(Lz,{...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()}})}),Lz=N.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=xz(Nz,n);return QL(),(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(kL,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,R.jsx)(gL,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Wz(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),Rz=`DialogTitle`,zz=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=xz(Rz,n);return(0,R.jsx)(sL.h2,{id:i.titleId,...r,ref:t})});zz.displayName=Rz;var Bz=`DialogDescription`,Vz=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=xz(Bz,n);return(0,R.jsx)(sL.p,{id:i.descriptionId,...r,ref:t})});Vz.displayName=Bz;var Hz=`DialogClose`,Uz=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=xz(Hz,n);return(0,R.jsx)(sL.button,{type:`button`,...r,ref:t,onClick:J(e.onClick,()=>i.onOpenChange(!1))})});Uz.displayName=Hz;function Wz(e){return e?`open`:`closed`}var Gz=`[cmdk-group=""]`,Kz=`[cmdk-group-items=""]`,qz=`[cmdk-group-heading=""]`,Jz=`[cmdk-item=""]`,Yz=`${Jz}:not([aria-disabled="true"])`,Xz=`cmdk-item-select`,Zz=`data-value`,Qz=(e,t,n)=>PI(e,t,n),$z=N.createContext(void 0),eB=()=>N.useContext($z),tB=N.createContext(void 0),nB=()=>N.useContext(tB),rB=N.createContext(void 0),iB=N.forwardRef((e,t)=>{let n=vB(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=vB(()=>new Set),i=vB(()=>new Map),a=vB(()=>new Map),o=vB(()=>new Set),s=gB(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=UI(),y=UI(),b=UI(),x=N.useRef(null),S=xB();_B(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),_B(()=>{S(6,k)},[]);let C=N.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=A()?.id,C.emit()}),r||S(5,k),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=N.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??Qz;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;j().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Kz);t?t.appendChild(e.parentElement===t?e:e.closest(`${Kz} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Kz} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${Gz}[${Zz}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=j().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Zz);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function k(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Gz)?.querySelector(qz))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return x.current?.querySelector(`${Jz}[aria-selected="true"]`)}function j(){return Array.from(x.current?.querySelectorAll(Yz)||[])}function M(e){let t=j()[e];t&&C.setState(`value`,t.getAttribute(Zz))}function ee(e){var t;let n=A(),r=j(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(Zz))}function P(e){let t=A()?.closest(Gz),n;for(;t&&!n;)t=e>0?mB(t,Gz):hB(t,Gz),n=t?.querySelector(Yz);n?C.setState(`value`,n.getAttribute(Zz)):ee(e)}let F=()=>M(j().length-1),I=e=>{e.preventDefault(),e.metaKey?F():e.altKey?P(1):ee(1)},te=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?P(-1):ee(-1)};return N.createElement(sL.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&I(e);break;case`ArrowDown`:I(e);break;case`p`:case`k`:g&&e.ctrlKey&&te(e);break;case`ArrowUp`:te(e);break;case`Home`:e.preventDefault(),M(0);break;case`End`:e.preventDefault(),F();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(Xz);t.dispatchEvent(e)}}}}},N.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:wB},c),CB(e,e=>N.createElement(tB.Provider,{value:C},N.createElement($z.Provider,{value:w},e))))}),aB=N.forwardRef((e,t)=>{let n=UI(),r=N.useRef(null),i=N.useContext(rB),a=eB(),o=gB(e),s=o.current?.forceMount??i?.forceMount;_B(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=bB(n,r,[e.value,e.children,r],e.keywords),l=nB(),u=yB(e=>e.value&&e.value===c.current),d=yB(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);N.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(Xz,f),()=>t.removeEventListener(Xz,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return N.createElement(sL.div,{ref:II(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),oB=N.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=UI(),s=N.useRef(null),c=N.useRef(null),l=UI(),u=eB(),d=yB(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));_B(()=>u.group(o),[]),bB(o,s,[e.value,e.heading,c]);let f=N.useMemo(()=>({id:o,forceMount:i}),[i]);return N.createElement(sL.div,{ref:II(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&N.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),CB(e,e=>N.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},N.createElement(rB.Provider,{value:f},e))))}),sB=N.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=N.useRef(null),a=yB(e=>!e.search);return!n&&!a?null:N.createElement(sL.div,{ref:II(i,t),...r,"cmdk-separator":``,role:`separator`})}),cB=N.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=nB(),o=yB(e=>e.search),s=yB(e=>e.selectedItemId),c=eB();return N.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),N.createElement(sL.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),lB=N.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=N.useRef(null),o=N.useRef(null),s=yB(e=>e.selectedItemId),c=eB();return N.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),N.createElement(sL.div,{ref:II(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},CB(e,e=>N.createElement(`div`,{ref:II(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),uB=N.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return N.createElement(Sz,{open:n,onOpenChange:r},N.createElement(Oz,{container:o},N.createElement(Az,{"cmdk-overlay":``,className:i}),N.createElement(Pz,{"aria-label":e.label,"cmdk-dialog":``,className:a},N.createElement(iB,{ref:t,...s}))))}),dB=N.forwardRef((e,t)=>yB(e=>e.filtered.count===0)?N.createElement(sL.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),fB=N.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return N.createElement(sL.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},CB(e,e=>N.createElement(`div`,{"aria-hidden":!0},e)))}),pB=Object.assign(iB,{List:lB,Item:aB,Input:cB,Group:oB,Separator:sB,Dialog:uB,Empty:dB,Loading:fB});function mB(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function hB(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function gB(e){let t=N.useRef(e);return _B(()=>{t.current=e}),t}var _B=typeof window>`u`?N.useEffect:N.useLayoutEffect;function vB(e){let t=N.useRef();return t.current===void 0&&(t.current=e()),t}function yB(e){let t=nB(),n=()=>e(t.snapshot());return N.useSyncExternalStore(t.subscribe,n,n)}function bB(e,t,n,r=[]){let i=N.useRef(),a=eB();return _B(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(Zz,s),i.current=s}),i}var xB=()=>{let[e,t]=N.useState(),n=vB(()=>new Map);return _B(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function SB(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function CB({asChild:e,children:t},n){return e&&N.isValidElement(t)?N.cloneElement(SB(t),{ref:t.ref},n(t.props.children)):n(t)}var wB={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},TB=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`}),EB=`VisuallyHidden`,DB=N.forwardRef((e,t)=>(0,R.jsx)(sL.span,{...e,ref:t,style:{...TB,...e.style}}));DB.displayName=EB;function OB(e){let t=e+`CollectionProvider`,[n,r]=RI(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=N.useRef(null),a=N.useRef(new Map).current;return(0,R.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=JI(s),l=N.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=LI(t,a(s,n).collectionRef);return(0,R.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=JI(u),p=N.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=N.useRef(null),s=LI(t,o),c=a(u,n);return N.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,R.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return N.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]}var kB=N.createContext(void 0);function AB(e){let t=N.useContext(kB);return e||t||`ltr`}function jB(e){let t=N.useRef({value:e,previous:e});return N.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function MB(e){let[t,n]=N.useState(void 0);return BI(()=>{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 NB=[`top`,`right`,`bottom`,`left`],PB=Math.min,FB=Math.max,IB=Math.round,LB=Math.floor,RB=e=>({x:e,y:e}),zB={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function BB(e,t,n){return FB(e,PB(t,n))}function VB(e,t){return typeof e==`function`?e(t):e}function HB(e){return e.split(`-`)[0]}function UB(e){return e.split(`-`)[1]}function WB(e){return e===`x`?`y`:`x`}function GB(e){return e===`y`?`height`:`width`}function KB(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function qB(e){return WB(KB(e))}function JB(e,t,n){n===void 0&&(n=!1);let r=UB(e),i=qB(e),a=GB(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=rV(o)),[o,rV(o)]}function YB(e){let t=rV(e);return[XB(e),t,XB(t)]}function XB(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ZB=[`left`,`right`],QB=[`right`,`left`],$B=[`top`,`bottom`],eV=[`bottom`,`top`];function tV(e,t,n){switch(e){case`top`:case`bottom`:return n?t?QB:ZB:t?ZB:QB;case`left`:case`right`:return t?$B:eV;default:return[]}}function nV(e,t,n,r){let i=UB(e),a=tV(HB(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(XB)))),a}function rV(e){let t=HB(e);return zB[t]+e.slice(t.length)}function iV(e){return{top:0,right:0,bottom:0,left:0,...e}}function aV(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:iV(e)}function oV(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 sV(e,t,n){let{reference:r,floating:i}=e,a=KB(t),o=qB(t),s=GB(o),c=HB(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}}switch(UB(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function cV(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}=VB(t,e),p=aV(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=oV(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=oV(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 lV=50,uV=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:cV},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=sV(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<lV&&(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}=sV(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},dV=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}=VB(e,t)||{};if(l==null)return{};let d=aV(u),f={x:n,y:r},p=qB(i),m=GB(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=PB(d[_],T),D=PB(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=BB(O,A,k),M=!c.arrow&&UB(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),fV=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}=VB(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=HB(r),_=KB(o),v=HB(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[rV(o)]:YB(o)),x=p!==`none`;!d&&x&&b.push(...nV(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=JB(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`&&_!==KB(t))||T.every(e=>KB(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=KB(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 pV(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mV(e){return NB.some(t=>e[t]>=0)}var hV=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=VB(e,t);switch(i){case`referenceHidden`:{let e=pV(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:mV(e)}}}case`escaped`:{let e=pV(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:mV(e)}}}default:return{}}}}},gV=new Set([`left`,`top`]);async function _V(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=HB(n),s=UB(n),c=KB(n)===`y`,l=gV.has(o)?-1:1,u=a&&c?-1:1,d=VB(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 vV=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 _V(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}}}}},yV=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}=VB(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=KB(HB(i)),p=WB(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=BB(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=BB(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},bV=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}=VB(e,t),u={x:n,y:r},d=KB(i),f=WB(d),p=u[f],m=u[d],h=VB(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};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=gV.has(HB(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}}}},xV=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=VB(e,t),u=await o.detectOverflow(t,l),d=HB(i),f=UB(i),p=KB(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=PB(h-u[g],v),x=PB(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=FB(u.left,0),t=FB(u.right,0),n=FB(u.top,0),r=FB(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:FB(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:FB(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function SV(){return typeof window<`u`}function CV(e){return EV(e)?(e.nodeName||``).toLowerCase():`#document`}function wV(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function TV(e){return((EV(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function EV(e){return SV()?e instanceof Node||e instanceof wV(e).Node:!1}function DV(e){return SV()?e instanceof Element||e instanceof wV(e).Element:!1}function OV(e){return SV()?e instanceof HTMLElement||e instanceof wV(e).HTMLElement:!1}function kV(e){return!SV()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof wV(e).ShadowRoot}function AV(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=VV(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function jV(e){return/^(table|td|th)$/.test(CV(e))}function MV(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var NV=/transform|translate|scale|rotate|perspective|filter/,PV=/paint|layout|strict|content/,FV=e=>!!e&&e!==`none`,IV;function LV(e){let t=DV(e)?VV(e):e;return FV(t.transform)||FV(t.translate)||FV(t.scale)||FV(t.rotate)||FV(t.perspective)||!zV()&&(FV(t.backdropFilter)||FV(t.filter))||NV.test(t.willChange||``)||PV.test(t.contain||``)}function RV(e){let t=UV(e);for(;OV(t)&&!BV(t);){if(LV(t))return t;if(MV(t))return null;t=UV(t)}return null}function zV(){return IV??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),IV}function BV(e){return/^(html|body|#document)$/.test(CV(e))}function VV(e){return wV(e).getComputedStyle(e)}function HV(e){return DV(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function UV(e){if(CV(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||kV(e)&&e.host||TV(e);return kV(t)?t.host:t}function WV(e){let t=UV(e);return BV(t)?e.ownerDocument?e.ownerDocument.body:e.body:OV(t)&&AV(t)?t:WV(t)}function GV(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=WV(e),i=r===e.ownerDocument?.body,a=wV(r);if(i){let e=KV(a);return t.concat(a,a.visualViewport||[],AV(r)?r:[],e&&n?GV(e):[])}else return t.concat(r,GV(r,[],n))}function KV(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qV(e){let t=VV(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=OV(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=IB(n)!==a||IB(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function JV(e){return DV(e)?e:e.contextElement}function YV(e){let t=JV(e);if(!OV(t))return RB(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=qV(t),o=(a?IB(n.width):n.width)/r,s=(a?IB(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var XV=RB(0);function ZV(e){let t=wV(e);return!zV()||!t.visualViewport?XV:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function QV(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==wV(e)?!1:t}function $V(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=JV(e),o=RB(1);t&&(r?DV(r)&&(o=YV(r)):o=YV(e));let s=QV(a,n,r)?ZV(a):RB(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){let e=wV(a),t=r&&DV(r)?wV(r):r,n=e,i=KV(n);for(;i&&r&&t!==n;){let e=YV(i),t=i.getBoundingClientRect(),r=VV(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=wV(i),i=KV(n)}}return oV({width:u,height:d,x:c,y:l})}function eH(e,t){let n=HV(e).scrollLeft;return t?t.left+n:$V(TV(e)).left+n}function tH(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eH(e,n),y:n.top+t.scrollTop}}function nH(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=TV(r),s=t?MV(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=RB(1),u=RB(0),d=OV(r);if((d||!d&&!a)&&((CV(r)!==`body`||AV(o))&&(c=HV(r)),d)){let e=$V(r);l=YV(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?tH(o,c):RB(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 rH(e){return Array.from(e.getClientRects())}function iH(e){let t=TV(e),n=HV(e),r=e.ownerDocument.body,i=FB(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=FB(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+eH(e),s=-n.scrollTop;return VV(r).direction===`rtl`&&(o+=FB(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var aH=25;function oH(e,t){let n=wV(e),r=TV(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=zV();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=eH(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=aH&&(a-=o)}else l<=aH&&(a+=l);return{width:a,height:o,x:s,y:c}}function sH(e,t){let n=$V(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=OV(e)?YV(e):RB(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function cH(e,t,n){let r;if(t===`viewport`)r=oH(e,n);else if(t===`document`)r=iH(TV(e));else if(DV(t))r=sH(t,n);else{let n=ZV(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return oV(r)}function lH(e,t){let n=UV(e);return n===t||!DV(n)||BV(n)?!1:VV(n).position===`fixed`||lH(n,t)}function uH(e,t){let n=t.get(e);if(n)return n;let r=GV(e,[],!1).filter(e=>DV(e)&&CV(e)!==`body`),i=null,a=VV(e).position===`fixed`,o=a?UV(e):e;for(;DV(o)&&!BV(o);){let t=VV(o),n=LV(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||AV(o)&&!n&&lH(e,o))?r=r.filter(e=>e!==o):i=t,o=UV(o)}return t.set(e,r),r}function dH(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?MV(t)?[]:uH(t,this._c):[].concat(n),r],o=cH(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=cH(t,a[e],i);s=FB(n.top,s),c=PB(n.right,c),l=PB(n.bottom,l),u=FB(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function fH(e){let{width:t,height:n}=qV(e);return{width:t,height:n}}function pH(e,t,n){let r=OV(t),i=TV(t),a=n===`fixed`,o=$V(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=RB(0);function l(){c.x=eH(i)}if(r||!r&&!a)if((CV(t)!==`body`||AV(i))&&(s=HV(t)),r){let e=$V(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?tH(i,s):RB(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function mH(e){return VV(e).position===`static`}function hH(e,t){if(!OV(e)||VV(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return TV(e)===n&&(n=n.ownerDocument.body),n}function gH(e,t){let n=wV(e);if(MV(e))return n;if(!OV(e)){let t=UV(e);for(;t&&!BV(t);){if(DV(t)&&!mH(t))return t;t=UV(t)}return n}let r=hH(e,t);for(;r&&jV(r)&&mH(r);)r=hH(r,t);return r&&BV(r)&&mH(r)&&!LV(r)?n:r||RV(e)||n}var _H=async function(e){let t=this.getOffsetParent||gH,n=this.getDimensions,r=await n(e.floating);return{reference:pH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vH(e){return VV(e).direction===`rtl`}var yH={convertOffsetParentRelativeRectToViewportRelativeRect:nH,getDocumentElement:TV,getClippingRect:dH,getOffsetParent:gH,getElementRects:_H,getClientRects:rH,getDimensions:fH,getScale:YV,isElement:DV,isRTL:vH};function bH(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xH(e,t){let n=null,r,i=TV(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=LB(d),h=LB(i.clientWidth-(u+f)),g=LB(i.clientHeight-(d+p)),_=LB(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:FB(0,PB(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!bH(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function SH(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=JV(e),u=i||a?[...l?GV(l):[],...t?GV(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?xH(l,n):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?$V(e):null;c&&g();function g(){let t=$V(e);h&&!bH(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 CH=vV,wH=yV,TH=fV,EH=xV,DH=hV,OH=dV,kH=bV,AH=(e,t,n)=>{let r=new Map,i={platform:yH,...n},a={...i.platform,_c:r};return uV(e,t,{...i,platform:a})},jH=typeof document<`u`?N.useLayoutEffect:function(){};function MH(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(!MH(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)&&!MH(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function NH(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PH(e,t){let n=NH(e);return Math.round(t*n)/n}function FH(e){let t=N.useRef(e);return jH(()=>{t.current=e}),t}function IH(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]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=N.useState(r);MH(f,r)||p(r);let[m,h]=N.useState(null),[g,_]=N.useState(null),v=N.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=N.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=N.useRef(null),C=N.useRef(null),w=N.useRef(u),T=c!=null,E=FH(c),D=FH(i),O=FH(l),k=N.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),AH(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!MH(w.current,t)&&(w.current=t,ca.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);jH(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=N.useRef(!1);jH(()=>(A.current=!0,()=>{A.current=!1}),[]),jH(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=N.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=N.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=N.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=PH(M.floating,u.x),r=PH(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...NH(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return N.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var LH=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?{}:OH({element:r.current,padding:i}).fn(n):r?OH({element:r,padding:i}).fn(n):{}}}},RH=(e,t)=>{let n=CH(e);return{name:n.name,fn:n.fn,options:[e,t]}},zH=(e,t)=>{let n=wH(e);return{name:n.name,fn:n.fn,options:[e,t]}},BH=(e,t)=>({fn:kH(e).fn,options:[e,t]}),VH=(e,t)=>{let n=TH(e);return{name:n.name,fn:n.fn,options:[e,t]}},HH=(e,t)=>{let n=EH(e);return{name:n.name,fn:n.fn,options:[e,t]}},UH=(e,t)=>{let n=DH(e);return{name:n.name,fn:n.fn,options:[e,t]}},WH=(e,t)=>{let n=LH(e);return{name:n.name,fn:n.fn,options:[e,t]}},GH=`Arrow`,KH=N.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,R.jsx)(sL.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,R.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});KH.displayName=GH;var qH=KH,JH=`Popper`,[YH,XH]=RI(JH),[ZH,QH]=YH(JH),$H=e=>{let{__scopePopper:t,children:n}=e,[r,i]=N.useState(null),[a,o]=N.useState(void 0);return(0,R.jsx)(ZH,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};$H.displayName=JH;var eU=`PopperAnchor`,tU=N.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=QH(eU,n),o=N.useRef(null),s=a.onAnchorChange,c=LI(t,N.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=N.useRef(null);N.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&dU(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,R.jsx)(sL.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});tU.displayName=eU;var nU=`PopperContent`,[rU,iU]=YH(nU),aU=N.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=QH(nU,n),[_,v]=N.useState(null),y=LI(t,v),[b,x]=N.useState(null),S=MB(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(lU),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:ee,middlewareData:P}=IH({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>SH(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[RH({mainAxis:i+w,alignmentAxis:o}),c&&zH({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?BH():void 0,...k}),c&&VH({...k}),HH({...k,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`)}}),b&&WH({element:b,padding:s}),uU({arrowWidth:C,arrowHeight:w}),f&&UH({strategy:`referenceHidden`,...k,boundary:O?k.boundary:void 0})]}),F=g.setPlacementState;BI(()=>(F(M),()=>{F(void 0)}),[M,F]);let[I,te]=dU(M),ne=lL(m);BI(()=>{ee&&ne?.()},[ee,ne]);let re=P.arrow?.x,ie=P.arrow?.y,L=P.arrow?.centerOffset!==0,[ae,oe]=N.useState();return BI(()=>{_&&oe(window.getComputedStyle(_).zIndex)},[_]),(0,R.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:ee?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,R.jsx)(rU,{scope:n,placedSide:I,placedAlign:te,onArrowChange:x,arrowX:re,arrowY:ie,shouldHideArrow:L,children:(0,R.jsx)(sL.div,{"data-side":I,"data-align":te,...h,ref:y,style:{...h.style,animation:ee?void 0:`none`}})})})});aU.displayName=nU;var oU=`PopperArrow`,sU={top:`bottom`,right:`left`,bottom:`top`,left:`right`},cU=N.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=iU(oU,n),a=sU[i.placedSide];return(0,R.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,R.jsx)(qH,{...r,ref:t,style:{...r.style,display:`block`}})})});cU.displayName=oU;function lU(e){return e!==null}var uU=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]=dU(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 dU(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var fU=$H,pU=tU,mU=aU,hU=cU,gU=!1;function _U(){let[e,t]=N.useState(gU);return N.useEffect(()=>{gU||(gU=!0,t(!0))},[]),e}var vU=N.useSyncExternalStore;function yU(){return()=>{}}function bU(){return vU(yU,()=>!0,()=>!1)}var xU=typeof vU==`function`?bU:_U,SU=`rovingFocusGroup.onEntryFocus`,CU={bubbles:!1,cancelable:!0},wU=`RovingFocusGroup`,[TU,EU,DU]=OB(wU),[OU,kU]=RI(wU,[DU]),[AU,jU]=OU(wU),MU=N.forwardRef((e,t)=>(0,R.jsx)(TU.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(TU.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(NU,{...e,ref:t})})}));MU.displayName=wU;var NU=N.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=N.useRef(null),p=LI(t,f),m=AB(a),[h,g]=GI({prop:o,defaultProp:s??null,onChange:c,caller:wU}),[_,v]=N.useState(!1),y=lL(l),b=EU(n),x=N.useRef(!1),[S,C]=N.useState(0);return N.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(SU,y),()=>e.removeEventListener(SU,y)},[y]),(0,R.jsx)(AU,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:N.useCallback(e=>g(e),[g]),onItemShiftTab:N.useCallback(()=>v(!0),[]),onFocusableItemAdd:N.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:N.useCallback(()=>C(e=>e-1),[]),children:(0,R.jsx)(sL.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:J(e.onMouseDown,()=>{x.current=!0}),onFocus:J(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(SU,CU);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);zU([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:J(e.onBlur,()=>v(!1))})})}),PU=`RovingFocusGroupItem`,FU=N.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=UI(),l=a||c,u=jU(PU,n),d=u.currentTabStopId===l,f=EU(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=xU();return BI(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),N.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,R.jsx)(TU.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,R.jsx)(sL.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:J(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:J(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:J(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=RU(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?BU(n,r+1):n.slice(r+1)}setTimeout(()=>zU(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});FU.displayName=PU;var IU={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function LU(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function RU(e,t,n){let r=LU(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return IU[r]}function zU(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function BU(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var VU=MU,HU=FU,UU=[`Enter`,` `],WU=[`ArrowDown`,`PageUp`,`Home`],GU=[`ArrowUp`,`PageDown`,`End`],KU=[...WU,...GU],qU={ltr:[...UU,`ArrowRight`],rtl:[...UU,`ArrowLeft`]},JU={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},YU=`Menu`,[XU,ZU,QU]=OB(YU),[$U,eW]=RI(YU,[QU,XH,kU]),tW=XH(),nW=kU(),[rW,iW]=$U(YU),[aW,oW]=$U(YU),sW=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=tW(t),[c,l]=N.useState(null),u=N.useRef(!1),d=lL(a),f=AB(i);return N.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),N.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,R.jsx)(fU,{...s,children:(0,R.jsx)(rW,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,R.jsx)(aW,{scope:t,onClose:N.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};sW.displayName=YU;var cW=`MenuAnchor`,lW=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=tW(n);return(0,R.jsx)(pU,{...i,...r,ref:t})});lW.displayName=cW;var uW=`MenuPortal`,[dW,fW]=$U(uW,{forceMount:void 0}),pW=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=iW(uW,t);return(0,R.jsx)(dW,{scope:t,forceMount:n,children:(0,R.jsx)(WL,{present:n||a.open,children:(0,R.jsx)(HL,{asChild:!0,container:i,children:r})})})};pW.displayName=uW;var mW=`MenuContent`,[hW,gW]=$U(mW),_W=N.forwardRef((e,t)=>{let n=fW(mW,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=iW(mW,e.__scopeMenu),o=oW(mW,e.__scopeMenu);return(0,R.jsx)(XU.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(WL,{present:r||a.open,children:(0,R.jsx)(XU.Slot,{scope:e.__scopeMenu,children:o.modal?(0,R.jsx)(vW,{...i,ref:t}):(0,R.jsx)(yW,{...i,ref:t})})})})}),vW=N.forwardRef((e,t)=>{let n=iW(mW,e.__scopeMenu),r=N.useRef(null),i=LI(t,r);return N.useEffect(()=>{let e=r.current;if(e)return _z(e)},[]),(0,R.jsx)(xW,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),yW=N.forwardRef((e,t)=>{let n=iW(mW,e.__scopeMenu);return(0,R.jsx)(xW,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),bW=JI(`MenuContent.ScrollLock`),xW=N.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=iW(mW,n),_=oW(mW,n),v=tW(n),y=nW(n),b=ZU(n),[x,S]=N.useState(null),C=N.useRef(null),w=LI(t,C,g.onContentChange),T=N.useRef(0),E=N.useRef(``),D=N.useRef(0),O=N.useRef(null),k=N.useRef(`right`),A=N.useRef(0),j=m?cz:N.Fragment,M=m?{as:bW,allowPinchZoom:!0}:void 0,ee=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=aG(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};N.useEffect(()=>()=>window.clearTimeout(T.current),[]),QL();let P=N.useCallback(e=>k.current===O.current?.side&&sG(e,O.current?.area),[]);return(0,R.jsx)(hW,{scope:n,searchRef:E,onItemEnter:N.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:N.useCallback(e=>{P(e)||(C.current?.focus(),S(null))},[P]),onTriggerLeave:N.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:D,onPointerGraceIntentChange:N.useCallback(e=>{O.current=e},[]),children:(0,R.jsx)(j,{...M,children:(0,R.jsx)(kL,{asChild:!0,trapped:i,onMountAutoFocus:J(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,R.jsx)(gL,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,R.jsx)(VU,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:J(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,R.jsx)(mU,{role:`menu`,"aria-orientation":`vertical`,"data-state":eG(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:J(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ee(e.key));let i=C.current;if(e.target!==i||!KU.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);GU.includes(e.key)&&a.reverse(),rG(a)}),onBlur:J(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:J(e.onPointerMove,cG(e=>{let t=e.target,n=A.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>A.current?`right`:`left`;k.current=t,A.current=e.clientX}}))})})})})})})});_W.displayName=mW;var SW=`MenuGroup`,CW=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(sL.div,{role:`group`,...r,ref:t})});CW.displayName=SW;var wW=`MenuLabel`,TW=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(sL.div,{...r,ref:t})});TW.displayName=wW;var EW=`MenuItem`,DW=`menu.itemSelect`,OW=N.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=N.useRef(null),o=oW(EW,e.__scopeMenu),s=gW(EW,e.__scopeMenu),c=LI(t,a),l=N.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(DW,{bubbles:!0,cancelable:!0});e.addEventListener(DW,e=>r?.(e),{once:!0}),cL(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,R.jsx)(kW,{...i,ref:c,disabled:n,onClick:J(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:J(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:J(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||UU.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});OW.displayName=EW;var kW=N.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=gW(EW,n),s=nW(n),c=N.useRef(null),l=LI(t,c),[u,d]=N.useState(!1),[f,p]=N.useState(``);return N.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,R.jsx)(XU.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,R.jsx)(HU,{asChild:!0,...s,focusable:!r,children:(0,R.jsx)(sL.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:J(e.onPointerMove,cG(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(e.onPointerLeave,cG(e=>o.onItemLeave(e))),onFocus:J(e.onFocus,()=>d(!0)),onBlur:J(e.onBlur,()=>d(!1))})})})}),AW=`MenuCheckboxItem`,jW=N.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,R.jsx)(zW,{scope:e.__scopeMenu,checked:n,children:(0,R.jsx)(OW,{role:`menuitemcheckbox`,"aria-checked":tG(n)?`mixed`:n,...i,ref:t,"data-state":nG(n),onSelect:J(i.onSelect,()=>r?.(tG(n)?!0:!n),{checkForDefaultPrevented:!1})})})});jW.displayName=AW;var MW=`MenuRadioGroup`,[NW,PW]=$U(MW,{value:void 0,onValueChange:()=>{}}),FW=N.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=lL(r);return(0,R.jsx)(NW,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,R.jsx)(CW,{...i,ref:t})})});FW.displayName=MW;var IW=`MenuRadioItem`,LW=N.forwardRef((e,t)=>{let{value:n,...r}=e,i=PW(IW,e.__scopeMenu),a=n===i.value;return(0,R.jsx)(zW,{scope:e.__scopeMenu,checked:a,children:(0,R.jsx)(OW,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":nG(a),onSelect:J(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});LW.displayName=IW;var RW=`MenuItemIndicator`,[zW,BW]=$U(RW,{checked:!1}),VW=N.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=BW(RW,n);return(0,R.jsx)(WL,{present:r||tG(a.checked)||a.checked===!0,children:(0,R.jsx)(sL.span,{...i,ref:t,"data-state":nG(a.checked)})})});VW.displayName=RW;var HW=`MenuSeparator`,UW=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(sL.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});UW.displayName=HW;var WW=`MenuArrow`,GW=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=tW(n);return(0,R.jsx)(hU,{...i,...r,ref:t})});GW.displayName=WW;var KW=`MenuSub`,[qW,JW]=$U(KW),YW=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=iW(KW,t),o=tW(t),[s,c]=N.useState(null),[l,u]=N.useState(null),d=lL(i);return N.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,R.jsx)(fU,{...o,children:(0,R.jsx)(rW,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,R.jsx)(qW,{scope:t,contentId:UI(),triggerId:UI(),trigger:s,onTriggerChange:c,children:n})})})};YW.displayName=KW;var XW=`MenuSubTrigger`,ZW=N.forwardRef((e,t)=>{let n=iW(XW,e.__scopeMenu),r=oW(XW,e.__scopeMenu),i=JW(XW,e.__scopeMenu),a=gW(XW,e.__scopeMenu),o=N.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=N.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);N.useEffect(()=>u,[u]),N.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=LI(t,i.onTriggerChange);return(0,R.jsx)(lW,{asChild:!0,...l,children:(0,R.jsx)(kW,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":eG(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:J(e.onPointerMove,cG(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:J(e.onPointerLeave,cG(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:J(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||a.searchRef.current!==``&&t.key===` `||qU[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});ZW.displayName=XW;var QW=`MenuSubContent`,$W=N.forwardRef((e,t)=>{let n=fW(mW,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=iW(mW,e.__scopeMenu),s=oW(mW,e.__scopeMenu),c=JW(QW,e.__scopeMenu),l=N.useRef(null),u=LI(t,l);return(0,R.jsx)(XU.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(WL,{present:r||o.open,children:(0,R.jsx)(XU.Slot,{scope:e.__scopeMenu,children:(0,R.jsx)(xW,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:J(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:J(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:J(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=JU[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});$W.displayName=QW;function eG(e){return e?`open`:`closed`}function tG(e){return e===`indeterminate`}function nG(e){return tG(e)?`indeterminate`:e?`checked`:`unchecked`}function rG(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function iG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function aG(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=iG(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function oG(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 sG(e,t){return t?oG({x:e.clientX,y:e.clientY},t):!1}function cG(e){return t=>t.pointerType===`mouse`?e(t):void 0}var lG=sW,uG=lW,dG=pW,fG=_W,pG=CW,mG=TW,hG=OW,gG=jW,_G=FW,vG=LW,yG=VW,bG=UW,xG=GW,SG=ZW,CG=$W,wG=`DropdownMenu`,[TG,tee]=RI(wG,[eW]),EG=eW(),[DG,OG]=TG(wG),kG=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=EG(t),l=N.useRef(null),[u,d]=GI({prop:i,defaultProp:a??!1,onChange:o,caller:wG});return(0,R.jsx)(DG,{scope:t,triggerId:UI(),triggerRef:l,contentId:UI(),open:u,onOpenChange:d,onOpenToggle:N.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,R.jsx)(lG,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};kG.displayName=wG;var AG=`DropdownMenuTrigger`,jG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=OG(AG,n),o=EG(n),s=LI(t,a.triggerRef);return(0,R.jsx)(uG,{asChild:!0,...o,children:(0,R.jsx)(sL.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:J(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:J(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});jG.displayName=AG;var MG=`DropdownMenuPortal`,NG=e=>{let{__scopeDropdownMenu:t,...n}=e,r=EG(t);return(0,R.jsx)(dG,{...r,...n})};NG.displayName=MG;var PG=`DropdownMenuContent`,FG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=OG(PG,n),a=EG(n),o=N.useRef(!1);return(0,R.jsx)(fG,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:J(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});FG.displayName=PG;var IG=`DropdownMenuGroup`,LG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(pG,{...i,...r,ref:t})});LG.displayName=IG;var RG=`DropdownMenuLabel`,zG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(mG,{...i,...r,ref:t})});zG.displayName=RG;var BG=`DropdownMenuItem`,VG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(hG,{...i,...r,ref:t})});VG.displayName=BG;var HG=`DropdownMenuCheckboxItem`,UG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(gG,{...i,...r,ref:t})});UG.displayName=HG;var WG=`DropdownMenuRadioGroup`,GG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(_G,{...i,...r,ref:t})});GG.displayName=WG;var KG=`DropdownMenuRadioItem`,qG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(vG,{...i,...r,ref:t})});qG.displayName=KG;var JG=`DropdownMenuItemIndicator`,YG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(yG,{...i,...r,ref:t})});YG.displayName=JG;var XG=`DropdownMenuSeparator`,ZG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(bG,{...i,...r,ref:t})});ZG.displayName=XG;var QG=`DropdownMenuArrow`,$G=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(xG,{...i,...r,ref:t})});$G.displayName=QG;var eK=`DropdownMenuSubTrigger`,tK=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(SG,{...i,...r,ref:t})});tK.displayName=eK;var nK=`DropdownMenuSubContent`,rK=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=EG(n);return(0,R.jsx)(CG,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});rK.displayName=nK;var iK=kG,aK=jG,oK=NG,sK=FG,cK=VG;function lK(e,[t,n]){return Math.min(n,Math.max(t,e))}var uK=`Popover`,[dK,nee]=RI(uK,[XH]),fK=XH(),[pK,mK]=dK(uK),hK=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=fK(t),c=N.useRef(null),[l,u]=N.useState(!1),[d,f]=GI({prop:r,defaultProp:i??!1,onChange:a,caller:uK});return(0,R.jsx)(fU,{...s,children:(0,R.jsx)(pK,{scope:t,contentId:UI(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:N.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:N.useCallback(()=>u(!0),[]),onCustomAnchorRemove:N.useCallback(()=>u(!1),[]),modal:o,children:n})})};hK.displayName=uK;var gK=`PopoverAnchor`,_K=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=mK(gK,n),a=fK(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return N.useEffect(()=>(o(),()=>s()),[o,s]),(0,R.jsx)(pU,{...a,...r,ref:t})});_K.displayName=gK;var vK=`PopoverTrigger`,yK=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=mK(vK,n),a=fK(n),o=LI(t,i.triggerRef),s=(0,R.jsx)(sL.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":PK(i.open),...r,ref:o,onClick:J(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,R.jsx)(pU,{asChild:!0,...a,children:s})});yK.displayName=vK;var bK=`PopoverPortal`,[xK,SK]=dK(bK,{forceMount:void 0}),CK=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=mK(bK,t);return(0,R.jsx)(xK,{scope:t,forceMount:n,children:(0,R.jsx)(WL,{present:n||a.open,children:(0,R.jsx)(HL,{asChild:!0,container:i,children:r})})})};CK.displayName=bK;var wK=`PopoverContent`,TK=N.forwardRef((e,t)=>{let n=SK(wK,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=mK(wK,e.__scopePopover);return(0,R.jsx)(WL,{present:r||a.open,children:a.modal?(0,R.jsx)(DK,{...i,ref:t}):(0,R.jsx)(OK,{...i,ref:t})})});TK.displayName=wK;var EK=JI(`PopoverContent.RemoveScroll`),DK=N.forwardRef((e,t)=>{let n=mK(wK,e.__scopePopover),r=N.useRef(null),i=LI(t,r),a=N.useRef(!1);return N.useEffect(()=>{let e=r.current;if(e)return _z(e)},[]),(0,R.jsx)(cz,{as:EK,allowPinchZoom:!0,children:(0,R.jsx)(kK,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),OK=N.forwardRef((e,t)=>{let n=mK(wK,e.__scopePopover),r=N.useRef(!1),i=N.useRef(!1);return(0,R.jsx)(kK,{...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()}})}),kK=N.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=mK(wK,n),p=fK(n);return QL(),(0,R.jsx)(kL,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,R.jsx)(gL,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,R.jsx)(mU,{"data-state":PK(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),AK=`PopoverClose`,jK=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=mK(AK,n);return(0,R.jsx)(sL.button,{type:`button`,...r,ref:t,onClick:J(e.onClick,()=>i.onOpenChange(!1))})});jK.displayName=AK;var MK=`PopoverArrow`,NK=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=fK(n);return(0,R.jsx)(hU,{...i,...r,ref:t})});NK.displayName=MK;function PK(e){return e?`open`:`closed`}var FK=hK,IK=yK,LK=CK,RK=TK,zK=[` `,`Enter`,`ArrowUp`,`ArrowDown`],BK=[` `,`Enter`],VK=`Select`,[HK,UK,WK]=OB(VK),[GK,KK]=RI(VK,[WK,XH]),qK=XH(),[JK,YK]=GK(VK),[XK,ZK]=GK(VK),QK=`SelectProvider`;function $K(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=qK(t),[_,v]=N.useState(null),[y,b]=N.useState(null),[x,S]=N.useState(!1),C=AB(l),[w,T]=GI({prop:r,defaultProp:i??!1,onChange:a,caller:VK}),[E,D]=GI({prop:o,defaultProp:s,onChange:c,caller:VK}),O=N.useRef(null),k=N.useRef(E);N.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=()=>D(k.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,D]);let A=!_||!!m||!!_.closest(`form`),[j,M]=N.useState(new Set),ee=UI(),P=Array.from(j).map(e=>e.props.value).join(`;`),F=N.useCallback(e=>{M(t=>new Set(t).add(e))},[]),I=N.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),te={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:ee,value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:j,nativeSelectKey:P,isFormControl:A};return(0,R.jsx)(fU,{...g,children:(0,R.jsx)(JK,{scope:t,...te,children:(0,R.jsx)(HK.Provider,{scope:t,children:(0,R.jsx)(XK,{scope:t,onNativeOptionAdd:F,onNativeOptionRemove:I,children:$q(h)?h(te):n})})})})}$K.displayName=QK;var eq=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,R.jsx)($K,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,R.jsxs)(R.Fragment,{children:[n,e?(0,R.jsx)(Qq,{__scopeSelect:t}):null]})})};eq.displayName=VK;var tq=`SelectTrigger`,nq=N.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=qK(n),o=YK(tq,n),s=o.disabled||r,c=LI(t,o.onTriggerChange),l=UK(n),u=N.useRef(`touch`),[d,f,p]=tJ(e=>{let t=l().filter(e=>!e.disabled),n=nJ(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,R.jsx)(pU,{asChild:!0,...a,children:(0,R.jsx)(sL.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":eJ(o.value)?``:void 0,...i,ref:c,onClick:J(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:J(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:J(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&zK.includes(e.key)&&(m(),e.preventDefault())})})})});nq.displayName=tq;var rq=`SelectValue`,iq=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=YK(rq,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=LI(t,c.onValueNodeChange);BI(()=>{l(u)},[l,u]);let f=eJ(c.value);return(0,R.jsx)(sL.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,R.jsx)(N.Fragment,{children:f?o:a},f?`placeholder`:`value`)})});iq.displayName=rq;var aq=`SelectIcon`,oq=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,R.jsx)(sL.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});oq.displayName=aq;var sq=`SelectPortal`,[cq,lq]=GK(sq,{forceMount:void 0}),uq=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,R.jsx)(cq,{scope:e.__scopeSelect,forceMount:n,children:(0,R.jsx)(HL,{asChild:!0,...r})})};uq.displayName=sq;var dq=`SelectContent`,fq=N.forwardRef((e,t)=>{let n=lq(dq,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=YK(dq,e.__scopeSelect),[o,s]=N.useState();return BI(()=>{s(new DocumentFragment)},[]),(0,R.jsx)(WL,{present:r||a.open,children:({present:e})=>e?(0,R.jsx)(yq,{...i,ref:t}):(0,R.jsx)(pq,{...i,fragment:o})})});fq.displayName=dq;var pq=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?ca.createPortal((0,R.jsx)(hq,{scope:n,children:(0,R.jsx)(HK.Slot,{scope:n,children:(0,R.jsx)(`div`,{ref:t,children:r})})}),i):null});pq.displayName=`SelectContentFragment`;var mq=10,[hq,gq]=GK(dq),_q=`SelectContentImpl`,vq=JI(`SelectContent.RemoveScroll`),yq=N.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,v=YK(dq,n),[y,b]=N.useState(null),[x,S]=N.useState(null),C=LI(t,b),[w,T]=N.useState(null),[E,D]=N.useState(null),O=UK(n),[k,A]=N.useState(!1),j=N.useRef(!1);N.useEffect(()=>{if(y)return _z(y)},[y]),QL();let M=N.useCallback(e=>{let[t,...n]=O().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&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),ee=N.useCallback(()=>M([w,y]),[M,w,y]);N.useEffect(()=>{k&&ee()},[k,ee]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;N.useEffect(()=>{if(y){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(y)||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})}}},[y,P,F]),N.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]=tJ(e=>{let t=O().filter(e=>!e.disabled),n=nJ(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ne=N.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(j.current=!0))},[v.value]),re=N.useCallback(()=>y?.focus(),[y]),ie=N.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),L=r===`popper`?Cq:xq,ae=L===Cq?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,R.jsx)(hq,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:w,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:ee,selectedItemText:E,position:r,isPositioned:k,searchRef:I,children:(0,R.jsx)(cz,{as:vq,allowPinchZoom:!0,children:(0,R.jsx)(kL,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:J(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,R.jsx)(gL,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,R.jsx)(L,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...ae,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:J(_.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=O().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(()=>M(t)),e.preventDefault()}})})})})})})});yq.displayName=_q;var bq=`SelectItemAlignedPosition`,xq=N.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=YK(dq,n),o=gq(dq,n),[s,c]=N.useState(null),[l,u]=N.useState(null),d=LI(t,u),f=UK(n),p=N.useRef(!1),m=N.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=N.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-mq,d=lK(a,[mq,Math.max(mq,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-mq,d=lK(a,[mq,Math.max(mq,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-mq*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-mq,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=`${mq}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]);BI(()=>y(),[y]);let[b,x]=N.useState();return BI(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,R.jsx)(wq,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:N.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,R.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,R.jsx)(sL.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});xq.displayName=bq;var Sq=`SelectPopperPosition`,Cq=N.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=mq,...a}=e,o=qK(n);return(0,R.jsx)(mU,{...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)`}})});Cq.displayName=Sq;var[wq,Tq]=GK(dq,{}),Eq=`SelectViewport`,Dq=N.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=gq(Eq,n),o=Tq(Eq,n),s=LI(t,a.onViewportChange),c=N.useRef(0);return(0,R.jsxs)(R.Fragment,{children:[(0,R.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,R.jsx)(HK.Slot,{scope:n,children:(0,R.jsx)(sL.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:J(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-mq*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})})})]})});Dq.displayName=Eq;var Oq=`SelectGroup`,[kq,Aq]=GK(Oq),jq=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=UI();return(0,R.jsx)(kq,{scope:n,id:i,children:(0,R.jsx)(sL.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});jq.displayName=Oq;var Mq=`SelectLabel`,Nq=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Aq(Mq,n);return(0,R.jsx)(sL.div,{id:i.id,...r,ref:t})});Nq.displayName=Mq;var Pq=`SelectItem`,[Fq,Iq]=GK(Pq),Lq=N.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=YK(Pq,n),c=gq(Pq,n),l=s.value===r,[u,d]=N.useState(a??``),[f,p]=N.useState(!1),m=LI(t,lL(e=>c.itemRefCallback?.(e,r,i))),h=UI(),g=N.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};return(0,R.jsx)(Fq,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:N.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,R.jsx)(HK.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,R.jsx)(sL.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:J(o.onFocus,()=>p(!0)),onBlur:J(o.onBlur,()=>p(!1)),onClick:J(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:J(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:J(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:J(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:J(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:J(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(BK.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});Lq.displayName=Pq;var Rq=`SelectItemText`,zq=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=YK(Rq,n),s=gq(Rq,n),c=Iq(Rq,n),l=ZK(Rq,n),[u,d]=N.useState(null),f=lL(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=LI(t,d,c.onItemTextChange,f),m=u?.textContent,h=N.useMemo(()=>(0,R.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return BI(()=>(g(h),()=>_(h)),[g,_,h]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(sL.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!eJ(o.value)?ca.createPortal(a.children,o.valueNode):null]})});zq.displayName=Rq;var Bq=`SelectItemIndicator`,Vq=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Iq(Bq,n).isSelected?(0,R.jsx)(sL.span,{"aria-hidden":!0,...r,ref:t}):null});Vq.displayName=Bq;var Hq=`SelectScrollUpButton`,Uq=N.forwardRef((e,t)=>{let n=gq(Hq,e.__scopeSelect),r=Tq(Hq,e.__scopeSelect),[i,a]=N.useState(!1),o=LI(t,r.onScrollButtonChange);return BI(()=>{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,R.jsx)(Kq,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Uq.displayName=Hq;var Wq=`SelectScrollDownButton`,Gq=N.forwardRef((e,t)=>{let n=gq(Wq,e.__scopeSelect),r=Tq(Wq,e.__scopeSelect),[i,a]=N.useState(!1),o=LI(t,r.onScrollButtonChange);return BI(()=>{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,R.jsx)(Kq,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Gq.displayName=Wq;var Kq=N.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=gq(`SelectScrollButton`,n),o=N.useRef(null),s=UK(n),c=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.useEffect(()=>()=>c(),[c]),BI(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,R.jsx)(sL.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:J(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:J(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:J(i.onPointerLeave,()=>{c()})})}),qq=`SelectSeparator`,Jq=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,R.jsx)(sL.div,{"aria-hidden":!0,...r,ref:t})});Jq.displayName=qq;var Yq=`SelectArrow`,Xq=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=qK(n);return gq(Yq,n).position===`popper`?(0,R.jsx)(hU,{...i,...r,ref:t}):null});Xq.displayName=Yq;var Zq=`SelectBubbleInput`,Qq=N.forwardRef(({__scopeSelect:e,...t},n)=>{let r=YK(Zq,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=N.useRef(null),m=LI(n,p),h=i??``,g=jB(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return N.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,R.jsxs)(sL.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...TB,...t.style},ref:m,defaultValue:h,children:[eJ(i)&&!_?(0,R.jsx)(`option`,{value:``}):null,Array.from(d)]},f)});Qq.displayName=Zq;function $q(e){return typeof e==`function`}function eJ(e){return e===``||e===void 0}function tJ(e){let t=lL(e),n=N.useRef(``),r=N.useRef(0),i=N.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=N.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function nJ(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=rJ(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 rJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var iJ=`Separator`,aJ=`horizontal`,oJ=[`horizontal`,`vertical`],sJ=N.forwardRef((e,t)=>{let{decorative:n,orientation:r=aJ,...i}=e,a=cJ(r)?r:aJ,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,R.jsx)(sL.div,{"data-orientation":a,...o,...i,ref:t})});sJ.displayName=iJ;function cJ(e){return oJ.includes(e)}var lJ=sJ,uJ=`Toggle`,dJ=N.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=GI({prop:n,onChange:i,defaultProp:r??!1,caller:uJ});return(0,R.jsx)(sL.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:J(e.onClick,()=>{e.disabled||s(!o)})})});dJ.displayName=uJ;var fJ=`ToggleGroup`,[pJ,mJ]=RI(fJ,[kU]),hJ=kU(),gJ=N.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,R.jsx)(yJ,{role:`radiogroup`,...r,ref:t});if(n===`multiple`)return(0,R.jsx)(bJ,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${fJ}\``)});gJ.displayName=fJ;var[_J,vJ]=pJ(fJ),yJ=N.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=GI({prop:n,defaultProp:r??``,onChange:i,caller:fJ});return(0,R.jsx)(_J,{scope:e.__scopeToggleGroup,type:`single`,value:N.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:N.useCallback(()=>s(``),[s]),children:(0,R.jsx)(CJ,{...a,ref:t})})}),bJ=N.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=GI({prop:n,defaultProp:r??[],onChange:i,caller:fJ}),c=N.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=N.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,R.jsx)(_J,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,R.jsx)(CJ,{...a,ref:t})})});gJ.displayName=fJ;var[xJ,SJ]=pJ(fJ),CJ=N.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=hJ(n),u=AB(o),d={dir:u,...c};return(0,R.jsx)(xJ,{scope:n,rovingFocus:i,disabled:r,children:i?(0,R.jsx)(VU,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,R.jsx)(sL.div,{...d,ref:t})}):(0,R.jsx)(sL.div,{...d,ref:t})})}),wJ=`ToggleGroupItem`,TJ=N.forwardRef((e,t)=>{let n=vJ(wJ,e.__scopeToggleGroup),r=SJ(wJ,e.__scopeToggleGroup),i=hJ(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=N.useRef(null);return r.rovingFocus?(0,R.jsx)(HU,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,R.jsx)(EJ,{...s,ref:t})}):(0,R.jsx)(EJ,{...s,ref:t})});TJ.displayName=wJ;var EJ=N.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=vJ(wJ,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,R.jsx)(dJ,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})});function DJ(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=DJ(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function OJ(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=DJ(e))&&(r&&(r+=` `),r+=t);return r}var kJ=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},AJ=(e,t)=>({classGroupId:e,validator:t}),jJ=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),MJ=`-`,NJ=[],PJ=`arbitrary..`,FJ=e=>{let t=RJ(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return LJ(e);let n=e.split(MJ);return IJ(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?kJ(i,t):t:i||NJ}return n[e]||NJ}}},IJ=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=IJ(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(MJ):e.slice(t).join(MJ),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},LJ=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?PJ+r:void 0})(),RJ=e=>{let{theme:t,classGroups:n}=e;return zJ(n,t)},zJ=(e,t)=>{let n=jJ();for(let r in e){let i=e[r];BJ(i,n,r,t)}return n},BJ=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];VJ(i,t,n,r)}},VJ=(e,t,n,r)=>{if(typeof e==`string`){HJ(e,t,n);return}if(typeof e==`function`){UJ(e,t,n,r);return}WJ(e,t,n,r)},HJ=(e,t,n)=>{let r=e===``?t:GJ(t,e);r.classGroupId=n},UJ=(e,t,n,r)=>{if(KJ(e)){BJ(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(AJ(n,e))},WJ=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];BJ(o,GJ(t,a),n,r)}},GJ=(e,t)=>{let n=e,r=t.split(MJ),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=jJ(),n.nextPart.set(t,i)),n=i}return n},KJ=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,qJ=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},JJ=`!`,YJ=`:`,XJ=[],ZJ=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),QJ=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===YJ){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(JJ)?(c=s.slice(0,-1),l=!0):s.startsWith(JJ)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ZJ(t,l,c,u)};if(t){let e=t+YJ,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ZJ(XJ,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},$J=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},eY=e=>({cache:qJ(e.cacheSize),parseClassName:QJ(e),sortModifiers:$J(e),postfixLookupClassGroupIds:tY(e),...FJ(e)}),tY=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},nY=/\s+/,rY=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(nY),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+JJ:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},iY=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=aY(n))&&(i&&(i+=` `),i+=r);return i},aY=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=aY(e[r]))&&(n&&(n+=` `),n+=t);return n},oY=(e,...t)=>{let n,r,i,a,o=o=>(n=eY(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=rY(e,n);return i(e,a),a};return a=o,(...e)=>a(iY(...e))},sY=[],cY=e=>{let t=t=>t[e]||sY;return t.isThemeGetter=!0,t},lY=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,uY=/^\((?:(\w[\w-]*):)?(.+)\)$/i,dY=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,fY=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pY=/\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$/,mY=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hY=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gY=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_Y=e=>dY.test(e),vY=e=>!!e&&!Number.isNaN(Number(e)),yY=e=>!!e&&Number.isInteger(Number(e)),bY=e=>e.endsWith(`%`)&&vY(e.slice(0,-1)),xY=e=>fY.test(e),SY=()=>!0,CY=e=>pY.test(e)&&!mY.test(e),wY=()=>!1,TY=e=>hY.test(e),EY=e=>gY.test(e),DY=e=>!Y(e)&&!X(e),OY=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),kY=e=>WY(e,JY,wY),Y=e=>lY.test(e),AY=e=>WY(e,YY,CY),jY=e=>WY(e,XY,vY),MY=e=>WY(e,QY,SY),NY=e=>WY(e,ZY,wY),PY=e=>WY(e,KY,wY),FY=e=>WY(e,qY,EY),IY=e=>WY(e,$Y,TY),X=e=>uY.test(e),LY=e=>GY(e,YY),RY=e=>GY(e,ZY),zY=e=>GY(e,KY),BY=e=>GY(e,JY),VY=e=>GY(e,qY),HY=e=>GY(e,$Y,!0),UY=e=>GY(e,QY,!0),WY=(e,t,n)=>{let r=lY.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},GY=(e,t,n=!1)=>{let r=uY.exec(e);return r?r[1]?t(r[1]):n:!1},KY=e=>e===`position`||e===`percentage`,qY=e=>e===`image`||e===`url`,JY=e=>e===`length`||e===`size`||e===`bg-size`,YY=e=>e===`length`,XY=e=>e===`number`,ZY=e=>e===`family-name`,QY=e=>e===`number`||e===`weight`,$Y=e=>e===`shadow`,eX=oY(()=>{let e=cY(`color`),t=cY(`font`),n=cY(`text`),r=cY(`font-weight`),i=cY(`tracking`),a=cY(`leading`),o=cY(`breakpoint`),s=cY(`container`),c=cY(`spacing`),l=cY(`radius`),u=cY(`shadow`),d=cY(`inset-shadow`),f=cY(`text-shadow`),p=cY(`drop-shadow`),m=cY(`blur`),h=cY(`perspective`),g=cY(`aspect`),_=cY(`ease`),v=cY(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),X,Y],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[X,Y,c],T=()=>[_Y,`full`,`auto`,...w()],E=()=>[yY,`none`,`subgrid`,X,Y],D=()=>[`auto`,{span:[`full`,yY,X,Y]},yY,X,Y],O=()=>[yY,`auto`,X,Y],k=()=>[`auto`,`min`,`max`,`fr`,X,Y],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[_Y,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[_Y,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[_Y,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,X,Y],I=()=>[...b(),zY,PY,{position:[X,Y]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,BY,kY,{size:[X,Y]}],re=()=>[bY,LY,AY],ie=()=>[``,`none`,`full`,l,X,Y],L=()=>[``,vY,LY,AY],ae=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],se=()=>[vY,bY,zY,PY],ce=()=>[``,`none`,m,X,Y],le=()=>[`none`,vY,X,Y],ue=()=>[`none`,vY,X,Y],de=()=>[vY,X,Y],fe=()=>[_Y,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[xY],breakpoint:[xY],color:[SY],container:[xY],"drop-shadow":[xY],ease:[`in`,`out`,`in-out`],font:[DY],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[xY],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[xY],shadow:[xY],spacing:[`px`,vY],text:[xY],"text-shadow":[xY],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,_Y,Y,X,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,X,Y]}],"container-named":[OY],columns:[{columns:[vY,Y,X,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[yY,`auto`,X,Y]}],basis:[{basis:[_Y,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[vY,_Y,`auto`,`initial`,`none`,Y]}],grow:[{grow:[``,vY,X,Y]}],shrink:[{shrink:[``,vY,X,Y]}],order:[{order:[yY,`first`,`last`,`none`,X,Y]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,LY,AY]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,UY,MY]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,bY,Y]}],"font-family":[{font:[RY,NY,t]}],"font-features":[{"font-features":[Y]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,X,Y]}],"line-clamp":[{"line-clamp":[vY,`none`,X,jY]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,X,Y]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,X,Y]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[vY,`from-font`,`auto`,X,AY]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[vY,`auto`,X,Y]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[yY,X,Y]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,X,Y]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,X,Y]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},yY,X,Y],radial:[``,X,Y],conic:[yY,X,Y]},VY,FY]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[vY,X,Y]}],"outline-w":[{outline:[``,vY,LY,AY]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,HY,IY]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,HY,IY]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[vY,AY]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,HY,IY]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[vY,X,Y]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[vY]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[X,Y]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[vY]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,X,Y]}],filter:[{filter:[``,`none`,X,Y]}],blur:[{blur:ce()}],brightness:[{brightness:[vY,X,Y]}],contrast:[{contrast:[vY,X,Y]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,HY,IY]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,vY,X,Y]}],"hue-rotate":[{"hue-rotate":[vY,X,Y]}],invert:[{invert:[``,vY,X,Y]}],saturate:[{saturate:[vY,X,Y]}],sepia:[{sepia:[``,vY,X,Y]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,X,Y]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[vY,X,Y]}],"backdrop-contrast":[{"backdrop-contrast":[vY,X,Y]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,vY,X,Y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[vY,X,Y]}],"backdrop-invert":[{"backdrop-invert":[``,vY,X,Y]}],"backdrop-opacity":[{"backdrop-opacity":[vY,X,Y]}],"backdrop-saturate":[{"backdrop-saturate":[vY,X,Y]}],"backdrop-sepia":[{"backdrop-sepia":[``,vY,X,Y]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,X,Y]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[vY,`initial`,X,Y]}],ease:[{ease:[`linear`,`initial`,_,X,Y]}],delay:[{delay:[vY,X,Y]}],animate:[{animate:[`none`,v,X,Y]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,X,Y]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":[`scale-3d`],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[X,Y,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":[`translate-none`],zoom:[{zoom:[yY,X,Y]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,X,Y]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,X,Y]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[vY,LY,AY,jY]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function tX(...e){return eX(OJ(e))}function nX({...e}){return(0,R.jsx)(Sz,{"data-slot":`dialog`,...e})}function rX({...e}){return(0,R.jsx)(Oz,{"data-slot":`dialog-portal`,...e})}function iX({className:e,...t}){return(0,R.jsx)(Az,{"data-slot":`dialog-overlay`,className:tX(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...t})}function aX({children:e,className:t,showCloseButton:n=!0,...r}){return(0,R.jsxs)(rX,{"data-slot":`dialog-portal`,children:[(0,R.jsx)(iX,{}),(0,R.jsxs)(Pz,{"data-slot":`dialog-content`,className:tX(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 p-6 shadow-lg duration-200 outline-none sm:max-w-lg`,t),...r,children:[e,n&&(0,R.jsxs)(Uz,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,R.jsx)(gI,{}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function oX({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`dialog-header`,className:tX(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function sX({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`dialog-footer`,className:tX(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function cX({className:e,...t}){return(0,R.jsx)(zz,{"data-slot":`dialog-title`,className:tX(`text-lg leading-none font-semibold`,e),...t})}function lX({className:e,...t}){return(0,R.jsx)(Vz,{"data-slot":`dialog-description`,className:tX(`text-muted-foreground text-sm`,e),...t})}function uX({className:e,...t}){return(0,R.jsx)(pB,{"data-slot":`command`,className:tX(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function dX({children:e,className:t,description:n=`Search for a command to run...`,showCloseButton:r=!0,title:i=`Command Palette`,...a}){return(0,R.jsxs)(nX,{...a,children:[(0,R.jsxs)(oX,{className:`sr-only`,children:[(0,R.jsx)(cX,{children:i}),(0,R.jsx)(lX,{children:n})]}),(0,R.jsx)(aX,{className:tX(`overflow-hidden p-0`,t),showCloseButton:r,children:(0,R.jsx)(uX,{className:`[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:e})})]})}function fX({className:e,...t}){return(0,R.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,R.jsx)(aI,{className:`size-4 shrink-0 opacity-50`}),(0,R.jsx)(pB.Input,{"data-slot":`command-input`,className:tX(`placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function pX({className:e,...t}){return(0,R.jsx)(pB.List,{"data-slot":`command-list`,className:tX(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function mX({...e}){return(0,R.jsx)(pB.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function hX({className:e,...t}){return(0,R.jsx)(pB.Group,{"data-slot":`command-group`,className:tX(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium`,e),...t})}function gX({className:e,...t}){return(0,R.jsx)(pB.Separator,{"data-slot":`command-separator`,className:tX(`bg-border -mx-1 h-px`,e),...t})}function _X({className:e,...t}){return(0,R.jsx)(pB.Item,{"data-slot":`command-item`,className:tX(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}var vX={account:`Account`,author:`Author`,approver:`Approver`,commenter:`Commenter`,scope:`Scope`,repo:`Repo`,status:`Status`,size:`Size`};function yX(){let e=oO(vI),t=uO(vI),n=ar(),r=uO(dP),i=e=>{n(e?`/settings/${e}`:`/settings`),t(!1)};return(0,N.useEffect)(()=>{let e=e=>{e.key===`p`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t(e=>!e))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),(0,R.jsxs)(dX,{open:e,onOpenChange:t,showCloseButton:!1,children:[(0,R.jsx)(fX,{placeholder:`Type a command...`}),(0,R.jsxs)(pX,{children:[(0,R.jsx)(mX,{children:`No results found.`}),(0,R.jsxs)(hX,{heading:`Actions`,children:[(0,R.jsxs)(_X,{onSelect:()=>{r({}),t(!1)},children:[(0,R.jsx)(nI,{}),`Refresh PRs`]}),(0,R.jsxs)(_X,{onSelect:()=>{n(`/`),t(!1)},children:[(0,R.jsx)(zF,{}),`View: PR List`]}),(0,R.jsxs)(_X,{onSelect:()=>{n(`/notifications`),t(!1)},children:[(0,R.jsx)(vF,{}),`View: Notifications`]})]}),(0,R.jsx)(gX,{}),(0,R.jsxs)(hX,{heading:`Settings`,children:[(0,R.jsxs)(_X,{onSelect:()=>i(),children:[(0,R.jsx)(sI,{}),`Open Settings`]}),(0,R.jsxs)(_X,{onSelect:()=>i(`accounts`),children:[(0,R.jsx)(sI,{}),`Settings: Accounts`]}),(0,R.jsxs)(_X,{onSelect:()=>i(`theme`),children:[(0,R.jsx)(sI,{}),`Settings: Theme`]}),(0,R.jsxs)(_X,{onSelect:()=>i(`config`),children:[(0,R.jsx)(sI,{}),`Settings: Config`]}),(0,R.jsxs)(_X,{onSelect:()=>i(`about`),children:[(0,R.jsx)(sI,{}),`Settings: About`]})]}),(0,R.jsx)(gX,{}),(0,R.jsxs)(hX,{heading:`Filters`,children:[(0,R.jsxs)(_X,{onSelect:()=>{n(`/?hot=1`),t(!1)},children:[(0,R.jsx)(RF,{}),`Hot`]}),_I.map(e=>(0,R.jsxs)(_X,{onSelect:()=>{n(`/?f=${e}:`),t(!1)},children:[(0,R.jsx)(zF,{}),`Filter: `,vX[e]]},e))]})]})]})}var bX=e=>_I.some(t=>t===e),xX=[{key:`status`,value:`open`}],SX=xX.map(e=>`${e.key}:${e.value}`);function CX(e){let t=e.getAll(`f`);if(t.length===0)return xX;let n=[];for(let e of t){let t=e.indexOf(`:`);if(t<1)continue;let r=e.slice(0,t),i=e.slice(t+1);!bX(r)||!i||n.some(e=>e.key===r&&e.value===i)||n.push({key:r,value:i})}return n}function wX(){let[e,t]=Wi();return{state:(0,N.useMemo)(()=>{let t=e.get(`mineScope`),n=e.get(`from`),r=e.get(`to`);return{filters:CX(e),hot:e.get(`sortBy`)===`updated`,...e.has(`groupBy`)?{groupBy:e.get(`groupBy`)}:{},mine:e.has(`mine`),review:e.has(`review`),...t==null?{}:{mineScope:t},q:e.get(`q`)??``,...n==null?{}:{from:n},...r==null?{}:{to:r}}},[e]),toggleFilter:(0,N.useCallback)((e,n)=>{t(t=>{let r=t.getAll(`f`),i=`${e}:${n}`;if(r.length===0){for(let e of SX)t.append(`f`,e);r=t.getAll(`f`)}let a=r.includes(i);t.delete(`f`);for(let e of r)e===i||e===``||t.append(`f`,e);return a||t.append(`f`,i),t.getAll(`f`).length===0&&a&&t.append(`f`,``),t},{replace:!0})},[t]),removeFilterKey:(0,N.useCallback)(e=>{t(t=>{let n=t.getAll(`f`);if(n.length===0){for(let e of SX)t.append(`f`,e);n=t.getAll(`f`)}t.delete(`f`);for(let r of n)r===``||r.slice(0,r.indexOf(`:`))===e||t.append(`f`,r);return t.getAll(`f`).length===0&&t.append(`f`,``),t},{replace:!0})},[t]),toggleHot:(0,N.useCallback)(()=>{t(e=>(e.get(`sortBy`)===`updated`?e.delete(`sortBy`):e.set(`sortBy`,`updated`),e),{replace:!0})},[t]),toggleReview:(0,N.useCallback)(()=>{t(e=>(e.has(`review`)?e.delete(`review`):e.set(`review`,`1`),e),{replace:!0})},[t]),toggleMine:(0,N.useCallback)(()=>{t(e=>(e.has(`mine`)?(e.delete(`mine`),e.delete(`mineScope`)):e.set(`mine`,`1`),e),{replace:!0})},[t]),setMineScope:(0,N.useCallback)(e=>{t(t=>(e?t.set(`mineScope`,e):t.delete(`mineScope`),t),{replace:!0})},[t]),setFilterText:(0,N.useCallback)(e=>{t(t=>(e?t.set(`q`,e):t.delete(`q`),t),{replace:!0})},[t]),clearAll:(0,N.useCallback)(()=>{t(e=>(e.delete(`f`),e.delete(`sortBy`),e.delete(`groupBy`),e.delete(`mine`),e.delete(`review`),e.delete(`mineScope`),e.delete(`q`),e.delete(`from`),e.delete(`to`),e),{replace:!0})},[t])}}var TX=e=>{let t=e.match(/^\w+\(([^)]+)\):/);if(t?.[1])return t[1];let n=e.match(/^([A-Z]+-\d+):/);return n?.[1]?n[1]:null},EX=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,DX=OJ,OX=(e,t)=>n=>{if(t?.variants==null)return DX(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=EX(t)||EX(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 DX(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)},kX=OX(`inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function AX({asChild:e=!1,className:t,variant:n=`default`,...r}){return(0,R.jsx)(e?YI:`span`,{"data-slot":`badge`,"data-variant":n,className:tX(kX({variant:n}),t),...r})}var jX=OX(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function Z({asChild:e=!1,className:t,size:n=`default`,variant:r=`default`,...i}){return(0,R.jsx)(e?YI:`button`,{"data-slot":`button`,"data-variant":r,"data-size":n,className:tX(jX({variant:r,size:n,className:t})),...i})}function MX({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`button-group`,className:tX(`inline-flex items-stretch rounded-md border overflow-hidden [&>*]:rounded-none [&>*]:border-0 [&>*]:shadow-none [&>*:not(:last-child)]:border-r`,e),...t})}function NX({...e}){return(0,R.jsx)(FK,{"data-slot":`popover`,...e})}function PX({...e}){return(0,R.jsx)(IK,{"data-slot":`popover-trigger`,...e})}function FX({align:e=`start`,className:t,sideOffset:n=4,...r}){return(0,R.jsx)(LK,{children:(0,R.jsx)(RK,{"data-slot":`popover-content`,align:e,sideOffset:n,className:tX(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-[200px] origin-(--radix-popover-content-transform-origin) overflow-hidden rounded-md border p-0 shadow-md outline-hidden`,t),...r})})}var IX={account:`Account`,author:`Author`,approver:`Approver`,commenter:`Commenter`,scope:`Scope`,repo:`Repo`,status:`Status`,size:`Size`},LX=[`status`,`author`,`repo`,`scope`,`account`,`approver`,`commenter`,`size`];function RX(e){let t=new Set,n=new Set,r=new Set,i=new Set,a=new Set,o=new Set;for(let s of e){t.add(s.author),n.add(s.account?.profile??`unknown`),i.add(s.repositoryName);let e=TX(s.title);if(e&&r.add(e),s.commentedBy)for(let e of s.commentedBy)e&&a.add(e);if(s.approvedBy)for(let e of s.approvedBy)e&&o.add(e)}return{account:Array.from(n).sort(),author:Array.from(t).sort(),approver:Array.from(o).sort(),commenter:Array.from(a).sort(),scope:Array.from(r).sort(),repo:Array.from(i).sort(),status:[`open`,`approved`,`pending`,`mergeable`,`conflicts`,`merged`,`closed`],size:[`small`,`medium`,`large`,`xlarge`]}}function zX(e,t){switch(t.key){case`account`:return(e.account?.profile??`unknown`)===t.value;case`author`:return e.author===t.value;case`scope`:return TX(e.title)===t.value;case`repo`:return e.repositoryName===t.value;case`approver`:return e.approvedBy?.some(e=>e===t.value)??!1;case`commenter`:return e.commentedBy?.some(e=>e===t.value)??!1;case`size`:{let n=e.filesChanged;if(n==null)return!1;switch(t.value){case`small`:return n<5;case`medium`:return n>=5&&n<=15;case`large`:return n>=16&&n<=30;case`xlarge`:return n>30;default:return!0}}case`status`:switch(t.value){case`approved`:return e.status===`OPEN`&&e.isApproved;case`pending`:return e.status===`OPEN`&&!e.isApproved;case`mergeable`:return e.status===`OPEN`&&e.isMergeable;case`conflicts`:return e.status===`OPEN`&&!e.isMergeable;case`merged`:return e.status===`MERGED`;case`closed`:return e.status===`CLOSED`;case`open`:return e.status===`OPEN`;default:return!0}default:return!0}}var BX=[`approved`,`pending`,`mergeable`,`conflicts`],VX={open:`lifecycle`,merged:`lifecycle`,closed:`lifecycle`,approved:`approval`,pending:`approval`,mergeable:`merge`,conflicts:`merge`};function HX({filterKey:e,groups:t,label:n,onToggle:r,options:i,selected:a}){let[o,s]=(0,N.useState)(!1),c=a.length,l=(0,N.useMemo)(()=>t?new Set(Object.values(t).flat()):new Set,[t]),u=(0,N.useMemo)(()=>{if(!t)return new Map;let e=new Map;for(let[n,r]of Object.entries(t))for(let t of r)e.set(t,n);return e},[t]);return(0,R.jsxs)(NX,{open:o,onOpenChange:s,children:[(0,R.jsx)(PX,{asChild:!0,children:(0,R.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between rounded-md px-2 py-2.5 text-sm hover:bg-accent transition-colors`,children:[(0,R.jsxs)(`span`,{className:`flex items-center gap-2`,children:[n,c>0&&(0,R.jsx)(AX,{variant:`default`,className:`h-4 min-w-[16px] px-1 text-[10px] rounded-full`,children:c})]}),(0,R.jsx)(wF,{className:`size-3.5 opacity-40`})]})}),(0,R.jsx)(FX,{className:`w-[220px] p-0`,side:`right`,align:`start`,children:(0,R.jsxs)(uX,{children:[(0,R.jsx)(fX,{placeholder:`Search ${n.toLowerCase()}...`}),(0,R.jsxs)(pX,{children:[(0,R.jsx)(mX,{children:`No results.`}),(0,R.jsx)(hX,{children:i.map((n,o)=>{let s=t!=null&&n in t,c=l.has(n),d=u.get(n),f=s?t[n].every(e=>a.includes(e))||a.includes(n):a.includes(n)||d!=null&&a.includes(d),p=o>0?i[o-1]:void 0;return(0,R.jsxs)(`div`,{children:[!c&&!s&&p!=null&&l.has(p)&&(0,R.jsx)(`div`,{className:`my-1 h-px bg-border`}),(0,R.jsxs)(_X,{onSelect:()=>r(e,n),className:c?`pl-8`:``,children:[(0,R.jsx)(`div`,{className:`mr-2 flex size-4 shrink-0 items-center justify-center rounded-sm border ${f?`bg-primary border-primary text-primary-foreground`:`opacity-50`}`,children:f&&(0,R.jsx)(SF,{className:`size-3`})}),(0,R.jsx)(`span`,{className:`truncate ${s?`font-medium`:``}`,children:n})]})]},n)})})]})]})})]})}function UX(){let e=oO(WP),{clearAll:t,state:n,toggleFilter:r}=wX(),[,i]=Wi(),a=e.pullRequests,o=e.currentUser;(0,N.useEffect)(()=>{i(e=>{let t=e.getAll(`f`).some(e=>e.startsWith(`author:`));return!e.has(`sortBy`)&&!e.has(`groupBy`)&&!e.has(`review`)&&!t&&e.set(`sortBy`,`updated`),e},{replace:!0})},[]);let s=(0,N.useMemo)(()=>{let e=new Map;for(let t of n.filters){let n=e.get(t.key);n?n.push(t.value):e.set(t.key,[t.value])}return e},[n.filters]),c=(0,N.useCallback)((e,t)=>{e===`status`&&t===`open`?i(e=>{let t=e.getAll(`f`);if(t.length===0&&(e.append(`f`,`status:open`),t=e.getAll(`f`)),t.includes(`status:open`)){e.delete(`f`);for(let n of t)n===`status:open`||n===``||e.append(`f`,n);return e.getAll(`f`).length===0&&e.append(`f`,``),e}let n=BX.map(e=>`status:${e}`),r=new Set([`status:merged`,`status:closed`]),i=n.every(e=>t.includes(e));e.delete(`f`);for(let i of t)n.includes(i)||r.has(i)||e.append(`f`,i);if(!i)for(let t of n)e.append(`f`,t);return e.getAll(`f`).length===0&&e.append(`f`,``),e},{replace:!0}):e===`status`&&BX.includes(t)&&s.get(`status`)?.includes(`open`)?i(e=>{let n=e.getAll(`f`);n.length===0&&(e.append(`f`,`status:open`),n=e.getAll(`f`)),e.delete(`f`);for(let t of n)t===`status:open`||t===``||e.append(`f`,t);for(let n of BX)n!==t&&e.append(`f`,`status:${n}`);return e},{replace:!0}):r(e,t)},[r,i,s]),l=(0,N.useMemo)(()=>{let e=new Map;for(let t of n.filters){let n=t.key===`status`?`status:${VX[t.value]??t.value}`:t.key,r=e.get(n);r?r.push(t):e.set(n,[t])}let t={account:[],author:[],approver:[],commenter:[],scope:[],repo:[],status:[],size:[]};for(let n of LX){let r=[...e.entries()].filter(([e])=>e!==n&&!e.startsWith(`${n}:`)),i=a;r.length>0&&(i=a.filter(e=>r.every(([,t])=>t.some(t=>zX(e,t))))),t[n]=RX(i)[n]??[]}return t},[a,o,n.filters]),u=!!n.from||!!n.to,d=n.filters.length>0||n.hot||n.review||u,f=o!=null&&(s.get(`author`)?.includes(o)??!1),p=!n.hot&&!n.review&&!f,m=n.hot?`hot`:n.review?`review`:f?`mine`:`all`,h=(0,N.useCallback)(e=>{i(t=>{t.delete(`sortBy`),t.delete(`groupBy`),t.delete(`review`);let n=t.getAll(`f`).filter(e=>!o||e!==`author:${o}`);t.delete(`f`);for(let e of n)t.append(`f`,e);switch(e===m?`hot`:e){case`hot`:t.set(`sortBy`,`updated`);break;case`all`:t.set(`groupBy`,`account`);break;case`mine`:t.set(`groupBy`,`account`),o&&t.append(`f`,`author:${o}`);break;case`review`:t.set(`review`,`1`);break}return!t.getAll(`f`).some(e=>e.startsWith(`status:`))&&t.getAll(`f`).length>0&&t.append(`f`,`status:open`),t},{replace:!0})},[i,o,m]);return(0,R.jsxs)(`aside`,{className:`sticky top-20 flex w-56 shrink-0 flex-col gap-1 self-start overflow-y-auto pb-8`,style:{maxHeight:`calc(100vh - 5rem)`},children:[(0,R.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,R.jsxs)(Z,{variant:n.hot?`default`:`ghost`,size:`sm`,className:`justify-start gap-2.5 h-9`,onClick:()=>h(`hot`),children:[(0,R.jsx)(RF,{className:`size-3.5`}),`Hot`]}),(0,R.jsxs)(Z,{variant:p?`default`:`ghost`,size:`sm`,className:`justify-start gap-2.5 h-9`,onClick:()=>h(`all`),children:[(0,R.jsx)(WF,{className:`size-3.5`}),`All`]}),o&&(0,R.jsxs)(Z,{variant:f?`default`:`ghost`,size:`sm`,className:`justify-start gap-2.5 h-9`,onClick:()=>h(`mine`),children:[(0,R.jsx)(hI,{className:`size-3.5`}),`Mine`]}),o&&(0,R.jsxs)(Z,{variant:n.review?`default`:`ghost`,size:`sm`,className:`justify-start gap-2.5 h-9`,onClick:()=>h(`review`),children:[(0,R.jsx)(IF,{className:`size-3.5`}),`Review`]})]}),(0,R.jsxs)(`div`,{className:`mt-6 flex items-center justify-between`,children:[(0,R.jsx)(`span`,{className:`text-xs font-semibold text-muted-foreground`,children:`Filters`}),d&&(0,R.jsxs)(`button`,{type:`button`,className:`flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,onClick:t,children:[`Clear all`,(0,R.jsx)(gI,{className:`size-2.5`})]})]}),(0,R.jsx)(`div`,{className:`h-px bg-border my-1`}),LX.map(e=>(0,R.jsx)(HX,{filterKey:e,label:IX[e],options:l[e],selected:s.get(e)??[],onToggle:c,...e===`status`?{groups:{open:Array.from(BX)}}:{}},e))]})}var WX=e=>`${e.getDate().toString().padStart(2,`0`)}.${(e.getMonth()+1).toString().padStart(2,`0`)}.${e.getFullYear()}`,GX=(e,t,n=`Updated`)=>ZO(Math.max(0,Math.floor((t.getTime()-e.getTime())/1e3))).pipe(QO(e=>e<60,e=>`${n} ${e}s ago`),QO(e=>e<3600,e=>`${n} ${Math.floor(e/60)}m ago`),QO(e=>e<86400,e=>`${n} ${Math.floor(e/3600)}h ago`),$O(()=>`${n} on ${WX(e)}`)),KX=e=>{let t=/^(\d{4})-W(\d{2})$/.exec(e);if(!t)return Tc();let n=parseInt(t[1],10),r=parseInt(t[2],10);if(r<1||r>53)return Tc();let i=new Date(Date.UTC(n,0,4)),a=i.getUTCDay()||7,o=new Date(i.getTime()+((r-1)*7-(a-1))*864e5);return B({week:e,start:o,end:new Date(o.getTime()+7*864e5)})},qX=e=>{let t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())),n=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-n);let r=new Date(Date.UTC(t.getUTCFullYear(),0,1)),i=Math.ceil(((t.getTime()-r.getTime())/864e5+1)/7);return`${t.getUTCFullYear()}-W${i.toString().padStart(2,`0`)}`},JX=e=>{let t=e.week.split(`-W`),n=e.start.toLocaleString(`en-US`,{month:`short`,timeZone:`UTC`}),r=e.end.toLocaleString(`en-US`,{month:`short`,timeZone:`UTC`}),i=e.start.getUTCDate(),a=e.end.getUTCDate(),o=n===r?`${n} ${i} – ${a}`:`${n} ${i} – ${r} ${a}`;return`W${t[1]} ${t[0]} · ${o}`},YX=e=>{let t=gu(lu(e));return t<1?`${Math.round(t*60)}m`:t<24?`${Math.floor(t)}h`:`${Math.round(t/24*10)/10}d`},XX=/^fetching (comments|diffs) \((\d+)\/(\d+)\)$/,ZX=/^(.+?) #(\S+) (.+)$/,QX=/^syncing (W\d+)/;function $X(e){if(e===`loading from cache...`)return{phase:`cache`,label:`Cache`,detail:`loading from cache`};let t=e.match(XX);if(t){let n=t[1]===`comments`?`comments`:`diffs`;return{phase:n,label:n===`comments`?`Comments`:`Diffs`,detail:e,current:Number(t[2]),total:Number(t[3])}}return e===`calculating health scores`?{phase:`health`,label:`Health`,detail:`calculating scores`}:QX.test(e)?{phase:`sync`,label:`Sync`,detail:e}:ZX.test(e)||e.includes(`(`)&&e.includes(`)`)?{phase:`fetch`,label:`Fetching`,detail:e}:{phase:`unknown`,label:`Working`,detail:e}}var eZ=3;function tZ({isLoading:e,statusDetail:t}){let n=(0,N.useRef)(0),[r,i]=(0,N.useState)([]);return(0,N.useEffect)(()=>{if(!e||!t)return;let r=$X(t);i(e=>{let t=e.findIndex(e=>e.id===r.phase),i=++n.current;if(t>=0)return e.map((e,n)=>{if(n!==t)return e;let a=[...e.items,{id:i,text:r.detail}];return a.length>eZ&&a.splice(0,a.length-eZ),{...e,items:a,current:r.current??e.current,total:r.total??e.total,itemCount:e.itemCount+1}});let a=e.map(e=>({...e,complete:!0,items:[]})),o={id:r.phase,label:r.label,items:[{id:i,text:r.detail}],current:r.current??null,total:r.total??null,complete:!1,itemCount:1};return[...a,o]})},[t,e]),(0,N.useEffect)(()=>{e||(n.current=0,i([]))},[e]),r.length===0?null:(0,R.jsx)(`div`,{className:`flex flex-1 flex-col justify-end gap-0.5 overflow-hidden`,style:{maxHeight:`4.5rem`},children:r.map(e=>(0,R.jsx)(nZ,{phase:e},e.id))})}function nZ({phase:e}){return e.complete?(0,R.jsxs)(`div`,{className:`rolling-line flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(SF,{className:`size-3 text-green-500 shrink-0`}),(0,R.jsx)(`span`,{className:`font-medium`,children:e.label}),(0,R.jsx)(`span`,{className:`opacity-50`,children:e.total==null?`${e.itemCount} items`:`${e.total}/${e.total}`})]}):(0,R.jsxs)(`div`,{className:`flex flex-col`,children:[(0,R.jsxs)(`div`,{className:`rolling-line flex items-center gap-2 text-xs`,children:[(0,R.jsx)(`span`,{className:`size-3 shrink-0 flex items-center justify-center`,children:(0,R.jsx)(`span`,{className:`size-1.5 animate-pulse rounded-full bg-blue-500`})}),(0,R.jsx)(`span`,{className:`font-medium text-foreground`,children:e.label}),e.total!=null&&(0,R.jsxs)(`span`,{className:`font-mono text-muted-foreground tabular-nums`,children:[e.current??0,`/`,e.total]})]}),(0,R.jsx)(`div`,{className:`ml-5 flex flex-col overflow-hidden`,style:{maskImage:`linear-gradient(to bottom, transparent 0%, black 40%)`,WebkitMaskImage:`linear-gradient(to bottom, transparent 0%, black 40%)`},children:e.items.map((t,n)=>{let r=e.items.length-1-n,i=r===0?.7:r===1?.35:.15;return(0,R.jsx)(`span`,{className:`rolling-line truncate font-mono text-[11px] leading-relaxed text-muted-foreground`,style:{"--rolling-opacity":i,opacity:i},children:t.text},t.id)})})]})}function rZ({...e}){return(0,R.jsx)(iK,{"data-slot":`dropdown-menu`,...e})}function iZ({...e}){return(0,R.jsx)(aK,{"data-slot":`dropdown-menu-trigger`,...e})}function aZ({align:e=`end`,className:t,sideOffset:n=4,...r}){return(0,R.jsx)(oK,{children:(0,R.jsx)(sK,{"data-slot":`dropdown-menu-content`,align:e,sideOffset:n,className:tX(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md`,t),...r})})}function oZ({className:e,...t}){return(0,R.jsx)(cK,{"data-slot":`dropdown-menu-item`,className:tX(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}function sZ({className:e,...t}){return(0,R.jsx)(`kbd`,{"data-slot":`kbd`,className:tX(`bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none`,`[&_svg:not([class*='size-'])]:size-3`,e),...t})}function cZ(){let e=oO(WP),t=uO(dP),n=uO(yP),r=ar(),{setTheme:i,theme:a}=sa(),o=e.status===`loading`,s=e.status===`error`,c=e.unreadNotificationCount??0,l=e.pendingReviewCount??0,u=(e.sandboxes??[]).filter(e=>e.status===`running`||e.status===`creating`||e.status===`cloning`||e.status===`starting`);return(0,R.jsx)(`header`,{className:`sticky top-0 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60`,children:(0,R.jsxs)(`div`,{className:`flex h-20 items-center gap-4 px-8`,children:[(0,R.jsx)(`button`,{className:`w-56 shrink-0 text-left text-sm font-semibold tracking-tight hover:text-foreground/80`,onClick:()=>r(`/`),children:`codecommit`}),s&&(0,R.jsx)(`span`,{className:`text-sm text-destructive`,children:e.error??`Error loading PRs`}),o&&(0,R.jsx)(tZ,{statusDetail:e.statusDetail,isLoading:o}),e.lastUpdated&&!s&&!o&&(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:GX(e.lastUpdated,new Date)}),(0,R.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[e.currentUser&&(0,R.jsxs)(rZ,{children:[(0,R.jsx)(iZ,{asChild:!0,children:(0,R.jsxs)(`button`,{className:`flex items-center gap-1 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground`,children:[(0,R.jsx)(hI,{className:`size-3`}),e.currentUser]})}),(0,R.jsx)(aZ,{children:(0,R.jsxs)(oZ,{onClick:()=>n({}),children:[(0,R.jsx)(qF,{className:`size-3`}),`Logout`]})})]}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>r(`/stats`),children:[(0,R.jsx)(xF,{className:`size-4`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Statistics`})]}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>r(`/audit`),children:[(0,R.jsx)(iI,{className:`size-4`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Audit Log`})]}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,className:`relative`,onClick:()=>r(`/sandboxes`),children:[(0,R.jsx)(yF,{className:`size-4`}),u.length>0&&(0,R.jsx)(`span`,{className:`absolute -right-0.5 -top-0.5 flex size-4 items-center justify-center rounded-full bg-primary text-[10px] font-medium text-primary-foreground`,children:u.length}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Sandboxes`})]}),l>0&&(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,className:`relative`,onClick:()=>r(`/?review=1`),children:[(0,R.jsx)(IF,{className:`size-4`}),(0,R.jsx)(`span`,{className:`absolute -right-0.5 -top-0.5 flex size-4 items-center justify-center rounded-full bg-yellow-500 text-[10px] font-medium text-white`,children:l>9?`9+`:l}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Needs my review`})]}),(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>t({}),disabled:o,children:(0,R.jsx)(nI,{className:tX(`size-4`,o&&`animate-spin`)})}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,className:`relative`,onClick:()=>r(`/notifications`),children:[(0,R.jsx)(vF,{className:`size-4`}),c>0&&(0,R.jsx)(`span`,{className:`absolute -right-0.5 -top-0.5 flex size-4 items-center justify-center rounded-full bg-destructive text-[10px] font-medium text-destructive-foreground`,children:c>9?`9+`:c}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Notifications`})]}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>r(`/settings`),children:[(0,R.jsx)(sI,{className:`size-4`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Settings`})]}),(0,R.jsx)(sZ,{children:`⌘P`}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>i(a===`dark`?`light`:a===`light`?`system`:`dark`),children:[(0,R.jsx)(dI,{className:`size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0`}),(0,R.jsx)(QF,{className:`absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Toggle theme`})]})]})]})})}function lZ({prompt:e}){let t=uO(IP),n=n=>t({payload:{id:e.id,response:n}});return(0,R.jsx)(nX,{open:!0,children:(0,R.jsxs)(aX,{showCloseButton:!1,children:[(0,R.jsxs)(oX,{children:[(0,R.jsxs)(cX,{className:`flex items-center gap-2`,children:[(0,R.jsx)(cI,{className:`size-5`}),`API Permission Required`]}),(0,R.jsx)(lX,{children:e.context})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md bg-muted px-3 py-2`,children:[(0,R.jsx)(AX,{variant:e.category===`write`?`destructive`:`secondary`,children:e.category}),(0,R.jsx)(`code`,{className:`text-xs font-mono`,children:e.operation})]}),(0,R.jsxs)(sX,{children:[(0,R.jsx)(Z,{variant:`outline`,onClick:()=>n(`deny`),children:`Deny`}),(0,R.jsx)(Z,{variant:`secondary`,onClick:()=>n(`allow_once`),children:`Allow Once`}),(0,R.jsx)(Z,{onClick:()=>n(`always_allow`),children:`Always Allow`})]})]})})}var uZ={new_comment:{icon:XF,className:`text-blue-500`},comment_edited:{icon:XF,className:`text-muted-foreground`},comment_deleted:{icon:XF,className:`text-muted-foreground`},approval_changed:{icon:kF,className:`text-green-500`},approval_requested:{icon:IF,className:`text-yellow-500`},pr_merged:{icon:VF,className:`text-purple-500`},pr_closed:{icon:AF,className:`text-red-500`},pr_reopened:{icon:nI,className:`text-blue-500`},merge_changed:{icon:BF,className:`text-orange-500`}},dZ={icon:vF,className:`text-muted-foreground`};function fZ(e){return uZ[e]??dZ}function pZ({notifications:e}){let t=e.filter(e=>e.pullRequestId).slice(0,5);if(t.length===0)return null;let n=new Date;return(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card px-4 py-4`,children:[(0,R.jsx)(`h3`,{className:`mb-3 text-xs font-semibold text-muted-foreground`,children:`Recent Activity`}),(0,R.jsx)(`div`,{className:`flex flex-col gap-2.5`,children:t.map(e=>{let{className:t,icon:r}=fZ(e.type),i=e.awsAccountId&&e.pullRequestId?`/accounts/${encodeURIComponent(e.awsAccountId)}/prs/${e.pullRequestId}`:null;return i?(0,R.jsxs)(Ii,{to:i,className:`flex items-start gap-2.5 rounded-md -mx-1.5 px-1.5 py-1 transition-colors hover:bg-accent no-underline text-inherit`,children:[(0,R.jsx)(`div`,{className:`mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full bg-muted ${t}`,children:(0,R.jsx)(r,{className:`size-3`})}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`p`,{className:`text-xs leading-snug`,children:e.title||e.message}),(0,R.jsxs)(`p`,{className:`text-[11px] text-muted-foreground`,children:[GX(new Date(e.createdAt),n),e.profile&&(0,R.jsxs)(R.Fragment,{children:[`· `,e.profile]})]})]})]},e.id):(0,R.jsxs)(`div`,{className:`flex items-start gap-2.5 px-1.5 py-1`,children:[(0,R.jsx)(`div`,{className:`mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full bg-muted ${t}`,children:(0,R.jsx)(r,{className:`size-3`})}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`p`,{className:`text-xs leading-snug`,children:e.title||e.message}),(0,R.jsxs)(`p`,{className:`text-[11px] text-muted-foreground`,children:[GX(new Date(e.createdAt),n),e.profile&&(0,R.jsxs)(R.Fragment,{children:[`· `,e.profile]})]})]})]},e.id)})}),(0,R.jsx)(`div`,{className:`mt-3 text-center`,children:(0,R.jsx)(Ii,{to:`/notifications`,className:`text-xs text-muted-foreground hover:text-foreground transition-colors`,children:`View all activity →`})})]})}var mZ={account:`Account`,author:`Author`,approver:`Approver`,commenter:`Commenter`,scope:`Scope`,repo:`Repo`,status:`Status`,size:`Size`};function hZ(){let{clearAll:e,setFilterText:t,state:n,toggleFilter:r}=wX(),i=(0,N.useMemo)(()=>{let e=new Map;for(let t of n.filters){let n=e.get(t.key);n?n.push(t.value):e.set(t.key,[t.value])}return e},[n.filters]),a=!!n.from||!!n.to,o=n.filters.length>0||n.review||n.q||a,s=n.filters.length>0;return(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-lg border bg-background px-3 min-h-[44px] focus-within:ring-1 focus-within:ring-ring flex-wrap py-1.5`,children:[(0,R.jsx)(aI,{className:`size-4 shrink-0 text-muted-foreground`}),[...i.entries()].map(([e,t])=>t.map(t=>(0,R.jsxs)(AX,{variant:`secondary`,className:`cursor-pointer gap-1 pl-2 pr-0.5 h-5 text-[10px] shrink-0`,onClick:()=>r(e,t),children:[mZ[e],`: `,t,(0,R.jsx)(gI,{className:`size-2.5`})]},`${e}:${t}`))),a&&(0,R.jsxs)(AX,{variant:`outline`,className:`cursor-pointer gap-1 pl-2 pr-0.5 h-5 text-[10px] shrink-0`,children:[n.from,` → `,n.to,(0,R.jsx)(gI,{className:`size-2.5`})]}),(0,R.jsx)(`input`,{placeholder:s||a?`Refine...`:`Search commits...`,className:`flex-1 min-w-[80px] bg-transparent text-sm outline-none placeholder:text-muted-foreground`,value:n.q,onChange:e=>t(e.target.value)}),o&&(0,R.jsx)(`button`,{type:`button`,className:`shrink-0 text-muted-foreground hover:text-foreground transition-colors`,onClick:e,children:(0,R.jsx)(gI,{className:`size-3.5`})})]})}function gZ(){let e=uO(WP),t=oO(WP),n=ar(),r=(0,N.useCallback)(e=>n(e??`/notifications`),[n]),{notify:i}=GP(e=>n(e));aF(t=>e(t),r,i),YP(t.pendingReviewCount??0);let{pathname:a}=rr(),o=a===`/`,s=X9();return(0,R.jsxs)(`div`,{className:`flex min-h-screen flex-col bg-background`,children:[(0,R.jsx)(cZ,{}),o?(0,R.jsxs)(`div`,{className:`flex flex-1 gap-8 px-8 py-8`,children:[(0,R.jsx)(UX,{}),(0,R.jsxs)(`main`,{className:`flex-1 flex flex-col gap-6 min-w-0`,children:[(0,R.jsx)(hZ,{}),(0,R.jsx)(Br,{})]}),t.currentUser&&(t.notifications?.items?.length??0)>0&&(0,R.jsx)(`aside`,{className:`sticky top-20 w-64 shrink-0 self-start`,style:{maxHeight:`calc(100vh - 5rem)`},children:(0,R.jsx)(pZ,{notifications:t.notifications?.items??[]})})]}):(0,R.jsx)(`main`,{className:s?`flex-1`:`w-full flex-1 px-8 py-8`,children:(0,R.jsx)(Br,{})}),(0,R.jsx)(yX,{}),(0,R.jsx)(VO,{}),t.permissionPrompt&&(0,R.jsx)(lZ,{prompt:t.permissionPrompt})]})}function _Z({className:e,type:t,...n}){return(0,R.jsx)(`input`,{type:t,"data-slot":`input`,className:tX(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,e),...n})}function vZ({...e}){return(0,R.jsx)(eq,{"data-slot":`select`,...e})}function yZ({...e}){return(0,R.jsx)(iq,{"data-slot":`select-value`,...e})}function bZ({children:e,className:t,size:n=`default`,...r}){return(0,R.jsxs)(nq,{"data-slot":`select-trigger`,"data-size":n,className:tX(`border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 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`,t),...r,children:[e,(0,R.jsx)(oq,{asChild:!0,children:(0,R.jsx)(wF,{className:`size-4 opacity-50`})})]})}function xZ({align:e=`center`,children:t,className:n,position:r=`item-aligned`,...i}){return(0,R.jsx)(uq,{children:(0,R.jsxs)(fq,{"data-slot":`select-content`,className:tX(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 shadow-md`,r===`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`,n),position:r,align:e,...i,children:[(0,R.jsx)(CZ,{}),(0,R.jsx)(Dq,{className:tX(`p-1`,r===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,R.jsx)(wZ,{})]})})}function SZ({children:e,className:t,...n}){return(0,R.jsxs)(Lq,{"data-slot":`select-item`,className:tX(`focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground 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 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,t),...n,children:[(0,R.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,R.jsx)(Vq,{children:(0,R.jsx)(SF,{className:`size-4`})})}),(0,R.jsx)(zq,{children:e})]})}function CZ({className:e,...t}){return(0,R.jsx)(Uq,{"data-slot":`select-scroll-up-button`,className:tX(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,R.jsx)(EF,{className:`size-4`})})}function wZ({className:e,...t}){return(0,R.jsx)(Gq,{"data-slot":`select-scroll-down-button`,className:tX(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,R.jsx)(wF,{className:`size-4`})})}var TZ=50,EZ=`secondary`,DZ=`default`,OZ=`destructive`,kZ=`outline`,AZ=e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`id`),n=Reflect.get(e,`timestamp`),r=Reflect.get(e,`operation`),i=Reflect.get(e,`accountProfile`),a=Reflect.get(e,`region`),o=Reflect.get(e,`permissionState`),s=Reflect.get(e,`context`),c=Reflect.get(e,`durationMs`);return typeof t==`number`&&typeof n==`string`&&typeof r==`string`&&typeof i==`string`&&typeof a==`string`&&typeof o==`string`&&typeof s==`string`&&(typeof c==`number`||c===null)},jZ=e=>{switch(e){case`always_allowed`:return EZ;case`allowed`:return DZ;case`denied`:return OZ;case`timed_out`:return kZ;default:return kZ}};function MZ(){let e=ar(),[,t]=dO(VP,{mode:`promise`}),[,n]=dO(HP,{mode:`promise`}),[r,i]=(0,N.useState)([]),[a,o]=(0,N.useState)(0),[s,c]=(0,N.useState)(!0),[l,u]=(0,N.useState)(0),[d,f]=(0,N.useState)(``),[p,m]=(0,N.useState)(``),[h,g]=(0,N.useState)(``),_=(0,N.useMemo)(()=>{let e={limit:TZ,offset:l};return d&&(e.search=d),p&&(e.operation=p),h&&(e.permissionState=h),e},[l,d,p,h]);(0,N.useEffect)(()=>{let e=!1;return c(!0),t({query:_}).then(t=>{e||(i(t.items.filter(AZ)),o(t.total),c(!1))}).catch(()=>c(!1)),()=>{e=!0}},[t,_]);let v=l+TZ<a,y=(0,N.useCallback)(()=>{n({query:{}}).then(e=>{let t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`audit-log-${new Date().toISOString().slice(0,10)}.json`,r.click(),URL.revokeObjectURL(n)}).catch(()=>{})},[n]);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,R.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`gap-2`,onClick:()=>e(`/`),children:[(0,R.jsx)(hF,{className:`size-4`}),`Back`]}),(0,R.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Audit Log`}),(0,R.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[a,` entries`]}),(0,R.jsx)(`div`,{className:`ml-auto`,children:(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`gap-2`,onClick:y,children:[(0,R.jsx)(PF,{className:`size-3`}),`Export JSON`]})})]}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsxs)(`div`,{className:`relative flex-1`,children:[(0,R.jsx)(aI,{className:`absolute left-2.5 top-2.5 size-4 text-muted-foreground`}),(0,R.jsx)(_Z,{placeholder:`Search operations and context...`,value:d,onChange:e=>{f(e.target.value),u(0)},className:`pl-9`})]}),(0,R.jsxs)(vZ,{value:p||`all`,onValueChange:e=>{m(e===`all`?``:e),u(0)},children:[(0,R.jsx)(bZ,{className:`w-48`,children:(0,R.jsx)(yZ,{placeholder:`Operation`})}),(0,R.jsxs)(xZ,{children:[(0,R.jsx)(SZ,{value:`all`,children:`All operations`}),(0,R.jsx)(SZ,{value:`getPullRequests`,children:`getPullRequests`}),(0,R.jsx)(SZ,{value:`getCallerIdentity`,children:`getCallerIdentity`}),(0,R.jsx)(SZ,{value:`createPullRequest`,children:`createPullRequest`}),(0,R.jsx)(SZ,{value:`listRepositories`,children:`listRepositories`}),(0,R.jsx)(SZ,{value:`listBranches`,children:`listBranches`}),(0,R.jsx)(SZ,{value:`getPullRequest`,children:`getPullRequest`}),(0,R.jsx)(SZ,{value:`getDifferences`,children:`getDifferences`}),(0,R.jsx)(SZ,{value:`getCommentsForPullRequest`,children:`getCommentsForPullRequest`})]})]}),(0,R.jsxs)(vZ,{value:h||`all`,onValueChange:e=>{g(e===`all`?``:e),u(0)},children:[(0,R.jsx)(bZ,{className:`w-40`,children:(0,R.jsx)(yZ,{placeholder:`State`})}),(0,R.jsxs)(xZ,{children:[(0,R.jsx)(SZ,{value:`all`,children:`All states`}),(0,R.jsx)(SZ,{value:`always_allowed`,children:`Always allowed`}),(0,R.jsx)(SZ,{value:`allowed`,children:`Allowed`}),(0,R.jsx)(SZ,{value:`denied`,children:`Denied`}),(0,R.jsx)(SZ,{value:`timed_out`,children:`Timed out`})]})]})]}),(0,R.jsx)(`div`,{className:`rounded-md border`,children:(0,R.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{className:`border-b bg-muted/50`,children:[(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Timestamp`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Operation`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Account`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`State`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-medium`,children:`Duration`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Context`})]})}),(0,R.jsxs)(`tbody`,{children:[s&&r.length===0&&(0,R.jsx)(`tr`,{children:(0,R.jsx)(`td`,{colSpan:6,className:`px-3 py-8 text-center text-muted-foreground`,children:`Loading...`})}),!s&&r.length===0&&(0,R.jsx)(`tr`,{children:(0,R.jsx)(`td`,{colSpan:6,className:`px-3 py-8 text-center text-muted-foreground`,children:`No entries`})}),r.map(e=>(0,R.jsxs)(`tr`,{className:`border-b last:border-0 hover:bg-muted/30`,children:[(0,R.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-muted-foreground whitespace-nowrap`,children:new Date(e.timestamp).toLocaleString()}),(0,R.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs`,children:e.operation}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-xs`,children:e.accountProfile||`-`}),(0,R.jsx)(`td`,{className:`px-3 py-2`,children:(0,R.jsx)(AX,{variant:jZ(e.permissionState),className:`text-xs`,children:e.permissionState})}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono text-xs text-muted-foreground`,children:e.durationMs==null?`-`:`${e.durationMs}ms`}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-xs text-muted-foreground truncate max-w-[200px]`,children:e.context})]},e.id))]})]})}),(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:a>0?`${l+1}–${Math.min(l+TZ,a)} of ${a}`:`0 entries`}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(Z,{variant:`outline`,size:`sm`,disabled:l===0,onClick:()=>u(Math.max(0,l-TZ)),children:`Previous`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,disabled:!v,onClick:()=>u(l+TZ),children:`Next`})]})]})]})}function NZ(e={}){let{filter:t,unreadOnly:n}=e,r=t!==void 0||n===!0,i=oO(WP).notifications,[a,o]=(0,N.useState)([]),[s,c]=(0,N.useState)(null),[l,u]=dO(CP,{mode:`promise`}),d=(0,N.useRef)(`${t}:${n}`),f=`${t}:${n}`;d.current!==f&&(d.current=f,o([]),c(null));let p=i?.items[0]?.id,m=(0,N.useRef)(p);!r&&m.current!==p&&(m.current=p,a.length>0&&o([]));let h=(0,N.useMemo)(()=>({limit:20,...t?{filter:t}:{},...n?{unreadOnly:1}:{}}),[t,n]);(0,N.useEffect)(()=>{if(!r)return;let e=!1;return u({query:h}).then(t=>{e||c({items:t.items,...t.nextCursor===void 0?{}:{nextCursor:t.nextCursor}})}).catch(()=>{}),()=>{e=!0}},[r,h,u]);let g=r?s:i,_=a.length>0?a[a.length-1].nextCursor:g?.nextCursor,v=_!==void 0,y=l.waiting,b=(0,N.useCallback)(async()=>{if(!(!v||y||_===void 0))try{let e=await u({query:{...h,cursor:_}}),t={items:e.items,...e.nextCursor===void 0?{}:{nextCursor:e.nextCursor}};o(e=>[...e,t])}catch{}},[v,y,_,u,h]);return{items:(0,N.useMemo)(()=>{let e=g?.items??[];return a.length===0?e:[...e,...a.flatMap(e=>e.items)]},[g?.items,a]),hasMore:v,isLoading:y,loadMore:b}}function PZ(e,t){let n=(0,N.useRef)(null),r=(0,N.useRef)(e);return r.current=e,(0,N.useCallback)(e=>{n.current?.disconnect(),n.current=null,e&&(n.current=new IntersectionObserver(e=>{e[0]?.isIntersecting&&r.current()},t),n.current.observe(e))},[JSON.stringify(t)])}function FZ(e){let[t,n]=(0,N.useState)(null),r=(0,N.useRef)(e);return r.current!==e&&(r.current=e,t!==null&&n(null)),[t??e,n]}function IZ(e){let[t,n]=(0,N.useState)(new Set),r=(0,N.useRef)(e);return r.current!==e&&(r.current=e,t.size>0&&n(new Set)),[t,(0,N.useCallback)(e=>{n(t=>new Set(t).add(e))},[]),(0,N.useCallback)(e=>{n(new Set(e))},[]),(0,N.useCallback)(e=>{n(t=>{let n=new Set(t);return n.delete(e),n})},[])]}function LZ({className:e,decorative:t=!0,orientation:n=`horizontal`,...r}){return(0,R.jsx)(lJ,{"data-slot":`separator`,decorative:t,orientation:n,className:tX(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}var RZ=OX(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 px-2 min-w-9`,sm:`h-8 px-1.5 min-w-8`,lg:`h-10 px-2.5 min-w-10`}},defaultVariants:{variant:`default`,size:`default`}}),zZ=N.createContext({size:`default`,variant:`default`,spacing:0});function BZ({children:e,className:t,size:n,spacing:r=0,variant:i,...a}){return(0,R.jsx)(gJ,{"data-slot":`toggle-group`,"data-variant":i,"data-size":n,"data-spacing":r,className:tX(`group/toggle-group flex w-fit items-center rounded-md`,t),...a,children:(0,R.jsx)(zZ,{value:{variant:i,size:n,spacing:r},children:e})})}function VZ({children:e,className:t,size:n,variant:r,...i}){let a=N.useContext(zZ);return(0,R.jsx)(TJ,{"data-slot":`toggle-group-item`,"data-variant":a.variant||r,"data-size":a.size||n,"data-spacing":a.spacing,className:tX(RZ({variant:a.variant||r,size:a.size||n}),`w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10`,`data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l`,t),...i,children:e})}var HZ=e=>/ExpiredToken|Unauthorized|AuthFailure|SSO|token|credentials|expired/i.test(e),UZ=e=>e===`system`||e===`prs`,WZ=e=>{switch(e){case`error`:return(0,R.jsx)(DF,{className:`size-4 text-destructive shrink-0`});case`warning`:return(0,R.jsx)(mI,{className:`size-4 text-yellow-500 shrink-0`});case`success`:return(0,R.jsx)(OF,{className:`size-4 text-green-500 shrink-0`});default:return(0,R.jsx)(UF,{className:`size-4 text-blue-500 shrink-0`})}},GZ=VC(aT(G({operation:H(U),profile:H(U),region:H(U),cause:H(U),error:H(U),message:H(U)}))),KZ=e=>jc(GZ(e),()=>B({cause:e})),qZ=e=>{let t=KZ(e);if(Dc(t))return e;let{cause:n,error:r,message:i,operation:a}=t.value,o=n??r??i,s=[];return a&&s.push(a),o&&s.push(o),s.length>0?s.join(` — `):e},JZ=e=>{let t=new Date(e),n=new Date().getTime()-t.getTime();return n<6e4?`just now`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleDateString()};function YZ(){let[e,t]=(0,N.useState)(void 0),[n,r]=(0,N.useState)(!0),[i,a]=(0,N.useState)(new Set),o=e=>a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),s=oO(WP),c=ar(),{hasMore:l,isLoading:u,items:d,loadMore:f}=NZ({filter:e,unreadOnly:n}),p=uO(wP),m=uO(TP),h=uO(EP),g=uO(vP),_=uO(yP),[v,y,b]=IZ(d[0]?.id),[x,S,,C]=IZ(d[0]?.id),w=PZ(()=>{l&&!u&&f()}),T=d.map(e=>x.has(e.id)?{...e,read:0}:v.has(e.id)?{...e,read:1}:e),E=s.unreadNotificationCount??0,D=e=>e.pullRequestId===``,O=e=>{e.read===0&&(y(e.id),C(e.id),p({payload:{id:e.id}})),D(e)?o(e.id):c(`/accounts/${encodeURIComponent(e.awsAccountId)}/prs/${e.pullRequestId}`)};return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Notifications`}),(0,R.jsx)(Z,{variant:`ghost`,size:`sm`,onClick:()=>c(`/`),children:`Back`})]}),(0,R.jsx)(LZ,{}),(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsxs)(BZ,{type:`single`,value:e??`all`,onValueChange:e=>t(UZ(e)?e:void 0),variant:`outline`,size:`sm`,children:[(0,R.jsx)(VZ,{value:`all`,children:`All`}),(0,R.jsx)(VZ,{value:`system`,children:`System`}),(0,R.jsx)(VZ,{value:`prs`,children:`PRs`})]}),(0,R.jsx)(Z,{variant:n?`secondary`:`ghost`,size:`sm`,onClick:()=>r(e=>!e),children:`Unread only`})]}),(0,R.jsxs)(`div`,{className:`space-y-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`div`,{className:`flex items-center gap-2`,children:E>0&&(0,R.jsxs)(AX,{variant:`destructive`,children:[E,` unread`]})}),E>0&&(0,R.jsxs)(Z,{variant:`ghost`,size:`sm`,onClick:()=>{b(T.map(e=>e.id)),h({})},children:[(0,R.jsx)(SF,{className:`size-3.5 mr-1`}),`Mark all read`]})]}),T.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground py-4 text-center`,children:`No notifications`}):(0,R.jsx)(`div`,{className:`divide-y rounded-md border`,children:T.map(e=>{let t=qZ(e.message),n=i.has(e.id);return(0,R.jsxs)(`div`,{className:`flex ${e.read===0?`border-l-2 border-l-blue-500`:``}`,children:[(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-2.5 cursor-pointer hover:bg-accent/50 transition-colors`,role:`button`,tabIndex:0,onClick:()=>O(e),onKeyDown:t=>{t.key===`Enter`&&O(e)},children:[WZ(e.type),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,R.jsx)(`span`,{className:`text-sm truncate ${e.read===0?`font-medium`:`text-muted-foreground`}`,children:e.title||(D(e)?e.type:`PR #${e.pullRequestId}`)}),(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:JZ(e.createdAt)})]}),!n&&(0,R.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground line-clamp-1`,children:t})]})]}),n&&(0,R.jsxs)(`div`,{className:`px-3 pb-2.5 ml-7 space-y-2 min-w-0 overflow-hidden`,children:[kc(KZ(e.message),{onNone:()=>(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground break-words`,children:e.message}),onSome:e=>(0,R.jsxs)(`div`,{className:`text-xs text-muted-foreground space-y-0.5`,children:[e.operation&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`operation:`}),` `,e.operation]}),e.profile&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`profile:`}),` `,e.profile]}),e.region&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`region:`}),` `,e.region]}),e.cause&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`cause:`}),` `,e.cause]}),e.error&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`error:`}),` `,e.error]}),e.message&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`message:`}),` `,e.message]})]})}),(0,R.jsxs)(MX,{children:[(0,R.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs`,onClick:()=>{e.read===0?(y(e.id),C(e.id),p({payload:{id:e.id}})):(S(e.id),m({payload:{id:e.id}}))},children:e.read===0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(JF,{className:`size-3`}),` Mark as read`]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(YF,{className:`size-3`}),` Mark as unread`]})}),D(e)&&HZ(e.message)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Z,{variant:`default`,size:`sm`,className:`h-7 px-2.5 text-xs`,onClick:()=>{try{let t=UC(ZM)(e.profile||e.title);g({payload:{profile:t}})}catch{}},children:`Login`}),(0,R.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2.5 text-xs`,onClick:()=>{_({})},children:`Logout`})]})]})]})]}),(0,R.jsx)(`button`,{className:`shrink-0 px-3 flex items-center hover:bg-accent/50 transition-colors border-l border-border`,onClick:()=>o(e.id),title:n?`Collapse`:`Expand`,children:(0,R.jsx)(TF,{className:`size-4 text-muted-foreground transition-transform ${n?`rotate-90`:``}`})})]},e.id)})}),(0,R.jsx)(`div`,{ref:w,className:`h-1`}),u&&(0,R.jsx)(`div`,{className:`flex justify-center py-2`,children:(0,R.jsx)(GF,{className:`size-4 animate-spin text-muted-foreground`})})]})]})}var XZ=864e5,ZZ=`green`,QZ=`yellow`,$Z=`red`,eQ=e=>Math.round(e*10)/10,tQ=(e,t,n)=>Math.min(t,Math.max(e,n)),nQ=(e,t)=>Math.max(0,(t.getTime()-e.getTime())/XZ),rQ=e=>/^\w+(\([^)]+\))?:/.test(e)||/^[A-Z]+-\d+:/.test(e),iQ=(e,t)=>{let n=nQ(e.lastModifiedDate,t),r=nQ(e.creationDate,t),i=e.commentCount??0,a=rQ(e.title),o=!!e.description&&e.description.trim().length>0,s=-(n*1),c=-(r*.5),l=i*1,u=e.isApproved?2:0,d=e.isMergeable?0:-3,f=a?.5:0,p=o?.5:0;return B({total:eQ(tQ(0,10,10+s+c+l+u+d+f+p)),breakdown:[{label:`Base`,value:10},{label:`Time decay`,value:eQ(s)},{label:`Age`,value:eQ(c)},{label:`Comments`,value:eQ(l)},{label:`Approval`,value:u},{label:`Conflicts`,value:d},{label:`Scope`,value:f},{label:`Description`,value:p}],categories:[{label:`Activity`,description:`-1 per day since last update (${Math.round(n)}d ago)`,value:eQ(s),...n<2?{status:`positive`,statusLabel:`ACTIVE`}:n<=7?{status:`neutral`,statusLabel:`SLOWING`}:{status:`negative`,statusLabel:`STALE`}},{label:`Age`,description:`-0.5 per day since creation (${Math.round(r)}d old)`,value:eQ(c),...r<3?{status:`positive`,statusLabel:`FRESH`}:r<=14?{status:`neutral`,statusLabel:`AGING`}:{status:`negative`,statusLabel:`OLD`}},{label:`Engagement`,description:`+1 per comment (${i} comments)`,value:eQ(l),...i>=3?{status:`positive`,statusLabel:`ACTIVE`}:i>=1?{status:`neutral`,statusLabel:`QUIET`}:{status:`negative`,statusLabel:`SILENT`}},{label:`Approval`,description:e.isApproved?`+2 bonus for approval`:`No approval yet (+2 when approved)`,value:u,...e.isApproved?{status:`positive`,statusLabel:`APPROVED`}:{status:`neutral`,statusLabel:`PENDING`}},{label:`Mergeable`,description:e.isMergeable?`No merge conflicts`:`-3 penalty for merge conflicts`,value:d,...e.isMergeable?{status:`positive`,statusLabel:`CLEAN`}:{status:`negative`,statusLabel:`CONFLICT`}},{label:`Scope`,description:a?`+0.5 bonus — conventional commit or ticket prefix detected`:`No scope prefix found (e.g. feat(auth): or JIRA-123:)`,value:f,...a?{status:`positive`,statusLabel:`DETECTED`}:{status:`negative`,statusLabel:`MISSING`}},{label:`Description`,description:o?`+0.5 bonus — PR description provided`:`No PR description provided`,value:p,...o?{status:`positive`,statusLabel:`PROVIDED`}:{status:`negative`,statusLabel:`MISSING`}}]})},aQ=e=>ZO(e).pipe(QO(e=>e>=7,()=>ZZ),QO(e=>e>=4,()=>QZ),$O(()=>$Z));function oQ(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var sQ=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cQ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lQ={};function uQ(e,t){return((t||lQ).jsx?cQ:sQ).test(e)}var dQ=/[ \t\n\f\r]/g;function fQ(e){return typeof e==`object`?e.type===`text`&&pQ(e.value):pQ(e)}function pQ(e){return e.replace(dQ,``)===``}var mQ=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};mQ.prototype.normal={},mQ.prototype.property={},mQ.prototype.space=void 0;function hQ(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new mQ(n,r,t)}function gQ(e){return e.toLowerCase()}var _Q=class{constructor(e,t){this.attribute=t,this.property=e}};_Q.prototype.attribute=``,_Q.prototype.booleanish=!1,_Q.prototype.boolean=!1,_Q.prototype.commaOrSpaceSeparated=!1,_Q.prototype.commaSeparated=!1,_Q.prototype.defined=!1,_Q.prototype.mustUseProperty=!1,_Q.prototype.number=!1,_Q.prototype.overloadedBoolean=!1,_Q.prototype.property=``,_Q.prototype.spaceSeparated=!1,_Q.prototype.space=void 0;var vQ=s({boolean:()=>bQ,booleanish:()=>xQ,commaOrSpaceSeparated:()=>TQ,commaSeparated:()=>wQ,number:()=>Q,overloadedBoolean:()=>SQ,spaceSeparated:()=>CQ}),yQ=0,bQ=EQ(),xQ=EQ(),SQ=EQ(),Q=EQ(),CQ=EQ(),wQ=EQ(),TQ=EQ();function EQ(){return 2**++yQ}var DQ=Object.keys(vQ),OQ=class extends _Q{constructor(e,t,n,r){let i=-1;if(super(e,t),kQ(this,`space`,r),typeof n==`number`)for(;++i<DQ.length;){let e=DQ[i];kQ(this,DQ[i],(n&vQ[e])===vQ[e])}}};OQ.prototype.defined=!0;function kQ(e,t,n){n&&(e[t]=n)}function AQ(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new OQ(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gQ(r)]=r,n[gQ(a.attribute)]=r}return new mQ(t,n,e.space)}var jQ=AQ({properties:{ariaActiveDescendant:null,ariaAtomic:xQ,ariaAutoComplete:null,ariaBusy:xQ,ariaChecked:xQ,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:CQ,ariaCurrent:null,ariaDescribedBy:CQ,ariaDetails:null,ariaDisabled:xQ,ariaDropEffect:CQ,ariaErrorMessage:null,ariaExpanded:xQ,ariaFlowTo:CQ,ariaGrabbed:xQ,ariaHasPopup:null,ariaHidden:xQ,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:CQ,ariaLevel:Q,ariaLive:null,ariaModal:xQ,ariaMultiLine:xQ,ariaMultiSelectable:xQ,ariaOrientation:null,ariaOwns:CQ,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:xQ,ariaReadOnly:xQ,ariaRelevant:null,ariaRequired:xQ,ariaRoleDescription:CQ,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:xQ,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function MQ(e,t){return t in e?e[t]:t}function NQ(e,t){return MQ(e,t.toLowerCase())}var PQ=AQ({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:wQ,acceptCharset:CQ,accessKey:CQ,action:null,allow:null,allowFullScreen:bQ,allowPaymentRequest:bQ,allowUserMedia:bQ,alpha:bQ,alt:null,as:null,async:bQ,autoCapitalize:null,autoComplete:CQ,autoFocus:bQ,autoPlay:bQ,blocking:CQ,capture:null,charSet:null,checked:bQ,cite:null,className:CQ,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:xQ,controls:bQ,controlsList:CQ,coords:Q|wQ,crossOrigin:null,data:null,dateTime:null,decoding:null,default:bQ,defer:bQ,dir:null,dirName:null,disabled:bQ,download:SQ,draggable:xQ,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:bQ,formTarget:null,headers:CQ,height:Q,hidden:SQ,high:Q,href:null,hrefLang:null,htmlFor:CQ,httpEquiv:CQ,id:null,imageSizes:null,imageSrcSet:null,inert:bQ,inputMode:null,integrity:null,is:null,isMap:bQ,itemId:null,itemProp:CQ,itemRef:CQ,itemScope:bQ,itemType:CQ,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:bQ,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:bQ,muted:bQ,name:null,nonce:null,noModule:bQ,noValidate:bQ,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:bQ,optimum:Q,pattern:null,ping:CQ,placeholder:null,playsInline:bQ,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:bQ,referrerPolicy:null,rel:CQ,required:bQ,reversed:bQ,rows:Q,rowSpan:Q,sandbox:CQ,scope:null,scoped:bQ,seamless:bQ,selected:bQ,shadowRootClonable:bQ,shadowRootCustomElementRegistry:bQ,shadowRootDelegatesFocus:bQ,shadowRootMode:null,shadowRootSerializable:bQ,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:xQ,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:bQ,useMap:null,value:xQ,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:CQ,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:bQ,declare:bQ,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:bQ,noHref:bQ,noShade:bQ,noWrap:bQ,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:xQ,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:bQ,disablePictureInPicture:bQ,disableRemotePlayback:bQ,exportParts:wQ,part:CQ,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:NQ}),FQ=AQ({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:TQ,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:CQ,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:bQ,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:wQ,g2:wQ,glyphName:wQ,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:TQ,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:CQ,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:TQ,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:TQ,rev:TQ,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:TQ,requiredFeatures:TQ,requiredFonts:TQ,requiredFormats:TQ,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:TQ,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:TQ,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:TQ,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:MQ}),IQ=AQ({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),LQ=AQ({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:NQ}),RQ=AQ({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),zQ={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},BQ=/[A-Z]/g,VQ=/-[a-z]/g,HQ=/^data[-\w.:]+$/i;function UQ(e,t){let n=gQ(t),r=t,i=_Q;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&HQ.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(VQ,GQ);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!VQ.test(e)){let n=e.replace(BQ,WQ);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=OQ}return new i(r,t)}function WQ(e){return`-`+e.toLowerCase()}function GQ(e){return e.charAt(1).toUpperCase()}var KQ=hQ([jQ,PQ,IQ,LQ,RQ],`html`),qQ=hQ([jQ,FQ,IQ,LQ,RQ],`svg`);function JQ(e){return e.join(` `).trim()}var YQ=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
61
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(!(e.charAt(0)!=`/`||e.charAt(1)!=`*`)){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),XQ=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(YQ());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),ZQ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),QQ=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(XQ()),r=ZQ();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),$Q=t$(`end`),e$=t$(`start`);function t$(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function n$(e){let t=e$(e),n=$Q(e);if(t&&n)return{start:t,end:n}}function r$(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?a$(e.position):`start`in e||`end`in e?a$(e):`line`in e||`column`in e?i$(e):``}function i$(e){return o$(e&&e.line)+`:`+o$(e&&e.column)}function a$(e){return i$(e&&e.start)+`-`+i$(e&&e.end)}function o$(e){return e&&typeof e==`number`?e:1}var s$=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=r$(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};s$.prototype.file=``,s$.prototype.name=``,s$.prototype.reason=``,s$.prototype.message=``,s$.prototype.stack=``,s$.prototype.column=void 0,s$.prototype.line=void 0,s$.prototype.ancestors=void 0,s$.prototype.cause=void 0,s$.prototype.fatal=void 0,s$.prototype.place=void 0,s$.prototype.ruleId=void 0,s$.prototype.source=void 0;var c$=l(QQ(),1),l$={}.hasOwnProperty,u$=new Map,d$=/[A-Z]/g,f$=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),p$=new Set([`td`,`th`]);function m$(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=T$(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=w$(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?qQ:KQ,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=h$(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function h$(e,t,n){if(t.type===`element`)return g$(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return _$(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return y$(e,t,n);if(t.type===`mdxjsEsm`)return v$(e,t);if(t.type===`root`)return b$(e,t,n);if(t.type===`text`)return x$(e,t)}function g$(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=qQ,e.schema=i),e.ancestors.push(t);let a=j$(e,t.tagName,!1),o=E$(e,t),s=O$(e,t);return f$.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!fQ(e)})),S$(e,o,a,t),C$(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function _$(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}M$(e,t.position)}function v$(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);M$(e,t.position)}function y$(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=qQ,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:j$(e,t.name,!0),o=D$(e,t),s=O$(e,t);return S$(e,o,a,t),C$(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function b$(e,t,n){let r={};return C$(r,O$(e,t)),e.create(t,e.Fragment,r,n)}function x$(e,t){return t.value}function S$(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function C$(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function w$(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function T$(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=e$(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function E$(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&l$.call(t.properties,i)){let a=k$(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&p$.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function D$(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else M$(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else M$(e,t.position);else a=r.value===null||r.value;n[i]=a}return n}function O$(e,t){let n=[],r=-1,i=e.passKeys?new Map:u$;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=h$(e,a,o);s!==void 0&&n.push(s)}return n}function k$(e,t,n){let r=UQ(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?oQ(n):JQ(n)),r.property===`style`){let t=typeof n==`object`?n:A$(e,String(n));return e.stylePropertyNameCase===`css`&&(t=N$(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?zQ[r.property]||r.property:r.attribute,n]}}function A$(e,t){try{return(0,c$.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new s$("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function j$(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=uQ(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=uQ(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return l$.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);M$(e)}function M$(e,t){let n=new s$("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function N$(e){let t={},n;for(n in e)l$.call(e,n)&&(t[P$(n)]=e[n]);return t}function P$(e){let t=e.replace(d$,F$);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function F$(e){return`-`+e.toLowerCase()}var I$={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},L$={};function R$(e,t){let n=t||L$;return z$(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function z$(e,t,n){if(V$(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return B$(e.children,t,n)}return Array.isArray(e)?B$(e,t,n):``}function B$(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=z$(e[i],t,n);return r.join(``)}function V$(e){return!!(e&&typeof e==`object`)}var H$=document.createElement(`i`);function U$(e){let t=`&`+e+`;`;H$.innerHTML=t;let n=H$.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function W$(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function G$(e,t){return e.length>0?(W$(e,e.length,0,t),e):t}var K$={}.hasOwnProperty;function q$(e){let t={},n=-1;for(;++n<e.length;)J$(t,e[n]);return t}function J$(e,t){let n;for(n in t){let r=(K$.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){K$.call(r,a)||(r[a]=[]);let e=i[a];Y$(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Y$(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);W$(e,0,0,r)}function X$(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Z$(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Q$=l1(/[A-Za-z]/),$$=l1(/[\dA-Za-z]/),e1=l1(/[#-'*+\--9=?A-Z^-~]/);function t1(e){return e!==null&&(e<32||e===127)}var n1=l1(/\d/),r1=l1(/[\dA-Fa-f]/),i1=l1(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function a1(e){return e!==null&&(e<0||e===32)}function o1(e){return e===-2||e===-1||e===32}var s1=l1(/\p{P}|\p{S}/u),c1=l1(/\s/);function l1(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function u1(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&$$(e.charCodeAt(n+1))&&$$(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function d1(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return o1(r)?(e.enter(n),s(r)):t(r)}function s(r){return o1(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var f1={tokenize:p1};function p1(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),d1(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var m1={tokenize:g1},h1={tokenize:_1};function g1(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return W$(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(h1,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(h1,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;W$(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function _1(e,t,n){return d1(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function v1(e){if(e===null||a1(e)||c1(e))return 1;if(s1(e))return 2}function y1(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var b1={name:`attention`,resolveAll:x1,tokenize:S1};function x1(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};C1(d,-c),C1(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=G$(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=G$(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=G$(l,y1(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=G$(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=G$(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,W$(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function S1(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=v1(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=v1(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function C1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var w1={name:`autolink`,tokenize:T1};function T1(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Q$(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||$$(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||$$(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||t1(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):e1(t)?(e.consume(t),l):n(t)}function u(e){return $$(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||$$(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var E1={partial:!0,tokenize:D1};function D1(e,t,n){return r;function r(t){return o1(t)?d1(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var O1={continuation:{tokenize:A1},exit:j1,name:`blockQuote`,tokenize:k1};function k1(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return o1(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function A1(e,t,n){let r=this;return i;function i(t){return o1(t)?d1(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(O1,t,n)(r)}}function j1(e){e.exit(`blockQuote`)}var M1={name:`characterEscape`,tokenize:N1};function N1(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return i1(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var P1={name:`characterReference`,tokenize:F1};function F1(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=$$,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=r1,u):(e.enter(`characterReferenceValue`),a=7,o=n1,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===$$&&!U$(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var I1={partial:!0,tokenize:z1},L1={concrete:!0,name:`codeFenced`,tokenize:R1};function R1(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),o1(t)?d1(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(I1,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):o1(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d1(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&o1(t)?d1(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(I1,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),o1(t)?d1(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),o1(t)?d1(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function z1(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var B1={name:`codeIndented`,tokenize:H1},V1={partial:!0,tokenize:U1};function H1(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),d1(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(V1,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function U1(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):d1(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var W1={name:`codeText`,previous:K1,resolve:G1,tokenize:q1};function G1(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function K1(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function q1(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var J1=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Y1(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Y1(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Y1(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Y1(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Y1(this.left,t.reverse())}}};function Y1(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function X1(e){let t={},n=-1,r,i,a,o,s,c,l,u=new J1(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Z1(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return W$(e,0,1/0,u.slice(0)),!l}function Z1(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Q1={resolve:e0,tokenize:t0},$1={partial:!0,tokenize:n0};function e0(e){return X1(e),e}function t0(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check($1,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function n0(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),d1(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function r0(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||t1(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||a1(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||t1(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function i0(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!o1(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function a0(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),d1(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function o0(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):o1(i)?d1(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var s0={name:`definition`,tokenize:l0},c0={partial:!0,tokenize:u0};function l0(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return i0.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Z$(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return a1(t)?o0(e,l)(t):l(t)}function l(t){return r0(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(c0,d,d)(t)}function d(t){return o1(t)?d1(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function u0(e,t,n){return r;function r(t){return a1(t)?o0(e,i)(t):n(t)}function i(t){return a0(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return o1(t)?d1(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var d0={name:`hardBreakEscape`,tokenize:f0};function f0(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var p0={name:`headingAtx`,resolve:m0,tokenize:h0};function m0(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},W$(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function h0(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||a1(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):o1(n)?d1(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||a1(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var g0=`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(`.`),_0=[`pre`,`script`,`style`,`textarea`],v0={concrete:!0,name:`htmlFlow`,resolveTo:x0,tokenize:S0},y0={partial:!0,tokenize:w0},b0={partial:!0,tokenize:C0};function x0(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function S0(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):Q$(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Q$(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Q$(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||a1(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&_0.includes(l)?(i=1,r.interrupt?t(s):O(s)):g0.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||$$(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return o1(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Q$(t)?(e.consume(t),b):o1(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||$$(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):o1(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):o1(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||a1(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||o1(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):o1(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),P):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(y0,te,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(b0,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return _0.includes(n)?(e.consume(t),I):O(t)}return Q$(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function P(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||$(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function C0(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function w0(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(E1,t,n)}}var T0={name:`htmlText`,tokenize:E0};function E0(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Q$(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Q$(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):$(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return Q$(t)?(e.consume(t),S):n(t)}function S(t){return t===45||$$(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,N(t)):o1(t)?(e.consume(t),C):M(t)}function w(t){return t===45||$$(t)?(e.consume(t),w):t===47||t===62||a1(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Q$(t)?(e.consume(t),E):$(t)?(o=T,N(t)):o1(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||$$(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,N(t)):o1(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,N(t)):o1(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):$(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||a1(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||a1(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return o1(t)?d1(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var D0={name:`labelEnd`,resolveAll:j0,resolveTo:M0,tokenize:N0},O0={tokenize:P0},k0={tokenize:F0},A0={tokenize:I0};function j0(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&W$(e,0,e.length,n),e}function M0(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=G$(s,e.slice(a+1,a+r+3)),s=G$(s,[[`enter`,u,t]]),s=G$(s,y1(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=G$(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=G$(s,e.slice(o+1)),s=G$(s,[[`exit`,c,t]]),W$(e,a,e.length,s),e}function N0(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Z$(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(O0,u,o?u:d)(t):t===91?e.attempt(k0,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(A0,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function P0(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return a1(t)?o0(e,a)(t):a(t)}function a(t){return t===41?u(t):r0(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return a1(t)?o0(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?a0(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return a1(t)?o0(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function F0(e,t,n){let r=this;return i;function i(t){return i0.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Z$(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function I0(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var L0={name:`labelStartImage`,resolveAll:D0.resolveAll,tokenize:R0};function R0(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var z0={name:`labelStartLink`,resolveAll:D0.resolveAll,tokenize:B0};function B0(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var V0={name:`lineEnding`,tokenize:H0};function H0(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),d1(e,t,`linePrefix`)}}var U0={name:`thematicBreak`,tokenize:W0};function W0(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),o1(t)?d1(e,s,`whitespace`)(t):s(t))}}var G0={continuation:{tokenize:Y0},exit:Z0,name:`list`,tokenize:J0},K0={partial:!0,tokenize:Q0},q0={partial:!0,tokenize:X0};function J0(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:n1(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(U0,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return n1(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(E1,r.interrupt?n:u,e.attempt(K0,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return o1(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Y0(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(E1,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,d1(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!o1(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(q0,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,d1(e,e.attempt(G0,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function X0(e,t,n){let r=this;return d1(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Z0(e){e.exit(this.containerState.type)}function Q0(e,t,n){let r=this;return d1(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!o1(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var $0={name:`setextUnderline`,resolveTo:e2,tokenize:t2};function e2(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function t2(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),o1(t)?d1(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var n2={tokenize:r2};function r2(e){let t=this,n=e.attempt(E1,r,e.attempt(this.parser.constructs.flowInitial,i,d1(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Q1,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var i2={resolveAll:c2()},a2=s2(`string`),o2=s2(`text`);function s2(e){return{resolveAll:c2(e===`text`?l2:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function c2(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function l2(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var u2=s({attentionMarkers:()=>v2,contentInitial:()=>f2,disable:()=>y2,document:()=>d2,flow:()=>m2,flowInitial:()=>p2,insideSpan:()=>_2,string:()=>h2,text:()=>g2}),d2={42:G0,43:G0,45:G0,48:G0,49:G0,50:G0,51:G0,52:G0,53:G0,54:G0,55:G0,56:G0,57:G0,62:O1},f2={91:s0},p2={[-2]:B1,[-1]:B1,32:B1},m2={35:p0,42:U0,45:[$0,U0],60:v0,61:$0,95:U0,96:L1,126:L1},h2={38:P1,92:M1},g2={[-5]:V0,[-4]:V0,[-3]:V0,33:L0,38:P1,42:b1,60:[w1,T0],91:z0,92:[d0,M1],93:D0,95:b1,96:W1},_2={null:[b1,i2]},v2={null:[42,95]},y2={null:[]};function b2(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=G$(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=y1(a,l.events,l),l.events):[]}function f(e,t){return S2(p(e),t)}function p(e){return x2(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&W$(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function x2(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function S2(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
62
|
+
`;break;case-3:o=`\r
|
|
63
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function C2(e){let t={constructs:q$([u2,...(e||{}).extensions||[]]),content:n(f1),defined:[],document:n(m1),flow:n(n2),lazy:{},string:n(a2),text:n(o2)};return t;function n(e){return n;function n(n){return b2(t,e,n)}}}function w2(e){for(;!X1(e););return e}var T2=/[\0\t\n\r]/g;function E2(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(T2.lastIndex=u,c=T2.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var D2=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function O2(e){return e.replace(D2,k2)}function k2(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return X$(n.slice(t?2:1),t?16:10)}return U$(n)||e}var A2={}.hasOwnProperty;function j2(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),M2(n)(w2(C2(n).document().write(E2()(e,t,!0))))}function M2(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(_e),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(pe),blockQuote:a(ce),characterEscape:T,characterReference:T,codeFenced:a(le),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(le,o),codeText:a(ue,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(fe),hardBreakEscape:a(me),hardBreakTrailing:a(me),htmlFlow:a(he,o),htmlFlowData:T,htmlText:a(he,o),htmlTextData:T,image:a(ge),label:o,link:a(_e),listItem:a(ye),listItemValue:f,listOrdered:a(ve,d),listUnordered:a(ve),paragraph:a(be),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(pe),strong:a(xe),thematicBreak:a(Ce)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:L,characterReference:ae,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:P,labelText:ee,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:F,resourceTitleString:I,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};P2(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];A2.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||I2).call(a,void 0,e[0])}for(r.position={start:N2(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:N2(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:N2(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||I2).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+r$({start:e.start,end:e.end})+`): it’s not open`);n.position.end=N2(e.end)}function u(){return R$(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Z$(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Se(),n.position={start:N2(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=N2(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=N2(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=O2(t),n.identifier=Z$(t).toLowerCase()}function P(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Z$(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ie(e){this.data.characterReferenceType=e.type}function L(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=X$(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=U$(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=N2(e.end)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[]}}function le(){return{type:`code`,lang:null,meta:null,value:``}}function ue(){return{type:`inlineCode`,value:``}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function fe(){return{type:`emphasis`,children:[]}}function pe(){return{type:`heading`,depth:0,children:[]}}function me(){return{type:`break`}}function he(){return{type:`html`,value:``}}function ge(){return{type:`image`,title:null,url:``,alt:null}}function _e(){return{type:`link`,title:null,url:``,children:[]}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function be(){return{type:`paragraph`,children:[]}}function xe(){return{type:`strong`,children:[]}}function Se(){return{type:`text`,value:``}}function Ce(){return{type:`thematicBreak`}}}function N2(e){return{line:e.line,column:e.column,offset:e.offset}}function P2(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?P2(e,r):F2(e,r)}}function F2(e,t){let n;for(n in t)if(A2.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function I2(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+r$({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+r$({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+r$({start:t.start,end:t.end})+`) is still open`)}function L2(e){let t=this;t.parser=n;function n(n){return j2(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function R2(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function z2(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
64
|
+
`}]}function B2(e,t){let n=t.value?t.value+`
|
|
65
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function V2(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function H2(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function U2(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=u1(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function W2(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function G2(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function K2(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function q2(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return K2(e,t);let i={src:u1(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function J2(e,t){let n={src:u1(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Y2(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function X2(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return K2(e,t);let i={href:u1(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Z2(e,t){let n={href:u1(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Q2(e,t,n){let r=e.all(t),i=n?$2(n):e4(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
66
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
67
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function $2(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=e4(n[r])}return t}function e4(e){return e.spread??e.children.length>1}function t4(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function n4(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function r4(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function i4(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function a4(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=e$(t.children[1]),o=$Q(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function o4(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function s4(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var c4=9,l4=32;function u4(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(d4(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(d4(t.slice(i),i>0,!1)),a.join(``)}function d4(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===c4||t===l4;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===c4||t===l4;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function f4(e,t){let n={type:`text`,value:u4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function p4(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var m4={blockquote:R2,break:z2,code:B2,delete:V2,emphasis:H2,footnoteReference:U2,heading:W2,html:G2,imageReference:q2,image:J2,inlineCode:Y2,linkReference:X2,link:Z2,listItem:Q2,list:t4,paragraph:n4,root:r4,strong:i4,table:a4,tableCell:s4,tableRow:o4,text:f4,thematicBreak:p4,toml:h4,yaml:h4,definition:h4,footnoteDefinition:h4};function h4(){}var g4=typeof self==`object`?self:globalThis,_4=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new g4[e](t)},v4=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof g4[e]==`function`?_4(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(_4(a,o),i)};return r},y4=e=>v4(new Map,e)(0),b4=``,{toString:x4}={},{keys:S4}=Object,C4=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=x4.call(e).slice(8,-1);switch(n){case`Array`:return[1,b4];case`Object`:return[2,b4];case`Date`:return[3,b4];case`RegExp`:return[4,b4];case`Map`:return[5,b4];case`Set`:return[6,b4];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},w4=([e,t])=>e===0&&(t===`function`||t===`symbol`),T4=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=C4(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of S4(r))(e||!w4(C4(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?b4:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(w4(C4(n))||w4(C4(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!w4(C4(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},E4=(e,{json:t,lossy:n}={})=>{let r=[];return T4(!(t||n),!!t,new Map,r)(e),r},D4=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?y4(E4(e,t)):structuredClone(e):(e,t)=>y4(E4(e,t));function O4(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function k4(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function A4(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||O4,r=e.options.footnoteBackLabel||k4,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=u1(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...D4(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
68
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
69
|
+
`}]}}var j4=(function(e){if(e==null)return I4;if(typeof e==`function`)return F4(e);if(typeof e==`object`)return Array.isArray(e)?M4(e):N4(e);if(typeof e==`string`)return P4(e);throw Error(`Expected function, string, or object as test`)});function M4(e){let t=[],n=-1;for(;++n<e.length;)t[n]=j4(e[n]);return F4(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function N4(e){let t=e;return F4(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function P4(e){return F4(t);function t(t){return t&&t.type===e}}function F4(e){return t;function t(t,n,r){return!!(L4(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function I4(){return!0}function L4(e){return typeof e==`object`&&!!e&&`type`in e}function R4(e){return e}var z4=[];function B4(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=j4(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+R4(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=z4,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=V4(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function V4(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?z4:[e]}function H4(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),B4(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var U4={}.hasOwnProperty,W4={};function G4(e,t){let n=t||W4,r=new Map,i=new Map,a={all:s,applyData:q4,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...m4,...n.handlers},one:o,options:n,patch:K4,wrap:Y4};return H4(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(U4.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=D4(n);return r.children=a.all(e),r}return D4(e)}return(a.options.unknownHandler||J4)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=X4(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=X4(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function K4(e,t){e.position&&(t.position=n$(e))}function q4(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,D4(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function J4(e,t){let n=t.data||{},r=`value`in t&&!(U4.call(n,`hProperties`)||U4.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Y4(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
70
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
71
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
72
|
+
`}),n}function X4(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Z4(e,t){let n=G4(e,t),r=n.one(e,void 0),i=A4(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
73
|
+
`},i)),a}function Q4(e,t){return e&&`run`in e?async function(n,r){let i=Z4(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Z4(n,{file:r,...e||t})}}function $4(e){if(e)throw e}var e3=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function t3(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function n3(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?r3(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function r3(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var i3={basename:a3,dirname:o3,extname:s3,join:c3,sep:`/`};function a3(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);d3(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function o3(e){if(d3(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function s3(e){d3(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function c3(...e){let t=-1,n;for(;++t<e.length;)d3(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:l3(n)}function l3(e){d3(e);let t=e.codePointAt(0)===47,n=u3(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function u3(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function d3(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var f3={cwd:p3};function p3(){return`/`}function m3(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function h3(e){if(typeof e==`string`)e=new URL(e);else if(!m3(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return g3(e)}function g3(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var _3=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],v3=class{constructor(e){let t;t=e?m3(e)?{path:e}:typeof e==`string`||S3(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:f3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<_3.length;){let e=_3[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)_3.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?i3.basename(this.path):void 0}set basename(e){b3(e,`basename`),y3(e,`basename`),this.path=i3.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?i3.dirname(this.path):void 0}set dirname(e){x3(this.basename,`dirname`),this.path=i3.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?i3.extname(this.path):void 0}set extname(e){if(y3(e,`extname`),x3(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=i3.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){m3(e)&&(e=h3(e)),b3(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?i3.basename(this.path,this.extname):void 0}set stem(e){b3(e,`stem`),y3(e,`stem`),this.path=i3.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new s$(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function y3(e,t){if(e&&e.includes(i3.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+i3.sep+"`")}function b3(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function x3(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function S3(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var C3=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),w3=l(e3(),1),T3={}.hasOwnProperty,E3=new class e extends C3{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=n3()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,w3.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(k3(`data`,this.frozen),this.namespace[e]=t,this):T3.call(this.namespace,e)&&this.namespace[e]||void 0:e?(k3(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=M3(e),n=this.parser||this.Parser;return D3(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),D3(`process`,this.parser||this.Parser),O3(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=M3(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);P3(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),D3(`processSync`,this.parser||this.Parser),O3(`processSync`,this.compiler||this.Compiler),this.process(e,r),j3(`processSync`,`process`,t),n;function r(e,r){t=!0,$4(e),n=r}}run(e,t,n){A3(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=M3(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),j3(`runSync`,`run`,n),r;function i(e,t){$4(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=M3(t),r=this.compiler||this.Compiler;return O3(`stringify`,r),A3(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(k3(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,w3.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];t3(o)&&t3(r)&&(r=(0,w3.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function D3(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function O3(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function k3(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function A3(e){if(!t3(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function j3(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function M3(e){return N3(e)?e:new v3(e)}function N3(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function P3(e){return typeof e==`string`||F3(e)}function F3(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var I3=[],L3={allowDangerousHtml:!0},R3=/^(https?|ircs?|mailto|xmpp)$/i,z3=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function B3(e){let t=V3(e),n=H3(e);return U3(t.runSync(t.parse(n),n),e)}function V3(e){let t=e.rehypePlugins||I3,n=e.remarkPlugins||I3,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...L3}:L3;return E3().use(L2).use(n).use(Q4,r).use(t)}function H3(e){let t=e.children||``,n=new v3;return typeof t==`string`?n.value=t:``+t,n}function U3(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||W3;for(let e of z3)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return H4(e,l),m$(e,{Fragment:R.Fragment,components:i,ignoreInvalidStyle:!0,jsx:R.jsx,jsxs:R.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in I$)if(Object.hasOwn(I$,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=I$[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function W3(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||R3.test(e.slice(0,t))?e:``}var G3=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],K3={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...G3,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...G3],h2:[[`className`,`sr-only`]],img:[...G3,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...G3,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...G3],table:[...G3],ul:[...G3,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},q3={}.hasOwnProperty;function J3(e,t){let n={type:`root`,children:[]},r=Y3({schema:t?{...K3,...t}:K3,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Y3(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return X3(e,n);case`doctype`:return Z3(e,n);case`element`:return Q3(e,n);case`root`:return $3(e,n);case`text`:return e6(e,n);default:}}}function X3(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return s6(r,t),r}}function Z3(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return s6(e,t),e}}function Q3(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=t6(e,t.children),i=n6(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&q3.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return s6(o,t),o}function $3(e,t){let n={type:`root`,children:t6(e,t.children)};return s6(n,t),n}function e6(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return s6(n,t),n}function t6(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=Y3(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function n6(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&q3.call(r,n)?r[n]:void 0,o=r&&q3.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(q3.call(s,l)){let t=s[l],n=r6(e,c6(a,l),l,t);n??=r6(e,c6(o,l),l,t),n!=null&&(c[l]=n)}if(i&&q3.call(i,n)){let e=i[n];for(l in e)q3.call(e,l)&&!q3.call(c,l)&&(c[l]=e[l])}return c}function r6(e,t,n,r){return t?Array.isArray(r)?i6(e,t,n,r):a6(e,t,n,r):void 0}function i6(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=a6(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function a6(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&o6(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function o6(e,t,n){let r=e.schema.protocols&&q3.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function s6(e,t){let n=n$(t);t.data&&(e.data=D4(t.data)),n&&(e.position=n)}function c6(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function l6(e){return function(t){return J3(t,e)}}function u6(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function d6(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function f6(e,t,n){let r=j4((n||{}).ignore||[]),i=p6(t),a=-1;for(;++a<i.length;)B4(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function p6(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([m6(e[0]),h6(e[1])])}return t}function m6(e){return typeof e==`string`?new RegExp(d6(e),`g`):e}function h6(e){return typeof e==`function`?e:function(){return e}}var g6=`phrasing`,_6=[`autolink`,`link`,`image`,`label`];function v6(){return{transforms:[E6],enter:{literalAutolink:b6,literalAutolinkEmail:x6,literalAutolinkHttp:x6,literalAutolinkWww:x6},exit:{literalAutolink:T6,literalAutolinkEmail:w6,literalAutolinkHttp:S6,literalAutolinkWww:C6}}}function y6(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:g6,notInConstruct:_6},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:g6,notInConstruct:_6},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:g6,notInConstruct:_6}]}}function b6(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function x6(e){this.config.enter.autolinkProtocol.call(this,e)}function S6(e){this.config.exit.autolinkProtocol.call(this,e)}function C6(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function w6(e){this.config.exit.autolinkEmail.call(this,e)}function T6(e){this.exit(e)}function E6(e){f6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,D6],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,O6]],{ignore:[`link`,`linkReference`]})}function D6(e,t,n,r,i){let a=``;if(!j6(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!k6(n)))return!1;let o=A6(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function O6(e,t,n,r){return!j6(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function k6(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function A6(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=u6(e,`(`),a=u6(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function j6(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||c1(n)||s1(n))&&(!t||n!==47)}V6.peek=B6;function M6(){this.buffer()}function N6(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function P6(){this.buffer()}function F6(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function I6(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Z$(this.sliceSerialize(e)).toLowerCase(),n.label=t}function L6(e){this.exit(e)}function R6(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Z$(this.sliceSerialize(e)).toLowerCase(),n.label=t}function z6(e){this.exit(e)}function B6(){return`[`}function V6(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function H6(){return{enter:{gfmFootnoteCallString:M6,gfmFootnoteCall:N6,gfmFootnoteDefinitionLabelString:P6,gfmFootnoteDefinition:F6},exit:{gfmFootnoteCallString:I6,gfmFootnoteCall:L6,gfmFootnoteDefinitionLabelString:R6,gfmFootnoteDefinition:z6}}}function U6(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:V6},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
74
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?G6:W6))),s(),o}}function W6(e,t,n){return t===0?e:G6(e,t,n)}function G6(e,t,n){return(n?``:` `)+e}var K6=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Z6.peek=Q6;function q6(){return{canContainEols:[`delete`],enter:{strikethrough:Y6},exit:{strikethrough:X6}}}function J6(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:K6}],handlers:{delete:Z6}}}function Y6(e){this.enter({type:`delete`,children:[]},e)}function X6(e){this.exit(e)}function Z6(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Q6(){return`~`}function $6(e){return e.length}function e8(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||$6,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=t8(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=n8(r[d]);else{let e=n8(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
75
|
+
`)}function t8(e){return e==null?``:String(e)}function n8(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function r8(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),i8);return i(),o}function i8(e,t,n){return`>`+(n?``:` `)+e}function a8(e,t){return o8(e,t.inConstruct,!0)&&!o8(e,t.notInConstruct,!1)}function o8(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function s8(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
76
|
+
`&&a8(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
77
|
+
`}function c8(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function l8(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function u8(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function d8(e,t,n,r){let i=u8(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(l8(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,f8);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(c8(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
78
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
79
|
+
`),a&&(u+=s.move(a+`
|
|
80
|
+
`)),u+=s.move(c),l(),u}function f8(e,t,n){return(n?``:` `)+e}function p8(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function m8(e,t,n,r){let i=p8(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
81
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function h8(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function g8(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function _8(e,t,n){let r=v1(e),i=v1(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}v8.peek=y8;function v8(e,t,n,r){let i=h8(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=_8(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=g8(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=_8(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+g8(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function y8(e,t,n){return n.options.emphasis||`*`}function b8(e,t){let n=!1;return H4(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&R$(e)&&(t.options.setext||n))}function x8(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(b8(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
82
|
+
`,after:`
|
|
83
|
+
`});return r(),t(),o+`
|
|
84
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
85
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
86
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=g8(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}S8.peek=C8;function S8(e){return e.value||``}function C8(){return`<`}w8.peek=T8;function w8(e,t,n,r){let i=p8(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function T8(){return`!`}E8.peek=D8;function E8(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function D8(){return`!`}O8.peek=k8;function O8(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function k8(){return"`"}function A8(e,t){let n=R$(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}j8.peek=M8;function j8(e,t,n,r){let i=p8(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(A8(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function M8(e,t,n){return A8(e,n)?`<`:`[`}N8.peek=P8;function N8(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function P8(){return`[`}function F8(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function I8(e){let t=F8(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function L8(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function R8(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function z8(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?L8(n):F8(n),s=e.ordered?o===`.`?`)`:`.`:I8(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),R8(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function B8(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function V8(e,t,n,r){let i=B8(n),a=n.bulletCurrent||F8(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function H8(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var U8=j4([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function W8(e,t,n,r){return(e.children.some(function(e){return U8(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function G8(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}K8.peek=q8;function K8(e,t,n,r){let i=G8(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=_8(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=g8(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=_8(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+g8(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function q8(e,t,n){return n.options.strong||`*`}function J8(e,t,n,r){return n.safe(e.value,r)}function Y8(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function X8(e,t,n){let r=(R8(n)+(n.options.ruleSpaces?` `:``)).repeat(Y8(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Z8={blockquote:r8,break:s8,code:d8,definition:m8,emphasis:v8,hardBreak:s8,heading:x8,html:S8,image:w8,imageReference:E8,inlineCode:O8,link:j8,linkReference:N8,list:z8,listItem:V8,paragraph:H8,root:W8,strong:K8,text:J8,thematicBreak:X8};function Q8(){return{enter:{table:$8,tableData:r5,tableHeader:r5,tableRow:t5},exit:{codeText:i5,table:e5,tableData:n5,tableHeader:n5,tableRow:n5}}}function $8(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function e5(e){this.exit(e),this.data.inTable=void 0}function t5(e){this.enter({type:`tableRow`,children:[]},e)}function n5(e){this.exit(e)}function r5(e){this.enter({type:`tableCell`,children:[]},e)}function i5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,a5));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function a5(e,t){return t===`|`?t:e}function o5(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
87
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
88
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return e8(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Z8.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function s5(){return{exit:{taskListCheckValueChecked:l5,taskListCheckValueUnchecked:l5,paragraph:u5}}}function c5(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:d5}}}function l5(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function u5(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function d5(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Z8.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function f5(){return[v6(),H6(),q6(),Q8(),s5()]}function p5(e){return{extensions:[y6(),U6(e),J6(),o5(e),c5()]}}var m5={tokenize:O5,partial:!0},h5={tokenize:k5,partial:!0},g5={tokenize:A5,partial:!0},_5={tokenize:j5,partial:!0},v5={tokenize:M5,partial:!0},y5={name:`wwwAutolink`,tokenize:E5,previous:N5},b5={name:`protocolAutolink`,tokenize:D5,previous:P5},x5={name:`emailAutolink`,tokenize:T5,previous:F5},S5={};function C5(){return{text:S5}}for(var w5=48;w5<123;)S5[w5]=x5,w5++,w5===58?w5=65:w5===91&&(w5=97);S5[43]=x5,S5[45]=x5,S5[46]=x5,S5[95]=x5,S5[72]=[x5,b5],S5[104]=[x5,b5],S5[87]=[x5,y5],S5[119]=[x5,y5];function T5(e,t,n){let r=this,i,a;return o;function o(t){return!I5(t)||!F5.call(r,r.previous)||L5(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return I5(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(v5,u,l)(t):t===45||t===95||$$(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Q$(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function E5(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!N5.call(r,r.previous)||L5(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(m5,e.attempt(h5,e.attempt(g5,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function D5(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&P5.call(r,r.previous)&&!L5(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Q$(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||t1(t)||a1(t)||c1(t)||s1(t)?n(t):e.attempt(h5,e.attempt(g5,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function O5(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function k5(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(_5,c,s)(t):t===null||a1(t)||c1(t)||t!==45&&s1(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function A5(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(_5,t,a)(o):o===null||a1(o)||c1(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function j5(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||a1(o)||c1(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||a1(e)||c1(e)?t(e):r(e)}function a(e){return Q$(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Q$(t)?(e.consume(t),o):n(t)}}function M5(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return $$(e)?n(e):t(e)}}function N5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||a1(e)}function P5(e){return!Q$(e)}function F5(e){return!(e===47||I5(e))}function I5(e){return e===43||e===45||e===46||e===95||$$(e)}function L5(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var R5={tokenize:K5,partial:!0};function z5(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:U5,continuation:{tokenize:W5},exit:G5}},text:{91:{name:`gfmFootnoteCall`,tokenize:H5},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:B5,resolveTo:V5}}}}function B5(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Z$(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function V5(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function H5(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||a1(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Z$(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return a1(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function U5(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||a1(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Z$(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return a1(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),d1(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function W5(e,t,n){return e.check(E1,t,e.attempt(R5,t,n))}function G5(e){e.exit(`gfmFootnoteDefinition`)}function K5(e,t,n){let r=this;return d1(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function q5(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&W$(o,o.length,0,y1(s,e.slice(r+1,n),t)),W$(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),W$(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=v1(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=v1(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var J5=class{constructor(){this.map=[]}add(e,t,n){Y5(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Y5(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function X5(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Z5(){return{flow:{null:{name:`table`,tokenize:Q5,resolveAll:$5}}}}function Q5(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):o1(t)?d1(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||a1(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,o1(t)?d1(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return o1(t)?d1(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||$(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return o1(t)?d1(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||$(n)?(e.exit(`tableRow`),t(n)):o1(n)?d1(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||a1(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function $5(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new J5;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(t7(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=e7(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=e7(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=e7(f,t,o,i,n,d)):(o[0]=o[1],d=e7(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&t7(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=X5(t.events,n))}return e}function e7(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},n7(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=n7(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=n7(t.events,n[2]),a=n7(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},n7(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function t7(e,t,n,r,i){let a=[],o=n7(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function n7(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var r7={name:`tasklistCheck`,tokenize:a7};function i7(){return{text:{91:r7}}}function a7(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return a1(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return $(r)?t(r):o1(r)?e.check({tokenize:o7},t,n)(r):n(r)}}function o7(e,t,n){return d1(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function s7(e){return q$([C5(),z5(),q5(e),Z5(),i7()])}var c7={};function l7(e){let t=this,n=e||c7,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(s7(n)),a.push(f5()),o.push(p5(n))}function u7(e){return oO((0,N.useMemo)(()=>cP.query(`prs`,`comments`,{query:e,timeToLive:`60 seconds`}),[e.pullRequestId,e.repositoryName,e.profile,e.region]))}function d7(e){let[t,n]=(0,N.useState)(!1),[r,i]=(0,N.useState)(!1),a=()=>localStorage.getItem(e)===`true`,o=(0,N.useCallback)(()=>a()?!1:(n(!0),!0),[e]),s=(0,N.useCallback)(()=>{r&&localStorage.setItem(e,`true`),n(!1)},[r,e]);return{cancel:(0,N.useCallback)(()=>{n(!1)},[]),dismiss:s,dontRemind:r,isDismissed:a,setDontRemind:i,show:o,visible:t}}function f7({items:e,onRefresh:t,permissionPrompt:n,stableKey:r}){let[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)(null),c=(0,N.useRef)(!1),l=(0,N.useRef)(null),u=(0,N.useRef)(t);u.current=t;let d=(0,N.useCallback)(()=>u.current(),[]);return(0,N.useEffect)(()=>{n?c.current=!0:c.current&&(c.current=!1,d())},[n,d]),(0,N.useEffect)(()=>{if((i||o)&&!n){let e=500,t=Date.now(),n=()=>{if(Date.now()-t>3e4){a(null),s(null);return}d(),e=Math.min(e*1.5,3e3),l.current=setTimeout(n,e)};return l.current=setTimeout(n,e),()=>{l.current&&clearTimeout(l.current)}}},[i,o,n,d]),(0,N.useEffect)(()=>{a(null),s(null),l.current&&=(clearTimeout(l.current),null)},[r]),{pendingAdd:i,pendingRemove:o,add:e=>a(e),remove:e=>s(e)}}function p7({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card`,className:tX(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm`,e),...t})}function m7({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-header`,className:tX(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,e),...t})}function h7({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-title`,className:tX(`leading-none font-semibold`,e),...t})}function g7({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-content`,className:tX(`px-6`,e),...t})}var _7=e=>e===`green`?`text-green-600 dark:text-green-400`:e===`yellow`?`text-yellow-600 dark:text-yellow-400`:`text-red-600 dark:text-red-400`,v7=e=>e===`green`?`border-green-500/30`:e===`yellow`?`border-yellow-500/30`:`border-red-500/30`,y7=e=>e===`positive`?`outline`:e===`neutral`?`secondary`:`destructive`,b7=e=>e===`positive`?`border-green-500/30 text-green-600 dark:text-green-400`:``,x7=e=>{let t=Ia(e,`tagName`)?e.tagName:void 0;return t===`INPUT`||t===`TEXTAREA`},S7=e=>{let t=new Date(e),n=t.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}),r=Date.now()-t.getTime(),i=Math.floor(r/6e4);if(i<1)return`${n} · just now`;if(i<60)return`${n} · ${i}m ago`;let a=Math.floor(i/60);return a<24?`${n} · ${a}h ago`:`${n} · ${Math.floor(a/24)}d ago`},C7=e=>e.comments.length===0?0:Math.min(...e.comments.map(e=>new Date(e.root.creationDate).getTime())),w7=e=>1+e.replies.reduce((e,t)=>e+w7(t),0);function T7({score:e}){if(!e)return null;let t=aQ(e.total);return(0,R.jsx)(AX,{variant:`outline`,className:`${v7(t)} ${_7(t)} tabular-nums font-semibold`,children:e.total.toFixed(1)})}function E7({score:e}){if(!e)return(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground pt-2`,children:`Waiting for comment count...`});let t=aQ(e.total);return(0,R.jsxs)(`div`,{className:`space-y-3 pt-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,R.jsx)(`span`,{className:`text-lg font-bold tabular-nums ${_7(t)}`,children:e.total.toFixed(1)}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`/ 10`}),(0,R.jsx)(`div`,{className:`ml-2 h-1.5 flex-1 overflow-hidden rounded-full bg-muted`,children:(0,R.jsx)(`div`,{className:`h-full rounded-full ${t===`green`?`bg-green-500`:t===`yellow`?`bg-yellow-500`:`bg-red-500`}`,style:{width:`${e.total*10}%`}})})]}),(0,R.jsx)(`div`,{className:`space-y-2`,children:e.categories.map(e=>(0,R.jsxs)(`div`,{className:`flex items-start gap-3 rounded border px-3 py-2`,children:[(0,R.jsx)(`span`,{className:`w-8 text-right text-xs font-semibold tabular-nums ${e.value>0?`text-green-600 dark:text-green-400`:e.value<0?`text-red-600 dark:text-red-400`:`text-muted-foreground`}`,children:e.value>0?`+${e.value}`:e.value}),(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`text-xs font-medium`,children:e.label}),(0,R.jsx)(AX,{variant:y7(e.status),className:`text-[10px] px-1.5 py-0 ${b7(e.status)}`,children:e.statusLabel})]}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:e.description})]})]},e.label))})]})}function D7({depth:e,thread:t}){return t.root.deleted?null:(0,R.jsxs)(`div`,{className:e>0?`ml-4 border-l-2 border-muted pl-3`:``,children:[(0,R.jsxs)(`div`,{className:`space-y-1 py-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(`span`,{className:`font-medium`,children:t.root.author}),(0,R.jsx)(`span`,{children:`·`}),(0,R.jsx)(`span`,{children:S7(t.root.creationDate)})]}),(0,R.jsx)(`div`,{className:`prose prose-sm dark:prose-invert max-w-none break-words [&_a]:text-primary [&_img]:inline [&_img]:h-5 [&_img]:w-auto`,children:(0,R.jsx)(B3,{remarkPlugins:[l7],rehypePlugins:[l6],children:t.root.content})})]}),t.replies.map(t=>(0,R.jsx)(D7,{thread:t,depth:e+1},t.root.id))]})}function O7({pr:e}){return UE(u7({pullRequestId:e.id,repositoryName:e.repositoryName,profile:e.account.profile,region:e.account.region})).onInitialOrWaiting(()=>(0,R.jsx)(`div`,{className:`pt-2`,children:(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Loading comments...`})})).onError(()=>(0,R.jsx)(`div`,{className:`pt-2`,children:(0,R.jsx)(`p`,{className:`text-xs text-destructive`,children:`Failed to load comments`})})).onDefect(()=>(0,R.jsx)(`div`,{className:`pt-2`,children:(0,R.jsx)(`p`,{className:`text-xs text-destructive`,children:`Failed to load comments`})})).onSuccess(e=>{let t=e.reduce((e,t)=>e+t.comments.reduce((e,t)=>e+w7(t),0),0);return(0,R.jsxs)(`div`,{className:`pt-2`,children:[e.length===0&&(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No comments`}),t>0&&(0,R.jsx)(`div`,{className:`space-y-1`,children:[...e].sort((e,t)=>C7(t)-C7(e)).map((t,n)=>(0,R.jsxs)(`div`,{children:[t.filePath&&(0,R.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:t.filePath}),t.comments.map(e=>(0,R.jsx)(D7,{thread:e,depth:0},e.root.id)),n<e.length-1&&(0,R.jsx)(LZ,{className:`my-2`})]},t.filePath??`loc-${n}`))})]})}).render()}function k7({pr:e}){let t=u7({pullRequestId:e.id,repositoryName:e.repositoryName,profile:e.account.profile,region:e.account.region}),n=e.status===`MERGED`?e.lastModifiedDate.getTime()-e.creationDate.getTime():null,{timeToAddressFeedback:r,timeToFirstReview:i}=(0,N.useMemo)(()=>{if(!jE(t))return{timeToFirstReview:null,timeToAddressFeedback:null};let n=[];for(let e of t.value){let t=e=>{for(let r of e)n.push({author:r.root.author,date:new Date(r.root.creationDate)}),t(r.replies)};t(e.comments)}n.sort((e,t)=>e.date.getTime()-t.date.getTime());let r=n.find(t=>t.author!==e.author),i=r?r.date.getTime()-e.creationDate.getTime():null,a=e.isApproved&&e.approvedBy.some(t=>t!==e.author)?e.lastModifiedDate.getTime()-e.creationDate.getTime():null,o=i!=null&&a!=null?Math.min(i,a):i??a,s=[];for(let t=0;t<n.length;t++)if(n[t].author!==e.author){let r=n.slice(t+1).find(t=>t.author===e.author);r&&s.push(r.date.getTime()-n[t].date.getTime())}return{timeToFirstReview:o,timeToAddressFeedback:s.length>0?s.reduce((e,t)=>e+t,0)/s.length:null}},[t,e.author,e.creationDate,e.lastModifiedDate,e.isApproved,e.approvedBy]);return n!=null||i!=null||r!=null?(0,R.jsxs)(R.Fragment,{children:[n!=null&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Time to Merge`}),(0,R.jsx)(`span`,{className:`text-xs font-medium tabular-nums`,children:YX(n)})]}),i!=null&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Time to First Review`}),(0,R.jsx)(`span`,{className:`text-xs font-medium tabular-nums`,children:YX(i)})]}),r!=null&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Time to Address Feedback`}),(0,R.jsx)(`span`,{className:`text-xs font-medium tabular-nums`,children:YX(r)})]})]}):null}function A7({children:e,count:t,title:n}){let[r,i]=(0,N.useState)(!1);return(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[(0,R.jsxs)(`button`,{className:`flex w-full items-center gap-2 px-4 py-2.5 text-left text-sm font-medium hover:bg-accent/50`,onClick:()=>i(!r),children:[(0,R.jsx)(wF,{className:`size-4 text-muted-foreground transition-transform ${r?``:`-rotate-90`}`}),n,t!==void 0&&(0,R.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`(`,t,`)`]})]}),r&&(0,R.jsx)(`div`,{className:`border-t px-4 pb-3`,children:e})]})}var j7=`Required approvers`,M7=`Optional approvers`;function N7({approvalRules:e,approvedBy:t,currentUser:n,knownUserArns:r,onRefresh:i,onSetApprovers:a,permissionPrompt:o,repoAccountId:s,required:c,ruleName:l,title:u}){let[d,f]=(0,N.useState)(!1),[p,m]=(0,N.useState)(``),h=e.flatMap(e=>e.poolMembers).join(`,`),g=f7({items:e.flatMap(e=>e.poolMembers),stableKey:h,permissionPrompt:o,onRefresh:i}),{pendingAdd:_,pendingRemove:v}=g,y=(0,N.useMemo)(()=>{let t=new Set;for(let n of e)if(n.fromTemplate||n.ruleName===l)for(let e of n.poolMembers)t.add(e);return[...t]},[e,l]),b=e.find(e=>e.ruleName===l&&!e.fromTemplate),x=b?.poolMemberArns??[],S=b?.poolMembers??[],C=(0,N.useMemo)(()=>[...r.entries()].filter(([e])=>!y.includes(e)&&e!==_),[r,y,_]),w=s?`CodeCommitApprovers:${s}:`:``,T=e=>{let t=e.startsWith(`CodeCommitApprovers:`)?e:`${w}${e}`,n=/^CodeCommitApprovers:[^:]*:(.+)$/.exec(t);g.add(n?n[1]:e),a([...x,t]),f(!1)},E=e=>{g.remove(e);let t=S.indexOf(e);t>=0&&a(x.filter((e,n)=>n!==t))},D=e.length>0&&e.every(e=>e.satisfied);return(0,R.jsxs)(p7,{children:[(0,R.jsxs)(m7,{className:`flex flex-row items-center justify-between`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(h7,{className:`text-sm`,children:u}),c&&e.length>0&&(D?(0,R.jsx)(AX,{variant:`outline`,className:`border-green-500/30 text-green-600 dark:text-green-400`,children:`Satisfied`}):(0,R.jsx)(AX,{variant:`secondary`,children:`Pending`}))]}),(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>f(!d),children:(0,R.jsx)(tI,{className:`size-4`})})]}),(0,R.jsxs)(g7,{className:`space-y-2`,children:[d&&(0,R.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-md border p-2 bg-muted/30`,children:[C.length>0&&(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:C.map(([e])=>(0,R.jsx)(Z,{variant:`outline`,size:`sm`,className:`h-6 text-xs gap-1`,onClick:()=>m(e),children:e},e))}),(0,R.jsxs)(`div`,{className:`flex gap-1`,children:[(0,R.jsx)(`input`,{placeholder:w?`${w}USERNAME`:`username`,className:`flex-1 rounded-md border bg-background px-2 py-1 text-xs font-mono`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&p.trim()&&(T(p.trim()),m(``))}}),(0,R.jsx)(Z,{size:`sm`,className:`h-7 text-xs`,disabled:!p.trim()||!w,onClick:()=>{T(p.trim()),m(``)},children:`Add`})]})]}),!d&&C.length>0&&(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-1 items-center`,children:[(0,R.jsx)(`span`,{className:`text-[10px] text-muted-foreground/60 uppercase tracking-wider`,children:`Suggested`}),C.slice(0,5).map(([e,t])=>(0,R.jsxs)(`button`,{className:`inline-flex items-center gap-0.5 rounded-md border border-dashed border-muted-foreground/30 px-1.5 py-0.5 text-[11px] text-muted-foreground/60 hover:border-primary/50 hover:text-foreground transition-colors`,onClick:()=>T(t),children:[(0,R.jsx)(tI,{className:`size-2.5`}),e]},e))]}),(y.length>0||_)&&(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[y.map(e=>{let r=t.includes(e),i=S.includes(e),a=e===v;return(0,R.jsxs)(AX,{variant:e===n?`default`:r?`outline`:`secondary`,className:`text-xs gap-1 ${r?`border-green-500/30 text-green-600 dark:text-green-400`:``} ${a?`opacity-50`:``}`,children:[a&&(0,R.jsx)(GF,{className:`size-3 animate-spin`}),!a&&r&&(0,R.jsx)(SF,{className:`size-3`}),e,i&&!a&&(0,R.jsx)(`button`,{className:`ml-0.5 hover:text-destructive`,onClick:()=>E(e),children:(0,R.jsx)(pI,{className:`size-3`})})]},e)}),_&&!y.includes(_)&&(0,R.jsxs)(AX,{variant:`secondary`,className:`text-xs gap-1 opacity-70`,children:[(0,R.jsx)(GF,{className:`size-3 animate-spin`}),_]})]})]})]})}function P7(){let{accountId:e,prId:t}=lr(),n=oO(WP),r=uO(MP),i=uO(NP),a=uO(PP),o=(0,N.useRef)(null),s=(0,N.useMemo)(()=>t?n.pullRequests.find(n=>n.id===t&&(n.account.awsAccountId===e||n.account.profile===e))??null:null,[e,t,n.pullRequests]),c=s?.account?.repoAccountId||``,l=(0,N.useMemo)(()=>{let e=new Map,t=t=>{!t||t===`*`||e.has(t)||e.set(t,c?`CodeCommitApprovers:${c}:${t}`:t)};for(let e of n.pullRequests){t(e.author);for(let n of e.approvedBy)t(n);for(let n of e.commentedBy)t(n);for(let n of e.approvalRules)for(let e of n.poolMembers)t(e)}return e},[n.pullRequests,c]);(0,N.useEffect)(()=>{if(s||!e||!t)return;let n=`${e}:${t}`;o.current!==n&&(o.current=n,r({params:{awsAccountId:e,prId:YM.make(t)}}))},[s,e,t,r]);let u=(0,N.useMemo)(()=>s?Pc(iQ(s,new Date)):void 0,[s]),d=ar(),f=uO(fP),p=d7(na.grantedDismissed),m=d7(na.dockerDismissed),h=oO(bP),g=uO(xP),_=uO(SP),v=s?.account.awsAccountId??s?.account.profile,[y,b]=FZ((0,N.useMemo)(()=>jE(h)&&v?h.value.some(e=>e.awsAccountId===v&&e.pullRequestId===t):!1,[h,v,t])),x=(0,N.useCallback)(()=>{if(!v||!s)return;let e={awsAccountId:v,pullRequestId:s.id};b(!y),y?_({payload:e}):g({payload:e})},[v,y,s,g,_]),[S,C]=(0,N.useState)(!1),w=(0,N.useRef)(s?.fetchedAt);(0,N.useEffect)(()=>{S&&s?.fetchedAt&&s.fetchedAt!==w.current&&C(!1),w.current=s?.fetchedAt},[S,s?.fetchedAt]);let T=(0,N.useCallback)(()=>{!v||!t||S||(C(!0),r({params:{awsAccountId:v,prId:YM.make(t)}}))},[v,S,t,r]),E=s?s.link||`https://${s.account.region}.console.aws.amazon.com/codesuite/codecommit/repositories/${s.repositoryName}/pull-requests/${s.id}?region=${s.account.region}`:``,[D,O]=(0,N.useState)(!1),k=(0,N.useCallback)(()=>{E&&navigator.clipboard.writeText(E).then(()=>{O(!0),setTimeout(()=>O(!1),2e3)},()=>{})},[E]),A=uO(DP),j=(0,N.useMemo)(()=>n.sandboxes?.find(n=>n.pullRequestId===t&&n.awsAccountId===e&&n.status!==`stopped`&&n.status!==`error`),[n.sandboxes,t,e]),[M,ee]=(0,N.useState)(!1);(0,N.useEffect)(()=>{M&&j&&(ee(!1),d(`/sandbox/${j.id}`))},[M,j,d]);let P=(0,N.useCallback)(()=>{if(!s)return;let e=s.account.awsAccountId??s.account.profile;A({payload:{pullRequestId:s.id,awsAccountId:e,repositoryName:s.repositoryName,sourceBranch:s.sourceBranch,profile:s.account.profile,region:s.account.region}}),ee(!0)},[s,A]),F=(0,N.useCallback)(()=>{if(s){if(j){d(`/sandbox/${j.id}`);return}m.show()||P()}},[s,j,m,P,d]),I=()=>{m.dismiss(),P()},te=(0,N.useCallback)(()=>{!s||!E||f({payload:{profile:s.account.profile,link:E}})},[E,f,s]),ne=(0,N.useCallback)(()=>{s&&(p.show()||te())},[p,s,te]),re=()=>{p.dismiss(),te()};if((0,N.useEffect)(()=>{let e=e=>{x7(e.target)||(e.key===`Escape`?(e.preventDefault(),d(`/`)):(e.key===`Enter`||e.key===`o`)&&s?.link?ne():e.key===`.`&&s&&(e.preventDefault(),F()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[ne,F,d,s]),!s)return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground`,children:[(0,R.jsx)(GF,{className:`size-6 animate-spin opacity-40`}),(0,R.jsx)(`p`,{className:`text-sm`,children:`Loading pull request...`})]});let ie=s.status===`OPEN`,L=ie?s.isMergeable?(0,R.jsx)(AX,{variant:`outline`,className:`border-green-500/30 text-green-600 dark:text-green-400`,children:`Mergeable`}):(0,R.jsx)(AX,{variant:`destructive`,children:`Conflict`}):null,ae=ie?s.isApproved?(0,R.jsx)(AX,{variant:`outline`,className:`border-green-500/30 text-green-600 dark:text-green-400`,children:`Approved`}):(0,R.jsx)(AX,{variant:`secondary`,children:`Pending`}):null;return(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,R.jsxs)(Z,{variant:`ghost`,size:`sm`,onClick:()=>d(`/`),children:[(0,R.jsx)(hF,{className:`size-4`}),`Back`]}),(0,R.jsxs)(MX,{className:`ml-auto`,children:[(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 text-xs`,onClick:T,disabled:S,children:[(0,R.jsx)(nI,{className:`size-3.5 ${S?`animate-spin`:``}`}),`Refresh`]}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 text-xs`,onClick:x,children:[y?(0,R.jsx)(_F,{className:`size-3.5`}):(0,R.jsx)(vF,{className:`size-3.5`}),y?`Unsubscribe`:`Subscribe`]}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 text-xs`,onClick:F,children:[(0,R.jsx)(MF,{className:`size-3.5`}),j?`Open Sandbox`:`Sandbox`]}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 text-xs`,onClick:k,children:[D?(0,R.jsx)(SF,{className:`size-3.5`}):(0,R.jsx)(NF,{className:`size-3.5`}),D?`Copied`:`Copy Link`]}),(0,R.jsxs)(Z,{variant:`default`,size:`sm`,className:`h-7 text-xs`,onClick:ne,children:[(0,R.jsx)(FF,{className:`size-3.5`}),`Open in Console`]})]})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight`,children:s.title}),(0,R.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2`,children:[L,ae,(0,R.jsx)(AX,{variant:`outline`,children:s.status}),(0,R.jsx)(T7,{score:u}),(0,R.jsx)(Ii,{to:`/?f=author:${encodeURIComponent(s.author)}`,className:`text-sm text-muted-foreground hover:underline`,children:s.author}),(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`·`}),(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:WX(s.creationDate)}),s.fetchedAt&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`·`}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:GX(s.fetchedAt,new Date,`Fetched`)})]})]})]}),(0,R.jsx)(LZ,{}),(0,R.jsx)(p7,{children:(0,R.jsxs)(g7,{className:`grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 py-4 text-sm`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Account`}),(0,R.jsx)(Ii,{to:`/?f=account:${encodeURIComponent(s.account.profile)}`,className:`font-mono text-xs hover:underline`,children:s.account.profile}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Repository`}),(0,R.jsx)(Ii,{to:`/?f=repo:${encodeURIComponent(s.repositoryName)}`,className:`font-mono text-xs hover:underline`,children:s.repositoryName}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Branch`}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(AX,{variant:`outline`,className:`font-mono text-xs`,children:s.sourceBranch}),(0,R.jsx)(gF,{className:`size-3 text-muted-foreground`}),(0,R.jsx)(AX,{variant:`outline`,className:`font-mono text-xs`,children:s.destinationBranch})]}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Author`}),(0,R.jsx)(Ii,{to:`/?f=author:${encodeURIComponent(s.author)}`,className:`text-xs hover:underline`,children:s.author}),TX(s.title)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Scope`}),(0,R.jsx)(Ii,{to:`/?f=scope:${encodeURIComponent(TX(s.title))}`,className:`text-xs hover:underline`,children:TX(s.title)})]}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Status`}),(0,R.jsx)(`div`,{className:`flex items-center gap-2`,children:s.status===`MERGED`?(0,R.jsx)(Ii,{to:`/?f=status:merged`,className:`hover:underline`,children:(0,R.jsx)(AX,{variant:`outline`,className:`border-purple-500/30 text-purple-600 dark:text-purple-400`,children:`Merged`})}):s.status===`CLOSED`?(0,R.jsx)(Ii,{to:`/?f=status:closed`,className:`hover:underline`,children:(0,R.jsx)(AX,{variant:`outline`,className:`border-red-500/30 text-red-600 dark:text-red-400`,children:`Closed`})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Ii,{to:`/?f=status:${s.isApproved?`approved`:`pending`}`,className:`hover:underline`,children:s.isApproved?(0,R.jsx)(AX,{variant:`outline`,className:`border-green-500/30 text-green-600 dark:text-green-400`,children:`Approved`}):(0,R.jsx)(AX,{variant:`secondary`,children:`Pending`})}),(0,R.jsx)(Ii,{to:`/?f=status:${s.isMergeable?`mergeable`:`conflicts`}`,className:`hover:underline`,children:s.isMergeable?(0,R.jsx)(AX,{variant:`outline`,className:`border-green-500/30 text-green-600 dark:text-green-400`,children:`Mergeable`}):(0,R.jsx)(AX,{variant:`destructive`,children:`Conflict`})})]})}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`ID`}),(0,R.jsx)(`span`,{className:`font-mono text-xs`,children:s.id}),(0,R.jsx)(k7,{pr:s})]})}),[{title:`Required Approvers`,ruleName:j7,required:!0},{title:`Optional Approvers`,ruleName:M7,required:!1}].map(t=>(0,R.jsx)(N7,{title:t.title,ruleName:t.ruleName,required:t.required,approvalRules:s.approvalRules,approvedBy:s.approvedBy,knownUserArns:l,repoAccountId:c,currentUser:n.currentUser,permissionPrompt:!!n.permissionPrompt,onSetApprovers:e=>{let n=s.approvalRules.find(e=>e.ruleName===t.ruleName&&!e.fromTemplate);n?a({payload:{pullRequestId:s.id,approvalRuleName:n.ruleName,requiredApprovals:t.required&&e.length>0?e.length:0,poolMembers:e.length>0?e:[`*`],account:s.account}}):e.length>0&&i({payload:{pullRequestId:s.id,approvalRuleName:t.ruleName,requiredApprovals:t.required?e.length:0,poolMembers:e,account:s.account}})},onRefresh:()=>r({params:{awsAccountId:e,prId:YM.make(s.id)}})},t.ruleName)),(0,R.jsx)(A7,{title:`Health Score Breakdown`,children:(0,R.jsx)(E7,{score:u})}),s.description&&(0,R.jsxs)(p7,{children:[(0,R.jsx)(m7,{children:(0,R.jsx)(h7,{className:`text-sm`,children:`Description`})}),(0,R.jsx)(g7,{children:(0,R.jsx)(`div`,{className:`prose prose-sm dark:prose-invert max-w-none`,children:(0,R.jsx)(B3,{remarkPlugins:[l7],rehypePlugins:[l6],children:s.description})})})]}),(0,R.jsx)(A7,{title:`Comments`,...s.commentCount===void 0?{}:{count:s.commentCount},children:(0,R.jsx)(O7,{pr:s},s.id)}),(0,R.jsx)(nX,{open:p.visible,onOpenChange:p.cancel,children:(0,R.jsxs)(aX,{children:[(0,R.jsxs)(oX,{children:[(0,R.jsx)(cX,{children:`Granted CLI Required`}),(0,R.jsxs)(lX,{children:[`"Open in Console" uses`,` `,(0,R.jsx)(`a`,{href:`https://docs.commonfate.io/granted/introduction`,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:`Granted`}),` `,`to assume the AWS role for this account. Make sure the`,` `,(0,R.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`,children:`assume`}),` CLI is installed and configured before continuing.`]})]}),(0,R.jsxs)(sX,{children:[(0,R.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted-foreground mr-auto`,children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:p.dontRemind,onChange:e=>p.setDontRemind(e.target.checked),className:`accent-primary`}),`Don't remind again`]}),(0,R.jsx)(Z,{variant:`ghost`,onClick:p.cancel,children:`Cancel`}),(0,R.jsx)(Z,{onClick:re,children:`Continue`})]})]})}),(0,R.jsx)(nX,{open:m.visible,onOpenChange:m.cancel,children:(0,R.jsxs)(aX,{children:[(0,R.jsxs)(oX,{children:[(0,R.jsx)(cX,{children:`Docker Required`}),(0,R.jsx)(lX,{children:`Sandbox uses Docker to run a code-server container. Make sure Docker is started before continuing.`})]}),(0,R.jsxs)(sX,{children:[(0,R.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted-foreground mr-auto`,children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:m.dontRemind,onChange:e=>m.setDontRemind(e.target.checked),className:`accent-primary`}),`Don't show again`]}),(0,R.jsx)(Z,{onClick:I,children:`OK`})]})]})})]})}var F7={conflict:{label:`conflict`,dot:`bg-red-500`,badge:`border-red-500/30 text-red-500`},approved:{label:`approved`,dot:`bg-green-500`,badge:`border-green-500/30 text-green-500`},pending:{label:`pending`,dot:`bg-yellow-500`,badge:`border-yellow-500/30 text-yellow-500`},merged:{label:`merged`,dot:`bg-purple-500`,badge:`border-purple-500/30 text-purple-500`},closed:{label:`closed`,dot:`bg-red-500`,badge:`border-red-500/30 text-red-500`}};function I7(e){return e.status===`MERGED`?`merged`:e.status===`CLOSED`?`closed`:e.isMergeable?e.isApproved?`approved`:`pending`:`conflict`}function L7({currentUser:e,pr:t,showUpdated:n,to:r}){let i=lN(t,e),a=(0,N.useMemo)(()=>Pc(iQ(t,new Date)),[t]),o=a?aQ(a.total):void 0,s=o===`green`?`text-green-600 dark:text-green-400`:o===`yellow`?`text-yellow-600 dark:text-yellow-400`:`text-red-600 dark:text-red-400`,c=F7[I7(t)];return(0,R.jsxs)(Ii,{to:r,className:`group flex cursor-pointer flex-col gap-2.5 px-5 py-5 transition-colors hover:bg-accent/50 no-underline text-inherit`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,R.jsxs)(AX,{variant:`outline`,className:`gap-1.5 ${c.badge}`,children:[(0,R.jsx)(`span`,{className:`size-1.5 rounded-full ${c.dot}`}),c.label]}),i&&(0,R.jsxs)(AX,{variant:`outline`,className:`border-yellow-500/30 text-yellow-500 gap-1`,children:[(0,R.jsx)(IF,{className:`size-3`}),`Review`]}),a&&(0,R.jsx)(`span`,{className:`font-mono text-base font-semibold tabular-nums ${s}`,children:a.total.toFixed(1)}),(0,R.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 text-xs text-muted-foreground`,children:[t.author,(0,R.jsx)(`span`,{className:`opacity-40`,children:`·`}),n?GX(t.lastModifiedDate,new Date):WX(t.creationDate),t.commentCount!==void 0&&t.commentCount>0&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`opacity-40`,children:`·`}),(0,R.jsx)(XF,{className:`size-3`}),t.commentCount]})]})]}),(0,R.jsx)(`div`,{children:(0,R.jsx)(AX,{variant:`outline`,className:`font-mono text-[11px] font-normal text-muted-foreground`,children:t.repositoryName})}),(0,R.jsx)(`span`,{className:`text-[15px] font-medium leading-snug`,children:t.title}),t.description&&(0,R.jsx)(`p`,{className:`line-clamp-1 text-sm text-muted-foreground`,children:t.description.split(`
|
|
89
|
+
`).slice(0,2).join(` `)})]})}var R7=(e,t)=>{switch(t.key){case`account`:return e.account?.profile===t.value;case`author`:return e.author===t.value;case`scope`:return TX(e.title)===t.value;case`repo`:return e.repositoryName===t.value;case`approver`:return e.approvedBy.some(e=>e===t.value);case`commenter`:return e.commentedBy.some(e=>e===t.value);case`size`:{let n=e.filesChanged;if(n==null)return!1;switch(t.value){case`small`:return n<5;case`medium`:return n>=5&&n<=15;case`large`:return n>=16&&n<=30;case`xlarge`:return n>30;default:return!0}}case`status`:switch(t.value){case`approved`:return e.status===`OPEN`&&e.isApproved;case`pending`:return e.status===`OPEN`&&!e.isApproved;case`mergeable`:return e.status===`OPEN`&&e.isMergeable;case`conflicts`:return e.status===`OPEN`&&!e.isMergeable;case`merged`:return e.status===`MERGED`;case`closed`:return e.status===`CLOSED`;case`open`:return e.status===`OPEN`;default:return!0}default:return!0}};function z7(){let e=oO(WP),t=uO(vP),{state:n,toggleFilter:r}=wX(),i=e.status===`loading`,a=e.pullRequests,o=(0,N.useMemo)(()=>{if(a.length===0)return[];let{filters:t,from:r,q:i,review:o,to:s}=n,c=i.toLowerCase(),l=e=>!i||e.repositoryName.toLowerCase().includes(c)||e.title.toLowerCase().includes(c)||e.author.toLowerCase().includes(c)||e.sourceBranch.toLowerCase().includes(c)||(e.description?.toLowerCase().includes(c)??!1),u={open:`lifecycle`,merged:`lifecycle`,closed:`lifecycle`,approved:`approval`,pending:`approval`,mergeable:`merge`,conflicts:`merge`},d=new Map;for(let e of t){let t=e.key===`status`?`status:${u[e.value]??e.value}`:e.key,n=d.get(t);n?n.push(e):d.set(t,[e])}let f=t.some(e=>e.key===`status`&&[`approved`,`pending`,`mergeable`,`conflicts`].includes(e.value)),p=t.some(e=>e.key===`status`&&[`open`,`merged`,`closed`].includes(e.value)),m=f&&!p,h=e=>m&&e.status!==`OPEN`?!1:[...d.values()].every(t=>t.some(t=>R7(e,t))),g=r?new Date(r).getTime():void 0,_=s?new Date(s).getTime():void 0,v=t.find(e=>e.key===`status`),y=e=>{if(!g||!_)return!0;let t=v?.value===`merged`||v?.value===`closed`?e.lastModifiedDate.getTime():e.creationDate.getTime();return t>=g&&t<_},b=t=>!o||lN(t,e.currentUser);return a.filter(e=>l(e)&&h(e)&&y(e)&&b(e)).sort((e,t)=>t.lastModifiedDate.getTime()-e.lastModifiedDate.getTime())},[a,n,e.currentUser]),s=e=>{let t=e.account.awsAccountId??e.account.profile;return`/accounts/${encodeURIComponent(t)}/prs/${e.id}`};if(o.length===0){if(i)return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground`,children:[(0,R.jsx)(GF,{className:`size-8 animate-spin opacity-40`}),(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Loading pull requests...`}),a.length>0&&(0,R.jsxs)(`p`,{className:`text-xs opacity-50`,children:[a.length,` PRs fetched (filter hides all)`]})]});let n=[...new Set(e.accounts.filter(e=>e.enabled).map(e=>e.profile))],o=a.length===0&&n.length>0;return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground`,children:[(0,R.jsxs)(`svg`,{className:`size-16 opacity-30`,viewBox:`0 0 64 64`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,R.jsx)(`rect`,{x:`8`,y:`12`,width:`48`,height:`40`,rx:`4`,stroke:`currentColor`,strokeWidth:`2`}),(0,R.jsx)(`path`,{d:`M8 24h48`,stroke:`currentColor`,strokeWidth:`2`}),(0,R.jsx)(`circle`,{cx:`16`,cy:`18`,r:`2`,fill:`currentColor`}),(0,R.jsx)(`circle`,{cx:`22`,cy:`18`,r:`2`,fill:`currentColor`}),(0,R.jsx)(`circle`,{cx:`28`,cy:`18`,r:`2`,fill:`currentColor`}),(0,R.jsx)(`path`,{d:`M24 36h16M28 42h8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),(0,R.jsx)(`p`,{className:`text-sm`,children:`No open pull requests`}),a.length>0&&(0,R.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,R.jsxs)(`p`,{className:`text-xs opacity-50`,children:[a.length,` PRs in cache (all merged or closed)`]}),(0,R.jsxs)(`div`,{className:`flex gap-1`,children:[(0,R.jsx)(Z,{variant:`outline`,size:`sm`,onClick:()=>r(`status`,`merged`),children:`Show merged`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,onClick:()=>r(`status`,`closed`),children:`Show closed`})]})]}),o&&(0,R.jsxs)(p7,{className:`mt-4 w-full max-w-sm`,children:[(0,R.jsx)(m7,{className:`pb-2`,children:(0,R.jsx)(h7,{className:`text-sm`,children:`SSO Login`})}),(0,R.jsxs)(g7,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground mb-1`,children:`Session may have expired. Log in to fetch PRs.`}),n.map(e=>(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`justify-start gap-2`,onClick:()=>t({payload:{profile:e}}),children:[(0,R.jsx)(KF,{className:`size-3.5`}),e]},e))]})]})]})}if(n.groupBy!==`account`)return(0,R.jsx)(`div`,{className:`flex flex-col gap-2`,children:o.map(t=>(0,R.jsx)(`div`,{className:`rounded-lg border bg-card`,children:(0,R.jsx)(L7,{pr:t,to:s(t),showUpdated:!0,currentUser:e.currentUser})},t.id))});let c=new Map;for(let e of o){let t=e.account?.profile??`unknown`;c.has(t)||c.set(t,[]),c.get(t).push(e)}return(0,R.jsx)(`div`,{className:`space-y-8`,children:[...c.entries()].map(([t,n])=>(0,R.jsxs)(`section`,{children:[(0,R.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`text-xs font-medium uppercase tracking-wider text-muted-foreground`,children:t}),(0,R.jsx)(AX,{variant:`secondary`,children:n.length})]}),(0,R.jsx)(`div`,{className:`flex flex-col gap-2`,children:n.map(t=>(0,R.jsx)(`div`,{className:`rounded-lg border bg-card`,children:(0,R.jsx)(L7,{pr:t,to:s(t),currentUser:e.currentUser})},t.id))})]},t))})}var B7=`default`,V7=`secondary`,H7=`destructive`,U7=`outline`,W7=e=>{switch(e){case`running`:return B7;case`creating`:case`cloning`:case`starting`:return V7;case`error`:return H7;default:return U7}};function G7({logs:e}){let t=(0,N.useRef)(null);return(0,N.useEffect)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[e]),(0,R.jsx)(`div`,{ref:t,className:`flex-1 min-h-0 overflow-y-auto bg-black/40 rounded-lg p-4 font-mono text-xs leading-relaxed`,children:e.trimEnd().split(`
|
|
90
|
+
`).map((e,t)=>{let n=e.match(/^\[([^\]]+)\]\s*(.*)$/);if(!n)return(0,R.jsx)(`div`,{className:`text-muted-foreground`,children:e},t);let[,r,i]=n;return(0,R.jsxs)(`div`,{className:`flex gap-3`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground/50 shrink-0 select-none`,children:r}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:i})]},t)})})}function K7(){let{sandboxId:e}=lr(),[t,n]=Wi(),r=oO(WP),i=uO(OP),a=uO(kP),o=uO(AP),s=ar(),[c,l]=(0,N.useState)(t.get(`view`)===`logs`),u=(0,N.useCallback)(()=>{l(e=>{let t=!e;return n(t?{view:`logs`}:{},{replace:!0}),t})},[n]),d=(0,N.useMemo)(()=>r.sandboxes?.find(t=>t.id===e)??null,[r.sandboxes,e]),f=(0,N.useCallback)(()=>{e&&i({params:{sandboxId:eN.make(e)}})},[e,i]),p=d?`/accounts/${d.awsAccountId}/prs/${d.pullRequestId}`:`/`;if(!d)return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground`,children:[(0,R.jsx)(GF,{className:`size-6 animate-spin opacity-40`}),(0,R.jsx)(`p`,{className:`text-sm`,children:`Loading sandbox...`})]});let m=d.status===`running`,h=[`creating`,`cloning`,`starting`].includes(d.status);return(0,R.jsxs)(`div`,{className:`flex flex-col h-[calc(100vh-4rem)]`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-2 border-b shrink-0`,children:[(0,R.jsxs)(Z,{variant:`ghost`,size:`sm`,onClick:()=>s(p),children:[(0,R.jsx)(hF,{className:`size-4`}),`Back to PR`]}),(0,R.jsx)(AX,{variant:`outline`,className:`font-mono text-xs`,children:d.repositoryName}),(0,R.jsx)(AX,{variant:`secondary`,className:`font-mono text-xs`,children:d.sourceBranch}),(0,R.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[h&&(0,R.jsx)(GF,{className:`size-3.5 animate-spin text-muted-foreground`}),(0,R.jsx)(AX,{variant:W7(d.status),className:`mr-1`,children:d.status}),d.logs&&(0,R.jsx)(Z,{variant:c?`secondary`:`outline`,size:`sm`,onClick:u,children:c?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(MF,{className:`size-3.5`}),` Editor`]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(iI,{className:`size-3.5`}),` Logs`]})}),(d.status===`stopped`||d.status===`error`)&&d.containerId&&(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,onClick:()=>e&&a({params:{sandboxId:eN.make(e)}}),children:[(0,R.jsx)(eI,{className:`size-3`}),`Restart`]}),(d.status===`stopped`||d.status===`error`)&&(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`text-destructive hover:text-destructive`,onClick:()=>{e&&(o({params:{sandboxId:eN.make(e)}}),s(`/sandboxes`))},children:[(0,R.jsx)(fI,{className:`size-3`}),`Delete`]}),(h||m)&&(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`text-destructive hover:text-destructive`,onClick:f,children:[(0,R.jsx)(lI,{className:`size-3`}),`Stop`]})]})]}),c||!m?(0,R.jsxs)(`div`,{className:`flex-1 min-h-0 flex flex-col gap-3 p-4`,children:[d.statusDetail&&(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground shrink-0`,children:d.statusDetail}),d.error&&(0,R.jsx)(`p`,{className:`rounded bg-destructive/10 px-3 py-2 text-xs text-destructive font-mono break-all shrink-0`,children:d.error}),d.logs?(0,R.jsx)(G7,{logs:d.logs}):(0,R.jsx)(`div`,{className:`flex-1 flex items-center justify-center text-muted-foreground text-sm`,children:`No logs available`})]}):(0,R.jsx)(`iframe`,{src:`http://localhost:${d.port}/`,className:`flex-1 w-full border-0`,title:`Code Sandbox`})]})}var q7=`default`,J7=`secondary`,Y7=`destructive`,X7=`outline`,Z7=e=>{switch(e){case`running`:return q7;case`creating`:case`cloning`:case`starting`:return J7;case`error`:return Y7;default:return X7}},Q7=e=>[`creating`,`cloning`,`starting`,`running`].includes(e),$7=e=>{let t=new Date(e),n=new Date().getTime()-t.getTime();return n<6e4?`just now`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:`${Math.floor(n/864e5)}d ago`};function e9(){let e=oO(WP),t=uO(OP),n=uO(kP),r=uO(AP),i=ar(),a=e.sandboxes??[];return a.length===0?(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground`,children:[(0,R.jsx)(yF,{className:`size-8 opacity-30`}),(0,R.jsx)(`p`,{className:`text-sm`,children:`No sandboxes`}),(0,R.jsx)(`p`,{className:`text-xs`,children:`Open a PR and press "." or click "Sandbox" to create one`})]}):(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:`Sandboxes`}),(0,R.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[a.length,` total`]})]}),(0,R.jsx)(`div`,{className:`space-y-2`,children:a.map(e=>(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card px-4 py-3 hover:bg-accent/50 cursor-pointer`,onClick:()=>i(`/sandbox/${e.id}`),children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[Q7(e.status)&&e.status!==`running`?(0,R.jsx)(GF,{className:`size-4 animate-spin text-muted-foreground shrink-0`}):(0,R.jsx)(yF,{className:`size-4 text-muted-foreground shrink-0`}),(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`font-mono text-sm truncate`,children:e.repositoryName}),(0,R.jsx)(AX,{variant:`outline`,className:`font-mono text-[10px] shrink-0`,children:e.sourceBranch})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground mt-0.5`,children:[(0,R.jsxs)(`span`,{children:[`PR #`,e.pullRequestId]}),(0,R.jsx)(`span`,{children:`·`}),(0,R.jsx)(`span`,{children:$7(e.createdAt)}),e.port&&e.status===`running`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{children:`·`}),(0,R.jsxs)(`span`,{children:[`port `,e.port]})]}),e.statusDetail&&Q7(e.status)&&e.status!==`running`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{children:`·`}),(0,R.jsx)(`span`,{className:`truncate`,children:e.statusDetail})]})]})]}),(0,R.jsx)(AX,{variant:Z7(e.status),className:`shrink-0`,children:e.status}),e.logs&&(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:t=>{t.stopPropagation(),i(`/sandbox/${e.id}?view=logs`)},children:(0,R.jsx)(iI,{className:`size-3.5`})}),(e.status===`running`||Q7(e.status))&&(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:n=>{n.stopPropagation(),t({params:{sandboxId:eN.make(e.id)}})},children:(0,R.jsx)(lI,{className:`size-3`})}),(e.status===`stopped`||e.status===`error`)&&e.containerId&&(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:t=>{t.stopPropagation(),n({params:{sandboxId:eN.make(e.id)}})},children:(0,R.jsx)(eI,{className:`size-3.5`})}),(e.status===`stopped`||e.status===`error`)&&(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:t=>{t.stopPropagation(),r({params:{sandboxId:eN.make(e.id)}})},children:(0,R.jsx)(fI,{className:`size-3.5`})})]}),e.error&&(0,R.jsx)(`p`,{className:`mt-2 rounded bg-destructive/10 px-3 py-1.5 text-xs text-destructive font-mono break-all`,children:e.error})]},e.id))})]})}var t9=[{key:`Esc`,desc:`Back / Close`},{key:`R`,desc:`Refresh PRs`},{key:`/`,desc:`Filter PRs`},{key:`1-7`,desc:`Quick filters`},{key:`Enter`,desc:`Open PR details`},{key:`Cmd+P`,desc:`Command palette`}];function n9(){return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`About`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Keyboard shortcuts and info`})]}),(0,R.jsx)(LZ,{}),(0,R.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,R.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`Keyboard Shortcuts`}),t9.map(e=>(0,R.jsxs)(`div`,{className:`flex items-center justify-between py-0.5`,children:[(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.desc}),(0,R.jsx)(`kbd`,{className:`rounded border bg-muted px-1.5 py-0.5 font-mono text-xs`,children:e.key})]},e.key))]})]})}var r9=[`all`,`on`,`off`];function i9(){let e=oO(uP),t=oO(WP),n=uO(gP),r=uO(vP),i=uO(yP),[a,o]=(0,N.useState)(``),[s,c]=(0,N.useState)(`all`),[l,u]=(0,N.useState)({}),d=(0,N.useRef)(null);(0,N.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);let f=(0,N.useCallback)(e=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{n({payload:e})},500)},[n]),p=(0,N.useCallback)((e,t)=>{let n=!(l[e]??t.accounts.find(t=>t.profile===e)?.enabled??!0),r={...l,[e]:n};u(r),f({accounts:t.accounts.map(t=>({profile:t.profile,regions:[...t.regions],enabled:t.profile===e?n:r[t.profile]??t.enabled})),autoDetect:t.autoDetect,autoRefresh:t.autoRefresh,refreshIntervalSeconds:t.refreshIntervalSeconds})},[f,l]);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Accounts`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`AWS profiles configured for CodeCommit`})]}),(0,R.jsx)(LZ,{}),UE(e).onInitialOrWaiting(()=>(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(e=>(0,R.jsx)(a9,{currentUser:t.currentUser,data:e,overrides:l,search:a,setSearch:o,statusFilter:s,setStatusFilter:c,toggleAccount:p,onSsoLogin:e=>{try{r({payload:{profile:UC(ZM)(e)}})}catch{}},onSsoLogout:()=>i({})})).render()]})}function a9({currentUser:e,data:t,onSsoLogin:n,onSsoLogout:r,overrides:i,search:a,setSearch:o,setStatusFilter:s,statusFilter:c,toggleAccount:l}){let u=(0,N.useMemo)(()=>t.accounts.map(e=>({...e,enabled:i[e.profile]??e.enabled})),[t.accounts,i]),d=(0,N.useMemo)(()=>{let e=a.toLowerCase();return u.filter(t=>!(c===`on`&&!t.enabled||c===`off`&&t.enabled||e&&!t.profile.toLowerCase().includes(e)&&!t.regions.some(t=>t.toLowerCase().includes(e))))},[u,a,c]),f=u.filter(e=>e.enabled),p=f.length;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,R.jsx)(hI,{className:`size-4 text-muted-foreground`}),e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Current user:`}),(0,R.jsx)(`span`,{className:`font-medium`,children:e}),(0,R.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-6 px-1.5 text-xs`,title:`SSO Logout`,onClick:()=>r(),children:(0,R.jsx)(qF,{className:`size-3`})})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Not logged in`}),f[0]&&(()=>{let e=f[0].profile;return(0,R.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-6 px-1.5 text-xs`,title:`SSO Login`,onClick:()=>n(e),children:(0,R.jsx)(KF,{className:`size-3`})})})()]})]}),u.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground py-4`,children:`No accounts configured. Edit the config file to add AWS profiles.`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsxs)(`div`,{className:`relative flex-1`,children:[(0,R.jsx)(aI,{className:`absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,R.jsx)(_Z,{placeholder:`Search profiles...`,value:a,onChange:e=>o(e.target.value),className:`h-8 pl-8 text-sm`})]}),(0,R.jsx)(MX,{children:r9.map(e=>(0,R.jsx)(Z,{variant:c===e?`default`:`outline`,size:`sm`,className:`h-8 px-2.5 text-xs capitalize`,onClick:()=>s(e),children:e},e))})]}),(0,R.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[p,`/`,u.length,` enabled`,d.length!==u.length&&` · ${d.length} shown`]}),(0,R.jsxs)(`div`,{className:`divide-y rounded-md border`,children:[d.map(e=>(0,R.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,R.jsx)(oI,{className:`size-3.5 text-muted-foreground shrink-0`}),(0,R.jsx)(`span`,{className:`text-sm font-medium truncate`,children:e.profile}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground truncate`,children:e.regions.join(`, `)||`default`})]}),(0,R.jsx)(Z,{variant:e.enabled?`default`:`outline`,size:`sm`,className:`ml-2 h-6 px-2 text-xs shrink-0`,onClick:()=>l(e.profile,t),children:e.enabled?`On`:`Off`})]},e.profile)),d.length===0&&(0,R.jsx)(`p`,{className:`px-3 py-4 text-center text-sm text-muted-foreground`,children:`No matching accounts`})]})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(UF,{className:`size-3`}),`Auto-detect: `,t.autoDetect?`enabled`:`disabled`]})]})}function o9(){let e=ar(),t=oO(zP),n=uO(BP),r=uO(UP),[i,a]=(0,N.useState)(!0),[o,s]=(0,N.useState)(30),[c,l]=(0,N.useState)(!1);(0,N.useEffect)(()=>{jE(t)&&(a(t.value.enabled),s(t.value.retentionDays),l(!1))},[t]);let[u,d]=(0,N.useState)(!1);return(0,N.useEffect)(()=>{u&&jE(t)&&(d(!1),l(!1))},[u,t]),(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h3`,{className:`text-lg font-semibold`,children:`Audit Log`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Record every AWS API call made by the app`})]}),(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`label`,{className:`flex items-center justify-between rounded-md border px-3 py-3`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Enable audit logging`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Log all API calls with permission state and duration`})]}),(0,R.jsx)(`button`,{role:`switch`,"aria-checked":i,onClick:()=>{a(!i),l(!0)},className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors ${i?`bg-primary`:`bg-muted`}`,children:(0,R.jsx)(`span`,{className:`pointer-events-none block size-4 rounded-full bg-background shadow-lg transition-transform ${i?`translate-x-4`:`translate-x-0`}`})})]}),(0,R.jsxs)(`div`,{className:`rounded-md border px-3 py-3 space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Retention period (days)`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Entries older than this are pruned on server start`}),(0,R.jsxs)(vZ,{value:String(o),onValueChange:e=>{s(Number(e)),l(!0)},children:[(0,R.jsx)(bZ,{className:`w-36`,children:(0,R.jsx)(yZ,{})}),(0,R.jsxs)(xZ,{children:[(0,R.jsx)(SZ,{value:`7`,children:`7 days`}),(0,R.jsx)(SZ,{value:`14`,children:`14 days`}),(0,R.jsx)(SZ,{value:`30`,children:`30 days`}),(0,R.jsx)(SZ,{value:`60`,children:`60 days`}),(0,R.jsx)(SZ,{value:`90`,children:`90 days`}),(0,R.jsx)(SZ,{value:`180`,children:`180 days`}),(0,R.jsx)(SZ,{value:`365`,children:`365 days`})]})]})]})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-0 rounded-md border w-fit`,children:[(0,R.jsx)(Z,{size:`sm`,disabled:!c,onClick:()=>{n({payload:{enabled:i,retentionDays:o}}),d(!0)},className:`rounded-r-none border-0`,children:`Save`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,onClick:()=>e(`/audit`),className:`rounded-l-none border-0 border-l`,children:`View Audit Log`})]}),(0,R.jsx)(Z,{variant:`destructive`,size:`sm`,onClick:()=>r({}),children:`Clear All Logs`})]})]})}var s9=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`;function c9({copied:e,copyKey:t,detail:n,label:r,onCopy:i,path:a}){return(0,R.jsxs)(`div`,{className:`flex items-baseline gap-3 py-1.5`,children:[(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground w-24`,children:r}),(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`code`,{className:`truncate text-xs font-mono`,children:a}),(0,R.jsx)(`button`,{onClick:()=>i(a,t),className:`shrink-0 rounded p-0.5 hover:bg-muted`,children:e===t?(0,R.jsx)(OF,{className:`size-3 text-green-500`}):(0,R.jsx)(NF,{className:`size-3 text-muted-foreground`})})]}),(0,R.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:n})]})]})}function l9(){let e=oO(pP),t=oO(hP),n=oO(mP),r=uO(_P),[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)(!1),c=(0,N.useCallback)((e,t)=>{navigator.clipboard.writeText(e).then(()=>{a(t),setTimeout(()=>a(null),2e3)},()=>{})},[]),l=(0,N.useCallback)(async()=>{s(!0);try{await r({})}finally{s(!1)}},[r]),u=e=>e?`Modified ${GX(new Date(e),new Date,``).trim()}`:``;return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Configuration`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`File locations, validation, and storage`})]}),(0,R.jsx)(LZ,{}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[UE(e).onInitialOrWaiting(()=>(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground py-1`,children:`Loading config path...`})).onError(()=>(0,R.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load config path`})).onDefect(()=>(0,R.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load config path`})).onSuccess(e=>{let n=jE(t)?` · ${t.value.status}`:``,r=e.exists?`${u(e.modifiedAt)}${n}`:`Not created yet${n}`;return(0,R.jsx)(c9,{label:`Config file`,path:e.path,detail:r,copyKey:`config`,copied:i,onCopy:c})}).render(),UE(t).onInitialOrWaiting(()=>null).onError(()=>null).onDefect(()=>null).onSuccess(e=>e.errors.length>0?(0,R.jsx)(`div`,{className:`ml-27 rounded bg-destructive/10 px-2 py-1 text-[11px] text-destructive`,children:e.errors.map((e,t)=>(0,R.jsx)(`p`,{children:e},t))}):null).render(),(0,R.jsx)(LZ,{}),UE(n).onInitialOrWaiting(()=>(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground py-1`,children:`Loading database info...`})).onError(()=>(0,R.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load database info`})).onDefect(()=>(0,R.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load database info`})).onSuccess(e=>{let t=e.exists?`${s9(e.sizeBytes)} · ${u(e.modifiedAt)}`:`Not created yet`;return(0,R.jsx)(c9,{label:`Cache database`,path:e.path,detail:t,copyKey:`db`,copied:i,onCopy:c})}).render()]}),(0,R.jsx)(LZ,{}),(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex-1`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Reset to Defaults`}),(0,R.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Backs up current config, then re-detects AWS profiles`})]}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,onClick:l,disabled:o,className:`shrink-0 gap-2`,children:[(0,R.jsx)(rI,{className:tX(`size-3.5`,o&&`animate-spin`)}),o?`Resetting...`:`Reset`]})]})]})}var u9=(e,t)=>{try{let n=localStorage.getItem(e);return n===null?t:n===`true`}catch{return t}},d9=(e,t)=>{try{let n=localStorage.getItem(e);return n===null?t:Number(n)||t}catch{return t}},f9=[{label:`30 min`,ms:1800*1e3},{label:`1 hour`,ms:3600*1e3},{label:`2 hours`,ms:7200*1e3},{label:`4 hours`,ms:14400*1e3}];function p9(){let[e,t]=(0,N.useState)(()=>u9(na.desktopNotifications,!1)),[n,r]=(0,N.useState)(()=>u9(na.reminders,!0)),[i,a]=(0,N.useState)(()=>d9(na.reminderInterval,3600*1e3)),[o,s]=(0,N.useState)(typeof Notification<`u`?Notification.permission:`unsupported`),c=(0,N.useCallback)(async()=>{if(!e&&o==="default"){let e=await Notification.requestPermission();if(s(e),e!==`granted`)return}let n=!e;t(n);try{localStorage.setItem(na.desktopNotifications,String(n))}catch{}},[e,o]),l=(0,N.useCallback)(()=>{let e=!n;r(e);try{localStorage.setItem(na.reminders,String(e))}catch{}},[n]),u=(0,N.useCallback)(e=>{a(e);try{localStorage.setItem(na.reminderInterval,String(e))}catch{}},[]);return(0,N.useEffect)(()=>{let e=()=>{typeof Notification<`u`&&s(Notification.permission)};return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[]),(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Notifications`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Desktop notifications and review reminders`})]}),(0,R.jsx)(LZ,{}),(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border p-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(vF,{className:`size-5 text-muted-foreground`}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Desktop Notifications`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:o===`unsupported`?`Not available in this browser`:o===`denied`?`Blocked by browser — enable in site settings`:`Show browser notifications for approval requests and PR updates`})]})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o===`granted`&&(0,R.jsx)(AX,{variant:`outline`,className:`text-xs`,children:`Granted`}),(0,R.jsx)(`button`,{role:`switch`,"aria-checked":e,onClick:c,disabled:o===`unsupported`||o===`denied`,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${e?`bg-primary`:`bg-muted`} ${o===`unsupported`||o===`denied`?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,children:(0,R.jsx)(`span`,{className:`inline-block size-4 rounded-full bg-white transition-transform ${e?`translate-x-6`:`translate-x-1`}`})})]})]}),(0,R.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border p-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(jF,{className:`size-5 text-muted-foreground`}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Review Reminders`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Periodic reminders for PRs awaiting your review`})]})]}),(0,R.jsx)(`button`,{role:`switch`,"aria-checked":n,onClick:l,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${n?`bg-primary`:`bg-muted`}`,children:(0,R.jsx)(`span`,{className:`inline-block size-4 rounded-full bg-white transition-transform ${n?`translate-x-6`:`translate-x-1`}`})})]}),n&&(0,R.jsxs)(`div`,{className:`rounded-lg border p-4`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Reminder Interval`}),(0,R.jsx)(`div`,{className:`flex gap-2`,children:f9.map(e=>(0,R.jsx)(`button`,{"aria-pressed":i===e.ms,onClick:()=>u(e.ms),className:`rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${i===e.ms?`bg-primary text-primary-foreground`:`bg-muted text-muted-foreground hover:bg-muted/80`}`,children:e.label},e.ms))})]})]})]})}var m9=`always_allow`,h9=e=>e===`always_allow`||e===`allow`||e===`deny`;function g9(){let e=oO(FP),t=uO(LP),n=uO(RP),r=jE(e)?e.value:[],i=r.filter(e=>e.category===`read`),a=r.filter(e=>e.category===`write`),o=()=>{for(let e of r)e.state!==`always_allow`&&t({payload:{operation:e.operation,state:m9}})},s=(e,n)=>(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`h4`,{className:`text-sm font-medium text-muted-foreground`,children:e}),n.map(e=>(0,R.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border px-3 py-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,R.jsx)(AX,{variant:e.category===`write`?`destructive`:`secondary`,className:`text-xs shrink-0`,children:e.category}),(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsx)(`code`,{className:`text-xs font-mono`,children:e.operation}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:e.description})]})]}),(0,R.jsxs)(vZ,{value:e.state,onValueChange:n=>{h9(n)&&t({payload:{operation:e.operation,state:n}})},children:[(0,R.jsx)(bZ,{className:`w-36 shrink-0`,children:(0,R.jsx)(yZ,{})}),(0,R.jsxs)(xZ,{children:[(0,R.jsx)(SZ,{value:`always_allow`,children:`Always Allow`}),(0,R.jsx)(SZ,{value:`allow`,children:`Ask Each Time`}),(0,R.jsx)(SZ,{value:`deny`,children:`Deny`})]})]})]},e.operation))]});return(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h3`,{className:`text-lg font-semibold`,children:`API Permissions`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Control which AWS API calls the app can make`})]}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(Z,{variant:`outline`,size:`sm`,onClick:o,children:`Always Allow All`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,onClick:()=>n({}),children:`Reset (Clear All)`})]}),OE(e)?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`}):(0,R.jsxs)(`div`,{className:`space-y-6`,children:[s(`Read Operations`,i),s(`Write Operations`,a)]})]})}var _9=[{label:`1 min`,value:60},{label:`5 min`,value:300},{label:`10 min`,value:600},{label:`15 min`,value:900},{label:`30 min`,value:1800}];function v9(){let e=oO(uP),t=uO(gP),n=(0,N.useRef)(null),r=(0,N.useRef)(null),[i,a]=(0,N.useState)({});(0,N.useEffect)(()=>{jE(e)&&(r.current=e.value)},[e]),(0,N.useEffect)(()=>{let e=new BroadcastChannel(`codecommit-config`);return n.current=e,e.onmessage=e=>{a(t=>({...t,...e.data}))},()=>e.close()},[]);let o=(0,N.useCallback)(e=>{let i=r.current;i&&(a(t=>({...t,...e})),n.current?.postMessage(e),t({payload:{accounts:i.accounts.map(e=>({profile:e.profile,regions:[...e.regions],enabled:e.enabled})),autoDetect:i.autoDetect,autoRefresh:e.autoRefresh??i.autoRefresh,refreshIntervalSeconds:e.refreshIntervalSeconds??i.refreshIntervalSeconds}}))},[t]);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Auto-refresh`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Periodically fetch PR updates from AWS`})]}),(0,R.jsx)(LZ,{}),UE(e).onInitialOrWaiting(()=>(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(e=>{let t=i.autoRefresh??e.autoRefresh,n=i.refreshIntervalSeconds??e.refreshIntervalSeconds;return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,R.jsx)(nI,{className:`size-4 text-muted-foreground`}),(0,R.jsx)(`span`,{children:`Auto-refresh`})]}),(0,R.jsx)(Z,{variant:t?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>o({autoRefresh:!t}),children:t?`On`:`Off`})]}),t&&(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Refresh interval`}),(0,R.jsx)(MX,{children:_9.map(e=>(0,R.jsx)(Z,{variant:n===e.value?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>o({refreshIntervalSeconds:e.value}),children:e.label},e.value))})]})]})}).render()]})}var y9={image:`codercom/code-server:latest`,extensions:[],setupCommands:[],env:{},volumeMounts:[],cloneDepth:0};function b9(){let e=oO(uP),t=uO(gP),n=(0,N.useRef)(null),[r,i]=(0,N.useState)(null),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(!1);(0,N.useEffect)(()=>{if(jE(e)&&(n.current=e.value,!r)){let t=e.value.sandbox??y9;i(t),o(t)}},[e,r]);let l=(0,N.useMemo)(()=>r!==null&&a!==null&&JSON.stringify(r)!==JSON.stringify(a),[r,a]),u=(0,N.useCallback)(e=>{i(t=>t&&{...t,...e})},[]),d=(0,N.useCallback)(()=>{let e=n.current;!e||!r||(c(!0),t({payload:{accounts:e.accounts.map(e=>({profile:e.profile,regions:[...e.regions],enabled:e.enabled})),autoDetect:e.autoDetect,autoRefresh:e.autoRefresh,refreshIntervalSeconds:e.refreshIntervalSeconds,sandbox:r}}),o(r),setTimeout(()=>c(!1),600))},[t,r]);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Sandbox`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Docker sandbox defaults for code review environments`})]}),r&&(0,R.jsx)(Z,{size:`sm`,className:`h-8 gap-1.5 px-3`,disabled:!l&&!s,onClick:d,children:s?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(SF,{className:`size-3.5`}),` Saved`]}):`Save`})]}),(0,R.jsx)(LZ,{}),UE(e).onInitialOrWaiting(()=>(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(()=>r&&(0,R.jsx)(x9,{settings:r,onChange:u})).render()]})}function x9({onChange:e,settings:t}){let[n,r]=(0,N.useState)(``),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(``),[c,l]=(0,N.useState)(``),[u,d]=(0,N.useState)(``),[f,p]=(0,N.useState)(``),[m,h]=(0,N.useState)(!1);return(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Docker Image`}),(0,R.jsx)(_Z,{value:t.image,placeholder:`codercom/code-server:latest`,onChange:t=>e({image:t.target.value}),className:`h-8 text-sm`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Base image for sandboxes. Must have code-server or install via setup commands.`})]}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Clone Depth`}),(0,R.jsx)(`div`,{className:`flex gap-1.5`,children:[{label:`Full`,value:0},{label:`1`,value:1},{label:`10`,value:10},{label:`50`,value:50},{label:`100`,value:100}].map(n=>(0,R.jsx)(Z,{variant:t.cloneDepth===n.value?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>e({cloneDepth:n.value}),children:n.label},n.value))}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`0 = full history. Higher values speed up clone but limit git log.`})]}),(0,R.jsx)(LZ,{}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`VS Code Extensions`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Installed via code-server --install-extension`}),(0,R.jsx)(C9,{settings:t,onChange:e}),(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.extensions.map(n=>(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs`,children:[(0,R.jsx)(yF,{className:`size-3 text-muted-foreground`}),n,(0,R.jsx)(`button`,{className:`ml-0.5 text-muted-foreground hover:text-foreground`,onClick:()=>e({extensions:t.extensions.filter(e=>e!==n)}),children:(0,R.jsx)(gI,{className:`size-3`})})]},n))}),(0,R.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,R.jsx)(_Z,{value:n,placeholder:`publisher.extension-id`,onChange:e=>r(e.target.value),onKeyDown:i=>{i.key===`Enter`&&n.trim()&&(e({extensions:[...t.extensions,n.trim()]}),r(``))},className:`h-8 text-sm flex-1`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!n.trim(),onClick:()=>{e({extensions:[...t.extensions,n.trim()]}),r(``)},children:(0,R.jsx)(tI,{className:`size-3.5`})})]})]}),(0,R.jsx)(LZ,{}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Setup Commands`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Shell commands run in container after ready`}),(0,R.jsx)(E9,{settings:t,onChange:e}),(0,R.jsx)(`div`,{className:`space-y-1.5`,children:t.setupCommands.map((n,r)=>(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n}),(0,R.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>e({setupCommands:t.setupCommands.filter((e,t)=>t!==r)}),children:(0,R.jsx)(pI,{className:`size-3.5`})})]},r))}),(0,R.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,R.jsx)(_Z,{value:i,placeholder:`npm i -g tsx`,onChange:e=>a(e.target.value),onKeyDown:n=>{n.key===`Enter`&&i.trim()&&(e({setupCommands:[...t.setupCommands,i.trim()]}),a(``))},className:`h-8 text-sm font-mono flex-1`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!i.trim(),onClick:()=>{e({setupCommands:[...t.setupCommands,i.trim()]}),a(``)},children:(0,R.jsx)(tI,{className:`size-3.5`})})]})]}),(0,R.jsx)(LZ,{}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Environment Variables`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Extra env vars injected into sandbox container`}),(0,R.jsx)(`div`,{className:`space-y-1.5`,children:Object.entries(t.env).map(([n,r])=>(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`code`,{className:`rounded-md bg-muted px-2 py-1 text-xs font-mono`,children:n}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`=`}),(0,R.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:r}),(0,R.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>{let r={...t.env};delete r[n],e({env:r})},children:(0,R.jsx)(pI,{className:`size-3.5`})})]},n))}),(0,R.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,R.jsx)(_Z,{value:o,placeholder:`KEY`,onChange:e=>s(e.target.value),className:`h-8 text-sm font-mono w-32`}),(0,R.jsx)(`span`,{className:`flex items-center text-xs text-muted-foreground`,children:`=`}),(0,R.jsx)(_Z,{value:c,placeholder:`value`,onChange:e=>l(e.target.value),onKeyDown:n=>{n.key===`Enter`&&o.trim()&&(e({env:{...t.env,[o.trim()]:c}}),s(``),l(``))},className:`h-8 text-sm font-mono flex-1`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!o.trim(),onClick:()=>{e({env:{...t.env,[o.trim()]:c}}),s(``),l(``)},children:(0,R.jsx)(tI,{className:`size-3.5`})})]})]}),(0,R.jsx)(LZ,{}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Volume Mounts`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Map host paths into the container`}),(0,R.jsx)(D9,{settings:t,onChange:e}),(0,R.jsx)(`div`,{className:`space-y-1.5`,children:t.volumeMounts.map((n,r)=>(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`code`,{className:`rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n.hostPath}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`:`}),(0,R.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n.containerPath}),n.readonly&&(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`(ro)`}),(0,R.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>e({volumeMounts:t.volumeMounts.filter((e,t)=>t!==r)}),children:(0,R.jsx)(pI,{className:`size-3.5`})})]},r))}),(0,R.jsxs)(`div`,{className:`flex gap-1.5 items-center`,children:[(0,R.jsx)(_Z,{value:u,placeholder:`/host/path`,onChange:e=>d(e.target.value),className:`h-8 text-sm font-mono flex-1`}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`:`}),(0,R.jsx)(_Z,{value:f,placeholder:`/container/path`,onChange:e=>p(e.target.value),onKeyDown:n=>{n.key===`Enter`&&u.trim()&&f.trim()&&(e({volumeMounts:[...t.volumeMounts,{hostPath:u.trim(),containerPath:f.trim(),readonly:m}]}),d(``),p(``),h(!1))},className:`h-8 text-sm font-mono flex-1`}),(0,R.jsx)(Z,{variant:m?`default`:`outline`,size:`sm`,className:`h-8 px-2 text-xs shrink-0`,onClick:()=>h(!m),title:`Read-only`,children:`RO`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!u.trim()||!f.trim(),onClick:()=>{e({volumeMounts:[...t.volumeMounts,{hostPath:u.trim(),containerPath:f.trim(),readonly:m}]}),d(``),p(``),h(!1)},children:(0,R.jsx)(tI,{className:`size-3.5`})})]})]})]})}var S9=[{label:`ESLint`,id:`dbaeumer.vscode-eslint`},{label:`Prettier`,id:`esbenp.prettier-vscode`},{label:`GitLens`,id:`eamodio.gitlens`},{label:`Error Lens`,id:`usernamehw.errorlens`}];function C9({onChange:e,settings:t}){let n=(0,N.useMemo)(()=>S9.filter(e=>!t.extensions.includes(e.id)),[t.extensions]);return n.length===0?null:(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>e({extensions:[...t.extensions,n.id]}),children:[(0,R.jsx)(tI,{className:`size-3`}),n.label]},n.id))})}var w9=[{label:`Node 22`,cmd:`curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs`},{label:`pnpm`,cmd:`sudo npm i -g pnpm`},{label:`Bun`,cmd:`curl -fsSL https://bun.sh/install | bash && echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.bashrc && echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.profile`}],T9=[{label:`VS Code Extensions`,mount:{hostPath:`~/.vscode/extensions`,containerPath:`/home/coder/.local/share/code-server/extensions`,readonly:!1}},{label:`VS Code Settings`,mount:{hostPath:`~/Library/Application Support/Code/User/settings.json`,containerPath:`/home/coder/.local/share/code-server/User/settings.json`,readonly:!0}},{label:`VS Code Keybindings`,mount:{hostPath:`~/Library/Application Support/Code/User/keybindings.json`,containerPath:`/home/coder/.local/share/code-server/User/keybindings.json`,readonly:!0}},{label:`SSH Keys`,mount:{hostPath:`~/.ssh`,containerPath:`/home/coder/.ssh`,readonly:!0}},{label:`Git Config`,mount:{hostPath:`~/.gitconfig`,containerPath:`/home/coder/.gitconfig`,readonly:!0}},{label:`AWS Credentials`,mount:{hostPath:`~/.aws`,containerPath:`/home/coder/.aws`,readonly:!0}}];function E9({onChange:e,settings:t}){let n=(0,N.useMemo)(()=>w9.filter(e=>!t.setupCommands.some(t=>t===e.cmd)),[t.setupCommands]);return n.length===0?null:(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>e({setupCommands:[...t.setupCommands,n.cmd]}),children:[(0,R.jsx)(tI,{className:`size-3`}),n.label]},n.label))})}function D9({onChange:e,settings:t}){let n=(0,N.useMemo)(()=>T9.filter(e=>!t.volumeMounts.some(t=>t.hostPath===e.mount.hostPath)),[t.volumeMounts]);return n.length===0?null:(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>e({volumeMounts:[...t.volumeMounts,n.mount]}),children:[(0,R.jsx)(tI,{className:`size-3`}),n.label]},n.label))})}function O9(){let{setTheme:e,theme:t}=sa();return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Theme`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose your preferred appearance`})]}),(0,R.jsx)(LZ,{}),(0,R.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:[{id:`light`,label:`Light`,icon:(0,R.jsx)(dI,{className:`size-5`})},{id:`dark`,label:`Dark`,icon:(0,R.jsx)(QF,{className:`size-5`})},{id:`system`,label:`System`,icon:(0,R.jsx)(ZF,{className:`size-5`})}].map(n=>(0,R.jsxs)(`button`,{onClick:()=>e(n.id),className:tX(`flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors`,t===n.id?`border-primary bg-primary/5`:`border-border hover:border-primary/50`),children:[n.icon,(0,R.jsx)(`span`,{className:`text-sm font-medium`,children:n.label})]},n.id))})]})}var k9={accounts:(0,R.jsx)(hI,{className:`size-4`}),refresh:(0,R.jsx)(nI,{className:`size-4`}),sandbox:(0,R.jsx)(yF,{className:`size-4`}),notifications:(0,R.jsx)(vF,{className:`size-4`}),permissions:(0,R.jsx)(cI,{className:`size-4`}),audit:(0,R.jsx)(iI,{className:`size-4`}),theme:(0,R.jsx)($F,{className:`size-4`}),config:(0,R.jsx)(LF,{className:`size-4`}),about:(0,R.jsx)(UF,{className:`size-4`})},A9={accounts:`Accounts`,refresh:`Refresh`,sandbox:`Sandbox`,notifications:`Notifications`,permissions:`Permissions`,audit:`Audit`,theme:`Theme`,config:`Config`,about:`About`},j9=e=>yI.some(t=>t===e);function M9(){let{tab:e}=lr(),t=j9(e)?e:`accounts`,n=ar();return(0,R.jsxs)(`div`,{className:`flex gap-6`,children:[(0,R.jsxs)(`nav`,{className:`w-48 shrink-0`,children:[(0,R.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`mb-4 gap-2`,onClick:()=>n(`/`),children:[(0,R.jsx)(hF,{className:`size-4`}),`Back to PRs`]}),(0,R.jsx)(`div`,{className:`flex flex-col gap-1`,role:`tablist`,children:yI.map(e=>(0,R.jsxs)(`button`,{role:`tab`,"aria-selected":t===e,onClick:()=>n(`/settings/${e}`,{replace:!0}),className:tX(`flex items-center gap-2 rounded-md px-3 py-2 text-sm text-left transition-colors`,t===e?`bg-primary text-primary-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground`),children:[k9[e],A9[e]]},e))})]}),(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[t===`accounts`&&(0,R.jsx)(i9,{}),t===`refresh`&&(0,R.jsx)(v9,{}),t===`sandbox`&&(0,R.jsx)(b9,{}),t===`notifications`&&(0,R.jsx)(p9,{}),t===`permissions`&&(0,R.jsx)(g9,{}),t===`audit`&&(0,R.jsx)(o9,{}),t===`theme`&&(0,R.jsx)(O9,{}),t===`config`&&(0,R.jsx)(l9,{}),t===`about`&&(0,R.jsx)(n9,{})]})]})}var N9=(e,t)=>cP.query(`stats`,`get`,{query:{week:e,...t},timeToLive:`30 seconds`});function P9(e,t){return oO((0,N.useMemo)(()=>N9(e,t),[e,t.repo,t.author,t.account]))}function F9(e){return e==null?`—`:YX(e)}function I9({icon:e,label:t,onClick:n,value:r}){return(0,R.jsx)(p7,{className:n?`cursor-pointer transition-colors hover:bg-accent/50`:void 0,onClick:n,children:(0,R.jsxs)(g7,{className:`flex items-center gap-3 p-4`,children:[(0,R.jsx)(`div`,{className:`rounded-md bg-muted p-2`,children:(0,R.jsx)(e,{className:`size-4 text-muted-foreground`})}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-2xl font-bold tabular-nums`,children:r}),(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:t})]})]})})}function L9({highlight:e,label:t,onClick:n,pct:r,value:i}){return(0,R.jsxs)(`div`,{className:`group relative flex items-center gap-2 rounded-md px-2 py-1.5${n?` cursor-pointer`:``}`,onClick:n,children:[(0,R.jsx)(`div`,{className:`absolute inset-0 rounded-md transition-colors ${e?`bg-amber-400/[0.08] group-hover:bg-amber-400/[0.14]`:`bg-foreground/[0.06] dark:bg-foreground/[0.08] group-hover:bg-foreground/[0.10] dark:group-hover:bg-foreground/[0.14]`}`,style:{width:`${r}%`}}),e&&(0,R.jsx)(uI,{"aria-hidden":`true`,className:`relative z-10 size-3 shrink-0 text-amber-400 fill-amber-400`,style:{animation:`star-in 400ms ease-out`}},t),(0,R.jsx)(`span`,{className:`relative z-10 flex-1 truncate text-xs${e?` text-amber-400 font-medium`:``}`,children:t}),(0,R.jsx)(`span`,{className:`relative z-10 shrink-0 text-xs tabular-nums ${e?`text-amber-400/60`:`text-muted-foreground`}`,children:i})]})}function R9({data:e,labelKey:t,onItemClick:n,title:r,valueKey:i}){let a=e.reduce((e,t)=>Math.max(e,Number(t[i])||0),0);return(0,R.jsxs)(p7,{children:[(0,R.jsx)(m7,{className:`pb-2`,children:(0,R.jsx)(h7,{className:`text-sm`,children:r})}),(0,R.jsx)(g7,{children:e.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No data`}):(0,R.jsx)(`div`,{className:`space-y-1.5`,children:e.map((e,r)=>{let o=String(e[t]),s=Number(e[i])||0;return(0,R.jsx)(L9,{label:o,value:s,pct:a>0?s/a*100:0,highlight:r===0,onClick:n?()=>n(o):void 0},o)})})})]})}function z9({dist:e,onBarClick:t}){let n=[{key:`small`,label:`S`,sub:`<5 files`,count:e.small},{key:`medium`,label:`M`,sub:`5–15`,count:e.medium},{key:`large`,label:`L`,sub:`15–30`,count:e.large},{key:`xlarge`,label:`XL`,sub:`30+`,count:e.extraLarge}],r=n.reduce((e,t)=>e+t.count,0),i=Math.max(...n.map(e=>e.count),1);return(0,R.jsxs)(p7,{children:[(0,R.jsx)(m7,{className:`pb-2`,children:(0,R.jsx)(h7,{className:`text-sm`,children:`PR Size Distribution`})}),(0,R.jsx)(g7,{children:r===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No diff data`}):(0,R.jsx)(`div`,{className:`flex items-end gap-2 h-[120px]`,children:n.map(e=>(0,R.jsxs)(`div`,{className:`flex flex-1 flex-col items-center gap-1${t&&e.count>0?` cursor-pointer`:``}`,onClick:t&&e.count>0?()=>t(e.key):void 0,children:[(0,R.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:e.count}),(0,R.jsx)(`div`,{className:`w-full flex items-end`,style:{height:80},children:(0,R.jsx)(`div`,{className:`w-full rounded-t bg-foreground/[0.12] dark:bg-foreground/[0.16] transition-all hover:bg-foreground/[0.18] dark:hover:bg-foreground/[0.22]`,style:{height:`${e.count/i*100}%`,minHeight:e.count>0?4:0}})}),(0,R.jsxs)(`div`,{className:`text-center`,children:[(0,R.jsx)(`div`,{className:`text-xs font-medium`,children:e.label}),(0,R.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:e.sub})]})]},e.key))})})]})}function B9({onPRClick:e,prs:t}){return t.length===0?null:(0,R.jsxs)(p7,{children:[(0,R.jsx)(m7,{className:`pb-2`,children:(0,R.jsx)(h7,{className:`text-sm`,children:`Most Active PRs`})}),(0,R.jsx)(g7,{children:(0,R.jsx)(`div`,{className:`space-y-2`,children:t.map(t=>(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-sm cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>e(t.awsAccountId,t.id),children:[(0,R.jsxs)(`span`,{className:`text-muted-foreground font-mono`,children:[`#`,t.id]}),(0,R.jsx)(`span`,{className:`truncate flex-1`,children:t.title}),(0,R.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t.author}),(0,R.jsx)(AX,{variant:`secondary`,className:`text-xs`,children:t.repositoryName}),(0,R.jsxs)(`span`,{className:`text-xs tabular-nums`,children:[t.commentCount,` comments`]})]},`${t.awsAccountId}:${t.id}`))})})]})}function V9({onPRClick:e,prs:t}){return t.length===0?null:(0,R.jsxs)(p7,{children:[(0,R.jsx)(m7,{className:`pb-2`,children:(0,R.jsx)(h7,{className:`text-sm flex items-center gap-1`,children:`Stale PRs`})}),(0,R.jsx)(g7,{children:(0,R.jsx)(`div`,{className:`space-y-1`,children:t.map(t=>(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-sm cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>e(t.awsAccountId,t.id),children:[(0,R.jsxs)(`span`,{className:`text-muted-foreground font-mono`,children:[`#`,t.id]}),(0,R.jsx)(`span`,{className:`truncate flex-1`,children:t.title}),(0,R.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t.author}),(0,R.jsxs)(AX,{variant:`destructive`,className:`text-xs`,children:[t.daysSinceActivity,`d idle`]})]},`${t.awsAccountId}:${t.id}`))})})]})}function H9({data:e}){return(0,R.jsxs)(p7,{children:[(0,R.jsx)(m7,{className:`pb-2`,children:(0,R.jsx)(h7,{className:`text-sm`,children:`Health`})}),(0,R.jsx)(g7,{children:(0,R.jsxs)(`div`,{className:`grid grid-cols-4 gap-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Review Coverage`}),(0,R.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.reviewCoverage==null?`—`:`${(e.reviewCoverage*100).toFixed(0)}%`})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Approval Rate`}),(0,R.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.approvalRate==null?`—`:`${(e.approvalRate*100).toFixed(0)}%`})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Stale PRs`}),(0,R.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.stalePRs.length})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Bus Factor`}),(0,R.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.busFactor?`${e.busFactor.uniqueContributors} (${(e.busFactor.topContributorShare*100).toFixed(0)}%)`:`—`})]})]})})]})}function U9({author:e,data:t,repo:n,setFilter:r}){return(0,R.jsxs)(R.Fragment,{children:[t.availableRepos.length>0&&(0,R.jsxs)(vZ,{value:n||`__all__`,onValueChange:e=>r(`repo`,e===`__all__`?void 0:e),children:[(0,R.jsx)(bZ,{className:`w-[140px] h-8 text-xs`,children:(0,R.jsx)(yZ,{placeholder:`All repos`})}),(0,R.jsxs)(xZ,{children:[(0,R.jsx)(SZ,{value:`__all__`,children:`All repos`}),t.availableRepos.map(e=>(0,R.jsx)(SZ,{value:e,children:e},e))]})]}),t.availableAuthors.length>0&&(0,R.jsxs)(vZ,{value:e||`__all__`,onValueChange:e=>r(`author`,e===`__all__`?void 0:e),children:[(0,R.jsx)(bZ,{className:`w-[140px] h-8 text-xs`,children:(0,R.jsx)(yZ,{placeholder:`All authors`})}),(0,R.jsxs)(xZ,{children:[(0,R.jsx)(SZ,{value:`__all__`,children:`All authors`}),t.availableAuthors.map(e=>(0,R.jsx)(SZ,{value:e,children:e},e))]})]})]})}function W9({details:e,goToPR:t}){return e.length===0?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground py-2`,children:`No data points`}):(0,R.jsx)(`div`,{className:`space-y-1 mt-2`,children:e.map((e,n)=>(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>t(e.awsAccountId,e.prId),children:[(0,R.jsxs)(`span`,{className:`text-muted-foreground font-mono shrink-0`,children:[`#`,e.prId]}),(0,R.jsx)(`span`,{className:`truncate flex-1`,children:e.prTitle}),(0,R.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:e.author}),(0,R.jsx)(AX,{variant:`secondary`,className:`text-[10px] shrink-0`,children:e.repositoryName}),(0,R.jsx)(`span`,{className:`font-mono tabular-nums shrink-0`,children:F9(e.durationMs)}),(0,R.jsxs)(`span`,{className:`text-muted-foreground shrink-0 text-[10px]`,children:[e.fromLabel,` → `,e.toLabel]})]},`${e.awsAccountId}:${e.prId}:${n}`))})}function G9({data:e,goToPR:t}){let[n,r]=(0,N.useState)(null),i=e=>r(t=>t===e?null:e),a=[{key:`merge`,label:`Median Time to Merge`,value:e.medianTimeToMerge,details:e.mergeTimeDetails},{key:`review`,label:`Median Time to First Review`,value:e.medianTimeToFirstReview,details:e.firstReviewDetails},{key:`feedback`,label:`Median Time to Address Feedback`,value:e.medianTimeToAddressFeedback,details:e.feedbackDetails}];return(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:a.map(e=>(0,R.jsx)(p7,{className:`cursor-pointer transition-colors hover:bg-accent/50 ${n===e.key?`ring-1 ring-ring`:``}`,onClick:()=>i(e.key),children:(0,R.jsxs)(g7,{className:`p-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,R.jsx)(wF,{className:`size-3 text-muted-foreground transition-transform ${n===e.key?`rotate-180`:``}`})]}),(0,R.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,R.jsx)(`div`,{className:`text-xl font-bold tabular-nums`,children:F9(e.value)}),e.details.length>0&&(0,R.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[e.details.length,` PRs`]})]})]})},e.key))}),n&&(0,R.jsx)(p7,{children:(0,R.jsxs)(g7,{className:`p-3`,children:[(0,R.jsxs)(`div`,{className:`text-xs font-medium mb-1`,children:[a.find(e=>e.key===n)?.label,` — Detail`]}),(0,R.jsx)(W9,{details:a.find(e=>e.key===n)?.details??[],goToPR:t})]})})]})}function K9({data:e,goToPR:t,handleSync:n,navigate:r,syncing:i}){return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,R.jsx)(I9,{label:`PRs Created`,value:e.prsCreated,icon:HF,onClick:()=>r(`/?from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,R.jsx)(I9,{label:`PRs Merged`,value:e.prsMerged,icon:HF,onClick:()=>r(`/?f=status:merged&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,R.jsx)(I9,{label:`Comments`,value:e.totalComments,icon:XF})]}),(0,R.jsx)(G9,{data:e,goToPR:t}),(0,R.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,R.jsx)(R9,{data:e.topContributors,labelKey:`author`,valueKey:`prCount`,title:`Top Contributors`,onItemClick:t=>r(`/?f=author:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,R.jsx)(R9,{data:e.topReviewers,labelKey:`author`,valueKey:`commentCount`,title:`Top Commenters`,onItemClick:t=>r(`/?f=commenter:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,R.jsx)(R9,{data:e.topApprovers,labelKey:`author`,valueKey:`approvalCount`,title:`Top Approvers`,onItemClick:t=>r(`/?f=approver:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)})]}),(0,R.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,R.jsx)(z9,{dist:e.prSizeDistribution,onBarClick:t=>r(`/?f=size:${t}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),e.avgDiffSize&&(0,R.jsx)(p7,{children:(0,R.jsxs)(g7,{className:`space-y-2 p-4`,children:[(0,R.jsx)(`div`,{className:`text-sm font-medium`,children:`Average Diff Size`}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Files added`}),(0,R.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesAdded.toFixed(1)})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Files modified`}),(0,R.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesModified.toFixed(1)})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Files deleted`}),(0,R.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesDeleted.toFixed(1)})]})]})})]}),(0,R.jsx)(B9,{prs:e.mostActivePRs,onPRClick:t}),(0,R.jsx)(H9,{data:e}),(0,R.jsx)(V9,{prs:e.stalePRs,onPRClick:t}),e.dataAvailableSince&&(0,R.jsxs)(`div`,{className:`text-xs text-muted-foreground text-center py-2`,children:[`Data available since `,WX(new Date(e.dataAvailableSince))]}),e.prsCreated===0&&e.prsMerged===0&&e.totalComments===0&&(0,R.jsxs)(`div`,{className:`text-center py-8 text-muted-foreground`,children:[(0,R.jsx)(`p`,{className:`text-sm`,children:`No activity for this week.`}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`mt-2`,onClick:n,disabled:i,children:[(0,R.jsx)(nI,{className:`size-3 mr-1 ${i?`animate-spin`:``}`}),`Sync this week`]})]})]})}function q9(){let e=ar(),[t,n]=Wi(),r=uO(jP),i=(0,N.useMemo)(()=>qX(new Date),[]),a=t.get(`week`)||i,o=t.get(`repo`)||void 0,s=t.get(`author`)||void 0,c=t.get(`account`)||void 0,l=P9(a,{repo:o,author:s,account:c}),u=oO(WP),d=u.status===`loading`,f=(0,N.useRef)(d);(0,N.useEffect)(()=>{f.current&&!d&&n(e=>(e.set(`_t`,Date.now().toString()),e)),f.current=d},[d,n]);let p=(0,N.useMemo)(()=>KX(a),[a]),m=(0,N.useMemo)(()=>p._tag===`None`?a:JX(p.value),[a,p]),h=(0,N.useCallback)(e=>{if(p._tag===`None`)return;let t=qX(new Date(p.value.start.getTime()+e*7*864e5));t>i||n(e=>(e.set(`week`,t),e))},[p,i,n]),g=(0,N.useCallback)((e,t)=>{n(n=>(t?n.set(e,t):n.delete(e),n))},[n]),_=(0,N.useCallback)(()=>{r({payload:{week:a}})},[a,r]),v=(0,N.useCallback)((t,n)=>e(`/accounts/${t}/prs/${n}`),[e]);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>e(`/`),children:(0,R.jsx)(CF,{className:`size-4`})}),(0,R.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Statistics`}),(0,R.jsx)(AX,{variant:`secondary`,className:`text-[10px] tracking-wide uppercase font-normal text-muted-foreground/60`,children:`🚧 Experimental`})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>h(-1),children:(0,R.jsx)(hF,{className:`size-4`})}),(0,R.jsx)(`span`,{className:`text-sm font-medium min-w-[220px] text-center`,children:m}),(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>h(1),disabled:a>=i,children:(0,R.jsx)(gF,{className:`size-4`})}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,onClick:()=>n(e=>(e.set(`week`,i),e)),disabled:a===i,children:[(0,R.jsx)(bF,{className:`size-3 mr-1`}),` Today`]}),(0,R.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[UE(l).onSuccess(e=>(0,R.jsx)(U9,{data:e,repo:o,author:s,setFilter:g})).render(),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,onClick:_,disabled:d,children:[(0,R.jsx)(nI,{className:`size-3 mr-1 ${d?`animate-spin`:``}`}),`Sync`]})]})]}),d&&u.statusDetail&&(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:u.statusDetail}),(o||s||c)&&(0,R.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[o&&(0,R.jsxs)(AX,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`repo`,void 0),children:[`repo: `,o,` ×`]}),s&&(0,R.jsxs)(AX,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`author`,void 0),children:[`author: `,s,` ×`]}),c&&(0,R.jsxs)(AX,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`account`,void 0),children:[`account: `,c,` ×`]})]}),(0,R.jsx)(LZ,{}),UE(l).onInitialOrWaiting(()=>(0,R.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,R.jsx)(GF,{className:`size-5 animate-spin text-muted-foreground`})})).onError(()=>(0,R.jsx)(`div`,{className:`text-sm text-destructive py-4`,children:`Failed to load stats`})).onDefect(()=>(0,R.jsx)(`div`,{className:`text-sm text-destructive py-4`,children:`Failed to load stats`})).onSuccess(t=>(0,R.jsx)(K9,{data:t,navigate:e,goToPR:v,handleSync:_,syncing:d})).render()]})}var J9=e=>typeof e==`object`&&!!e&&`fullWidth`in e,Y9=e=>J9(e.handle)&&e.handle.fullWidth===!0,X9=()=>Er().some(Y9),Z9=Mi([{element:(0,R.jsx)(gZ,{}),children:[{index:!0,element:(0,R.jsx)(z7,{})},{path:`accounts/:accountId/prs/:prId`,element:(0,R.jsx)(P7,{})},{path:`sandboxes`,element:(0,R.jsx)(e9,{})},{path:`sandbox/:sandboxId`,element:(0,R.jsx)(K7,{}),handle:{fullWidth:!0}},{path:`settings/:tab?`,element:(0,R.jsx)(M9,{})},{path:`notifications`,element:(0,R.jsx)(YZ,{})},{path:`stats`,element:(0,R.jsx)(q9,{})},{path:`audit`,element:(0,R.jsx)(MZ,{})},{path:`*`,element:(0,R.jsx)(zr,{to:`/`,replace:!0})}]}]),Q9=class extends N.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?(0,R.jsxs)(`div`,{style:{padding:`2rem`,textAlign:`center`},children:[(0,R.jsx)(`h1`,{children:`Something went wrong`}),(0,R.jsx)(`button`,{onClick:()=>window.location.reload(),style:{marginTop:`1rem`},children:`Reload`})]}):this.props.children}},$9=document.getElementById(`root`);$9&&ta.createRoot($9).render((0,R.jsx)(N.StrictMode,{children:(0,R.jsx)(Q9,{children:(0,R.jsx)(oa,{children:(0,R.jsx)(Fr,{router:Z9})})})}));
|