better-review 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,109 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,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},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function l(e){return Object.keys(e)}function u(e){return e&&typeof e==`object`&&!Array.isArray(e)}function d(e,t){let n={...e},r=t;return u(e)&&u(t)&&Object.keys(t).forEach(t=>{u(r[t])&&t in e?n[t]=d(n[t],r[t]):n[t]=r[t]}),n}function f(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function p(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function m(e){let t=p(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function h(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function g(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?h(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?h(n):n}}return r}return n}var _=g(`rem`,{shouldScale:!0}),v=g(`em`);function y(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function b(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}var x=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=ee(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function L(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function R(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else L(R.bind(null,e))}var te={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=te,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=R,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=L,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),S=o(((e,t)=>{t.exports=x()})),C=c(S(),1);function w(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==C.Fragment}function T(e){let t=(0,C.createContext)(null);return[t,()=>{let n=(0,C.use)(t);if(n===null)throw Error(e);return n}]}function E(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function D(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function O(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function k(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].disabled)return e}return e}function A(e,t,n){return D(e,n)===D(t,n)}function j({parentSelector:e,siblingSelector:t,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:a=`rtl`,orientation:o}){return s=>{n?.(s);let c=Array.from(D(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>A(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=k(l,c,r),d=O(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[k(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[O(c.length,c,!1)]?.focus()}}}var M={app:100,modal:200,popover:300,overlay:400,max:9999};function N(e){return M[e]}var ee=()=>{};function P(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||ee:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function F(e,t=`size`,n=!0){if(e!==void 0)return b(e)?n?_(e):e:`var(--${t}-${e})`}function I(e){return F(e,`mantine-spacing`)}function L(e){return e===void 0?`var(--mantine-radius-default)`:F(e,`mantine-radius`)}function R(e){return F(e,`mantine-font-size`)}function te(e){return F(e,`mantine-line-height`,!1)}function ne(e){if(e)return F(e,`mantine-shadow`,!1)}function re(e,t){return n=>{e?.(n),t?.(n)}}function ie(e,t,n){return t===void 0&&n===void 0?e:t!==void 0&&n===void 0?Math.max(e,t):Math.min(t===void 0&&n!==void 0?e:Math.max(e,t),n)}function ae(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function oe(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i<r;i+=1){let r=n[i];if(!(r in t)||e[r]!==t[r]&&!(Number.isNaN(e[r])&&Number.isNaN(t[r])))return!1}return!0}function se(e){let t=(0,C.useRef)(e);return(0,C.useEffect)(()=>{t.current=e}),(0,C.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function ce(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=se(e),s=(0,C.useRef)(0),c=(0,C.useRef)(0),l=(0,C.useRef)(null),u=(0,C.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(c.current=0,s.current!==0&&e._hasPendingCallback){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&u()},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,C.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}var le=[`mousedown`,`touchstart`];function z(e,t,n,r=!0,i=!1){let a=(0,C.useRef)(null),o=t||le,s=(0,C.useEffectEvent)(t=>{let{target:r}=t??{};if(!document.body.contains(r)&&r?.tagName!==`HTML`)return;let i=t.composedPath();Array.isArray(n)?n.every(e=>!!e&&!i.includes(e))&&e(t):a.current&&!i.includes(a.current)&&e(t)}),c=o.join(`,`);return(0,C.useEffect)(()=>{if(!r)return;let e=c.split(`,`);return e.forEach(e=>document.addEventListener(e,s,i)),()=>{e.forEach(e=>document.removeEventListener(e,s,i))}},[c,r,i]),a}function B(e,t){if(typeof t==`boolean`)return t;if(typeof window<`u`&&`matchMedia`in window)try{return window.matchMedia(e).matches}catch{return!1}return!1}function V(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,C.useState)(n?t:B(e));return(0,C.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var ue=typeof document<`u`?C.useLayoutEffect:C.useEffect;function de(e,t){return e.length!==t.length||t.some((t,n)=>!Object.is(t,e[n]))}function fe(e,t){let n=(0,C.useRef)(!1),r=(0,C.useRef)(null),i=(0,C.useRef)(void 0),a={};(0,C.useEffect)(()=>{let o=r.current===a,s=i.current;if(r.current=a,i.current=t,!n.current)n.current=!0;else if(!o&&!(t&&s&&!de(s,t)))return e()},t)}function pe({opened:e,shouldReturnFocus:t=!0}){let n=(0,C.useRef)(null),r=()=>{n.current&&`focus`in n.current&&typeof n.current.focus==`function`&&n.current?.focus({preventScroll:!0})};return fe(()=>{let i=-1,a=e=>{e.key===`Tab`&&window.clearTimeout(i)};if(document.addEventListener(`keydown`,a),e)n.current=document.activeElement;else if(t){let e=document.activeElement;i=window.setTimeout(()=>{let t=document.activeElement;(t===null||t===document.body||t===e)&&r()},10)}return()=>{window.clearTimeout(i),document.removeEventListener(`keydown`,a)}},[e,t]),r}var H=/input|select|textarea|button|object|summary|iframe/,me=`a, input, select, textarea, button, object, summary, iframe, audio[controls], video[controls], [contenteditable], [tabindex]`;function he(e){let t=e.getAttribute(`contenteditable`);return t!==null&&t!==`false`}function ge(e){let t=e.nodeName.toLowerCase();return(t===`audio`||t===`video`)&&e.hasAttribute(`controls`)}function _e(e){return e.style.display===`none`}function ve(e){if(e.getAttribute(`aria-hidden`)||e.getAttribute(`hidden`)||e.getAttribute(`type`)===`hidden`)return!1;let t=e;for(;t&&t!==document.body&&t.nodeType!==11;){if(_e(t))return!1;t=t.parentNode}return!0}function ye(e){let t=e.getAttribute(`tabindex`);return t===null&&(t=void 0),parseInt(t,10)}function be(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(ye(e));return(H.test(t)&&!e.disabled||he(e)||ge(e)||e instanceof HTMLAnchorElement&&e.href||n)&&ve(e)}function xe(e){let t=ye(e);return(Number.isNaN(t)||t>=0)&&be(e)}function Se(e){let t=Array.from(e.querySelectorAll(me)).filter(xe),n=t.filter(e=>ye(e)>0).sort((e,t)=>ye(e)-ye(t)),r=t.filter(e=>!(ye(e)>0));return[...n,...r]}var Ce=[`date`,`time`,`datetime-local`,`month`,`week`],we=[`audio`,`video`,`iframe`,`object`,`embed`];function Te(e){return!!e&&e.tagName===`INPUT`&&e.type===`radio`}function Ee(e,t){return e.name!==``&&e.name===t.name&&e.form===t.form}function De(e){let t=e.nodeName.toLowerCase();return t===`input`?Ce.includes(e.type):we.includes(t)}function Oe(e,t){let n=Se(e);return n.filter(e=>e===t||!Te(e)?!0:Te(t)&&Ee(e,t)?!1:e.checked?!0:!n.some(t=>Te(t)&&t.checked&&Ee(t,e)))}function ke(e,t,n,r){let i=e.indexOf(t);if(i!==-1)return i+1;if(t===n)return 0;let a=r?Node.DOCUMENT_POSITION_PRECEDING:Node.DOCUMENT_POSITION_FOLLOWING,o=e.findIndex(e=>(t.compareDocumentPosition(e)&a)!==0);return o===-1?0:o}function Ae(e,t,n){let r=Oe(e,t);n&&r.reverse();let i=ke(r,t,e,n);return[...r.slice(i),...r.slice(0,i)].filter(e=>e!==t)}function je(e,t){for(let n of e)if(n.focus(),t.activeElement===n)return}function Me(e,t){let n=e.getRootNode(),r=n.activeElement;if(!r||r!==e&&!e.contains(r))return;let i=Ae(e,r,t.shiftKey);De(r)?setTimeout(()=>{let t=n.activeElement;e.isConnected&&t!==r&&t!==i[0]&&je([...i,r],n)}):(t.preventDefault(),je(i,n))}var Ne=new Set;function Pe(e,t){let n=t.getRootNode().activeElement;if(!n)return!1;for(let r of Ne){let i=r.current;if(r!==e&&i&&i!==t&&t.contains(i)&&i.contains(n))return!0}return!1}function Fe(e=!0){let t=(0,C.useRef)(null),n=e=>{let t=e.querySelector(`[data-autofocus]`);if(!t){let n=Array.from(e.querySelectorAll(me));t=n.find(xe)||n.find(be)||null,!t&&be(e)&&(t=e)}t?t.focus({preventScroll:!0}):console.warn(`[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node`,e)},r=(0,C.useCallback)(r=>{e&&(r===null?t.current=null:t.current!==r&&(setTimeout(()=>{r.getRootNode()?n(r):console.warn(`[@mantine/hooks/use-focus-trap] Ref node is not part of the dom`,r)}),t.current=r))},[e]);return(0,C.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>{t.current&&n(t.current)});let r=e=>{e.key!==`Tab`||e.defaultPrevented||!t.current||Pe(t,t.current)||Me(t.current,e)};return Ne.add(t),document.addEventListener(`keydown`,r),()=>{Ne.delete(t),document.removeEventListener(`keydown`,r)}},[e]),r}var Ie=e=>(e+1)%1e6;function Le(){let[,e]=(0,C.useReducer)(Ie,0);return e}function Re(e){let t=(0,C.useId)(),[n,r]=(0,C.useState)(`mantine-${t.replace(/:/g,``)}`),i=(0,C.useRef)(!1);return ue(()=>{i.current||(i.current=!0,r(ae()))},[]),typeof e==`string`?e:n}function ze(e,t,n){let r=(0,C.useEffectEvent)(t);(0,C.useEffect)(()=>(window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)),[e])}function Be(e,t=`use-local-storage`){try{return JSON.stringify(e)}catch{throw Error(`@mantine/hooks ${t}: Failed to serialize the value`)}}function Ve(e){try{return e&&JSON.parse(e)}catch{return e}}function He(e){return{getItem:t=>{try{return window[e].getItem(t)}catch{return console.warn(`use-local-storage: Failed to get value from storage, localStorage is blocked`),null}},setItem:(t,n)=>{try{window[e].setItem(t,n)}catch{console.warn(`use-local-storage: Failed to set value to storage, localStorage is blocked`)}},removeItem:t=>{try{window[e].removeItem(t)}catch{console.warn(`use-local-storage: Failed to remove value from storage, localStorage is blocked`)}}}}function Ue(e,t){let n=e===`localStorage`?`mantine-local-storage`:`mantine-session-storage`,{getItem:r,setItem:i,removeItem:a}=He(e);return function({key:o,defaultValue:s,getInitialValueInEffect:c=!0,sync:l=!0,deserialize:u=Ve,serialize:d=e=>Be(e,t)}){let f=(0,C.useCallback)(t=>{let n;try{n=typeof window>`u`||!(e in window)||window[e]===null||!!t}catch{n=!0}if(n)return s;let i=r(o);return i===null?s:u(i)},[o,s]),[p,m]=(0,C.useState)(f(c)),h=(0,C.useCallback)(e=>{e instanceof Function?m(t=>{let r=e(t);return i(o,d(r)),queueMicrotask(()=>{window.dispatchEvent(new CustomEvent(n,{detail:{key:o,value:r}}))}),r}):(i(o,d(e)),window.dispatchEvent(new CustomEvent(n,{detail:{key:o,value:e}})),m(e))},[o]),g=(0,C.useCallback)(()=>{a(o),m(s),window.dispatchEvent(new CustomEvent(n,{detail:{key:o,value:s}}))},[o,s]);return ze(`storage`,t=>{l&&t.storageArea===window[e]&&t.key===o&&m(u(t.newValue??void 0))}),ze(n,e=>{l&&e.detail.key===o&&m(e.detail.value)}),(0,C.useEffect)(()=>{s!==void 0&&p===void 0&&h(s)},[s,p,h]),(0,C.useEffect)(()=>{let e=f();e!==void 0&&h(e)},[o]),[p===void 0?s:p,h,g]}}function We(e){let{getItem:t}=He(e);return function({key:n,defaultValue:r,deserialize:i=Ve}){let a;try{a=typeof window>`u`||!(e in window)||window[e]===null}catch{a=!0}if(a)return r;let o=t(n);return o===null?r:i(o)}}function Ge(e){return Ue(`localStorage`,`use-local-storage`)(e)}We(`localStorage`);function Ke(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function qe(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=Ke(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():Ke(e,null)}),t.clear()}}}function Je(...e){return(0,C.useCallback)(qe(...e),e)}function Ye({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,C.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function Xe(e,t){return V(`(prefers-reduced-motion: reduce)`,e,t)}var Ze={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function Qe(e){let t=(0,C.useRef)(0),[n,r]=(0,C.useState)(Ze),i=(0,C.useRef)(null);return[(0,C.useCallback)(n=>{i.current&&=(i.current.disconnect(),null),t.current&&cancelAnimationFrame(t.current),n&&(i.current=new ResizeObserver(e=>{let n=e[0];n&&(cancelAnimationFrame(t.current),t.current=requestAnimationFrame(()=>{let e=n.borderBoxSize?.[0]||n.contentBoxSize?.[0];if(e){let t=e.inlineSize,i=e.blockSize;r({width:t,height:i,x:n.contentRect.x,y:n.contentRect.y,top:n.contentRect.top,left:n.contentRect.left,bottom:n.contentRect.bottom,right:n.contentRect.right})}else r(n.contentRect)}))}),i.current.observe(n,e))},[e]),n]}function $e(e){let[t,{width:n,height:r}]=Qe(e);return{ref:t,width:n,height:r}}function et(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!oe(e[n],t[n]))return!1;return!0}function tt(e){let t=(0,C.useRef)([]),n=(0,C.useRef)(0);return et(t.current,e)||(t.current=e,n.current+=1),[n.current]}function nt(e,t){(0,C.useEffect)(e,tt(t))}var rt={" ":`space`,ArrowLeft:`arrowleft`,ArrowRight:`arrowright`,ArrowUp:`arrowup`,ArrowDown:`arrowdown`,Escape:`escape`,Esc:`escape`,esc:`escape`,Enter:`enter`,Tab:`tab`,Backspace:`backspace`,Delete:`delete`,Insert:`insert`,Home:`home`,End:`end`,PageUp:`pageup`,PageDown:`pagedown`,"+":`plus`,"-":`minus`,"*":`asterisk`,"/":`slash`};function it(e){let t=e.replace(`Key`,``).toLowerCase();return rt[e]||t}function at(e){let t=e.toLowerCase().split(`+`).map(e=>e.trim()),n={alt:t.includes(`alt`),ctrl:t.includes(`ctrl`),meta:t.includes(`meta`),mod:t.includes(`mod`),shift:t.includes(`shift`)},r=[`alt`,`ctrl`,`meta`,`shift`,`mod`],i=t.find(e=>!r.includes(e));return{...n,key:i===`[plus]`?`+`:i}}function ot(e,t,n){let{alt:r,ctrl:i,meta:a,mod:o,shift:s,key:c}=e,{altKey:l,ctrlKey:u,metaKey:d,shiftKey:f,key:p,code:m}=t;if(r!==l)return!1;if(o){if(!u&&!d)return!1}else if(i!==u||a!==d)return!1;return s===f&&!!(c&&(n?it(m)===it(c):it(p??m)===it(c)))}function st(e,t){return n=>ot(at(e),n,t)}function ct(e,t,n=!1){return e.target instanceof HTMLElement?(n||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function lt(e,t=[`INPUT`,`TEXTAREA`,`SELECT`],n=!1){let r=(0,C.useEffectEvent)(r=>{e.forEach(([e,i,a])=>{let{preventDefault:o=!0,usePhysicalKeys:s=!1}=a||{};st(e,s)(r)&&ct(r,t,n)&&(o&&r.preventDefault(),i(r))})});(0,C.useEffect)(()=>(document.documentElement.addEventListener(`keydown`,r),()=>document.documentElement.removeEventListener(`keydown`,r)),[])}function ut(e,t,n={autoInvoke:!1}){let r=(0,C.useRef)(null),i=se(e),a=(0,C.useCallback)((...e)=>{r.current||=window.setTimeout(()=>{i(...e),r.current=null},t)},[t]),o=(0,C.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,C.useEffect)(()=>(n.autoInvoke&&a(),o),[o,a]),{start:a,clear:o}}function dt(e,t,n){let r=(0,C.useRef)(null);(0,C.useEffect)(()=>{r.current&&=(r.current.disconnect(),null);let i=typeof n==`function`?n():n;return i&&(r.current=new MutationObserver(e),r.current.observe(i,t)),()=>{r.current&&=(r.current.disconnect(),null)}},[e,t,n])}function ft(){let[e,t]=(0,C.useState)(!1);return(0,C.useEffect)(()=>t(!0),[]),e}var pt=[`mouse`,`touch`],mt=10;function ht(e,t={}){let{threshold:n=400,events:r=pt,cancelOnMove:i=!1,onStart:a,onFinish:o,onCancel:s}=t,c=(0,C.useRef)(!1),l=(0,C.useRef)(!1),u=(0,C.useRef)(-1),d=(0,C.useRef)(null);(0,C.useEffect)(()=>()=>window.clearTimeout(u.current),[]);let f=r.join(`,`);return(0,C.useMemo)(()=>{if(typeof e!=`function`)return{};let t=i!==!1,f=i===!0?mt:i===!1?0:i,p=t=>{(vt(t)||_t(t))&&(a&&a(t),d.current=gt(t),l.current=!0,u.current=window.setTimeout(()=>{e(t),c.current=!0},n))},m=e=>{(vt(e)||_t(e))&&(c.current?o&&o(e):l.current&&s&&s(e),c.current=!1,l.current=!1,d.current=null,u.current!==-1&&(window.clearTimeout(u.current),u.current=-1))},h=e=>{if(!t||!l.current||c.current)return;let n=gt(e);if(!n||!d.current)return;let r=n.x-d.current.x,i=n.y-d.current.y;Math.sqrt(r*r+i*i)>f&&m(e)},g={};return r.includes(`mouse`)&&(g.onMouseDown=p,g.onMouseUp=m,g.onMouseLeave=m,t&&(g.onMouseMove=h)),r.includes(`touch`)&&(g.onTouchStart=p,g.onTouchEnd=m,g.onTouchCancel=m,t&&(g.onTouchMove=h)),g},[e,n,s,o,a,i,f])}function gt(e){if(_t(e)){let t=e.touches[0]??e.changedTouches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function _t(e){return window.TouchEvent?e.nativeEvent instanceof TouchEvent:`touches`in e.nativeEvent}function vt(e){return e.nativeEvent instanceof MouseEvent}var yt=o((e=>{var t=S();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),bt=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=yt()})),xt=c(bt(),1);function St(e){if(!e||typeof e==`string`)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Ct(e){return e.current?e.current.scrollHeight:`auto`}function wt(e){return typeof e==`number`&&e>0}function Tt({transitionDuration:e,transitionTimingFunction:t=`ease`,onTransitionEnd:n,onTransitionStart:r,expanded:i,keepMounted:a}){let o={height:0,overflow:`hidden`,...a?{}:{display:`none`}},s=(0,C.useEffectEvent)(()=>r?.()),c=(0,C.useEffectEvent)(()=>n?.()),l=(0,C.useRef)(null),[u,d]=(0,C.useState)(i?{}:o),[f,p]=(0,C.useState)(i?`entered`:`exited`),m=e=>{(0,xt.flushSync)(()=>d(e))},h=e=>{m(t=>({...t,...e}))},g=n=>{let r=e??St(n);return{transition:`height ${r}ms ${t}, opacity ${r}ms ${t}`}},_=(0,C.useRef)(0);fe(()=>{_.current+=1;let t=_.current,n=()=>_.current===t;e!==0&&s(),i?window.requestAnimationFrame(()=>{n()&&l.current&&((0,xt.flushSync)(()=>p(`entering`)),h({willChange:`height`,display:`block`,overflow:`hidden`}),window.requestAnimationFrame(()=>{if(!n()||!l.current)return;let e=Ct(l);wt(e)?h({...g(e),height:e}):(m({}),p(`entered`),c())}))}):window.requestAnimationFrame(()=>{if(!n()||!l.current)return;(0,xt.flushSync)(()=>p(`exiting`));let e=Ct(l);wt(e)?(h({...g(e),willChange:`height`,height:e}),window.requestAnimationFrame(()=>{n()&&l.current&&h({height:0,overflow:`hidden`})})):(m(o),p(`exited`),c())})},[i]);let v=e=>{if(e.target===l.current&&e.propertyName===`height`){if(i){let e=Ct(l);e===u.height?m({}):h({height:e}),p(`entered`),c()}else u.height===0&&(m(o),p(`exited`),c())}};return{state:f,getCollapseProps:e=>({"aria-hidden":!i,inert:!i,ref:qe(l,e?.ref),onTransitionEnd:v,style:{boxSizing:`border-box`,...e?.style,...u}})}}function Et(e){if(!e||typeof e==`string`)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Dt(e){return e.current?e.current.scrollWidth:`auto`}function Ot({transitionDuration:e,transitionTimingFunction:t=`ease`,onTransitionEnd:n,onTransitionStart:r,expanded:i,keepMounted:a}){let o={width:0,overflow:`hidden`,...a?{}:{display:`none`}},s=(0,C.useEffectEvent)(()=>r?.()),c=(0,C.useEffectEvent)(()=>n?.()),l=(0,C.useRef)(null),[u,d]=(0,C.useState)(i?{}:o),[f,p]=(0,C.useState)(i?`entered`:`exited`),m=e=>{(0,xt.flushSync)(()=>d(e))},h=e=>{m(t=>({...t,...e}))},g=n=>{let r=e??Et(n);return{transition:`width ${r}ms ${t}, opacity ${r}ms ${t}`}},_=(0,C.useRef)(0);fe(()=>{_.current+=1;let t=_.current,n=()=>_.current===t;e!==0&&s(),i?window.requestAnimationFrame(()=>{n()&&l.current&&((0,xt.flushSync)(()=>p(`entering`)),h({willChange:`width`,display:`block`,overflow:`hidden`}),window.requestAnimationFrame(()=>{if(!n()||!l.current)return;let e=Dt(l);wt(e)?h({...g(e),width:e}):(m({}),p(`entered`),c())}))}):window.requestAnimationFrame(()=>{if(!n()||!l.current)return;(0,xt.flushSync)(()=>p(`exiting`));let e=Dt(l);wt(e)?(h({...g(e),willChange:`width`,width:e}),window.requestAnimationFrame(()=>{n()&&l.current&&h({width:0,overflow:`hidden`})})):(m(o),p(`exited`),c())})},[i]);let v=e=>{if(e.target===l.current&&e.propertyName===`width`){if(i){let e=Dt(l);e===u.width?m({}):h({width:e}),p(`entered`),c()}else u.width===0&&(m(o),p(`exited`),c())}};return{state:f,getCollapseProps:e=>({"aria-hidden":!i,inert:!i,ref:qe(l,e?.ref),onTransitionEnd:v,style:{boxSizing:`border-box`,...e?.style,...u}})}}var kt=100;function At(e){return e>0?1:e<0?-1:0}function jt(e){let t=e??0;return typeof t==`number`?[t,t]:t}function Mt(){return{isActive:!1,pointerId:-1,startXY:[0,0],prevXY:[0,0],startTimestamp:0,prevTimestamp:0,thresholdMet:!1,firstFired:!1,lockedAxis:null,canceled:!1,lastVelocity:[0,0]}}function Nt(e,t={}){let[n,r]=(0,C.useState)(!1),i=(0,C.useRef)(e);i.current=e;let a=(0,C.useRef)(t);a.current=t;let o=(0,C.useRef)(Mt()),s=(0,C.useRef)(null);return{ref:(0,C.useCallback)(e=>{if(!e)return;let t=new AbortController,n=e=>{let t=a.current,n=o.current;if(t.axis===`x`)return[e[0],0];if(t.axis===`y`)return[0,e[1]];if(t.axis===`lock`){if(n.lockedAxis===null){let r=t.axisThreshold??1;(Math.abs(e[0])>r||Math.abs(e[1])>r)&&(n.lockedAxis=Math.abs(e[0])>=Math.abs(e[1])?`x`:`y`)}if(n.lockedAxis===`x`)return[e[0],0];if(n.lockedAxis===`y`)return[0,e[1]]}return e},c=()=>{let e=o.current;e.isActive=!1,e.pointerId=-1,e.thresholdMet=!1,e.firstFired=!1,e.lockedAxis=null,e.canceled=!1,r(!1),document.body.style.userSelect=``,document.body.style.webkitUserSelect=``,s.current?.abort(),s.current=null},l=()=>{o.current.isActive&&(o.current.canceled=!0,c())},u=()=>{r(!0),document.body.style.userSelect=`none`,document.body.style.webkitUserSelect=`none`},d=e=>{if(a.current.enabled===!1||e.button!==0||o.current.isActive)return;let t=o.current;t.isActive=!0,t.pointerId=e.pointerId,t.startXY=[e.clientX,e.clientY],t.prevXY=[e.clientX,e.clientY],t.startTimestamp=e.timeStamp,t.prevTimestamp=e.timeStamp,t.thresholdMet=!1,t.firstFired=!1,t.lockedAxis=null,t.canceled=!1,t.lastVelocity=[0,0];let[n,r]=jt(a.current.threshold);n===0&&r===0&&(t.thresholdMet=!0,t.firstFired=!0,u(),i.current({xy:[e.clientX,e.clientY],initial:[e.clientX,e.clientY],movement:[0,0],delta:[0,0],distance:[0,0],direction:[0,0],velocity:[0,0],elapsedTime:0,first:!0,last:!1,active:!0,tap:!1,canceled:!1,cancel:l,event:e})),s.current?.abort(),s.current=new AbortController;let c=s.current.signal;document.addEventListener(`pointermove`,f,{signal:c}),document.addEventListener(`pointerup`,p,{signal:c}),document.addEventListener(`pointercancel`,m,{signal:c})},f=e=>{let t=o.current;if(!t.isActive||e.pointerId!==t.pointerId)return;let r=[e.clientX-t.startXY[0],e.clientY-t.startXY[1]];if(!t.thresholdMet){let[n,i]=jt(a.current.threshold);if(Math.abs(r[0])<n&&Math.abs(r[1])<i){t.prevXY=[e.clientX,e.clientY],t.prevTimestamp=e.timeStamp;return}t.thresholdMet=!0,u()}let s=n(r),c=[e.clientX-t.prevXY[0],e.clientY-t.prevXY[1]],d=n(c),f=e.timeStamp-t.prevTimestamp,p=f>0?[Math.abs(d[0])/f,Math.abs(d[1])/f]:t.lastVelocity;t.lastVelocity=p;let m=!t.firstFired;t.firstFired=!0,t.prevXY=[e.clientX,e.clientY],t.prevTimestamp=e.timeStamp,i.current({xy:[e.clientX,e.clientY],initial:[...t.startXY],movement:s,delta:d,distance:[Math.abs(s[0]),Math.abs(s[1])],direction:[At(d[0]),At(d[1])],velocity:p,elapsedTime:e.timeStamp-t.startTimestamp,first:m,last:!1,active:!0,tap:!1,canceled:!1,cancel:l,event:e})},p=e=>{let t=o.current;if(!t.isActive||e.pointerId!==t.pointerId)return;let r=a.current;if(!t.thresholdMet){if(r.filterTaps){let a=[e.clientX-t.startXY[0],e.clientY-t.startXY[1]],o=n(a),s=[Math.abs(o[0]),Math.abs(o[1])],c=Math.max(s[0],s[1])<(r.tapThreshold??3);i.current({xy:[e.clientX,e.clientY],initial:[...t.startXY],movement:o,delta:o,distance:s,direction:[At(o[0]),At(o[1])],velocity:[0,0],elapsedTime:e.timeStamp-t.startTimestamp,first:!0,last:!0,active:!1,tap:c,canceled:!1,cancel:l,event:e})}c();return}let s=[e.clientX-t.startXY[0],e.clientY-t.startXY[1]],u=n(s),d=[Math.abs(u[0]),Math.abs(u[1])],f=[e.clientX-t.prevXY[0],e.clientY-t.prevXY[1]],p=n(f),m=e.timeStamp-t.prevTimestamp>kt?[0,0]:t.lastVelocity,h=Math.max(d[0],d[1]),g=r.filterTaps===!0&&h<(r.tapThreshold??3);i.current({xy:[e.clientX,e.clientY],initial:[...t.startXY],movement:u,delta:p,distance:d,direction:[At(p[0]),At(p[1])],velocity:m,elapsedTime:e.timeStamp-t.startTimestamp,first:!t.firstFired,last:!0,active:!1,tap:g,canceled:!1,cancel:l,event:e}),c()},m=e=>{let t=o.current;if(!t.isActive||e.pointerId!==t.pointerId)return;let r=[e.clientX-t.startXY[0],e.clientY-t.startXY[1]],a=n(r);i.current({xy:[e.clientX,e.clientY],initial:[...t.startXY],movement:a,delta:[0,0],distance:[Math.abs(a[0]),Math.abs(a[1])],direction:[0,0],velocity:[0,0],elapsedTime:e.timeStamp-t.startTimestamp,first:!t.firstFired,last:!0,active:!1,tap:!1,canceled:!0,cancel:l,event:e}),c()};return e.addEventListener(`pointerdown`,d,{signal:t.signal}),()=>{t.abort(),s.current?.abort(),s.current=null,o.current.isActive&&(o.current.isActive=!1,r(!1),document.body.style.userSelect=``,document.body.style.webkitUserSelect=``)}},[]),active:n}}function Pt(){return`development`}function Ft(e){return e?.props?.ref}function It(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`}function Lt(e){let t=C.Children.toArray(e);return t.length!==1||!w(t[0])?null:t[0]}function U(e){return e}function Rt(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=Rt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function zt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rt(e))&&(r&&(r+=` `),r+=t);return r}var Bt={};function Vt(e){let t={};return e.forEach(e=>{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=zt(t[e],n):t[e]=n})}),t}function Ht({theme:e,classNames:t,props:n,stylesCtx:r}){return Vt((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||Bt))}function Ut({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function Wt(e){return e===`auto`||e===`dark`||e===`light`}function Gt({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return Wt(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&Wt(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function Kt(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function qt(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function Jt(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function Yt(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function Xt(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function Zt(e){return qt(e)?Jt(e):e.startsWith(`rgb`)?Yt(e):e.startsWith(`hsl`)?Xt(e):{r:0,g:0,b:0,a:1}}function Qt(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function $t(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function en(e){if(e.startsWith(`oklch(`))return($t(e)||0)/100;let{r:t,g:n,b:r}=Zt(e),i=t/255,a=n/255,o=r/255,s=Qt(i),c=Qt(a),l=Qt(o);return .2126*s+.7152*c+.0722*l}function tn(e,t=.179){return!e.startsWith(`var(`)&&en(e)>t}function nn({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:tn(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:tn(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:tn(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][Kt(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:tn(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:tn(e,t.luminanceThreshold),shade:a,variable:void 0}}function rn(e,t){let n=nn({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function an(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function on(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=Zt(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function sn(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=rn(n.from,t),i=rn(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function cn(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=Zt(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var ln=cn,un=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=nn({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&an(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${_(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${_(1)} solid transparent`}:{background:e,hover:on(e,.1),color:r,border:`${_(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${_(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:on(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${_(1)} solid transparent`}}return{background:cn(e,.1),hover:cn(e,.12),color:e,border:`${_(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${_(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:cn(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${_(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:cn(e,.05),color:e,border:`${_(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${_(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:cn(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${_(1)} solid transparent`}}return{background:`transparent`,hover:cn(e,.12),color:e,border:`${_(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${_(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${_(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${_(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:on(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${_(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:on(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${_(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:on(t.white,.01),color:e,border:`${_(1)} solid transparent`}:n===`gradient`?{background:sn(r,t),hover:sn(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${_(1)} solid var(--mantine-color-default-border)`}:{}};function dn({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&nn({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function fn(e,t,n){return dn({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function pn(e,t){let n=e.colors[e.primaryColor];return an(n)?e.autoContrast?fn(n,e,t):`var(--mantine-color-white)`:dn({color:n[Kt(e,t)],theme:e,autoContrast:null})}function mn(e,t){return typeof e==`boolean`?e:t.autoContrast}var hn=(0,C.createContext)(null);function gn(){let e=(0,C.use)(hn);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function _n(){return gn().cssVariablesResolver}function vn(){return gn().classNamesPrefix}function yn(){return gn().getStyleNonce}function bn(){return gn().withStaticClasses}function xn(){return gn().headless}function Sn(){return gn().stylesTransform?.sx}function Cn(){return gn().stylesTransform?.styles}function wn(){return gn().env||`default`}function Tn(){return gn().deduplicateInlineStyles}function En(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function Dn({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,C.useRef)(null),[a,o]=(0,C.useState)(()=>e.get(t)),s=r||a,c=(0,C.useCallback)(t=>{r||(En(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,C.useCallback)(()=>{o(t),En(t,n),e.clear()},[e.clear,t]);return(0,C.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),ue(()=>{En(e.get(t),n)},[]),(0,C.useEffect)(()=>{if(r)return En(r,n),()=>{};r===void 0&&En(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&En(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var On=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})),kn=o(((e,t)=>{t.exports=On()})),An={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},jn=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,Mn={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:An,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:un,autoContrast:!1,luminanceThreshold:.3,fontFamily:jn,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:jn,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:_(34),lineHeight:`1.3`},h2:{fontSize:_(26),lineHeight:`1.35`},h3:{fontSize:_(22),lineHeight:`1.4`},h4:{fontSize:_(18),lineHeight:`1.45`},h5:{fontSize:_(16),lineHeight:`1.5`},h6:{fontSize:_(14),lineHeight:`1.5`}}},fontSizes:{xs:_(12),sm:_(14),md:_(16),lg:_(18),xl:_(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:_(2),sm:_(4),md:_(8),lg:_(16),xl:_(32)},spacing:{xs:_(10),sm:_(12),md:_(16),lg:_(20),xl:_(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${_(1)} ${_(3)} rgba(0, 0, 0, 0.05), 0 ${_(1)} ${_(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${_(1)} ${_(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${_(10)} ${_(15)} ${_(-5)}, rgba(0, 0, 0, 0.04) 0 ${_(7)} ${_(7)} ${_(-5)}`,md:`0 ${_(1)} ${_(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${_(20)} ${_(25)} ${_(-5)}, rgba(0, 0, 0, 0.04) 0 ${_(10)} ${_(10)} ${_(-5)}`,lg:`0 ${_(1)} ${_(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${_(28)} ${_(23)} ${_(-7)}, rgba(0, 0, 0, 0.04) 0 ${_(12)} ${_(12)} ${_(-7)}`,xl:`0 ${_(1)} ${_(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${_(36)} ${_(28)} ${_(-7)}, rgba(0, 0, 0, 0.04) 0 ${_(17)} ${_(17)} ${_(-7)}`},other:{},components:{}},Nn=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,Pn=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function Fn(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function In(e){if(!(e.primaryColor in e.colors))throw Error(Nn);if(typeof e.primaryShade==`object`&&(!Fn(e.primaryShade.dark)||!Fn(e.primaryShade.light))||typeof e.primaryShade==`number`&&!Fn(e.primaryShade))throw Error(Pn)}function Ln(e,t){if(!t)return In(e),e;let n=d(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),In(n),n}var W=kn(),Rn=(0,C.createContext)(null),zn=()=>(0,C.use)(Rn)||Mn;function Bn(){let e=(0,C.use)(Rn);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function Vn({theme:e,children:t,inherit:n=!0}){let r=zn(),i=(0,C.useMemo)(()=>Ln(n?r:Mn,e),[e,r,n]);return(0,W.jsx)(Rn,{value:i,children:t})}Vn.displayName=`@mantine/core/MantineThemeProvider`;function Hn(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function Un(e,t){let n=t?[t]:[`:root`,`:host`],r=Hn(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=Hn(e.dark),o=Hn(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function Wn({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=Kt(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:ln(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=Kt(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:on(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:on(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:ln(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function Gn(e,t,n){l(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var Kn=e=>{let t=Kt(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:_(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":pn(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":pn(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};Gn(r.variables,e.breakpoints,`breakpoint`),Gn(r.variables,e.spacing,`spacing`),Gn(r.variables,e.fontSizes,`font-size`),Gn(r.variables,e.lineHeights,`line-height`),Gn(r.variables,e.shadows,`shadow`),Gn(r.variables,e.radius,`radius`),Gn(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),l(e.colors).forEach(t=>{let n=e.colors[t];an(n)?(Object.assign(r.light,Wn({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,Wn({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),r.light[`--mantine-color-${n.name}-contrast`]=fn(n,e,`light`),r.dark[`--mantine-color-${n.name}-contrast`]=fn(n,e,`dark`)):(n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,Wn({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,Wn({theme:e,color:t,colorScheme:`dark`,withColorValues:!1})))});let i=e.headings.sizes;return l(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function qn(){let e=Bn(),t=yn(),n=l(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=m(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:v(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:v(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,W.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function Jn({theme:e,generator:t}){let n=Kn(e),r=t?.(e);return r?d(n,r):n}var Yn=Kn(Mn);function Xn(e){let t={variables:{},light:{},dark:{}};return l(e.variables).forEach(n=>{Yn.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),l(e.light).forEach(n=>{Yn.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),l(e.dark).forEach(n=>{Yn.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function Zn(e){return Un({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function Qn({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=Bn(),r=yn(),i=Jn({theme:n,generator:_n()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=Un(a?Xn(i):i,e);return o?(0,W.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:Zn(e)}`}}):null}Qn.displayName=`@mantine/CssVariables`;function $n({respectReducedMotion:e,getRootElement:t}){ue(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function er({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=Gt(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h,deduplicateInlineStyles:g=!1}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=Dn({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return $n({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,W.jsx)(hn,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h,deduplicateInlineStyles:g},children:(0,W.jsxs)(Vn,{theme:e,children:[o&&(0,W.jsx)(Qn,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,W.jsx)(qn,{}),t]})})}er.displayName=`@mantine/core/MantineProvider`;function G(e,t,n){let r=Bn(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...y(n)}}function tr(e){return e}function nr({classNames:e,styles:t,props:n,stylesCtx:r}){let i=Bn();return{resolvedClassNames:e===void 0?void 0:Ht({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:t===void 0?void 0:Ut({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var rr={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function ir({theme:e,options:t,unstyled:n}){return zt(t?.focusable&&!n&&(e.focusClassName||rr[e.focusRing]),t?.active&&!n&&e.activeClassName)}function ar(e,t,n=1){if(Object.is(e,t))return!0;if(n===0||typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(!ar(e[r],t[r],n-1))return!1;return!0}let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let i of r)if(!Object.hasOwn(t,i)||!ar(e[i],t[i],n-1))return!1;return!0}function or({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return Ht({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function sr({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return Ht({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function cr({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function lr({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function ur({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function dr({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function fr({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return zt(ir({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),dr({options:t,classes:s,selector:r,unstyled:c||m}),a[r],sr({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),or({selector:r,stylesCtx:f,options:t,props:d,theme:e}),cr({rootSelector:u,selector:r,className:l}),lr({selector:r,classes:s,unstyled:c||m}),p&&!m&&ur({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function pr({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...pr({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function mr({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&Ut({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...pr({style:n?.style,theme:e})}}function hr(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...y(t[n])}}),e),{})}function gr({props:e,stylesCtx:t,themeName:n,theme:r}){let i=Cn()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function K({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f,stable:p}){let m=Bn(),h=vn(),g=bn(),_=xn(),v=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:y,getTransformedStyles:b}=gr({props:n,stylesCtx:r,themeName:v,theme:m}),x=Ht({theme:m,classNames:c,props:n,stylesCtx:r}),S=v.map(e=>Ht({theme:m,classNames:m.components[e]?.classNames,props:n,stylesCtx:r})),C=y?{}:Ut({theme:m,styles:l,props:n,stylesCtx:r}),w={};if(!y)for(let e of v){let t=Ut({theme:m,styles:m.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))w[e]={...w[e],...t[e]}}let T=hr([_?{}:d?.(m,n,r),...v.map(e=>m.components?.[e]?.vars?.(m,n,r)),u?.(m,n,r)]),E=pr({style:a,theme:m});return _r((e,a)=>({...f?.[e],className:fr({theme:m,options:a,themeName:v,selector:e,classNamesPrefix:h,resolvedClassNames:x,resolvedThemeClassNames:S,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:g,headless:_,transformedStyles:b([a?.styles,l])}),style:mr({theme:m,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:y,resolvedStyles:C,resolvedThemeStyles:w,resolvedVars:T,resolvedRootStyle:E})}),!!p,[m,h,g,_,y?n:null,t,s,i,o,f,r,x,S,C,w,T,E])}function _r(e,t,n){let r=(0,C.useRef)(null);return t?((!r.current||!ar(r.current.deps,n,3))&&(r.current={deps:n,getStyles:e}),r.current.getStyles):e}function vr(e){return l(e).reduce((t,n)=>e[n]===void 0?t:`${t}${f(n)}:${e[n]};`,``).trim()}function yr({selector:e,styles:t,media:n,container:r}){let i=t?vr(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${vr(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${vr(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function br(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function xr({deduplicate:e,...t}){let n=yn(),r=yr(t);return e?(0,W.jsx)(`style`,{href:`mantine-${br(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,W.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function Sr(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function Cr(e,t){return`__mdi__-${Sr(`${e?vr(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${vr(e.styles)}`).join(`|`):``}`)}`}function wr(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:b,ps:x,pis:S,pie:C,bd:w,bdrs:T,bg:E,c:D,opacity:O,ff:k,fz:A,fw:j,lts:M,ta:N,lh:ee,fs:P,tt:F,td:I,w:L,miw:R,maw:te,h:ne,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:se,bga:ce,pos:le,top:z,left:B,bottom:V,right:ue,inset:de,display:fe,flex:pe,hiddenFrom:H,visibleFrom:me,lightHidden:he,darkHidden:ge,sx:_e,...ve}=e;return{styleProps:y({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:S,pie:C,pe:b,ps:x,bd:w,bg:E,c:D,opacity:O,ff:k,fz:A,fw:j,lts:M,ta:N,lh:ee,fs:P,tt:F,td:I,w:L,miw:R,maw:te,h:ne,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:se,bga:ce,pos:le,top:z,left:B,bottom:V,right:ue,inset:de,display:fe,flex:pe,bdrs:T,hiddenFrom:H,visibleFrom:me,lightHidden:he,darkHidden:ge,sx:_e}),rest:ve}}var Tr={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function Er(e,t){let n=nn({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function Dr(e,t){let n=nn({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:Er(e,t)}function Or(e,t){if(typeof e==`number`)return _(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${_(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${Er(i.join(` `),t)}`),a.trim()}return e}var kr={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function Ar(e){return typeof e==`string`&&e in kr?kr[e]:e}var jr=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Mr(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&jr.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?_(e):e}function Nr(e){return e}var Pr=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Fr(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&Pr.includes(e)?`var(--mantine-${e}-line-height)`:e}function Ir(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?_(e):e}function Lr(e){return typeof e==`number`?_(e):e}function Rr(e,t){if(typeof e==`number`)return _(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return _(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var zr={color:Er,textColor:Dr,fontSize:Mr,spacing:Rr,radius:Ir,identity:Nr,size:Lr,lineHeight:Fr,fontFamily:Ar,border:Or};function Br(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function Vr({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(Br(e))-Number(Br(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function Hr(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function Ur(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Wr(e){return typeof e==`object`&&e?l(e).filter(e=>e!==`base`):[]}function Gr(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Kr({styleProps:e,data:t,theme:n}){return Vr(l(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=Ur(e[i]);if(!Hr(e[i]))return o.forEach(e=>{r.inlineStyles[e]=zr[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=Wr(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=zr[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:zr[a.type](Gr(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function qr(){return`__m__-${(0,C.useId)().replace(/[:«»]/g,``)}`}function Jr(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Jr(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Yr(e){return e}var Xr=Yr;function Zr(e){return e}function q(e){let t=e;return t.extend=Zr,t.withProps=e=>{let n=n=>(0,W.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Qr(e){return q(e)}function $r(e){let t=e;return t.withProps=e=>{let n=n=>(0,W.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Zr,t}function ei(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function ti(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[ei(n)]=e[n]),t},{})}function ni(e){return e?typeof e==`string`?{[ei(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...ni(t)}),{}):ti(e):null}function ri(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...ri(n,t)}),{}):typeof e==`function`?e(t):e??{}}function ii({theme:e,style:t,vars:n,styleProps:r}){let i=ri(t,e),a=ri(n,e);return{...i,...a,...r}}function ai({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=Bn(),g=e||`div`,{styleProps:_,rest:v}=wr(m),y=Sn()?.()?.(_.sx),x=qr(),S=Kr({styleProps:_,theme:h,data:Tr}),C=Tn(),w=C&&S.hasResponsiveStyles?Cr(S.styles,S.media):x,T={ref:p,style:ii({theme:h,style:t,vars:n,styleProps:S.inlineStyles}),className:zt(r,y,{[w]:S.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":b(o)?void 0:o||void 0,size:f,...ni(a),...v};return(0,W.jsxs)(W.Fragment,{children:[S.hasResponsiveStyles&&(0,W.jsx)(xr,{selector:`.${w}`,styles:S.styles,media:S.media,deduplicate:C}),typeof d==`function`?d(T):(0,W.jsx)(g,{...T})]})}ai.displayName=`@mantine/core/Box`;var J=Xr(ai),oi=(0,C.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function si(){return(0,C.use)(oi)}var ci={transitionDuration:200,transitionTimingFunction:`ease`,animateOpacity:!0,orientation:`vertical`,keepMounted:!0,keepMountedMode:`activity`},li=q(e=>{let{children:t,expanded:n,transitionDuration:r,transitionTimingFunction:i,style:a,onTransitionEnd:o,onTransitionStart:s,animateOpacity:c,keepMounted:l,keepMountedMode:u,ref:d,orientation:f,...p}=G(`Collapse`,ci,e),m=wn(),h=Bn(),g=Xe(),_=h.respectReducedMotion&&g?0:r,v=(f===`horizontal`?Ot:Tt)({expanded:n,transitionDuration:_,transitionTimingFunction:i,onTransitionEnd:o,onTransitionStart:s,keepMounted:!1});if(_===0)return l===!0&&(u===`display-none`||m!==`test`)?u===`display-none`?(0,W.jsx)(J,{...p,style:{...Jr(a,h),...n?{}:{display:`none`}},ref:d,children:t}):(0,W.jsx)(C.Activity,{mode:n?`visible`:`hidden`,children:(0,W.jsx)(J,{...p,style:a,ref:d,children:t})}):n?(0,W.jsx)(J,{...p,style:a,ref:d,children:t}):null;let y=v.state===`exited`,b;return b=l===!1?y?null:t:l===!0?u===`display-none`?t:(0,W.jsx)(C.Activity,{mode:y?`hidden`:`visible`,children:t}):t,(0,W.jsx)(J,{...p,...v.getCollapseProps({style:{opacity:n||!c?1:0,transition:c?`opacity ${_}ms ${i}`:`none`,...Jr(a,h),...l&&u===`display-none`&&y?{display:`none`}:{}},ref:d}),children:b})});li.displayName=`@mantine/core/Collapse`;var[ui,di]=T(`ScrollArea.Root component was not found in tree`);function fi(e,t){let n=(0,C.useEffectEvent)(t);ue(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function pi(e){let{style:t,...n}=e,r=di(),[i,a]=(0,C.useState)(0),[o,s]=(0,C.useState)(0),c=!!(i&&o);return fi(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),fi(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,W.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function mi(e){let t=di(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,W.jsx)(pi,{...e}):null}var hi={scrollHideDelay:1e3,type:`hover`};function gi(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=G(`ScrollAreaRoot`,hi,e),[s,c]=(0,C.useState)(null),[l,u]=(0,C.useState)(null),[d,f]=(0,C.useState)(null),[p,m]=(0,C.useState)(null),[h,g]=(0,C.useState)(null),[_,v]=(0,C.useState)(0),[y,b]=(0,C.useState)(0),[x,S]=(0,C.useState)(!1),[w,T]=(0,C.useState)(!1),E=Je(a,c);return(0,W.jsx)(ui,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,W.jsx)(J,{...o,ref:E,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}gi.displayName=`@mantine/core/ScrollAreaRoot`;function _i(e,t){let n=e/t;return Number.isNaN(n)?0:n}function vi(e){let t=_i(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function yi(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function bi(e,[t,n]){return Math.min(n,Math.max(t,e))}function xi(e,t,n=`ltr`){let r=vi(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=bi(e,n===`ltr`?[0,o]:[o*-1,0]);return yi([0,o],[0,s])(c)}function Si(e,t,n,r=`ltr`){let i=vi(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return yi([c,l],d)(e)}function Ci(e,t){return e>0&&e<t}function wi(e){return e?parseInt(e,10):0}function Ti(e,t,{checkForDefaultPrevented:n=!0}={}){return r=>{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[Ei,Di]=T(`ScrollAreaScrollbar was not found in tree`);function Oi(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=di(),[p,m]=(0,C.useState)(null),h=Je(u,m),g=(0,C.useRef)(null),_=(0,C.useRef)(``),v=t.content-t.viewport,y=(0,C.useEffectEvent)(e=>c(e,v)),b=se(o),x=ce(l,10),S=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,C.useEffect)(()=>{if(!p)return;let e=e=>y(e);return p.addEventListener(`wheel`,e,{passive:!1}),()=>p.removeEventListener(`wheel`,e)},[p]),(0,C.useEffect)(b,[t,b]),fi(p,x),fi(f.content,x),(0,W.jsx)(Ei,{value:{scrollbar:p,hasThumb:n,onThumbChange:se(r),onThumbPointerUp:se(i),onThumbPositionChange:b,onThumbPointerDown:se(a)},children:(0,W.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:Ti(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,S(e))}),onPointerMove:Ti(e.onPointerMove,S),onPointerUp:Ti(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var ki=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=di(),[s,c]=(0,C.useState)(),l=(0,C.useRef)(null),u=Je(i,l,o.onScrollbarXChange);return(0,C.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,W.jsx)(Oi,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${vi(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Ci(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:wi(s.paddingLeft),paddingEnd:wi(s.paddingRight)}})}})};ki.displayName=`@mantine/core/ScrollAreaScrollbarX`;function Ai(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=di(),[s,c]=(0,C.useState)(),l=(0,C.useRef)(null),u=Je(i,l,o.onScrollbarYChange);return(0,C.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,W.jsx)(Oi,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${vi(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Ci(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:wi(s.paddingTop),paddingEnd:wi(s.paddingBottom)}})}})}Ai.displayName=`@mantine/core/ScrollAreaScrollbarY`;function ji(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=si(),i=di(),a=(0,C.useRef)(null),o=(0,C.useRef)(0),[s,c]=(0,C.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=_i(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>Si(e,o.current,s,t);return t===`horizontal`?(0,W.jsx)(ki,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=xi(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,W.jsx)(Ai,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=xi(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}ji.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function Mi(e){let t=di(),{forceMount:n,...r}=e,[i,a]=(0,C.useState)(!1),o=e.orientation===`horizontal`,s=ce(()=>{if(t.viewport){let e=t.viewport.offsetWidth<t.viewport.scrollWidth,n=t.viewport.offsetHeight<t.viewport.scrollHeight;a(o?e:n)}},10);return fi(t.viewport,s),fi(t.content,s),n||i?(0,W.jsx)(ji,{"data-state":i?`visible`:`hidden`,...r}):null}Mi.displayName=`@mantine/core/ScrollAreaScrollbarAuto`;function Ni(e){let{forceMount:t,...n}=e,r=di(),[i,a]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,W.jsx)(Mi,{"data-state":i?`visible`:`hidden`,...n}):null}Ni.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function Pi(e){let{forceMount:t,...n}=e,r=di(),i=e.orientation===`horizontal`,[a,o]=(0,C.useState)(`hidden`),s=ce(()=>o(`idle`),100);return(0,C.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,C.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,W.jsx)(ji,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:Ti(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:Ti(e.onPointerLeave,()=>o(`idle`))}):null}function Fi(e){let{forceMount:t,...n}=e,r=di(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,C.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,W.jsx)(Ni,{...n,forceMount:t}):r.type===`scroll`?(0,W.jsx)(Pi,{...n,forceMount:t}):r.type===`auto`?(0,W.jsx)(Mi,{...n,forceMount:t}):r.type===`always`?(0,W.jsx)(ji,{...n}):null}Fi.displayName=`@mantine/core/ScrollAreaScrollbar`;function Ii(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function Li(e){let{style:t,ref:n,...r}=e,i=di(),a=Di(),{onThumbPositionChange:o}=a,s=Je(n,a.onThumbChange),c=(0,C.useRef)(void 0),l=ce(()=>{c.current&&=(c.current(),void 0)},100);return(0,C.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=Ii(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,W.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:Ti(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:Ti(e.onPointerUp,a.onThumbPointerUp)})}Li.displayName=`@mantine/core/ScrollAreaThumb`;function Ri(e){let{forceMount:t,...n}=e,r=Di();return t||r.hasThumb?(0,W.jsx)(Li,{...n}):null}Ri.displayName=`@mantine/core/ScrollAreaThumb`;function zi({children:e,style:t,ref:n,onWheel:r,...i}){let a=di(),o=Je(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,W.jsx)(J,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,W.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}zi.displayName=`@mantine/core/ScrollAreaViewport`;var Bi={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function Vi(){return typeof window<`u`}function Hi(e){return Gi(e)?(e.nodeName||``).toLowerCase():`#document`}function Ui(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wi(e){return((Gi(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Gi(e){return Vi()?e instanceof Node||e instanceof Ui(e).Node:!1}function Ki(e){return Vi()?e instanceof Element||e instanceof Ui(e).Element:!1}function qi(e){return Vi()?e instanceof HTMLElement||e instanceof Ui(e).HTMLElement:!1}function Ji(e){return!Vi()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ui(e).ShadowRoot}function Y(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=aa(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Yi(e){return/^(table|td|th)$/.test(Hi(e))}function Xi(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Zi=/transform|translate|scale|rotate|perspective|filter/,Qi=/paint|layout|strict|content/,$i=e=>!!e&&e!==`none`,ea;function ta(e){let t=Ki(e)?aa(e):e;return $i(t.transform)||$i(t.translate)||$i(t.scale)||$i(t.rotate)||$i(t.perspective)||!ra()&&($i(t.backdropFilter)||$i(t.filter))||Zi.test(t.willChange||``)||Qi.test(t.contain||``)}function na(e){let t=sa(e);for(;qi(t)&&!ia(t);){if(ta(t))return t;if(Xi(t))return null;t=sa(t)}return null}function ra(){return ea??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ea}function ia(e){return/^(html|body|#document)$/.test(Hi(e))}function aa(e){return Ui(e).getComputedStyle(e)}function oa(e){return Ki(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sa(e){if(Hi(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ji(e)&&e.host||Wi(e);return Ji(t)?t.host:t}function ca(e){let t=sa(e);return ia(t)?(e.ownerDocument||e).body:qi(t)&&Y(t)?t:ca(t)}function la(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ca(e),i=r===e.ownerDocument?.body,a=Ui(r);if(i){let e=ua(a);return t.concat(a,a.visualViewport||[],Y(r)?r:[],e&&n?la(e):[])}return t.concat(r,la(r,[],n))}function ua(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var da=[`top`,`right`,`bottom`,`left`],fa=Math.min,pa=Math.max,ma=Math.round,ha=Math.floor,ga=e=>({x:e,y:e}),_a={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function va(e,t,n){return pa(e,fa(t,n))}function ya(e,t){return typeof e==`function`?e(t):e}function ba(e){return e.split(`-`)[0]}function xa(e){return e.split(`-`)[1]}function Sa(e){return e===`x`?`y`:`x`}function Ca(e){return e===`y`?`height`:`width`}function wa(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ta(e){return Sa(wa(e))}function Ea(e,t,n){n===void 0&&(n=!1);let r=xa(e),i=Ta(e),a=Ca(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Fa(o)),[o,Fa(o)]}function Da(e){let t=Fa(e);return[Oa(e),t,Oa(t)]}function Oa(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ka=[`left`,`right`],Aa=[`right`,`left`],ja=[`top`,`bottom`],Ma=[`bottom`,`top`];function Na(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Aa:ka:t?ka:Aa;case`left`:case`right`:return t?ja:Ma;default:return[]}}function Pa(e,t,n,r){let i=xa(e),a=Na(ba(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Oa)))),a}function Fa(e){let t=ba(e);return _a[t]+e.slice(t.length)}function Ia(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function La(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ia(e)}function Ra(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 za(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ba(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function Va(){return/apple/i.test(navigator.vendor)}function Ha(){return za().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function Ua(){return Ba().includes(`jsdom/`)}var Wa=`data-floating-ui-focusable`,Ga=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function Ka(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function qa(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ji(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ja(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ya(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Xa(e){return e.matches(`html,body`)}function Za(e){return e?.ownerDocument||document}function Qa(e){return qi(e)&&e.matches(Ga)}function $a(e){if(!e||Ua())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function eo(e){return e?e.hasAttribute(Wa)?e:e.querySelector(`[`+Wa+`]`)||e:null}function to(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...to(e,t.id,n)])}function no(e){return`nativeEvent`in e}function ro(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var io=typeof document<`u`?C.useLayoutEffect:function(){},ao={...C};function oo(e){let t=C.useRef(e);return io(()=>{t.current=e}),t}var so=ao.useInsertionEffect||(e=>e());function co(e){let t=C.useRef(()=>{});return so(()=>{t.current=e}),C.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function lo(e,t,n){let{reference:r,floating:i}=e,a=wa(t),o=Ta(t),s=Ca(o),c=ba(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=xa(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function uo(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}=ya(t,e),p=La(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ra(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=Ra(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 fo=50,po=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:uo},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=lo(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<fo&&(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}=lo(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},mo=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}=ya(e,t)||{};if(l==null)return{};let d=La(u),f={x:n,y:r},p=Ta(i),m=Ca(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=fa(d[_],T),D=fa(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=va(E,k,O),j=!c.arrow&&xa(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),ho=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}=ya(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ba(r),_=wa(o),v=ba(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Fa(o)]:Da(o)),x=p!==`none`;!d&&x&&b.push(...Pa(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=Ea(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`||_===wa(t)||T.every(e=>wa(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=wa(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function go(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _o(e){return da.some(t=>e[t]>=0)}var vo=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=ya(e,t);switch(i){case`referenceHidden`:{let e=go(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_o(e)}}}case`escaped`:{let e=go(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_o(e)}}}default:return{}}}}};function yo(e){let t=fa(...e.map(e=>e.left)),n=fa(...e.map(e=>e.top)),r=pa(...e.map(e=>e.right)),i=pa(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function bo(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>Ra(yo(e)))}var xo=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=ya(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=bo(u),f=Ra(yo(u)),p=La(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(wa(n)===`y`){let e=d[0],t=d[d.length-1],r=ba(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return Ra({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=ba(n)===`left`,t=pa(...d.map(e=>e.right)),r=fa(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return Ra({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},So=new Set([`left`,`top`]);async function Co(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ba(n),s=xa(n),c=wa(n)===`y`,l=So.has(o)?-1:1,u=a&&c?-1:1,d=ya(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 wo=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 Co(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}}}}},To=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}=ya(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=wa(i),p=Sa(f),m=u[p],h=u[f],g=(e,t)=>va(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Eo=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}=ya(e,t),u={x:n,y:r},d=wa(i),f=Sa(d),p=u[f],m=u[d],h=ya(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=So.has(ba(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}}}},Do=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=ya(e,t),c=await i.detectOverflow(t,s),l=ba(n),u=xa(n),d=wa(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=fa(p-c[m],g),y=fa(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*pa(c.left,c.right):S=p-2*pa(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Oo(e){let t=aa(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=qi(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ma(n)!==a||ma(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ko(e){return Ki(e)?e:e.contextElement}function Ao(e){let t=ko(e);if(!qi(t))return ga(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Oo(t),o=(a?ma(n.width):n.width)/r,s=(a?ma(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var jo=ga(0);function Mo(e){let t=Ui(e);return!ra()||!t.visualViewport?jo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function X(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ui(e)}function No(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ko(e),o=ga(1);t&&(r?Ki(r)&&(o=Ao(r)):o=Ao(e));let s=X(a,n,r)?Mo(a):ga(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ui(a),t=Ki(r)?Ui(r):r,n=e,i=ua(n);for(;i&&t!==n;){let e=Ao(i),t=i.getBoundingClientRect(),r=aa(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=Ui(i),i=ua(n)}}return Ra({width:u,height:d,x:c,y:l})}function Po(e,t){let n=oa(e).scrollLeft;return t?t.left+n:No(Wi(e)).left+n}function Fo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Po(e,n),y:n.top+t.scrollTop}}function Io(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Wi(r),s=t?Xi(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ga(1),u=ga(0),d=qi(r);if((d||!a)&&((Hi(r)!==`body`||Y(o))&&(c=oa(r)),d)){let e=No(r);l=Ao(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Fo(o,c):ga(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 Lo(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ro(e){let t=oa(e),n=e.ownerDocument.body,r=pa(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=pa(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Po(e),o=-t.scrollTop;return aa(n).direction===`rtl`&&(a+=pa(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var zo=25;function Bo(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ui(e),a=Wi(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!ra()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Po(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=zo&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Vo(e,t){let n=No(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ao(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ho(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Bo(e,n,t);else if(t===`document`)r=Ro(Wi(e));else if(Ki(t))r=Vo(t,n);else{let n=Mo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ra(r)}function Uo(e,t){let n=t.get(e);if(n)return n;let r=la(e,[],!1).filter(e=>Ki(e)&&Hi(e)!==`body`),i=null,a=aa(e).position===`fixed`,o=a?sa(e):e;for(;Ki(o)&&!ia(o);){let e=aa(o),t=ta(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=sa(o)}return t.set(e,r),r}function Wo(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Xi(t)?[]:Uo(t,this._c):[].concat(n),r],o=Ho(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=Ho(t,a[e],i);s=pa(n.top,s),c=fa(n.right,c),l=fa(n.bottom,l),u=pa(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Go(e){let{width:t,height:n}=Oo(e);return{width:t,height:n}}function Ko(e,t,n){let r=qi(t),i=Wi(t),a=n===`fixed`,o=No(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ga(0);if((r||!a)&&((Hi(t)!==`body`||Y(i))&&(s=oa(t)),r)){let e=No(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Po(i));let l=i&&!r&&!a?Fo(i,s):ga(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function qo(e){return aa(e).position===`static`}function Jo(e,t){if(!qi(e)||aa(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Wi(e)===n&&(n=n.ownerDocument.body),n}function Yo(e,t){let n=Ui(e);if(Xi(e))return n;if(!qi(e)){let t=sa(e);for(;t&&!ia(t);){if(Ki(t)&&!qo(t))return t;t=sa(t)}return n}let r=Jo(e,t);for(;r&&Yi(r)&&qo(r);)r=Jo(r,t);return r&&ia(r)&&qo(r)&&!ta(r)?n:r||na(e)||n}var Xo=async function(e){let t=this.getOffsetParent||Yo,n=this.getDimensions,r=await n(e.floating);return{reference:Ko(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Zo(e){return aa(e).direction===`rtl`}var Qo={convertOffsetParentRelativeRectToViewportRelativeRect:Io,getDocumentElement:Wi,getClippingRect:Wo,getOffsetParent:Yo,getElementRects:Xo,getClientRects:Lo,getDimensions:Go,getScale:Ao,isElement:Ki,isRTL:Zo};function $o(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function es(e,t,n){let r=null,i,a=Wi(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ha(d),h=ha(a.clientWidth-(u+f)),g=ha(a.clientHeight-(d+p)),_=ha(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:pa(0,fa(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!$o(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ui(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function ts(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=ko(e),u=i||a?[...l?la(l):[],...t?la(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?es(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?No(e):null;c&&g();function g(){let t=No(e);h&&!$o(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 ns=wo,rs=To,is=ho,as=Do,os=vo,ss=mo,cs=xo,ls=Eo,us=(e,t,n)=>{let r=new Map,i=n??{},a={...Qo,...i.platform,_c:r};return po(e,t,{...i,platform:a})},ds=typeof document<`u`?C.useLayoutEffect:function(){};function fs(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(!fs(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)&&!fs(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ps(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ms(e,t){let n=ps(e);return Math.round(t*n)/n}function hs(e){let t=C.useRef(e);return ds(()=>{t.current=e}),t}function gs(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]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);fs(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=hs(c),O=hs(i),k=hs(l),A=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),us(S.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!fs(T.current,t)&&(T.current=t,xt.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);ds(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=C.useRef(!1);ds(()=>(j.current=!0,()=>{j.current=!1}),[]),ds(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),N=C.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=ms(N.floating,u.x),r=ms(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ps(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var _s=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?{}:ss({element:r.current,padding:i}).fn(n):r?ss({element:r,padding:i}).fn(n):{}}}},vs=(e,t)=>{let n=ns(e);return{name:n.name,fn:n.fn,options:[e,t]}},ys=(e,t)=>{let n=rs(e);return{name:n.name,fn:n.fn,options:[e,t]}},bs=(e,t)=>({fn:ls(e).fn,options:[e,t]}),xs=(e,t)=>{let n=is(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ss=(e,t)=>{let n=as(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cs=(e,t)=>{let n=os(e);return{name:n.name,fn:n.fn,options:[e,t]}},ws=(e,t)=>{let n=cs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ts=(e,t)=>{let n=_s(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Es(e){let t=C.useRef(void 0),n=C.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return C.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var Ds=`data-floating-ui-focusable`,Os=`active`,ks=`selected`,As=`ArrowLeft`,js=`ArrowRight`,Ms=`ArrowUp`,Ns=`ArrowDown`,Ps=[As,js],Fs=[Ms,Ns];[...Ps,...Fs];var Is={...C},Ls=!1,Rs=0,zs=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+Rs++;function Bs(){let[e,t]=C.useState(()=>Ls?zs():void 0);return io(()=>{e??t(zs())},[]),C.useEffect(()=>{Ls=!0},[]),e}var Vs=Is.useId||Bs;function Hs(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var Us=C.createContext(null),Ws=C.createContext(null),Gs=()=>C.useContext(Us)?.id||null,Ks=()=>C.useContext(Ws);function qs(e){return`data-floating-ui-`+e}function Js(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var Ys=qs(`safe-polygon`);function Xs(e,t,n){if(n&&!ro(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function Zs(e){return typeof e==`function`?e():e}function Qs(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Ks(),m=Gs(),h=oo(l),g=oo(c),_=oo(n),v=oo(d),y=C.useRef(),b=C.useRef(-1),x=C.useRef(),S=C.useRef(-1),w=C.useRef(!0),T=C.useRef(!1),E=C.useRef(()=>{}),D=C.useRef(!1),O=co(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});C.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Js(b),Js(S),w.current=!0,D.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),C.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){O()&&r(!1,e,`hover`)}let t=Za(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,O]);let k=C.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=Xs(g.current,`close`,y.current);i&&!x.current?(Js(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Js(b),r(!1,e,n))},[g,r]),A=co(()=>{E.current(),x.current=void 0}),j=co(()=>{if(T.current){let e=Za(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Ys),T.current=!1}}),M=co(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);C.useEffect(()=>{if(!s)return;function e(e){if(Js(b),w.current=!1,u&&!ro(y.current)||Zs(v.current)>0&&!Xs(g.current,`open`))return;let t=Xs(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(M()){j();return}E.current();let t=Za(o.floating);if(Js(S),D.current=!1,h.current&&i.current.floatingContext){n||Js(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),E.current=()=>{t.removeEventListener(`mousemove`,r)}}else(y.current!==`touch`||!qa(o.floating,e.relatedTarget))&&k(e)}function a(e){M()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e)}})(e))}function c(){Js(b)}function l(e){M()||k(e,!1)}if(Ki(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,k,A,j,r,n,_,p,g,h,i,M,v]),io(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&O()){T.current=!0;let e=o.floating;if(Ki(o.domReference)&&e){var t;let n=Za(o.floating).body;n.setAttribute(Ys,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,O]),io(()=>{n||(y.current=void 0,D.current=!1,A(),j())},[n,A,j]),C.useEffect(()=>()=>{A(),Js(b),Js(S),j()},[s,o.domReference,A,j]);let N=C.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!w.current&&!_.current&&r(!0,t,`hover`)}(!u||ro(y.current))&&(n||Zs(v.current)===0||D.current&&e.movementX**2+e.movementY**2<2||(Js(S),y.current===`touch`?i():(D.current=!0,S.current=window.setTimeout(i,Zs(v.current)))))}}},[u,r,n,_,v]);return C.useMemo(()=>s?{reference:N}:{},[s,N])}var $s=()=>{},ec=C.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:$s,setState:$s,isInstantPhase:!1}),tc=()=>C.useContext(ec);function nc(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=C.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=C.useRef(null),s=C.useCallback(e=>{a({currentId:e})},[]);return io(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,W.jsx)(ec.Provider,{value:C.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function rc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=tc(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return io(()=>{o&&l&&(f({delay:{open:1,close:Xs(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),io(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),io(()=>{o&&u!==$s&&n&&u(s)},[o,n,u,s]),c}function ic(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ji(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ac(e){return`composedPath`in e?e.composedPath()[0]:e.target}var oc={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},sc={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},cc=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function lc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Ks(),g=co(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=C.useRef(!1),{escapeKey:y,outsidePress:b}=cc(p),{escapeKey:x,outsidePress:S}=cc(m),w=C.useRef(!1),T=co(e=>{if(!n||!o||!s||e.key!==`Escape`||w.current)return;let t=a.current.floatingContext?.nodeId,i=h?to(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}r(!1,no(e)?e.nativeEvent:e,`escape-key`)}),E=co(e=>{var t;let n=()=>{var t;T(e),(t=Ja(e))==null||t.removeEventListener(`keydown`,n)};(t=Ja(e))==null||t.addEventListener(`keydown`,n)}),D=co(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=Ja(e),s=`[`+qs(`inert`)+`]`,c=Za(i.floating).querySelectorAll(s),u=Ki(o)?o:null;for(;u&&!ia(u);){let e=sa(u);if(ia(e)||!Ki(e))break;u=e}if(c.length&&Ki(o)&&!Xa(o)&&!qa(o,i.floating)&&Array.from(c).every(e=>!qa(u,e)))return;if(qi(o)&&A){let t=ia(o),n=aa(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&to(h.nodesRef.current,d).some(t=>Ya(e,t.context?.elements.floating));if(Ya(e,i.floating)||Ya(e,i.domReference)||f)return;let p=h?to(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}r(!1,e,`outside-press`)}),O=co(e=>{var t;let n=()=>{var t;D(e),(t=Ja(e))==null||t.removeEventListener(l,n)};(t=Ja(e))==null||t.addEventListener(l,n)});C.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),w.current=!0}function u(){e=window.setTimeout(()=>{w.current=!1},ra()?5:0)}let d=Za(i.floating);s&&(d.addEventListener(`keydown`,x?E:T,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?O:D,S);let p=[];return f&&(Ki(i.domReference)&&(p=la(i.domReference)),Ki(i.floating)&&(p=p.concat(la(i.floating))),!Ki(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(la(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?E:T,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?O:D,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,T,x,E,D,S,O]),C.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let k=C.useMemo(()=>({onKeyDown:T,...u&&{[oc[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[T,r,u,d]),A=C.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[sc[l]]:()=>{a.current.insideReactTree=!0}}},[T,l,a]);return C.useMemo(()=>o?{reference:k,floating:A}:{},[o,k,A])}function uc(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=Vs(),a=C.useRef({}),[o]=C.useState(()=>Hs()),s=Gs()!=null,[c,l]=C.useState(r.reference),u=co((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=C.useMemo(()=>({setPositionReference:l}),[]),f=C.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return C.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function dc(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=uc({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=C.useState(null),[l,u]=C.useState(null),d=o?.domReference||s,f=C.useRef(null),p=Ks();io(()=>{d&&(f.current=d)},[d]);let m=gs({...n,elements:{...o,...l&&{reference:l}}}),h=C.useCallback(e=>{let t=Ki(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=C.useCallback(e=>{(Ki(e)||e===null)&&(f.current=e,c(e)),(Ki(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!Ki(e))&&m.refs.setReference(e)},[m.refs]),_=C.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=C.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=C.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return io(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),C.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function fc(){return Ha()&&Va()}function pc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=C.useRef(!1),u=C.useRef(-1),d=C.useRef(!0);C.useEffect(()=>{if(!s)return;let e=Ui(o.domReference);function t(){!n&&qi(o.domReference)&&o.domReference===Ka(Za(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),fc()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),fc()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),C.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),C.useEffect(()=>()=>{Js(u)},[]);let f=C.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=Ja(e.nativeEvent);if(c&&Ki(t)){if(fc()&&!e.relatedTarget){if(!d.current&&!Qa(t))return}else if(!$a(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=Ki(t)&&t.hasAttribute(qs(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=Ka(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(qa(a.current.floatingContext?.refs.floating.current,e)||qa(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return C.useMemo(()=>s?{reference:f}:{},[s,f])}function mc(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[Os]:t,[ks]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Ds]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[Os,ks].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function hc(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=C.useCallback(t=>mc(t,e,`reference`),t),a=C.useCallback(t=>mc(t,e,`floating`),n),o=C.useCallback(t=>mc(t,e,`item`),r);return C.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var gc=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function _c(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=Vs(),c=r.domReference?.id||s,l=C.useMemo(()=>eo(r.floating)?.id||i,[r.floating,i]),u=gc.get(o)??o,d=Gs()!=null,f=C.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=C.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=C.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return C.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function vc(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...vc(e,t.id,n)])}function yc(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function bc(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function xc(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){Js(i),u()}if(Js(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=ac(e),v=e.type===`mouseleave`,y=ic(c.floating,_),b=ic(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=bc(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&Ki(e.relatedTarget)&&ic(c.floating,e.relatedTarget)||f&&vc(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]]}function ee(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!yc([m,h],N)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}yc([m,h],ee([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var Sc={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},Cc=U((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":_(t),"--scrollarea-over-scroll-behavior":i,"--scrollarea-offset-size":void 0}}}),wc=q(e=>{let t=G(`ScrollArea`,Sc,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:w,attributes:T,...E}=t,[D,O]=(0,C.useState)(!1),[k,A]=(0,C.useState)(!1),[j,M]=(0,C.useState)(!1),N=(0,C.useRef)(!0),ee=(0,C.useRef)(!1),P=(0,C.useRef)(!0),F=(0,C.useRef)(!1),I=K({name:`ScrollArea`,props:t,classes:Bi,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T,vars:c,varsResolver:Cc}),L=(0,C.useRef)(null),[R,te]=(0,C.useState)(null),ne=Es([f,L,(0,C.useCallback)(e=>{te(t=>t===e?t:e)},[])]);return fi(h===`present`?R:null,()=>{let e=L.current;e&&(A(e.scrollHeight>e.clientHeight),M(e.scrollWidth>e.clientWidth))}),ue(()=>{S&&L.current&&L.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,W.jsxs)(gi,{getStyles:I,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...I(`root`),...E,children:[(0,W.jsx)(zi,{...d,...I(`viewport`,{style:d?.style}),ref:ne,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":w||void 0,"data-horizontal-hidden":h===`present`&&!j?`true`:void 0,"data-vertical-hidden":h===`present`&&!k?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!ee.current&&_?.(),c&&!N.current&&v?.(),ee.current=s,N.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!F.current&&b?.(),u&&!P.current&&y?.(),F.current=l,P.current=u},children:m}),(g===`xy`||g===`x`)&&(0,W.jsx)(Fi,{...I(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":w||void 0,"data-hidden":l===`never`||h===`present`&&!j||void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:(0,W.jsx)(Ri,{...I(`thumb`)})}),(g===`xy`||g===`y`)&&(0,W.jsx)(Fi,{...I(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":w||void 0,"data-hidden":l===`never`||h===`present`&&!k||void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:(0,W.jsx)(Ri,{...I(`thumb`)})}),(0,W.jsx)(mi,{...I(`corner`),"data-vertical-scrollbar-position":w||void 0,"data-hovered":D||void 0,"data-hidden":l===`never`||void 0})]})});wc.displayName=`@mantine/core/ScrollArea`;var Tc=q(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...w}=G(`ScrollAreaAutosize`,Sc,e),T=(0,C.useRef)(null),[E,D]=(0,C.useState)(null),O=Es([u,T,(0,C.useCallback)(e=>{D(t=>t===e?t:e)},[])]),k=(0,C.useRef)(!1),A=(0,C.useRef)(!1),j=(0,C.useEffectEvent)(()=>{let e=T.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==k.current&&(A.current?S(t):(A.current=!0,t&&S(!0)),k.current=t)});return fi(S?E:null,j),(0,W.jsx)(J,{...w,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,W.jsx)(J,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,W.jsx)(wc,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:O,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});wc.classes=Bi,wc.varsResolver=Cc,Tc.displayName=`@mantine/core/ScrollAreaAutosize`,Tc.classes=Bi,wc.Autosize=Tc;var Ec={root:`m_87cf2631`},Dc={__staticSelector:`UnstyledButton`},Oc=$r(e=>{let t=G(`UnstyledButton`,Dc,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t,d=K({name:i,props:t,classes:Ec,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l});return(0,W.jsx)(J,{...d(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});Oc.classes=Ec,Oc.displayName=`@mantine/core/UnstyledButton`;var kc={root:`m_515a97f8`},Ac=q(e=>{let t=G(`VisuallyHidden`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t,u=K({name:`VisuallyHidden`,classes:kc,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c});return(0,W.jsx)(J,{component:`span`,...u(`root`),...l})});Ac.classes=kc,Ac.displayName=`@mantine/core/VisuallyHidden`;var jc={root:`m_1b7284a3`},Mc=U((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:L(t),"--paper-shadow":ne(n)}})),Nc=$r(e=>{let t=G(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=K({name:`Paper`,props:t,classes:jc,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:Mc});return(0,W.jsx)(J,{mod:[{withBorder:s},f],...h(`root`),variant:d,...m})});Nc.classes=jc,Nc.varsResolver=Mc,Nc.displayName=`@mantine/core/Paper`;function Pc(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function Fc(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var Ic={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function Lc({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function Rc({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=Lc({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[Ic[c]]:r},d=-t/2;return c===`left`?{...u,...Pc(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...Pc(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...Fc(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...Fc(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function zc({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function Bc({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=si();return a?(0,W.jsx)(`div`,{role:`presentation`,...l,style:{...c,...Rc({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}Bc.displayName=`@mantine/core/FloatingArrow`;function Vc(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}var Hc={root:`m_9814e45f`},Uc={zIndex:N(`modal`)},Wc=U((e,{gradient:t,color:n,backgroundOpacity:r,blur:i,radius:a,zIndex:o})=>({root:{"--overlay-bg":t||(n!==void 0||r!==void 0)&&cn(n||`#000`,r??.6)||void 0,"--overlay-filter":i?`blur(${_(i)})`:void 0,"--overlay-radius":a===void 0?void 0:L(a),"--overlay-z-index":o?.toString()}})),Gc=$r(e=>{let t=G(`Overlay`,Uc,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fixed:c,center:l,children:u,radius:d,zIndex:f,gradient:p,blur:m,color:h,backgroundOpacity:g,mod:_,attributes:v,...y}=t,b=K({name:`Overlay`,props:t,classes:Hc,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:Wc});return(0,W.jsx)(J,{...b(`root`),mod:[{center:l,fixed:c},_],...y,children:u})});Gc.classes=Hc,Gc.varsResolver=Wc,Gc.displayName=`@mantine/core/Overlay`;function Kc(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}var qc=null;function Jc({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||Kc(n):e;if(t){if(qc){if(document.body.contains(qc))return qc;qc=null}let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return qc=e,e;let t=Kc(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),qc=t,t}return Kc(n)}var Yc={reuseTargetNode:!0},Xc=q(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=G(`Portal`,Yc,e),[o,s]=(0,C.useState)(!1),c=(0,C.useRef)(null);return ue(()=>(s(!0),c.current=Jc({target:n,reuseTargetNode:r,...a}),Ke(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,xt.createPortal)((0,W.jsx)(W.Fragment,{children:t}),c.current)});Xc.displayName=`@mantine/core/Portal`;var Zc=q(({withinPortal:e=!0,children:t,...n})=>wn()===`test`||!e?(0,W.jsx)(W.Fragment,{children:t}):(0,W.jsx)(Xc,{...n,children:t}));Zc.displayName=`@mantine/core/OptionalPortal`;var Qc=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),$c={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...Qc(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...Qc(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...Qc(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...Qc(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...Qc(`top`),common:{transformOrigin:`top right`}}},el={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function tl({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in $c?{transitionProperty:$c[e].transitionProperty,...i,...$c[e].common,...$c[e][el[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[el[t]]}}function nl({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=Bn(),d=Xe(),f=u.respectReducedMotion?d:!1,[p,m]=(0,C.useState)(f?0:e),[h,g]=(0,C.useState)(r?`entered`:`exited`),_=(0,C.useRef)(-1),v=(0,C.useRef)(-1),y=(0,C.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current),y.current=-1}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;if(m(l),l===0)typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`);else{let e=requestAnimationFrame(()=>{xt.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current===e&&(y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)}))});y.current=e}},S=e=>{b(),typeof(e?c:l)==`number`?v.current=window.setTimeout(()=>{x(e)},e?c:l):x(e)};return fe(()=>{S(r)},[r]),(0,C.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function rl({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=wn(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=nl({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,W.jsx)(W.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,W.jsx)(W.Fragment,{children:o({})}):o({display:`none`}):(0,W.jsx)(C.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,W.jsx)(W.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:tl({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,W.jsx)(C.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,W.jsx)(W.Fragment,{children:o(tl({transition:n,duration:h,state:g,timingFunction:_}))})}rl.displayName=`@mantine/core/Transition`;var il={duration:100,transition:`fade`};function al(e,t){return{...il,...t,...e}}var[ol,sl]=T(`Popover component was not found in the tree`);function cl({childProps:e,disabled:t,opened:n,longPressDelay:r=500,setReference:i,open:a}){let o=(0,C.useRef)(!1),s=(0,C.useRef)(!1),c=(0,C.useRef)(null),l=(0,C.useRef)(t);l.current=t;let u=(e,t,n)=>{i({getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t,toJSON:()=>void 0}),contextElement:n}),a()},d=re(e.onMouseDown,e=>{t||e.button===2&&e.stopPropagation()}),f=re(e.onContextMenu,e=>{t||e.defaultPrevented||(e.preventDefault(),!s.current&&(u(e.clientX,e.clientY,e.currentTarget),o.current&&(s.current=!0)))}),p=ht(e=>{if(l.current||s.current)return;let t=e,n=t.touches[0]??t.changedTouches[0];n&&(u(n.clientX,n.clientY,c.current),s.current=!0)},{threshold:r,events:[`touch`],cancelOnMove:!0,onStart:e=>{o.current=!0,s.current=!1,c.current=e.currentTarget},onFinish:e=>{o.current=!1,s.current=!1,l.current||e.preventDefault()},onCancel:()=>{o.current=!1,s.current=!1}});return{onContextMenu:f,onMouseDown:d,onTouchStart:re(e.onTouchStart,p.onTouchStart),onTouchEnd:re(e.onTouchEnd,p.onTouchEnd),onTouchCancel:re(e.onTouchCancel,p.onTouchCancel),onTouchMove:re(e.onTouchMove,p.onTouchMove),style:t?e.style:{...e.style,WebkitTouchCallout:`none`,WebkitUserSelect:`none`,userSelect:`none`},"data-expanded":n?!0:void 0}}function ll(e){let{children:t,disabled:n,longPressDelay:r}=G(`PopoverContextMenu`,null,e),i=Lt(t);if(!i)throw Error(`Popover.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=sl(),o=cl({childProps:i.props,disabled:n||a.disabled,opened:a.opened,longPressDelay:r,setReference:a.reference,open:()=>{a.opened||a.onToggle()}});return(0,C.cloneElement)(i,o)}ll.displayName=`@mantine/core/PopoverContextMenu`;function ul({children:e,active:t=!0,refProp:n=`ref`,innerRef:r}){let i=Je(Fe(t),r),a=Lt(e);return a?(0,C.cloneElement)(a,{[n]:i}):e}function dl(e){return(0,W.jsx)(Ac,{tabIndex:-1,"data-autofocus":!0,...e})}ul.displayName=`@mantine/core/FocusTrap`,dl.displayName=`@mantine/core/FocusTrapInitialFocus`,ul.InitialFocus=dl;var fl={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`},pl=q(e=>{let t=G(`PopoverDropdown`,null,e),{className:n,style:r,vars:i,children:a,onKeyDownCapture:o,variant:s,classNames:c,styles:l,ref:u,...d}=t,f=sl(),{dir:p}=si(),m=f.arrowPosition===`merge`&&f.withArrow?zc({position:f.placement,dir:p}):void 0,h=pe({opened:f.opened,shouldReturnFocus:f.returnFocus}),g=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:`dialog`,tabIndex:-1}:{},v=Je(u,f.floating);return f.disabled?null:(0,W.jsx)(Zc,{...f.portalProps,withinPortal:f.withinPortal,children:(0,W.jsx)(rl,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||`fade`,duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,keepMountedMode:f.keepMountedMode,exitDuration:typeof f.transitionProps?.exitDuration==`number`?f.transitionProps.exitDuration:f.transitionProps?.duration,children:e=>(0,W.jsx)(ul,{active:f.trapFocus&&f.opened,innerRef:v,children:(0,W.jsxs)(J,{...g,...d,variant:s,onKeyDownCapture:P(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:h,onKeyDown:o}),"data-position":f.placement,"data-fixed":f.floatingStrategy===`fixed`||void 0,...f.getStyles(`dropdown`,{className:n,props:t,classNames:c,styles:l,style:[{...e,...m,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width===`target`?void 0:_(f.width),...f.referenceHidden?{display:`none`}:null},f.resolvedStyles?.dropdown,l?.dropdown,r]}),children:[a,(0,W.jsx)(Bc,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles(`arrow`,{props:t,classNames:c,styles:l})})]})})})})});pl.classes=fl,pl.displayName=`@mantine/core/PopoverDropdown`;var ml={refProp:`ref`,popupType:`dialog`},hl=q(e=>{let{children:t,refProp:n,popupType:r,ref:i,...a}=G(`PopoverTarget`,ml,e),o=Lt(t);if(!o)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let s=a,c=sl(),l=Je(c.reference,Ft(o),i),u=c.withRoles?{"aria-haspopup":r,"aria-expanded":c.opened,"aria-controls":c.opened?c.getDropdownId():void 0,id:c.getTargetId()}:{},d=o.props;return(0,C.cloneElement)(o,{...s,...u,...c.targetProps,className:zt(c.targetProps.className,s.className,d.className),[n]:l,...c.controlled?null:{onClick:e=>{c.onToggle(),d.onClick?.(e)}}})});hl.displayName=`@mantine/core/PopoverTarget`;function gl(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function _l(e,t,n,r){let i=gl(e.middlewares),a=[vs(e.offset),Cs()];if(i.flip&&!n){let e=typeof i.flip==`boolean`?{}:i.flip,t=r?{fallbackStrategy:`initialPlacement`,...e}:e;a.push(xs(t))}if(i.shift){let t=typeof i.shift==`boolean`?{}:i.shift;a.push(ys(n=>{let r=n.placement.startsWith(`top`)||n.placement.startsWith(`bottom`);return{limiter:bs(),padding:5,...e.width===`target`&&r?{mainAxis:!1}:null,...t}}))}return i.inline&&a.push(typeof i.inline==`boolean`?ws():ws(i.inline)),a.push(Ts({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width===`target`)&&a.push(Ss({...typeof i.size==`boolean`?{}:i.size,apply({rects:n,availableWidth:r,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};i.size&&(typeof i.size==`object`&&i.size.apply?i.size.apply({rects:n,availableWidth:r,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${r}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),a}function vl(e){let[t,n]=Ye({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=(0,C.useRef)(t),i=(0,C.useRef)(!1),[a,o]=(0,C.useState)(null),s=e.preventPositionChangeWhenVisible!==!1,c=(0,C.useRef)(t);t!==c.current&&(c.current=t,t&&a!==null&&o(null));let l=(0,C.useRef)(e.position);e.position!==l.current&&(l.current=e.position,i.current=!1,a!==null&&o(null));let u=(0,C.useCallback)(()=>o(null),[]),d=()=>{t&&!e.disabled&&n(!1)},f=()=>{e.disabled||n(!t)},p=dc({open:t,strategy:e.strategy,placement:s?a??e.position:e.position,middleware:_l(e,()=>p,s&&a!==null,s),whileElementsMounted:e.keepMounted?void 0:ts});(0,C.useEffect)(()=>{if(!e.keepMounted)return;let n=p.refs.reference.current,r=p.refs.floating.current;if(t&&n&&r)return ts(n,r,p.update)},[e.keepMounted,t,p.update,p.elements.reference,p.elements.floating]),ue(()=>{if(!t){i.current=!1;return}if(!s||a!==null)return;let e=p.refs.floating.current;e&&e.offsetHeight!==0&&e.offsetWidth!==0&&(i.current?p.isPositioned&&o(p.placement):(i.current=!0,p.update()))},[s,t,p.isPositioned,p.placement,a,p.update]);let m=(0,C.useRef)(p.placement);return ue(()=>{m.current!==p.placement&&(m.current=p.placement,e.onPositionChange?.(p.placement))},[p.placement]),fe(()=>{t!==r.current&&(t?e.onOpen?.():e.onClose?.()),r.current=t},[t,e.onClose,e.onOpen]),{floating:p,controlled:typeof e.opened==`boolean`,opened:t,onClose:d,onToggle:f,resetLockedPlacement:u}}var yl={position:`bottom`,offset:8,transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,preventPositionChangeWhenVisible:!0,clickOutsideEvents:[`mousedown`,`touchstart`],clickOutsideCapture:!1,zIndex:N(`popover`),__staticSelector:`Popover`,width:`max-content`},bl=U((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:L(t),"--popover-shadow":ne(n)}}));function xl(e){let t=G(`Popover`,yl,e),{children:n,position:r,offset:i,onPositionChange:a,opened:o,transitionProps:s,onExitTransitionEnd:c,onEnterTransitionEnd:l,width:u,middlewares:d,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,unstyled:_,classNames:v,styles:y,closeOnClickOutside:b,withinPortal:x,portalProps:S,closeOnEscape:w,clickOutsideEvents:T,clickOutsideCapture:E,trapFocus:D,onClose:O,onDismiss:k,onOpen:A,onChange:j,zIndex:M,radius:N,shadow:ee,id:P,defaultOpened:F,__staticSelector:I,withRoles:L,disabled:R,returnFocus:te,variant:ne,keepMounted:re,keepMountedMode:ie,vars:ae,floatingStrategy:oe,withOverlay:se,overlayProps:ce,hideDetached:le,attributes:B,preventPositionChangeWhenVisible:V,...ue}=t,de=K({name:I,props:t,classes:fl,classNames:v,styles:y,unstyled:_,attributes:B,rootSelector:`dropdown`,vars:ae,varsResolver:bl}),{resolvedStyles:fe}=nr({classNames:v,styles:y,props:t}),pe=(0,C.useRef)(null),[H,me]=(0,C.useState)(null),[he,ge]=(0,C.useState)(null),{dir:_e}=si(),ve=wn(),ye=Re(P),be=vl({middlewares:d,width:u,position:Vc(_e,r),offset:typeof i==`number`?i+(f?p/2:0):i,arrowRef:pe,arrowOffset:m,onPositionChange:a,opened:o,defaultOpened:F,onChange:j,onOpen:A,onClose:O,onDismiss:k,strategy:oe,disabled:R,preventPositionChangeWhenVisible:V,keepMounted:re});z(()=>{b&&(be.onClose(),k?.())},T,[H,he],!0,E);let xe=(0,C.useCallback)(e=>{me(e),be.floating.refs.setReference(e)},[be.floating.refs.setReference]),Se=(0,C.useCallback)(e=>{ge(e),be.floating.refs.setFloating(e)},[be.floating.refs.setFloating]),Ce=(0,C.useCallback)(()=>{s?.onExited?.(),c?.(),be.resetLockedPlacement()},[s?.onExited,c,be.resetLockedPlacement]),we=(0,C.useCallback)(()=>{s?.onEntered?.(),l?.()},[s?.onEntered,l]);return(0,W.jsxs)(ol,{value:{returnFocus:te,disabled:R,controlled:be.controlled,reference:xe,floating:Se,x:be.floating.x,y:be.floating.y,arrowX:be.floating?.middlewareData?.arrow?.x,arrowY:be.floating?.middlewareData?.arrow?.y,opened:be.opened,arrowRef:pe,transitionProps:{...s,onExited:Ce,onEntered:we},width:u,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,placement:be.floating.placement,trapFocus:D,withinPortal:x,portalProps:S,zIndex:M,radius:N,shadow:ee,closeOnEscape:w,onDismiss:k,onClose:be.onClose,onToggle:be.onToggle,getTargetId:()=>ye,getDropdownId:()=>`${ye}-dropdown`,withRoles:L,targetProps:ue,__staticSelector:I,classNames:v,styles:y,unstyled:_,variant:ne,keepMounted:re,keepMountedMode:ie,getStyles:de,resolvedStyles:fe,floatingStrategy:oe,referenceHidden:le&&ve!==`test`?be.floating.middlewareData.hide?.referenceHidden:!1},children:[n,se&&(0,W.jsx)(rl,{transition:`fade`,mounted:be.opened,duration:s?.duration||250,exitDuration:s?.exitDuration||250,children:e=>(0,W.jsx)(Zc,{withinPortal:x,children:(0,W.jsx)(Gc,{...ce,...de(`overlay`,{className:ce?.className,style:[e,ce?.style]})})})})]})}xl.Target=hl,xl.Dropdown=pl,xl.ContextMenu=ll,xl.varsResolver=bl,xl.displayName=`@mantine/core/Popover`,xl.extend=e=>e,xl.withProps=e=>{let t=t=>(0,W.jsx)(xl,{...e,...t});return t.extend=xl.extend,t.displayName=`WithProps(${xl.displayName})`,t};var Sl={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},Cl=({className:e,...t})=>(0,W.jsxs)(J,{component:`span`,className:zt(Sl.barsLoader,e),...t,children:[(0,W.jsx)(`span`,{className:Sl.bar}),(0,W.jsx)(`span`,{className:Sl.bar}),(0,W.jsx)(`span`,{className:Sl.bar})]});Cl.displayName=`@mantine/core/Bars`;var wl=({className:e,...t})=>(0,W.jsxs)(J,{component:`span`,className:zt(Sl.dotsLoader,e),...t,children:[(0,W.jsx)(`span`,{className:Sl.dot}),(0,W.jsx)(`span`,{className:Sl.dot}),(0,W.jsx)(`span`,{className:Sl.dot})]});wl.displayName=`@mantine/core/Dots`;var Tl=({className:e,...t})=>(0,W.jsx)(J,{component:`span`,className:zt(Sl.ovalLoader,e),...t});Tl.displayName=`@mantine/core/Oval`;var El={bars:Cl,oval:Tl,dots:wl},Dl={loaders:El,type:`oval`},Ol=U((e,{size:t,color:n})=>({root:{"--loader-size":F(t,`loader-size`),"--loader-color":n?rn(n,e):void 0}})),kl=q(e=>{let t=G(`Loader`,Dl,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=K({name:`Loader`,props:t,classes:Sl,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:Ol});return p?(0,W.jsx)(J,{...g(`root`),...h,children:p}):(0,W.jsx)(J,{...g(`root`),component:d[i],variant:f,size:n,...h})});kl.defaultLoaders=El,kl.classes=Sl,kl.varsResolver=Ol,kl.displayName=`@mantine/core/Loader`;var Al={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},jl={orientation:`horizontal`},Ml=U((e,{borderWidth:t})=>({group:{"--ai-border-width":_(t)}})),Nl=q(e=>{let t=G(`ActionIconGroup`,jl,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t,m=K({name:`ActionIconGroup`,props:t,classes:Al,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:Ml,rootSelector:`group`});return(0,W.jsx)(J,{...m(`group`),variant:u,mod:[{orientation:s},d],role:`group`,...p})});Nl.classes=Al,Nl.varsResolver=Ml,Nl.displayName=`@mantine/core/ActionIconGroup`;var Pl=U((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":F(o,`section-height`),"--section-padding-x":F(o,`section-padding-x`),"--section-fz":R(o),"--section-radius":t===void 0?void 0:L(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),Fl=q(e=>{let t=G(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t,m=K({name:`ActionIconGroupSection`,props:t,classes:Al,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:Pl,rootSelector:`groupSection`});return(0,W.jsx)(J,{...m(`groupSection`),variant:c,...p})});Fl.classes=Al,Fl.varsResolver=Pl,Fl.displayName=`@mantine/core/ActionIconGroupSection`;var Il=U((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":F(t,`ai-size`),"--ai-radius":n===void 0?void 0:L(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),Ll=$r(e=>{let t=G(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=K({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:Al,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:Il});return(0,W.jsxs)(Oc,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,W.jsx)(rl,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,W.jsx)(J,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,W.jsx)(kl,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,W.jsx)(J,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});Ll.classes=Al,Ll.varsResolver=Il,Ll.displayName=`@mantine/core/ActionIcon`,Ll.Group=Nl,Ll.GroupSection=Fl;function Rl({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,W.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,W.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}Rl.displayName=`@mantine/core/CloseIcon`;var zl={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},Bl={variant:`subtle`},Vl=U((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":F(t,`cb-size`),"--cb-radius":n===void 0?void 0:L(n),"--cb-icon-size":_(r)}})),Hl=$r(e=>{let t=G(`CloseButton`,Bl,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=K({name:_||`CloseButton`,props:t,className:o,style:c,classes:zl,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:Vl});return(0,W.jsxs)(Oc,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,W.jsx)(Rl,{}),r]})});Hl.classes=zl,Hl.varsResolver=Vl,Hl.displayName=`@mantine/core/CloseButton`;function Ul(e){return C.Children.toArray(e).filter(Boolean)}var Wl={root:`m_4081bf90`},Gl={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},Kl=U((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":I(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),ql=q(e=>{let t=G(`Group`,Gl,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=Ul(s),x=b.length,S=I(c??`md`),C=K({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:Wl,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:Kl});return(0,W.jsx)(J,{...C(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});ql.classes=Wl,ql.varsResolver=Kl,ql.displayName=`@mantine/core/Group`;var[Jl,Yl]=T(`ModalBase component was not found in tree`);function Xl({opened:e,transitionDuration:t}){let[n,r]=(0,C.useState)(e),i=(0,C.useRef)(-1),a=Xe()?0:t;return(0,C.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function Zl({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:o,handledEscapeEvents:s}){let c=Re(e),[l,u]=(0,C.useState)(!1),[d,f]=(0,C.useState)(!1),p=Xl({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return ze(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&!s?.has(e)&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&(s?.add(e),a())},{capture:!0}),pe({opened:n,shouldReturnFocus:r&&o}),{_id:c,titleMounted:l,bodyMounted:d,shouldLockScroll:p,setTitleMounted:u,setBodyMounted:f}}var Ql=function(){return Ql=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},Ql.apply(this,arguments)};function $l(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 eu(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 tu=`right-scroll-bar-position`,nu=`width-before-scroll-bar`,ru=`with-scroll-bars-hidden`,iu=`--removed-body-scroll-bar-size`;function au(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function ou(e,t){var n=(0,C.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 su=typeof window<`u`?C.useLayoutEffect:C.useEffect,cu=new WeakMap;function lu(e,t){var n=ou(t||null,function(t){return e.forEach(function(e){return au(e,t)})});return su(function(){var t=cu.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||au(e,null)}),i.forEach(function(e){r.has(e)||au(e,a)})}cu.set(n,e)},[e]),n}function uu(e){return e}function du(e,t){t===void 0&&(t=uu);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 fu(e){e===void 0&&(e={});var t=du(null);return t.options=Ql({async:!0,ssr:!1},e),t}var pu=function(e){var t=e.sideCar,n=$l(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 C.createElement(r,Ql({},n))};pu.isSideCarExport=!0;function mu(e,t){return e.useMedium(t),pu}var hu=fu(),gu=function(){},_u=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:gu,onWheelCapture:gu,onTouchMoveCapture:gu}),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=$l(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=lu([n,t]),w=Ql(Ql({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:hu,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(s),Ql(Ql({},w),{ref:S})):C.createElement(v,Ql({},w,{className:c,ref:S}),s))});_u.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},_u.classNames={fullWidth:nu,zeroRight:tu};var vu=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function yu(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=vu();return t&&e.setAttribute(`nonce`,t),e}function bu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xu(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Su=function(){var e=0,t=null;return{add:function(n){e==0&&(t=yu())&&(bu(t,n),xu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Cu=function(){var e=Su();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wu=function(){var e=Cu();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Tu={left:0,top:0,right:0,gap:0},Eu=function(e){return parseInt(e||``,10)||0},Du=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[Eu(n),Eu(r),Eu(i)]},Ou=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Tu;var t=Du(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])}},ku=wu(),Au=`data-scroll-locked`,ju=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
+ .${ru} {
3
+ overflow: hidden ${r};
4
+ padding-right: ${s}px ${r};
5
+ }
6
+ body[${Au}] {
7
+ overflow: hidden ${r};
8
+ overscroll-behavior: contain;
9
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
10
+ padding-left: ${i}px;
11
+ padding-top: ${a}px;
12
+ padding-right: ${o}px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: ${s}px ${r};
16
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17
+ }
18
+
19
+ .${tu} {
20
+ right: ${s}px ${r};
21
+ }
22
+
23
+ .${nu} {
24
+ margin-right: ${s}px ${r};
25
+ }
26
+
27
+ .${tu} .${tu} {
28
+ right: 0 ${r};
29
+ }
30
+
31
+ .${nu} .${nu} {
32
+ margin-right: 0 ${r};
33
+ }
34
+
35
+ body[${Au}] {
36
+ ${iu}: ${s}px;
37
+ }
38
+ `},Mu=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Nu=function(){C.useEffect(function(){return document.body.setAttribute(Au,(Mu()+1).toString()),function(){var e=Mu()-1;e<=0?document.body.removeAttribute(Au):document.body.setAttribute(Au,e.toString())}},[])},Pu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Nu();var a=C.useMemo(function(){return Ou(i)},[i]);return C.createElement(ku,{styles:ju(a,!t,i,n?``:`!important`)})},Fu=!1;if(typeof window<`u`)try{var Iu=Object.defineProperty({},"passive",{get:function(){return Fu=!0,!0}});window.addEventListener(`test`,Iu,Iu),window.removeEventListener(`test`,Iu,Iu)}catch{Fu=!1}var Lu=Fu?{passive:!1}:!1,Ru=function(e){return e.tagName===`TEXTAREA`},zu=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Ru(e)&&n[t]===`visible`)},Bu=function(e){return zu(e,`overflowY`)},Vu=function(e){return zu(e,`overflowX`)},Hu=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Gu(e,r)){var i=Ku(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Uu=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Wu=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Gu=function(e,t){return e===`v`?Bu(t):Vu(t)},Ku=function(e,t){return e===`v`?Uu(t):Wu(t)},qu=function(e,t){return e===`h`&&t===`rtl`?-1:1},Ju=function(e,t,n,r,i){var a=qu(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=Ku(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Gu(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},Yu=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xu=function(e){return[e.deltaX,e.deltaY]},Zu=function(e){return e&&`current`in e?e.current:e},Qu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},$u=function(e){return`
39
+ .block-interactivity-${e} {pointer-events: none;}
40
+ .allow-interactivity-${e} {pointer-events: all;}
41
+ `},ed=0,td=[];function nd(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(ed++)[0],a=C.useState(wu)[0],o=C.useRef(e);C.useEffect(function(){o.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=eu([e.lockRef.current],(e.shards||[]).map(Zu),!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=C.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Yu(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=Hu(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Hu(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 Ju(h,t,e,h===`h`?s:c,!0)},[]),c=C.useCallback(function(e){var n=e;if(td.length&&td[td.length-1]===a){var r=`deltaY`in n?Xu(n):Yu(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Qu(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(Zu).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=C.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:rd(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=C.useCallback(function(e){n.current=Yu(e),r.current=void 0},[]),d=C.useCallback(function(t){l(t.type,Xu(t),t.target,s(t,e.lockRef.current))},[]),f=C.useCallback(function(t){l(t.type,Yu(t),t.target,s(t,e.lockRef.current))},[]);C.useEffect(function(){return td.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Lu),document.addEventListener(`touchmove`,c,Lu),document.addEventListener(`touchstart`,u,Lu),function(){td=td.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Lu),document.removeEventListener(`touchmove`,c,Lu),document.removeEventListener(`touchstart`,u,Lu)}},[]);var p=e.removeScrollBar,m=e.inert;return C.createElement(C.Fragment,null,m?C.createElement(a,{styles:$u(i)}):null,p?C.createElement(Pu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var id=mu(hu,nd),ad=C.forwardRef(function(e,t){return C.createElement(_u,Ql({},e,{ref:t,sideCar:id}))});ad.classNames=_u.classNames;function od({keepMounted:e,keepMountedMode:t=`activity`,opened:n,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:o,onEnterTransitionEnd:s,trapFocus:c,closeOnEscape:l,returnFocus:u,closeOnClickOutside:d,withinPortal:f,portalProps:p,lockScroll:m,children:h,zIndex:g,shadow:_,padding:v,__vars:y,unstyled:b,removeScrollProps:x,__handledEscapeEvents:S,...C}){let{_id:w,titleMounted:T,bodyMounted:E,shouldLockScroll:D,setTitleMounted:O,setBodyMounted:k}=Zl({id:i,transitionProps:a,opened:n,trapFocus:c,closeOnEscape:l,onClose:r,returnFocus:u,handledEscapeEvents:S}),{key:A,...j}=x||{};return(0,W.jsx)(Zc,{...p,withinPortal:f,children:(0,W.jsx)(Jl,{value:{opened:n,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:o,onEnterTransitionEnd:s,transitionProps:{...a,keepMounted:e,keepMountedMode:t},getTitleId:()=>`${w}-title`,getBodyId:()=>`${w}-body`,titleMounted:T,bodyMounted:E,setTitleMounted:O,setBodyMounted:k,trapFocus:c,closeOnEscape:l,zIndex:g,unstyled:b},children:(0,W.jsx)(ad,{enabled:D&&m,...j,children:(0,W.jsx)(J,{...C,id:w,__vars:{...y,"--mb-z-index":(g||N(`modal`)).toString(),"--mb-shadow":ne(_),"--mb-padding":I(v)},children:h})},A)})})}od.displayName=`@mantine/core/ModalBase`;function sd(){let e=Yl();return(0,C.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var cd={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function ld({className:e,...t}){let n=sd(),r=Yl();return(0,W.jsx)(J,{id:n,className:zt({[cd.body]:!r.unstyled},e),...t})}ld.displayName=`@mantine/core/ModalBaseBody`;function ud({className:e,onClick:t,...n}){let r=Yl();return(0,W.jsx)(Hl,{...n,onClick:e=>{r.onClose(),t?.(e)},className:zt({[cd.close]:!r.unstyled},e),unstyled:r.unstyled})}ud.displayName=`@mantine/core/ModalBaseCloseButton`;function dd({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...o}){let s=Yl();return(0,W.jsx)(rl,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,W.jsx)(`div`,{...n,className:zt({[cd.inner]:!s.unstyled},n.className),children:(0,W.jsx)(ul,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,W.jsx)(Nc,{...o,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:zt({[cd.content]:!s.unstyled},t),unstyled:s.unstyled,children:o.children})})})})}dd.displayName=`@mantine/core/ModalBaseContent`;function fd({className:e,...t}){let n=Yl();return(0,W.jsx)(J,{component:`header`,className:zt({[cd.header]:!n.unstyled},e),...t})}fd.displayName=`@mantine/core/ModalBaseHeader`;var pd={duration:200,timingFunction:`ease`,transition:`fade`};function md(e){let t=Yl();return{...pd,...t.transitionProps,...e}}function hd({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=Yl(),o=md(t);return(0,W.jsx)(rl,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,W.jsx)(Gc,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}hd.displayName=`@mantine/core/ModalBaseOverlay`;function gd(){let e=Yl();return(0,C.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function _d({className:e,...t}){let n=gd(),r=Yl();return(0,W.jsx)(J,{component:`h2`,className:zt({[cd.title]:!r.unstyled},e),id:n,...t})}_d.displayName=`@mantine/core/ModalBaseTitle`;function vd({children:e}){return(0,W.jsx)(W.Fragment,{children:e})}var yd=(0,C.createContext)({size:`sm`}),bd=q(e=>{let t=G(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,C.use)(yd),{resolvedClassNames:l,resolvedStyles:u}=nr({classNames:a,styles:o,props:t});return(0,W.jsx)(Hl,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});bd.displayName=`@mantine/core/InputClearButton`;var xd={xs:7,sm:8,md:10,lg:12,xl:15};function Sd({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,W.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:xd[i]},children:[o,n||r]}):n===null?null:n||o||r}var Cd=(0,C.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),wd={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,bottomSection:`m_93f4ed57`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,success:`m_9d9d40e0`,description:`m_fe47ce59`},Td=U((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`}})),Ed=q(e=>{let t=G(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=G(`InputDescription`,null,t),f=(0,C.use)(Cd),p=K({name:[`InputWrapper`,c],props:t,classes:wd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:Td}),m=l&&f?.getStyles||p;return(0,W.jsx)(J,{component:`p`,...m(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});Ed.classes=wd,Ed.varsResolver=Td,Ed.displayName=`@mantine/core/InputDescription`;var Dd=U((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`}})),Od=q(e=>{let t=G(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=K({name:[`InputWrapper`,l],props:t,classes:wd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:Dd}),p=(0,C.use)(Cd),m=u&&p?.getStyles||f;return(0,W.jsx)(J,{component:`p`,...m(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});Od.classes=wd,Od.varsResolver=Dd,Od.displayName=`@mantine/core/InputError`;var kd={labelElement:`label`},Ad=U((e,{size:t})=>({label:{"--input-label-size":R(t),"--input-asterisk-color":void 0}})),jd=q(e=>{let t=G(`InputLabel`,kd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=K({name:[`InputWrapper`,p],props:t,classes:wd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:Ad}),v=(0,C.use)(Cd),y=v?.getStyles||_,b=g.component||c,x=typeof b!=`string`||b===`label`;return(0,W.jsxs)(J,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:x?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,W.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});jd.classes=wd,jd.varsResolver=Ad,jd.displayName=`@mantine/core/InputLabel`;var Md=q(e=>{let t=G(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t,p=K({name:[`InputPlaceholder`,c],props:t,classes:wd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`});return(0,W.jsx)(J,{...p(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});Md.classes=wd,Md.displayName=`@mantine/core/InputPlaceholder`;var Nd=U((e,{size:t})=>({success:{"--input-success-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`}})),Pd=q(e=>{let t=G(`InputSuccess`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=K({name:[`InputWrapper`,l],props:t,classes:wd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`success`,vars:s,varsResolver:Nd}),p=(0,C.use)(Cd),m=u&&p?.getStyles||f;return(0,W.jsx)(J,{component:`p`,...m(`success`,p?.getStyles?{className:r,style:i}:void 0),...d})});Pd.classes=wd,Pd.varsResolver=Nd,Pd.displayName=`@mantine/core/InputSuccess`;function Fd(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var Id={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},Ld=U((e,{size:t})=>({label:{"--input-label-size":R(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`},success:{"--input-success-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`}})),Rd=q(e=>{let t=G(`InputWrapper`,Id,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,success:h,description:g,labelProps:_,descriptionProps:v,errorProps:y,successProps:b,labelElement:x,children:S,withAsterisk:w,id:T,required:E,__stylesApiProps:D,mod:O,attributes:k,...A}=t,j=K({name:[`InputWrapper`,u],props:D||t,classes:wd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:s,varsResolver:Ld}),M={size:c,variant:l,__staticSelector:u},N=Re(T),ee=typeof w==`boolean`?w:E,P=y?.id||`${N}-error`,F=b?.id||`${N}-success`,I=v?.id||`${N}-description`,L=N,R=!!m&&typeof m!=`boolean`,te=!!h&&typeof h!=`boolean`&&!m,ne=!!g,re=R&&f.includes(`error`),ie=te&&f.includes(`error`),ae=ne&&f.includes(`description`),oe=`${re?P:``} ${ie?F:``} ${ae?I:``}`,se=oe.trim().length>0?oe.trim():void 0,ce=_?.id||`${N}-label`,le=p&&(0,W.jsx)(jd,{labelElement:x,id:ce,htmlFor:L,required:ee,...M,..._,children:p},`label`),z=ne&&(0,W.jsx)(Ed,{...v,...M,size:v?.size||M.size,id:v?.id||I,children:g},`description`),B=(0,W.jsx)(C.Fragment,{children:d(S)},`input`),V=R&&(0,C.createElement)(Od,{...y,...M,size:y?.size||M.size,key:`error`,id:y?.id||P},m),ue=te&&(0,C.createElement)(Pd,{...b,...M,size:b?.size||M.size,key:`success`,id:b?.id||F},h),de=f.map(e=>{switch(e){case`label`:return le;case`input`:return B;case`description`:return z;case`error`:return V||ue;default:return null}});return(0,W.jsx)(Cd,{value:{getStyles:j,describedBy:se,inputId:L,labelId:le&&f.includes(`label`)?ce:void 0,...Fd(f,{hasDescription:ne,hasError:R||te})},children:(0,W.jsx)(J,{variant:l,size:c,mod:[{error:!!m,success:!!h&&!m},O],id:x===`label`?void 0:T,...j(`root`),...A,children:de})})});Rd.classes=wd,Rd.varsResolver=Ld,Rd.displayName=`@mantine/core/InputWrapper`;var zd={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,withSuccessStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},Bd=U((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":F(t.size,`input-height`),"--input-fz":R(t.size),"--input-radius":t.radius===void 0?void 0:L(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:_(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:_(t.rightSectionWidth),"--input-padding-y":t.multiline?F(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),Vd=$r(e=>{let t=G(`Input`,zd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,success:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:y,rightSectionWidth:b,rightSectionPointerEvents:x,leftSectionPointerEvents:S,variant:w,vars:T,pointer:E,multiline:D,radius:O,id:k,withAria:A,withErrorStyles:j,withSuccessStyles:M,mod:N,inputSize:ee,attributes:P,__clearSection:F,__clearable:I,__clearSectionMode:L,__defaultRightSection:R,loading:te,loadingPosition:ne,__bottomSection:re,__bottomSectionProps:ie,rootRef:ae,dir:oe,...se}=t,{styleProps:ce,rest:le}=wr(se),z=(0,C.use)(Cd),B={offsetBottom:z?.offsetBottom,offsetTop:z?.offsetTop},V=K({name:[`Input`,c],props:l||t,classes:wd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,stylesCtx:B,rootSelector:`wrapper`,vars:T,varsResolver:Bd}),ue=A?{required:s,disabled:m,"aria-invalid":f?!0:void 0,"aria-describedby":z?.describedBy,id:z?.inputId||k}:{},de=te?(0,W.jsx)(kl,{size:ne===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,fe=te&&ne===`left`?de:h,pe=Sd({__clearable:I,__clearSection:F,rightSection:te&&ne===`right`?de:v,__defaultRightSection:R,size:u,__clearSectionMode:L});return(0,W.jsx)(yd,{value:{size:u||`sm`},children:(0,W.jsxs)(J,{ref:ae,dir:oe,...V(`wrapper`),...ce,...d,mod:[{error:!!f&&j,success:!!p&&!f&&M,pointer:E,disabled:m,multiline:D,withRightSection:!!pe,withLeftSection:!!fe,withBottomSection:!!re},N],variant:w,size:u,children:[fe&&(0,W.jsx)(`div`,{...g,"data-position":`left`,...V(`section`,{className:g?.className,style:g?.style}),children:fe}),(0,W.jsx)(J,{component:`input`,...le,...ue,required:s,mod:{disabled:m,error:!!f&&j,success:!!p&&!f&&M},variant:w,__size:ee,...V(`input`)}),re&&(0,W.jsx)(`div`,{...ie,...V(`bottomSection`,{className:ie?.className,style:ie?.style}),children:re}),pe&&(0,W.jsx)(`div`,{...y,"data-position":`right`,...V(`section`,{className:y?.className,style:y?.style}),children:pe})]})})});Vd.classes=wd,Vd.varsResolver=Bd,Vd.Wrapper=Rd,Vd.Label=jd,Vd.Error=Od,Vd.Success=Pd,Vd.Description=Ed,Vd.Placeholder=Md,Vd.ClearButton=bd,Vd.displayName=`@mantine/core/Input`;function Hd(e,t,n){let r=G([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,success:s,required:c,classNames:l,styles:u,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,wrapperProps:y,id:b,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,vars:D,mod:O,attributes:k,...A}=r,{styleProps:j,rest:M}=wr(A),N={label:i,description:a,error:o,success:s,required:c,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,unstyled:f,styles:u,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,id:b,mod:O,attributes:k,...y};return{...M,classNames:l,styles:u,unstyled:f,wrapperProps:{...N,...j},inputProps:{required:c,classNames:l,styles:u,unstyled:f,size:x,__staticSelector:p,__stylesApiProps:m||r,error:o,success:s,variant:E,id:b,attributes:k}}}var Ud={__staticSelector:`InputBase`,withAria:!0,size:`sm`},Wd=$r(e=>{let{inputProps:t,wrapperProps:n,...r}=Hd(`InputBase`,Ud,e);return(0,W.jsx)(Vd.Wrapper,{...n,children:(0,W.jsx)(Vd,{...t,...r})})});Wd.classes={...Vd.classes,...Vd.Wrapper.classes},Wd.displayName=`@mantine/core/InputBase`;function Gd(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function Kd({target:e,parent:t,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:a}){let o=(0,C.useRef)(-1),s=(0,C.useRef)(e),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(typeof r==`boolean`&&r),f=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetWidth===0?1:i.width/t.offsetWidth,o=t.offsetHeight===0?1:i.height/t.offsetHeight,s=window.getComputedStyle(e),c=window.getComputedStyle(t),l=wi(s.borderTopWidth)+wi(c.borderTopWidth),u=wi(s.borderLeftWidth)+wi(c.borderLeftWidth),d={top:(r.top-i.top)/o-l,left:(r.left-i.left)/a-u,width:r.width/a,height:r.height/o};n.current.style.transform=`translateY(${d.top}px) translateX(${d.left}px)`,n.current.style.width=`${d.width}px`,n.current.style.height=`${d.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,C.useRef)(null),h=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,C.useEffect)(()=>{if(t){let e=e=>{Gd(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,C.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),ut(()=>{Pt()!==`test`&&l(!0)},20,{autoInvoke:!0}),dt(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var qd={root:`m_96b553a6`},Jd=U((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),Yd=q(e=>{let t=G(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,target:c,parent:l,transitionDuration:u,mod:d,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m,attributes:h,ref:g,..._}=t,v=K({name:`FloatingIndicator`,classes:qd,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Jd,stylesCtx:{shouldReduceMotion:Xe()}}),y=(0,C.useRef)(null),{initialized:b,hidden:x}=Kd({target:c,parent:l,ref:y,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m}),S=Je(g,y);return!c||!l?null:(0,W.jsx)(J,{ref:S,mod:[{initialized:b,hidden:x},d],...v(`root`),..._})});Yd.displayName=`@mantine/core/FloatingIndicator`,Yd.classes=qd,Yd.varsResolver=Jd;function Xd({style:e,size:t=16,...n}){return(0,W.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:_(t),height:_(t),display:`block`},...n,children:(0,W.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}Xd.displayName=`@mantine/core/AccordionChevron`;var Zd={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},Qd=U((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:L(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),$d=q(e=>{let t=G(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=K({name:`Alert`,classes:Zd,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:Qd}),C=Re(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,W.jsx)(J,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,W.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,W.jsx)(`div`,{...S(`icon`),children:p}),(0,W.jsxs)(`div`,{...S(`body`),children:[u&&(0,W.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,W.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,W.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,W.jsx)(Hl,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});$d.classes=Zd,$d.varsResolver=Qd,$d.displayName=`@mantine/core/Alert`;var ef={root:`m_b6d8b162`};function tf(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var nf={inherit:!1},rf=U((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":R(i),"--text-lh":te(i),"--text-gradient":t===`gradient`?sn(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),Z=$r(e=>{let t=G(`Text`,nf,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t,x=K({name:[`Text`,l],props:t,classes:ef,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:rf});return(0,W.jsx)(J,{...x(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{truncate:tf(r),lineClamp:typeof n==`number`,inline:i,inherit:a},_],size:v,...b})});Z.classes=ef,Z.varsResolver=rf,Z.displayName=`@mantine/core/Text`;var af={root:`m_849cf0da`},of={underline:`hover`},sf=$r(e=>{let{underline:t,className:n,unstyled:r,mod:i,...a}=G(`Anchor`,of,e);return(0,W.jsx)(Z,{component:`a`,className:zt({[af.root]:!r},n),...a,mod:[{underline:t},i],__staticSelector:`Anchor`,unstyled:r})});sf.classes=af,sf.displayName=`@mantine/core/Anchor`;function cf({children:e,role:t}){let n=(0,C.use)(Cd);return n?(0,W.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,W.jsx)(W.Fragment,{children:e})}var lf=(0,C.createContext)(null),uf={hiddenInputValuesSeparator:`,`},df=Qr((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=G(`CheckboxGroup`,uf,e),[m,h]=Ye({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=typeof e==`string`?e:e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,W.jsx)(lf,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,W.jsxs)(Vd.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`CheckboxGroup`,children:[(0,W.jsx)(cf,{role:`group`,children:o}),(0,W.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));df.classes=Vd.Wrapper.classes,df.displayName=`@mantine/core/CheckboxGroup`;var ff={card:`m_26775b0a`},pf=(0,C.createContext)(null),mf={withBorder:!0},hf=U((e,{radius:t})=>({card:{"--card-radius":L(t)}})),gf=q(e=>{let t=G(`CheckboxCard`,mf,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,checked:c,mod:l,withBorder:u,value:d,onClick:f,defaultChecked:p,onChange:m,indeterminate:h,attributes:g,..._}=t,v=K({name:`CheckboxCard`,classes:ff,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s,varsResolver:hf,rootSelector:`card`}),y=(0,C.use)(lf),[b,x]=Ye({value:typeof c==`boolean`?c:y?y.value.includes(d||``):void 0,defaultValue:p,finalValue:!1,onChange:m});return(0,W.jsx)(pf,{value:{checked:b,indeterminate:h},children:(0,W.jsx)(Oc,{mod:[{"with-border":u,checked:b,indeterminate:h},l],...v(`card`),..._,role:`checkbox`,"aria-checked":h?`mixed`:b,onClick:e=>{f?.(e),y?.onChange(d||``),x(!b)}})})});gf.displayName=`@mantine/core/CheckboxCard`,gf.classes=ff,gf.varsResolver=hf;function _f({size:e,style:t,...n}){let r=e===void 0?t:{width:_(e),height:_(e),...t};return(0,W.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:r,"aria-hidden":!0,...n,children:(0,W.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function vf({indeterminate:e,...t}){return e?(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 32 6`,"aria-hidden":!0,...t,children:(0,W.jsx)(`rect`,{width:`32`,height:`6`,fill:`currentColor`,rx:`3`})}):(0,W.jsx)(_f,{...t})}var yf={indicator:`m_5e5256ee`,icon:`m_1b1c543a`,"indicator--light":`m_193e54c8`,"indicator--outline":`m_76e20374`},bf={icon:vf,variant:`filled`,radius:`sm`},xf=U((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=nn({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:rn(n,e);return{indicator:{"--checkbox-size":F(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:L(t),"--checkbox-color":u,"--checkbox-bg":l?.background,"--checkbox-icon-color":i?rn(i,e):l?l.color:mn(o,e)?dn({color:n,theme:e,autoContrast:o}):void 0}}}),Sf=q(e=>{let t=G(`CheckboxIndicator`,bf,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,icon:c,indeterminate:l,radius:u,color:d,iconColor:f,autoContrast:p,checked:m,mod:h,variant:g,disabled:_,attributes:v,...y}=t,b=K({name:`CheckboxIndicator`,classes:yf,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:xf,rootSelector:`indicator`}),x=(0,C.use)(pf),S=typeof l==`boolean`?l:x?.indeterminate,w=typeof m==`boolean`||typeof l==`boolean`?m||l:x?.checked||x?.indeterminate||!1;return(0,W.jsx)(J,{...b(`indicator`,{variant:g}),variant:g,mod:[{checked:w,disabled:_},h],...y,children:(0,W.jsx)(c,{indeterminate:S,...b(`icon`)})})});Sf.displayName=`@mantine/core/CheckboxIndicator`,Sf.classes=yf,Sf.varsResolver=xf;var Cf={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},wf=Cf;function Tf({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x}){let S=K({name:e,props:t,className:n,style:_,classes:Cf,classNames:r,styles:i,unstyled:a,attributes:b}),C=c?`${l}-description`:void 0,w=d&&typeof d!=`boolean`?`${l}-error`:void 0;return(0,W.jsx)(J,{...S(`root`),__vars:{"--label-fz":R(f),"--label-lh":F(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,W.jsxs)(J,{component:m,htmlFor:m===`label`?l:void 0,...S(`body`),children:[o,(0,W.jsxs)(`div`,{...S(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,W.jsx)(J,{component:h,htmlFor:h===`label`?l:void 0,...S(`label`),"data-disabled":u||void 0,children:s}),c&&(0,W.jsx)(Vd.Description,{id:C,size:f,__inheritStyles:!1,...S(`description`),children:c}),d&&typeof d!=`boolean`&&(0,W.jsx)(Vd.Error,{id:w,size:f,__inheritStyles:!1,...S(`error`),children:d})]})]})})}Tf.displayName=`@mantine/core/InlineInput`;var Ef={root:`m_bf2d988c`,inner:`m_26062bec`,input:`m_26063560`,icon:`m_bf295423`,"input--light":`m_595ab216`,"input--outline":`m_215c4542`},Df={labelPosition:`right`,icon:vf,withErrorStyles:!0,variant:`filled`,radius:`sm`},Of=U((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=nn({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:rn(n,e);return{root:{"--checkbox-size":F(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:L(t),"--checkbox-color":u,"--checkbox-bg":l?.background,"--checkbox-icon-color":i?rn(i,e):l?l.color:mn(o,e)?dn({color:n,theme:e,autoContrast:o}):void 0}}}),kf=q(e=>{let t=G(`Checkbox`,Df,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,id:u,size:d,radius:f,wrapperProps:p,checked:m,labelPosition:h,description:g,error:_,disabled:v,variant:y,indeterminate:b,icon:x,rootRef:S,iconColor:w,onChange:T,autoContrast:E,mod:D,attributes:O,readOnly:k,onClick:A,withErrorStyles:j,ref:M,...N}=t,ee=(0,C.useRef)(null),P=(0,C.use)(lf),F=d||P?.size,I=K({name:`Checkbox`,props:t,classes:Ef,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:O,vars:s,varsResolver:Of}),{styleProps:L,rest:R}=wr(N),te=Re(u),ne=[g?`${te}-description`:void 0,_&&typeof _!=`boolean`?`${te}-error`:void 0,R[`aria-describedby`]].filter(Boolean).join(` `)||void 0,re={checked:P?.value.includes(R.value)??m,onChange:e=>{k||(P?.onChange(e),T?.(e))}},ie=P?.isDisabled?.(R.value)??!1,ae=v||ie;return(0,C.useEffect)(()=>{ee.current&&(ee.current.indeterminate=b||!1,b?ee.current.setAttribute(`data-indeterminate`,`true`):ee.current.removeAttribute(`data-indeterminate`))},[b]),(0,W.jsx)(Tf,{...I(`root`),__staticSelector:`Checkbox`,__stylesApiProps:t,id:te,size:F,labelPosition:h,label:l,description:g,error:_,disabled:ae,classNames:n,styles:a,unstyled:o,"data-checked":re.checked||m||void 0,variant:y,ref:S,mod:D,attributes:O,inert:R.inert,...L,...p,children:(0,W.jsxs)(J,{...I(`inner`),mod:{labelPosition:h},children:[(0,W.jsx)(J,{component:`input`,id:te,ref:Je(ee,M),mod:{error:!!_,"with-error-styles":j},...I(`input`,{focusable:!0,variant:y}),...R,...re,"aria-describedby":ne,disabled:ae,inert:R.inert,type:`checkbox`,onClick:e=>{k&&re.checked===void 0&&e.preventDefault(),A?.(e)}}),(0,W.jsx)(x,{indeterminate:b,...I(`icon`)})]})})});kf.classes={...Ef,...wf},kf.varsResolver=Of,kf.displayName=`@mantine/core/Checkbox`,kf.Group=df,kf.Indicator=Sf,kf.Card=gf;var Af={group:`m_11def92b`,root:`m_f85678b6`,image:`m_11f8ac07`,placeholder:`m_104cd71f`},jf=(0,C.createContext)({withinGroup:!1}),Mf=U((e,{spacing:t})=>({group:{"--ag-spacing":I(t)}})),Nf=q(e=>{let t=G(`AvatarGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,spacing:c,attributes:l,...u}=t,d=K({name:`AvatarGroup`,classes:Af,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:Mf,rootSelector:`group`});return(0,W.jsx)(jf,{value:{withinGroup:!0},children:(0,W.jsx)(J,{...d(`group`),...u})})});Nf.classes=Af,Nf.varsResolver=Mf,Nf.displayName=`@mantine/core/AvatarGroup`;function Pf(e){return(0,W.jsx)(`svg`,{...e,"data-avatar-placeholder-icon":!0,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,W.jsx)(`path`,{d:`M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function Ff(e){let t=0;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t}var If=[`blue`,`cyan`,`grape`,`green`,`indigo`,`lime`,`orange`,`pink`,`red`,`teal`,`violet`];function Lf(e,t=If){let n=Ff(e);return t[Math.abs(n)%t.length]}function Rf(e,t=2){let n=e.split(` `);return n.length===1?e.slice(0,t).toUpperCase():n.map(e=>e[0]).slice(0,t).join(``).toUpperCase()}var zf=U((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o,name:s,allowedInitialsColors:c})=>{let l=a===`initials`&&typeof s==`string`?Lf(s,c):a,u=e.variantColorResolver({color:l||`gray`,theme:e,gradient:i,variant:r||`light`,autoContrast:o});return{root:{"--avatar-size":F(t,`avatar-size`),"--avatar-radius":n===void 0?void 0:L(n),"--avatar-bg":l||r?u.background:void 0,"--avatar-color":l||r?u.color:void 0,"--avatar-bd":l||r?u.border:void 0}}}),Bf=$r(e=>{let t=G(`Avatar`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,src:c,alt:l,radius:u,color:d,gradient:f,imageProps:p,children:m,autoContrast:h,mod:g,name:_,allowedInitialsColors:v,attributes:y,...b}=t,x=(0,C.use)(jf),[S,w]=(0,C.useState)(!c),T=K({name:`Avatar`,props:t,classes:Af,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:zf});return(0,C.useEffect)(()=>w(!c),[c]),(0,W.jsx)(J,{...T(`root`),mod:[{"within-group":x.withinGroup},g],...b,children:S||!c?(0,W.jsx)(`span`,{...T(`placeholder`),title:l,children:m||typeof _==`string`&&Rf(_)||(0,W.jsx)(Pf,{})}):(0,W.jsx)(`img`,{...p,...T(`image`),src:c,alt:l,onError:e=>{w(!0),p?.onError?.(e)}})})});Bf.classes=Af,Bf.varsResolver=zf,Bf.displayName=`@mantine/core/Avatar`,Bf.Group=Nf;var Vf={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},Hf=U((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":F(a,`badge-height`),"--badge-padding-x":F(a,`badge-padding-x`),"--badge-fz":F(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:L(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?rn(n,e):void 0}}}),Uf=$r(e=>{let t=G(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=K({name:`Badge`,props:t,classes:Vf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:Hf});return(0,W.jsxs)(J,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,W.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,W.jsx)(`span`,{...x(`label`),children:p}),f&&(0,W.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});Uf.classes=Vf,Uf.varsResolver=Hf,Uf.displayName=`@mantine/core/Badge`;var Wf={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},Gf={orientation:`horizontal`},Kf=U((e,{borderWidth:t})=>({group:{"--button-border-width":_(t)}})),qf=q(e=>{let t=G(`ButtonGroup`,Gf,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=G(`ButtonGroup`,Gf,e),p=K({name:`ButtonGroup`,props:t,classes:Wf,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:Kf,rootSelector:`group`});return(0,W.jsx)(J,{...p(`group`),mod:[{orientation:s},u],role:`group`,...f})});qf.classes=Wf,qf.varsResolver=Kf,qf.displayName=`@mantine/core/ButtonGroup`;var Jf=U((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":F(o,`section-height`),"--section-padding-x":F(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?R(o.replace(`compact-`,``)):R(o),"--section-radius":t===void 0?void 0:L(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),Yf=q(e=>{let t=G(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t,p=K({name:`ButtonGroupSection`,props:t,classes:Wf,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:Jf,rootSelector:`groupSection`});return(0,W.jsx)(J,{...p(`groupSection`),...f})});Yf.classes=Wf,Yf.varsResolver=Jf,Yf.displayName=`@mantine/core/ButtonGroupSection`;var Xf={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${_(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},Zf=U((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":F(a,`button-height`),"--button-padding-x":F(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?R(a.replace(`compact-`,``)):R(a),"--button-radius":t===void 0?void 0:L(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),Qf=$r(e=>{let t=G(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=K({name:`Button`,props:t,classes:Wf,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:Zf}),T=!!c,E=!!l;return(0,W.jsxs)(Oc,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,W.jsx)(rl,{mounted:p,transition:Xf,duration:150,children:e=>(0,W.jsx)(J,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,W.jsx)(kl,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,W.jsxs)(`span`,{...w(`inner`),children:[c&&(0,W.jsx)(J,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,W.jsx)(J,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,W.jsx)(J,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});Qf.classes=Wf,Qf.varsResolver=Zf,Qf.displayName=`@mantine/core/Button`,Qf.Group=qf,Qf.GroupSection=Yf;var $f={root:`m_4451eb3a`},ep=$r(e=>{let t=G(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=K({name:`Center`,props:t,classes:$f,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,W.jsx)(J,{mod:[{inline:c},l],...f(`root`),...d})});ep.classes=$f,ep.displayName=`@mantine/core/Center`;var tp=Qr(e=>{let{value:t,defaultValue:n,onChange:r,multiple:i,children:a}=G(`ChipGroup`,null,e),[o,s]=Ye({value:t,defaultValue:n,finalValue:i?[]:null,onChange:r});return(0,W.jsx)(np,{value:{isChipSelected:e=>Array.isArray(o)?o.includes(e):e===o,onChange:e=>{let t=e.currentTarget.value;s(Array.isArray(o)?o.includes(t)?o.filter(e=>e!==t):[...o,t]:t)},multiple:i},children:a})});tp.displayName=`@mantine/core/ChipGroup`;var np=(0,C.createContext)(null),rp={root:`m_f59ffda3`,label:`m_be049a53`,"label--outline":`m_3904c1af`,"label--filled":`m_fa109255`,"label--light":`m_f7e165c3`,iconWrapper:`m_9ac86df9`,checkIcon:`m_d6d72580`,input:`m_bde07329`},ip={type:`checkbox`},ap=U((e,{size:t,radius:n,variant:r,color:i,autoContrast:a})=>{let o=e.variantColorResolver({color:i||e.primaryColor,theme:e,variant:r||`filled`,autoContrast:a});return{root:{"--chip-fz":R(t),"--chip-size":F(t,`chip-size`),"--chip-radius":n===void 0?void 0:L(n),"--chip-checked-padding":F(t,`chip-checked-padding`),"--chip-padding":F(t,`chip-padding`),"--chip-icon-size":F(t,`chip-icon-size`),"--chip-bg":i||r?o.background:void 0,"--chip-hover":i||r?o.hover:void 0,"--chip-color":i||r?o.color:void 0,"--chip-bd":i||r?o.border:void 0,"--chip-spacing":F(t,`chip-spacing`)}}}),op=q(e=>{let t=G(`Chip`,ip,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,id:c,checked:l,defaultChecked:u,onChange:d,value:f,wrapperProps:p,type:m,disabled:h,children:g,size:_,variant:v,icon:y,rootRef:b,autoContrast:x,mod:S,attributes:w,readOnly:T,...E}=t,D=K({name:`Chip`,classes:rp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,varsResolver:ap}),O=(0,C.use)(np),k=Re(c),{styleProps:A,rest:j}=wr(E),[M,N]=Ye({value:l,defaultValue:u,finalValue:!1,onChange:d}),ee=O?{checked:O.isChipSelected(f),onChange:e=>{T||(O.onChange(e),d?.(e.currentTarget.checked))},type:O.multiple?`checkbox`:`radio`}:{},P=ee.checked||M;return(0,W.jsxs)(J,{size:_,variant:v,ref:b,mod:S,...D(`root`),...A,...p,children:[(0,W.jsx)(`input`,{type:m,...D(`input`),checked:P,onChange:e=>!T&&N(e.currentTarget.checked),id:k,disabled:h,readOnly:T,value:f,...ee,...j}),(0,W.jsxs)(J,{component:`label`,htmlFor:k,mod:{checked:P,disabled:h},...D(`label`,{variant:v||`filled`}),children:[P&&y!==null&&y!==!1&&(0,W.jsx)(`span`,{...D(`iconWrapper`),children:y===void 0?(0,W.jsx)(_f,{...D(`checkIcon`)}):y}),(0,W.jsx)(`span`,{children:g})]})]})});op.classes=rp,op.varsResolver=ap,op.displayName=`@mantine/core/Chip`,op.Group=tp;var sp={root:`m_b183c0a2`},cp=U((e,{color:t})=>({root:{"--code-bg":t?rn(t,e):void 0}})),lp=q(e=>{let t=G(`Code`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,block:l,mod:u,attributes:d,...f}=t,p=K({name:`Code`,props:t,classes:sp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:cp});return(0,W.jsx)(J,{component:l?`pre`:`code`,mod:[{block:l},u],...p(`root`),...f,dir:`ltr`})});lp.classes=sp,lp.varsResolver=cp,lp.displayName=`@mantine/core/Code`;var up={root:`m_7485cace`},dp={strategy:`block`},fp=U((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:F(t,`container-size`)}})),pp=q(e=>{let t=G(`Container`,dp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fluid:c,mod:l,attributes:u,strategy:d,...f}=t,p=K({name:`Container`,classes:up,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:fp});return(0,W.jsx)(J,{mod:[{fluid:c,strategy:d},l],...p(`root`),...f})});pp.classes=up,pp.varsResolver=fp,pp.displayName=`@mantine/core/Container`;var mp={root:`m_3eebeb36`,label:`m_9e365f20`},hp={orientation:`horizontal`},gp=U((e,{color:t,variant:n,size:r})=>({root:{"--divider-color":t?rn(t,e):void 0,"--divider-border-style":n,"--divider-size":F(r,`divider-size`)}})),_p=q(e=>{let t=G(`Divider`,hp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,orientation:l,label:u,labelPosition:d,mod:f,attributes:p,...m}=t,h=K({name:`Divider`,classes:mp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:gp});return(0,W.jsx)(J,{mod:[{orientation:l,withLabel:!!u},f],role:`separator`,"aria-orientation":l,...h(`root`),...m,children:u&&(0,W.jsx)(J,{component:`span`,mod:{position:d},...h(`label`),children:u})})});_p.classes=mp,_p.varsResolver=gp,_p.displayName=`@mantine/core/Divider`;function vp({color:e,theme:t,defaultShade:n}){let r=nn({color:e,theme:t});return r.isThemeColor?r.shade===void 0?`var(--mantine-color-${r.color}-${n})`:`var(${r.variable})`:e}var yp={root:`m_bcb3f3c2`},bp={color:`yellow`},xp=U((e,{color:t})=>({root:{"--mark-bg-dark":vp({color:t,theme:e,defaultShade:5}),"--mark-bg-light":vp({color:t,theme:e,defaultShade:2})}})),Sp=q(e=>{let t=G(`Mark`,bp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,variant:l,attributes:u,...d}=t,f=K({name:`Mark`,props:t,className:r,style:i,classes:yp,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:xp});return(0,W.jsx)(J,{component:`mark`,variant:l,...f(`root`),...d})});Sp.classes=yp,Sp.varsResolver=xp,Sp.displayName=`@mantine/core/Mark`;function Cp(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`)}function wp(e){return e.normalize(`NFD`).replace(/\p{M}/gu,``)}function Tp(e){let t=``,n=[],r=0;for(;r<e.length;){let i=e.codePointAt(r),a=String.fromCodePoint(i),o=wp(a);for(let e=0;e<o.length;e+=1)n.push(r);t+=o,r+=a.length}return n.push(e.length),{folded:t,map:n}}function Ep(e,t){let{folded:n,map:r}=Tp(e),i=[],a=0,o;for(;(o=t.exec(n))!==null;){let n=o.index,s=n+o[0].length,c=r[n],l=r[s];c>a&&i.push({chunk:e.slice(a,c),highlighted:!1}),i.push({chunk:e.slice(c,l),highlighted:!0}),a=l,o[0].length===0&&(t.lastIndex+=1)}return a<e.length&&i.push({chunk:e.slice(a),highlighted:!1}),i.filter(({chunk:e})=>e)}function Dp(e,t,n={}){if(t==null)return[{chunk:e,highlighted:!1}];let{wholeWord:r=!1,caseInsensitive:i=!0,accentInsensitive:a=!0}=n,o=e=>a?wp(Cp(e)):Cp(e),s=Array.isArray(t)?t.map(o):o(t);if(!(Array.isArray(s)?s.filter(e=>e.trim().length>0).length>0:s.trim()!==``))return[{chunk:e,highlighted:!1}];let c=typeof s==`string`?s.trim():s.filter(e=>e.trim().length!==0).map(e=>e.trim()).sort((e,t)=>t.length-e.length).join(`|`),l=r?`(?<![\\p{L}\\p{N}_])(${c})(?![\\p{L}\\p{N}_])`:`(${c})`,u=[`g`,i?`i`:``,r?`u`:``].join(``),d=new RegExp(l,u);return a?Ep(e,d):e.split(d).map((e,t)=>({chunk:e,highlighted:t%2==1})).filter(({chunk:e})=>e)}var Op={color:`yellow`,wholeWord:!1,caseInsensitive:!0,accentInsensitive:!0},kp=$r(e=>{let{unstyled:t,children:n,highlight:r,highlightStyles:i,color:a,wholeWord:o,caseInsensitive:s,accentInsensitive:c,...l}=G(`Highlight`,Op,e),u=Array.isArray(r)&&typeof r[0]==`object`,d=new Map,f=e=>{let t=e;return s&&(t=t.toLowerCase()),c&&(t=wp(t)),t},p;p=u?r.map(e=>(e.color&&d.set(f(e.text),e.color),e.text)):Array.isArray(r)?r:[r];let m=Dp(n,p,{wholeWord:o,caseInsensitive:s,accentInsensitive:c});return(0,W.jsx)(Z,{unstyled:t,...l,__staticSelector:`Highlight`,children:m.map(({chunk:e,highlighted:n},r)=>n?(0,W.jsx)(Sp,{unstyled:t,color:d.get(f(e))||a,style:i,"data-highlight":e,children:e},r):(0,W.jsx)(`span`,{children:e},r))})});kp.classes=Z.classes,kp.displayName=`@mantine/core/Highlight`;var Ap=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],jp={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function Mp(e){Object.keys(jp).forEach(t=>{e.style.setProperty(t,jp[t],`important`)})}function Np(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of Ap)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var Pp=null;function Fp(e,t,n=1,r=1/0){Pp||(Pp=document.createElement(`textarea`),Pp.setAttribute(`tabindex`,`-1`),Pp.setAttribute(`aria-hidden`,`true`),Pp.setAttribute(`aria-label`,`autosize measurement`),Mp(Pp)),Pp.parentNode===null&&document.body.appendChild(Pp);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{Pp.style[e]=o[e]}),Mp(Pp),Pp.value=t;let c=s===`border-box`?Pp.scrollHeight+a:Pp.scrollHeight-i;Pp.value=t,c=s===`border-box`?Pp.scrollHeight+a:Pp.scrollHeight-i,Pp.value=`x`;let l=Pp.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function Ip({maxRows:e,minRows:t,onChange:n,ref:r,...i}){let a=i.value!==void 0,o=(0,C.useRef)(null),s=Je(o,r),c=(0,C.useRef)(0),l=(0,C.useRef)(0),u=()=>{let n=o.current;if(!n)return;let r=Np(n);if(!r)return;let[i]=Fp(r,n.value||n.placeholder||`x`,t,e);c.current!==i&&(c.current=i,n.style.setProperty(`height`,`${i}px`,`important`))},d=(0,C.useEffectEvent)(u),f=e=>{a||u(),n?.(e)};return(0,C.useLayoutEffect)(u),(0,C.useEffect)(()=>{let e=()=>u();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,C.useEffect)(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;l.current=e.offsetWidth;let t=0,n=new ResizeObserver(()=>{o.current&&o.current.offsetWidth!==l.current&&(l.current=o.current.offsetWidth,cancelAnimationFrame(t),t=requestAnimationFrame(d))});return n.observe(e),()=>{cancelAnimationFrame(t),n.disconnect()}},[]),(0,C.useEffect)(()=>{let e=()=>u();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,C.useEffect)(()=>{let e=e=>{if(o.current?.form===e.target&&!a){let e=o.current.value;requestAnimationFrame(()=>{o.current&&e!==o.current.value&&u()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[a]),(0,W.jsx)(`textarea`,{rows:t,...i,onChange:f,ref:s})}var Lp=q(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,bottomSection:o,bottomSectionProps:s,...c}=G([`Input`,`InputWrapper`,`Textarea`],null,e),l=t&&Pt()!==`test`,u=l?{maxRows:n,minRows:r}:{};return(0,W.jsx)(Wd,{component:l?Ip:`textarea`,...c,__staticSelector:i||`Textarea`,__bottomSection:o,__bottomSectionProps:s,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...u})});Lp.classes=Wd.classes,Lp.displayName=`@mantine/core/Textarea`;var Rp={root:`m_dc6f14e2`},zp=U((e,{size:t})=>({root:{"--kbd-fz":F(t,`kbd-fz`)}})),Bp=q(e=>{let t=G(`Kbd`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t,u=K({name:`Kbd`,classes:Rp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:zp});return(0,W.jsx)(J,{component:`kbd`,...u(`root`),...l})});Bp.classes=Rp,Bp.varsResolver=zp,Bp.displayName=`@mantine/core/Kbd`;function Vp({size:e,style:t,...n}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:_(e),height:_(e),...t},"aria-hidden":!0,...n,children:(0,W.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var[Hp,Up]=T(`Modal component was not found in tree`),Wp={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},Gp=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=G(`ModalBody`,null,e),s=Up();return(0,W.jsx)(ld,{...s.getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Gp.classes=Wp,Gp.displayName=`@mantine/core/ModalBody`;var Kp=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=G(`ModalCloseButton`,null,e),s=Up();return(0,W.jsx)(ud,{...s.getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});Kp.classes=Wp,Kp.displayName=`@mantine/core/ModalCloseButton`;var qp=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=G(`ModalContent`,null,e),l=Up(),u=l.scrollAreaComponent||vd;return(0,W.jsx)(dd,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,W.jsx)(u,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${_(l.yOffset)} * 2))`},children:o})})});qp.classes=Wp,qp.displayName=`@mantine/core/ModalContent`;var Jp=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=G(`ModalHeader`,null,e),s=Up();return(0,W.jsx)(fd,{...s.getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Jp.classes=Wp,Jp.displayName=`@mantine/core/ModalHeader`;var Yp=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=G(`ModalOverlay`,null,e),s=Up();return(0,W.jsx)(hd,{...s.getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});Yp.classes=Wp,Yp.displayName=`@mantine/core/ModalOverlay`;var Xp={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:N(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},Zp=U((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:L(t),"--modal-size":F(n,`modal-size`),"--modal-y-offset":_(r),"--modal-x-offset":_(i)}})),Qp=q(e=>{let t=G(`ModalRoot`,Xp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:m,attributes:h,...g}=t,_=K({name:m,classes:Wp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Zp});return(0,W.jsx)(Hp,{value:{yOffset:c,scrollAreaComponent:l,getStyles:_,fullScreen:d},children:(0,W.jsx)(od,{..._(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===wc.Autosize||void 0,unstyled:o,...g})})});Qp.classes=Wp,Qp.varsResolver=Zp,Qp.displayName=`@mantine/core/ModalRoot`;var $p=(0,C.createContext)(null);function em({children:e}){let[t,n]=(0,C.useState)([]),[r,i]=(0,C.useState)(N(`modal`)),[a]=(0,C.useState)(()=>new WeakSet);return(0,W.jsx)($p,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r,handledEscapeEvents:a},children:e})}em.displayName=`@mantine/core/ModalStack`;var tm=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=G(`ModalTitle`,null,e),s=Up();return(0,W.jsx)(_d,{...s.getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});tm.classes=Wp,tm.displayName=`@mantine/core/ModalTitle`;var nm={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:N(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},rm=q(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=G(`Modal`,nm,e),f=(0,C.use)($p),p=!!t||i,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l),__handledEscapeEvents:f.handledEscapeEvents}:{},h=n===!1?!1:l&&f?f.currentId===l:c;return(0,C.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||N(`modal`)):f.removeModal(l))},[c,l,u]),(0,W.jsxs)(Qp,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[n&&(0,W.jsx)(Yp,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,W.jsxs)(qp,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,W.jsxs)(Jp,{children:[t&&(0,W.jsx)(tm,{children:t}),i&&(0,W.jsx)(Kp,{...a})]}),(0,W.jsx)(Gp,{children:o})]})]})});rm.classes=Wp,rm.displayName=`@mantine/core/Modal`,rm.Root=Qp,rm.Overlay=Yp,rm.Content=qp,rm.Body=Gp,rm.Header=Jp,rm.Title=tm,rm.CloseButton=Kp,rm.Stack=em;var im={root:`m_f0824112`,description:`m_57492dcc`,section:`m_690090b5`,label:`m_1f6ac4c4`,body:`m_f07af9d2`,children:`m_e17b862f`,chevron:`m_1fd8a00b`},am=U((e,{variant:t,color:n,childrenOffset:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:t||`light`,autoContrast:i});return{root:{"--nl-bg":n||t?a.background:void 0,"--nl-hover":n||t?a.hover:void 0,"--nl-color":n||t?a.color:void 0},children:{"--nl-offset":I(r)}}}),om=$r(e=>{let t=G(`NavLink`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,defaultOpened:l,onChange:u,children:d,active:f,disabled:p,leftSection:m,rightSection:h,label:g,description:_,disableRightSectionRotation:v,noWrap:y,childrenOffset:b,autoContrast:x,mod:S,attributes:C,onClick:w,onKeyDown:T,keepMounted:E,...D}=t,O=K({name:`NavLink`,props:t,classes:im,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:C,vars:s,varsResolver:am}),[k,A]=Ye({value:c,defaultValue:l,finalValue:!1,onChange:u}),j=!!d,M=e=>{w?.(e),j&&(e.preventDefault(),A(!k))};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(Oc,{...O(`root`),component:`a`,onClick:M,onKeyDown:e=>{T?.(e),e.nativeEvent.code===`Space`&&j&&(e.preventDefault(),A(!k))},unstyled:o,mod:[{disabled:p,active:f,expanded:k},S],...D,children:[m&&(0,W.jsx)(J,{component:`span`,...O(`section`),mod:{position:`left`},children:m}),(0,W.jsxs)(J,{...O(`body`),mod:{"no-wrap":y},children:[(0,W.jsx)(J,{component:`span`,...O(`label`),children:g}),(0,W.jsx)(J,{component:`span`,mod:{active:f},...O(`description`),children:_})]}),(j||h!==void 0)&&(0,W.jsx)(J,{...O(`section`),component:`span`,mod:{rotate:k&&!v,position:`right`},children:j&&h===void 0?(0,W.jsx)(Xd,{...O(`chevron`)}):h})]}),j&&(0,W.jsx)(li,{expanded:k,keepMounted:E,...O(`collapse`),children:(0,W.jsx)(`div`,{...O(`children`),children:d})})]})});om.classes=im,om.varsResolver=am,om.displayName=`@mantine/core/NavLink`;var sm={root:`m_a513464`,icon:`m_a4ceffb`,loader:`m_b0920b15`,body:`m_a49ed24`,title:`m_3feedf16`,description:`m_3d733a3a`,closeButton:`m_919a4d88`},cm={withCloseButton:!0},lm=U((e,{radius:t,color:n})=>({root:{"--notification-radius":t===void 0?void 0:L(t),"--notification-color":n?rn(n,e):void 0}})),um=q(e=>{let t=G(`Notification`,cm,e),{className:n,color:r,radius:i,loading:a,withCloseButton:o,withBorder:s,title:c,icon:l,children:u,onClose:d,closeButtonProps:f,classNames:p,style:m,styles:h,unstyled:g,vars:_,mod:v,loaderProps:y,role:b,attributes:x,...S}=t,C=K({name:`Notification`,classes:sm,props:t,className:n,style:m,classNames:p,styles:h,unstyled:g,attributes:x,vars:_,varsResolver:lm});return(0,W.jsxs)(J,{...C(`root`),mod:[{withIcon:!!l||a,withBorder:s},v],role:b||`alert`,...S,children:[l&&!a&&(0,W.jsx)(`div`,{...C(`icon`),children:l}),a&&(0,W.jsx)(kl,{size:28,color:r,...C(`loader`),...y}),(0,W.jsxs)(`div`,{...C(`body`),children:[c&&(0,W.jsx)(`div`,{...C(`title`),children:c}),(0,W.jsx)(J,{...C(`description`),mod:{withTitle:!!c},children:u})]}),o&&(0,W.jsx)(Hl,{iconSize:16,color:`gray`,...f,unstyled:g,onClick:e=>{f?.onClick?.(e),d?.()},...C(`closeButton`)})]})});um.classes=sm,um.varsResolver=lm,um.displayName=`@mantine/core/Notification`;var[dm,fm]=T(`Progress.Root component was not found in tree`),pm={root:`m_db6d6462`,section:`m_2242eb65`,"stripes-animation":`m_81a374bd`,"stripes-animation-vertical":`m_e0fb7a86`,label:`m_91e40b74`},mm=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=G(`ProgressLabel`,null,e),s=fm();return(0,W.jsx)(J,{...s.getStyles(`label`,{className:n,style:r,classNames:t,styles:i}),...o})});mm.classes=pm,mm.displayName=`@mantine/core/ProgressLabel`;var hm=U((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":F(t,`progress-size`),"--progress-radius":n===void 0?void 0:L(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),gm=q(e=>{let t=G(`ProgressRoot`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,transitionDuration:l,orientation:u,attributes:d,mod:f,...p}=t,m=K({name:`Progress`,classes:pm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:hm});return(0,W.jsx)(dm,{value:{getStyles:m,autoContrast:c},children:(0,W.jsx)(J,{mod:[{orientation:u},f],...m(`root`),...p})})});gm.classes=pm,gm.varsResolver=hm,gm.displayName=`@mantine/core/ProgressRoot`;var _m={withAria:!0},vm=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,value:o,withAria:s,color:c,striped:l,animated:u,mod:d,...f}=G(`ProgressSection`,_m,e),p=fm(),m=Bn(),h=s?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":o,"aria-valuetext":`${o}%`}:{};return(0,W.jsx)(J,{...p.getStyles(`section`,{className:n,classNames:t,styles:i,style:r}),...f,...h,mod:[{striped:l||u,animated:u},d],__vars:{"--progress-section-size":`${o}%`,"--progress-section-color":rn(c,m),"--progress-label-color":mn(p.autoContrast,m)?dn({color:c,theme:m,autoContrast:p.autoContrast}):void 0}})});vm.classes=pm,vm.displayName=`@mantine/core/ProgressSection`;var ym=q(e=>{let t=G(`Progress`,null,e),{value:n,classNames:r,styles:i,vars:a,color:o,striped:s,animated:c,"aria-label":l,...u}=t,{resolvedClassNames:d,resolvedStyles:f}=nr({classNames:r,styles:i,props:t});return(0,W.jsx)(gm,{classNames:d,styles:f,vars:a,...u,children:(0,W.jsx)(vm,{value:n,color:o,striped:s,animated:c,"aria-label":l})})});ym.classes=pm,ym.displayName=`@mantine/core/Progress`,ym.Section=vm,ym.Root=gm,ym.Label=mm;var bm=(0,C.createContext)(null),xm=Qr((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,name:s,readOnly:c,disabled:l,...u}=G(`RadioGroup`,null,e),d=Re(s),[f,p]=Ye({value:t,defaultValue:n,finalValue:``,onChange:r});return(0,W.jsx)(bm,{value:{value:f,onChange:e=>!c&&p(typeof e==`string`?e:e.currentTarget.value),size:i,name:d,disabled:l},children:(0,W.jsx)(Vd.Wrapper,{size:i,...a,...u,labelElement:`div`,__staticSelector:`RadioGroup`,children:(0,W.jsx)(cf,{role:`radiogroup`,children:o})})})}));xm.classes=Vd.Wrapper.classes,xm.displayName=`@mantine/core/RadioGroup`;var Sm={card:`m_9dc8ae12`},Cm=(0,C.createContext)(null),wm={withBorder:!0},Tm=U((e,{radius:t})=>({card:{"--card-radius":L(t)}})),Em=q(e=>{let t=G(`RadioCard`,wm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,checked:c,mod:l,withBorder:u,value:d,onClick:f,name:p,onKeyDown:m,attributes:h,...g}=t,_=K({name:`RadioCard`,classes:Sm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Tm,rootSelector:`card`}),{dir:v}=si(),y=(0,C.use)(bm),b=typeof c==`boolean`?c:y?.value===d||!1,x=p||y?.name,S=e=>{if(m?.(e),x&&[`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`].includes(e.nativeEvent.code)){e.preventDefault();let t=Array.from(document.querySelectorAll(`[role="radio"][name="${x}"]`)),n=t.findIndex(t=>t===e.target),r=n+1>=t.length?0:n+1,i=n-1<0?t.length-1:n-1;e.nativeEvent.code===`ArrowDown`&&(t[r].focus(),t[r].click()),e.nativeEvent.code===`ArrowUp`&&(t[i].focus(),t[i].click()),e.nativeEvent.code===`ArrowLeft`&&(t[v===`ltr`?i:r].focus(),t[v===`ltr`?i:r].click()),e.nativeEvent.code===`ArrowRight`&&(t[v===`ltr`?r:i].focus(),t[v===`ltr`?r:i].click())}};return(0,W.jsx)(Cm,{value:{checked:b},children:(0,W.jsx)(Oc,{mod:[{"with-border":u,checked:b},l],..._(`card`),...g,role:`radio`,"aria-checked":b,name:x,onClick:e=>{f?.(e),y?.onChange(d||``)},onKeyDown:S})})});Em.displayName=`@mantine/core/RadioCard`,Em.classes=Sm,Em.varsResolver=Tm;var Dm={indicator:`m_717d7ff6`,icon:`m_3e4da632`,"indicator--light":`m_7eec72c0`,"indicator--outline":`m_2980836c`},Om={icon:Vp},km=U((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=nn({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:rn(n,e);return{indicator:{"--radio-size":F(r,`radio-size`),"--radio-radius":t===void 0?void 0:L(t),"--radio-color":u,"--radio-bg":l?.background,"--radio-icon-size":typeof r==`number`?`calc(${F(r,`radio-size`)} * 0.4)`:F(r,`radio-icon-size`),"--radio-icon-color":i?rn(i,e):l?l.color:mn(o,e)?dn({color:n,theme:e,autoContrast:o}):void 0}}}),Am=q(e=>{let t=G(`RadioIndicator`,Om,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,icon:c,radius:l,color:u,iconColor:d,autoContrast:f,checked:p,mod:m,variant:h,disabled:g,attributes:_,...v}=t,y=K({name:`RadioIndicator`,classes:Dm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:_,vars:s,varsResolver:km,rootSelector:`indicator`}),b=(0,C.use)(Cm),x=typeof p==`boolean`?p:b?.checked||!1;return(0,W.jsx)(J,{...y(`indicator`,{variant:h}),variant:h,mod:[{checked:x,disabled:g},m],...v,children:(0,W.jsx)(c,{...y(`icon`)})})});Am.displayName=`@mantine/core/RadioIndicator`,Am.classes=Dm,Am.varsResolver=km;var jm={root:`m_f3f1af94`,inner:`m_89c4f5e4`,icon:`m_f3ed6b2b`,radio:`m_8a3dbb89`,"radio--light":`m_99d09bcd`,"radio--outline":`m_1bfe9d39`},Mm={labelPosition:`right`,withErrorStyles:!0},Nm=U((e,{size:t,radius:n,color:r,iconColor:i,variant:a,autoContrast:o})=>{let s=nn({color:r||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:rn(r,e);return{root:{"--radio-size":F(t,`radio-size`),"--radio-radius":n===void 0?void 0:L(n),"--radio-color":u,"--radio-bg":l?.background,"--radio-icon-color":i?rn(i,e):l?l.color:mn(o,e)?dn({color:r,theme:e,autoContrast:o}):void 0,"--radio-icon-size":F(t,`radio-icon-size`)}}}),Pm=q(e=>{let t=G(`Radio`,Mm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,id:c,size:l,label:u,labelPosition:d,description:f,error:p,radius:m,color:h,variant:g,disabled:_,wrapperProps:v,icon:y=Vp,rootRef:b,iconColor:x,onChange:S,mod:w,attributes:T,withErrorStyles:E,checked:D,readOnly:O,onClick:k,...A}=t,j=K({name:`Radio`,classes:jm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T,vars:s,varsResolver:Nm}),M=(0,C.use)(bm),N=M?.size??l,ee=t.size?l:N,{styleProps:P,rest:F}=wr(A),I=Re(c),L=[f?`${I}-description`:void 0,p&&typeof p!=`boolean`?`${I}-error`:void 0,F[`aria-describedby`]].filter(Boolean).join(` `)||void 0,R=M?M.value===F.value:void 0,te={checked:R??D,name:F.name??M?.name,onChange:e=>{O||(M?.onChange(e),S?.(e))},disabled:M?.disabled??_};return(0,W.jsx)(Tf,{...j(`root`),__staticSelector:`Radio`,__stylesApiProps:t,id:I,size:ee,labelPosition:d,label:u,description:f,error:p,disabled:te.disabled,classNames:n,styles:a,unstyled:o,"data-checked":(R??D)||void 0,variant:g,ref:b,mod:w,attributes:T,...P,...v,children:(0,W.jsxs)(J,{...j(`inner`),mod:{"label-position":d},children:[(0,W.jsx)(J,{...j(`radio`,{focusable:!0,variant:g}),...F,...te,component:`input`,mod:{error:!!p,"with-error-styles":E},id:I,type:`radio`,readOnly:O,"aria-describedby":L,onClick:e=>{O&&te.checked===void 0&&e.preventDefault(),k?.(e)}}),(0,W.jsx)(y,{...j(`icon`),"aria-hidden":!0})]})})});Pm.classes=jm,Pm.varsResolver=Nm,Pm.displayName=`@mantine/core/Radio`,Pm.Group=xm,Pm.Card=Em,Pm.Indicator=Am;function Fm({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,C.useState)(n),a=(0,C.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=dc({placement:t,middleware:[ys({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,C.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,C.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=la(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var Im={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},Lm={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:N(`popover`)},Rm=U((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:L(t),"--tooltip-bg":n?rn(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),zm=q(e=>{let t=G(`TooltipFloating`,Lm,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:w,...T}=t,E=Bn(),D=K({name:`TooltipFloating`,props:t,classes:Im,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:Rm}),{handleMouseMove:O,x:k,y:A,opened:j,boundaryRef:M,floating:N,setOpened:ee}=Fm({offset:p,position:m,defaultOpened:v}),P=Lt(n);if(!P)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let F=Je(M,Ft(P),w),I=P.props,L=e=>{I.onMouseEnter?.(e),O(e),ee(!0)},R=e=>{I.onMouseLeave?.(e),ee(!1)};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Zc,{...x,withinPortal:i,children:(0,W.jsx)(J,{...T,...D(`tooltip`,{style:{...Jr(a,E),zIndex:g,display:!_&&j?`block`:`none`,top:Number.isFinite(A)?Math.round(A):``,left:Number.isFinite(k)?Math.round(k):``}}),variant:y,ref:N,mod:{multiline:h},children:f})}),(0,C.cloneElement)(P,{...I,[r]:F,onMouseEnter:L,onMouseLeave:R})]})});zm.classes=Im,zm.varsResolver=Rm,zm.displayName=`@mantine/core/TooltipFloating`;var Bm=(0,C.createContext)({withinGroup:!1}),Vm={openDelay:0,closeDelay:0};function Hm(e){let{openDelay:t,closeDelay:n,children:r}=G(`TooltipGroup`,Vm,e);return(0,W.jsx)(Bm,{value:{withinGroup:!0},children:(0,W.jsx)(nc,{delay:{open:t,close:n},children:r})})}Hm.displayName=`@mantine/core/TooltipGroup`,Hm.extend=e=>e;function Um(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Wm(e){let t=Um(e.middlewares),n=[vs(e.offset),Cs()];return t.shift&&n.push(ys(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?xs():xs(t.flip)),n.push(Ts({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?ws():ws(t.inline)):e.inline&&n.push(ws()),n}function Gm(e){let[t,n]=(0,C.useState)(e.defaultOpened),r=typeof e.opened==`boolean`,i=!e.disabled&&(r?e.opened:t);(0,C.useEffect)(()=>{e.disabled&&n(!1)},[e.disabled]);let a=(0,C.use)(Bm).withinGroup,o=Re(),s=wn(),c=(0,C.useCallback)(e=>{n(e),e&&y(o)},[o]),{x:l,y:u,context:d,refs:f,placement:p,middlewareData:{arrow:{x:m,y:h}={},hide:g}}=dc({strategy:e.strategy,placement:e.position,open:i,onOpenChange:c,middleware:Wm(e),whileElementsMounted:ts}),{delay:_,currentId:v,setCurrentId:y}=rc(d,{id:o}),{getReferenceProps:b,getFloatingProps:x}=hc([Qs(d,{enabled:!e.disabled&&e.events?.hover,delay:a?_:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?xc():null}),pc(d,{enabled:!e.disabled&&e.events?.focus,visibleOnly:!0}),_c(d,{role:`tooltip`}),lc(d,{enabled:e.opened===void 0})]),S=(0,C.useRef)(p);ue(()=>{S.current!==p&&(S.current=p,e.onPositionChange?.(p))},[p]);let w=i&&v&&v!==o;return{x:l,y:u,arrowX:m,arrowY:h,reference:f.setReference,floating:f.setFloating,getFloatingProps:x,getReferenceProps:b,isGroupPhase:w,opened:i,placement:p,referenceHidden:e.hideDetached&&s!==`test`?g?.referenceHidden:!1}}var Km={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:N(`popover`),middlewares:{flip:!0,shift:!0,inline:!1},hideDetached:!0},qm=U((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:L(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),Jm=q(e=>{let t=G(`Tooltip`,Km,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,offset:T,transitionProps:E,multiline:D,events:O,interactive:k,zIndex:A,disabled:j,onClick:M,onMouseEnter:N,onMouseLeave:ee,inline:P,variant:F,keepMounted:I,vars:L,portalProps:R,mod:te,floatingStrategy:ne,middlewares:re,autoContrast:ie,attributes:ae,target:oe,hideDetached:se,ref:ce,...le}=t,{dir:z}=si(),B=(0,C.useRef)(null),V=Gm({position:Vc(z,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,disabled:j,events:O,interactive:k,arrowRef:B,arrowOffset:x,offset:typeof T==`number`?T+(y?b/2:0):T,inline:P,strategy:ne,middlewares:re,hideDetached:se});(0,C.useEffect)(()=>{let e=oe instanceof HTMLElement?oe:typeof oe==`string`?document.querySelector(oe):oe?.current||null;e&&V.reference(e)},[oe,V]);let ue=K({name:`Tooltip`,props:t,classes:Im,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:ae,rootSelector:`tooltip`,vars:L,varsResolver:qm}),de=Lt(n);if(!oe&&!de)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let fe=ue(`tooltip`),pe=k&&!j&&!!V.opened,H=w===`merge`&&y?zc({position:V.placement,dir:z}):void 0;if(oe){let e=al(E,{duration:100,transition:`fade`});return(0,W.jsx)(W.Fragment,{children:(0,W.jsx)(Zc,{...R,withinPortal:d,children:(0,W.jsx)(rl,{...e,keepMounted:I,mounted:!j&&!!V.opened,duration:V.isGroupPhase?10:e.duration,children:e=>(0,W.jsxs)(J,{...le,"data-fixed":ne===`fixed`||void 0,variant:F,mod:[{multiline:D,interactive:pe},te],...fe,...V.getFloatingProps({ref:V.floating,className:fe.className,style:{...fe.style,...e,...H,zIndex:A,top:V.y??0,left:V.x??0,...V.referenceHidden?{display:`none`}:null}}),children:[a,(0,W.jsx)(Bc,{ref:B,arrowX:V.arrowX,arrowY:V.arrowY,visible:y,position:V.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,...ue(`arrow`)})]})})})})}let me=de.props,he=Je(V.reference,Ft(de),ce),ge=al(E,{duration:100,transition:`fade`});return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Zc,{...R,withinPortal:d,children:(0,W.jsx)(rl,{...ge,keepMounted:I,mounted:!j&&!!V.opened,duration:V.isGroupPhase?10:ge.duration,children:e=>(0,W.jsxs)(J,{...le,"data-fixed":ne===`fixed`||void 0,variant:F,mod:[{multiline:D,interactive:pe},te],...V.getFloatingProps({ref:V.floating,className:ue(`tooltip`).className,style:{...ue(`tooltip`).style,...e,...H,zIndex:A,top:V.y??0,left:V.x??0,...V.referenceHidden?{display:`none`}:null}}),children:[a,(0,W.jsx)(Bc,{ref:B,arrowX:V.arrowX,arrowY:V.arrowY,visible:y,position:V.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,...ue(`arrow`)})]})})}),(0,C.cloneElement)(de,V.getReferenceProps({onClick:M,onMouseEnter:N,onMouseLeave:ee,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...me,className:zt(v,me.className),[i]:he}))]})});Jm.classes=Im,Jm.varsResolver=qm,Jm.displayName=`@mantine/core/Tooltip`,Jm.Floating=zm,Jm.Group=Hm;var Ym={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},Xm={withItemsBorders:!0},Zm=U((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:L(t),"--sc-color":n?rn(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":F(i,`sc-padding`),"--sc-font-size":R(i)}})),Qm=Qr(e=>{let t=G(`SegmentedControl`,Xm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,value:l,defaultValue:u,onChange:d,size:f,name:p,disabled:m,readOnly:h,fullWidth:g,orientation:_,radius:v,color:y,transitionDuration:b,transitionTimingFunction:x,variant:S,autoContrast:w,withItemsBorders:T,mod:E,attributes:D,ref:O,...k}=t,A=K({name:`SegmentedControl`,props:t,classes:Ym,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:Zm}),j=Bn(),M=c.map(e=>It(e)?{label:`${e}`,value:e}:e),N=ft(),[ee,P]=(0,C.useState)(0),[F,I]=(0,C.useState)(null),[L,R]=(0,C.useState)({}),te=(e,t)=>{e!==null&&L[t]!==e&&(L[t]=e,R({...L}))},[ne,re]=Ye({value:l,defaultValue:u,finalValue:Array.isArray(c)?M.find(e=>!e.disabled)?.value??c[0]?.value??null:null,onChange:d}),ie=Re(p),ae=M.map(e=>`${e.value}`),oe=M.map(e=>(0,C.createElement)(J,{...A(`control`),mod:{active:ne===e.value,orientation:_},key:`${e.value}`},(0,C.createElement)(`input`,{...A(`input`),disabled:m||e.disabled,type:`radio`,name:ie,value:`${e.value}`,id:`${ie}-${e.value}`,checked:ne===e.value,onChange:()=>!h&&re(e.value),"data-focus-ring":j.focusRing,key:`${e.value}-input`}),(0,C.createElement)(J,{component:`label`,...A(`label`),mod:{active:ne===e.value&&!(m||e.disabled),disabled:m||e.disabled,"read-only":h},htmlFor:`${ie}-${e.value}`,ref:t=>te(t,`${e.value}`),__vars:{"--sc-label-color":y===void 0?void 0:dn({color:y,theme:j,autoContrast:w})},key:`${e.value}-label`},(0,W.jsx)(`span`,{...A(`innerLabel`),children:e.label})))),se=Je(O,I);return nt(()=>{P(e=>e+1)},[c.length]),nt(()=>{R(e=>{let t={};return ae.forEach(n=>{n in e&&(t[n]=e[n])}),Object.keys(t).length===Object.keys(e).length?e:t})},[ae]),c.length===0?null:(0,W.jsxs)(J,{...A(`root`),variant:S,size:f,ref:se,mod:[{"full-width":g,orientation:_,initialized:N,"with-items-borders":T},E],...k,role:`radiogroup`,"data-disabled":m,children:[ne!==void 0&&(0,W.jsx)(Yd,{target:L[`${ne}`],parent:F,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...A(`indicator`)},ee),oe]})});Qm.classes=Ym,Qm.varsResolver=Zm,Qm.displayName=`@mantine/core/SegmentedControl`;var $m={root:`m_6d731127`},eh={gap:`md`,align:`stretch`,justify:`flex-start`},th=U((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":I(t),"--stack-align":n,"--stack-justify":r}})),nh=q(e=>{let t=G(`Stack`,eh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t,m=K({name:`Stack`,props:t,classes:$m,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:th});return(0,W.jsx)(J,{...m(`root`),variant:d,...p})});nh.classes=$m,nh.varsResolver=th,nh.displayName=`@mantine/core/Stack`;var[rh,ih]=T(`Table component was not found in the tree`),ah={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function oh(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function sh(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=q(r=>{let i=G(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=ih();return(0,W.jsx)(J,{component:e,...oh(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=ah,r}var ch=sh(`th`,{columnBorder:!0}),lh=sh(`td`,{columnBorder:!0}),uh=sh(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),dh=sh(`thead`,{stickyHeader:!0}),fh=sh(`tbody`),ph=sh(`tfoot`),mh=sh(`caption`,{captionSide:!0}),hh={type:`scrollarea`},gh=U((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":_(t),"--table-max-height":_(n),"--table-overflow":r===`native`?`auto`:void 0}})),_h=q(e=>{let t=G(`TableScrollContainer`,hh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=K({name:`TableScrollContainer`,classes:ah,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:gh,rootSelector:`scrollContainer`});return(0,W.jsx)(J,{component:d===`scrollarea`?wc:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,W.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});_h.classes=ah,_h.varsResolver=gh,_h.displayName=`@mantine/core/TableScrollContainer`;function vh({data:e}){return(0,W.jsxs)(W.Fragment,{children:[e.caption&&(0,W.jsx)(mh,{children:e.caption}),e.head&&(0,W.jsx)(dh,{children:(0,W.jsx)(uh,{children:e.head.map((e,t)=>(0,W.jsx)(ch,{children:e},t))})}),e.body&&(0,W.jsx)(fh,{children:e.body.map((e,t)=>(0,W.jsx)(uh,{children:e.map((e,t)=>(0,W.jsx)(lh,{children:e},t))},t))}),e.foot&&(0,W.jsx)(ph,{children:(0,W.jsx)(uh,{children:e.foot.map((e,t)=>(0,W.jsx)(ch,{children:e},t))})})]})}vh.displayName=`@mantine/core/TableDataRenderer`;var yh={withRowBorders:!0,verticalSpacing:7},bh=U((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":I(r),"--table-vertical-spacing":I(i),"--table-border-color":a?rn(a,e):void 0,"--table-striped-color":c&&o?rn(o,e):void 0,"--table-highlight-on-hover-color":l&&s?rn(s,e):void 0,"--table-sticky-header-offset":d?_(u):void 0}})),xh=q(e=>{let t=G(`Table`,yh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:w,mod:T,tabularNums:E,attributes:D,...O}=t,k=K({name:`Table`,props:t,className:r,style:i,classes:ah,classNames:n,styles:a,unstyled:o,attributes:D,rootSelector:`table`,vars:s,varsResolver:bh,stable:!0}),A=p===!0?`odd`:p||void 0,j=u||`bottom`,M=(0,C.useMemo)(()=>({getStyles:k,stickyHeader:S,striped:A,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:j}),[k,S,A,m,h,g,j]);return(0,W.jsx)(rh,{value:M,children:(0,W.jsx)(J,{component:`table`,mod:[{withTableBorder:_,tabularNums:E},T],...k(`table`),...O,children:x||!!b&&(0,W.jsx)(vh,{data:b})})})});xh.classes=ah,xh.varsResolver=bh,xh.displayName=`@mantine/core/Table`,xh.Td=lh,xh.Th=ch,xh.Tr=uh,xh.Thead=dh,xh.Tbody=fh,xh.Tfoot=ph,xh.Caption=mh,xh.ScrollContainer=_h,xh.DataRenderer=vh;var[Sh,Ch]=T(`Tabs component was not found in the tree`),wh={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},Th=q(e=>{let t=G(`TabsList`,null,e),{children:n,className:r,grow:i,justify:a,classNames:o,styles:s,style:c,mod:l,...u}=t,d=Ch();return(0,W.jsx)(J,{...d.getStyles(`list`,{className:r,style:c,classNames:o,styles:s,props:t,variant:d.variant}),role:`tablist`,variant:d.variant,mod:[{grow:i,orientation:d.orientation,placement:d.orientation===`vertical`&&d.placement,inverted:d.inverted},l],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...u,children:n})});Th.classes=wh,Th.displayName=`@mantine/core/TabsList`;var Eh=q(e=>{let t=G(`TabsPanel`,null,e),{children:n,className:r,value:i,classNames:a,styles:o,style:s,mod:c,keepMounted:l,...u}=t,d=wn(),f=Ch();(0,C.useEffect)(()=>(f.setMountedPanel(i,!0),()=>{f.setMountedPanel(i,!1)}),[i]);let p=f.value===i,m=f.keepMounted||l,h=f.keepMountedMode!==`display-none`,g=m&&h&&d!==`test`?(0,W.jsx)(C.Activity,{mode:p?`visible`:`hidden`,children:n}):m||p?n:null;return(0,W.jsx)(J,{...f.getStyles(`panel`,{className:r,classNames:a,styles:o,style:[s,p?void 0:{display:`none`}],props:t}),mod:[{orientation:f.orientation},c],role:`tabpanel`,id:f.getPanelId(i),"aria-labelledby":f.getTabId(i),...u,children:g})});Eh.classes=wh,Eh.displayName=`@mantine/core/TabsPanel`;var Dh=q(e=>{let t=G(`TabsTab`,null,e),{className:n,children:r,rightSection:i,leftSection:a,value:o,onClick:s,onKeyDown:c,disabled:l,color:u,style:d,classNames:f,styles:p,vars:m,mod:h,tabIndex:g,..._}=t,v=Bn(),{dir:y}=si(),b=Ch(),x=o===b.value,S=e=>{b.onChange(b.allowTabDeactivation&&o===b.value?null:o),s?.(e)},C={classNames:f,styles:p,props:t};return(0,W.jsxs)(Oc,{...b.getStyles(`tab`,{className:n,style:d,variant:b.variant,...C}),disabled:l,unstyled:b.unstyled,variant:b.variant,mod:[{active:x,disabled:l,orientation:b.orientation,inverted:b.inverted,placement:b.orientation===`vertical`&&b.placement},h],role:`tab`,id:b.getTabId(o),"aria-selected":x,tabIndex:g===void 0?x||b.value===null?0:-1:g,"aria-controls":b.mountedPanels.current.has(o)?b.getPanelId(o):void 0,onClick:S,__vars:{"--tabs-color":u?rn(u,v):void 0},onKeyDown:j({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:b.activateTabWithKeyboard,loop:b.loop,orientation:b.orientation||`horizontal`,dir:y,onKeyDown:c}),..._,children:[a&&(0,W.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`left`,children:a}),r&&(0,W.jsx)(`span`,{...b.getStyles(`tabLabel`,C),children:r}),i&&(0,W.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`right`,children:i})]})});Dh.classes=wh,Dh.displayName=`@mantine/core/TabsTab`;var Oh=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,kh={keepMounted:!0,keepMountedMode:`activity`,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},Ah=U((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":L(t),"--tabs-color":rn(n,e),"--tabs-text-color":mn(r,e)?dn({color:n,theme:e,autoContrast:r}):void 0}})),jh=q(e=>{let t=G(`Tabs`,kh,e),{defaultValue:n,value:r,onChange:i,orientation:a,children:o,loop:s,id:c,activateTabWithKeyboard:l,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,placement:h,keepMounted:g,keepMountedMode:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:w,autoContrast:T,mod:D,attributes:O,...k}=t,A=Re(c),j=(0,C.useRef)(new Set),M=Le(),N=(0,C.useCallback)((e,t)=>{let n=j.current;t&&!n.has(e)?(n.add(e),M()):!t&&n.has(e)&&(n.delete(e),M())},[]),[ee,P]=Ye({value:r,defaultValue:n,finalValue:null,onChange:i}),F=K({name:`Tabs`,props:t,classes:wh,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:O,vars:w,varsResolver:Ah});return(0,W.jsx)(Sh,{value:{placement:h,value:ee,orientation:a,id:A,loop:s,activateTabWithKeyboard:l,getTabId:E(`${A}-tab`,Oh),getPanelId:E(`${A}-panel`,Oh),onChange:P,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,keepMounted:g,keepMountedMode:_,unstyled:b,getStyles:F,mountedPanels:j,setMountedPanel:N},children:(0,W.jsx)(J,{id:A,variant:d,mod:[{orientation:a,inverted:a===`horizontal`&&m,placement:a===`vertical`&&h},D],...F(`root`),...k,children:o})})});jh.classes=wh,jh.varsResolver=Ah,jh.displayName=`@mantine/core/Tabs`,jh.Tab=Dh,jh.Panel=Eh,jh.List=Th;var Mh=q(e=>{let t=G([`Input`,`InputWrapper`,`TextInput`],null,e);return(0,W.jsx)(Wd,{component:`input`,...t,__staticSelector:`TextInput`})});Mh.classes=Wd.classes,Mh.displayName=`@mantine/core/TextInput`;var Nh=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],Ph=[`xs`,`sm`,`md`,`lg`,`xl`];function Fh(e,t){let n=t===void 0?`h${e}`:t;return Nh.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:Ph.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:_(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var Ih={root:`m_8a5d1357`},Lh={order:1},Rh=U((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=Fh(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),zh=q(e=>{let t=G(`Title`,Lh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=K({name:`Title`,props:t,classes:Ih,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:Rh});return[1,2,3,4,5,6].includes(s)?(0,W.jsx)(J,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,lineClamp:typeof d==`number`},p],size:l,...h}):null});zh.classes=Ih,zh.varsResolver=Rh,zh.displayName=`@mantine/core/Title`;function Bh(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function Vh(e){return(0,C.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}var Hh=0;function Uh(e,t,n){let r=[],i=[],a=new Map;for(let n of e){let e=n.position||t,r=a.get(e);r?r.push(n):a.set(e,[n])}for(let e of a.values())e.sort((e,t)=>(t.priority??0)-(e.priority??0)||(e.__sequence??0)-(t.__sequence??0)),e.forEach((e,t)=>{t<n?i.push(e):r.push(e)});return{notifications:i,queue:r}}var Wh=Bh({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5}),Gh=(e=Wh)=>Vh(e);function Kh(e,t){let n=e.getState(),r=t([...n.notifications,...n.queue]);for(let e of r)e.__sequence===void 0&&(e.__sequence=Hh,Hh+=1);let i=Uh(r,n.defaultPosition,n.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function qh(e,t=Wh){let n=e.id||ae();return Kh(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function Jh(e,t=Wh){return Kh(t,t=>t.filter(t=>t.id!==e||(t.onClose?.(t),!1))),e}function Yh(e,t=Wh){return Kh(t,t=>t.map(t=>t.id===e.id?{...t,...e}:t)),e.id}function Xh(e,t){return typeof e==`function`?e(t):e}function Zh(e,t){let n=t.getState();return[...n.notifications,...n.queue].some(t=>t.id===e.id)?Yh(e,t):qh(e,t)}var Qh=new WeakMap;function $h(e,t,n=Wh){let r=t.id||ae(),i=Qh.get(n)||new Map,a={};Qh.set(n,i),i.set(r,a),Zh({loading:!0,autoClose:!1,...t.loading,id:r},n);let o=e=>{i.get(r)===a&&(i.delete(r),Zh({...t.loading,loading:!1,autoClose:void 0,...e,id:r},n))};return e.then(e=>o({color:`teal`,...Xh(t.success,e)}),e=>o({color:`red`,...Xh(t.error,e)})),e}function eg(e=Wh){Kh(e,()=>[])}function tg(e=Wh){let{defaultPosition:t,limit:n}=e.getState();Kh(e,e=>Uh(e,t,n).notifications)}var ng={show:qh,hide:Jh,update:Yh,promise:$h,clean:eg,cleanQueue:tg,updateState:Kh},rg=[`bottom-center`,`bottom-left`,`bottom-right`,`top-center`,`top-left`,`top-right`];function ig(e,t){return e.reduce((e,n)=>(e[n.position||t].push(n),e),rg.reduce((e,t)=>(e[t]=[],e),{}))}var ag={left:`translateX(-100%)`,right:`translateX(100%)`,"top-center":`translateY(-100%)`,"bottom-center":`translateY(100%)`},og={left:`translateX(0)`,right:`translateX(0)`,"top-center":`translateY(0)`,"bottom-center":`translateY(0)`};function sg({state:e,maxHeight:t,position:n,transitionDuration:r}){let[i,a]=n.split(`-`),o=a===`center`?`${i}-center`:a,s={opacity:0,maxHeight:t,transform:ag[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:`cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear`,transitionProperty:`opacity, transform, max-height`},c={opacity:1,transform:og[o]},l={opacity:0,maxHeight:0,transform:ag[o]},u={entering:c,entered:c,exiting:l,exited:l};return{...s,...u[e]}}function cg(e,t){return typeof t==`number`?t:t===!1||e===!1?!1:e}var lg=120,ug=4,dg=new Set([`classNames`,`styles`,`unstyled`,`vars`,`attributes`,`variant`,`color`,`radius`,`icon`,`title`,`loading`,`withBorder`,`withCloseButton`,`closeButtonProps`,`className`,`style`,`role`,`ref`,`children`,`mod`]);function fg(e){let{rest:t}=wr(e);return Object.fromEntries(Object.entries(t).filter(([e,t])=>!dg.has(e)&&t!==void 0))}function pg({data:e,onHide:t,autoClose:n,transitionDuration:r,allowDragDismiss:i,allowScrollDismiss:a,paused:o,withAutoCloseProgress:s,progressProps:c,onHoverStart:l,onHoverEnd:u,onExpandRequest:d,ref:f,style:p,renderNotification:m,layout:h,stackIndex:g,stackSize:_,stackPosition:v,stackExpanded:y,stackExpandedOffset:b,transitionState:x,...S}){let[w,T]=(0,C.useState)(0),[E,D]=(0,C.useState)(!1),[O,k]=(0,C.useState)(1),[A,j]=(0,C.useState)(!1),M=Bn(),{autoClose:N,message:ee,allowClose:P,position:F,style:I,withCloseButton:L,renderNotification:R,onOpen:te,priority:ne,withAutoCloseProgress:re,__sequence:ie,...ae}=e,oe=cg(n,e.autoClose),[se,ce]=(0,C.useState)({running:!1,cycle:0}),le=(e.withAutoCloseProgress??s)&&typeof oe==`number`,z=(0,C.useRef)(-1),B=(0,C.useRef)(-1),V=(0,C.useRef)(-1),ue=(0,C.useRef)(null),de=(0,C.useRef)(!1),pe=(0,C.useRef)(!1),H=(0,C.useRef)(!1),me=(0,C.useRef)(0),he=P===!1,ge=()=>{let e=de.current||pe.current;e&&!H.current?(H.current=!0,l?.()):!e&&H.current&&(H.current=!1,u?.())},_e=(0,C.useEffectEvent)(()=>{H.current&&(H.current=!1,u?.())});(0,C.useEffect)(()=>()=>_e(),[]);let ve=()=>{window.clearTimeout(z.current),ce(e=>e.running?{...e,running:!1}:e)},ye=()=>window.clearTimeout(B.current),be=()=>window.clearTimeout(V.current),xe=e=>{me.current=e,T(e)},Se=()=>{t(e.id),ve(),ye(),be()},Ce=(0,C.useRef)(o);(0,C.useEffect)(()=>{Ce.current=o});let we=()=>{E||je||de.current||pe.current||Ce.current||typeof oe!=`number`||(ve(),z.current=window.setTimeout(Se,oe),ce(e=>({running:!0,cycle:e.cycle+1})))},Te=e=>e*((ue.current?.offsetWidth??440)+40),Ee=(e,t)=>{let n=ue.current?.offsetWidth??440;return Math.abs(e)>n*.35||t>.5},De=()=>{be(),j(!1),xe(0)},Oe=e=>{k(e),D(!0),j(!1),xe(Te(e)),ve(),ye(),be(),B.current=window.setTimeout(Se,r)},ke=()=>{be(),V.current=window.setTimeout(()=>{j(!1),xe(0),we()},lg)},{ref:Ae,active:je}=Nt(e=>{if(!E){if(e.first&&ve(),e.last){if(e.tap||e.canceled){xe(0),we();return}let t=e.movement[0],n=t===0?e.direction[0]===-1?-1:1:t>0?1:-1;Ee(t,e.velocity[0])?Oe(n):(xe(0),we())}else xe(e.movement[0])}},{axis:`x`,threshold:5,filterTaps:!0,enabled:i&&!he&&!E}),Me=Je(f,ue,Ae),Ne=Jr(p,M),Pe=Jr(I,M),Fe={...Ne,...Pe},Ie=typeof Fe.opacity==`number`?Fe.opacity:1,Le=E?0:1-Math.min(Math.abs(w)/200,1)*.6,Re=Fe.transitionDuration??`${r}ms, ${r}ms, ${r}ms`,ze=h===`stacked`,Be=ze&&g!==void 0&&g>0,Ve=Be&&!y,He=x===`exiting`||x===`exited`,Ue=v?.startsWith(`top`)?1:-1,We=Math.min(g??0,ug),Ge=Ve?We*10*Ue:0,Ke=ze?(g||0)*30:0,qe=je||A,Ye=()=>ze?He?`translateY(${y?b||0:Ge}px) var(--notifications-state-transform) translate3d(var(--notifications-swipe-offset), 0, 0)`:y?`translateY(${b||0}px) translate3d(var(--notifications-swipe-offset), 0, 0)`:Be?`scale(${1-We*.03}) translateY(${Ge}px)`:`var(--notifications-state-transform) translate3d(var(--notifications-swipe-offset), 0, 0)`:`var(--notifications-state-transform) translate3d(var(--notifications-swipe-offset), 0, 0)`,Xe={...Fe,...ze?{maxHeight:void 0}:{},"--notifications-state-transform":typeof Fe.transform==`string`?Fe.transform:`translateX(0)`,"--notifications-state-opacity":String(Ie),"--notifications-swipe-offset":`${w}px`,"--notifications-swipe-opacity":String(Le),transform:Ye(),opacity:`calc(var(--notifications-state-opacity) * var(--notifications-swipe-opacity))`,transitionDuration:qe?`0ms, 0ms, 0ms`:Re,cursor:`default`,touchAction:`pan-y`,...ze?{gridArea:`1 / 1`,zIndex:(_||5)-(g??0),pointerEvents:Ve?`none`:void 0,alignSelf:Ue===1?`start`:`end`,transitionProperty:qe?`none`:`transform, opacity`,transitionDuration:`${r}ms, ${r}ms`,transitionTimingFunction:`cubic-bezier(.51,.3,0,1.21), ease`,transitionDelay:qe||He?`0ms`:`${Ke}ms`}:{}},Ze=()=>{de.current=!0,ve(),ge()},Qe=()=>{de.current=!1,A||(De(),we()),ge()},$e=ze?()=>{pe.current=!0,ve(),ge()}:void 0,et=ze?()=>{pe.current=!1,A||we(),ge()}:void 0,tt=e=>{ze&&(e.pointerType===`touch`||e.pointerType===`pen`)&&d?.()},nt=(0,C.useEffectEvent)(e=>{if(E||je)return;let t=e.currentTarget===document;if(!t&&!de.current)return;let{deltaX:n,deltaY:r}=e;if(Math.abs(n)<=Math.abs(r)||n===0||!a||he)return;t||(e.preventDefault(),e.stopPropagation()),ve(),j(!0);let i=me.current-n,o=i>0?1:-1;Ee(i,0)?Oe(o):(xe(i),ke())});(0,C.useEffect)(()=>{if(A)return document.addEventListener(`wheel`,nt,{passive:!1}),()=>document.removeEventListener(`wheel`,nt,{passive:!1})},[A]),(0,C.useEffect)(()=>{let e=()=>{E&&xe(Te(O))};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[O,E]),(0,C.useEffect)(()=>{let e=ue.current;if(e)return e.addEventListener(`wheel`,nt,{passive:!1}),()=>e.removeEventListener(`wheel`,nt,{passive:!1})},[]),(0,C.useEffect)(()=>()=>{ye(),be()},[]),(0,C.useEffect)(()=>{e.onOpen?.(e)},[]);let rt=(0,C.useRef)(x);(0,C.useEffect)(()=>{let t=rt.current===`exiting`;rt.current=x,x===`entering`&&t&&(ye(),E?(D(!1),j(!1),xe(0)):we(),e.onOpen?.(e))},[x]),(0,C.useEffect)(()=>(we(),ve),[oe,je,E]),fe(()=>{le&&we()},[le]),(0,C.useEffect)(()=>(o?ve():we(),ve),[o]);let it={...S,...ae},at={style:Xe,inert:Ve,onMouseEnter:e=>{it.onMouseEnter?.(e),Ze()},onMouseLeave:e=>{it.onMouseLeave?.(e),Qe()},onFocusCapture:e=>{it.onFocusCapture?.(e),$e?.()},onBlurCapture:e=>{it.onBlurCapture?.(e),et?.()},onPointerDownCapture:e=>{it.onPointerDownCapture?.(e),tt(e)}};if(m){let t=[S.className,ae.className].filter(Boolean).join(` `);return(0,W.jsx)(`div`,{ref:Me,role:ae.role||S.role||`alert`,...fg(it),className:t||void 0,...at,children:m(e)})}return(0,W.jsxs)(um,{ref:Me,...S,...ae,...at,withCloseButton:!he&&L,onClose:Se,children:[ee,le&&(0,W.jsx)(`div`,{"aria-hidden":!0,...c,"data-paused":!se.running||void 0,style:{...c.style,"--notifications-progress-duration":`${oe}ms`}},se.cycle)]})}pg.displayName=`@mantine/notifications/NotificationContainer`;var mg={root:`m_b37d9ac7`,notification:`m_5ed0edd0`,progress:`m_836192`,"notifications-progress":`m_5f780017`,"notifications-progress-fade-in":`m_bb245a60`};function hg(){return hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hg.apply(null,arguments)}function gg(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _g(e,t){return _g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_g(e,t)}function vg(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_g(e,t)}var yg={disabled:!1},bg=C.createContext(null),xg=function(e){return e.scrollTop},Sg=`unmounted`,Cg=`exited`,wg=`entering`,Tg=`entered`,Eg=`exiting`,Dg=function(e){vg(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=Cg,r.appearStatus=wg):o=Tg:o=t.unmountOnExit||t.mountOnEnter?Sg:Cg,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:Cg}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=wg):(n===`entering`||n===`entered`)&&(t=Eg)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null){if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:xt.default.findDOMNode(this);n&&xg(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Sg})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[xt.default.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||yg.disabled?this.safeSetState({status:Tg},function(){t.props.onEntered(a)}):(this.props.onEnter(a,o),this.safeSetState({status:wg},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Tg},function(){t.props.onEntered(a,o)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:xt.default.findDOMNode(this);!t||yg.disabled?this.safeSetState({status:Cg},function(){e.props.onExited(r)}):(this.props.onExit(r),this.safeSetState({status:Eg},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Cg},function(){e.props.onExited(r)})})}))},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:xt.default.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r)setTimeout(this.nextCallback,0);else{if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)}},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=gg(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return C.createElement(bg.Provider,{value:null},typeof n==`function`?n(e,r):C.cloneElement(C.Children.only(n),r))},t}(C.Component);Dg.contextType=bg,Dg.propTypes={};function Og(){}Dg.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Og,onEntering:Og,onEntered:Og,onExit:Og,onExiting:Og,onExited:Og},Dg.UNMOUNTED=Sg,Dg.EXITED=Cg,Dg.ENTERING=wg,Dg.ENTERED=Tg,Dg.EXITING=Eg;function kg(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Ag(e,t){var n=function(e){return t&&(0,C.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&C.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function jg(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Mg(e,t,n){return n[t]==null?e.props[t]:n[t]}function Ng(e,t){return Ag(e.children,function(n){return(0,C.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:Mg(n,`appear`,e),enter:Mg(n,`enter`,e),exit:Mg(n,`exit`,e)})})}function Pg(e,t,n){var r=Ag(e.children),i=jg(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,C.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,C.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,C.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:Mg(o,`exit`,e),enter:Mg(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,C.cloneElement)(o,{in:!1}):c&&s&&(0,C.isValidElement)(l)&&(i[a]=(0,C.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:Mg(o,`exit`,e),enter:Mg(o,`enter`,e)}))}}),i}var Fg=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Ig={component:`div`,childFactory:function(e){return e}},Lg=function(e){vg(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(kg(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Ng(e,r):Pg(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=Ag(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=hg({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=gg(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Fg(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?C.createElement(bg.Provider,{value:i},a):C.createElement(bg.Provider,{value:i},C.createElement(t,r,a))},t}(C.Component);Lg.propTypes={},Lg.defaultProps=Ig;var Rg=Dg,zg=16,Bg=80,Vg={position:`bottom-right`,autoClose:4e3,transitionDuration:250,allowDragDismiss:!0,allowScrollDismiss:!0,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:N(`overlay`),store:Wh,withinPortal:!0,pauseResetOnHover:`all`,layout:`default`,withAutoCloseProgress:!1},Hg=U((e,{zIndex:t,containerWidth:n})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":_(n)}})),Ug=q(e=>{let t=G(`Notifications`,Vg,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,position:l,autoClose:u,transitionDuration:d,allowDragDismiss:f,allowScrollDismiss:p,containerWidth:m,notificationMaxHeight:h,limit:g,zIndex:_,store:v,portalProps:y,withinPortal:b,pauseResetOnHover:x,renderNotification:S,layout:w,withAutoCloseProgress:T,...E}=t,D=Bn(),O=Gh(v),k=Le(),A=Xe(),j=(0,C.useRef)({}),M=(0,C.useRef)(0),[N,ee]=(0,C.useState)({}),[P,F]=(0,C.useState)({}),[I,L]=(0,C.useState)({}),[R,te]=(0,C.useState)(null),ne=(0,C.useRef)({}),re=Object.values(N).reduce((e,t)=>e+(t??0),0)+Object.values(I).filter(Boolean).length,ie=(0,C.useCallback)(e=>ee(t=>({...t,[e]:(t[e]??0)+1})),[]),ae=(0,C.useCallback)(e=>ee(t=>({...t,[e]:Math.max(0,(t[e]??0)-1)})),[]),oe=(0,C.useCallback)(e=>w===`stacked`?{onMouseEnter:()=>L(t=>({...t,[e]:!0})),onMouseLeave:()=>L(t=>({...t,[e]:!1}))}:{},[w]),se=(0,C.useCallback)(e=>te(e),[]);(0,C.useEffect)(()=>{if(w!==`stacked`)return;let e=ne.current;return rg.forEach(t=>{(N[t]??0)>0||I[t]||R===t?(window.clearTimeout(e[t]),F(e=>e[t]?e:{...e,[t]:!0})):e[t]=window.setTimeout(()=>{F(e=>e[t]?{...e,[t]:!1}:e)},200)}),()=>rg.forEach(t=>window.clearTimeout(e[t]))},[N,I,R,w]),(0,C.useEffect)(()=>{if(!R)return;let e=e=>{let t=e.target;t!==null&&Object.values(j.current).some(e=>e?.contains(t))||te(null)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[R]);let ce=ig(O.notifications,l),le=R?ce[R].length:0;(0,C.useEffect)(()=>{(w!==`stacked`||R!==null&&le===0)&&te(null)},[le,R,w]),(0,C.useEffect)(()=>{w!==`stacked`&&L(e=>Object.values(e).some(Boolean)?{}:e)},[w]);let z=(0,C.useRef)(null),B=(0,C.useRef)({}),V=(0,C.useRef)(new WeakMap),ue=(0,C.useCallback)((e,t)=>{let n=t.offsetHeight;return B.current[e]!==n&&(B.current[e]=n,!0)},[]);(0,C.useEffect)(()=>{if(w!==`stacked`||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(e=>{let t=!1;e.forEach(e=>{let n=V.current.get(e.target);n&&ue(n,e.target)&&(t=!0)}),t&&k()});return z.current=e,Object.values(j.current).forEach(t=>t&&e.observe(t)),()=>{e.disconnect(),z.current=null}},[w,k,ue]);let de=(0,C.useRef)({}),pe=(0,C.useCallback)(e=>(de.current[e]||(de.current[e]=t=>{let n=j.current[e];n&&n!==t&&(z.current?.unobserve(n),V.current.delete(n)),t?(j.current[e]=t,V.current.set(t,e),ue(e,t),z.current?.observe(t)):(delete j.current[e],delete de.current[e],delete B.current[e])}),de.current[e]),[ue]),H=D.respectReducedMotion&&A?1:d,me=K({name:`Notifications`,classes:mg,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:Hg});(0,C.useEffect)(()=>{v?.updateState(e=>({...e,limit:g||5,defaultPosition:l}))},[g,l]),fe(()=>{O.notifications.length>M.current&&setTimeout(()=>k(),0),M.current=O.notifications.length},[O.notifications]);let he=rg.reduce((e,t)=>{let n=ce[t].length,r=Array(n).fill(0),i=w===`stacked`&&!!P[t],a=w===`stacked`?[...ce[t]].sort((e,t)=>(t.priority??0)-(e.priority??0)||(t.__sequence??0)-(e.__sequence??0)):ce[t];if(i&&n>0){let e=t.startsWith(`top`)?1:-1,i=0;for(let t=0;t<n;t+=1)r[t]=i*e,i+=(B.current[a[t].id]||Bg)+zg}return e[t]=a.map((e,a)=>{let{style:o,...s}=e;return(0,W.jsx)(Rg,{timeout:H,onEnter:()=>j.current[s.id].offsetHeight,nodeRef:{current:j.current[s.id]},children:e=>(0,W.jsx)(pg,{ref:pe(s.id),data:s,onHide:e=>Jh(e,v),autoClose:u,transitionDuration:H,allowDragDismiss:f,allowScrollDismiss:p,paused:x===`all`&&re>0||w===`stacked`&&!i&&a>0,onHoverStart:()=>ie(t),onHoverEnd:()=>ae(t),onExpandRequest:()=>se(t),renderNotification:`renderNotification`in s?s.renderNotification:S,layout:w,withAutoCloseProgress:T,progressProps:me(`progress`),stackIndex:a,stackSize:n,stackPosition:t,stackExpanded:i,stackExpandedOffset:r[a],transitionState:e,...me(`notification`,{style:{...sg({state:e,position:t,transitionDuration:H,maxHeight:h}),...o}})})},s.id)}),e},{});return(0,W.jsxs)(Zc,{withinPortal:b,...y,children:[(0,W.jsx)(J,{...me(`root`),"data-position":`top-center`,"data-layout":w,...E,children:(0,W.jsx)(Lg,{...oe(`top-center`),children:he[`top-center`]})}),(0,W.jsx)(J,{...me(`root`),"data-position":`top-left`,"data-layout":w,...E,children:(0,W.jsx)(Lg,{...oe(`top-left`),children:he[`top-left`]})}),(0,W.jsx)(J,{...me(`root`,{className:ad.classNames.fullWidth}),"data-position":`top-right`,"data-layout":w,...E,children:(0,W.jsx)(Lg,{...oe(`top-right`),children:he[`top-right`]})}),(0,W.jsx)(J,{...me(`root`,{className:ad.classNames.fullWidth}),"data-position":`bottom-right`,"data-layout":w,...E,children:(0,W.jsx)(Lg,{...oe(`bottom-right`),children:he[`bottom-right`]})}),(0,W.jsx)(J,{...me(`root`),"data-position":`bottom-left`,"data-layout":w,...E,children:(0,W.jsx)(Lg,{...oe(`bottom-left`),children:he[`bottom-left`]})}),(0,W.jsx)(J,{...me(`root`),"data-position":`bottom-center`,"data-layout":w,...E,children:(0,W.jsx)(Lg,{...oe(`bottom-center`),children:he[`bottom-center`]})})]})});Ug.classes=mg,Ug.varsResolver=Hg,Ug.displayName=`@mantine/notifications/Notifications`,Ug.show=ng.show,Ug.hide=ng.hide,Ug.update=ng.update,Ug.promise=ng.promise,Ug.clean=ng.clean,Ug.cleanQueue=ng.cleanQueue,Ug.updateState=ng.updateState;var Wg=C.createContext(void 0),Gg=e=>{let t=C.useContext(Wg);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Kg=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,W.jsx)(Wg.Provider,{value:e,children:t})),qg={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Jg=new class{#e=qg;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Yg(e){setTimeout(e,0)}var Xg=typeof window>`u`||`Deno`in globalThis;function Zg(){}function Qg(e,t){return typeof e==`function`?e(t):e}function $g(e){return typeof e==`number`&&e>=0&&e!==1/0}function e_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function t_(e,t){return typeof e==`function`?e(t):e}function n_(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==i_(o,t.options))return!1}else if(!o_(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function r_(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(a_(t.options.mutationKey)!==a_(a))return!1}else if(!o_(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function i_(e,t){return(t?.queryKeyHashFn||a_)(e)}function a_(e){return JSON.stringify(e,(e,t)=>d_(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function o_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!o_(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!o_(e[r],t[r]))return!1;return!0}return!1}var s_=Object.prototype.hasOwnProperty;function c_(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=u_(e)&&u_(t);if(!r&&!(d_(e)&&d_(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:s_.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=c_(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function l_(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function u_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function d_(e){if(!f_(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!f_(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function f_(e){return Object.prototype.toString.call(e)===`[object Object]`}function p_(e){return new Promise(t=>{Jg.setTimeout(t,e)})}function m_(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:c_(e,t)}function h_(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function g_(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var __=Symbol();function v_(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===__?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function y_(e,t){return typeof e==`function`?e(...t):!!e}function b_(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var x_=()=>Xg,S_=()=>x_(),C_=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},w_=new class extends C_{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},T_=Yg;function E_(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=T_,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var D_=E_(),O_=new class extends C_{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function k_(e){return Math.min(1e3*2**e,3e4)}function A_(e){return(e??`online`)!==`online`||O_.isOnline()}var j_=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function M_(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(Zg);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new j_(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>w_.isFocused()&&(e.networkMode===`always`||O_.isOnline())&&e.canRun(),p=()=>A_(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(S_()?0:3),a=e.retryDelay??k_,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),p_(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var N_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$g(this.gcTime)&&(this.#e=Jg.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(S_()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Jg.clearTimeout(this.#e),this.#e=void 0)}};function P_(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{b_(e,()=>t.signal,()=>n=!0)},u=v_(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?g_:h_;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?I_:F_,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:F_(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function F_(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function I_(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var L_=class extends N_{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=B_(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=B_(this.options);e.data!==void 0&&(this.setState(z_(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=m_(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Zg).catch(Zg):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>t_(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===__||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>t_(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!e_(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=v_(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?P_(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=M_({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof j_&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof j_){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...R_(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...z_(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),D_.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function R_(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:A_(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function z_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function B_(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var V_=class extends C_{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),U_(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return W_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return W_(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof t_(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!l_(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&G_(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||t_(this.options.enabled,this.#t)!==t_(t.enabled,this.#t)||t_(this.options.staleTime,this.#t)!==t_(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||t_(this.options.enabled,this.#t)!==t_(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return l_(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Zg)),t}#h(e){return!S_()&&t_(this.options.enabled,this.#t)!==!1&&$g(e)}#g(){this.#b();let e=t_(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=e_(this.#r.dataUpdatedAt,e)+1;this.#u=Jg.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return t_(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=Jg.setInterval(()=>{(this.options.refetchIntervalInBackground||w_.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(Jg.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(Jg.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&U_(e,t),o=i&&G_(e,n,t,r);(a||o)&&(l={...l,...R_(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=m_(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=m_(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:K_(e,t),refetch:this.refetch,isEnabled:t_(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),l_(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();D_.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function H_(e,t){return t_(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||t_(t.retryOnMount,e)!==!1)}function U_(e,t){return H_(e,t)||e.state.data!==void 0&&W_(e,t,t.refetchOnMount)}function W_(e,t,n){if(t_(t.enabled,e)!==!1&&t_(t.staleTime,e)!==`static`){let r=t_(n,e);return r===`always`||r!==!1&&K_(e,t)}return!1}function G_(e,t,n,r){return(e!==t||t_(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&K_(e,n)}function K_(e,t){return t_(t.enabled,e)!==!1&&e.isStaleByTime(t_(t.staleTime,e))}var q_=class extends N_{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||J_(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=M_({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),D_.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function J_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Y_=class extends C_{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new q_({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=X_(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=X_(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=X_(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=X_(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){D_.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>r_(t,e))}findAll(e={}){return this.getAll().filter(t=>r_(e,t))}notify(e){D_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return D_.batch(()=>Promise.all(e.map(e=>e.continue().catch(Zg))))}};function X_(e){return e.options.scope?.id}var Z_=class extends C_{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),l_(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&a_(t.mutationKey)!==a_(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??J_();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){D_.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Q_=class extends C_{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??i_(r,t),a=this.get(i);return a||(a=new L_({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){D_.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>n_(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>n_(e,t)):t}notify(e){D_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){D_.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){D_.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},$_=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Q_,this.#t=e.mutationCache||new Y_,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=w_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=O_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(t_(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Qg(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return D_.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;D_.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return D_.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=D_.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Zg).catch(Zg)}invalidateQueries(e,t={}){return D_.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=D_.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Zg)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Zg)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(t_(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(t_(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zg).catch(Zg)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zg).catch(Zg)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return O_.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(a_(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{o_(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(a_(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{o_(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=i_(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===__&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ev=C.createContext(!1),tv=()=>C.useContext(ev);ev.Provider;function nv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var rv=C.createContext(nv()),iv=()=>C.useContext(rv),av=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?y_(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},ov=e=>{C.useEffect(()=>{e.clearReset()},[e])},sv=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||y_(n,[e.error,r])),cv=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},lv=(e,t)=>e?.suspense&&t.isPending,uv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function dv(e,t,n){let r=tv(),i=iv(),a=Gg(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,cv(o),av(o,i,s),ov(i);let[l]=C.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(C.useSyncExternalStore(C.useCallback(e=>{let t=d?l.subscribe(D_.batchCalls(e)):Zg;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),C.useEffect(()=>{l.setOptions(o)},[o,l]),lv(o,u))throw uv(o,l,i);if(sv({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function fv(e,t){return dv(e,V_,t)}function pv(e){return e}function mv(e){return e}function hv(e,t){let n=Gg(t),[r]=C.useState(()=>new Z_(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);let i=C.useSyncExternalStore(C.useCallback(e=>r.subscribe(D_.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=C.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(Zg)},[r]);if(i.error&&y_(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var gv=C.useLayoutEffect;function _v(e){return e[e.length-1]}function vv(e,t){return typeof e==`function`?e(t):e}var yv=Object.prototype.hasOwnProperty;function bv(e){for(let t in e)if(yv.call(e,t))return!0;return!1}var xv=()=>Object.create(null),Sv=(e,t)=>Cv(e,t,!0);function Cv(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(wv(e)&&wv(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&_v(a)!==`${o-1}`||c&&_v(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;l<c&&(f=l,d=e[f],u=t[f],u=d===u?d:typeof d==`object`?Cv(d,u,n,r):u,u===d);l++);if(l===c&&o===c)return e}else{let i=o===c,p=!0;for(;l<c;l++){f=s[l],d=e[f];let o=t[f];u=d===o?d:typeof d==`object`?Cv(d,o,n,r):o,i&&=u===d&&(a[l]===f||yv.call(e,f)),p&&=Object.is(u,o),a[l]=u}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}let p=i?s.fill(0):n?xv():{};for(let o=0;o<c;o++)f=i?o:s[o],i?(d=e[f],o>l&&(u=t[f],u=d===u?d:typeof d==`object`?Cv(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function wv(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function Tv(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!Tv(a,o,n,r))return!1}return!0}if(wv(e)&&wv(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!Tv(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!Tv(e[a],t[a],n,r)))return!1;return i===0}return!1}var Ev=/[\x00-\x1f\x7f"<>`{}]/g;function Dv(e){return e.replace(Ev,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Ov(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return Dv(t)}var kv=[`http:`,`https:`,`mailto:`,`tel:`];function Av(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var jv=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Mv(e,t){if(!e)return!1;if(jv.test(e))return!0;let n=Av(e);return n?!t.has(n):!1}function Nv(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=Ov(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=Ov(r?e.slice(r):e)}return t}function Pv(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Fv(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Iv(){throw Error(`Invariant failed`)}function Lv(e){return e.replace(/\/{2,}/g,`/`)}function Rv(e){return e===`/`?e:e.replace(/^\/+/,``)}function zv(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function Bv(e){return zv(Rv(e))}function Vv(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Hv(e,t,n=`never`,r){if(t.includes(`//`)&&(t=Lv(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=Lv(e)),o=e.split(`/`);o.length>1&&_v(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(_v(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?Lv(s):s)||`/`;return a&&r&&r.set(a,c),c}function Uv(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function Wv(e){return e==null||e===``}function Gv(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function Kv(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&Wv(f)){if(c===`/`&&!d)continue;f=``}o+=c+Gv(s,f,r)+(d||``)}}return o+a||`/`}function qv(e){return e?.isNotFound===!0}function Jv(){try{return sessionStorage}catch{return}}var Yv=`tsr-scroll-restoration-v1_3`,Xv=Jv();function Zv(){try{return JSON.parse(Xv?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var Qv=Zv(),$v=`data-scroll-restoration-id`,ey=e=>e.state.__TSR_key||e.href;function ty(e){let t=e.getAttribute($v);if(t)return`[${$v}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var ny=!1,ry=`window`;function iy(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function ay(e){let t=new Set;for(let n of e){if(n===ry)continue;let e=iy(n);e&&t.add(e)}return t}function oy(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||ey,a=new Set,o=e=>{let t=Qv[e]||={};for(let e of a)e===document?t[ry]={scrollX,scrollY}:e.isConnected&&(t[ty(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,ny=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{ny||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{Xv?.setItem(Yv,JSON.stringify(Qv))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=Qv[d];if(e){let t=Qv[u];for(let n in e){if(n===ry){if(s)continue}else{let e=iy(n);if(!e||s&&o&&(l??=ay(o),l.has(e)))continue}t||=Qv[u]={},t[n]??=e[n]}}}ny=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=ay(o));let t=e&&i&&c,s=r.e?Qv[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===ry){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=iy(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{ny=!1}}))}function sy(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function cy(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function ly(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=cy(r):Array.isArray(t)?t.push(cy(r)):n[e]=[t,cy(r)]}return n}var uy=/^(?:\s|["[{\d-]|fa|nu|tr)/,dy=py(JSON.parse),fy=my(JSON.stringify,JSON.parse);function py(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=ly(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!uy.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function my(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!uy.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=sy(e,r);return t?`?${t}`:``}}var hy=`__root__`;function gy(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function _y(e){return e instanceof Response&&!!e.options}function vy(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var yy=4,by=5;function xy(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function Sy(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function Cy(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=_v(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=Sy(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=Ty(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.slice(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=Ty(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.slice(m,u));let h=p?.slice();if(!r)return h;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=Ty(r,by);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=Ty(r,yy);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function wy(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Ty(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Ey(e,t){let n=Ty(),r=[];function i(e,t,n,a){let[o,s,c]=Cy(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(wy);t.masksTree=n,t.flatCache=vy(1e3)}function Dy(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=jy(e,t.masksTree);return t.flatCache.set(e,r),r}function Oy(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Ty(),Cy(t,{from:e},1,o),i.singleCache.set(a,o)),jy(r,o,n)}function ky(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=jy(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Ny(a.route)),t.matchCache.set(r,a),a}function Ay(e,t=!1){let n=Ty(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&Iv(),i[e.id]=e,o!==0&&e.path){let t=zv(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=Cy(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(wy);return{processedTree:{segmentTree:n,singleCache:vy(1e3),matchCache:vy(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function jy(e,t,n=!1){let r=e.split(`/`),i=Fy(e,r,t,n);if(!i)return null;let[a]=My(e,r,i);return{route:i.node.route,rawParams:a}}function My(e,t,n){let r=Py(n.node),i=n.node.data&&xy(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===yy)break;if(u.kind===by){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function Ny(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Py(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Fy(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!_v(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!zy(l,n))continue;if(i.parse){if(!Ry(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==yy&&zy(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===yy||i.kind===2)&&zy(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Ry(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Ly(f,o))return n;zy(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+Iy(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+Iy(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+Iy(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+Iy(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Iy(e,t){return 2**(e-t-1)}function Ly(e,t){return e===2**(t-1)-1}function Ry(e,t,n){let r,i;try{[r,i]=My(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function zy(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===yy)>(e.node.kind===yy)||t.node.kind===yy==(e.node.kind===yy)&&t.node.depth>e.node.depth)))}function By(e,t,n){let r=Bv(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=Lv(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Vy(n,s.input({url:e})),output:({url:e})=>s.output({url:Hy(n,e)})}:s}function Vy(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Hy(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Uy(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{Fv(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var Wy=`__TSR_index`,Gy=`popstate`,Ky=`beforeunload`,qy=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Jy(e){let t=qy.exec(e);return t?`/`+e.slice(t[0].length):e}function Yy(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
42
+ \r`.includes(e)?``:encodeURIComponent(e))),Jy(e)}function Xy(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=$y(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Wy];i=Zy(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Wy];i=Zy(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Wy]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function Zy(e,t){let n=eb();return{...t,key:n,__TSR_key:n,[Wy]:e}}function Qy(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>Yy(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>$y(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=eb();t.history.replaceState({[Wy]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=$y(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[Wy]-l.state[Wy],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=Xy({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Ky,x,{capture:!0}),t.removeEventListener(Gy,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Ky,x,{capture:!0}),t.addEventListener(Gy,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function $y(e,t){let n=Yy(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=eb();t={[Wy]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function eb(){return(Math.random()+1).toString(36).slice(7)}function tb(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function nb(e){return e.pathname+e.search+e.hash}function rb(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function ib(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function ab({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function ob(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function sb(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var cb=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Qy()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&Bv(n)?By(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Uy(this.latestLocation,e),oy(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Ay(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Ey(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:vy(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:Nv(e),external:!1,searchStr:o,search:Sv(t?.search,i),hash:Nv(r.slice(1)),state:Cv(t?.state,a)}}let o=Vy(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:Nv(Jy(o.pathname)),external:!!this.rewrite&&tb(o,this.origin),searchStr:c,search:Sv(t?.search,s),hash:Nv(o.hash.slice(1)),state:Cv(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=ky(zv(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=$y(n.href,{});n={...n,to:Vy(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=Hv(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[zv(c)],u=c.includes(`$`),d;if(l)d=l._branch??=Ny(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??Cy(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=pb(n.params,e),!bv(p))break;p===e&&(p=Object.assign(xv(),p));try{Object.assign(p,t(p))}catch{}}}p??=pb(n.params,mb(n.params,f)?o()[3]:hb);let m=e.leaveParams?c:Jy(Nv(f?Kv(c,f,p,this.pathParamsDecoder):c)),h=gb(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,fb(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?_b(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||hb,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,x=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:hb,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=Hy(this.rewrite,e);C=nb(e),tb(n,t)?(w=n.href,T=!0):w=Jy(nb(n))}else C=Pv(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:T,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=Dy(r.pathname,this.processedTree);if(t){let i=Object.assign(xv(),t.rawParams),{from:a,params:o,...s}=t.route,c=pb(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return lb(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=zv(this.latestLocation.href)===zv(n.href)&&Tv(ab(n.state),ab(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?Av(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return lb(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await ux(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(ib(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&rb(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(jv.test(n)||(r=Av(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:tb(e,this.origin)||(n=nb(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=Sb,this.preloadRoute=e=>dx(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?Hv(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Oy(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!Tv(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?Tv(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Uv(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??fy,parseSearch:e.parseSearch??dy,protocolAllowlist:e.protocolAllowlist??kv}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=Cy(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:zv(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?vb(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=fb(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof ub||(r=new ub(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=xv(),_=i._interpolation?Kv(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,v=i.id+_+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(g,d);let x;if(!b)try{yb(i,d)}catch(e){if(x=qv(e)||_y(e)?e:new db(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:Sv(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=rb(i)?`pending`:`success`;C={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:y?Sv(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:S,loaderDeps:y?Cv(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let w=s===i.id;C._notFound&&!w&&(C.error=void 0),C._notFound=w,c[n]=C}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?Sv(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=_v(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=_v(a),c={...e.search};for(let e of a)try{Object.assign(c,fb(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{yb(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function lb(e,t,{replace:n,ignoreBlocker:r}){if(!Mv(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var ub=class extends Error{},db=class extends Error{};function fb(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new ub(`Async validation not supported`);if(n.issues)throw new ub(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function pb(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function mb(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!yv.call(e,t[1]))}var hb=Object.freeze({});function gb(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=fb(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function _b(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=vv(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function vb(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return hy}function yb(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function bb(e,t){return e.options[t]?.preload?.()}function xb(e,t){let n=bb(e,`component`),r=bb(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function Sb(e,t,n){let r=()=>t===!1?void 0:t?bb(e,t):xb(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Cb(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function wb(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}var Tb=0,Eb=1,Db=2,Ob=3,kb=[4];function Ab(e){return typeof e[0]==`number`}function jb(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function Mb(e,t){return e.routesById[t.routeId]}function Nb(e,t,n){return _y(e)?[Ob,e]:qv(e)?(e.routeId||=n,[Db,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[Eb,e]):[Tb,e]}function Pb(e,t){let n=Nb(t,!0,e.id);if(n[0]!==Eb)return n;try{e.options.onError?.(n[1])}catch(t){n=Nb(t,!0,e.id)}return n}function Fb(e,t,n,r,i){return i[0].signal.aborted?kb:Zb(e,t,n,Pb(n,r),i)}async function Ib(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=Mb(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Rb(e,r),[i,Fb(e,t,u,a,n)]}if(c.aborted)return[i,kb];let p=r.paramsError??r.searchError;if(p!==void 0)return Rb(e,r),[i,Fb(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Vb(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?jb(a,c):a);if(c.aborted)return[i,kb];let s=Zb(e,t,u,Nb(o,!1,u.id),n);if(s[0]!==Tb)return Rb(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Rb(e,r),[i,Fb(e,t,u,a,n)]}finally{r.status=h,Vb(e,r,!1,n[0])}}i()}function Lb(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Rb(e,t){let n=t._flight;t._flight=void 0,Lb(e,t,n)?.abort()}function zb(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Lb(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Bb(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Vb(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Hb(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Ub(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return kb;if(!i)return[Tb,void 0];let l=n._flight;Vb(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Hb(e,t,n,r,s,a,!!o[3]))).then(e=>Nb(e,!1,r.id),e=>Nb(e,!0,r.id)).then(t=>(t[0]!==Tb&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Eb&&l[2]?Pb(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Zb(e,t,r,await jb(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Rb(e,n),kb}finally{Vb(e,n,!1,s)}}function Wb(e,t,n){t[0]!==Ob&&(e.status=`success`,e.error=void 0,t[0]===Tb?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Gb(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Rb(e,r)}function Kb(e,t){return t[0]===Eb||t[0]===Db?{...e,status:t[0]===Eb?`error`:`notFound`,error:t[1],_flight:void 0}:e}function qb(e,t,n,r,i,a,o){let s=t[1][n],c=Mb(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Hb(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=kb)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,Rb(e,s),p=Fb(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Lb(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Ub(e,t,s,c,g,i,a).then(t=>(Wb(s,t,l),t[0]===Tb&&(m&&!a[0].signal.aborted&&Gb(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[Tb,s.loaderData]),T=(async()=>{try{let e=Sb(c,void 0,C);e&&await jb(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Fb(e,t,c,r,a)]}let r=await w;x&&r[0]===Tb&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Kb(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=Ub(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,Wb(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>Kb(E,e))}async function Jb(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Mb(e,t[n]);try{let e=Sb(i,!1);e&&await jb(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Yb(e,t){t[2]&&=(zb(e,t[2].map(e=>e[3])),void 0)}async function Xb(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Ob)throw[a,t];!i&&t[0]!==Tb&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Ob)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Zb(e,t,n,r,i,a){for(;r[0]===Ob;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[Ob,t]:[Ob,t,a]}return[Ob,o,n]}catch(e){r=a?[Eb,e]:Pb(n,e),a=!0}}return r}async function Qb(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Db?Jb(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Ob)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Tb&&t[0]<Ob&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Ob){let n=s[1];if(n[0]!==Ob||n[1].options.reloadDocument||n[2])return Yb(e,t),n;c=!0,s=[0,[Eb,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===Eb?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Mb(e,u);try{await jb(i?Promise.resolve().then(()=>Sb(m,l===Eb?`errorComponent`:`notFoundComponent`)):Promise.all([Sb(m),Sb(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Yb(e,t),kb}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Yb(e,t),zb(e,o),p()):u.status=`success`}return t}async function $b(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=Mb(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await jb(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function ex(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Jb(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=qb(e,i,t,u,f,r,l)},m=await Ib(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Db){let t=await Jb(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=Ob&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Qb(e,i,u,r[0],Xb(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Xb(i[2],void 0,void 0,h.then(e=>Ab(e)?0:Cb(n).length,()=>0))),o=await h}catch(t){if(Yb(e,i),t===a&&a.aborted)return kb;throw t}return Ab(o)?o:$b(e,o,a,r[6]===n.length?r[6]:0)}function tx(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=Mb(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>tx(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function nx(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function rx(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Cb(t[3]).some(e=>e.id===n[1]))return;let i;try{await jb(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function ix(e,t){e._committed=t,e.stores.setMatches(t)}function ax(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=Cb(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=Mb(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=ob(n);ix(e,n),zb(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),sb(e,i,n,a,l,t)}async function ox(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function sx(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function cx(e,t,n,r,i){let a=n.map(e=>({...e}));Bb(a);for(let t of r)Rb(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Qb(e,o,r,t[0],i)}catch(t){throw zb(e,a),t}if(Ab(s))zb(e,a),s[0]===Ob&&e._tx===t&&e._committed===n&&await sx(e,t,s);else if(await $b(e,s,t[0].signal),e._tx!==t||e._committed!==n)zb(e,a);else{for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Rb(e,n))}ix(e,a),zb(e,n,a)}}async function lx(e,t,n,r,i,a){let o=await ex(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Ab(o)){let n=o[0]===Ob&&e._tx===t;if((!n||o[1].options.reloadDocument)&&nx(e,t),zb(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){nx(e,t);return}await sx(e,t,o);return}let s=o[1];if(e._tx===t&&await rx(e,t),e._tx!==t){nx(e,t),zb(e,s),Yb(e,o);return}let c=t[2],l=ib(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await rx(e,t),e._tx!==t){nx(e,t),zb(e,s),Yb(e,o);return}let n=await e.startTransition(()=>{nx(e,t),ax(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);e._tx===t?(u?.length&&cx(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)):Yb(e,o)})}async function ux(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=ib(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await ox(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Bb(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){zb(e,m),await ox(e,n);return}e._preflight=void 0;let g,_=()=>lx(e,y,f,()=>tx(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>ox(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Vb(e,t,!1)}n[0].abort(),zb(e,n[3],y[3],!0)}e._tx===y?(e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&tx(e,y),g?.(_()),await y[5]):(zb(e,y[3]),y[3]=[],g?.(),await ox(e,y))}async function dx(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),Bb(a),o=(e._preloads??=new Map).set(i,a),s=await ex(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),zb(e,a)),i.abort()}if(!Ab(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){qv(e)||console.error(e);return}}}var fx=`Error preloading route! ☝️`,px=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=hy:this.parentRoute||Iv();let r=n?hy:t?.path;r&&r!==`/`&&(r=Rv(r));let i=t?.id||r,a=n?hy:Lv((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:Lv(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=zv(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>gy({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},mx=class extends px{constructor(e){super(e)}},hx=class extends C.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?C.createElement(this.props.errorComponent??gx,{error:e[0],reset:this.reset}):this.props.children}};function gx({error:e}){let[t,n]=C.useState(!1);return(0,W.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,W.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,W.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,W.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,W.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,W.jsx)(`div`,{children:(0,W.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,W.jsx)(`code`,{children:e.message}):null})}):null]})}var _x=()=>!0,vx=()=>!1;function yx({children:e,fallback:t=null}){return(0,W.jsx)(C.Fragment,{children:bx()?e:t})}function bx(e=!0){return C.useSyncExternalStore(xx,_x,e?vx:_x)}function xx(){return()=>{}}var Sx=C.createContext(null);function Cx(e){return C.useContext(Sx)}function wx(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{wb(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var Tx=C.createContext(void 0),Ex=C.createContext(void 0);function Dx({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Ox(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var kx=[],Ax=0,{link:jx,unlink:Mx,propagate:Nx,checkDirty:Px,shallowPropagate:Fx}=Dx({update(e){return e._update()},notify(e){kx[Lx++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Vx(e))}}),Ix=0,Lx=0,Rx,zx=0;function Bx(e){try{++zx,e()}finally{--zx||Hx()}}function Vx(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Mx(n,e)}function Hx(){if(!(zx>0)){for(;Ix<Lx;){let e=kx[Ix];kx[Ix++]=void 0,e.notify()}Ix=0,Lx=0}}function Ux(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return Rx!==void 0&&jx(i,Rx,Ax),i._snapshot},subscribe(e){let t=Ox(e),n={current:!1},r=Wx(()=>{i.get(),n.current?(Rx=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Rx,o=t?.compare??Object.is;if(n)Rx=i,++Ax,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Rx=a,n&&(i.flags&=-5),Vx(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Px(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Fx(e)}}else e&32&&(i.flags=e&-33);return Rx!==void 0&&jx(i,Rx,Ax),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Nx(e),Fx(e),Hx())}},i}function Wx(e){let t=()=>{let t=Rx;Rx=n,++Ax,n.depsTail=void 0,n.flags=6;try{return e()}finally{Rx=t,n.flags&=-5,Vx(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Px(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Vx(this)}};return t(),n}var Gx=o((e=>{var t=S();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Kx=o(((e,t)=>{t.exports=Gx()})),qx=o((e=>{var t=S(),n=Kx();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Jx=o(((e,t)=>{t.exports=qx()}))();function Yx(e,t){return e===t}function Xx(e,t=e=>e,n){let r=n?.compare??Yx,i=(0,C.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,C.useCallback)(()=>e.get(),[e]);return(0,Jx.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var Zx={};function Qx(e,t){let n=C.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=Cv(n.current,i):i}}function $x(e){let t=Cx(),n=C.useContext(e.from?Ex:Tx),r=e.from??n,i=t.stores.getMatchStore(r),a=Qx(e,t),o=Xx(i,e=>e?a(e):Zx);if(o!==Zx)return o;(e.shouldThrow??!0)&&Iv()}function eS(e){return $x({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function tS(e){let{select:t,...n}=e;return $x({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function nS(e){return $x({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function rS(e){return $x({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function iS(e){let t=Cx();return C.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function aS(e){return $x({...e,select:t=>e.select?e.select(t.context):t.context})}function oS(...e){let t=C.useRef(e),n=t.current;return e.forEach((e,t)=>{Tv(n[t],e,!1,!0)||(n[t]=e)}),t.current}function sS(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(fx)})}function cS(e,t){let n=typeof e==`string`&&Av(e);if(n)return t.has(n)?e:null}function lS(e,t,n,r){let i=Vv(e.pathname,r),a=Vv(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!Tv(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function uS(e,t,n){let r=Cx(),i=C.useRef(null),a=C.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:f,onBlur:p,onFocus:m,onMouseEnter:h,onMouseLeave:g,onTouchStart:_}=e,[v,y,b]=oS(e.search,e.params,o),x=C.useContext(Tx),S=(r.stores._linkScopes??={})[x]??=wx(r,x),[w,T,E]=C.useMemo(()=>{let t=cS(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=S[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=vS(t,r,u),s=u||o&&!Av(o)?lS(e,t,b,r.basepath):void 0;(!a||a[0]!==o||a[1]!==s)&&(a=[o,s]),i=e}return a};return[n,c,b?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,S,e.from,e.hash,e.href,s,v,y,e.state,e.mask,e.unsafeRelative,b,u]),[D,O]=C.useSyncExternalStore(S[1],T,E||T),k=O===void 0&&D,A=u||D===void 0,j=C.useRef(!1),M=e.reloadDocument||k||A?!1:c??r.options.defaultPreload,N=l??r.options.defaultPreloadDelay??0,ee=C.useCallback(e=>{let t=e?.isIntersecting;t??M===`intent`?N?i.t??=setTimeout(()=>{i.t=void 0,sS(r,w)},N):sS(r,w):t===!1&&gS(i)},[r,w,i,M,N]);C.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,sS(r,w));let e=!0,t;return M===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&ee(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),gS(i)}},[r,w,M,ee,i]);let P=mS(e,n);if(P.ref=t?a:i,k)return P.href=k,P;let F=t=>{let n=d??t.currentTarget.getAttribute(`target`);!A&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(!n||n===`_self`)&&t.button===0&&(t.preventDefault(),gS(i),r.navigate({...e,_fromLocation:w._fromLocation}))},I=()=>{M===`intent`&&sS(r,w)},L=()=>{M===`intent`&&gS(i)};return P.onClick=_S(f,F),P.onBlur=_S(p,L),P.onFocus=_S(m,ee),P.onMouseEnter=_S(h,ee),P.onMouseLeave=_S(g,L),P.onTouchStart=_S(_,I),hS(P,e,O,D,A,n)}var dS={},fS={className:`active`},pS=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function mS(e,t){let n={};for(let r in e)pS.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function hS(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=vv(n?o:s,{})??(n?fS:dS);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var gS=e=>{clearTimeout(e.t),e.t=void 0},_S=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function vS(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!Mv(i,t.protocolAllowlist))return i}var yS=C.memo(C.forwardRef((e,t)=>{let n=e._asChild||`a`,r=uS(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return C.createElement(n,r,i)}),bS);function bS(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!pS.has(r)||!Tv(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var xS=class extends px{constructor(e){super(e),this.useMatch=e=>$x({...e,from:this.id}),this.useRouteContext=e=>aS({...e,from:this.id}),this.useSearch=e=>rS({...e,from:this.id}),this.useParams=e=>nS({...e,from:this.id}),this.useLoaderDeps=e=>tS({...e,from:this.id}),this.useLoaderData=e=>eS({...e,from:this.id}),this.useNavigate=()=>iS({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,W.jsx)(yS,{ref:t,from:this.fullPath,...e}))}};function SS(e){return new xS(e)}var CS=class extends mx{constructor(e){super(e),this.useMatch=e=>$x({...e,from:this.id}),this.useRouteContext=e=>aS({...e,from:this.id}),this.useSearch=e=>rS({...e,from:this.id}),this.useParams=e=>nS({...e,from:this.id}),this.useLoaderDeps=e=>tS({...e,from:this.id}),this.useLoaderData=e=>eS({...e,from:this.id}),this.useNavigate=()=>iS({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,W.jsx)(yS,{ref:t,from:this.fullPath,...e}))}};function wS(e){return new CS(e)}function TS(e){let t=Cx(),n=`not-found-${Xx(t.stores.location,e=>e.pathname)}-${Xx(t.stores.status)}`;return(0,W.jsx)(hx,{getResetKey:()=>n,onCatch:(t,n)=>{if(qv(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(qv(t))return e.fallback?.(t);throw t},children:e.children})}function ES(){return(0,W.jsx)(`p`,{children:`Not Found`})}function DS(e,t,n){return t.options.notFoundComponent?(0,W.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,W.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,W.jsx)(ES,{})}function OS(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,W.jsx)(n,{}):null}var kS=(e,t)=>e[0]===t[0]&&e[1]===t[1],AS=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,jS=C.memo(function({routeId:e}){let t=Cx();return MS(t,Xx(t.stores.getMatchStore(e)))});function MS(e,t){let n=e.routesById[t.routeId],r=OS(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=AS(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,W.jsx)(NS,{match:t});s&&(l=(0,W.jsx)(yx,{fallback:r,children:l})),o&&(l=(0,W.jsx)(TS,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return C.createElement(o,e)},children:l})),i&&(l=(0,W.jsx)(hx,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(qv(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,W.jsx)(C.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,W.jsx)(Tx.Provider,{value:t.routeId,children:(0,W.jsxs)(u,{children:[l,null]})}):(0,W.jsxs)(Tx.Provider,{value:t.routeId,children:[l,null]})}var NS=C.memo(function({match:e}){let t=Cx(),n=e.routeId,r=t.routesById[n],i=C.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=C.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,W.jsx)(e,{},i):(0,W.jsx)(PS,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!AS(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return OS(t,r)}if(e.status===`notFound`)return DS(t,r,e.error);if(e.status===`error`)throw e.error;return a}),PS=C.memo(function(){let e=Cx(),t=C.useContext(Tx),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Xx(a,e=>[!!e._notFound,e.error],{compare:kS}),i=Xx(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return DS(e,e.routesById[t],r);if(!i)return null;let a=(0,W.jsx)(jS,{routeId:i});return t===`__root__`?(0,W.jsx)(C.Suspense,{fallback:OS(e),children:a}):a});function FS(e,t){let n=e[1];e.length=0,n?.(t)}function IS({t:e}){let t=Cx(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{FS(n,!1),n.push(i,a),e(t),C.startTransition(r)}),gv(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(zv(r.publicHref)!==zv(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...ib(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function LS(){let e=Cx(),t=e.routesById[hy],n=OS(e,t),r=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(IS,{t:C.useState()[1]}),e.ssr?(0,W.jsx)(RS,{}):(0,W.jsx)(C.Suspense,{fallback:n,children:(0,W.jsx)(RS,{})})]});return e.options.InnerWrap?(0,W.jsx)(e.options.InnerWrap,{children:r}):r}function RS(){let e=Cx(),t=e._rendered,n=Xx(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;gv(()=>{t[0]===n&&FS(t,!0)},[t,n]);let a=i?(0,W.jsx)(jS,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,W.jsx)(hx,{getResetKey:()=>r,onCatch:void 0,children:a})}var zS=e=>({createMutableStore:Ux,createReadonlyStore:Ux,batch:Bx}),BS=e=>new VS(e),VS=class extends cb{constructor(e){super(e,zS)}};function HS({router:e,children:t,...n}){bv(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,W.jsx)(Sx.Provider,{value:e,children:t});return e.options.Wrap?(0,W.jsx)(e.options.Wrap,{children:r}):r}function US({router:e,...t}){return(0,W.jsx)(HS,{router:e,...t,children:(0,W.jsx)(LS,{})})}var WS=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}}}})),GS=o(((e,t)=>{t.exports=WS()})),KS=o((e=>{var t=GS(),n=S(),r=bt();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function h(e){var t=[null,null],n=p(e);return n===null||g(t,e,n.child,{foundSelf:!1}),t}function g(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&g(e,t,n.child,r))return!0;n=n.sibling}return!1}function _(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var v=null,y=null;function b(e,t,n){return e===n||e===t&&(v=e,!0)}function x(e,t,n){return e===n?(y=e,!1):e===t&&(y!==null&&(v=e),!0)}function C(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function w(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var T=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),A=Symbol.for(`react.strict_mode`),j=Symbol.for(`react.profiler`),M=Symbol.for(`react.consumer`),N=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),P=Symbol.for(`react.suspense`),F=Symbol.for(`react.suspense_list`),I=Symbol.for(`react.memo`),L=Symbol.for(`react.lazy`),R=Symbol.for(`react.activity`),te=Symbol.for(`react.legacy_hidden`),ne=Symbol.for(`react.memo_cache_sentinel`),re=Symbol.for(`react.view_transition`),ie=Symbol.for(`react.recoverable`),ae=Symbol.iterator;function oe(e){return typeof e!=`object`||!e?null:(e=ae&&e[ae]||e[`@@iterator`],typeof e==`function`?e:null)}var se=Symbol.for(`react.client.reference`);function ce(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case j:return`Profiler`;case A:return`StrictMode`;case P:return`Suspense`;case F:return`SuspenseList`;case R:return`Activity`;case re:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case N:return e.displayName||`Context`;case M:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case I:return t=e.displayName||null,t===null?ce(e.type)||`Memo`:t;case L:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var le=Array.isArray,z=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},ue=[],de=-1;function fe(e){return{current:e}}function pe(e){0>de||(e.current=ue[de],ue[de]=null,de--)}function H(e,t){de++,ue[de]=e.current,e.current=t}var me=fe(null),he=fe(null),ge=fe(null),_e=fe(null);function ve(e,t){switch(H(ge,t),H(he,e),H(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?dp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=dp(t),e=fp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(me),H(me,e)}function ye(){pe(me),pe(he),pe(ge)}function be(e){var t=e.memoizedState;t!==null&&(ch._currentValue=t.memoizedState,H(_e,e)),t=me.current;var n=fp(t,e.type);t!==n&&(H(he,e),H(me,n))}function xe(e){he.current===e&&(pe(me),pe(he)),_e.current===e&&(pe(_e),ch._currentValue=V)}var Se,Ce;function we(e){if(Se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Se=t&&t[1]||``,Ce=-1<e.stack.indexOf(`
43
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
44
+ `+Se+e+Ce}var Te=!1;function Ee(e,t){if(!e||Te)return``;Te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
45
+ `),l=s.split(`
46
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
47
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?we(n):``}function De(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we(`Lazy`);case 13:return e.child!==t&&t!==null?we(`Suspense Fallback`):we(`Suspense`);case 19:return we(`SuspenseList`);case 0:case 15:return Ee(e.type,!1);case 11:return Ee(e.type.render,!1);case 1:return Ee(e.type,!0);case 31:return we(`Activity`);case 30:return we(`ViewTransition`);default:return``}}function Oe(e){try{var t=``,n=null;do t+=De(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
48
+ Error generating stack: `+e.message+`
49
+ `+e.stack}}var ke=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,je=t.unstable_cancelCallback,Me=t.unstable_shouldYield,Ne=t.unstable_requestPaint,Pe=t.unstable_now,Fe=t.unstable_getCurrentPriorityLevel,Ie=t.unstable_ImmediatePriority,Le=t.unstable_UserBlockingPriority,Re=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Be=t.unstable_IdlePriority,Ve=t.log,He=t.unstable_setDisableYieldValue,Ue=null,We=null;function Ge(e){if(typeof Ve==`function`&&He(e),We&&typeof We.setStrictMode==`function`)try{We.setStrictMode(Ue,e)}catch{}}var Ke=Math.clz32?Math.clz32:Ye,qe=Math.log,Je=Math.LN2;function Ye(e){return e>>>=0,e===0?32:31-(qe(e)/Je|0)|0}var Xe=256,Ze=262144,Qe=4194304;function $e(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function et(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=$e(n))):i=$e(o):i=$e(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=$e(n))):i=$e(o)):i=$e(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 tt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function nt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ke(n),i=1<<r;t|=e[r],n&=~i}return t}function rt(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 it(){var e=Qe;return Qe<<=1,!(Qe&62914560)&&(Qe=4194304),e}function at(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ot(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function st(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ke(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ct(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ct(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ke(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function lt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ke(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ut(e,t){var n=t&-t;return n=n&42?1:dt(n),(n&(e.suspendedLanes|t))===0?n:0}function dt(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 ft(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function pt(){var e=B.p;return e===0?(e=window.event,e===void 0?32:wh(e.type)):e}function mt(e,t){var n=B.p;try{return B.p=e,t()}finally{B.p=n}}var ht=Math.random().toString(36).slice(2),gt=`__reactFiber$`+ht,_t=`__reactProps$`+ht,vt=`__reactContainer$`+ht,yt=`__reactEvents$`+ht,xt=`__reactListeners$`+ht,St=`__reactHandles$`+ht,Ct=`__reactResources$`+ht,wt=`__reactMarker$`+ht,Tt=`__reactLoad$`+ht;function Et(e){delete e[gt],delete e[_t],delete e[xt],delete e[St]}function Dt(e){var t;if(t=e[gt])return t;for(var n=e.parentNode;n;){if(t=n[vt]||n[gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pm(e);e!==null;){if(n=e[gt])return n;e=pm(e)}return t}e=n,n=e.parentNode}return null}function Ot(e){if(e=e[gt]||e[vt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function kt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function At(e){var t=e[Ct];return t||=e[Ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function jt(e){e[wt]=!0}function Mt(e){e[Tt]=void 0}var Nt=new Set,Pt={};function Ft(e,t){It(e,t),It(e+`Capture`,t)}function It(e,t){for(Pt[e]=t,e=0;e<t.length;e++)Nt.add(t[e])}var Lt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),U={},Rt={};function zt(e){return ke.call(Rt,e)?!0:ke.call(U,e)?!1:Lt.test(e)?Rt[e]=!0:(U[e]=!0,!1)}var Bt=!1;function Vt(){var e=Bt;return Bt=!1,e}function Ht(e,t,n){if(zt(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 Ut(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 Wt(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 Gt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Kt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function qt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jt(e){if(!e._valueTracker){var t=Kt(e)?`checked`:`value`;e._valueTracker=qt(e,t,``+e[t])}}function Yt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Kt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var Xt=/[\n"\\]/g;function Zt(e){return e.replace(Xt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Qt(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=``+Gt(t)):e.value!==``+Gt(t)&&(e.value=``+Gt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):en(e,Gt(n)):o===`number`&&e.value==t?en(e,Gt(e.value)):en(e,Gt(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=``+Gt(s):e.removeAttribute(`name`)}function $t(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)){Jt(e);return}n=n==null?``:``+Gt(n),t=t==null?n:``+Gt(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),Jt(e)}function en(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function tn(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=``+Gt(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 nn(e,t,n){t!=null&&(t=``+Gt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Gt(n)}function rn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(le(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Gt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Jt(e)}function an(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var on=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 sn(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||on.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function cn(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]=``,Bt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(sn(e,a,r),Bt=!0)}else for(var o in t)t.hasOwnProperty(o)&&sn(e,o,t[o])}function ln(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 un=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),dn=/^[\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 fn(e){return dn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function pn(){}var mn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gn=null,_n=null;function vn(e){var t=Ot(e);if(t&&(e=t.stateNode)){var n=e[_t]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Qt(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[_t]||null;if(!a)throw Error(i(90));Qt(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&&Yt(r)}break a;case`textarea`:nn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&tn(e,!!n.multiple,t,!1)}}}var yn=!1;function bn(e,t,n){if(yn)return e(t,n);yn=!0;try{return e(t)}finally{if(yn=!1,(gn!==null||_n!==null)&&(Rd(),gn&&(t=gn,e=_n,_n=gn=null,vn(t),e)))for(t=0;t<e.length;t++)vn(e[t])}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[_t]||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 Sn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Cn=!1;if(Sn)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){Cn=!0}}),window.addEventListener(`test`,wn,wn),window.removeEventListener(`test`,wn,wn)}catch{Cn=!1}var Tn=null,En=null,Dn=null;function On(){if(Dn)return Dn;var e,t=En,n=t.length,r,i=`value`in Tn?Tn.value:Tn.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 Dn=i.slice(e,1<r?1-r:void 0)}function kn(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 An(){return!0}function jn(){return!1}function Mn(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)?An:jn,this.isPropagationStopped=jn,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=Mn(Nn),Fn=T({},Nn,{view:0,detail:0}),In=Mn(Fn),Ln,W,Rn,zn=T({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xn,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!==Rn&&(Rn&&e.type===`mousemove`?(Ln=e.screenX-Rn.screenX,W=e.screenY-Rn.screenY):W=Ln=0,Rn=e),Ln)},movementY:function(e){return`movementY`in e?e.movementY:W}}),Bn=Mn(zn),Vn=Mn(T({},zn,{dataTransfer:0})),Hn=Mn(T({},Fn,{relatedTarget:0})),Un=Mn(T({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Wn=Mn(T({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Gn=Mn(T({},Nn,{data:0})),Kn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},qn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Jn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Yn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jn[e])?!!t[e]:!1}function Xn(){return Yn}var Zn=Mn(T({},Fn,{key:function(e){if(e.key){var t=Kn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=kn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xn,charCode:function(e){return e.type===`keypress`?kn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?kn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Qn=Mn(T({},zn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),$n=Mn(T({},Nn,{submitter:0})),er=Mn(T({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xn})),G=Mn(T({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),tr=Mn(T({},zn,{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})),nr=Mn(T({},Nn,{newState:0,oldState:0,source:0})),rr=[9,13,27,32],ir=Sn&&`CompositionEvent`in window,ar=null;Sn&&`documentMode`in document&&(ar=document.documentMode);var or=Sn&&`TextEvent`in window&&!ar,sr=Sn&&(!ir||ar&&8<ar&&11>=ar),cr=` `,lr=!1;function ur(e,t){switch(e){case`keyup`:return rr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function dr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var fr=!1;function pr(e,t){switch(e){case`compositionend`:return dr(t);case`keypress`:return t.which===32?(lr=!0,cr):null;case`textInput`:return e=t.data,e===cr&&lr?null:e;default:return null}}function mr(e,t){if(fr)return e===`compositionend`||!ir&&ur(e,t)?(e=On(),Dn=En=Tn=null,fr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return sr&&t.locale!==`ko`?null:t.data;default:return null}}var hr={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 gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!hr[e.type]:t===`textarea`}function K(e,t,n,r){gn?_n?_n.push(r):_n=[r]:gn=r,t=Jf(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var _r=null,vr=null;function yr(e){Bf(e,0)}function br(e){if(Yt(kt(e)))return e}function xr(e,t){if(e===`change`)return t}var Sr=!1;if(Sn){var Cr;if(Sn){var wr=`oninput`in document;if(!wr){var Tr=document.createElement(`div`);Tr.setAttribute(`oninput`,`return;`),wr=typeof Tr.oninput==`function`}Cr=wr}else Cr=!1;Sr=Cr&&(!document.documentMode||9<document.documentMode)}function Er(){_r&&(_r.detachEvent(`onpropertychange`,Dr),vr=_r=null)}function Dr(e){if(e.propertyName===`value`&&br(vr)){var t=[];K(t,vr,e,hn(e)),bn(yr,t)}}function Or(e,t,n){e===`focusin`?(Er(),_r=t,vr=n,_r.attachEvent(`onpropertychange`,Dr)):e===`focusout`&&Er()}function kr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return br(vr)}function Ar(e,t){if(e===`click`)return br(t)}function jr(e,t){if(e===`input`||e===`change`)return br(t)}function Mr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Nr=typeof Object.is==`function`?Object.is:Mr;function Pr(e,t){if(Nr(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(!ke.call(t,i)||!Nr(e[i],t[i]))return!1}return!0}function Fr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Ir(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lr(e,t){var n=Ir(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=Ir(n)}}function Rr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Fr(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=Fr(e.document)}return t}function Br(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 Vr=Sn&&`documentMode`in document&&11>=document.documentMode,Hr=null,Ur=null,Wr=null,Gr=!1;function Kr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gr||Hr==null||Hr!==Fr(r)||(r=Hr,`selectionStart`in r&&Br(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}),Wr&&Pr(Wr,r)||(Wr=r,r=Jf(Ur,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Hr)))}function qr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Jr={animationend:qr(`Animation`,`AnimationEnd`),animationiteration:qr(`Animation`,`AnimationIteration`),animationstart:qr(`Animation`,`AnimationStart`),transitionrun:qr(`Transition`,`TransitionRun`),transitionstart:qr(`Transition`,`TransitionStart`),transitioncancel:qr(`Transition`,`TransitionCancel`),transitionend:qr(`Transition`,`TransitionEnd`)},Yr={},Xr={};Sn&&(Xr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),`TransitionEvent`in window||delete Jr.transitionend.transition);function Zr(e){if(Yr[e])return Yr[e];if(!Jr[e])return e;var t=Jr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Xr)return Yr[e]=t[n];return e}var q=Zr(`animationend`),Qr=Zr(`animationiteration`),$r=Zr(`animationstart`),ei=Zr(`transitionrun`),ti=Zr(`transitionstart`),ni=Zr(`transitioncancel`),ri=Zr(`transitionend`),ii=new Map,ai=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ai.push(`scrollEnd`);function J(e,t){ii.set(e,t),Ft(t,[e])}var oi=0;function si(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=yd.identifierPrefix;var n=oi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function ci(e){if(e==null||typeof e==`string`)return e;var t=null,n=Dd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function li(e,t){return e=ci(e),t=ci(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var ui=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)},di=[],fi=0,pi=0;function mi(){for(var e=fi,t=pi=fi=0;t<e;){var n=di[t];di[t++]=null;var r=di[t];di[t++]=null;var i=di[t];di[t++]=null;var a=di[t];if(di[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&&vi(n,i,a)}}function hi(e,t,n,r){di[fi++]=e,di[fi++]=t,di[fi++]=n,di[fi++]=r,pi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function gi(e,t,n,r){return hi(e,t,n,r),yi(e)}function _i(e,t){return hi(e,null,null,t),yi(e)}function vi(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-Ke(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function yi(e){if(50<Od)throw Od=0,kd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bi={};function xi(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 Si(e,t,n,r){return new xi(e,t,n,r)}function Ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wi(e,t){var n=e.alternate;return n===null?(n=Si(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ti(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ei(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ci(r)&&(s=1);else if(typeof r==`string`)s=Jm(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case R:return e=Si(31,n,t,a),e.elementType=R,e.lanes=o,e;case k:return Di(n.children,a,o,t);case A:s=8,a|=24;break;case j:return e=Si(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case P:return e=Si(13,n,t,a),e.elementType=P,e.lanes=o,e;case F:return e=Si(19,n,t,a),e.elementType=F,e.lanes=o,e;case te:case re:return e=a|32,e=Si(30,n,t,e),e.elementType=re,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case N:s=10;break a;case M:s=9;break a;case ee:s=11;break a;case I:s=14;break a;case L:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Di(e,t,n,r){return e=Si(7,e,r,t),e.lanes=n,e}function Oi(e,t,n){return e=Si(6,e,null,t),e.lanes=n,e}function ki(e){var t=Si(18,null,null,0);return t.stateNode=e,t}function Ai(e,t,n){return t=Si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ji=new WeakMap;function Mi(e,t){if(typeof e==`object`&&e){var n=ji.get(e);return n===void 0?(t={value:e,source:t,stack:Oe(t)},ji.set(e,t),t):n}return{value:e,source:t,stack:Oe(t)}}var Ni=[],Pi=0,Fi=null,Ii=0,Li=[],Ri=0,zi=null,Bi=1,Vi=``;function Hi(e,t){Ni[Pi++]=Ii,Ni[Pi++]=Fi,Fi=e,Ii=t}function Ui(e,t,n){Li[Ri++]=Bi,Li[Ri++]=Vi,Li[Ri++]=zi,zi=e;var r=Bi;e=Vi;var i=32-Ke(r)-1;r&=~(1<<i),n+=1;var a=32-Ke(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Bi=1<<32-Ke(t)+i|n<<i|r,Vi=a+e}else Bi=1<<a|n<<i|r,Vi=e}function Wi(e){e.return!==null&&(Hi(e,1),Ui(e,1,0))}function Gi(e){for(;e===Fi;)Fi=Ni[--Pi],Ni[Pi]=null,Ii=Ni[--Pi],Ni[Pi]=null;for(;e===zi;)zi=Li[--Ri],Li[Ri]=null,Vi=Li[--Ri],Li[Ri]=null,Bi=Li[--Ri],Li[Ri]=null}function Ki(e,t){Li[Ri++]=Bi,Li[Ri++]=Vi,Li[Ri++]=zi,Bi=t.id,Vi=t.overflow,zi=e}var qi=null,Ji=null,Y=!1,Yi=null,Xi=!1,Zi=Error(i(519));function Qi(e){throw ia(Mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[gt]=e,t[_t]=r,n){case`dialog`:Vf(`cancel`,t),Vf(`close`,t);break;case`iframe`:case`object`:case`embed`:Vf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Rf.length;n++)Vf(Rf[n],t);break;case`source`:Vf(`error`,t);break;case`img`:case`image`:case`link`:Vf(`error`,t),Vf(`load`,t);break;case`details`:Vf(`toggle`,t);break;case`input`:Vf(`invalid`,t),$t(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Vf(`invalid`,t);break;case`textarea`:Vf(`invalid`,t),rn(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||ep(t.textContent,n)?(r.popover!=null&&(Vf(`beforetoggle`,t),Vf(`toggle`,t)),r.onScroll!=null&&Vf(`scroll`,t),r.onScrollEnd!=null&&Vf(`scrollend`,t),r.onClick!=null&&(t.onclick=pn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(qi=e.return;qi;)switch(qi.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:qi=qi.return}}function ta(e){if(e!==qi)return!1;if(!Y)return ea(e),Y=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||mp(e.type,e.memoizedProps)),n=!n),n&&Ji&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ji=fm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ji=fm(e)}else t===27?(t=Ji,Cp(e.type)?(e=dm,dm=null,Ji=e):Ji=t):Ji=qi?um(e.stateNode.nextSibling):null;return!0}function na(){Ji=qi=null,Y=!1}function ra(){var e=Yi;return e!==null&&(dd===null?dd=e:dd.push.apply(dd,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=fe(null),oa=null,sa=null;function ca(e,t,n){H(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,pe(aa)}function ua(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 da(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),ua(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),ua(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ua(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function fa(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;Nr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===_e.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ch]:e.push(ch))}a=a.return}return e!==null&&da(t,e,n,r),t.flags|=262144,e!==null}function pa(e){for(e=e.firstContext;e!==null;){if(!Nr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(i(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=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()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}function wa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ta=null;function Ea(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Da=null,Oa=0,ka=0,Aa=null;function ja(e,t){if(Da===null){var n=Da=[];Oa=0,ka=Nf(),Aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Oa++,t.then(Ma,Ma),t}function Ma(){if(--Oa===0&&(Ta=null,Da!==null)){Aa!==null&&(Aa.status=`fulfilled`);var e=Da;Da=null,ka=0,Aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Na(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 Pa=z.S;z.S=function(e,t){if(md=Pe(),typeof t==`object`&&t&&typeof t.then==`function`&&ja(e,t),Ta!==null)for(var n=yf;n!==null;)wa(n,Ta),n=n.next;if(n=e.types,n!==null){for(var r=yf;r!==null;)wa(r,n),r=r.next;if(ka!==0){r=Ta,r===null&&(r=Ta=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Pa!==null&&Pa(e,t)};var Fa=fe(null);function Ia(){var e=Fa.current;return e===null?Yu.pooledCache:e}function La(e,t){t===null?H(Fa,Fa.current):H(Fa,t.pool)}function Ra(){var e=Ia();return e===null?null:{parent:xa._currentValue,pool:e}}var za=Error(i(460)),Ba=Error(i(474)),Va=Error(i(542)),Ha={then:function(){}};function Ua(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pn,pn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ja(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(pn,pn);else{if(e=Yu,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,za}}function Ga(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ka=e,za):e}}var Ka=null;function qa(){if(Ka===null)throw Error(i(459));var e=Ka;return Ka=null,e}function Ja(e){if(e===za||e===Va)throw Error(i(483))}var Ya=null,Xa=0;function Za(e){var t=Xa;return Xa+=1,Ya===null&&(Ya=[]),Wa(Ya,e,t)}function Qa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function $a(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function eo(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=wi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Oi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),Qa(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===L&&Ga(i)===t.type)?(t=a(t,n.props),Qa(t,n),t.return=e,t):(t=Ei(n.type,n.key,n.props,null,e.mode,r),Qa(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=Ai(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Di(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Ei(t.type,t.key,t.props,null,e.mode,n),Qa(n,t),n.return=e,n;case O:return t=Ai(t,e.mode,n),t.return=e,t;case L:return t=Ga(t),f(e,t,n)}if(le(t)||oe(t))return t=Di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Za(t),n);if(t.$$typeof===N)return f(e,ga(e,t),n);$a(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case L:return n=Ga(n),p(e,t,n,r)}if(le(n)||oe(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Za(n),r);if(n.$$typeof===N)return p(e,t,ga(e,n),r);$a(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case L:return r=Ga(r),m(e,t,n,r,i)}if(le(r)||oe(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Za(r),i);if(r.$$typeof===N)return m(e,t,n,ga(t,r),i);$a(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),Y&&Hi(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 Y&&Hi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Y&&Hi(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),Y&&Hi(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 Y&&Hi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Y&&Hi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),Qa(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===L&&Ga(l)===r.type){n(e,r.sibling),c=a(r,o.props),Qa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Di(o.props.children,e.mode,c,o.key),Qa(c,o),c.return=e,e=c):(c=Ei(o.type,o.key,o.props,null,e.mode,c),Qa(c,o),c.return=e,e=c)}return s(e);case O:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ai(o,e.mode,c),c.return=e,e=c}return s(e);case L:return o=Ga(o),_(e,r,o,c)}if(le(o))return h(e,r,o,c);if(oe(o)){if(l=oe(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,Za(o),c);if(o.$$typeof===N)return _(e,r,ga(e,o),c);$a(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=Oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Xa=0;var i=_(e,t,n,r);return Ya=null,i}catch(t){if(t===za||t===Va)throw t;var a=Si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var to=eo(!0),no=eo(!1),ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ao(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 oo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function so(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ju&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=yi(e),vi(e,null,n),t}return hi(e,r,t,n),yi(e)}function co(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,lt(e,n)}}function lo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var uo=!1;function fo(){if(uo){var e=Aa;if(e!==null)throw e}}function po(e,t,n,r){uo=!1;var i=e.updateQueue;ro=!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?(Zu&f)===f:(r&f)===f){f!==0&&f===ka&&(uo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:ro=!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),ad|=o,e.lanes=o,e.memoizedState=d}}function mo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ho(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)mo(n[e],t)}var go=fe(null),_o=fe(0);function vo(e,t){e=rd,H(_o,e),H(go,t),rd=e|t.baseLanes}function yo(){H(_o,rd),H(go,go.current)}function bo(){rd=_o.current,pe(go),pe(_o)}var xo=fe(null),So=null;function Co(e){var t=e.alternate;H(Oo,Oo.current&1),H(xo,e),So===null&&(t===null||go.current!==null||t.memoizedState!==null)&&(So=e)}function wo(e){H(Oo,Oo.current),H(xo,e),So===null&&(So=e)}function To(e){e.tag===22?(H(Oo,Oo.current),H(xo,e),So===null&&(So=e)):Eo()}function Eo(){H(Oo,Oo.current),H(xo,xo.current)}function Do(e){pe(xo),So===e&&(So=null),pe(Oo)}var Oo=fe(0);function ko(e,t){H(xo,xo.current),H(Oo,t)}function Ao(e){pe(Oo),pe(xo),So===e&&(So=null)}function jo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sm(n)||cm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mo=0,X=null,No=null,Po=null,Fo=!1,Io=!1,Lo=!1,Ro=0,zo=0,Bo=null,Vo=0;function Ho(){throw Error(i(321))}function Uo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nr(e[n],t[n]))return!1;return!0}function Wo(e,t,n,r,i,a){return Mo=a,X=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?sc:cc,Lo=!1,a=n(r,i),Lo=!1,Io&&(a=Ko(t,n,r,i)),Go(e),a}function Go(e){z.H=oc;var t=No!==null&&No.next!==null;if(Mo=0,Po=No=X=null,Fo=!1,zo=0,Bo=null,t)throw Error(i(300));e===null||Tc||(e=e.dependencies,e!==null&&pa(e)&&(Tc=!0))}function Ko(e,t,n,r){X=e;var a=0;do{if(Io&&(Bo=null),zo=0,Io=!1,25<=a)throw Error(i(301));if(a+=1,Po=No=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}z.H=lc,o=t(n,r)}while(Io);return o}function qo(){var e=z.H,t=e.useState()[0];return t=typeof t.then==`function`?es(t):t,e=e.useState()[0],(No===null?null:No.memoizedState)!==e&&(X.flags|=1024),t}function Jo(){var e=Ro!==0;return Ro=0,e}function Yo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Xo(e){if(Fo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Fo=!1}Mo=0,Po=No=X=null,Io=!1,zo=Ro=0,Bo=null}function Zo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Po===null?X.memoizedState=Po=e:Po=Po.next=e,Po}function Qo(){if(No===null){var e=X.alternate;e=e===null?null:e.memoizedState}else e=No.next;var t=Po===null?X.memoizedState:Po.next;if(t!==null)Po=t,No=e;else{if(e===null)throw X.alternate===null?Error(i(467)):Error(i(310));No=e,e={memoizedState:No.memoizedState,baseState:No.baseState,baseQueue:No.baseQueue,queue:No.queue,next:null},Po===null?X.memoizedState=Po=e:Po=Po.next=e}return Po}function $o(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function es(e){var t=zo;return zo+=1,Bo===null&&(Bo=[]),e=Wa(Bo,e,t),t=X,(Po===null?t.memoizedState:Po.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?sc:cc),e}function ts(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return es(e);if(e.$$typeof===ie)return;if(e.$$typeof===N)return ha(e)}throw Error(i(438,String(e)))}function ns(e){var t=null,n=X.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=X.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=$o(),X.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]=ne;return t.index++,n}function rs(e,t){return typeof t==`function`?t(e):t}function is(e){return as(Qo(),No,e)}function as(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?(Mo&f)===f:(Zu&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===ka&&(d=!0);else if((Mo&p)===p){u=u.next,p===ka&&(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,X.lanes|=p,ad|=p;f=u.action,Lo&&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,X.lanes|=f,ad|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Nr(o,e.memoizedState)&&(Tc=!0,d&&(n=Aa,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 os(e){var t=Qo(),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);Nr(o,t.memoizedState)||(Tc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ss(e,t,n){var r=X,a=Qo(),o=Y;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Nr((No||a).memoizedState,n);if(s&&(a.memoizedState=n,Tc=!0),a=a.queue,Ms(us.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Po!==null&&!!(Po.memoizedState.tag&1),Ds(e?9:8,{destroy:void 0},ls.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Yu===null)throw Error(i(349));o||Mo&127||cs(r,t,n)}return n}function cs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=X.updateQueue,t===null?(t=$o(),X.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ls(e,t,n,r){t.value=n,t.getSnapshot=r,ds(t)&&fs(e)}function us(e,t,n){return n(function(){ds(t)&&fs(e)})}function ds(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nr(e,n)}catch{return!0}}function fs(e){var t=_i(e,2);t!==null&&Nd(t,e,2)}function ps(e){var t=Zo();if(typeof e==`function`){var n=e;if(e=n(),Lo){Ge(!0);try{n()}finally{Ge(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:e},t}function ms(e,t,n,r){return e.baseState=n,as(e,No,typeof r==`function`?r:rs)}function hs(e,t,n,r,a){if(rc(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)}};z.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,gs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function gs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=z.T,o={};o.types=a===null?null:a.types,z.T=o;try{var s=n(i,r),c=z.S;c!==null&&c(o,s),_s(e,t,s)}catch(n){ys(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),z.T=a}}else try{a=n(i,r),_s(e,t,a)}catch(n){ys(e,t,n)}}function _s(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){vs(e,t,n)},function(n){return ys(e,t,n)}):vs(e,t,n)}function vs(e,t,n){t.status=`fulfilled`,t.value=n,bs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,gs(e,n)))}function ys(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,bs(t),t=t.next;while(t!==r)}e.action=null}function bs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xs(e,t){return t}function Ss(e,t){if(Y){var n=Yu.formState;if(n!==null){a:{var r=X;if(Y){if(Ji){b:{for(var i=Ji,a=Xi;i.nodeType!==8;)if(!a||(i=um(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ji=um(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Zo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xs,lastRenderedState:t},n.queue=r,n=ec.bind(null,X,r),r.dispatch=n,r=ps(!1),a=nc.bind(null,X,!1,r.queue),r=Zo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=hs.bind(null,X,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Cs(e){return ws(Qo(),No,e)}function ws(e,t,n){if(t=as(e,t,xs)[0],e=is(rs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=es(t)}catch(e){throw e===za?Va:e}else r=t;t=Qo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(X.flags|=2048,Ds(9,{destroy:void 0},Ts.bind(null,i,n),null)),[r,a,e]}function Ts(e,t){e.action=t}function Es(e){var t=Qo(),n=No;if(n!==null)return ws(t,n,e);Qo(),t=t.memoizedState,n=Qo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ds(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=X.updateQueue,t===null&&(t=$o(),X.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 Os(){return Qo().memoizedState}function ks(e,t,n,r){var i=Zo();X.flags|=e,i.memoizedState=Ds(1|t,{destroy:void 0},n,r===void 0?null:r)}function As(e,t,n,r){var i=Qo();r=r===void 0?null:r;var a=i.memoizedState.inst;No!==null&&r!==null&&Uo(r,No.memoizedState.deps)?i.memoizedState=Ds(t,a,n,r):(X.flags|=e,i.memoizedState=Ds(1|t,a,n,r))}function js(e,t){ks(8390656,8,e,t)}function Ms(e,t){As(2048,8,e,t)}function Ns(e){X.flags|=4;var t=X.updateQueue;if(t===null)t=$o(),X.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ps(e){var t=Qo().memoizedState;return Ns({ref:t,nextImpl:e}),function(){if(Ju&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Fs(e,t){return As(4,2,e,t)}function Is(e,t){return As(4,4,e,t)}function Ls(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 Rs(e,t,n){n=n==null?null:n.concat([e]),As(4,4,Ls.bind(null,t,e),n)}function zs(){}function Bs(e,t){var n=Qo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Uo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Vs(e,t){var n=Qo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Uo(t,r[1]))return r[0];if(r=e(),Lo){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r}function Hs(e,t,n){return n===void 0||Mo&1073741824&&!(Zu&261930)?e.memoizedState=t:(e.memoizedState=n,e=jd(),X.lanes|=e,ad|=e,n)}function Us(e,t,n,r){return Nr(n,t)?n:go.current===null?!(Mo&106)||Mo&1073741824&&!(Zu&261930)?(Tc=!0,e.memoizedState=n):(e=jd(),X.lanes|=e,ad|=e,t):(e=Hs(e,n,r),Nr(e,t)||(Tc=!0),e)}function Ws(e,t,n,r,i){var a=B.p;B.p=a!==0&&8>a?a:8;var o=z.T,s={};s.types=o===null?null:o.types,z.T=s,nc(e,!1,t,n);try{var c=i(),l=z.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?tc(e,t,Na(c,r),Ad(e)):tc(e,t,r,Ad(e))}catch(n){tc(e,t,{then:function(){},status:`rejected`,reason:n},Ad())}finally{B.p=a,o!==null&&s.types!==null&&(o.types=s.types),z.T=o}}function Gs(){}function Ks(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=qs(e).queue;Ws(e,a,t,V,n===null?Gs:function(){return Js(e),n(r)})}function qs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:V},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Js(e){var t=qs(e);t.next===null&&(t=e.alternate.memoizedState),tc(e,t.next.queue,{},Ad())}function Ys(){return ha(ch)}function Xs(){return Qo().memoizedState}function Zs(){return Qo().memoizedState}function Qs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ad();e=oo(n);var r=so(t,e,n);r!==null&&(Nd(r,t,n),co(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function $s(e,t,n){var r=Ad();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},rc(e)?ic(t,n):(n=gi(e,t,n,r),n!==null&&(Nd(n,e,r),ac(n,t,r)))}function ec(e,t,n){tc(e,t,n,Ad())}function tc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(rc(e))ic(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,Nr(s,o))return hi(e,t,i,0),Yu===null&&mi(),!1}catch{}if(n=gi(e,t,i,r),n!==null)return Nd(n,e,r),ac(n,t,r),!0}return!1}function nc(e,t,n,r){if(r={lane:2,revertLane:Nf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},rc(e)){if(t)throw Error(i(479))}else t=gi(e,n,r,2),t!==null&&Nd(t,e,2)}function rc(e){var t=e.alternate;return e===X||t!==null&&t===X}function ic(e,t){Io=Fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ac(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}var oc={readContext:ha,use:ts,useCallback:Ho,useContext:Ho,useEffect:Ho,useImperativeHandle:Ho,useLayoutEffect:Ho,useInsertionEffect:Ho,useMemo:Ho,useReducer:Ho,useRef:Ho,useState:Ho,useDebugValue:Ho,useDeferredValue:Ho,useTransition:Ho,useSyncExternalStore:Ho,useId:Ho,useHostTransitionStatus:Ho,useFormState:Ho,useActionState:Ho,useOptimistic:Ho,useMemoCache:Ho,useCacheRefresh:Ho,useEffectEvent:Ho},sc={readContext:ha,use:ts,useCallback:function(e,t){return Zo().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:js,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ks(4194308,4,Ls.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ks(4194308,4,e,t)},useInsertionEffect:function(e,t){ks(4,2,e,t)},useMemo:function(e,t){var n=Zo();t=t===void 0?null:t;var r=e();if(Lo){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Zo();if(n!==void 0){var i=n(t);if(Lo){Ge(!0);try{n(t)}finally{Ge(!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=$s.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=Zo();return e={current:e},t.memoizedState=e},useState:function(e){e=ps(e);var t=e.queue,n=ec.bind(null,X,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:zs,useDeferredValue:function(e,t){return Hs(Zo(),e,t)},useTransition:function(){var e=ps(!1);return e=Ws.bind(null,X,e.queue,!0,!1),Zo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=X,a=Zo();if(Y){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Yu===null)throw Error(i(349));Zu&127||cs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,js(us.bind(null,r,o,e),[e]),r.flags|=2048,Ds(9,{destroy:void 0},ls.bind(null,r,o,n,t),null),n},useId:function(){var e=Zo(),t=Yu.identifierPrefix;if(Y){var n=Vi,r=Bi;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ro++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Vo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ys,useFormState:Ss,useActionState:Ss,useOptimistic:function(e){var t=Zo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=nc.bind(null,X,!0,n),n.dispatch=t,[e,t]},useMemoCache:ns,useCacheRefresh:function(){return Zo().memoizedState=Qs.bind(null,X)},useEffectEvent:function(e){var t=Zo(),n={impl:e};return t.memoizedState=n,function(){if(Ju&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},cc={readContext:ha,use:ts,useCallback:Bs,useContext:ha,useEffect:Ms,useImperativeHandle:Rs,useInsertionEffect:Fs,useLayoutEffect:Is,useMemo:Vs,useReducer:is,useRef:Os,useState:function(){return is(rs)},useDebugValue:zs,useDeferredValue:function(e,t){return Us(Qo(),No.memoizedState,e,t)},useTransition:function(){var e=is(rs)[0],t=Qo().memoizedState;return[typeof e==`boolean`?e:es(e),t]},useSyncExternalStore:ss,useId:Xs,useHostTransitionStatus:Ys,useFormState:Cs,useActionState:Cs,useOptimistic:function(e,t){return ms(Qo(),No,e,t)},useMemoCache:ns,useCacheRefresh:Zs,useEffectEvent:Ps},lc={readContext:ha,use:ts,useCallback:Bs,useContext:ha,useEffect:Ms,useImperativeHandle:Rs,useInsertionEffect:Fs,useLayoutEffect:Is,useMemo:Vs,useReducer:os,useRef:Os,useState:function(){return os(rs)},useDebugValue:zs,useDeferredValue:function(e,t){var n=Qo();return No===null?Hs(n,e,t):Us(n,No.memoizedState,e,t)},useTransition:function(){var e=os(rs)[0],t=Qo().memoizedState;return[typeof e==`boolean`?e:es(e),t]},useSyncExternalStore:ss,useId:Xs,useHostTransitionStatus:Ys,useFormState:Es,useActionState:Es,useOptimistic:function(e,t){var n=Qo();return No===null?(n.baseState=e,[e,n.queue.dispatch]):ms(n,No,e,t)},useMemoCache:ns,useCacheRefresh:Zs,useEffectEvent:Ps};function uc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=oo(r);i.payload=t,n!=null&&(i.callback=n),t=so(e,i,r),t!==null&&(Nd(t,e,r),co(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=oo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=so(e,i,r),t!==null&&(Nd(t,e,r),co(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ad(),r=oo(n);r.tag=2,t!=null&&(r.callback=t),t=so(e,r,n),t!==null&&(Nd(t,e,n),co(t,e,n))}};function fc(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?!Pr(n,r)||!Pr(i,a):!0}function pc(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&&dc.enqueueReplaceState(t,t.state,null)}function mc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function hc(e){ui(e)}function gc(e){console.error(e)}function _c(e){ui(e)}function vc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function yc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function bc(e,t,n){return n=oo(n),n.tag=3,n.payload={element:null},n.callback=function(){vc(e,t)},n}function xc(e){return e=oo(e),e.tag=3,e}function Sc(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(){yc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){yc(t,n,r),typeof i!=`function`&&(_d===null?_d=new Set([this]):_d.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Cc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,a,!0),n=xo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return So===null?Gd():n.alternate===null&&id===0&&(id=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ha?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),pf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ha?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),pf(e,r,a)),!1}throw Error(i(435,n.tag))}return pf(e,r,a),Gd(),!1}if(Y)return t=xo.current,t===null?(r!==Zi&&(t=Error(i(423),{cause:r}),ia(Mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Mi(r,n),a=bc(e.stateNode,r,a),lo(e,a),id!==4&&(id=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Zi&&(e=Error(i(422),{cause:r}),ia(Mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Mi(o,n),ud===null?ud=[o]:ud.push(o),id!==4&&(id=2),t===null)return!0;r=Mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=bc(n.stateNode,r,e),lo(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`&&(_d===null||!_d.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=xc(a),Sc(a,e,n,r),lo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var wc=Error(i(461)),Tc=!1;function Ec(e,t,n,r){t.child=e===null?no(t,null,n,r):to(t,e.child,n,r)}function Dc(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 ma(t),r=Wo(e,t,n,o,a,i),s=Jo(),e!==null&&!Tc?(Yo(e,t,i),tl(e,t,i)):(Y&&s&&Wi(t),t.flags|=1,Ec(e,t,r,i),t.child)}function Oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,kc(e,t,a,r,i)):(e=Ei(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!nl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Pr:n,n(o,r)&&e.ref===t.ref)return tl(e,t,i)}return t.flags|=1,e=wi(a,r),e.ref=t.ref,e.return=t,t.child=e}function kc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Pr(a,r)&&e.ref===t.ref){if(Tc=!1,t.pendingProps=r=a,nl(e,i))e.flags&131072&&(Tc=!0);else return t.lanes=e.lanes,tl(e,t,i)}}return Lc(e,t,n,r,i)}function Ac(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&&La(t,a===null?null:a.cachePool),a===null?yo():vo(t,a),To(t);else return r=t.lanes=536870912,Mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&La(t,null),yo(),Eo()):(La(t,a.cachePool),vo(t,a),Eo(),t.memoizedState=null);return Ec(e,t,i,n),t.child}function jc(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=Ia();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&La(t,null),yo(),To(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function Nc(e,t){return t=Kc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pc(e,t,n){return to(t,e.child,null,n),e=Nc(t,t.pendingProps),e.flags|=2,Do(t),t.memoizedState=null,e}function Fc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Y){if(r.mode===`hidden`)return e=Nc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},jc(null,e);if(wo(t),(e=Ji)?(e=om(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi===null?null:{id:Bi,overflow:Vi},retryLane:536870912,hydrationErrors:null},n=ki(e),n.return=t,t.child=n,qi=t,Ji=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return Nc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(wo(t),a){if(t.flags&256)t.flags&=-257,t=Pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Tc||fa(e,t,n,!1),a=(n&e.childLanes)!==0,Tc||a){if(go.current===null){if(r=Yu,r!==null&&(s=ut(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,_i(e,s),Nd(r,e,s),wc;Gd()}t=Pc(e,t,n)}else e=o.treeContext,Ji=um(s.nextSibling),qi=t,Y=!0,Yi=null,Xi=!1,e!==null&&Ki(t,e),t=Nc(t,r),t.flags|=134221824;return t}return e=wi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ic(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 Lc(e,t,n,r,i){return ma(t),n=Wo(e,t,n,r,void 0,i),r=Jo(),e!==null&&!Tc?(Yo(e,t,i),tl(e,t,i)):(Y&&r&&Wi(t),t.flags|=1,Ec(e,t,n,i),t.child)}function Rc(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=Ko(t,r,n,i),Go(e),r=Jo(),e!==null&&!Tc?(Yo(e,t,a),tl(e,t,a)):(Y&&r&&Wi(t),t.flags|=1,Ec(e,t,n,a),t.child)}function zc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=bi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=dc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},io(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):bi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(uc(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&&dc.enqueueReplaceState(a,a.state,null),po(t,r,a,i),fo(),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=mc(n,s);a.props=c;var l=a.context,u=n.contextType;o=bi,typeof u==`object`&&u&&(o=ha(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)&&pc(t,a,r,o),ro=!1;var f=t.memoizedState;a.state=f,po(t,r,a,i),fo(),l=t.memoizedState,s||f!==l||ro?(typeof d==`function`&&(uc(t,n,d,r),l=t.memoizedState),(c=ro||fc(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,ao(e,t),o=t.memoizedProps,u=mc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=bi,typeof l==`object`&&l&&(c=ha(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)&&pc(t,a,r,c),ro=!1,f=t.memoizedState,a.state=f,po(t,r,a,i),fo();var p=t.memoizedState;o!==d||f!==p||ro||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(uc(t,n,s,r),p=t.memoizedState),(u=ro||fc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(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,Ic(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=to(t,e.child,null,i),t.child=to(t,null,n,i)):Ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=tl(e,t,i),e}function Bc(e,t,n,r){return na(),t.flags|=256,Ec(e,t,n,r),t.child}var Vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hc(e){return{baseLanes:e,cachePool:Ra()}}function Uc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=cd),e}function Wc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Oo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(Y){if(i?Co(t):Eo(),(e=Ji)?(e=om(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi===null?null:{id:Bi,overflow:Vi},retryLane:536870912,hydrationErrors:null},n=ki(e),n.return=t,t.child=n,qi=t,Ji=null)):e=null,e===null)throw Qi(t);return t.lanes=cm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Eo(),i=t.mode,a=Kc({mode:`hidden`,children:a},i),r=Di(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Hc(n),r.childLanes=Uc(e,o,n),t.memoizedState=Vc,jc(null,r)):(Co(t),Gc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Jc(e,t,a,o,r,c,s,n)}return i?(Eo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=wi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Di(i,a,n,null),i.flags|=2):i=wi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,jc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Hc(n):(a=i.cachePool,a===null?a=Ra():(s=xa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Uc(e,o,n),t.memoizedState=Vc,jc(e.child,r)):(Co(t),n=e.child,e=n.sibling,n=wi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Gc(e,t){return t=Kc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Kc(e,t){return e=Si(22,e,null,t),e.lanes=0,e}function qc(e,t,n){return to(t,e.child,null,n),e=Gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Co(t),t.flags&=-257,qc(e,t,c)):t.memoizedState===null?(Eo(),o=a.fallback,s=t.mode,a=Kc({mode:`visible`,children:a.children},s),o=Di(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,to(t,e.child,null,c),a=t.child,a.memoizedState=Hc(c),a.childLanes=Uc(e,r,c),t.memoizedState=Vc,jc(null,a)):(Eo(),t.child=e.child,t.flags|=128,null);if(Co(t),cm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ia({value:a,source:null,stack:null})),qc(e,t,c)}if(Tc||fa(e,t,c,!1),r=(c&e.childLanes)!==0,Tc||r){if(go.current!==null)return qc(e,t,c);if(r=Yu,r!==null&&(a=ut(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,_i(e,a),Nd(r,e,a),wc;return sm(o)||Gd(),qc(e,t,c)}return sm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,Ji=um(o.nextSibling),qi=t,Y=!0,Yi=null,Xi=!1,e!==null&&Ki(t,e),t=Gc(t,a.children),t.flags|=134221824,t)}function Yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Xc(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&jo(n)===null&&(t=e),e=e.sibling}return t}function Zc(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 Qc(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function $c(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Oo.current;if(t.flags&128)return ko(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,ko(t,o),i===`backwards`&&e!==null?(Qc(e),Ec(e,t,r,n),Qc(e)):Ec(e,t,r,n),r=Y?Ii:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yc(e,n,t);else if(e.tag===19)Yc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=Xc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,Qc(t)),Zc(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&jo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Zc(t,!0,n,null,a,r);break;case`together`:Zc(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Xc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Zc(t,!1,i,n,a,r)}return t.child}function el(e,t,n){var r=t.pendingProps;return ca(t,t.type,r.value),Ec(e,t,r.children,n),t.child}function tl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ad|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(fa(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=wi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&pa(e)))}function rl(e,t,n){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:be(t);break;case 4:ve(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,wo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Co(t),t.flags|=128,null;r=fa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Wc(e,t,n):(Co(t),e=tl(e,t,n),e===null?null:e.sibling)}Co(t);break;case 19:if(t.flags&128)return $c(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return $c(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ko(t,Oo.current),r)break;return null;case 22:return t.lanes=0,Ac(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return tl(e,t,n)}function il(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Tc=!0;else{if(!nl(e,n)&&!(t.flags&128))return Tc=!1,rl(e,t,n);Tc=!!(e.flags&131072)}}else Tc=!1,Y&&t.flags&1048576&&Ui(t,Ii,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ga(t.elementType),t.type=e,typeof e==`function`)Ci(e)?(r=mc(e,r),t.tag=1,t=zc(null,t,e,r,n)):(t.tag=0,t=Lc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ee){t.tag=11,t=Dc(null,t,e,r,n);break a}if(a===I){t.tag=14,t=Oc(null,t,e,r,n);break a}if(a===N){t.tag=10,t.type=e,t=el(null,t,n);break a}}throw t=ce(e)||e,Error(i(306,t,``))}}return t;case 0:return Lc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=mc(r,t.pendingProps),zc(e,t,r,a,n);case 3:a:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ao(e,t),po(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),fo(),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=Bc(e,t,r,n);break a}if(r!==a){a=Mi(Error(i(424)),t),ia(a),t=Bc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ji=um(e.firstChild),qi=t,Y=!0,Yi=null,Xi=!0,n=no(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(na(),r===a){t=tl(e,t,n);break a}Ec(e,t,r,n)}t=t.child}return t;case 26:return Ic(e,t),e===null?(n=Pm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Y||(t.stateNode=pp(t.type,t.pendingProps,ge.current,t)):t.memoizedState=Pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return be(t),e===null&&Y&&(r=t.stateNode=gm(t.type,t.pendingProps,ge.current),qi=t,Xi=!0,a=Ji,Cp(t.type)?(dm=a,Ji=um(r.firstChild)):Ji=a),Ec(e,t,t.pendingProps.children,n),Ic(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Y&&((a=r=Ji)&&(r=im(r,t.type,t.pendingProps,Xi),r===null?a=!1:(t.stateNode=r,qi=t,Ji=um(r.firstChild),Xi=!1,a=!0)),a||Qi(t)),be(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,mp(a,o)?r=null:s!==null&&mp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Wo(e,t,qo,null,null,n),ch._currentValue=a),Ic(e,t),Ec(e,t,r,n),t.child;case 6:return e===null&&Y&&((e=n=Ji)&&(n=am(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,qi=t,Ji=null,e=!0)),e||Qi(t)),null;case 13:return Wc(e,t,n);case 4:return ve(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=to(t,null,r,n):Ec(e,t,r,n),t.child;case 11:return Dc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Ic(e,t),Ec(e,t,r,n),t.child;case 8:return Ec(e,t,t.pendingProps.children,n),t.child;case 12:return Ec(e,t,t.pendingProps.children,n),t.child;case 10:return el(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ma(t),a=ha(a),r=r(a),t.flags|=1,Ec(e,t,r,n),t.child;case 14:return Oc(e,t,t.type,t.pendingProps,n);case 15:return kc(e,t,t.type,t.pendingProps,n);case 19:return $c(e,t,n);case 31:return Fc(e,t,n);case 22:return Ac(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(a=Ia(),a===null&&(a=Yu,o=Sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},io(t),ca(t,xa,a)):((e.lanes&n)!==0&&(ao(e,t),po(t,null,null,n),fo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ca(t,xa,r),r!==a.cache&&da(t,[xa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ca(t,xa,r))),Ec(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:Y&&Wi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Ic(e,t),Ec(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function al(e){e.flags|=4}function ol(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Ym(t,r):Ym(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Hd())e.flags|=8192;else throw Ka=Ha,Ba}}else e.flags&=-16777217}function sl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Xm(t)){if(Hd())e.flags|=8192;else throw Ka=Ha,Ba}}function cl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:it(),e.lanes|=t,ld|=t)}function ll(e,t){if(!Y)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function ul(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function dl(e,t,n){var r=t.pendingProps;switch(Gi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ul(t),null;case 1:return ul(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?al(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),ul(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(al(t),o===null?(ul(t),ol(t,a,null,r,n)):(ul(t),sl(t,o))):o?o===e.memoizedState?(ul(t),t.flags&=-16777217):(al(t),ul(t),sl(t,o)):(e=e.memoizedProps,e!==r&&al(t),ul(t),ol(t,a,e,r,n)),null;case 27:if(xe(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&al(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ul(t),t.subtreeFlags&=-33554433,null}e=me.current,ta(t)?$i(t,e):(e=gm(a,r,n),t.stateNode=e,al(t))}return ul(t),t.subtreeFlags&=-33554433,null;case 5:if(xe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&al(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ul(t),t.subtreeFlags&=-33554433,null}if(o=me.current,ta(t))$i(t,o);else{var s=up(ge.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[gt]=t,o[_t]=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(rp(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&&al(t)}}return ul(t),t.subtreeFlags&=-33554433,ol(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&al(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=qi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[gt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||Qi(t,!0)}else e=up(e).createTextNode(r),e[gt]=t,t.stateNode=e}return ul(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(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[gt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ul(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Do(t),t):(Do(t),null);if(t.flags&128)throw Error(i(558))}return ul(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(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[gt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ul(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Do(t),t):(Do(t),null)}return Do(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),cl(t,t.updateQueue),ul(t),null);case 4:return ye(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,ul(t),null;case 10:return la(t.type),ul(t),null;case 19:if(Ao(t),r=t.memoizedState,r===null)return ul(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ll(r,!1);else{if(id!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=jo(e),o!==null){for(t.flags|=128,ll(r,!1),e=o.updateQueue,t.updateQueue=e,cl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ti(n,e),n=n.sibling;return ko(t,Oo.current&1|2),Y&&Hi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Pe()>hd&&(t.flags|=128,a=!0,ll(r,!1),t.lanes=4194304)}}else{if(!a){if(e=jo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,cl(t,e),ll(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!Y)return ul(t),null}else 2*Pe()-r.renderingStartTime>hd&&n!==536870912&&(t.flags|=128,a=!0,ll(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Pe(),e.sibling=null,o=Oo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||Y?ko(t,o):(n=o,H(xo,t),H(Oo,n),So===null&&(So=t)),Y&&Hi(t,r.treeForkCount),e}return ul(t),null;case 22:case 23:return Do(t),bo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(ul(t),t.subtreeFlags&6&&(t.flags|=8192)):ul(t),n=t.updateQueue,n!==null&&cl(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&&pe(Fa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),ul(t),null;case 25:return null;case 30:return t.flags|=33554432,ul(t),null}throw Error(i(156,t.tag))}function fl(e,t){switch(Gi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),ye(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xe(t),null;case 31:if(t.memoizedState!==null){if(Do(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Do(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ao(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ye(),null;case 10:return la(t.type),null;case 22:case 23:return Do(t),bo(),e!==null&&pe(Fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function pl(e,t){switch(Gi(t),t.tag){case 3:la(xa),ye();break;case 26:case 27:case 5:xe(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&Do(t);break;case 13:Do(t);break;case 19:Ao(t);break;case 10:la(t.type);break;case 22:case 23:Do(t),bo(),e!==null&&pe(Fa);break;case 24:la(xa)}}function ml(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){ff(t,t.return,e)}}function hl(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){ff(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ff(t,t.return,e)}}function gl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ho(t,n)}catch(t){ff(e,e.return,t)}}}function _l(e,t,n){n.props=mc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ff(e,t,n)}}function vl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=si(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Fp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Ip(e);f(e.child,!1,$p,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ff(e,t,n)}}function yl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ff(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){ff(e,t,n)}else n.current=null}}function bl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)tm(e.stateNode,t[n])}function xl(e){for(var t=e.return;t!==null&&(wl(t)&&tm(e.stateNode,t.stateNode),!Cl(t));)t=t.return}function Sl(e){for(var t=e.return;t!==null&&(wl(t)&&nm(e.stateNode,t.stateNode),!Cl(t));)t=t.return}function Cl(e){return e.tag===5||e.tag===3||e.tag===27}function wl(e){return e&&e.tag===7&&e.stateNode!==null}function Tl(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){ff(e,e.return,t)}}function El(e,t,n){try{var r=e.stateNode;ap(r,e.type,n,t),r[_t]=t}catch(t){ff(e,e.return,t)}}function Dl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cp(e.type)||e.tag===4}function Ol(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Dl(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&&Cp(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 kl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pn)),bl(e,r),Bt=!0;else if(i!==4&&(i===27&&(bl(e,r),r=null,Cp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(kl(e,t,n,r),e=e.sibling;e!==null;)kl(e,t,n,r),e=e.sibling}function Al(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),bl(e,r),Bt=!0;else if(i!==4&&(i===27&&(bl(e,r),r=null,Cp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Al(e,t,n,r),e=e.sibling;e!==null;)Al(e,t,n,r),e=e.sibling}function jl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);rp(t,r,n),t[gt]=e,t[_t]=n}catch(t){ff(e,e.return,t)}}var Ml=!1,Nl=null;function Pl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ml=!0)}var Fl=null;function Il(){var e=Fl;return Fl=null,e}var Ll=0;function Rl(e,t,n,r,i){return Ll=0,zl(e.child,t,n,r,i)}function zl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=kp(o);r.push(s),s.view&&(a=!0)}else a||kp(o).view&&(a=!0);Ml=!0,Ep(o,Ll===0?t:t+`_`+Ll,n),Ll++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||zl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Bl(e,t){for(;e!==null;)e.tag===5?Dp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Bl(e.child,t)),e=e.sibling}function Vl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Vl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=li(t.default,t.share),t!==`none`&&(Rl(e,n,t,null,!1)||Bl(e.child,!1))}e=e.sibling}}function Hl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=si(r,n),a=li(r.default,n.paired?r.share:r.enter);a===`none`?Vl(e):Rl(e,i,a,null,!1)?(Vl(e),n.paired||t||Md(e,r.onEnter)):Bl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Hl(e,t),e=e.sibling;else Vl(e)}function Ul(e){if(Nl!==null&&Nl.size!==0){var t=Nl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=li(n.default,n.share);if(a!==`none`&&(Rl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Md(e,n.onShare)):Bl(e.child,!1)),t.delete(r),t.size===0)break}}}Ul(e)}e=e.sibling}}}function Wl(e){if(e.tag===30){var t=e.memoizedProps,n=si(t,e.stateNode),r=Nl===null?void 0:Nl.get(n),i=li(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Rl(e,n,i,null,!1)?r===void 0?Md(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Nl.delete(n),Md(e,t.onShare)):Bl(e.child,!1)),Nl!==null&&Ul(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Wl(e),e=e.sibling;else Nl!==null&&Ul(e)}function Gl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=si(t,e.stateNode);t=li(t.default,t.update),e.flags&=-5,t!==`none`&&Rl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Gl(e);e=e.sibling}}function Kl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Bl(e.child,!1))}Kl(e)}e=e.sibling}}function ql(e){if(e.tag===30)e.stateNode.paired=null,Bl(e.child,!1),Kl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ql(e),e=e.sibling;else Kl(e)}function Jl(e){for(e=e.child;e!==null;)e.tag===30?Bl(e.child,!1):e.subtreeFlags&33554432&&Jl(e),e=e.sibling}function Yl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Ll<a.length){var l=a[Ll],u=kp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Ep(c,Ll===0?n:n+`_`+Ll,i),s&&e.flags&4||(Fl===null&&(Fl=[]),Fl.push(c,Ll===0?r:r+`_`+Ll,t.memoizedProps)),Ll++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Yl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Xl(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=si(n,r),a=li(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Ap)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Ll=0,i=Yl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Md(e,n.onUpdate))}else e.subtreeFlags&33554432&&Xl(e,t);e=e.sibling}}var Zl=!1,Ql=!1,$l=!1,eu=!1,tu=typeof WeakSet==`function`?WeakSet:Set,nu=null,ru=!1,iu=!1,au=!1,ou=!1;function su(e,t,n){if(e=e.containerInfo,cp=_h,e=zr(e),Br(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(lp={focusedElem:e,selectionRange:r},_h=!1,n=(n&335544064)===n,nu=t,t=n?9270:1024;nu!==null;){if(e=nu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Wl(r[a]);if(e.alternate===null&&e.flags&2)n&&Pl(e),cu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Wl(r),cu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Pl(e),cu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,nu=r):(n&&Gl(e),cu(n))}}Nl=null}function cu(e){for(;nu!==null;){var t=nu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=mc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){ff(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)rm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:rm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=si(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=li(a.default,a.update),a!==`none`&&Rl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,nu=r;break}nu=t.return}}function lu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ku(e,n),r&4&&ml(5,n);break;case 1:if(ku(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ff(n,n.return,e)}else{var i=mc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ff(n,n.return,e)}}}r&64&&gl(n),r&512&&vl(n,n.return);break;case 3:if(ku(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{ho(e,t)}catch(e){ff(n,n.return,e)}}break;case 27:t===null&&r&4&&jl(n);case 26:case 5:ku(e,n),t===null&&r&4&&Tl(n),r&512&&vl(n,n.return);break;case 12:ku(e,n);break;case 31:ku(e,n),r&4&&vu(e,n);break;case 13:ku(e,n),r&4&&yu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=gf.bind(null,n),lm(e,n))));break;case 22:if(r=n.memoizedState!==null||Zl,!r){var a=t!==null&&t.memoizedState!==null||Ql;t=Zl,i=Ql,Zl=r,(Ql=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),ju(e,n,r)):ku(e,n),Zl=t,Ql=i}break;case 30:ku(e,n),r&512&&vl(n,n.return);break;case 7:r&512&&vl(n,n.return);default:ku(e,n)}}function uu(e,t){for(e=e.child;e!==null;)du(e,t),e=e.sibling}function du(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){ff(e,e.return,t)}fu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Bt=!0}catch(t){ff(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Tp(s,!0):Tp(e.stateNode,!1)}catch(t){ff(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&uu(e,t);break;default:uu(e,t)}}function fu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:du(n,r);break a;case 22:n.memoizedState===null&&fu(n,r);break a;default:fu(n,r)}}e=e.sibling}}function pu(e){var t=e.alternate;t!==null&&(e.alternate=null,pu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Et(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mu=null,hu=!1;function gu(e,t,n){for(n=n.child;n!==null;)_u(e,t,n),n=n.sibling}function _u(e,t,n){if(We&&typeof We.onCommitFiberUnmount==`function`)try{We.onCommitFiberUnmount(Ue,n)}catch{}switch(n.tag){case 26:Ql||yl(n,t),gu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Ql&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ql||yl(n,t),Sl(n);var r=mu,i=hu;Cp(n.type)&&(mu=n.stateNode,hu=!1),gu(e,t,n),_m(n.stateNode,n.type,n.memoizedProps),mu=r,hu=i;break;case 5:Ql||yl(n,t),Sl(n);case 6:if(n.tag===6&&Sl(n),r=mu,i=hu,mu=null,gu(e,t,n),mu=r,hu=i,mu!==null){if(hu)try{(mu.nodeType===9?mu.body:mu.nodeName===`HTML`?mu.ownerDocument.body:mu).removeChild(n.stateNode),Bt=!0}catch(e){ff(n,t,e)}else try{mu.removeChild(n.stateNode),Bt=!0}catch(e){ff(n,t,e)}}break;case 18:mu!==null&&(hu?(e=mu,wp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Uh(e)):wp(mu,n.stateNode));break;case 4:r=mu,i=hu,mu=n.stateNode.containerInfo,hu=!0,gu(e,t,n),mu=r,hu=i;break;case 0:case 11:case 14:case 15:hl(2,n,t),Ql||hl(4,n,t),gu(e,t,n);break;case 1:Ql||(yl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&_l(n,t,r)),gu(e,t,n);break;case 21:gu(e,t,n);break;case 22:Ql=(r=Ql)||n.memoizedState!==null,gu(e,t,n),Ql=r;break;case 30:yl(n,t),gu(e,t,n);break;case 7:Ql||yl(n,t),gu(e,t,n);break;default:gu(e,t,n)}}function vu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Uh(e)}catch(e){ff(t,t.return,e)}}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Uh(e)}catch(e){ff(t,t.return,e)}}function bu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tu),t;default:throw Error(i(435,e.tag))}}function xu(e,t){var n=bu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=_f.bind(null,e,t);t.then(r,r)}})}function Su(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Cp(l.type)){mu=l.stateNode,hu=!1;break a}break;case 5:mu=l.stateNode,hu=!1;break a;case 3:case 4:mu=l.stateNode.containerInfo,hu=!0;break a}l=l.return}if(mu===null)throw Error(i(160));_u(s,c,o),mu=null,hu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wu(t,e,n),t=t.sibling}var Cu=null;function wu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Su(t,e,n),Tu(e),a&4&&(hl(3,e,e.return),ml(3,e),hl(5,e,e.return));break;case 1:Su(t,e,n),Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),a&64&&Zl&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Cu,Su(t,e,n),Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(Zl)e.stateNode=pp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[wt]||r[gt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),rp(r,t,n),r[gt]=e,jt(r),t=r;break a;case`link`:if(o=Km(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),rp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Km(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),rp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[gt]=e,jt(r),t=r}e.stateNode=t}}else Zl||qm(o,e.type,e.stateNode)}else e.stateNode=Vm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&El(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||Ql||t.parentNode.removeChild(t)):a.count--,n===null?Zl||qm(o,e.type,e.stateNode):Vm(o,n,e.memoizedProps))}break;case 27:Su(t,e,n),Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),r!==null&&a&4&&El(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=$l,$l=!1,Su(t,e,n),$l=o,Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),e.flags&32){t=e.stateNode;try{an(t,``),Bt=!0}catch(t){ff(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,El(e,t,r===null?t:r.memoizedProps)),a&1024&&(eu=!0);break;case 6:if(Su(t,e,n),Tu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Bt=!0}catch(t){ff(e,e.return,t)}}break;case 3:if(Bt=!1,Gm=null,o=Cu,Cu=xm(t.containerInfo),Su(t,e,n),Cu=o,Tu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Uh(t.containerInfo)}catch(t){ff(e,e.return,t)}eu&&(eu=!1,Eu(e)),Bt=!1;break;case 4:a=$l,$l=Zl,r=Vt(),o=Cu,Cu=xm(e.stateNode.containerInfo),Su(t,e,n),Tu(e),Cu=o,Bt&&iu&&(au=!0),Bt=r,$l=a;break;case 12:Su(t,e,n),Tu(e);break;case 31:Su(t,e,n),Tu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 13:Su(t,e,n),Tu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(pd=Pe()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=Zl,l=Ql,u=$l;Zl=c||o,$l=u||o,Ql=l||s,Su(t,e,n),Ql=l,$l=u,Zl=c,Tu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||Zl||Ql||(t=s||Ql,n=Zl,r=Ql,Zl=o||Zl,Ql=t,Au(e,2),Zl=n,Ql=r),!o&&$l||uu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,xu(e,n))));break;case 19:Su(t,e,n),Tu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 30:a&512&&(Ql||r===null||yl(r,r.return)),a=Vt(),o=iu,s=(n&335544064)===n,c=e.memoizedProps,iu=s&&li(c.default,c.update)!==`none`,Su(t,e,n),Tu(e),s&&r!==null&&Bt&&(e.flags|=4),iu=o,Bt=a;break;case 21:break;case 7:a&512&&(Ql||r===null||yl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Su(t,e,n),Tu(e)}}function Tu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Dl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(wl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Cl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Al(e,Ol(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(an(l,``),n.flags&=-33),Al(e,Ol(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;kl(e,Ol(e),u,s);break;default:throw Error(i(161))}}catch(t){ff(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Eu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Eu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,_h=!0,t.reset(),_h=!1),e=e.sibling}}function Du(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ou(t,e),t=t.sibling;else Xl(t,!1)}function Ou(e,t){var n=e.alternate;if(n===null)Hl(e,!1);else switch(e.tag){case 3:if(ou=ru=!1,Il(),Du(t,e),!ru&&!au){if(e=Fl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Dp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),ou=!0}Fl=null;break;case 5:Du(t,e);break;case 4:r=ru,ru=!1,Du(t,e),ru&&(au=!0),ru=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Du(t,e):Hl(e,!1));break;case 30:r=ru,i=Il(),ru=!1,Du(t,e),ru&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=si(a,o),o=si(n.memoizedProps,o);var s=li(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Ll=0,t=Yl(e,n,t,o,s,a,!0),Ll!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Md(e,e.memoizedProps.onUpdate),Fl=i):i!==null&&(i.push.apply(i,Fl),Fl=i),ru=e.flags&32?!0:r;break;default:Du(t,e)}}function ku(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)lu(e,t.alternate,t),t=t.sibling}function Au(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:hl(4,n,n.return),Au(n,r);break;case 1:yl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&_l(n,n.return,i),Au(n,r);break;case 27:r&2&&_m(n.stateNode,n.type,n.memoizedProps);case 5:yl(n,n.return),n.tag!==5&&n.tag!==27||Sl(n),Au(n,r);break;case 6:Sl(n);break;case 26:yl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||Ql||i.parentNode.removeChild(i),Au(n,r);break;case 22:n.memoizedState===null&&Au(n,r);break;case 30:yl(n,n.return),Au(n,r);break;case 7:yl(n,n.return);default:Au(n,r)}e=e.sibling}}function ju(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:ju(i,a,n),ml(4,a);break;case 1:if(ju(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ff(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)mo(l[i],c)}catch(e){ff(r,r.return,e)}}s&&o&64&&gl(a),vl(a,a.return);break;case 27:n&2&&jl(a);case 5:a.tag!==5&&a.tag!==27||xl(a),ju(i,a,n),s&&r===null&&o&4&&Tl(a),vl(a,a.return);break;case 6:xl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||Zl||qm(xm(c.ownerDocument),a.type,c),ju(i,a,n),s&&r===null&&o&4&&Tl(a),vl(a,a.return);break;case 12:ju(i,a,n);break;case 31:ju(i,a,n),s&&o&4&&vu(i,a);break;case 13:ju(i,a,n),s&&o&4&&yu(i,a);break;case 22:a.memoizedState===null&&ju(i,a,n),vl(a,a.return);break;case 30:ju(i,a,n),vl(a,a.return);break;case 7:vl(a,a.return);default:ju(i,a,n)}t=t.sibling}}function Mu(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&&Ca(n))}function Nu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Pu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Fu(e,t,n,r),t=t.sibling;else i&&Jl(t)}function Fu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&ql(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Pu(e,t,n,r),a&2048&&ml(9,t);break;case 1:Pu(e,t,n,r);break;case 3:Pu(e,t,n,r),i&&ou&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ca(a)));break;case 12:if(a&2048){Pu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){ff(t,t.return,e)}}else Pu(e,t,n,r);break;case 31:Pu(e,t,n,r);break;case 13:Pu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&ql(t),o._visibility&2?Pu(e,t,n,r):(o._visibility|=2,Iu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&ql(s),o._visibility&2?Pu(e,t,n,r):Lu(e,t)),a&2048&&Mu(s,t);break;case 24:Pu(e,t,n,r),a&2048&&Nu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Bl(a.child,!0),Bl(t.child,!0))),Pu(e,t,n,r);break;default:Pu(e,t,n,r)}}function Iu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Iu(a,o,s,c,i),ml(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Iu(a,o,s,c,i)):u._visibility&2?Iu(a,o,s,c,i):Lu(a,o),i&&l&2048&&Mu(o.alternate,o);break;case 24:Iu(a,o,s,c,i),i&&l&2048&&Nu(o.alternate,o);break;default:Iu(a,o,s,c,i)}t=t.sibling}}function Lu(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:Lu(n,r),i&2048&&Mu(r.alternate,r);break;case 24:Lu(n,r),i&2048&&Nu(r.alternate,r);break;default:Lu(n,r)}t=t.sibling}}var Ru=8192;function zu(e,t,n){if(e.subtreeFlags&Ru)for(e=e.child;e!==null;)Bu(e,t,n),e=e.sibling}function Bu(e,t,n){switch(e.tag){case 26:zu(e,t,n),e.flags&Ru&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Qm(n,e)):$m(n,Cu,e.memoizedState,e.memoizedProps));break;case 5:zu(e,t,n),e.flags&Ru&&(e=e.stateNode,(t&335544128)===t&&Qm(n,e));break;case 3:case 4:var r=Cu;Cu=xm(e.stateNode.containerInfo),zu(e,t,n),Cu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ru,Ru=16777216,zu(e,t,n),Ru=r):zu(e,t,n));break;case 30:if((e.flags&Ru)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Nl===null&&(Nl=new Map),Nl.set(r,i)}zu(e,t,n);break;default:zu(e,t,n)}}function Vu(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 Hu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nu=r,Gu(r,e)}Vu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Uu(e),e=e.sibling}function Uu(e){switch(e.tag){case 0:case 11:case 15:Hu(e),e.flags&2048&&hl(9,e,e.return);break;case 3:Hu(e);break;case 12:Hu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wu(e)):Hu(e);break;default:Hu(e)}}function Wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nu=r,Gu(r,e)}Vu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:hl(8,t,t.return),Wu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Wu(t));break;default:Wu(t)}e=e.sibling}}function Gu(e,t){for(;nu!==null;){var n=nu;switch(n.tag){case 0:case 11:case 15:hl(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:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,nu=r;else a:for(n=e;nu!==null;){r=nu;var i=r.sibling,a=r.return;if(pu(r),r===n){nu=null;break a}if(i!==null){i.return=a,nu=i;break a}nu=a}}}var Ku={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},qu=typeof WeakMap==`function`?WeakMap:Map,Ju=0,Yu=null,Xu=null,Zu=0,Qu=0,$u=null,ed=!1,td=!1,nd=!1,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=null,dd=null,fd=!1,pd=0,md=0,hd=1/0,gd=null,_d=null,vd=0,yd=null,bd=null,xd=0,Sd=0,Cd=null,wd=null,Td=null,Ed=null,Dd=null,Od=0,kd=null;function Ad(){return Ju&2&&Zu!==0?Zu&-Zu:z.T===null?pt():Nf()}function jd(){if(cd===0){if(!(Zu&536870912)||Y){var e=Ze;Ze<<=1,!(Ze&3932160)&&(Ze=262144),cd=e}else cd=536870912}return e=xo.current,e!==null&&(e.flags|=32),cd}function Md(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Fp(si(e.memoizedProps,n))),Ed===null&&(Ed=[]),Ed.push(t.bind(null,r))}}function Nd(e,t,n){(e===Yu&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)&&(Bd(e,0),Ld(e,Zu,cd,!1)),ot(e,n),(!(Ju&2)||e!==Yu)&&(e===Yu&&(!(Ju&2)&&(od|=n),id===4&&Ld(e,Zu,cd,!1)),Tf(e))}function Pd(e,t,n){if(Ju&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||tt(e,t),a=r?Jd(e,t):Kd(e,t,!0),o=r;do{if(a===0){td&&!r&&Ld(e,t,0,!1);break}if(n=e.current.alternate,o&&!Id(n))a=Kd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ud;var l=c.current.memoizedState.isDehydrated;if(l&&(Bd(c,s).flags|=256),s=Kd(c,s,!1),s!==2&&s!==6){if(nd&&!l){c.errorRecoveryDisabledLanes|=o,od|=o,a=4;break a}o=dd,dd=a,o!==null&&(dd===null?dd=o:dd.push.apply(dd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Bd(e,0),Ld(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ld(r,t,cd,!ed);break a;case 2:dd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=pd+300-Pe(),10<a)){if(Ld(r,t,cd,!ed),et(r,0,!0)!==0)break a;xd=t,r.timeoutHandle=_p(Fd.bind(null,r,n,dd,gd,fd,t,cd,od,ld,ed,o,`Throttled`,-0,0),a);break a}Fd(r,n,dd,gd,fd,t,cd,od,ld,ed,o,null,-0,0)}break}}while(1);Tf(e)}function Fd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pn},Nl=null,Bu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=rh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?pd-Pe():(a&4194048)===a?md-Pe():0,m=th(d,m),m!==null)?(xd=a,e.cancelPendingCommit=m(tf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ld(e,a,o,!l)):tf(e,t,a,n,r,i,o,s,c,l,u,d)}function Id(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(!Nr(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 Ld(e,t,n,r){t=nt(e,t),t&=~sd,t&=~od,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ke(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ct(e,n,t)}function Rd(){return Ju&6?!0:(Ef(0,!1),!1)}function zd(){if(Xu!==null){if(Qu===0)var e=Xu.return;else e=Xu,sa=oa=null,Xo(e),Ya=null,Xa=0,e=Xu;for(;e!==null;)pl(e.alternate,e),e=e.return;Xu=null}}function Bd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,vp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xd=0,zd(),Yu=e,Xu=n=wi(e.current,null),Zu=t,Qu=0,$u=null,ed=!1,td=tt(e,t),nd=!1,ld=cd=sd=od=ad=id=0,dd=ud=null,fd=!1,rd=nt(e,t),mi(),n}function Vd(e,t){X=null,z.H=oc,t===za||t===Va?(t=qa(),Qu=3):t===Ba?(t=qa(),Qu=4):Qu=t===wc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$u=t,Xu===null&&(id=1,vc(e,Mi(t,e.current)))}function Hd(){var e=xo.current;return e===null?!0:(Zu&4194048)===Zu?So===null:(Zu&62914560)===Zu||Zu&536870912?e===So:!1}function Ud(){var e=z.H;return z.H=oc,e===null?oc:e}function Wd(){var e=z.A;return z.A=Ku,e}function Gd(){id=4,ed||(Zu&4194048)!==Zu&&xo.current!==null||(td=!0),!(ad&134217727)&&!(od&134217727)||Yu===null||Ld(Yu,Zu,cd,!1)}function Kd(e,t,n){var r=Ju;Ju|=2;var i=Ud(),a=Wd();(Yu!==e||Zu!==t)&&(gd=null,Bd(e,t)),t=!1;var o=id;a:do try{if(Qu!==0&&Xu!==null){var s=Xu,c=$u;switch(Qu){case 8:zd(),o=6;break a;case 3:case 2:case 9:case 6:xo.current===null&&(t=!0);var l=Qu;if(Qu=0,$u=null,Qd(e,s,c,l),n&&td){o=0;break a}break;default:l=Qu,Qu=0,$u=null,Qd(e,s,c,l)}}qd(),o=id;break}catch(t){Vd(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,Ju=r,z.H=i,z.A=a,Xu===null&&(Yu=null,Zu=0,mi()),o}function qd(){for(;Xu!==null;)Xd(Xu)}function Jd(e,t){var n=Ju;Ju|=2;var r=Ud(),a=Wd();Yu!==e||Zu!==t?(gd=null,hd=Pe()+500,Bd(e,t)):td=tt(e,t);a:do try{if(Qu!==0&&Xu!==null){t=Xu;var o=$u;b:switch(Qu){case 1:Qu=0,$u=null,Qd(e,t,o,1);break;case 2:case 9:if(Ua(o)){Qu=0,$u=null,Zd(t);break}t=function(){Qu!==2&&Qu!==9||Yu!==e||(Qu=7),Tf(e)},o.then(t,t);break a;case 3:Qu=7;break a;case 4:Qu=5;break a;case 7:Ua(o)?(Qu=0,$u=null,Zd(t)):(Qu=0,$u=null,Qd(e,t,o,7));break;case 5:var s=null;switch(Xu.tag){case 26:s=Xu.memoizedState;case 5:case 27:var c=Xu;if(s?Xm(s):c.stateNode.complete){Qu=0,$u=null;var l=c.sibling;if(l!==null)Xu=l;else{var u=c.return;u===null?Xu=null:(Xu=u,$d(u))}break b}}Qu=0,$u=null,Qd(e,t,o,5);break;case 6:Qu=0,$u=null,Qd(e,t,o,6);break;case 8:zd(),id=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Vd(e,t)}while(1);return sa=oa=null,z.H=r,z.A=a,Ju=n,Xu===null?(Yu=null,Zu=0,mi(),id):0}function Yd(){for(;Xu!==null&&!Me();)Xd(Xu)}function Xd(e){var t=il(e.alternate,e,rd);e.memoizedProps=e.pendingProps,t===null?$d(e):Xu=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Rc(n,t,t.pendingProps,t.type,void 0,Zu);break;case 11:t=Rc(n,t,t.pendingProps,t.type.render,t.ref,Zu);break;case 5:Xo(t);var r=t;r===qi&&(Y?(ea(r),r.tag===5&&r.stateNode!=null&&(Ji=r.stateNode)):(ea(r),Y=!0));default:pl(n,t),t=Xu=Ti(t,rd),t=il(n,t,rd)}e.memoizedProps=e.pendingProps,t===null?$d(e):Xu=t}function Qd(e,t,n,r){sa=oa=null,Xo(t),Ya=null,Xa=0;var i=t.return;try{if(Cc(e,i,t,n,Zu)){id=1,vc(e,Mi(n,e.current)),Xu=null;return}}catch(t){if(i!==null)throw Xu=i,t;id=1,vc(e,Mi(n,e.current)),Xu=null;return}t.flags&32768?(Y||r===1?e=!0:td||Zu&536870912?e=!1:(ed=e=!0,(r===2||r===9||r===3||r===6)&&(r=xo.current,r!==null&&r.tag===13&&(r.flags|=16384))),ef(t,e)):$d(t)}function $d(e){var t=e;do{if(t.flags&32768){ef(t,ed);return}e=t.return;var n=dl(t.alternate,t,rd);if(n!==null){Xu=n;return}if(t=t.sibling,t!==null){Xu=t;return}Xu=t=e}while(t!==null);id===0&&(id=5)}function ef(e,t){do{var n=fl(e.alternate,e);if(n!==null){n.flags&=32767,Xu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Xu=e;return}Xu=e=n}while(e!==null);id=6,Xu=null}function tf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do lf();while(vd!==0);if(Ju&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Yu&&(Xu=Yu=null,Zu=0),bd=t,yd=e,xd=n,Cd=a,wd=r,nf(e,t,n,s,c,l,f)}}function nf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Sd=s,s|=pi,st(e,n,s,r,i,a),Ed=null,(n&335544064)===n?(Dd=Ea(e),r=10262):(Dd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,vf(Re,function(){return uf(),null})):(e.callbackNode=null,e.callbackPriority=0),Ml=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=z.T,z.T=null,i=B.p,B.p=2,a=Ju,Ju|=4;try{su(e,t,n)}finally{Ju=a,B.p=i,z.T=r}}vd=1,Ml?Td=Np(o,e.containerInfo,Dd,af,of,Z,sf,uf,rf,null,null):(af(),of(),sf())}function rf(e){if(vd!==0){var t=yd.onRecoverableError;t(e,{componentStack:null})}}function Z(){vd===3&&(vd=0,Ou(bd,yd),vd=4)}function af(){if(vd===1){vd=0;var e=yd,t=bd,n=xd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=z.T,z.T=null;var i=B.p;B.p=2;var a=Ju;Ju|=4;try{iu=au=!1,wu(t,e,n),n=lp;var o=zr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Rr(s.ownerDocument.documentElement,s)){if(c!==null&&Br(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 _=Lr(s,h),v=Lr(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}}_h=!!cp,lp=cp=null}finally{Ju=a,B.p=i,z.T=r}}e.current=t,vd=2}}function of(){if(vd===2){vd=0;var e=yd,t=bd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=z.T,z.T=null;var r=B.p;B.p=2;var i=Ju;Ju|=4;try{lu(e,t.alternate,t)}finally{Ju=i,B.p=r,z.T=n}}vd=3}}function sf(){if(vd===4||vd===3){vd=0;var e=Td;Td=null,Ne();var t=yd,n=bd,r=xd,i=wd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?vd=5:(vd=0,bd=yd=null,cf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(_d=null),ft(r),n=n.stateNode,We&&typeof We.onCommitFiberRoot==`function`)try{We.onCommitFiberRoot(Ue,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=z.T,a=B.p,B.p=2,z.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{z.T=n,B.p=a}}if(i=Ed,o=Dd,Dd=null,i!==null&&(Ed=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);xd&3&&lf(),Tf(t),a=t.pendingLanes,r&261930&&a&42?t===kd?Od++:(Od=0,kd=t):(Od=0,kd=null),Ef(0,!1)}}function cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function lf(){return Td!==null&&(Td.skipTransition(),Td=null),af(),of(),sf(),uf()}function uf(){if(vd!==5)return!1;var e=yd,t=Sd;Sd=0;var n=ft(xd),r=z.T,a=B.p;try{B.p=32>n?32:n,z.T=null,n=Cd,Cd=null;var o=yd,s=xd;if(vd=0,bd=yd=null,xd=0,Ju&6)throw Error(i(331));var c=Ju;if(Ju|=4,Uu(o.current),Fu(o,o.current,s,n),Ju=c,Ef(0,!1),We&&typeof We.onPostCommitFiberRoot==`function`)try{We.onPostCommitFiberRoot(Ue,o)}catch{}return!0}finally{B.p=a,z.T=r,cf(e,t)}}function df(e,t,n){t=Mi(n,t),t=bc(e.stateNode,t,2),e=so(e,t,2),e!==null&&(ot(e,2),Tf(e))}function ff(e,t,n){if(e.tag===3)df(e,e,n);else for(;t!==null;){if(t.tag===3){df(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(_d===null||!_d.has(r))){e=Mi(n,e),n=xc(2),r=so(t,n,2),r!==null&&(Sc(n,r,t,e),ot(r,2),Tf(r));break}}t=t.return}}function pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(nd=!0,i.add(n),e=mf.bind(null,e,t,n),t.then(e,e))}function mf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Yu===e&&(Zu&n)===n&&(id===4||id===3&&(Zu&62914560)===Zu&&300>Pe()-pd?Ju&2?sd|=n:Bd(e,0):sd|=n,ld===Zu&&(ld=0)),Tf(e)}function hf(e,t){t===0&&(t=it()),e=_i(e,t),e!==null&&(ot(e,t),Tf(e))}function gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function _f(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),hf(e,n)}function vf(e,t){return Ae(e,t)}var yf=null,bf=null,xf=!1,Sf=!1,Cf=!1,wf=0;function Tf(e){e!==bf&&e.next===null&&(bf===null?yf=bf=e:bf=bf.next=e),Sf=!0,xf||(xf=!0,Mf())}function Ef(e,t){if(!Cf&&Sf){Cf=!0;do for(var n=!1,r=yf;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-Ke(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,jf(r,a))}else a=Zu,a=et(r,r===Yu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||tt(r,a)||(n=!0,jf(r,a))}r=r.next}while(n);Cf=!1}}function Df(){Of()}function Of(){Sf=xf=!1;var e=0;wf!==0&&gp()&&(e=wf);for(var t=Pe(),n=null,r=yf;r!==null;){var i=r.next,a=kf(r,t);a===0?(r.next=null,n===null?yf=i:n.next=i,i===null&&(bf=n)):(n=r,(e!==0||a&3)&&(Sf=!0)),r=i}vd!==0&&vd!==5||Ef(e,!1),wf!==0&&(wf=0)}function kf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ke(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=rt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Yu,n=Zu,n=et(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&je(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||tt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&je(r),ft(n)){case 2:case 8:n=Le;break;case 32:n=Re;break;case 268435456:n=Be;break;default:n=Re}return r=Af.bind(null,e),n=Ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&je(r),e.callbackPriority=2,e.callbackNode=null,2}function Af(e,t){if(vd!==0&&vd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(lf()&&e.callbackNode!==n)return null;var r=Zu;return r=et(e,e===Yu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Pd(e,r,t),kf(e,Pe()),e.callbackNode!=null&&e.callbackNode===n?Af.bind(null,e):null)}function jf(e,t){if(lf())return null;Pd(e,t,!0)}function Mf(){xp(function(){Ju&6?Ae(Ie,Df):Of()})}function Nf(){if(wf===0){var e=ka;e===0&&(e=Xe,Xe<<=1,!(Xe&261888)&&(Xe=256)),wf=e}return wf}function Pf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:fn(e)}function Ff(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Pf((i[_t]||null).action),o=r.submitter;o&&(t=(t=o[_t]||null)?Pf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(wf!==0){var e=new FormData(i,o);Ks(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Ks(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var If=0;If<ai.length;If++){var Lf=ai[If];J(Lf.toLowerCase(),`on`+(Lf[0].toUpperCase()+Lf.slice(1)))}J(q,`onAnimationEnd`),J(Qr,`onAnimationIteration`),J($r,`onAnimationStart`),J(`dblclick`,`onDoubleClick`),J(`focusin`,`onFocus`),J(`focusout`,`onBlur`),J(ei,`onTransitionRun`),J(ti,`onTransitionStart`),J(ni,`onTransitionCancel`),J(ri,`onTransitionEnd`),It(`onMouseEnter`,[`mouseout`,`mouseover`]),It(`onMouseLeave`,[`mouseout`,`mouseover`]),It(`onPointerEnter`,[`pointerout`,`pointerover`]),It(`onPointerLeave`,[`pointerout`,`pointerover`]),Ft(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ft(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ft(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ft(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Rf=`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(` `),zf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Rf));function Bf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ui(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){ui(e)}i.currentTarget=null,a=c}}}}function Vf(e,t){var n=t[yt];n===void 0&&(n=t[yt]=new Set);var r=e+`__bubble`;n.has(r)||(Gf(t,e,2,!1),n.add(r))}function Hf(e,t,n){var r=0;t&&(r|=4),Gf(n,e,r,t)}var Uf=`_reactListening`+Math.random().toString(36).slice(2);function Wf(e){if(!e[Uf]){e[Uf]=!0,Nt.forEach(function(t){t!==`selectionchange`&&(zf.has(t)||Hf(t,!1,e),Hf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uf]||(t[Uf]=!0,Hf(`selectionchange`,!1,t))}}function Gf(e,t,n,r){switch(wh(t)){case 2:var i=vh;break;case 8:i=yh;break;default:i=bh}n=i.bind(null,t,n,e),i=void 0,!Cn||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 Kf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Dt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}bn(function(){var r=a,i=hn(n),s=[];a:{var c=ii.get(e);if(c!==void 0){var l=Pn,u=e;switch(e){case`keypress`:if(kn(n)===0)break a;case`keydown`:case`keyup`:l=Zn;break;case`focusin`:u=`focus`,l=Hn;break;case`focusout`:u=`blur`,l=Hn;break;case`beforeblur`:case`afterblur`:l=Hn;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=Bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Vn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=er;break;case q:case Qr:case $r:l=Un;break;case ri:l=G;break;case`scroll`:case`scrollend`:l=In;break;case`wheel`:l=tr;break;case`copy`:case`cut`:case`paste`:l=Wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Qn;break;case`submit`:l=$n;break;case`toggle`:case`beforetoggle`:l=nr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=xn(m,p),g!=null&&d.push(qf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==mn&&(u=n.relatedTarget||n.fromElement)&&(Dt(u)||u[vt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Dt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Qn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:kt(c),h=l==null?u:kt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Dt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,Yf):null,c!==null&&Xf(s,u,c,d,!1),l!==null&&f!==null&&Xf(s,f,l,d,!0)))}a:{if(c=r?kt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=xr;else if(gr(c)){if(Sr)_=jr;else{_=kr;var v=Or}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&ln(r.elementType)&&(_=xr):_=Ar;if(_&&=_(e,r)){K(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?kt(r):window,e){case`focusin`:(gr(v)||v.contentEditable===`true`)&&(Hr=v,Ur=r,Wr=null);break;case`focusout`:Wr=Ur=Hr=null;break;case`mousedown`:Gr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Gr=!1,Kr(s,n,i);break;case`selectionchange`:if(Vr)break;case`keydown`:case`keyup`:Kr(s,n,i)}var y;if(ir)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else fr?ur(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(sr&&n.locale!==`ko`&&(fr||b!==`onCompositionStart`?b===`onCompositionEnd`&&fr&&(y=On()):(Tn=i,En=`value`in Tn?Tn.value:Tn.textContent,fr=!0)),v=Jf(r,b),0<v.length&&(b=new Gn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=dr(n),y!==null&&(b.data=y)))),(y=or?pr(e,n):mr(e,n))&&(b=Jf(r,`onBeforeInput`),0<b.length&&(v=new Gn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Ff(s,e,r,n,i)}Bf(s,t)})}function qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jf(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=xn(e,n),i!=null&&r.unshift(qf(e,i,a)),i=xn(e,t),i!=null&&r.push(qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Yf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(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=xn(n,a),l!=null&&o.unshift(qf(n,l,c))):i||(l=xn(n,a),l!=null&&o.push(qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Zf=/\r\n?/g,Qf=/\u0000|\uFFFD/g;function $f(e){return(typeof e==`string`?e:``+e).replace(Zf,`
50
+ `).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function tp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||an(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&an(e,``+r);else return;break;case`className`:Ut(e,`class`,r);break;case`tabIndex`:Ut(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ut(e,n,r);break;case`style`:cn(e,r,o);return;case`data`:if(t!==`object`){Ut(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&tp(e,t,`name`,a.name,a,null),tp(e,t,`formEncType`,a.formEncType,a,null),tp(e,t,`formMethod`,a.formMethod,a,null),tp(e,t,`formTarget`,a.formTarget,a,null)):(tp(e,t,`encType`,a.encType,a,null),tp(e,t,`method`,a.method,a,null),tp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=pn);return;case`onScroll`:r!=null&&Vf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Vf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=fn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Vf(`beforetoggle`,e),Vf(`toggle`,e),Ht(e,`popover`,r);break;case`xlinkActuate`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ht(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=un.get(n)||n,Ht(e,n,r);else return}Bt=!0}function np(e,t,n,r,a,o){switch(n){case`style`:cn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)an(e,r);else if(typeof r==`number`||typeof r==`bigint`)an(e,``+r);else return;break;case`onScroll`:r!=null&&Vf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Vf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=pn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[_t]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Bt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ht(e,n,r)}return}Bt=!0}function rp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Vf(`error`,e),Vf(`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:tp(e,t,o,s,n,null)}}a&&tp(e,t,`srcSet`,n.srcSet,n,null),r&&tp(e,t,`src`,n.src,n,null);return;case`input`:Vf(`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:tp(e,t,r,d,n,null)}}$t(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Vf(`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:tp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&tn(e,!!r,n,!0):tn(e,!!r,t,!1);return;case`textarea`:for(s in Vf(`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:tp(e,t,s,c,n,null)}rn(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:tp(e,t,l,r,n,null)}return;case`dialog`:Vf(`beforetoggle`,e),Vf(`toggle`,e),Vf(`cancel`,e),Vf(`close`,e);break;case`iframe`:case`object`:Vf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Rf.length;r++)Vf(Rf[r],e);break;case`image`:Vf(`error`,e),Vf(`load`,e);break;case`details`:Vf(`toggle`,e);break;case`embed`:case`source`:case`link`:Vf(`error`,e),Vf(`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:tp(e,t,u,r,n,null)}return;default:if(ln(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&np(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&tp(e,t,c,r,n,null))}var ip={};function ap(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)||tp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Bt=!0),o=m;break;case`name`:m!==f&&(Bt=!0),a=m;break;case`checked`:m!==f&&(Bt=!0),u=m;break;case`defaultChecked`:m!==f&&(Bt=!0),d=m;break;case`value`:m!==f&&(Bt=!0),s=m;break;case`defaultValue`:m!==f&&(Bt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&tp(e,t,p,m,r,f)}}Qt(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)||tp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Bt=!0),p=o;break;case`defaultValue`:o!==l&&(Bt=!0),c=o;break;case`multiple`:o!==l&&(Bt=!0),s=o;default:o!==l&&tp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?tn(e,!!n,n?[]:``,!1):tn(e,!!n,t,!0)):tn(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:tp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Bt=!0),p=a;break;case`defaultValue`:a!==o&&(Bt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&tp(e,t,s,a,r,o)}nn(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:tp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Bt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:tp(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)&&tp(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:tp(e,t,u,p,r,m)}return;default:if(ln(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&np(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||np(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&tp(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||tp(e,t,f,p,r,m)}function op(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function sp(){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&&op(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&&op(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 cp=null,lp=null;function up(e){return e.nodeType===9?e:e.ownerDocument}function dp(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 fp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function pp(e,t,n,r){return n=up(n).createElement(e),n[gt]=r,n[_t]=t,rp(n,e,t),jt(n),n}function mp(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 hp=null;function gp(){var e=window.event;return e&&e.type===`popstate`?e!==hp&&(hp=e,!0):(hp=null,!1)}var _p=typeof setTimeout==`function`?setTimeout:void 0,vp=typeof clearTimeout==`function`?clearTimeout:void 0,yp=typeof Promise==`function`?Promise:void 0,bp=typeof requestAnimationFrame==`function`?requestAnimationFrame:_p,xp=typeof queueMicrotask==`function`?queueMicrotask:yp===void 0?_p:function(e){return yp.resolve(null).then(e).catch(Sp)};function Sp(e){setTimeout(function(){throw e})}function Cp(e){return e===`head`}function wp(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),Uh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[wt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vm(e.ownerDocument.body)}n=i}while(n);Uh(t)}function Tp(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 Ep(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Dp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Op(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function kp(e){return Op(e.getBoundingClientRect(),getComputedStyle(e),e)}function Ap(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Op(t,n,e)}function jp(e){return e.documentElement.clientHeight}function Mp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Np(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(jp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Zm(f),u>eh){s.length=o;break}f=new Promise(Mp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Pp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Pp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Pp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Fp(e){return{name:e,group:new Pp(`group`,e),imagePair:new Pp(`image-pair`,e),old:new Pp(`old`,e),new:new Pp(`new`,e)}}function Ip(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Ip.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Vp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=zp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Lp,e,s,r)}this._eventListeners=a}};function Lp(e,t,n,r){return _(e).addEventListener(t,n,r),!1}Ip.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Vp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=zp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Rp,e,n,i),r.splice(t,1),a!==null&&a()}};function Rp(e,t,n,r){return _(e).removeEventListener(t,n,r),!1}function zp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Bp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Vp(e,t,n,r){if(e.length===0)return-1;r=Bp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Bp(a.optionsOrUseCapture)===r)return i}return-1}Ip.prototype.dispatchEvent=function(e){var t=p(this._fragmentFiber);if(t===null)return!0;t=_(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Ip.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Hp,e,void 0,void 0)};function Hp(e,t){return e.tag!==6&&(e=_(e),mm(e,t))}Ip.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Up,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Hp(t[n],e);n--);};function Up(e,t){return t.push(e),!1}Ip.prototype.blur=function(){var e=p(this._fragmentFiber);e!==null&&(e=_(e),e=up(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Wp,e,void 0,void 0))};function Wp(e,t){return e.tag!==6&&(e=_(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Ip.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag===6||(e=_(e),t.observe(e)),!1}Ip.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,Kp,e,void 0,void 0);for(var n=t=0;n<qp.length;n++){var r=qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):qp[t++]=r}qp.length=t}};function Kp(e,t){return e.tag===6||(e=_(e),t.unobserve(e)),!1}var qp=[],Jp=!1;function Yp(e,t,n){qp.push({fragmentInstance:e,observer:t,instance:n}),Jp||(Jp=!0,hm(function(){Jp=!1;var e=qp;qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Ip.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,Xp,e,void 0,void 0),e};function Xp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=_(e),t.push.apply(t,e.getClientRects());return!1}Ip.prototype.getRootNode=function(e){var t=p(this._fragmentFiber);return t===null?this:_(t).getRootNode(e)},Ip.prototype.compareDocumentPosition=function(e){var t=p(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Up,n,void 0,void 0);var r=_(t);if(n.length===0){if(n=r,m(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=h(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=_(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=_(n[0]),i=_(n[n.length-1]);var a=m(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Zp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Zp(e,t,n,r,i){var a=Dt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=p(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(f(t,!0,b,a,n),a=v,v=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(f(t,!0,x,a,r),a=v,y=v=null,t=a!==null)),t):!1}function Qp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Ip.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Up,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=h(this._fragmentFiber);if(r=n?r[1]||r[0]||p(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=_(r),Qp(e,n);return}if(r=_(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=_(a),Qp(a,n)):_(a).scrollIntoView(e),r+=n?-1:1}};function $p(e,t){return e=_(e),em(e,t),!1}function em(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<qp.length;i++){var a=qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(qp[r++]=a)}qp.length=r,n.observe(e)}),em(e,t))}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Yp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function rm(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`:rm(n),Et(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function im(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[wt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=um(e.nextSibling),e===null)break}return null}function am(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=um(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=um(e.nextSibling),e===null))return null;return e}function sm(e){return e.data===`$?`||e.data===`$~`}function cm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lm(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 um(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 dm=null;function fm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return um(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pm(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 mm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function hm(e){bp(function(){bp(function(t){return e(t)})})}function gm(e,t,n){switch(t=up(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 _m(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&tp(e,t,r,null,ip,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===pn&&(e.onclick=null),Et(e)}function vm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Et(e)}var ym=new Map,bm=new Set;function xm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Sm=B.d;B.d={f:Cm,r:wm,D:Dm,C:Om,L:km,m:Am,X:Mm,S:jm,M:Nm};function Cm(){var e=Sm.f(),t=Rd();return e||t}function wm(e){var t=Ot(e);t!==null&&t.tag===5&&t.type===`form`?Js(t):Sm.r(e)}var Tm=typeof document>`u`?null:document;function Em(e,t,n){var r=Tm;if(r&&typeof t==`string`&&t){var i=Zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bm.has(i)||(bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),rp(t,`link`,e),jt(t),r.head.appendChild(t)))}}function Dm(e){Sm.D(e),Em(`dns-prefetch`,e,null)}function Om(e,t){Sm.C(e,t),Em(`preconnect`,e,t)}function km(e,t,n){Sm.L(e,t,n);var r=Tm;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=Fm(e);break;case`script`:a=zm(e)}if(!(ym.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),ym.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Im(a))||t===`script`&&r.querySelector(Bm(a))))){var o=r.createElement(`link`);rp(o,`link`,e),t===`style`&&(o[Tt]=!0,o.onload=o.onerror=function(){Mt(o)}),jt(o),r.head.appendChild(o)}}}function Am(e,t){Sm.m(e,t);var n=Tm;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=zm(e)}if(!ym.has(a)&&(e=T({rel:`modulepreload`,href:e},t),ym.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bm(a)))return}r=n.createElement(`link`),rp(r,`link`,e),jt(r),n.head.appendChild(r)}}}function jm(e,t,n){Sm.S(e,t,n);var r=Tm;if(r&&e){var i=At(r).hoistableStyles,a=Fm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Im(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=ym.get(a))&&Um(e,n);var c=o=r.createElement(`link`);jt(c),rp(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,Hm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mm(e,t){Sm.X(e,t);var n=Tm;if(n&&e){var r=At(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=T({src:e,async:!0},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),jt(a),rp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t){Sm.M(e,t);var n=Tm;if(n&&e){var r=At(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),jt(a),rp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t,n,r){var a=(a=ge.current)?xm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Fm(n.href),t=At(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Fm(n.href);var o=At(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Im(e)))?o._p||(s.instance=o,s.state.loading=5):(o=ym.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ym.set(e,o)),Rm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=zm(n),t=At(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Fm(e){return`href="`+Zt(e)+`"`}function Im(e){return`link[rel="stylesheet"][`+e+`]`}function Lm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Rm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Tt]){r.loading=1;return}}else t=e.createElement(`link`),t[Tt]=!0,t.onload=t.onerror=Mt.bind(null,t),rp(t,`link`,n),jt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function zm(e){return`[src="`+Zt(e)+`"]`}function Bm(e){return`script[async]`+e}function Vm(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,jt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),jt(r),rp(r,`style`,a),Hm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Fm(n.href);var o=e.querySelector(Im(a));if(o)return t.state.loading|=4,t.instance=o,jt(o),o;r=Lm(n),(a=ym.get(a))&&Um(r,a),o=(e.ownerDocument||e).createElement(`link`),jt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),rp(o,`link`,r),t.state.loading|=4,Hm(o,n.precedence,e),t.instance=o;case`script`:return o=zm(n.src),(a=e.querySelector(Bm(o)))?(t.instance=a,jt(a),a):(r=n,(a=ym.get(o))&&(r=T({},n),Wm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),jt(a),rp(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,Hm(r,n.precedence,e));return t.instance}function Hm(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 Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gm=null;function Km(e,t,n){if(Gm===null){var r=new Map,i=Gm=new Map;i.set(n,r)}else i=Gm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[wt]||a[gt]||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 qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jm(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 Ym(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Xm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Qm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Zm(t),e.suspenseyImages.push(t)),e=ih.bind(e),t.decode().then(e,e))}function $m(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=Fm(r.href),a=t.querySelector(Im(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,jt(a);return}a=t.ownerDocument||t,r=Lm(r),(i=ym.get(i))&&Um(r,i),a=a.createElement(`link`),jt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),rp(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=rh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var eh=0;function th(e,t){return e.stylesheets&&e.count===0&&oh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&oh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&eh===0&&(eh=62500*sp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&oh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>eh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function nh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)oh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function rh(){this.count--,nh(this)}function ih(){this.imgCount--,nh(this)}var ah=null;function oh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ah=new Map,t.forEach(sh,e),ah=null,rh.call(e))}function sh(e,t){if(!(t.state.loading&4)){var n=ah.get(e);if(n)var r=n.get(null);else{n=new Map,ah.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=rh.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 ch={$$typeof:N,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function lh(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=at(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=at(0),this.hiddenUpdates=at(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function uh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new lh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Si(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},io(a),e}function dh(e){return e?(e=bi,e):bi}function fh(e,t,n,r,i,a){i=dh(i),r.context===null?r.context=i:r.pendingContext=i,r=oo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=so(e,r,t),n!==null&&(Nd(n,e,t),co(n,e,t))}function ph(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mh(e,t){ph(e,t),(e=e.alternate)&&ph(e,t)}function hh(e){if(e.tag===13||e.tag===31){var t=_i(e,67108864);t!==null&&Nd(t,e,67108864),mh(e,67108864)}}function gh(e){if(e.tag===13||e.tag===31){var t=Ad();t=dt(t);var n=_i(e,t);n!==null&&Nd(n,e,t),mh(e,t)}}var _h=!0;function vh(e,t,n,r){var i=z.T;z.T=null;var a=B.p;try{B.p=2,bh(e,t,n,r)}finally{B.p=a,z.T=i}}function yh(e,t,n,r){var i=z.T;z.T=null;var a=B.p;try{B.p=8,bh(e,t,n,r)}finally{B.p=a,z.T=i}}function bh(e,t,n,r){if(_h){var i=xh(r);if(i===null)Kf(e,t,r,Sh,n),Nh(e,r);else if(Fh(i,e,t,n,r))r.stopPropagation();else if(Nh(e,r),t&4&&-1<Mh.indexOf(e)){for(;i!==null;){var a=Ot(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=$e(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ke(o);s.entanglements[1]|=c,o&=~c}Tf(a),!(Ju&6)&&(hd=Pe()+500,Ef(0,!1))}}break;case 31:case 13:s=_i(a,2),s!==null&&Nd(s,a,2),Rd(),mh(a,2)}if(a=xh(r),a===null&&Kf(e,t,r,Sh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Kf(e,t,r,null,n)}}function xh(e){return e=hn(e),Ch(e)}var Sh=null;function Ch(e){if(Sh=null,e=Dt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Sh=e,null}function wh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Fe()){case Ie:return 2;case Le:return 8;case Re:case ze:return 32;case Be:return 268435456;default:return 32}default:return 32}}var Th=!1,Eh=null,Dh=null,Oh=null,kh=new Map,Ah=new Map,jh=[],Mh=`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 Nh(e,t){switch(e){case`focusin`:case`focusout`:Eh=null;break;case`dragenter`:case`dragleave`:Dh=null;break;case`mouseover`:case`mouseout`:Oh=null;break;case`pointerover`:case`pointerout`:kh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ah.delete(t.pointerId)}}function Ph(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ot(t),t!==null&&hh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Fh(e,t,n,r,i){switch(t){case`focusin`:return Eh=Ph(Eh,e,t,n,r,i),!0;case`dragenter`:return Dh=Ph(Dh,e,t,n,r,i),!0;case`mouseover`:return Oh=Ph(Oh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return kh.set(a,Ph(kh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ah.set(a,Ph(Ah.get(a)||null,e,t,n,r,i)),!0}return!1}function Ih(e){var t=Dt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,mt(e.priority,function(){gh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,mt(e.priority,function(){gh(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 Lh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mn=r,n.target.dispatchEvent(r),mn=null}else return t=Ot(n),t!==null&&hh(t),e.blockedOn=n,!1;t.shift()}return!0}function Rh(e,t,n){Lh(e)&&n.delete(t)}function zh(){Th=!1,Eh!==null&&Lh(Eh)&&(Eh=null),Dh!==null&&Lh(Dh)&&(Dh=null),Oh!==null&&Lh(Oh)&&(Oh=null),kh.forEach(Rh),Ah.forEach(Rh)}function Bh(e,n){e.blockedOn===n&&(e.blockedOn=null,Th||(Th=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zh)))}var Vh=null;function Hh(e){Vh!==e&&(Vh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vh===e&&(Vh=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(Ch(r||n)===null)continue;break}var a=Ot(n);a!==null&&(e.splice(t,3),t-=3,Ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Uh(e){function t(t){return Bh(t,e)}Eh!==null&&Bh(Eh,e),Dh!==null&&Bh(Dh,e),Oh!==null&&Bh(Oh,e),kh.forEach(t),Ah.forEach(t);for(var n=0;n<jh.length;n++){var r=jh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<jh.length&&(n=jh[0],n.blockedOn===null);)Ih(n),n.blockedOn===null&&jh.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[_t]||null;if(typeof a==`function`)o||Hh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[_t]||null)s=o.formAction;else if(Ch(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Hh(n)}}}function Wh(){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 Gh(e){this._internalRoot=e}Kh.prototype.render=Gh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;fh(n,Ad(),e,t,null,null)},Kh.prototype.unmount=Gh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fh(e.current,2,null,e,null,null),Rd(),t[vt]=null}};function Kh(e){this._internalRoot=e}Kh.prototype.unstable_scheduleHydration=function(e){if(e){var t=pt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jh.length&&t!==0&&t<jh[n].priority;n++);jh.splice(n,0,e),n===0&&Ih(e)}};var qh=n.version;if(qh!==`19.3.1`)throw Error(i(527,qh,`19.3.1`));B.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Jh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:z,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Yh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yh.isDisabled&&Yh.supportsFiber)try{Ue=Yh.inject(Jh),We=Yh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=hc,s=gc,c=_c;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=uh(e,1,!1,null,null,n,r,null,o,s,c,Wh),e[vt]=t.current,Wf(e),new Gh(t)}})),qS=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=KS()})),JS=()=>Bh({opened:!1,empty:!1,selected:-1,listId:``,query:``,registeredActions:new Set}),YS=e=>Vh(e);function XS(e,t){let n=t.getState();t.setState({...n,...e(t.getState())})}function ZS(e){XS(()=>({opened:!0,selected:-1}),e)}function QS(e){XS(()=>({opened:!1}),e)}function $S(e){XS(e=>({opened:!e.opened,selected:e.opened?e.selected:-1}),e)}function eC(e,t){t.updateState(t=>({...t,selected:e}))}function tC(e,t){t.updateState(t=>({...t,listId:e}))}function nC(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t instanceof ShadowRoot?t.host.children:t.children;for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=nC(e,n.shadowRoot);if(t)return t}let i=nC(e,n);if(i)return i}return null}function rC(e,t){let n=t.getState(),r=n.listId?nC(`#${n.listId}`):null,i=r?.querySelector(`[data-selected]`),a=r?.querySelectorAll(`[data-action]`)??[],o=ie(e===-1?a.length-1:e===a.length?0:e,0,a.length-1);return i?.removeAttribute(`data-selected`),a[o]?.scrollIntoView({block:`nearest`}),a[o]?.setAttribute(`data-selected`,`true`),eC(o,t),o}function iC(e){return rC(e.getState().selected+1,e)}function aC(e){return rC(e.getState().selected-1,e)}function oC(e){let t=e.getState();(t.listId?nC(`#${t.listId} [data-selected]`):null)?.click()}function sC(e,t){let n=t.getState();return n.registeredActions.add(e),()=>{n.registeredActions.delete(e)}}function cC(e,t){XS(()=>({query:e}),t),Promise.resolve().then(()=>{rC(0,t),XS(e=>({empty:e.query.trim().length>0&&e.registeredActions.size===0||!1}),t)})}function lC({clearQuery:e},t){t.updateState(t=>({...t,selected:-1,query:e?``:t.query,empty:!e&&t.empty}))}var uC={open:ZS,close:QS,toggle:$S,updateState:XS,setSelectedAction:eC,setListId:tC,selectAction:rC,selectNextAction:iC,selectPreviousAction:aC,triggerSelectedAction:oC,registerAction:sC,setQuery:cC,clearSpotlightState:lC};function dC(){let e=JS();return[e,{open:()=>ZS(e),close:()=>QS(e),toggle:()=>$S(e)}]}var[fC,pC]=dC(),{open:mC,close:hC,toggle:gC}=pC;function _C(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}var[vC,yC]=T(`Spotlight component was not found in tree`),bC={root:`m_d2b315db`,content:`m_3cd250e0`,body:`m_d2abce9b`,search:`m_f366a061`,actionsList:`m_6e463822`,action:`m_d49bb8ef`,actionBody:`m_3d475731`,actionSection:`m_832642f6`,actionLabel:`m_6c2a1345`,actionDescription:`m_a6d9d78d`,empty:`m_82f78f74`,footer:`m_ddcaf054`,actionsGroup:`m_5a3e5f7b`},xC={dimmedSections:!0,highlightQuery:!1},SC=q(e=>{let{className:t,style:n,classNames:r,styles:i,id:a,description:o,label:s,leftSection:c,rightSection:l,children:u,dimmedSections:d,highlightQuery:f,highlightColor:p,closeSpotlightOnTrigger:m,onClick:h,onMouseDown:g,keywords:_,vars:v,...y}=G(`SpotlightAction`,xC,e),b=yC(),x={classNames:r,styles:i},S=f&&typeof s==`string`?(0,W.jsx)(kp,{component:`span`,highlight:b.query,color:p,...b.getStyles(`actionLabel`,x),children:s}):(0,W.jsx)(`span`,{...b.getStyles(`actionLabel`,x),children:s});return(0,W.jsx)(Oc,{"data-action":!0,...b.getStyles(`action`,{className:t,style:n,...x}),...y,onMouseDown:e=>{e.preventDefault(),g?.(e)},onClick:e=>{h?.(e),(m??b.closeOnActionTrigger)&&uC.close(b.store)},tabIndex:-1,children:u||(0,W.jsxs)(W.Fragment,{children:[c&&(0,W.jsx)(J,{component:`span`,mod:{position:`left`,dimmed:d},...b.getStyles(`actionSection`,x),children:c}),(0,W.jsxs)(`span`,{...b.getStyles(`actionBody`,x),children:[S,(0,W.jsx)(`span`,{...b.getStyles(`actionDescription`,x),children:o})]}),l&&(0,W.jsx)(J,{component:`span`,mod:{position:`right`,dimmed:d},...b.getStyles(`actionSection`,x),children:l})]})})});SC.classes=bC,SC.displayName=`@mantine/spotlight/SpotlightAction`;var CC=q(e=>{let{className:t,style:n,styles:r,classNames:i,label:a,children:o,...s}=G(`SpotlightActionsGroup`,null,e),c=yC();return(0,W.jsx)(J,{...c.getStyles(`actionsGroup`,{className:t,style:n,classNames:i,styles:r}),...s,__vars:{"--spotlight-label":`'${a?.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`)}'`},children:o})});CC.classes=bC,CC.displayName=`@mantine/core/SpotlightActionsGroup`;var wC=q(e=>{let{className:t,style:n,id:r,children:i,vars:a,classNames:o,styles:s,...c}=G(`SpotlightActionsList`,null,e),l=yC(),u=`mantine-${(0,C.useId)().replace(/:/g,``)}`,d=r||u;return(0,C.useEffect)(()=>(uC.setListId(d,l.store),()=>uC.setListId(``,l.store)),[]),(0,W.jsx)(wc.Autosize,{...l.getStyles(`actionsList`,{className:t,style:n,classNames:o,styles:s}),type:`scroll`,scrollbarSize:`var(--spotlight-actions-list-padding)`,offsetScrollbars:`y`,id:d,...c,children:i})});wC.classes=bC,wC.displayName=`@mantine/spotlight/SpotlightActionsList`;var TC=q(e=>{let{className:t,style:n,classNames:r,styles:i,...a}=G(`SpotlightEmpty`,null,e),o=yC();return(0,W.jsx)(J,{...o.getStyles(`empty`,{classNames:r,styles:i,className:t,style:n}),...a})});TC.classes=bC,TC.displayName=`@mantine/spotlight/SpotlightEmpty`;var EC=q(e=>{let{className:t,style:n,classNames:r,styles:i,...a}=G(`SpotlightFooter`,null,e),o=yC();return(0,W.jsx)(J,{...o.getStyles(`footer`,{className:t,classNames:r,style:n,styles:i}),...a})});EC.classes=bC,EC.displayName=`@mantine/spotlight/SpotlightFooter`;function DC(e,t){if(!e)return[];let n=()=>uC.open(t);return Array.isArray(e)?e.map(e=>[e,n]):[[e,n]]}var OC={size:600,yOffset:80,zIndex:N(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:fC,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`,maxHeight:400},kC=q(e=>{let t=G(`SpotlightRoot`,OC,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,store:c,children:l,query:u,onQueryChange:d,transitionProps:f,clearQueryOnClose:p,shortcut:m,tagsToIgnore:h,triggerOnContentEditable:g,disabled:v,onSpotlightOpen:y,onSpotlightClose:b,forceOpened:x,closeOnActionTrigger:S,maxHeight:C,scrollable:w,attributes:T,...E}=t,{opened:D,query:O}=YS(c),k=typeof u==`string`?u:O,A=e=>{d?.(e),uC.setQuery(e,c)},j=K({name:`Spotlight`,classes:bC,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T}),{resolvedClassNames:M,resolvedStyles:N}=nr({classNames:n,styles:a,props:t});return lt(DC(m,c),h,g),fe(()=>{D?y?.():b?.()},[D]),v?null:(0,W.jsx)(vC,{value:{getStyles:j,query:k,setQuery:A,store:c,closeOnActionTrigger:S},children:(0,W.jsx)(rm,{...E,withCloseButton:!1,opened:D||!!x,padding:0,onClose:()=>uC.close(c),className:r,style:i,classNames:M,styles:N,attributes:T,transitionProps:{...f,onExited:()=>{p&&A(``),uC.clearSpotlightState({clearQuery:p},c),f?.onExited?.()}},__vars:{"--spotlight-max-height":w?_(C):void 0},__staticSelector:`Spotlight`,"data-scrollable":w||void 0,children:l})})});kC.classes=bC,kC.displayName=`@mantine/spotlight/SpotlightRoot`;var AC={size:`lg`},jC=q(e=>{let{classNames:t,styles:n,onKeyDown:r,onChange:i,vars:a,value:o,attributes:s,...c}=G(`SpotlightSearch`,AC,e),l=yC(),u=l.getStyles(`search`),[d,f]=(0,C.useState)(!1),p=e=>{r?.(e),!d&&(e.nativeEvent.code===`ArrowDown`&&(e.preventDefault(),uC.selectNextAction(l.store)),e.nativeEvent.code===`ArrowUp`&&(e.preventDefault(),uC.selectPreviousAction(l.store)),(e.nativeEvent.code===`Enter`||e.nativeEvent.code===`NumpadEnter`)&&(e.preventDefault(),uC.triggerSelectedAction(l.store)))};return(0,W.jsx)(Vd,{...u,classNames:[{input:u.className},t],styles:[{input:u.style},n],...c,value:o??l.query,onChange:e=>{l.setQuery(e.currentTarget.value),i?.(e)},onKeyDown:p,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});jC.classes=bC,jC.displayName=`@mantine/spotlight/SpotlightSearch`;function MC(e){return Array.isArray(e)?e.map(e=>e.trim()).join(`,`).toLowerCase().trim():typeof e==`string`?e.toLowerCase().trim():``}function NC(e){return e.reduce((e,t)=>`actions`in t?[...e,...t.actions.map(e=>({...e,group:t.group}))]:[...e,t],[])}function PC(e){let t={},n=[];return e.forEach(e=>{e.group?(t[e.group]||(t[e.group]={pushed:!1,data:{group:e.group,actions:[]}}),t[e.group].data.actions.push(e),t[e.group].pushed||(t[e.group].pushed=!0,n.push(t[e.group].data))):n.push(e)}),n}var FC=(e,t)=>{let n=e.trim().toLowerCase(),r=[[],[]];return NC(t).forEach(e=>{e.label?.toLowerCase().includes(n)?r[0].push(e):(e.description?.toLowerCase().includes(n)||MC(e.keywords).includes(n))&&r[1].push(e)}),PC(r.flat())};function IC(e,t){if(!Array.isArray(e))return[];let n=0;return e.reduce((e,r)=>{if(n>=t)return e;if(_C(r)){let i=IC(r.actions,t-n);e.push({group:r.group,actions:i}),n+=i.length}else e.push(r),n+=1;return e},[])}var LC={size:600,yOffset:80,limit:1/0,zIndex:N(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:fC,filter:FC,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`},RC=q(e=>{let{searchProps:t,filter:n,query:r,onQueryChange:i,actions:a,nothingFound:o,highlightQuery:s,limit:c,scrollAreaProps:l,...u}=G(`Spotlight`,LC,e),[d,f]=Ye({value:r,defaultValue:``,finalValue:``,onChange:i}),p=IC(n(d,a),c).map(e=>{if(_C(e)){let t=e.actions.map(({id:e,...t})=>(0,W.jsx)(SC,{highlightQuery:s,...t},e));return(0,W.jsx)(CC,{label:e.group,children:t},e.group)}return(0,W.jsx)(SC,{highlightQuery:s,...e},e.id)});return(0,W.jsxs)(kC,{...u,query:d,onQueryChange:f,children:[(0,W.jsx)(jC,{...t}),p.length>0&&(0,W.jsx)(wC,{...l,children:p}),p.length===0&&o&&(0,W.jsx)(TC,{children:o})]})});RC.classes=bC,RC.displayName=`@mantine/spotlight/Spotlight`,RC.Search=jC,RC.ActionsList=wC,RC.Action=SC,RC.Empty=TC,RC.ActionsGroup=CC,RC.Footer=EC,RC.Root=kC,RC.open=pC.open,RC.close=pC.close,RC.toggle=pC.toggle;function zC(e){let t={subscribe(t){let n=null,r=!1,i=!1,a=!1;function o(){n===null?a=!0:i||(i=!0,typeof n==`function`?n():n&&n.unsubscribe())}return n=e({next(e){var n;r||(n=t.next)==null||n.call(t,e)},error(e){var n;r||(r=!0,(n=t.error)==null||n.call(t,e),o())},complete(){var e;r||(r=!0,(e=t.complete)==null||e.call(t),o())}}),a&&o(),{unsubscribe:o}},pipe(...e){return e.reduce(BC,t)}};return t}function BC(e,t){return t(e)}function VC(e){let t=new AbortController;return new Promise((n,r)=>{let i=!1;function a(){i||(i=!0,o.unsubscribe())}t.signal.addEventListener(`abort`,()=>{r(t.signal.reason)});let o=e.subscribe({next(e){i=!0,n(e),a()},error(e){r(e)},complete(){t.abort(),a()}})})}function HC(e){return e=>{let t=0,n=null,r=[];function i(){n||=e.subscribe({next(e){for(let n of r){var t;(t=n.next)==null||t.call(n,e)}},error(e){for(let n of r){var t;(t=n.error)==null||t.call(n,e)}},complete(){for(let t of r){var e;(e=t.complete)==null||e.call(t)}}})}function a(){if(t===0&&n){let e=n;n=null,e.unsubscribe()}}return zC(e=>(t++,r.push(e),i(),{unsubscribe(){t--,a();let n=r.findIndex(t=>t===e);n>-1&&r.splice(n,1)}}))}}function UC(e){let t=e,n=[],r=e=>{t!==void 0&&e.next(t),n.push(e)},i=e=>{n.splice(n.indexOf(e),1)},a=zC(e=>(r(e),()=>{i(e)}));return a.next=e=>{if(t!==e){t=e;for(let t of n)t.next(e)}},a.get=()=>t,a}var WC=qS();function GC(e){return zC(t=>{function n(t=0,r=e.op){let i=e.links[t];if(!i)throw Error(`No more links to execute - did you forget to add an ending link?`);return i({op:r,next(e){return n(t+1,e)}})}return n().subscribe(t)})}function KC(e){return Array.isArray(e)?e:[e]}function qC(e){return t=>{let n=KC(e.true).map(e=>e(t)),r=KC(e.false).map(e=>e(t));return t=>zC(i=>{let a=e.condition(t.op)?n:r;return GC({op:t.op,links:a}).subscribe(i)})}}function JC(e){"@babel/helpers - typeof";return JC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JC(e)}function YC(e,t){if(JC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(JC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function XC(e){var t=YC(e,`string`);return JC(t)==`symbol`?t:t+``}function ZC(e,t,n){return(t=XC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $C(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?QC(Object(n),!0).forEach(function(t){ZC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ew(e){return!!e&&!Array.isArray(e)&&typeof e==`object`}function tw(e){return typeof e==`function`}function nw(){return Object.create(null)}var rw=typeof Symbol==`function`&&!!Symbol.asyncIterator;function iw(e){return rw&&ew(e)&&Symbol.asyncIterator in e}var aw=e=>e(),ow={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,PAYMENT_REQUIRED:-32002,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,PRECONDITION_REQUIRED:-32028,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099},sw=[ow.BAD_GATEWAY,ow.SERVICE_UNAVAILABLE,ow.GATEWAY_TIMEOUT,ow.INTERNAL_SERVER_ERROR],cw=()=>{},lw=e=>{Object.freeze&&Object.freeze(e)};function uw(e,t,n){let r=t.join(`.`);return n[r]??(n[r]=new Proxy(cw,{get(r,i){if(typeof i==`string`&&i!==`then`)return uw(e,[...t,i],n)},apply(n,r,i){let a=t[t.length-1];if(a===`valueOf`||a===`toString`||a===`toJSON`)return`tRPC.proxy(${t.slice(0,-1).join(`.`)})`;let o={args:i,path:t};return a===`call`?o={args:i.length>=2?[i[1]]:[],path:t.slice(0,-1)}:a===`apply`&&(o={args:i.length>=2?i[1]:[],path:t.slice(0,-1)}),lw(o.args),lw(o.path),e(o)}})),n[r]}var dw=e=>uw(e,[],nw()),fw=e=>new Proxy(cw,{get(t,n){if(n!==`then`)return e(n)}});function pw(e){"@babel/helpers - typeof";return pw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},pw(e)}function mw(e,t){if(pw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(pw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function hw(e){var t=mw(e,`string`);return pw(t)==`symbol`?t:t+``}function gw(e,t,n){return(t=hw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _w=class extends Error{constructor(e){super(vw(e)),Object.assign(this,e)}};function vw(e){if(`message`in e)return String(e.message)}function yw(e){if(e instanceof Error)return e;let t=typeof e;if(t!==`undefined`&&t!==`function`&&e!==null){if(t!==`object`)return Error(String(e));if(ew(e))return new _w(e)}}var bw=class extends Error{constructor(e){let t=yw(e.cause),n=e.message??t?.message??e.code;super(n,{cause:t}),gw(this,`cause`,void 0),gw(this,`code`,void 0),this.code=e.code,this.name=`TRPCError`,this.cause??=t}};function xw(e){return typeof e==`function`}async function Sw(e,t){let{_def:n}=e,r=n.procedures[t];for(;!r;){let e=Object.keys(n.lazy).find(e=>t===e||t.startsWith(e+`.`));if(!e)return null;await n.lazy[e].load(),r=n.procedures[t]}return r}async function Cw(e){let{type:t,path:n}=e,r=await Sw(e.router,n);if(!r||!xw(r)||r._def.type!==t&&!e.allowMethodOverride)throw new bw({code:`NOT_FOUND`,message:`No "${t}"-procedure on path "${n}"`});if(r._def.type!==t&&e.allowMethodOverride&&r._def.type===`subscription`)throw new bw({code:`METHOD_NOT_SUPPORTED`,message:`Method override is not supported for subscriptions`});return r(e)}var ww,Tw=new WeakMap,Ew=()=>{};ww=Symbol.toStringTag;var Dw=class e{constructor(e){gw(this,`promise`,void 0),gw(this,`subscribers`,[]),gw(this,`settlement`,null),gw(this,ww,`Unpromise`),this.promise=typeof e==`function`?new Promise(e):e;let t=this.promise.then(e=>{let{subscribers:t}=this;this.subscribers=null,this.settlement={status:`fulfilled`,value:e},t?.forEach(({resolve:t})=>{t(e)})});`catch`in t&&t.catch(e=>{let{subscribers:t}=this;this.subscribers=null,this.settlement={status:`rejected`,reason:e},t?.forEach(({reject:t})=>{t(e)})})}subscribe(){let e,t,{settlement:n}=this;if(n===null){if(this.subscribers===null)throw Error(`Unpromise settled but still has subscribers`);let n=kw();this.subscribers=Aw(this.subscribers,n),e=n.promise,t=()=>{this.subscribers!==null&&(this.subscribers=Mw(this.subscribers,n))}}else{let{status:r}=n;e=r===`fulfilled`?Promise.resolve(n.value):Promise.reject(n.reason),t=Ew}return Object.assign(e,{unsubscribe:t})}then(e,t){let n=this.subscribe(),{unsubscribe:r}=n;return Object.assign(n.then(e,t),{unsubscribe:r})}catch(e){let t=this.subscribe(),{unsubscribe:n}=t;return Object.assign(t.catch(e),{unsubscribe:n})}finally(e){let t=this.subscribe(),{unsubscribe:n}=t;return Object.assign(t.finally(e),{unsubscribe:n})}static proxy(t){let n=e.getSubscribablePromise(t);return n===void 0?e.createSubscribablePromise(t):n}static createSubscribablePromise(t){let n=new e(t);return Tw.set(t,n),Tw.set(n,n),n}static getSubscribablePromise(e){return Tw.get(e)}static resolve(t){let n=typeof t==`object`&&t&&`then`in t&&typeof t.then==`function`?t:Promise.resolve(t);return e.proxy(n).subscribe()}static async any(t){let n=(Array.isArray(t)?t:[...t]).map(e.resolve);try{return await Promise.any(n)}finally{n.forEach(({unsubscribe:e})=>{e()})}}static async race(t){let n=(Array.isArray(t)?t:[...t]).map(e.resolve);try{return await Promise.race(n)}finally{n.forEach(({unsubscribe:e})=>{e()})}}static async raceReferences(e){let t=e.map(Ow);try{return await Promise.race(t)}finally{for(let e of t)e.unsubscribe()}}};function Ow(e){return Dw.proxy(e).then(()=>[e])}function kw(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function Aw(e,t){return[...e,t]}function jw(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function Mw(e,t){let n=e.indexOf(t);return n===-1?e:jw(e,n)}var Nw,Pw;(Nw=Symbol).dispose??(Nw.dispose=Symbol()),(Pw=Symbol).asyncDispose??(Pw.asyncDispose=Symbol());function Fw(e,t){let n=e,r=n[Symbol.dispose];return n[Symbol.dispose]=()=>{t(),r?.call(n)},n}function Iw(e,t){let n=e,r=n[Symbol.asyncDispose];return n[Symbol.asyncDispose]=async()=>{await t(),await r?.call(n)},n}var Lw=Symbol();function Rw(e){let t=null;return Fw({start(){if(t)throw Error(`Timer already started`);return new Promise(n=>{t=setTimeout(()=>n(Lw),e)})}},()=>{t&&clearTimeout(t)})}function zw(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}function Bw(e,t){this.v=e,this.k=t}function Vw(e){return new Bw(e,0)}function Hw(e){return function(){return new Uw(e.apply(this,arguments))}}function Uw(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Bw;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`?`return`:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(a.done?`return`:`normal`,n)},function(e){r(`throw`,e)})}catch(e){i(`throw`,e)}}function i(e,i){switch(e){case`return`:t.resolve({value:i,done:!0});break;case`throw`:t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}Uw.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},Uw.prototype.next=function(e){return this._invoke(`next`,e)},Uw.prototype.throw=function(e){return this._invoke(`throw`,e)},Uw.prototype.return=function(e){return this._invoke(`return`,e)};function Ww(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Gw=0,Kw=1,qw=0,Jw=1,Yw=0,Xw=1,Zw=2,Qw=class extends Error{constructor(e){super(`Received error from server`),this.data=e}},$w=e=>({getReader(){return new ReadableStream({start(t){e.on(`data`,e=>{t.enqueue(e)}),e.on(`end`,()=>{t.close()}),e.on(`error`,e=>{t.error(e)})}}).getReader()}});function eT(e){let t=`getReader`in e?e.getReader():$w(e).getReader(),n=``;return new ReadableStream({async pull(e){let{done:n,value:r}=await t.read();n?e.close():e.enqueue(r)},cancel(){return t.cancel()}}).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform(e,t){n+=e;let r=n.split(`
51
+ `);n=r.pop()??``;for(let e of r)t.enqueue(e)}}))}function tT(e){let t=eT(e),n=!1;return t.pipeThrough(new TransformStream({transform(e,t){if(n){let n=JSON.parse(e);t.enqueue(n)}else{let r=JSON.parse(e);t.enqueue(r),n=!0}}}))}function nT(e){let t=new Map;function n(){return Array.from(t.values()).every(e=>e.closed)}function r(){let t,r=new ReadableStream({start(e){t=e}}),i={enqueue:e=>t.enqueue(e),close:()=>{t.close(),a(),n()&&e.abort()},closed:!1,getReaderResource:()=>{let e=r.getReader();return Fw(e,()=>{i.close(),e.releaseLock()})},error:e=>{t.error(e),a()}};function a(){Object.assign(i,{closed:!0,close:()=>{},enqueue:()=>{},getReaderResource:null,error:()=>{}})}return i}function i(e){let n=t.get(e);return n||(n=r(),t.set(e,n)),n}function a(e){for(let n of t.values())n.error(e)}function o(){for(let e of t.values())e.close()}return{getOrCreate:i,cancelAll:a,closeAll:o}}async function rT(e){let{deserialize:t=e=>e}=e,n=tT(e.from);t&&(n=n.pipeThrough(new TransformStream({transform(e,n){n.enqueue(t(e))}})));let r=Ww(),i=nT(e.abortController);function a(t){let[n,r,a]=t,s=i.getOrCreate(a);switch(r){case Gw:return aw(async()=>{try{var t=zw();let{value:n}=await t.u(s.getReaderResource()).read(),[r,i,a]=n;switch(i){case qw:return o(a);case Jw:throw e.formatError?.call(e,{error:a})??new Qw(a)}}catch(e){t.e=e}finally{t.d()}});case Kw:return aw(Hw(function*(){try{var t=zw();let n=t.u(s.getReaderResource());for(;;){let{value:t}=yield Vw(n.read()),[r,i,a]=t;switch(i){case Xw:yield o(a);break;case Yw:return o(a);case Zw:throw e.formatError?.call(e,{error:a})??new Qw(a)}}}catch(e){t.e=e}finally{t.d()}}))}}function o(e){let[[t],...n]=e;for(let e of n){let[n]=e,r=a(e);if(n===null)return r;t[n]=r}return t}let s=()=>{r&&=(r.reject(Error(`Stream closed before head was received`)),null),i.closeAll()},c=e=>{r?.reject(e),r=null,i.cancelAll(e)};return n.pipeTo(new WritableStream({write(e){if(r){let t=e;for(let[n,r]of Object.entries(e))t[n]=o(r);r.resolve(t),r=null;return}let t=e,[n]=t;i.getOrCreate(n).enqueue(t)},close:s,abort:c})).catch(t=>{var n;(n=e.onError)==null||n.call(e,{error:t}),c(t)}),[await r.promise]}var iT=`ping`,aT=`serialized-error`,oT=`connected`,sT=`return`;async function cT(e){try{var t=zw();let n=t.u(Rw(e.timeoutMs)),r=await Dw.race([e.promise,n.start()]);return r===Lw?await e.onTimeout():r}catch(e){t.e=e}finally{t.d()}}function lT(e){let{deserialize:t=e=>e}=e,n=nw(),r=e.signal,i=null,a=()=>new ReadableStream({async start(a){let[o,s]=await Promise.all([e.url(),e.init()]),c=i=new e.EventSource(o,s);a.enqueue({type:`connecting`,eventSource:i,event:null}),c.addEventListener(oT,e=>{let t=JSON.parse(e.data);n=t,a.enqueue({type:`connected`,options:t,eventSource:c})}),c.addEventListener(aT,e=>{let n=e;a.enqueue({type:`serialized-error`,error:t(JSON.parse(n.data)),eventSource:c})}),c.addEventListener(iT,()=>{a.enqueue({type:`ping`,eventSource:c})}),c.addEventListener(sT,()=>{c.close(),a.close(),i=null}),c.addEventListener(`error`,e=>{c.readyState===c.CLOSED?a.error(e):a.enqueue({type:`connecting`,eventSource:c,event:e})}),c.addEventListener(`message`,e=>{let n=e,r={data:t(JSON.parse(n.data))};n.lastEventId&&(r.id=n.lastEventId),a.enqueue({type:`data`,data:r,eventSource:c})});let l=()=>{try{c.close(),a.close()}catch{}};r.aborted?l():r.addEventListener(`abort`,l)},cancel(){i?.close()}}),o=()=>{let e=a(),t=e.getReader();async function n(){await t.cancel(),i=null}return Iw({read(){return t.read()},async recreate(){await n(),e=a(),t=e.getReader()}},n)};return aw(Hw(function*(){try{var e=zw();let t=e.a(o());for(;;){let e=t.read(),r=n.reconnectAfterInactivityMs;r&&(e=cT({promise:e,timeoutMs:r,onTimeout:async()=>{let e={value:{type:`timeout`,ms:r,eventSource:i},done:!1};return await t.recreate(),e}}));let a=yield Vw(e);if(a.done)return a.value;yield a.value}}catch(t){e.e=t}finally{yield Vw(e.d())}}))}function uT(e){return e instanceof pT}function dT(e){return ew(e)&&ew(e.error)&&typeof e.error.code==`number`&&typeof e.error.message==`string`}function fT(e,t){return typeof e==`string`?e:ew(e)&&typeof e.message==`string`?e.message:t}var pT=class e extends Error{constructor(t,n){var r,i;let a=n?.cause;super(t,{cause:a}),ZC(this,`cause`,void 0),ZC(this,`shape`,void 0),ZC(this,`data`,void 0),ZC(this,`meta`,void 0),this.meta=n?.meta,this.cause=a,this.shape=n==null||(r=n.result)==null?void 0:r.error,this.data=n==null||(i=n.result)==null?void 0:i.error.data,this.name=`TRPCClientError`,Object.setPrototypeOf(this,e.prototype)}static from(t,n={}){let r=t;return uT(r)?(n.meta&&(r.meta=$C($C({},r.meta),n.meta)),r):dT(r)?new e(r.error.message,$C($C({},n),{},{result:r,cause:n.cause})):new e(fT(r,`Unknown error`),$C($C({},n),{},{cause:r}))}};function mT(e){let t=e;return t?`input`in t?t:{input:t,output:t}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}var hT=e=>typeof e==`function`;function gT(e){if(e)return e;if(typeof window<`u`&&hT(window.fetch))return window.fetch.bind(window);if(typeof globalThis<`u`&&hT(globalThis.fetch))return globalThis.fetch;throw Error(`No fetch implementation found`)}function _T(...e){let t=new AbortController,n=e.length,r=0,i=()=>{++r===n&&t.abort()};for(let t of e)t?.aborted?i():t?.addEventListener(`abort`,i,{once:!0});return t.signal}function vT(...e){let t=new AbortController;for(let n of e)n?.aborted?t.abort():n?.addEventListener(`abort`,()=>t.abort(),{once:!0});return t.signal}function yT(e){return{url:e.url.toString(),fetch:e.fetch,transformer:mT(e.transformer),methodOverride:e.methodOverride}}function bT(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];t[n]=r}return t}var xT={query:`GET`,mutation:`POST`,subscription:`PATCH`};function ST(e){return`input`in e?e.transformer.input.serialize(e.input):bT(e.inputs.map(t=>e.transformer.input.serialize(t)))}var CT=e=>{let t=e.url.split(`?`),n=t[0].replace(/\/$/,``)+`/`+e.path,r=[];if(t[1]&&r.push(t[1]),`inputs`in e&&r.push(`batch=1`),e.type===`query`||e.type===`subscription`){let t=ST(e);t!==void 0&&e.methodOverride!==`POST`&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(n+=`?`+r.join(`&`)),n},wT=e=>{if(e.type===`query`&&e.methodOverride!==`POST`)return;let t=ST(e);return t===void 0?void 0:JSON.stringify(t)},TT=class extends Error{constructor(){let e=`AbortError`;super(e),this.name=e,this.message=e}},ET=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)==null||t.call(e),typeof DOMException<`u`?new DOMException(`AbortError`,`AbortError`):new TT};async function DT(e){ET(e.signal);let t=e.getUrl(e),n=e.getBody(e),r=e.methodOverride??xT[e.type],i=await(async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),a=$C($C($C({},e.contentTypeHeader&&r!==`GET`?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{[e.trpcAcceptHeaderKey??`trpc-accept`]:e.trpcAcceptHeader}:void 0),i);return gT(e.fetch)(t,{method:r,signal:e.signal,body:n,headers:a})}var OT=()=>{throw Error(`Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new`)};function kT(e){let t=null,n=null,r=()=>{clearTimeout(n),n=null,t=null};function i(t){let n=[[]],r=0;for(;;){let o=t[r];if(!o)break;let s=n[n.length-1];if(o.aborted){var i;(i=o.reject)==null||i.call(o,Error(`Aborted`)),r++}else if(e.validate(s.concat(o).map(e=>e.key)))s.push(o),r++;else if(s.length===0){var a;(a=o.reject)==null||a.call(o,Error(`Input is too big for a single dispatch`)),r++}else n.push([])}return n}function a(){let n=i(t);r();for(let t of n){if(!t.length)continue;let n={items:t};for(let e of t)e.batch=n;e.fetch(n.items.map(e=>e.key)).then(async e=>{await Promise.all(e.map(async(e,t)=>{let r=n.items[t];try{var i;let t=await Promise.resolve(e);(i=r.resolve)==null||i.call(r,t)}catch(e){var a;(a=r.reject)==null||a.call(r,e)}r.batch=null,r.reject=null,r.resolve=null}));for(let e of n.items){var t;(t=e.reject)==null||t.call(e,Error(`Missing result`)),e.batch=null}}).catch(e=>{for(let r of n.items){var t;(t=r.reject)==null||t.call(r,e),r.batch=null}})}}function o(e){let r={aborted:!1,key:e,batch:null,resolve:OT,reject:OT},i=new Promise((e,n)=>{r.reject=n,r.resolve=e,t??=[],t.push(r)});return n??=setTimeout(a),i}return{load:o}}var AT=(e,...t)=>typeof e==`function`?e(...t):e;function jT(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}async function MT(e){let t=await AT(e.url);return e.connectionParams?t+`${t.includes(`?`)?`&`:`?`}connectionParams=1`:t}async function NT(e,t){let n={method:`connectionParams`,data:await AT(e)};return t.encode(n)}function PT(e){let{promise:t,resolve:n,reject:r}=jT();return e.addEventListener(`open`,()=>{e.removeEventListener(`error`,r),n()}),e.addEventListener(`error`,r),t}function FT(e,{intervalMs:t,pongTimeoutMs:n}){let r,i;function a(){r=setTimeout(()=>{e.send(`PING`),i=setTimeout(()=>{e.close()},n)},t)}function o(){clearTimeout(r),a()}function s(){clearTimeout(i),o()}e.addEventListener(`open`,a),e.addEventListener(`message`,({data:e})=>{clearTimeout(r),a(),e===`PONG`&&s()}),e.addEventListener(`close`,()=>{clearTimeout(r),clearTimeout(i)})}ZC(class e{constructor(t){if(ZC(this,`id`,++e.connectCount),ZC(this,`WebSocketPonyfill`,void 0),ZC(this,`urlOptions`,void 0),ZC(this,`keepAliveOpts`,void 0),ZC(this,`encoder`,void 0),ZC(this,`wsObservable`,UC(null)),ZC(this,`openPromise`,null),this.WebSocketPonyfill=t.WebSocketPonyfill??WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive,this.encoder=t.encoder}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){if(this.openPromise)return this.openPromise;this.id=++e.connectCount;let t=MT(this.urlOptions).then(e=>new this.WebSocketPonyfill(e));this.openPromise=t.then(async e=>{this.ws=e,e.binaryType=`arraybuffer`,e.addEventListener(`message`,function({data:e}){e===`PING`&&this.send(`PONG`)}),this.keepAliveOpts.enabled&&FT(e,this.keepAliveOpts),e.addEventListener(`close`,()=>{this.ws===e&&(this.ws=null)}),await PT(e),this.urlOptions.connectionParams&&e.send(await NT(this.urlOptions.connectionParams,this.encoder))});try{await this.openPromise}finally{this.openPromise=null}}async close(){try{await this.openPromise}finally{var e;(e=this.ws)==null||e.close()}}},`connectCount`,0);var IT=class{constructor(e){ZC(this,`links`,void 0),ZC(this,`runtime`,void 0),ZC(this,`requestId`,void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){return GC({links:this.links,op:$C($C({},e),{},{context:e.context??{},id:++this.requestId})}).pipe(HC())}async requestAsPromise(e){try{return(await VC(this.$request(e))).result.data}catch(e){throw pT.from(e)}}query(e,t,n){return this.requestAsPromise({type:`query`,path:e,input:t,context:n?.context,signal:n?.signal})}mutation(e,t,n){return this.requestAsPromise({type:`mutation`,path:e,input:t,context:n?.context,signal:n?.signal})}subscription(e,t,n){return this.$request({type:`subscription`,path:e,input:t,context:n.context,signal:n.signal}).subscribe({next(e){switch(e.result.type){case`state`:var t;(t=n.onConnectionStateChange)==null||t.call(n,e.result);break;case`started`:var r;(r=n.onStarted)==null||r.call(n,{context:e.context});break;case`stopped`:var i;(i=n.onStopped)==null||i.call(n);break;case`data`:case void 0:var a;(a=n.onData)==null||a.call(n,e.result.data)}},error(e){var t;(t=n.onError)==null||t.call(n,e)},complete(){var e;(e=n.onComplete)==null||e.call(n)}})}},LT=Symbol.for(`trpc_untypedClient`),RT={query:`query`,mutate:`mutation`,subscribe:`subscription`},zT=e=>RT[e];function BT(e){let t=dw(({path:t,args:n})=>{let r=[...t],i=zT(r.pop()),a=r.join(`.`);return e[i](a,...n)});return fw(n=>n===LT?e:t[n])}function VT(e){return BT(new IT(e))}function HT(e){return e[LT]}function UT(e){let t=yT(e),n=e.maxURLLength??1/0,r=e.maxItems??1/0;return()=>{let i=i=>({validate(e){if(n===1/0&&r===1/0)return!0;if(e.length>r)return!1;let a=e.map(e=>e.path).join(`,`),o=e.map(e=>e.input);return CT($C($C({},t),{},{type:i,path:a,inputs:o,signal:null})).length<=n},async fetch(n){let r=n.map(e=>e.path).join(`,`),a=n.map(e=>e.input),o=_T(...n.map(e=>e.signal)),s=new AbortController,c=await DT($C($C({},t),{},{signal:vT(o,s.signal),type:i,contentTypeHeader:`application/json`,trpcAcceptHeader:`application/jsonl`,trpcAcceptHeaderKey:e.streamHeader??`trpc-accept`,getUrl:CT,getBody:wT,inputs:a,path:r,headers(){return e.headers?typeof e.headers==`function`?e.headers({opList:n}):e.headers:{}}}));if(!c.ok){let e=await c.json();return`error`in e&&(e.error=t.transformer.output.deserialize(e.error)),n.map(()=>Promise.resolve({json:e,meta:{response:c}}))}let[l]=await rT({from:c.body,deserialize:e=>t.transformer.output.deserialize(e),formatError(e){let t=e.error;return pT.from({error:t})},abortController:s});return Object.keys(n).map(async e=>{let t=await Promise.resolve(l[e]);if(`result`in t){let e=await Promise.resolve(t.result);t={result:{data:await Promise.resolve(e.data)}}}return{json:t,meta:{response:c}}})}}),a={query:kT(i(`query`)),mutation:kT(i(`mutation`))};return({op:e})=>zC(t=>{if(e.type===`subscription`)throw Error("Subscriptions are unsupported by `httpBatchStreamLink` - use `httpSubscriptionLink` or `wsLink`");let n=new AbortController,r=a[e.type].load($C($C({},e),{},{signal:vT(e.signal,n.signal)})),i=!1,o;return r.then(e=>{i=!0,o=e,`error`in e.json?t.error(pT.from(e.json,{meta:e.meta})):(`result`in e.json&&t.next({context:e.meta,result:e.json.result}),t.complete())}).catch(e=>{i=!0,t.error(pT.from(e,{meta:o?.meta}))}),()=>{i||n.abort()}})}}function WT(e,t){return!t||e!=null&&typeof e!=`object`?e:$C($C({},e??{}),{},{lastEventId:t})}function GT(e){var t,n,r,i=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&(t=e[n])!=null)return t.call(e);if(r&&(t=e[r])!=null)return new KT(t.call(e));n=`@@asyncIterator`,r=`@@iterator`}throw TypeError(`Object is not async iterable`)}function KT(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return KT=function(e){this.s=e,this.n=e.next},KT.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new KT(e)}async function qT(e){let t=await AT(e.url);if(e.connectionParams){let n=await AT(e.connectionParams),r=t.includes(`?`)?`&`:`?`;t+=r+`connectionParams=`+encodeURIComponent(JSON.stringify(n))}return t}function JT(e){let t=mT(e.transformer);return()=>({op:n})=>zC(r=>{let{type:i,path:a,input:o}=n;if(i!==`subscription`)throw Error(`httpSubscriptionLink only supports subscriptions`);let s,c=new AbortController,l=lT({url:async()=>CT({transformer:t,url:await qT(e),input:WT(o,s),path:a,type:i,signal:null}),init:()=>AT(e.eventSourceOptions,{op:n}),signal:vT(n.signal,c.signal),deserialize:e=>t.output.deserialize(e),EventSource:e.EventSource??globalThis.EventSource}),u=UC({type:`state`,state:`connecting`,error:null}),d=u.subscribe({next(e){r.next({result:e})}});return aw(async()=>{var e=!1,t=!1,n;try{for(var i=GT(l),a;e=!(a=await i.next()).done;e=!1){let e=a.value;switch(e.type){case`ping`:break;case`data`:let t=e.data,n;t.id?(s=t.id,n={id:t.id,data:t}):n={data:t.data},r.next({result:n,context:{eventSource:e.eventSource}});break;case`connected`:r.next({result:{type:`started`},context:{eventSource:e.eventSource}}),u.next({type:`state`,state:`pending`,error:null});break;case`serialized-error`:{let t=pT.from({error:e.error});if(sw.includes(e.error.code)){u.next({type:`state`,state:`connecting`,error:t});break}throw t}case`connecting`:{let t=u.get(),n=e.event&&pT.from(e.event);if(!n&&t.state===`connecting`)break;u.next({type:`state`,state:`connecting`,error:n});break}case`timeout`:u.next({type:`state`,state:`connecting`,error:new pT(`Timeout of ${e.ms}ms reached while waiting for a response`)})}}}catch(e){t=!0,n=e}finally{try{e&&i.return!=null&&await i.return()}finally{if(t)throw n}}r.next({result:{type:`stopped`}}),u.next({type:`state`,state:`idle`,error:null}),r.complete()}).catch(e=>{r.error(pT.from(e))}),()=>{r.complete(),c.abort(),d.unsubscribe()}})}function YT(e,t){this.v=e,this.k=t}function XT(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof YT;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`?`return`:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(a.done?`return`:`normal`,n)},function(e){r(`throw`,e)})}catch(e){i(`throw`,e)}}function i(e,i){switch(e){case`return`:t.resolve({value:i,done:!0});break;case`throw`:t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}XT.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},XT.prototype.next=function(e){return this._invoke(`next`,e)},XT.prototype.throw=function(e){return this._invoke(`throw`,e)},XT.prototype.return=function(e){return this._invoke(`return`,e)};function ZT(e){"@babel/helpers - typeof";return ZT=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ZT(e)}function QT(e,t){if(ZT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ZT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $T(e){var t=QT(e,`string`);return ZT(t)==`symbol`?t:t+``}function eE(e,t,n){return(t=$T(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tE(Object(n),!0).forEach(function(t){eE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rE(e){var t,n,r,i=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&(t=e[n])!=null)return t.call(e);if(r&&(t=e[r])!=null)return new iE(t.call(e));n=`@@asyncIterator`,r=`@@iterator`}throw TypeError(`Object is not async iterable`)}function iE(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return iE=function(e){this.s=e,this.n=e.next},iE.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new iE(e)}function aE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function oE(e,t){if(e==null)return{};var n,r,i=aE(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var sE=[`cursor`,`direction`];function cE(e){return{path:e.path.join(`.`)}}function lE(e){return e.length>=3}function uE(e){return lE(e)?{type:`prefixed`,prefix:e[0],path:e[1],args:e[2]}:{type:`unprefixed`,prefix:void 0,path:e[0],args:e[1]}}function dE(e,t,n){let r=uE(e),i=r.args?.input;return n&&(i=nE(nE(nE({},r.args?.input??{}),n.pageParam===void 0?{}:{cursor:n.pageParam}),{},{direction:n.direction})),[r.path.join(`.`),i,t?.trpc]}async function fE(e,t,n){let r=t.getQueryCache().build(t,{queryKey:n});r.setState({data:[],status:`success`});let i=[];var a=!1,o=!1,s;try{for(var c=rE(e),l;a=!(l=await c.next()).done;a=!1){let e=l.value;i.push(e),r.setState({data:[...i]})}}catch(e){o=!0,s=e}finally{try{a&&c.return!=null&&await c.return()}finally{if(o)throw s}}return i}function pE(e){let t=aw(()=>{let{input:t,type:n}=e,r=e.path.flatMap(e=>e.split(`.`));if(!t&&n===`any`)return r.length?[r]:[];if(n===`infinite`&&ew(t)&&(`direction`in t||`cursor`in t)){let{cursor:e,direction:n}=t;return[r,{input:oE(t,sE),type:`infinite`}]}return[r,nE(nE({},t!==void 0&&t!==__&&{input:t}),n&&n!==`any`&&{type:n})]});return e.prefix&&t.unshift([e.prefix]),t}function mE(e){let t=[e.path.flatMap(e=>e.split(`.`))];return e.prefix&&t.unshift([e.prefix]),t}function hE(e){return tw(e)?e():e}function gE(e){let{input:t,query:n,path:r,queryKey:i,opts:a}=e,o=t===__;return Object.assign(mv(nE(nE({},a??{}),{},{queryKey:i,queryFn:o?__:async e=>{var t;let r=nE(nE({},a),{},{trpc:nE(nE({},a?.trpc),a!=null&&(t=a.trpc)!=null&&t.abortOnUnmount?{signal:e.signal}:{signal:null})});return await n(...dE(i,r,{direction:e.direction,pageParam:e.pageParam}))},initialPageParam:a?.initialCursor??t?.cursor})),{trpc:cE({path:r})})}function _E(e){let{mutate:t,path:n,prefix:r,opts:i,overrides:a}=e,o=hE(e.queryClient),s=mE({path:n,prefix:i?.keyPrefix??r}),c=o.defaultMutationOptions(o.getMutationDefaults(s)),l=a?.onSuccess??(e=>e.originalFn());return nE(nE({},i),{},{mutationKey:s,mutationFn:async e=>await t(...dE([...s,{input:e}],i)),onSuccess(...e){return l({originalFn:()=>{var t,n;return(i==null||(t=i.onSuccess)==null?void 0:t.call(i,...e))??(c==null||(n=c.onSuccess)==null?void 0:n.call(c,...e))},queryClient:o,meta:i?.meta??c?.meta??{}})},trpc:cE({path:n})})}function vE(e){let{input:t,query:n,path:r,queryKey:i,opts:a}=e,o=hE(e.queryClient),s=t===__;return Object.assign(pv(nE(nE({},a),{},{queryKey:i,queryFn:s?__:async e=>{var t;let r=nE(nE({},a),{},{trpc:nE(nE({},a?.trpc),a!=null&&(t=a.trpc)!=null&&t.abortOnUnmount?{signal:e.signal}:{signal:null})}),i=e.queryKey,s=await n(...dE(i,r));return iw(s)?fE(s,o,i):s}})),{trpc:cE({path:r})})}var yE=e=>{let{subscribe:t,path:n,queryKey:r,input:i,opts:a={}}=e,o=`enabled`in a?!!a.enabled:i!==__;return nE(nE({},a),{},{enabled:o,subscribe:e=>t(n.join(`.`),i===__?void 0:i,e),queryKey:r,trpc:cE({path:n})})};function bE(e){let t=C.useRef(e);t.current=e;let n=C.useRef(new Set([])),r=C.useCallback(e=>{n.current.add(e)},[]),i=C.useRef(()=>{}),a=C.useCallback(()=>{var n;if((n=i.current)==null||n.call(i),u(o),!e.enabled)return;let r=e.subscribe({onStarted:()=>{var e,n;(e=(n=t.current).onStarted)==null||e.call(n),u(e=>nE(nE({},e),{},{status:`pending`,error:null}))},onData:e=>{var n,r;(n=(r=t.current).onData)==null||n.call(r,e),u(t=>nE(nE({},t),{},{status:`pending`,data:e,error:null}))},onError:e=>{var n,r;(n=(r=t.current).onError)==null||n.call(r,e),u(t=>nE(nE({},t),{},{status:`error`,error:e}))},onConnectionStateChange:e=>{var n,r;(n=(r=t.current).onConnectionStateChange)==null||n.call(r,e),u(t=>{switch(e.state){case`connecting`:return nE(nE({},t),{},{status:`connecting`,error:e.error});case`pending`:return t;case`idle`:return nE(nE({},t),{},{status:`idle`,data:void 0,error:null})}})}});i.current=()=>{r.unsubscribe()}},[a_(e.queryKey),e.enabled]),o=C.useCallback(()=>e.enabled?{data:void 0,error:null,status:`connecting`,reset:a}:{data:void 0,error:null,status:`idle`,reset:a},[e.enabled,a]),s=C.useRef(o()),[c,l]=C.useState(xE(s,r));c.reset=a;let u=C.useCallback(e=>{let t=s.current,i=s.current=e(t),a=!1;for(let e of n.current)if(t[e]!==i[e]){a=!0;break}a&&l(xE(s,r))},[r]);return C.useEffect(()=>{if(e.enabled)return a(),()=>{var e;(e=i.current)==null||e.call(i)}},[a,e.enabled]),c}function xE(e,t){return new Proxy(e.current,{get(n,r){return t(r),e.current[r]}})}function SE(e){let t=e.keyPrefix,n=t=>(n,r,i)=>`router`in e?Promise.resolve(hE(e.ctx)).then(i=>Cw({router:e.router,path:n,getRawInput:async()=>r,ctx:i,type:t,signal:void 0,batchIndex:0})):(e.client instanceof IT?e.client:HT(e.client))[t](n,r,i);return dw(({args:r,path:i})=>{let a=[...i],o=a.pop(),[s,c]=r;return{"~types":void 0,pathKey:()=>pE({path:a,type:`any`,prefix:t}),pathFilter:()=>nE(nE({},s),{},{queryKey:pE({path:a,type:`any`,prefix:t})}),queryOptions:()=>vE({input:s,opts:c,path:a,queryClient:e.queryClient,queryKey:pE({path:a,input:s,type:`query`,prefix:t}),query:n(`query`)}),queryKey:()=>pE({path:a,input:s,type:`query`,prefix:t}),queryFilter:()=>nE(nE({},c),{},{queryKey:pE({path:a,input:s,type:`query`,prefix:t})}),infiniteQueryOptions:()=>gE({input:s,opts:c,path:a,queryClient:e.queryClient,queryKey:pE({path:a,input:s,type:`infinite`,prefix:t}),query:n(`query`)}),infiniteQueryKey:()=>pE({path:a,input:s,type:`infinite`,prefix:t}),infiniteQueryFilter:()=>nE(nE({},c),{},{queryKey:pE({path:a,input:s,type:`infinite`,prefix:t})}),mutationOptions:()=>_E({opts:s,path:a,prefix:t,queryClient:e.queryClient,mutate:n(`mutation`),overrides:e.overrides?.mutations}),mutationKey:()=>mE({path:a,prefix:t}),subscriptionOptions:()=>yE({opts:c,path:a,input:s,queryKey:pE({path:a,input:s,type:`any`,prefix:t}),subscribe:n(`subscription`)})}[o]()})}function CE(){let e=C.createContext(null),t=C.createContext(null),n=n=>{let r=C.useMemo(()=>SE({client:n.trpcClient,queryClient:n.queryClient,keyPrefix:n.keyPrefix}),[n.trpcClient,n.queryClient,n.keyPrefix]);return C.createElement(e.Provider,{value:n.trpcClient},C.createElement(t.Provider,{value:r},n.children))};n.displayName=`TRPCProvider`;function r(){let e=C.useContext(t);if(!e)throw Error(`useTRPC() can only be used inside of a <TRPCProvider>`);return e}function i(){let t=C.useContext(e);if(!t)throw Error(`useTRPCClient() can only be used inside of a <TRPCProvider>`);return t}return{TRPCProvider:n,useTRPC:r,useTRPCClient:i}}var{TRPCProvider:wE,useTRPC:TE,useTRPCClient:EE}=CE(),DE=new $_({defaultOptions:{queries:{staleTime:3e5,gcTime:18e5,refetchOnWindowFocus:!1,retry:(e,t)=>e<2&&!/NOT_FOUND|UNAUTHORIZED|FORBIDDEN/.test(String(t))}}}),OE=VT({links:[qC({condition:e=>e.type===`subscription`,true:JT({url:`/trpc`}),false:UT({url:`/trpc`,maxURLLength:4e3})})]});function kE(){let e=TE(),t=iS(),n=fv({...e.viewer.queryOptions(),staleTime:1/0,retry:!1}),r=fv({...e.inbox.get.queryOptions(),enabled:n.isSuccess}),i=fv({...e.rateLimit.queryOptions(),refetchInterval:3e4,enabled:n.isSuccess}),a=(0,C.useMemo)(()=>{let e=new Set,n=[{id:`inbox`,label:`Inbox`,description:`Retour à la liste`,onClick:()=>void t({to:`/`})},{id:`settings`,label:`Repos suivis`,description:`Ajouter ou retirer des repos / orgs`,onClick:()=>void t({to:`/settings`})}];for(let i of r.data?.sections??[])for(let r of i.prs)e.has(r.id)||(e.add(r.id),n.push({id:r.id,label:r.title,description:`${r.owner}/${r.repo}#${r.number} · ${r.author?.login??`ghost`}`,onClick:()=>void t({to:`/$owner/$repo/pull/$number`,params:{owner:r.owner,repo:r.repo,number:String(r.number)}})}));return n},[r.data,t]);if(n.isPending)return(0,W.jsx)(ep,{h:`100vh`,children:(0,W.jsx)(kl,{})});if(n.isError){let e=n.error instanceof pT&&n.error.data==null;return(0,W.jsx)(ep,{h:`100vh`,children:(0,W.jsxs)(nh,{align:`center`,maw:560,children:[(0,W.jsx)(zh,{order:3,children:e?`Session absente`:`Erreur`}),e?(0,W.jsxs)(Z,{c:`dimmed`,ta:`center`,children:[`Ouvrez l’URL `,(0,W.jsx)(lp,{children:`/auth?token=…`}),` affichée dans le terminal au démarrage du serveur.`]}):(0,W.jsx)(Z,{c:`red`,children:n.error.message})]})})}let o=i.data?.find(e=>e.resource===`graphql`);return(0,W.jsxs)(`div`,{className:`app`,children:[(0,W.jsxs)(`header`,{className:`topbar`,children:[(0,W.jsxs)(sf,{component:yS,to:`/`,underline:`never`,c:`gray.3`,fw:700,children:[`better`,(0,W.jsx)(Z,{span:!0,c:`blue.4`,inherit:!0,children:`·`}),`review`]}),(0,W.jsxs)(Oc,{className:`topbar-search`,onClick:pC.open,children:[(0,W.jsx)(Z,{size:`sm`,c:`dimmed`,children:`Aller à une PR…`}),(0,W.jsx)(Bp,{size:`xs`,children:`Ctrl K`})]}),(0,W.jsx)(`div`,{style:{flex:1}}),(0,W.jsxs)(ql,{gap:`md`,children:[(0,W.jsx)(sf,{component:yS,to:`/settings`,size:`sm`,c:`dimmed`,children:`Repos suivis`}),o&&(0,W.jsx)(Jm,{label:`Quota GraphQL, réinitialisé ${new Date(o.resetAt).toLocaleTimeString(`fr`)}`,children:(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`API `,o.remaining.toLocaleString(`fr`),` / `,o.limit.toLocaleString(`fr`)]})}),(0,W.jsx)(Jm,{label:n.data.login,children:(0,W.jsx)(Bf,{src:n.data.avatarUrl,size:26})})]})]}),(0,W.jsx)(RC,{actions:a,nothingFound:`Aucun résultat`,highlightQuery:!0,limit:30,searchProps:{placeholder:`PR, repo, auteur…`},shortcut:[`mod + K`]}),(0,W.jsx)(PS,{})]})}var AE=new Intl.RelativeTimeFormat(`fr`,{numeric:`auto`,style:`short`}),jE=[[`year`,31536e6],[`month`,2592e6],[`week`,6048e5],[`day`,864e5],[`hour`,36e5],[`minute`,6e4]];function ME(e,t=Date.now()){let n=(typeof e==`number`?e:Date.parse(e))-t;for(let[e,t]of jE)if(Math.abs(n)>=t)return AE.format(Math.round(n/t),e);return`à l’instant`}function NE(e,t=Date.now()){let n=t-Date.parse(e);return n>=864e5?`${Math.floor(n/864e5)} j`:n>=36e5?`${Math.floor(n/36e5)} h`:`${Math.max(1,Math.floor(n/6e4))} min`}var PE={APPROVED:{label:`approuvé`,color:`green`},CHANGES_REQUESTED:{label:`changements demandés`,color:`red`},COMMENTED:{label:`commenté`,color:`gray`},DISMISSED:{label:`rejeté`,color:`gray`},PENDING:{label:`en attente`,color:`yellow`},REQUESTED:{label:`demandé`,color:`yellow`}},FE={SUCCESS:{label:`CI ok`,color:`green`},FAILURE:{label:`CI en échec`,color:`red`},ERROR:{label:`CI en erreur`,color:`red`},PENDING:{label:`CI en cours`,color:`yellow`},EXPECTED:{label:`CI attendue`,color:`yellow`}},IE={requested:{title:`Review demandée`,group:`Reviewer`},rereview:{title:`À re-relire`,hint:`déjà reviewées, nouveaux commits depuis`,group:`Reviewer`},involved:{title:`Je participe`,group:`Reviewer`},"mine-todo":{title:`Retours à traiter`,hint:`threads qui attendent ma réponse`,group:`Auteur`},"mine-waiting":{title:`En attente de review`,group:`Auteur`},"mine-ready":{title:`Prêtes à merger`,group:`Auteur`},"mine-draft":{title:`Brouillons`,group:`Auteur`},stale:{title:`Stagnantes`,hint:`sans activité récente`,group:`Lead`},unreviewed:{title:`Sans reviewer`,hint:`aucune review demandée ni reçue`,group:`Lead`}},LE=[`requested`,`rereview`,`mine-todo`,`involved`],RE=[`Reviewer`,`Auteur`,`Lead`];function zE(){let e=TE(),t=Gg(),n=iS(),{section:r}=rS({from:`/`}),i=fv(e.inbox.get.queryOptions()),a=fv(e.config.get.queryOptions()),[o,s]=(0,C.useState)(`all`),[c,l]=(0,C.useState)(0);bE(e.inbox.onChange.subscriptionOptions(void 0,{onData:()=>void t.invalidateQueries({queryKey:e.inbox.get.queryKey()})}));let u=(0,C.useMemo)(()=>{let e=i.data?.sections??[],t=e=>o===`all`||(o===`unread`?e.unread:e.files.viewed<e.files.total);return e.filter(e=>!r||e.id===r).map(e=>({...e,prs:e.prs.filter(t)}))},[i.data,o,r]),d=(0,C.useMemo)(()=>u.flatMap(e=>e.prs),[u]),f=e=>e&&void n({to:`/$owner/$repo/pull/$number`,params:{owner:e.owner,repo:e.repo,number:String(e.number)}});lt([[`j`,()=>l(e=>Math.min(e+1,d.length-1))],[`k`,()=>l(e=>Math.max(e-1,0))],[`Enter`,()=>f(d[c])],[`o`,()=>d[c]&&window.open(d[c].url,`_blank`)]]);let p=(0,C.useMemo)(()=>{let e={};for(let t of i.data?.sections??[])e[t.id]={total:t.prs.length,unread:t.prs.filter(e=>e.unread).length};return e},[i.data]),m=LE.reduce((e,t)=>e+(p[t]?.total??0),0);return(0,W.jsxs)(`div`,{className:`inbox`,children:[(0,W.jsxs)(`nav`,{className:`inbox-side`,children:[(0,W.jsx)(om,{label:`Tout`,active:!r,onClick:()=>void n({to:`/`,search:{}}),rightSection:(0,W.jsx)(BE,{n:m,hot:!0})}),RE.map(e=>(0,W.jsxs)(`div`,{children:[(0,W.jsx)(Z,{size:`xs`,tt:`uppercase`,c:`dimmed`,fw:600,mt:`md`,mb:4,px:`sm`,children:e}),Object.keys(IE).filter(t=>IE[t].group===e).map(e=>(0,W.jsx)(om,{label:IE[e].title,active:r===e,onClick:()=>void n({to:`/`,search:{section:e}}),rightSection:(0,W.jsx)(BE,{n:p[e]?.total??0,hot:(p[e]?.unread??0)>0})},e))]},e)),(0,W.jsx)(Z,{size:`xs`,tt:`uppercase`,c:`dimmed`,fw:600,mt:`md`,mb:4,px:`sm`,children:`Suivis`}),a.data?.orgs.map(e=>(0,W.jsxs)(Z,{size:`sm`,px:`sm`,py:2,children:[e,` `,(0,W.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,children:`(org)`})]},e)),a.data?.repos.map(e=>(0,W.jsx)(Z,{size:`sm`,px:`sm`,py:2,truncate:!0,children:e},e)),(0,W.jsx)(sf,{component:yS,to:`/settings`,size:`sm`,px:`sm`,display:`block`,mt:4,children:`+ suivre un repo / une org`})]}),(0,W.jsxs)(`main`,{className:`inbox-main`,children:[(0,W.jsxs)(ql,{mb:`md`,gap:`sm`,children:[(0,W.jsx)(Qm,{size:`xs`,value:o,onChange:e=>s(e),data:[{value:`all`,label:`Toutes`},{value:`unread`,label:`Non lues`},{value:`unviewed`,label:`Non vues à 100 %`}]}),(0,W.jsx)(`div`,{style:{flex:1}}),i.isFetching&&(0,W.jsx)(kl,{size:`xs`}),i.data&&(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`synchro `,ME(i.data.fetchedAt)]}),(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[(0,W.jsx)(Bp,{size:`xs`,children:`j`}),`/`,(0,W.jsx)(Bp,{size:`xs`,children:`k`}),` naviguer · `,(0,W.jsx)(Bp,{size:`xs`,children:`↵`}),` ouvrir ·`,` `,(0,W.jsx)(Bp,{size:`xs`,children:`o`}),` GitHub`]})]}),i.isPending&&(0,W.jsx)(kl,{}),i.isError&&(0,W.jsx)($d,{color:`red`,title:`Impossible de charger l’inbox`,children:i.error.message}),i.data&&!i.data.configured&&(0,W.jsxs)($d,{title:`Aucun repo suivi`,color:`blue`,children:[`L’inbox ne montre que les repos et orgs de votre liste.`,` `,(0,W.jsx)(sf,{component:yS,to:`/settings`,children:`Ajouter des repos`})]}),u.map(e=>e.prs.length===0&&!r?null:(0,W.jsxs)(`section`,{className:`inbox-section`,children:[(0,W.jsxs)(ql,{gap:`xs`,mb:6,children:[(0,W.jsx)(Z,{fw:600,children:IE[e.id].title}),(0,W.jsx)(Uf,{size:`sm`,variant:`light`,color:LE.includes(e.id)?`orange`:`gray`,children:e.prs.length}),IE[e.id].hint&&(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`— `,IE[e.id].hint]})]}),e.prs.length===0?(0,W.jsx)(Z,{size:`sm`,c:`dimmed`,children:`Rien ici.`}):(0,W.jsx)(`div`,{className:`pr-list`,children:e.prs.map(t=>(0,W.jsx)(VE,{pr:t,sectionId:e.id,selected:d[c]===t},t.id))})]},e.id))]})]})}function BE({n:e,hot:t=!1}){return(0,W.jsx)(Z,{size:`xs`,c:t&&e>0?`orange.4`:`dimmed`,fw:t&&e>0?700:400,children:e})}function VE({pr:e,sectionId:t,selected:n}){let r=e.files.total===0?0:Math.round(e.files.viewed/e.files.total*100),i=e.ci?FE[e.ci]:null;return(0,W.jsxs)(yS,{to:`/$owner/$repo/pull/$number`,params:{owner:e.owner,repo:e.repo,number:String(e.number)},className:`pr-row`,"data-selected":n||void 0,"data-unread":e.unread||void 0,children:[(0,W.jsx)(Bf,{src:e.author?.avatarUrl,size:24}),(0,W.jsxs)(`div`,{style:{minWidth:0},children:[(0,W.jsxs)(Z,{fw:600,size:`sm`,truncate:!0,children:[(0,W.jsxs)(Z,{span:!0,c:`dimmed`,fw:400,mr:6,inherit:!0,children:[e.owner,`/`,e.repo,` #`,e.number]}),e.title]}),(0,W.jsxs)(ql,{gap:6,mt:2,wrap:`nowrap`,children:[(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[e.author?.login??`ghost`,` · mis à jour `,ME(e.updatedAt)]}),e.isDraft&&(0,W.jsx)(Uf,{size:`xs`,variant:`outline`,color:`gray`,children:`brouillon`}),t===`rereview`&&e.myReview&&(0,W.jsx)(Uf,{size:`xs`,variant:`outline`,color:`orange`,children:`nouveaux commits depuis ma review`}),e.reviews.map(e=>(0,W.jsxs)(Uf,{size:`xs`,variant:`outline`,color:PE[e.state]?.color??`gray`,children:[e.login,` : `,PE[e.state]?.label??e.state]},e.login)),e.labels.map(e=>(0,W.jsx)(Uf,{size:`xs`,variant:`dot`,color:`#${e.color}`,children:e.name},e.name))]})]}),(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[(0,W.jsxs)(Z,{span:!0,c:`green.4`,inherit:!0,children:[`+`,e.additions]}),` `,(0,W.jsxs)(Z,{span:!0,c:`red.4`,inherit:!0,children:[`−`,e.deletions]}),` `,`· `,e.changedFiles,` fichiers`]}),(0,W.jsx)(Z,{size:`xs`,c:i?.color?`${i.color}.4`:`dimmed`,children:i?.label??`pas de CI`}),(0,W.jsxs)(nh,{gap:0,children:[e.threads.total===0?(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,children:`aucun thread`}):(0,W.jsxs)(Z,{size:`xs`,c:e.threads.open>0?`yellow.4`:`dimmed`,children:[e.threads.open,` ouvert`,e.threads.open>1?`s`:``,` / `,e.threads.total]}),t.startsWith(`mine`)&&e.threads.awaitingMyReply>0&&(0,W.jsxs)(Z,{size:`xs`,c:`orange.4`,fw:600,children:[e.threads.awaitingMyReply,` attendent ma réponse`]})]}),(0,W.jsx)(Jm,{label:`${e.files.viewed} / ${e.files.total} fichiers marqués vus`,children:(0,W.jsxs)(ql,{gap:6,wrap:`nowrap`,children:[(0,W.jsx)(ym,{value:r,size:`sm`,w:50,color:`green`}),(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[r,` %`]})]})}),(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,ta:`right`,children:NE(e.createdAt)}),(0,W.jsx)(Qf,{size:`compact-xs`,variant:`subtle`,color:`gray`,"aria-label":`Ouvrir sur GitHub`,onClick:t=>{t.preventDefault(),t.stopPropagation(),window.open(e.url,`_blank`,`noopener`)},children:`↗`})]})}function HE(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function UE(e,t=`|`){return e.map(e=>mD(e)).join(t)}function WE(e,t){return typeof t==`bigint`?t.toString():t}var GE=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function KE(e){return new GE(e)}function qE(e){return e==null}function JE(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function YE(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function XE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ZE(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function QE(e){return ZE(e._zod.def)??e._zod.def.shape}function $E(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return XE(this,t,e),e},enumerable:!0,configurable:!0})}function eD(e,t,n){t in e?XE(e,t,n):e[t]=n}function tD(e,t,n,r){let i=QE(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?$E(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):eD(e,a,r?r(n.value,a):n.value))}}function nD(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?$E(e,n,()=>t[n]):eD(e,n,r.value))}}function rD(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function iD(e){return JSON.stringify(e)}function aD(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var oD=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function sD(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var cD=KE(()=>{if(iO.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function lD(e){if(sD(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return sD(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function uD(e){return lD(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var dD=new Set([`string`,`number`,`symbol`]);function fD(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function pD(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Q(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function mD(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function hD(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var gD={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},_D={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function vD(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return tD(i,e,yD(e,t)),pD(e,rD(n,{shape:i,checks:[]}))}function yD(e,t){let n=QE(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function bD(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(yD(e,t)),a={};return tD(a,e,Reflect.ownKeys(QE(e)).filter(e=>!i.has(e))),pD(e,rD(n,{shape:a,checks:[]}))}function xD(e,t){if(!lD(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=QE(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return pD(e,rD(e._zod.def,{shape:SD(e,t)}))}function SD(e,t){let n={};return tD(n,e,Reflect.ownKeys(QE(e))),nD(n,t),n}function CD(e,t){if(!lD(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return pD(e,rD(e._zod.def,{shape:SD(e,t)}))}function wD(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return tD(n,e,Reflect.ownKeys(QE(e))),tD(n,t,Reflect.ownKeys(QE(t))),pD(e,rD(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function TD(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(yD(t,n)):void 0,o={};return tD(o,t,Reflect.ownKeys(QE(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),pD(t,rD(t._zod.def,{shape:o,checks:[]}))}function ED(e,t,n){let r=n?new Set(yD(t,n)):void 0,i={};return tD(i,t,Reflect.ownKeys(QE(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),pD(t,rD(t._zod.def,{shape:i}))}function DD(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function OD(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function kD(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function AD(e){return typeof e==`string`?e:e?.message}function jD(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function MD(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function ND(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:AD(e.inst?._zod.def?.error?.(e))??AD(a?.(e))??AD(t?.error?.(e))??AD(n.customError?.(e))??AD(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var PD=/[\uD800-\uDBFF]/;function FD(e){let t=e.length;if(!PD.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function ID(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function LD(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function RD(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function zD(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):UD(e,n,r.value)}}function BD(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function VD(e,t,n){return BD(e,t,n,!1)}function HD(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return BD(this,n,r(this))},set(e){BD(this,n,e)}})}return t}function UD(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:BD(this,t,n.bind(this))},set(e){BD(this,t,e)}})}function WD(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var GD,KD=!1,qD={configurable:!0,get(){KD=!0}};function JD(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&GD!==e._zod?GD=void 0:(GD=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,qD);let e=KD;KD=!1;try{let r=n(this);return KD?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),KD||=e,r}catch(n){throw delete this[t],KD||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function YD(e,t,n,r){let i=WD(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var XD=`~constantCatch`;function ZD(e){let t=()=>e;return t[XD]=!0,t}var QD,$D={value:void 0,enumerable:!1},eO=`captureStackTrace`in Error?Error:null;function tO(e){let t=eO;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return eO=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function $(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){$D.value=new a(r);try{Object.defineProperty(n,"_zod",$D)}finally{$D.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),zD(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?tO(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var nO=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},rO=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(QD=globalThis).__zod_globalConfig??(QD.__zod_globalConfig={});var iO=globalThis.__zod_globalConfig;function aO(e){return e&&Object.assign(iO,e),iO}function oO(){let e=this._zod;return e.message??=JSON.stringify(e.def,WE,2),e.message}function sO(e){this._zod.message=e}var cO={get:oO,set:sO,enumerable:!0,configurable:!0},lO={value:void 0,enumerable:!1},uO=new WeakSet([Object.prototype,Error.prototype]),dO=$(`$ZodError`,(e,t)=>{e.name=`$ZodError`,lO.value=t,Object.defineProperty(e,"issues",lO),lO.value=void 0,Object.defineProperty(e,"message",cO);let n=Object.getPrototypeOf(e);uO.has(n)||(uO.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function fO(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function pO(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?fO(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function mO(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function hO(e,t){return{callee:t?.callee??e,Err:t?.Err}}var gO=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new nO;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ND(e,o,aO())));throw oD(n,a?.callee??t),n}return s.value};return t},_O=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>ND(e,o,aO())));throw oD(n,a?.callee??t),n}return s.value};return t},vO=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new nO;return a.issues.length?yO(e,a.issues,i):{success:!0,data:a.value}};function yO(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>ND(e,n,aO()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var bO=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?yO(e,a.issues,i):{success:!0,data:a.value}},xO=Symbol.for(`zod.compile.invalid`),SO=Symbol.for(`zod.compile.fallback`),CO=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==xO)return!0;if(r.definite===!0&&n===void 0)return!1}return wO(e,t,n)});function wO(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[SO]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new nO;return a.issues.length===0}var TO=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},EO=e=>{let t=gO(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,hO(n,a))};return n},DO=e=>{let t=gO(e),n=(e,r,i,a)=>t(e,r,i,hO(n,a));return n},OO=e=>{let t=_O(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,hO(n,a))};return n},kO=e=>{let t=_O(e),n=async(e,r,i,a)=>await t(e,r,i,hO(n,a));return n},AO=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return vO(e)(t,n,i)},jO=e=>(t,n,r)=>vO(e)(t,n,r),MO=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return bO(e)(t,n,i)},NO=e=>async(t,n,r)=>bO(e)(t,n,r),PO=/^[cC][0-9a-z]{6,}$/,FO=/^[0-9a-z]+$/,IO=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,LO=/^[0-9a-vA-V]{20}$/,RO=/^[A-Za-z0-9]{27}$/,zO=/^[a-zA-Z0-9_-]{21}$/;function BO(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var VO=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,HO=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,UO=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,WO=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,GO=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function KO(){return new RegExp(GO,`u`)}var qO=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,JO=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,YO=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,XO=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ZO=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,QO=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,$O=/^https?$/,ek=/^\+[1-9]\d{6,14}$/,tk=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function nk(e){return RegExp(`^${e}$`)}var rk=nk(tk);function ik(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ak(e){return RegExp(`^${ik(e)}$`)}function ok(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${ik({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${ik({precision:e.precision})}`:n;return RegExp(`^${tk}T(?:${r})$`)}var sk=/^[\s\S]{0,}$/,ck=/^-?\d+(?:\.\d+)?$/,lk=/^[^A-Z]*$/,uk=/^[^a-z]*$/,dk=$(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),fk=e=>{let t=e.value;return!qE(t)&&t.length!==void 0},pk={number:`number`,bigint:`bigint`,object:`date`},mk=$(`$ZodCheckLessThan`,(e,t)=>{dk.init(e,t);let n=pk[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:pk[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),hk=$(`$ZodCheckGreaterThan`,(e,t)=>{dk.init(e,t);let n=pk[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:pk[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),gk=$(`$ZodCheckMultipleOf`,(e,t)=>{dk.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):YE(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),_k=$(`$ZodCheckNumberFormat`,(e,t)=>{dk.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=gD[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),vk=$(`$ZodCheckMaxLength`,(e,t)=>{var n;dk.init(e,t),(n=e._zod.def).when??(n.when=fk),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?FD(r):i)<=t.maximum)return;let a=ID(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yk=$(`$ZodCheckMinLength`,(e,t)=>{var n;dk.init(e,t),(n=e._zod.def).when??(n.when=fk),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?FD(r):i)>=t.minimum)return;let a=ID(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bk=$(`$ZodCheckLengthEquals`,(e,t)=>{var n;dk.init(e,t),(n=e._zod.def).when??(n.when=fk),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?FD(r):i;if(a===t.length)return;let o=ID(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),xk=$(`$ZodCheckStringFormat`,(e,t)=>{var n,r;dk.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Sk=$(`$ZodCheckRegex`,(e,t)=>{xk.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ck=$(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=lk,xk.init(e,t)}),wk=$(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=uk,xk.init(e,t)}),Tk=$(`$ZodCheckIncludes`,(e,t)=>{dk.init(e,t);let n=fD(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ek=$(`$ZodCheckStartsWith`,(e,t)=>{dk.init(e,t);let n=RegExp(`^${fD(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Dk=$(`$ZodCheckEndsWith`,(e,t)=>{dk.init(e,t);let n=RegExp(`.*${fD(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ok=$(`$ZodCheckOverwrite`,(e,t)=>{dk.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),kk=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
52
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
53
+ `)}\n};`)(...Object.values(this.closed))}},Ak={major:4,minor:6,patch:7},jk=$(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ak;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=DD(t),a;for(let o of n){if(o._zod.def.when){if(OD(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new nO;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(MD(t.issues,n,e),i||=DD(t,n))});else{if(t.issues.length===n)continue;MD(t.issues,n,e),i||=DD(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(DD(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new nO;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new nO;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return VD(this,`~standard`,Pk(this))},set"~standard"(e){BD(this,`~standard`,e)}}),Mk=(e,t)=>e.issues.length?{issues:e.issues.map(e=>ND(e,t,aO()))}:{value:e.value};async function Nk(e,t){let n={async:!0};return Mk(await e._zod.run({value:t,issues:[]},n),n)}function Pk(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Mk(r,n)}catch{}return Nk(e,t)},vendor:`zod`,version:1}}var Fk=$(`$ZodString`,(e,t)=>{jk.init(e,t),e._zod.pattern=t.pattern??sk,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Ik=$(`$ZodStringFormat`,(e,t)=>{xk.init(e,t),Fk.init(e,t)}),Lk=$(`$ZodGUID`,(e,t)=>{t.pattern??=HO,Ik.init(e,t)}),Rk=$(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=UO(e)}else t.pattern??=UO();Ik.init(e,t)}),zk=$(`$ZodEmail`,(e,t)=>{t.pattern??=WO,Ik.init(e,t)});function Bk(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Vk(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Bk(e)||2:Hk(e,t)}function Hk(e,t){if(!t.normalize&&t.protocol?.source===$O.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Uk=/[\t\n\r]/g;function Wk(e){return e.replace(Uk,``)}function Gk(e,t){return t.lastIndex=0,t.test(e.hostname)}function Kk(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var qk=$(`$ZodURL`,(e,t)=>{Ik.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Vk(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Wk(r);return}t.hostname&&!Gk(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Kk(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Wk(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Jk=$(`$ZodEmoji`,(e,t)=>{t.pattern??=KO(),Ik.init(e,t)}),Yk=$(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?zO:BO(t.length),Ik.init(e,t)}),Xk=$(`$ZodCUID`,(e,t)=>{t.pattern??=PO,Ik.init(e,t)}),Zk=$(`$ZodCUID2`,(e,t)=>{t.pattern??=FO,Ik.init(e,t)}),Qk=$(`$ZodULID`,(e,t)=>{t.pattern??=IO,Ik.init(e,t)}),$k=$(`$ZodXID`,(e,t)=>{t.pattern??=LO,Ik.init(e,t)}),eA=$(`$ZodKSUID`,(e,t)=>{t.pattern??=RO,Ik.init(e,t)}),tA=$(`$ZodISODateTime`,(e,t)=>{t.pattern??=ok(t),Ik.init(e,t)}),nA=$(`$ZodISODate`,(e,t)=>{t.pattern??=rk,Ik.init(e,t)}),rA=$(`$ZodISOTime`,(e,t)=>{t.pattern??=ak(t),Ik.init(e,t)}),iA=$(`$ZodISODuration`,(e,t)=>{t.pattern??=VO,Ik.init(e,t)}),aA=$(`$ZodIPv4`,(e,t)=>{t.pattern??=qO,Ik.init(e,t)}),oA=/^[0-9a-fA-F:.]+$/;function sA(e){return oA.test(e)?Bk(`http://[${e}]`):!1}var cA=$(`$ZodIPv6`,(e,t)=>{t.pattern??=JO,Ik.init(e,t),e._zod.check=n=>{sA(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),lA=$(`$ZodCIDRv4`,(e,t)=>{t.pattern??=YO,Ik.init(e,t)});function uA(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:sA(n)}var dA=$(`$ZodCIDRv6`,(e,t)=>{t.pattern??=XO,Ik.init(e,t),e._zod.check=n=>{uA(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function fA(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var pA=/^[0-9a-zA-Z+/]*={0,2}$/,mA=$(`$ZodBase64`,(e,t)=>{t.pattern??=pA,Ik.init(e,t),e._zod.check=n=>{fA(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),hA=/^[A-Za-z0-9_-]*$/;function gA(e){if(!hA.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return fA(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var _A=$(`$ZodBase64URL`,(e,t)=>{t.pattern??=hA,Ik.init(e,t),e._zod.check=n=>{gA(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),vA=$(`$ZodE164`,(e,t)=>{t.pattern??=ek,Ik.init(e,t)});function yA(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var bA=$(`$ZodJWT`,(e,t)=>{Ik.init(e,t),e._zod.check=n=>{yA(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),xA=$(`$ZodNumber`,(e,t)=>{jk.init(e,t),e._zod.pattern=ck,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),SA=$(`$ZodNumberFormat`,(e,t)=>{_k.init(e,t),xA.init(e,t)}),CA=$(`$ZodUnknown`,(e,t)=>{jk.init(e,t),e._zod.parse=e=>e}),wA=$(`$ZodNever`,(e,t)=>{jk.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function TA(e,t){let n=jD(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of jD(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,MD(n.issues,t,e),n}}return i(n,a)}}var EA=e=>Array.isArray(e)?e.length:-1;function DA(e,t,n){e.issues.length&&t.issues.push(...kD(n,e.issues)),t.value[n]=e.value}var OA=$(`$ZodArray`,(e,t)=>{jk.init(e,t);let n=iO.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>DA(t,r,e)));else if(DA(c,r,e),s&&c.issues.length!==0&&DD(c))break}return o.length?Promise.all(o).then(()=>r):r},TA(e,EA)});function kA(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...kD(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var AA=[];function jA(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:AA,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=hD(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function MA(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(DD(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>kA(e,n,i,t,d,f))):kA(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var NA=$(`$ZodObject`,(e,t)=>{jk.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=KE(()=>jA(t));JD(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||XE(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=sD,o=t.catchall,s,c=iO.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(DD(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>kA(n,t,e,r,a,o))):kA(s,t,e,r,a,o)}return o?MA(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),PA=$(`$ZodObjectJIT`,(e,t)=>{NA.init(e,t);let n=e._zod.parse,r=KE(()=>jA(t)),i=iO.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new kk([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
54
+ let ${e}_ab = false;
55
+ for (let i = 0; i < ${e}.issues.length; i++) {
56
+ const iss = ${e}.issues[i];
57
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
58
+ payload.issues.push(iss);
59
+ if (iss.continue !== true) ${e}_ab = true;
60
+ }
61
+ if (${e}_ab && ctx && ctx.abortEarly) {
62
+ payload.value = newResult;
63
+ return payload;
64
+ }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:iD(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
65
+ const ${n}_present = ${i};
66
+ if (!${n}.issues.length || ${n}_present) {
67
+ if (${n}.issues.length) {${c(n,r)}
68
+ }
69
+
70
+ if (${e}) {
71
+ newResult[${r}] = ${n}.value;
72
+ }
73
+ }
74
+
75
+ `)}else f?(o.write(`
76
+ if (${n}.issues.length) {${c(n,r)}
77
+ }
78
+ `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
79
+ if (${n}.value !== undefined || ${i}) {
80
+ newResult[${r}] = ${n}.value;
81
+ }
82
+ `)):o.write(`
83
+ const ${n}_present = ${i};
84
+ if (${n}.issues.length) {${c(n,r)}
85
+ }
86
+ if (!${n}_present && !${n}.issues.length) {
87
+ payload.issues.push({
88
+ code: "invalid_type",
89
+ expected: "nonoptional",
90
+ input: undefined,
91
+ path: [${r}]
92
+ });
93
+ if (ctx && ctx.abortEarly) {
94
+ payload.value = newResult;
95
+ return payload;
96
+ }
97
+ }
98
+
99
+ if (${n}_present) {
100
+ newResult[${r}] = ${n}.value;
101
+ }
102
+
103
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=sD,c=!iO.jitless,l=c&&cD.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?MA([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function FA(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!DD(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ND(e,r,aO())))}),t)}var IA=$(`$ZodUnion`,(e,t)=>{jk.init(e,t),JD(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),JD(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),JD(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),JD(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>JE(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>FA(t,r,e,i)):FA(o,r,e,i)}});function LA(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var RA=$(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,IA.init(e,t);let n=e._zod.parse;JD(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||XE(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=ZE(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=KE(()=>LA(t));e._zod.parse=(i,a)=>{let o=i.value;if(!sD(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),zA=$(`$ZodIntersection`,(e,t)=>{jk.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>VA(e,t,n)):VA(e,i,a)}});function BA(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lD(e)&&lD(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=BA(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=BA(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function VA(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=BA(t.value,n.value);if(!c.valid){if(DD(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var HA=$(`$ZodEnum`,(e,t)=>{jk.init(e,t);let n=HE(t.entries),r=new Set(n);e._zod.values=r,JD(e,`pattern`,e=>{let t=HE(e.def.entries).filter(e=>dD.has(typeof e));return RegExp(t.length?`^(${t.map(e=>fD(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),UA=$(`$ZodLiteral`,(e,t)=>{jk.init(e,t);let n=new Set(t.values);e._zod.values=n,JD(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?fD(e):e?fD(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),WA=$(`$ZodTransform`,(e,t)=>{jk.init(e,t),e._zod.optin=`optional`,iO.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new rO(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new nO;return n.value=i,n}});function GA(e,t){return e.value=t.issues.length?void 0:t.value,e}var KA=$(`$ZodOptional`,(e,t)=>{jk.init(e,t),JD(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,JD(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),JD(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${JE(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>GA(e,t)):GA(e,r)}return t.innerType._zod.run(e,n)}}),qA=$(`$ZodExactOptional`,(e,t)=>{KA.init(e,t),JD(e,`values`,e=>e.def.innerType._zod.values),JD(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),JA=$(`$ZodNullable`,(e,t)=>{jk.init(e,t),JD(e,`optin`,e=>e.def.innerType._zod.optin),JD(e,`optout`,e=>e.def.innerType._zod.optout),JD(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${JE(t.source)}|null)$`):void 0}),JD(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),YA=$(`$ZodDefault`,(e,t)=>{jk.init(e,t),e._zod.optin=`defaulted`,JD(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>XA(e,t)):XA(r,t)}});function XA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ZA=$(`$ZodPrefault`,(e,t)=>{jk.init(e,t),e._zod.optin=`defaulted`,JD(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),QA=$(`$ZodNonOptional`,(e,t)=>{jk.init(e,t),JD(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>$A(t,e)):$A(i,e)}});function $A(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function ej(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>ND(e,r,aO()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var tj=$(`$ZodCatch`,(e,t)=>{jk.init(e,t),JD(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),JD(e,`optout`,e=>e.def.innerType._zod.optout),JD(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>ej(e,r,t,n)):ej(e,r,t,n)}}),nj=$(`$ZodPipe`,(e,t)=>{jk.init(e,t),JD(e,`values`,e=>e.def.in._zod.values),JD(e,`optin`,e=>e.def.in._zod.optin),JD(e,`optout`,e=>e.def.out._zod.optout),JD(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>rj(e,t.in,n)):rj(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>rj(e,t.out,n)):rj(r,t.out,n)}});function rj(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ij=$(`$ZodReadonly`,(e,t)=>{jk.init(e,t),JD(e,`propValues`,e=>e.def.innerType._zod.propValues),JD(e,`values`,e=>e.def.innerType._zod.values),JD(e,`optin`,e=>e.def.innerType?._zod?.optin),JD(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(aj):aj(r)}});function aj(e){return e.memo||(e.value=Object.freeze(e.value)),e}var oj=$(`$ZodCustom`,(e,t)=>{dk.init(e,t),jk.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>sj(t,n,r,e));sj(i,n,r,e)}});function sj(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(RD(e))}}var cj=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},lj=`~memo`,uj=[];function dj(e){return typeof e==`object`&&!!e}function fj(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var pj=new WeakMap,mj=0,hj=1,gj=2;function _j(e,t,n){let r=pj.get(e);if(r!==void 0)return r?gj:mj;if(t.has(e))return gj;t.add(e);let i=mj,a=e=>{if(i!==gj&&e?._zod){let r=_j(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=mj;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?hj:o.value?._zod?_j(o.value,t,n):mj;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=ZE(c);s(e?o(e,!0):hj),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?_j(r,t,!1):hj);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),vj(e,i)}function vj(e,t){return t!==hj&&pj.set(e,t===gj),t}function yj(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var bj,xj=[],Sj={alloc(e,t,n){let r=bj;if(!r)return n;bj=void 0;let i={value:n,issues:null};return r.set(t.value,i),xj.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&wj(n,e.value))throw new cj;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=_j(e,new Set,!1);if(i===mj)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===gj||r?n=!0:r=!0}let l=s.value;if(!dj(l))return t(s,c);let u=c[lj];u||(u={buckets:new WeakMap,backEdges:void 0},c[lj]=u);let d;i===c?d=a:(d=yj(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...fj(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;bj=d;let p=xj.length,m=t(s,c);bj=void 0;let h=xj.length>p?xj.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?fj(e.issues):uj),e)):(h&&(h.issues=m.issues.length?fj(m.issues):uj),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Cj(){return Sj}function wj(e,t){let n=e[lj]?.backEdges;return n!==void 0&&dj(t)&&n.has(t)}var Tj=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(LD(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${mD(e.values[0])}`:`Invalid option: expected one of ${UE(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${UE(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Ej(){return{localeError:Tj()}}var Dj,Oj=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function kj(){return new Oj}(Dj=globalThis).__zod_globalRegistry??(Dj.__zod_globalRegistry=kj());var Aj=globalThis.__zod_globalRegistry;function jj(e){return e.checks&&=[...e.checks],e}function Mj(e,t){return new e(jj({type:`string`,...Q(t)}))}function Nj(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Q(t)})}function Pj(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Q(t)})}function Fj(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Q(t)})}function Ij(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Q(t)})}function Lj(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Q(t)})}function Rj(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Q(t)})}function zj(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Q(t)})}function Bj(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Q(t)})}function Vj(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Q(t)})}function Hj(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Q(t)})}function Uj(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Q(t)})}function Wj(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Q(t)})}function Gj(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Q(t)})}function Kj(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Q(t)})}function qj(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Q(t)})}function Jj(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Q(t)})}function Yj(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Q(t)})}function Xj(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Q(t)})}function Zj(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Q(t)})}function Qj(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Q(t)})}function $j(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Q(t)})}function eM(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Q(t)})}function tM(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Q(t)})}function nM(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Q(t)})}function rM(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Q(t)})}function iM(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Q(t)})}function aM(e,t){return new e(jj({type:`number`,checks:[],...Q(t)}))}function oM(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Q(t)})}function sM(e){return new e({type:`unknown`})}function cM(e,t){return new e({type:`never`,...Q(t)})}function lM(e,t){return new mk({check:`less_than`,...Q(t),value:e,inclusive:!1})}function uM(e,t){return new mk({check:`less_than`,...Q(t),value:e,inclusive:!0})}function dM(e,t){return new hk({check:`greater_than`,...Q(t),value:e,inclusive:!1})}function fM(e,t){return new hk({check:`greater_than`,...Q(t),value:e,inclusive:!0})}function pM(e,t){return new gk({check:`multiple_of`,...Q(t),value:e})}function mM(e,t){return new vk({check:`max_length`,...Q(t),maximum:e})}function hM(e,t){return new yk({check:`min_length`,...Q(t),minimum:e})}function gM(e,t){return new bk({check:`length_equals`,...Q(t),length:e})}function _M(e,t){return new Sk({check:`string_format`,format:`regex`,...Q(t),pattern:e})}function vM(e){return new Ck({check:`string_format`,format:`lowercase`,...Q(e)})}function yM(e){return new wk({check:`string_format`,format:`uppercase`,...Q(e)})}function bM(e,t){return new Tk({check:`string_format`,format:`includes`,...Q(t),includes:e})}function xM(e,t){return new Ek({check:`string_format`,format:`starts_with`,...Q(t),prefix:e})}function SM(e,t){return new Dk({check:`string_format`,format:`ends_with`,...Q(t),suffix:e})}function CM(e){return new Ok({check:`overwrite`,tx:e})}function wM(e){return CM(t=>t.normalize(e))}function TM(){return CM(e=>e.trim())}function EM(){return CM(e=>e.toLowerCase())}function DM(){return CM(e=>e.toUpperCase())}function OM(){return CM(e=>aD(e))}function kM(e,t,n){return new e({type:`array`,element:t,...Q(n)})}function AM(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Q(n)})}function jM(e,t){let n=MM(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(RD(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(RD(r))}},e(t.value,t)),t);return n}function MM(e,t){let n=new dk({check:`custom`,...Q(t)});return n._zod.check=e,n}function NM(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&XE(e,t,n[t]);return e}function PM(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Aj,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function FM(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function IM(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,IM(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&NM(o.schema,c),t.io===`input`&&KM(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function LM(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function RM(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${LM(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+LM(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
104
+
105
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function zM(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;zM(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var BM=new Set([`type`,`properties`,`required`,`additionalProperties`]),VM=[`oneOf`,`anyOf`];function HM(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function UM(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!BM.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??HM(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}XE(n,r,e.length===1?e[0]:UM(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=HM(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function WM(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of BM)if(t in e)return;let n=t.filter(e=>VM.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=UM(t);else{let e=n[0],i=VM.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>UM([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,NM(e,r))}function GM(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):NM(i,s),NM(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())zM(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])WM(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}NM(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,XE(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:JM(t,`input`,e.processors),output:JM(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function KM(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return KM(r.element,n);if(r.type===`set`)return KM(r.valueType,n);if(r.type===`lazy`)return KM(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return KM(r.innerType,n);if(r.type===`intersection`)return KM(r.left,n)||KM(r.right,n);if(r.type===`record`||r.type===`map`)return KM(r.keyType,n)||KM(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:KM(r.in,n)||KM(r.out,n);if(r.type===`object`){for(let e in r.shape)if(KM(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(KM(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(KM(e,n))return!0;return!!(r.rest&&KM(r.rest,n))}return!1}var qM=(e,t={})=>n=>{let r=PM({...n,processors:t});return IM(e,r),RM(r,e),GM(r,e)},JM=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=PM({...i??{},target:a,io:t,processors:n});return IM(e,o),RM(o,e),GM(o,e)},YM=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},XM=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},ZM=(e,t)=>{YM(e,`minimum`,t),XM(e,`maximum`,t)},QM=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},$M=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},eN=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},tN=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},nN=(e,t)=>YM(e,`minimum`,t.minimum),rN=(e,t)=>XM(e,`maximum`,t.maximum),iN=e=>(t,n)=>{tN(t,n.format);let[r,i]=e[n.format];YM(t,`minimum`,r),XM(t,`maximum`,i)},aN={greater_than:(e,t)=>YM(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>XM(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>QM(e,t.value),number_format:iN(gD),bigint_format:iN(_D),min_length:nN,max_length:rN,length_equals:(e,t)=>ZM(e,t.length),min_size:nN,max_size:rN,size_equals:(e,t)=>ZM(e,t.size),string_format:(e,t)=>{tN(e,t.format),t.pattern&&$M(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>eN(e,t.mime)};function oN(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)aN[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&YM(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&YM(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&XM(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&XM(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&QM(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&eN(t,i.mime);for(let e of i.patterns??[])$M(t,e);return t}var sN={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},cN=new Map([[pA,ZO],[hA,QO]]),lN=e=>cN.get(e)??e,uN=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=oN(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=sN[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(lN);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},dN=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=oN(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):FM(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},fN=(e,t,n,r)=>{n.not={}},pN=(e,t,n,r)=>{let i=e._zod.def,a=HE(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},mN=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(FM(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(FM(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},hN=(e,t,n,r)=>{FM(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},gN=(e,t,n,r)=>{FM(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},_N=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=oN(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=IM(a.element,t,{...r,path:[...r.path,`items`]})};function vN(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?vN(t.out):t.type===`catch`?vN(t.innerType):e._zod.optin}var yN=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&FM(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)XE(i.properties,e,IM(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?vN(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=IM(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},bN=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>IM(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},xN=(e,t,n,r)=>{let i=e._zod.def,a=IM(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=IM(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},SN=(e,t,n,r)=>{let i=e._zod.def,a=IM(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},CN=(e,t,n,r)=>{let i=e._zod.def;IM(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},wN=Symbol();function TN(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(FM(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),wN):JSON.parse(o)}var EN=(e,t,n,r)=>{let i=e._zod.def;IM(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=TN(i.defaultValue,e,t,n,r);o!==wN&&(n.default=o)},DN=(e,t,n,r)=>{let i=e._zod.def;IM(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=TN(i.defaultValue,e,t,n,r);o!==wN&&(n._prefault=o)},ON=(e,t,n,r)=>{let i=e._zod.def;IM(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{FM(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},kN=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;IM(o,t,r);let s=t.seen.get(e);s.ref=o},AN=(e,t,n,r)=>{let i=e._zod.def;IM(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},jN=(e,t,n,r)=>{let i=e._zod.def;IM(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},MN=new WeakSet([Object.prototype,Error.prototype]);function NN(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var PN=$(`ZodError`,(e,t)=>{dO.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);MN.has(n)||(MN.add(n),NN(n,`format`,e=>t=>mO(e,t)),NN(n,`flatten`,e=>t=>pO(e,t)),NN(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,WE,2)}),NN(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,WE,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),FN=gO(PN),IN=_O(PN),LN=vO(PN),RN=bO(PN),zN=EO(PN),BN=DO(PN),VN=OO(PN),HN=kO(PN),UN=AO(PN),WN=jO(PN),GN=MO(PN),KN=NO(PN);function qN(){iO.localeError||aO(Ej())}function JN(){iO.memoizer||aO({memoizer:Cj()})}var YN=$(`ZodType`,(e,t)=>(qN(),jk.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(rD(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return pD(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(fF(e,t))},superRefine(e,t){return this.check(pF(e,t))},overwrite(e){return this.check(CM(e))},optional(){return JP(this)},exactOptional(){return XP(this)},nullable(){return QP(this)},nullish(){return JP(QP(this))},nonoptional(e){return iF(this,e)},array(){return MP(this)},or(e){return IP([this,e])},and(e){return BP(this,e)},transform(e){return cF(this,KP(e))},default(e){return eF(this,e)},prefault(e){return nF(this,e)},catch(e){return oF(this,e)},pipe(e){return cF(this,e)},readonly(){return uF(this)},describe(e){let t=this.clone();return Aj.add(t,{description:e}),t},meta(...e){if(e.length===0)return Aj.get(this);let t=this.clone();return Aj.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return VD(this,`~standard`,{...Pk(this),jsonSchema:{input:JM(this,`input`),output:JM(this,`output`)}})},set"~standard"(e){BD(this,`~standard`,e)},parse:function e(t,n){return FN(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await IN(this,t,n,{callee:e})},safeParse(e,t){return LN(this,e,t)},async safeParseAsync(e,t){return RN(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){BD(this,`spa`,e)},validate(e,t){return CO(this,e,t)},validateAsync(e,t){return TO(this,e,t)},encode:function e(t,n){return zN(this,t,n,{callee:e})},decode:function e(t,n){return BN(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await VN(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await HN(this,t,n,{callee:e})},safeEncode(e,t){return UN(this,e,t)},safeDecode(e,t){return WN(this,e,t)},async safeEncodeAsync(e,t){return GN(this,e,t)},async safeDecodeAsync(e,t){return KN(this,e,t)},toJSONSchema(e){return qM(this,{})(e)},get description(){return Aj.get(this)?.description},get _def(){return this._zod.def}}),XN=$(`_ZodString`,(e,t)=>{Fk.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uN(e,t,n,r)},HD({format:e=>oN(e).format??null,minLength:e=>oN(e).minimum??null,maxLength:e=>oN(e).maximum??null},{regex(...e){return this.check(_M(...e))},includes(...e){return this.check(bM(...e))},startsWith(...e){return this.check(xM(...e))},endsWith(...e){return this.check(SM(...e))},min(...e){return this.check(hM(...e))},max(...e){return this.check(mM(...e))},length(...e){return this.check(gM(...e))},nonempty(...e){return this.check(hM(1,...e))},lowercase(e){return this.check(vM(e))},uppercase(e){return this.check(yM(e))},trim(){return this.check(TM())},normalize(...e){return this.check(wM(...e))},toLowerCase(){return this.check(EM())},toUpperCase(){return this.check(DM())},slugify(){return this.check(OM())}})),ZN=$(`ZodString`,(e,t)=>{Fk.init(e,t),XN.init(e,t)},{email(e){return this.check(Nj(iP,e))},url(e){return this.check(zj(sP,e))},jwt(e){return this.check(eM(SP,e))},emoji(e){return this.check(Bj(cP,e))},guid(e){return this.check(Pj(aP,e))},uuid(e){return this.check(Fj(oP,e))},uuidv4(e){return this.check(Ij(oP,e))},uuidv6(e){return this.check(Lj(oP,e))},uuidv7(e){return this.check(Rj(oP,e))},nanoid(e){return this.check(Vj(lP,e))},cuid(e){return this.check(Hj(uP,e))},cuid2(e){return this.check(Uj(dP,e))},ulid(e){return this.check(Wj(fP,e))},base64(e){return this.check(Zj(yP,e))},base64url(e){return this.check(Qj(bP,e))},xid(e){return this.check(Gj(pP,e))},ksuid(e){return this.check(Kj(mP,e))},ipv4(e){return this.check(qj(hP,e))},ipv6(e){return this.check(Jj(gP,e))},cidrv4(e){return this.check(Yj(_P,e))},cidrv6(e){return this.check(Xj(vP,e))},e164(e){return this.check($j(xP,e))},datetime(e){return this.check(tM(eP,e))},date(e){return this.check(nM(tP,e))},time(e){return this.check(rM(nP,e))},duration(e){return this.check(iM(rP,e))}});function QN(e){return Mj(ZN,e)}var $N=$(`ZodStringFormat`,(e,t)=>{Ik.init(e,t),XN.init(e,t)}),eP=$(`ZodISODateTime`,(e,t)=>{tA.init(e,t),$N.init(e,t)}),tP=$(`ZodISODate`,(e,t)=>{nA.init(e,t),$N.init(e,t)}),nP=$(`ZodISOTime`,(e,t)=>{rA.init(e,t),$N.init(e,t)}),rP=$(`ZodISODuration`,(e,t)=>{iA.init(e,t),$N.init(e,t)}),iP=$(`ZodEmail`,(e,t)=>{zk.init(e,t),$N.init(e,t)}),aP=$(`ZodGUID`,(e,t)=>{Lk.init(e,t),$N.init(e,t)}),oP=$(`ZodUUID`,(e,t)=>{Rk.init(e,t),$N.init(e,t)}),sP=$(`ZodURL`,(e,t)=>{qk.init(e,t),$N.init(e,t)}),cP=$(`ZodEmoji`,(e,t)=>{Jk.init(e,t),$N.init(e,t)}),lP=$(`ZodNanoID`,(e,t)=>{Yk.init(e,t),$N.init(e,t)}),uP=$(`ZodCUID`,(e,t)=>{Xk.init(e,t),$N.init(e,t)}),dP=$(`ZodCUID2`,(e,t)=>{Zk.init(e,t),$N.init(e,t)}),fP=$(`ZodULID`,(e,t)=>{Qk.init(e,t),$N.init(e,t)}),pP=$(`ZodXID`,(e,t)=>{$k.init(e,t),$N.init(e,t)}),mP=$(`ZodKSUID`,(e,t)=>{eA.init(e,t),$N.init(e,t)}),hP=$(`ZodIPv4`,(e,t)=>{aA.init(e,t),$N.init(e,t)}),gP=$(`ZodIPv6`,(e,t)=>{cA.init(e,t),$N.init(e,t)}),_P=$(`ZodCIDRv4`,(e,t)=>{lA.init(e,t),$N.init(e,t)}),vP=$(`ZodCIDRv6`,(e,t)=>{dA.init(e,t),$N.init(e,t)}),yP=$(`ZodBase64`,(e,t)=>{mA.init(e,t),$N.init(e,t)}),bP=$(`ZodBase64URL`,(e,t)=>{_A.init(e,t),$N.init(e,t)}),xP=$(`ZodE164`,(e,t)=>{vA.init(e,t),$N.init(e,t)}),SP=$(`ZodJWT`,(e,t)=>{bA.init(e,t),$N.init(e,t)}),CP=$(`ZodNumber`,(e,t)=>{xA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dN(e,t,n,r),e.isFinite=!0},HD({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=oN(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=oN(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=oN(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>oN(e).format??null},{gt(e,t){return this.check(dM(e,t))},gte(e,t){return this.check(fM(e,t))},min(e,t){return this.check(fM(e,t))},lt(e,t){return this.check(lM(e,t))},lte(e,t){return this.check(uM(e,t))},max(e,t){return this.check(uM(e,t))},int(e){return this.check(EP(e))},safe(e){return this.check(EP(e))},positive(e){return this.check(dM(0,e))},nonnegative(e){return this.check(fM(0,e))},negative(e){return this.check(lM(0,e))},nonpositive(e){return this.check(uM(0,e))},multipleOf(e,t){return this.check(pM(e,t))},step(e,t){return this.check(pM(e,t))},finite(){return this}}));function wP(e){return aM(CP,e)}var TP=$(`ZodNumberFormat`,(e,t)=>{SA.init(e,t),CP.init(e,t)});function EP(e){return oM(TP,e)}var DP=$(`ZodUnknown`,(e,t)=>{CA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function OP(){return sM(DP)}var kP=$(`ZodNever`,(e,t)=>{wA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fN(e,t,n,r)});function AP(e){return cM(kP,e)}var jP=$(`ZodArray`,(e,t)=>{JN(),OA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_N(e,t,n,r),e.element=t.element},{min(e,t){return this.check(hM(e,t))},nonempty(e){return this.check(hM(1,e))},max(e,t){return this.check(mM(e,t))},length(e,t){return this.check(gM(e,t))},unwrap(){return this.element}});function MP(e,t){return kM(jP,e,t)}var NP=$(`ZodObject`,(e,t)=>{JN(),PA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yN(e,t,n,r),YD(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return HP(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(rD(this._zod.def,{catchall:e}))},passthrough(){return this.clone(rD(this._zod.def,{catchall:OP()}))},loose(){return this.clone(rD(this._zod.def,{catchall:OP()}))},strict(){return this.clone(rD(this._zod.def,{catchall:AP()}))},strip(){return this.clone(rD(this._zod.def,{catchall:void 0}))},extend(e){return xD(this,e)},safeExtend(e){return CD(this,e)},merge(e){return wD(this,e)},pick(e){return vD(this,e)},omit(e){return bD(this,e)},partial(...e){return TD(qP,this,e[0])},exactPartial(...e){return TD(YP,this,e[0],`exactPartial`)},required(...e){return ED(rF,this,e[0])}});function PP(e,t){return new NP({type:`object`,shape:e??{},...Q(t)})}var FP=$(`ZodUnion`,(e,t)=>{IA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bN(e,t,n,r),e.options=t.options});function IP(e,t){return new FP({type:`union`,options:e,...Q(t)})}var LP=$(`ZodDiscriminatedUnion`,(e,t)=>{FP.init(e,t),RA.init(e,t)});function RP(e,t,n){return new LP({type:`union`,options:t,discriminator:e,...Q(n)})}var zP=$(`ZodIntersection`,(e,t)=>{zA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xN(e,t,n,r)});function BP(e,t){return new zP({type:`intersection`,left:e,right:t})}var VP=$(`ZodEnum`,(e,t)=>{HA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pN(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new VP({...t,checks:[],...Q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new VP({...t,checks:[],...Q(r),entries:i})}});function HP(e,t){return new VP({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var UP=$(`ZodLiteral`,(e,t)=>{UA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mN(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function WP(e,t){return new UP({type:`literal`,values:Array.isArray(e)?e:[e],...Q(t)})}var GP=$(`ZodTransform`,(e,t)=>{JN(),WA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gN(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new rO(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(RD(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(RD(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function KP(e){return new GP({type:`transform`,transform:e})}var qP=$(`ZodOptional`,(e,t)=>{KA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function JP(e){return new qP({type:`optional`,innerType:e})}var YP=$(`ZodExactOptional`,(e,t)=>{qA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function XP(e){return new YP({type:`optional`,innerType:e})}var ZP=$(`ZodNullable`,(e,t)=>{JA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function QP(e){return new ZP({type:`nullable`,innerType:e})}var $P=$(`ZodDefault`,(e,t)=>{YA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function eF(e,t){return new $P({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():uD(t)}})}var tF=$(`ZodPrefault`,(e,t)=>{ZA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nF(e,t){return new tF({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():uD(t)}})}var rF=$(`ZodNonOptional`,(e,t)=>{QA.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iF(e,t){return new rF({type:`nonoptional`,innerType:e,...Q(t)})}var aF=$(`ZodCatch`,(e,t)=>{tj.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ON(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function oF(e,t){return new aF({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ZD(t)})}var sF=$(`ZodPipe`,(e,t)=>{nj.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kN(e,t,n,r),e.in=t.in,e.out=t.out});function cF(e,t){return new sF({type:`pipe`,in:e,out:t})}var lF=$(`ZodReadonly`,(e,t)=>{ij.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AN(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uF(e){return new lF({type:`readonly`,innerType:e})}var dF=$(`ZodCustom`,(e,t)=>{oj.init(e,t),YN.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hN(e,t,n,r)});function fF(e,t={}){return AM(dF,e,t)}function pF(e,t){return jM(e,t)}var mF=QN().regex(/^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9_])?$/,`Nom de compte GitHub invalide`),hF=QN().regex(/^[A-Za-z0-9._-]+$/,`Nom de repo invalide`),gF=QN().trim().regex(/^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9_])?\/[A-Za-z0-9._-]+$/,`Format attendu : owner/repo`);QN().regex(/^[0-9a-f]{7,40}$/,`SHA invalide`),PP({owner:mF,repo:hF,number:wP().int().positive()}),PP({repos:MP(gF).default([]),orgs:MP(mF).default([]),staleDays:wP().int().positive().default(5)}),IP([PP({kind:WP(`repo`),name:gF}),PP({kind:WP(`org`),name:mF})]);var _F=HP([`LEFT`,`RIGHT`]);HP([`COMMENT`,`APPROVE`,`REQUEST_CHANGES`]),RP(`subjectType`,[PP({subjectType:WP(`LINE`),path:QN().min(1),side:_F,line:wP().int().positive(),startLine:wP().int().positive().nullable(),startSide:_F.nullable(),body:QN().trim().min(1)}),PP({subjectType:WP(`FILE`),path:QN().min(1),body:QN().trim().min(1)})]);function vF(e,t){let n=new Set(e),r=new Map,i=new Map;for(let t of e)r.set(t,new Set),i.set(t,new Set);for(let e of t)e.from!==e.to&&n.has(e.from)&&n.has(e.to)&&(r.get(e.from).add(e.to),i.get(e.to).add(e.from));let a=e.filter(e=>r.get(e).size+i.get(e).size>0),o=e.filter(e=>r.get(e).size+i.get(e).size===0).sort(),s=new Map(a.map(e=>[e,r.get(e).size])),c=(e,t)=>i.get(t).size-i.get(e).size||r.get(e).size-r.get(t).size||e.localeCompare(t),l=[];for(;s.size>0;){let e;for(let[t,n]of s)n===0&&(e===void 0||c(t,e)<0)&&(e=t);if(e===void 0)for(let[t,n]of s)(e===void 0||n<s.get(e)||n===s.get(e)&&c(t,e)<0)&&(e=t);let t=e;l.push(t),s.delete(t);for(let e of i.get(t)){let t=s.get(e);t!==void 0&&s.set(e,t-1)}}return[...l,...o]}function yF(e,t,n){let r=new Set,i=[];for(let t of e)for(let e of vF(t.items,n))r.has(e)||(r.add(e),i.push(e));let a=t.filter(e=>!r.has(e));return[...i,...vF(a,n)]}function bF(e){let t=TE(),[n,r]=Ge({key:`br:draft:${e.draftKey}`,defaultValue:``}),[i,a]=(0,C.useState)(`write`),[o,s]=(0,C.useState)(null),c=(0,C.useRef)(null),l=fv({...t.markdown.queryOptions({text:n,context:e.repoContext}),enabled:i===`preview`&&n.trim()!==``,staleTime:1/0}),u=async t=>{let i=e.actions[t];if(i&&!i.disabled&&n.trim()!==``&&o===null){s(t);try{await i.run(n),r(``),e.onCancel?.()}catch{}finally{s(null)}}};return(0,W.jsxs)(J,{className:`editor`,p:8,children:[(0,W.jsxs)(jh,{value:i,onChange:a,variant:`outline`,children:[(0,W.jsxs)(jh.List,{children:[(0,W.jsx)(jh.Tab,{value:`write`,children:`Écrire`}),(0,W.jsx)(jh.Tab,{value:`preview`,children:`Aperçu`}),e.suggestionLines&&(0,W.jsx)(Qf,{ml:`auto`,size:`compact-xs`,variant:`subtle`,onClick:()=>{let t="```suggestion\n"+(e.suggestionLines??[]).join(`
106
+ `)+"\n```\n",i=c.current,o=i?.selectionStart??n.length;r(n.slice(0,o)+(o>0&&n[o-1]!==`
107
+ `?`
108
+ `:``)+t+n.slice(o)),a(`write`),requestAnimationFrame(()=>i?.focus())},children:`± suggestion`})]}),(0,W.jsx)(jh.Panel,{value:`write`,pt:6,children:(0,W.jsx)(Lp,{ref:c,autosize:!0,minRows:3,maxRows:18,autoFocus:e.autoFocus??!0,placeholder:e.placeholder??`Laisser un commentaire (Markdown)…`,value:n,onChange:e=>r(e.currentTarget.value),onKeyDown:t=>{t.key===`Enter`&&(t.ctrlKey||t.metaKey)?(t.preventDefault(),u(e.actions.length-1)):t.key===`Escape`&&(t.preventDefault(),e.onCancel?.())},styles:{input:{fontFamily:`var(--mantine-font-family-monospace)`,fontSize:13}}})}),(0,W.jsx)(jh.Panel,{value:`preview`,pt:6,children:(0,W.jsxs)(J,{mih:70,p:6,children:[n.trim()===``&&(0,W.jsx)(Z,{c:`dimmed`,children:`Rien à prévisualiser.`}),l.isFetching&&(0,W.jsx)(kl,{size:`xs`}),l.data&&(0,W.jsx)(`div`,{className:`md`,dangerouslySetInnerHTML:{__html:l.data}})]})})]}),(0,W.jsxs)(ql,{gap:6,mt:6,justify:`flex-end`,children:[(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,mr:`auto`,children:[`brouillon conservé localement · `,(0,W.jsx)(Bp,{size:`xs`,children:`Ctrl ↵`}),` envoyer · `,(0,W.jsx)(Bp,{size:`xs`,children:`Esc`}),` `,`fermer`]}),e.onCancel&&(0,W.jsx)(Qf,{size:`compact-sm`,variant:`subtle`,color:`gray`,onClick:e.onCancel,children:`Annuler`}),e.actions.map((t,r)=>(0,W.jsx)(Qf,{size:`compact-sm`,variant:t.variant??(r===e.actions.length-1?`filled`:`default`),color:t.color,disabled:t.disabled||n.trim()===``,loading:o===r,onClick:()=>void u(r),children:t.label},t.label))]})]})}var xF=(0,C.createContext)(null);function SF(){let e=(0,C.useContext)(xF);if(!e)throw Error(`usePrView must be used inside <PrViewContext>`);return e}function CF(e){return t=>ng.show({color:`red`,title:e,message:t.message})}function wF(e){let t=TE(),n=Gg(),r=t.pr.get.queryKey(e),i=e=>n.setQueryData(r,t=>t&&e(t)),a=()=>n.invalidateQueries({queryKey:r}),o=()=>{a(),n.invalidateQueries({queryKey:t.inbox.get.queryKey()})};return{setFileViewed:hv(t.pr.setFileViewed.mutationOptions({onMutate:({path:e,viewed:t})=>i(n=>({...n,files:n.files.map(n=>n.path===e?{...n,viewed:t?`VIEWED`:`UNVIEWED`}:n)})),onError:e=>{CF(`Marquage « vu » impossible`)(e),a()}})),setHunksSeen:hv(t.pr.setHunksSeen.mutationOptions({onMutate:({hunks:e,seen:t})=>i(n=>{let r=new Set(n.seenHunks);for(let n of e){let e=`${n.path}\n${n.hash}`;t?r.add(e):r.delete(e)}return{...n,seenHunks:[...r]}}),onError:CF(`Marquage du hunk impossible`)})),markThreadsRead:hv(t.pr.markThreadsRead.mutationOptions()),visit:hv(t.pr.visit.mutationOptions()),reply:hv(t.pr.reply.mutationOptions({onSuccess:o,onError:CF(`Réponse non envoyée`)})),setResolved:hv(t.pr.setResolved.mutationOptions({onMutate:({threadId:e,resolved:t})=>i(n=>({...n,threads:n.threads.map(n=>n.id===e?{...n,isResolved:t}:n)})),onSettled:o,onError:CF(`Changement de statut impossible`)})),addThread:hv(t.pr.addThread.mutationOptions({onSuccess:o,onError:CF(`Commentaire non envoyé`)})),submitReview:hv(t.pr.submitReview.mutationOptions({onSuccess:()=>{ng.show({color:`green`,message:`Review envoyée.`}),o()},onError:CF(`Review non envoyée`)})),discardReview:hv(t.pr.discardReview.mutationOptions({onSuccess:o,onError:CF(`Abandon impossible`)})),comment:hv(t.pr.comment.mutationOptions({onSuccess:o,onError:CF(`Commentaire non envoyé`)})),deleteComment:hv(t.pr.deleteComment.mutationOptions({onSuccess:o,onError:CF(`Suppression impossible`)})),updateComment:hv(t.pr.updateComment.mutationOptions({onSuccess:o,onError:CF(`Modification impossible`)})),applySuggestion:hv(t.pr.applySuggestion.mutationOptions({onSuccess:e=>{ng.show({color:`green`,message:`Suggestion appliquée (commit ${e.slice(0,7)}).`}),o()},onError:CF(`Suggestion non appliquée`)}))}}function TF(e,t,n){let r=e.comments.at(-1);return e.isResolved||!r||r.author?.login===t?!1:n===t||e.comments.some(e=>e.author?.login===t)}function EF(){let e=SF(),t=wF(e.ref),[n,r]=(0,C.useState)(`open`),i=e.me,a=e.detail.pr.author?.login,o=e.detail.threads,s={open:o.filter(e=>!e.isResolved).length,mine:o.filter(e=>TF(e,i,a)).length,unread:o.filter(e=>e.unread>0).length,all:o.length},c=o.filter(e=>n===`open`?!e.isResolved:n===`mine`?TF(e,i,a):n!==`unread`||e.unread>0);return(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`div`,{style:{padding:`10px 12px`,borderBottom:`1px solid var(--br-border)`,position:`sticky`,top:0,background:`var(--br-bg)`,zIndex:1},children:[(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,mb:6,children:[o.length,` threads · `,e.detail.timeline.length,` messages généraux`]}),(0,W.jsx)(Qm,{size:`xs`,fullWidth:!0,value:n,onChange:e=>r(e),data:[{value:`open`,label:`Ouverts ${s.open}`},{value:`mine`,label:`Ma réponse ${s.mine}`},{value:`unread`,label:`Non lus ${s.unread}`},{value:`all`,label:`Tous ${s.all}`}]})]}),c.map(t=>{let n=t.comments.at(-1);return(0,W.jsxs)(`div`,{className:`conv-item`,"data-resolved":t.isResolved||void 0,"data-current":e.focusedThread===t.id||void 0,onClick:()=>e.scrollToThread(t.id),children:[(0,W.jsxs)(ql,{gap:6,wrap:`nowrap`,children:[(0,W.jsxs)(Z,{size:`xs`,ff:`monospace`,c:`dimmed`,truncate:!0,style:{flex:1},children:[t.path,t.subjectType===`FILE`?` · fichier`:t.line===null?``:`:${t.line}`,t.isOutdated?` · outdated`:``,t.isResolved?` · résolu`:``]}),t.unread>0&&(0,W.jsxs)(Uf,{size:`xs`,color:`orange`,variant:`light`,children:[t.unread,` nouveau`,t.unread>1?`x`:``]}),t.pending&&(0,W.jsx)(Uf,{size:`xs`,color:`yellow`,variant:`light`,children:`en attente`})]}),n&&(0,W.jsxs)(Z,{size:`sm`,className:`clamp2`,my:2,children:[(0,W.jsx)(`b`,{children:n.author?.login??`ghost`}),` :`,` `,n.body.replace(/```suggestion[\s\S]*?```/g,`[suggestion]`)]}),(0,W.jsxs)(ql,{gap:4,children:[[...new Map(t.comments.map(e=>[e.author?.login,e.author])).values()].map(e=>(0,W.jsx)(Bf,{src:e?.avatarUrl,size:16},e?.login??`ghost`)),(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[t.comments.length,` message`,t.comments.length>1?`s`:``,TF(t,i,a)?` · attend ma réponse`:``]})]})]},t.id)}),c.length===0&&(0,W.jsx)(Z,{size:`sm`,c:`dimmed`,p:`md`,children:`Aucun thread pour ce filtre.`}),(0,W.jsx)(Z,{size:`xs`,tt:`uppercase`,fw:600,c:`dimmed`,px:12,pt:`md`,pb:4,children:`Conversation générale`}),(0,W.jsx)(nh,{gap:0,children:e.detail.timeline.map(e=>(0,W.jsxs)(`div`,{className:`comment`,"data-new":e.unread||void 0,children:[(0,W.jsx)(Bf,{src:e.author?.avatarUrl,size:22}),(0,W.jsxs)(`div`,{className:`comment-body`,children:[(0,W.jsxs)(ql,{gap:6,mb:2,children:[(0,W.jsx)(Z,{size:`sm`,fw:600,children:e.author?.login??`ghost`}),e.kind===`review`&&(0,W.jsxs)(Uf,{size:`xs`,variant:`light`,color:PE[e.state]?.color??`gray`,children:[`review : `,PE[e.state]?.label??e.state]}),(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,children:ME(e.createdAt)}),e.unread&&(0,W.jsx)(Uf,{size:`xs`,color:`orange`,variant:`light`,children:`nouveau`})]}),e.bodyHTML?(0,W.jsx)(`div`,{className:`md`,dangerouslySetInnerHTML:{__html:e.bodyHTML}}):(0,W.jsx)(Z,{size:`sm`,c:`dimmed`,children:`(sans message)`})]})]},e.id))}),(0,W.jsx)(bF,{draftKey:`general:${e.ref.owner}/${e.ref.repo}#${e.ref.number}`,repoContext:`${e.ref.owner}/${e.ref.repo}`,placeholder:`Commentaire général sur la PR…`,autoFocus:!1,actions:[{label:`Commenter`,run:n=>t.comment.mutateAsync({prId:e.detail.pr.id,body:n})}]})]})}function DF(){let{pr:e}=SF().detail;return(0,W.jsxs)(`div`,{className:`panel-body`,children:[(0,W.jsxs)(ql,{gap:8,mb:`sm`,children:[(0,W.jsx)(Bf,{src:e.author?.avatarUrl,size:22}),(0,W.jsx)(Z,{size:`sm`,fw:600,children:e.author?.login??`ghost`}),(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,children:ME(e.createdAt)}),(0,W.jsx)(sf,{href:e.url,target:`_blank`,size:`xs`,c:`dimmed`,ml:`auto`,children:`modifier sur GitHub ↗`})]}),e.bodyHTML?(0,W.jsx)(`div`,{className:`md`,dangerouslySetInnerHTML:{__html:e.bodyHTML}}):(0,W.jsx)(Z,{size:`sm`,c:`dimmed`,children:`Pas de description.`})]})}function OF(e){return typeof e==`object`?e.key:e}function kF(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if(typeof r==`string`){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&i<n){let n=e[i];if(typeof n!=`object`){let r=t[i*2];n=e[i]={index:i,key:n,start:r,size:t[i*2+1],end:r+t[i*2+1],lane:0}}return n}}if(r===`length`)return n}return Reflect.get(e,r,i)}})}function AF(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return(o.length!==r.length||o.some((e,t)=>r[t]!==e))&&(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1),i}return o.updateDeps=e=>{r=e},o}function jF(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var MF=(e,t)=>Math.abs(e-t)<1.01,NF=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})};function PF({offset:e,isScrolling:t,elementMax:n,holdOffset:r,scrollOffset:i,pendingWrite:a,clampedMaxAtWrite:o}){return t&&a===null&&e===i?`spurious`:a!==null&&Math.abs(e-a.target)<1.5?`readBack`:a!==null&&!a.smooth&&n!==null&&a.target>n+r+.5&&Math.abs(e-(n+r))<1.5||a!==null&&!a.smooth&&a.lowMaxes?.some(t=>Math.abs(e-t)<1.5)?`clampedReadBack`:o!==null&&Math.abs(e-o)<1.5?`clampedEcho`:`external`}var FF=e=>e===`smooth`||e===`smoothFinishing`;function IF({kind:e,offset:t,command:n,target:r}){return e!==`spurious`&&e!==`readBack`&&e!==`clampedReadBack`&&n?.index!=null&&n.phase!==`queued`&&!FF(n.phase)&&!MF(t,n.lastTargetOffset)&&!MF(t,r())&&e!==`clampedEcho`}var LF=40;function RF(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<LF;)n--;if(n<0)return!1;let r=e[n],i=n-1;for(;i>=0&&r.t-e[i].t<LF;)i--;if(i<0)return!1;let a=e[i],o=(t.offset-r.offset)/(t.t-r.t),s=(r.offset-a.offset)/(r.t-a.t);return o*s>=0&&Math.abs(o)>=2*Math.abs(s)&&Math.abs(o)-Math.abs(s)>=.8}function zF(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<LF;)n--;if(n<0)return!1;let r=e[n];return Math.abs(t.offset-r.offset)/(t.t-r.t)>=.05}var BF,VF=()=>{if(BF!==void 0)return BF;if(typeof navigator>`u`)return BF=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return BF=!0;let e=navigator.maxTouchPoints;return BF=navigator.platform===`MacIntel`&&e!==void 0&&e>0},HF,UF=()=>HF===void 0?HF=VF()&&typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`overflow-anchor: auto`):HF,WF={capture:!0,passive:!0},GF=class{constructor(e){this.host=e,this._touch=null,this.inMotion=()=>this._touch!==null&&this._touch.phase!==`lateFling`,this.dragging=()=>this._touch?.phase===`down`&&this._touch.moved,this.tail=()=>this._touch?.phase===`tail`?this._touch.moved?`fling`:`tap`:null,this.onScroll=({isScrolling:e,ownReadBack:t,moved:n,external:r})=>(e&&this._touch?.phase===`tail`?this._openTail(this._touch.moved||!t,!1):this._touch?.phase===`lateFling`&&(this.host.now()>this._touch.until?this._touch=null:r&&e&&n&&this._openTail(!0,!1)),!t&&e&&n&&this._touch?.phase===`down`?(this._touch.moved=!0,!0):!1),this.touchStart=()=>{this.end(),this._touch={phase:`down`,moved:!1}},this.touchEnd=()=>{let e=this._touch?.phase===`down`&&this._touch.moved;this.end(),this._openTail(e,e)},this.end=()=>{let e=this.host.getWindow();this._touch?.phase===`tail`&&e!=null&&e.clearTimeout(this._touch.timerId),this._touch=null},this.listen=e=>{let t=()=>this.touchStart(),n=()=>this.touchEnd();return e.addEventListener(`touchstart`,t,WF),e.addEventListener(`touchend`,n,WF),e.addEventListener(`touchcancel`,n,WF),()=>{e.removeEventListener(`touchstart`,t,WF),e.removeEventListener(`touchend`,n,WF),e.removeEventListener(`touchcancel`,n,WF),this.end()}},this._openTail=(e,t)=>{let n=this.host.getWindow();if(!VF()||n==null)return;this.end();let r={phase:`tail`,moved:e,awaitingFling:t,timerId:n.setTimeout(()=>{this.host.tailStillMoving()?this._openTail(r.moved,r.awaitingFling):(this._touch=r.awaitingFling?{phase:`lateFling`,until:this.host.now()+1e3}:null,this.host.onTailClosed())},150)};this._touch=r}}get touch(){return this._touch}},KF=e=>{let{clientWidth:t,clientHeight:n}=e;return{width:t,height:n}},qF=e=>{let t=new Set;return{schedule:n=>{let r=e.requestAnimationFrame(()=>{t.delete(r),n()});t.add(r)},cancel:()=>{t.forEach(t=>e.cancelAnimationFrame(t)),t.clear()}}},JF=e=>e,YF=e=>{let t=e.overscan*Math.max(e.lanes??1,1),n=Math.max(e.startIndex-t,0),r=Math.min(e.endIndex+t,e.count-1)-n+1,i=Array(r);for(let e=0;e<r;e++)i[e]=n+e;return i},XF=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(KF(n)),!r.ResizeObserver)return()=>{};let a=qF(r),o=new r.ResizeObserver(()=>{let t=()=>{i(KF(n))};e.options.useAnimationFrameWithResizeObserver?a.schedule(t):t()});return o.observe(n,{box:`content-box`}),()=>{o.unobserve(n),a.cancel()}},ZF={passive:!0},QF=typeof window>`u`||`onscrollend`in window,$F=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&QF,o=0,s=a?null:NF(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,ZF),a&&r.addEventListener(`scrollend`,u,ZF),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},eI=(e,t)=>$F(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),tI=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},nI=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},rI=(e,t)=>e===`smooth`?t?`smoothLanded`:`smooth`:`instant`,iI=e=>e?.phase===`smooth`||e?.phase===`smoothLanded`;function aI(e,t,n,r){if(t===0)return!1;let i=r(0),a=new Set,o=0;for(;o<e;){let e=n(o);if(e===i)break;a.add(e),o++}let s=e-o;if(s===0||s>=t)return!1;for(let e=0;e<s;e++)if(r(e)!==n(o+e))return!1;for(let e=s;e<t;e++)if(a.has(r(e)))return!1;return!0}var oI=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._iosGesture=new GF({getWindow:()=>this.targetWindow,now:()=>this.now(),tailStillMoving:()=>{let e=this.scrollState;if(e?.phase!==`queued`||this.pendingWrite!==null)return!1;let t=this._readElementOffset();return t===null||this._lastElementOffset===null||Math.abs(t-this._lastElementOffset)<1?!1:(this._lastElementOffset=t,e.samples=[...e.samples??[],{t:this.now(),offset:t}],!0)},onTailClosed:()=>{let e=this.scrollState;e?.phase===`queued`&&zF(e.samples??[])&&(this.scrollState=null),this._flushHoldIfReady(!0),this._writeAwaitingCommand()}}),this._lastElementOffset=null,this.pendingWrite=null,this._clampedAdjustment=null,this.elementsCache=new Map,this._resizeBatch=null,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=null,n=()=>{if(e)return e;let n=this.targetWindow;if(!n||!n.ResizeObserver)return null;let i=t=qF(n);return e=new n.ResizeObserver(e=>{let t=()=>{let t={sync:!1};this._resizeBatch=t;try{e.forEach(r)}finally{this._resizeBatch=null,t.notify&&(this.notify(t.sync),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment())}};this.options.useAnimationFrameWithResizeObserver?i.schedule(t):t()})},r=e=>{let t=e.target,n=this.indexFromElement(t);if(t.isConnected)this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this));else{this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}}};return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),t?.cancel(),e=null,t=null},observe:e=>n()?.observe(e,{box:`border-box`}),unobserve:e=>n()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:JF,rangeExtractor:YF,onChange:()=>{},measureElement:tI,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=this._singleLaneMeasurements?.items??s,l=e=>OF(c[e]),u=e>0?l(0):null,d=e>0?l(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==u||t.getItemKey(o-1)!==d)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>0&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==d)&&(o>e||aI(e,o,l,t.getItemKey))&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=null;if(r&&this.scrollOffset!==null&&!this._awaitingCommandReadBack()){let[e,t]=r,n=this.getMeasurements(),{count:a,getItemKey:s}=this.options,c=0;for(;c<a&&s(c)!==e;)c++;if(c<a){let e=n[c];if(e){let n=Math.max(0,e.start+t);!i&&n!==this.scrollOffset&&(o=n-this.scrollOffset,this.scrollOffset=n)}}}i?this.pendingScrollAnchor={kind:`follow`,behavior:i}:o!==null&&(this._canWriteScroll()?this.pendingScrollAnchor={kind:`anchor`,delta:o}:(this._holdOffset+=o,this._followOffsetTarget(o)))},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=AF(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{var e;this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,(e=this._momentumStop)==null||e.restore(),this._momentumStop=null,this.isScrolling=!1,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._clampedAdjustment=null,this.pendingWrite=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{let n=t?this._elementMaxScrollOffset():null,r=this._reportedOverscroll;this._reportedOverscroll=e<0||n!==null&&e>n+1;let i=e;this._lastElementOffset=i,e=this._toLayoutOffset(e);let a=this._classifyScrollEvent(e,t,n);if(a===`spurious`)return;a===`readBack`?e=this.pendingWrite.target:a===`clampedReadBack`&&this.scrollState?.index!=null&&e<this.getMaxScrollOffset()-1.5?this.scrollState.lastTargetOffset=e:IF({kind:a,offset:e,command:this.scrollState,target:()=>this.getScrollStateTarget(this.scrollState)})&&(this.scrollState=null),this.pendingWrite=null,this._clampedAdjustment!==null&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null);let o=this.getScrollOffset(),s=this.scrollDirection;this.scrollDirection=t?o===e?this.scrollDirection:o<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t;let c=this.scrollState;if(c?.phase===`queued`&&a===`external`&&t){if(r||this._reportedOverscroll)c.samples=[];else{let e=this.now();c.samples=[...(c.samples??[]).filter(t=>e-t.t<=200),{t:e,offset:i}],(s!==null&&this.scrollDirection!==s||RF(c.samples))&&(this.scrollState=null)}}this._iosGesture.onScroll({isScrolling:t,ownReadBack:a===`readBack`,moved:e!==o,external:a===`external`&&this.scrollState?.phase!==`smooth`&&this.scrollState?.phase!==`smoothFinishing`})&&this.scrollState?.phase===`queued`&&(this.scrollState=null),this._flushHoldIfReady(!0),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement&&this.unsubs.push(this._iosGesture.listen(this.scrollElement)),this._scrollToOffset(this.getScrollOffset())}this._noteClampMax();let t=this.pendingScrollAnchor;this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled&&(t.kind===`anchor`?this._canWriteScroll()?iI(this.scrollState)&&!MF(this.getScrollOffset()-t.delta,this.scrollState.lastTargetOffset)||(this._followOffsetTarget(t.delta),this._scrollToOffset(this.getScrollOffset())):(this._holdOffset+=t.delta,this._followOffsetTarget(t.delta),this.notify(!1)):this.scrollToEnd({behavior:t.behavior})),this._flushHoldIfReady(!1),this._retryClampedAdjustment()},this._classifyScrollEvent=(e,t,n)=>PF({offset:e,isScrolling:t,elementMax:n,holdOffset:this._holdOffset,scrollOffset:this.scrollOffset,pendingWrite:this.pendingWrite,clampedMaxAtWrite:this._clampedAdjustment?.maxAtWrite??null}),this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e))},this._writeAwaitingCommand=()=>{let e=this.scrollState;if(e===null||e.phase!==`queued`)return;let{behavior:t}=e;this.getMeasurements();let n=this.getScrollStateTarget(e);e.lastTargetOffset=n,this._clampedAdjustment=null,e.phase=rI(t,e.index!=null&&MF(n,this.getScrollOffset())),this._scrollToOffset(n,{behavior:t}),this.scheduleScrollReconcile()},this._readElementOffset=()=>{let e=this.scrollElement;if(e==null)return null;let{horizontal:t,isRtl:n}=this.options;return typeof e.scrollTop==`number`?t?e.scrollLeft*(n&&-1||1):e.scrollTop:typeof e.scrollY==`number`?t?e.scrollX:e.scrollY:null},this._canWriteScroll=()=>!(VF()&&this._iosGesture.inMotion())&&!this._reportedOverscroll,this._flushHoldIfReady=e=>{if(this._holdOffset===0||!this.scrollElement||!this.options.enabled||!this._canWriteScroll()||this.scrollState?.phase===`smooth`)return;this._holdOffset=0,this.scrollOffset!==null&&this.scrollOffset<0&&(this.scrollOffset=0),this.notify(e);let t=this.getCommandWrittenOffset()??this.getScrollOffset();this._clampedAdjustment=this._clampedBy(t),this._scrollToOffset(t)},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=AF(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=AF(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._singleLaneMeasurements?.flat;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e}let o=u===0?Array(e):this._singleLaneMeasurements.items.slice(),c;if(u===0)c=t+n;else{let e=u-1;c=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t);o[t]=e;let n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=c,a[t*2+1]=i,c+=i+s}this._singleLaneMeasurements={flat:a,items:o};let d=kF(o,a);return this.measurementsCache=d,d}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=AF(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=lI(e,t,n,r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=AF(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t,this.options.lanes]},(e,t,n,r,i,a)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n,lanes:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!iI(this.scrollState))return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),e.isConnected&&(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;if(!this.isIndexInRange(e))return;this._resizeBatch?.sync&&this.getMeasurements();let r,i,a,o=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&o!=null)a=this.options.getItemKey(e),i=o[e*2],r=o[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;a=t.key,i=t.start,r=t.size}let s=this.itemSizeCache.get(a)??r,c=t-s;if(c!==0){let o=this.options.anchorTo===`end`&&!iI(this.scrollState)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,l=o?this._getLayoutTotalSize():0,u=this.getScrollOffset(),d=this.itemSizeCache.has(a)?i+s<=u&&this.scrollDirection!==`backward`:i<u,f=!iI(this.scrollState)&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?d:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:a,start:i,size:r,end:i+r,lane:0},c,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(a,t),this.itemSizeCacheVersion++;let p=!1;if(this._awaitingCommandReadBack()||(o?p=this.applyScrollAdjustment(this._getLayoutTotalSize()-l):f&&(p=this.applyScrollAdjustment(c))),this._resizeBatch){this._resizeBatch.notify=!0,(n=this._resizeBatch).sync||(n.sync=p);return}this.notify(p),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment()}},this.getVirtualItems=AF(()=>[this.getVirtualIndexes(),this.getMeasurements(),this._holdOffset],(e,t,n)=>{let r=[];for(let i=0,a=e.length;i<a;i++){let a=t[e[i]];r.push(n===0?a:{...a,start:a.start-n,end:a.end-n})}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._singleLaneMeasurements?.flat,r=this.options.lanes===1&&n!=null;return jF(t[sI(0,t.length-1,r?e=>n[e*2]:e=>jF(t[e]).start,e)])},this._noteClampMax=()=>{if(!this._awaitingCommandReadBack())return;let e=this._elementMaxScrollOffset();if(e===null)return;let t=this.pendingWrite,n=Math.max(e,0)+this._holdOffset;if(n>=t.target)return;let r=t.lowMaxes??=[];r[r.length-1]!==n&&r.push(n)},this.getMaxScrollOffset=()=>(this._elementMaxScrollOffset()??0)+this._holdOffset,this._toLayoutOffset=e=>{let t=e+this._holdOffset;return this.pendingScrollAnchor?.kind===`anchor`&&(t+=this.pendingScrollAnchor.delta),t},this._elementMaxScrollOffset=()=>{let e=this.scrollElement;if(e===null)return null;if(`scrollHeight`in e)return this.options.horizontal?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;if(`document`in e){let t=e.document.documentElement;return this.options.horizontal?t.scrollWidth-e.innerWidth:t.scrollHeight-e.innerHeight}return null},this._momentumStop=null,this._stopMomentum=e=>{let t=this.scrollElement,n=this.targetWindow;if(t===null||n===null)return;let r=`document`in t?t.document.scrollingElement:t;if(!r?.style)return;if(this._momentumStop){this._momentumStop.done=e;return}let{style:i}=r,a=this.options.horizontal?`overflow-x`:`overflow-y`,o=i.getPropertyValue(a),s=i.getPropertyPriority(a);i.setProperty(a,`hidden`,`important`);let c={restore:()=>i.getPropertyValue(a)!==`hidden`||i.getPropertyPriority(a)!==`important`?!1:(i.setProperty(a,o,s),!0),done:e};this._momentumStop=c,n.requestAnimationFrame(()=>n.requestAnimationFrame(()=>{this._momentumStop===c&&(this._momentumStop=null,c.restore()&&c.done())}))},this._clampedBy=e=>{let t=this._elementMaxScrollOffset();if(t===null)return null;let n=t+this._holdOffset;return e>n+.5?{target:e,maxAtWrite:n}:null},this.getVirtualDistanceFromEnd=()=>Math.max(this._getLayoutTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1){let e=this.getMaxScrollOffset(),n=e-this.options.paddingEnd+this.options.scrollPaddingEnd;return[Math.max(Math.min(n,e),0),t]}let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._startScroll({index:null,align:t},this.getOffsetForAlignment(e,t),n,`absolute`)},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r;this._startScroll({index:e,align:a},i,n,`absolute`)},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getOffsetForAlignment((this.getCommandWrittenOffset()??this.getScrollOffset())+e,`start`);this._startScroll({index:null,align:`start`},n,t,`relative`)},this.scrollToEnd=({behavior:e=`auto`}={})=>{this.options.count>0?this._startScroll({index:this.options.count-1,align:`end`,toEnd:!0},Math.max(this.getMaxScrollOffset(),0),e,`absolute`):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.cancelScroll=()=>{this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null},this.getTotalSize=()=>Math.max(this._getLayoutTotalSize()-this._holdOffset,0),this._getLayoutTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._singleLaneMeasurements?.flat;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n}={})=>{let r={target:e+(t??0),smooth:n===`smooth`};return this.pendingWrite=r,this.options.scrollToFn(e-this._holdOffset,{behavior:n,adjustments:t},this),r},this.getCommandWrittenOffset=()=>this.scrollState!==null&&this.pendingWrite!==null&&!this.pendingWrite.smooth?this.pendingWrite.target:null,this._awaitingCommandReadBack=()=>{let e=this.getCommandWrittenOffset();return!(VF()&&this._iosGesture.dragging())&&e!==null&&!MF(e,this.getScrollOffset())},this._followOffsetTarget=e=>{this.scrollState!==null&&this.scrollState.index==null&&(this.scrollState.lastTargetOffset+=e)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}get scrollAdjustments(){return 0}applyScrollAdjustment(e,t){if(e===0)return!1;if(this._followOffsetTarget(e),this._canWriteScroll()){let n=this.getScrollOffset();this._clampedAdjustment=this._clampedBy(n+e);let r=this._scrollToOffset(n,{adjustments:e,behavior:t});return this.scrollOffset!==null&&(this.pendingWrite===r&&(this.scrollOffset+=e),this.scrollOffset<0&&(this.scrollOffset=0)),!0}return this._holdOffset+=e,this.scrollOffset!==null&&(this.scrollOffset+=e),!0}scheduleScrollReconcile(){this.targetWindow?this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}):this.scrollState=null}getScrollStateTarget(e){let t=e.toEnd?[Math.max(this.getMaxScrollOffset(),0)]:e.index==null?void 0:this.getOffsetForIndex(e.index,e.align);return t?t[0]:e.lastTargetOffset}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}if(this.scrollState.phase===`queued`){this.scheduleScrollReconcile();return}this.getMeasurements();let e=this.getScrollStateTarget(this.scrollState),t=this.scrollState.index==null?1:this.options.useAnimationFrameWithResizeObserver?3:2,n=e!==this.scrollState.lastTargetOffset;if(!n&&MF(e,this.getScrollOffset())){if(this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothLanded`:this.scrollState.phase===`smoothFinishing`&&(this.scrollState.phase=`instant`),this.scrollState.stableFrames++,this.scrollState.stableFrames>=t){this.getScrollOffset()!==e&&this._scrollToOffset(e,{behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let t=this.getSize()||600,n=Math.abs(e-this.getScrollOffset()),r=iI(this.scrollState)&&n>t;this.scrollState.lastTargetOffset=e,r?this.scrollState.phase=`smooth`:this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothFinishing`:this.scrollState.phase===`smoothLanded`&&(this.scrollState.phase=`instant`),this._scrollToOffset(e,{behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}_startScroll(e,t,n,r){let i=this._iosGesture.tail();if(r===`absolute`&&i!==null){if(i===`fling`&&UF()){this._stopMomentum(()=>{this.scrollState?.phase!==`queued`||this._iosGesture.tail()!==`fling`||this._reportedOverscroll||(this._iosGesture.end(),this._flushHoldIfReady(!0),this._writeAwaitingCommand())}),this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,phase:`queued`,behavior:n,samples:[]},this.scheduleScrollReconcile();return}this._iosGesture.end()}this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,behavior:n,phase:rI(n,e.index!=null&&MF(t,this.getScrollOffset()))},this._scrollToOffset(t,{behavior:n}),this.scheduleScrollReconcile()}},sI=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function cI(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function lI(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=cI(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=sI(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var uI=typeof document<`u`?C.useLayoutEffect:C.useEffect;function dI({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=C.useReducer(e=>e+1,0)[1],a=C.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=C.useRef(!1),s=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},c=(e,t,n)=>{let r=a.current,i=!!e.options.horizontal,o=t.start-e.options.scrollMargin;r.lastPositions.get(n)!==o&&(r.lastPositions.set(n,o),r.mode===`transform`?n.style.transform=i?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:n.style[i?`left`:`top`]=`${o}px`)},l=e=>{let t=a.current;if(t.enabled&&t.container){s(e);for(let t of e.getVirtualItems()){let n=e.elementsCache.get(t.key);n&&c(e,t,n)}}},u={...r,onChange:(t,n)=>{var s;let c=a.current,u=!0;if(c.enabled){l(t);let e=t.range,n=c.prevRange;u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,u&&(c.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n&&!o.current?(0,xt.flushSync)(i):i()),(s=r.onChange)==null||s.call(r,t,n)}},[d]=C.useState(()=>{let e=new oI(u),t=e.measureElement;return e.measureElement=n=>{o.current=!0;try{t(n)}finally{o.current=!1}let r=a.current;if(n!==null&&r.enabled&&r.container){let t=e.measurementsCache[e.indexFromElement(n)];t&&c(e,t,n)}},Object.assign(e,{containerRef:t=>{let n=a.current;n.container=t,n.lastSize=null,t!==null&&l(e)}})});return d.setOptions(u),uI(()=>d._didMount(),[]),uI(()=>(s(d),d._willUpdate())),uI(()=>{l(d)}),d}function fI(e){return dI({observeElementRect:XF,observeElementOffset:eI,scrollToFn:nI,...e})}var pI={astro:`astro`,bash:`shellscript`,bat:`bat`,c:`c`,cc:`cpp`,cjs:`javascript`,clj:`clojure`,cljs:`clojure`,cmake:`cmake`,cpp:`cpp`,cs:`csharp`,css:`css`,cts:`typescript`,cxx:`cpp`,dart:`dart`,diff:`diff`,dockerfile:`dockerfile`,edn:`clojure`,erl:`erlang`,ex:`elixir`,exs:`elixir`,fish:`shellscript`,fs:`fsharp`,fsx:`fsharp`,gleam:`gleam`,go:`go`,gql:`graphql`,gradle:`groovy`,graphql:`graphql`,groovy:`groovy`,h:`c`,hcl:`hcl`,hh:`cpp`,hpp:`cpp`,hrl:`erlang`,hs:`haskell`,htm:`html`,html:`html`,hxx:`cpp`,ini:`ini`,java:`java`,jl:`julia`,js:`javascript`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsx:`jsx`,kt:`kotlin`,kts:`kotlin`,less:`less`,lua:`lua`,m:`objective-c`,markdown:`markdown`,md:`markdown`,mdx:`mdx`,mjs:`javascript`,mk:`makefile`,ml:`ocaml`,mli:`ocaml`,mm:`objective-c`,mts:`typescript`,nix:`nix`,patch:`diff`,php:`php`,pl:`perl`,pm:`perl`,prisma:`prisma`,properties:`properties`,proto:`proto`,ps1:`powershell`,psm1:`powershell`,py:`python`,pyi:`python`,r:`r`,rake:`ruby`,rb:`ruby`,rs:`rust`,sass:`sass`,scala:`scala`,sc:`scala`,scss:`scss`,sh:`shellscript`,sql:`sql`,svelte:`svelte`,svg:`xml`,swift:`swift`,tf:`terraform`,tfvars:`terraform`,toml:`toml`,ts:`typescript`,tsx:`tsx`,vue:`vue`,xml:`xml`,xsd:`xml`,xsl:`xml`,yaml:`yaml`,yml:`yaml`,zig:`zig`,zsh:`shellscript`},mI={".babelrc":`jsonc`,".bash_profile":`shellscript`,".bashrc":`shellscript`,".editorconfig":`ini`,".env":`dotenv`,".eslintrc":`jsonc`,".gitconfig":`ini`,".npmrc":`ini`,".prettierrc":`json`,".profile":`shellscript`,".swcrc":`jsonc`,".zprofile":`shellscript`,".zshrc":`shellscript`,brewfile:`ruby`,"cmakelists.txt":`cmake`,containerfile:`dockerfile`,dockerfile:`dockerfile`,gemfile:`ruby`,gnumakefile:`makefile`,jenkinsfile:`groovy`,"jsconfig.json":`jsonc`,makefile:`makefile`,podfile:`ruby`,rakefile:`ruby`,"tsconfig.json":`jsonc`};function hI(e){let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase(),n=mI[t];if(n)return n;if(t.startsWith(`dockerfile.`)||t.startsWith(`containerfile.`))return`dockerfile`;if(t.startsWith(`.env.`))return`dotenv`;if(t.startsWith(`tsconfig.`)&&t.endsWith(`.json`)||t.endsWith(`.json`)&&(e.startsWith(`.vscode/`)||e.includes(`/.vscode/`)))return`jsonc`;let r=t.lastIndexOf(`.`);return r<=0?null:pI[t.slice(r+1)]??null}function gI(e){return typeof e==`object`&&!!e&&`content`in e&&typeof e.content==`string`&&`color`in e&&(e.color===void 0||typeof e.color==`string`)&&`fontStyle`in e&&typeof e.fontStyle==`number`}function _I(e){return Array.isArray(e)&&e.every(e=>Array.isArray(e)&&e.every(gI))}function vI(e){return typeof e!=`object`||!e||!(`id`in e)||typeof e.id!=`number`?!1:`ok`in e&&e.ok===!0?`tokens`in e&&_I(e.tokens):`ok`in e&&e.ok===!1&&`error`in e&&typeof e.error==`string`}var yI=200,bI,xI=!1,SI=!1,CI=0,wI=new Map;function TI(...e){SI||(SI=!0,console.warn(`[highlight]`,...e))}function EI(e){TI(`syntax highlighting disabled:`,e),xI=!0,bI?.terminate(),bI=void 0;let t=Error(`highlight worker unavailable`);for(let e of wI.values())e.reject(t);wI.clear()}function DI(){if(bI)return bI;let e=new Worker(new URL(`/assets/highlight.worker-D2jBd466.js`,``+import.meta.url),{type:`module`});return e.addEventListener(`message`,e=>{let t=e.data;if(!vI(t)){EI(Error(`malformed worker message`));return}let n=wI.get(t.id);n&&(wI.delete(t.id),t.ok?n.resolve(t.tokens):n.reject(Error(t.error)))}),e.addEventListener(`error`,e=>EI(e.message||`worker error`)),e.addEventListener(`messageerror`,()=>EI(Error(`undeserializable worker message`))),bI=e,e}async function OI(e,t){if(xI)throw Error(`highlight worker unavailable`);let n=CI++,r=Promise.withResolvers();return wI.set(n,r),DI().postMessage({id:n,lang:e,lines:t}),r.promise}var kI=new Map,AI=new WeakMap;function jI(e){if(kI.delete(e.key),kI.set(e.key,e),!(kI.size<=yI))for(let[e,t]of kI){if(kI.size<=yI)break;t.listeners.size===0&&t.state!==`pending`&&kI.delete(e)}}function MI(e){e.state=`pending`;let t=t=>{e.tokens=t,e.state=`settled`;for(let t of e.listeners)t()};OI(e.lang,e.lines).then(t,e=>{TI(`highlighting failed:`,e),t(null)})}function NI(e,t,n){let r={key:e,lang:t,lines:n,tokens:null,state:`idle`,listeners:new Set,subscribe:e=>(r.listeners.add(e),jI(r),r.state===`idle`&&MI(r),()=>r.listeners.delete(e)),getSnapshot:()=>r.tokens};return r}function PI(e){let t=3735928559,n=1103547991,r=0;for(let i of e){if(r+=i.length+1,i.length>2e3||r>3e5)return null;for(let e=0;e<i.length;e++){let r=i.charCodeAt(e);t=Math.imul(t^r,2654435761),n=Math.imul(n^r,1597334677)}t=Math.imul(t^10,2654435761),n=Math.imul(n^10,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&n)+(t>>>0)).toString(36)}function FI(e,t){let n=AI.get(t);n||(n=new Map,AI.set(t,n));let r=n.get(e);if(r!==void 0)return r;let i=hI(e),a=i===null?null:PI(t),o=null;if(i!==null&&a!==null){let n=`${i}\0${e}\0${t.length}\0${a}`;o=kI.get(n)??NI(n,i,t)}return n.set(e,o),o}var II=()=>()=>{},LI=()=>null;function RI(e,t){let n=t===null?null:FI(e,t);return(0,C.useSyncExternalStore)(n?.subscribe??II,n?.getSnapshot??LI)}function zI(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r.type===`context`){t.push({left:r,right:r}),n++;continue}let i=[],a=[];for(;n<e.length&&e[n].type===`del`;)i.push(e[n++]);for(;n<e.length&&e[n].type===`add`;)a.push(e[n++]);for(let e=0;e<Math.max(i.length,a.length);e++)t.push({left:i[e]??null,right:a[e]??null})}return t}function BI(e,t,n){return`${t}:${n}:${e}`}function VI(e){let t=[],n=[],r=[],i=new Map,a=new Map,o=new Map;for(let t of e.threads){let e=o.get(t.path)??[];e.push(t),o.set(t.path,e)}let s=new Set,c=new Set(e.files.map(e=>e.path));for(let t of e.threads)if(t.line!==null&&t.subjectType===`LINE`&&e.anchorable(t.side)){let e=BI(t.path,t.side,t.line);a.set(e,[...a.get(e)??[],t.id])}let l=(e,n,r)=>{let a=n.filter(e=>!s.has(e));if(a.length!==0){for(let e of a)s.add(e),i.set(e,t.length);t.push({kind:`threads`,key:r,fileIdx:e,threadIds:a})}};if(e.files.forEach((c,u)=>{if(e.onlyFile!==null&&c.path!==e.onlyFile||(n[u]=t.length,t.push({kind:`file`,key:`f:${c.path}`,fileIdx:u}),e.collapsed.has(c.path)))return;let d=o.get(c.path)??[],f=d.filter(e=>e.subjectType===`FILE`).map(e=>e.id);l(u,f,`tf:${c.path}`),e.fileComposer===c.path&&t.push({kind:`composer`,key:`cf:${c.path}`,fileIdx:u,target:`file`}),c.binary?t.push({kind:`notice`,key:`n:${c.path}`,fileIdx:u,text:`Fichier binaire.`}):c.truncated?t.push({kind:`notice`,key:`n:${c.path}`,fileIdx:u,text:`Diff trop volumineux pour l’API GitHub : contenu à consulter sur GitHub.`}):c.hunks.length===0&&t.push({kind:`notice`,key:`n:${c.path}`,fileIdx:u,text:c.status===`renamed`?`Renommé sans modification.`:`Aucun changement de contenu (mode / fichier vide).`});let p=(t,n)=>e.composer!==null&&e.composer.path===c.path&&e.composer.side===t&&e.composer.end===n;c.hunks.forEach((n,i)=>{r.push({row:t.length,fileIdx:u,hunkIdx:i}),t.push({kind:`hunk`,key:`h:${c.path}:${i}`,fileIdx:u,hunkIdx:i});let o=(e,n,r)=>{let i=[],o=!1;n?.newNo!=null&&(i.push(...a.get(BI(c.path,`RIGHT`,n.newNo))??[]),o||=p(`RIGHT`,n.newNo)),e?.oldNo!=null&&(i.push(...a.get(BI(c.path,`LEFT`,e.oldNo))??[]),o||=p(`LEFT`,e.oldNo)),l(u,i,`t:${r}`),o&&t.push({kind:`composer`,key:`c:${r}`,fileIdx:u,target:`line`})};if(e.layout===`split`&&c.status!==`added`&&c.status!==`deleted`)for(let e of zI(n.lines)){let n=`${c.path}:${e.left?.oldNo??`-`}:${e.right?.newNo??`-`}`;t.push({kind:`split`,key:`s:${n}`,fileIdx:u,hunkIdx:i,left:e.left,right:e.right}),o(e.left,e.right,n)}else for(let e of n.lines){let n=`${c.path}:${e.oldNo??`-`}:${e.newNo??`-`}`;t.push({kind:`line`,key:`l:${n}`,fileIdx:u,hunkIdx:i,line:e}),o(e.type===`add`?null:e,e.type===`del`?null:e,n)}});let m=d.filter(e=>!s.has(e.id)).map(e=>e.id);if(m.length>0){for(let e of m)s.add(e),i.set(e,t.length);t.push({kind:`orphans`,key:`o:${c.path}`,fileIdx:u,threadIds:m,title:`Threads outdated ou hors de la plage affichée`})}}),e.onlyFile===null){let n=e.threads.filter(e=>!c.has(e.path)&&!s.has(e.id)).map(e=>e.id);if(n.length>0){for(let e of n)i.set(e,t.length);t.push({kind:`orphans`,key:`o:outside`,fileIdx:null,threadIds:n,title:`Threads sur des fichiers hors de la plage affichée`})}}return{rows:t,fileRow:n,hunkRows:r,threadRow:i}}function HI(e){let t=[],n=/```suggestion[^\n]*\n([\s\S]*?)```/g;for(let r=n.exec(e);r;r=n.exec(e))t.push(r[1]??``);return t}function UI({diffHunk:e}){let t=e.split(`
109
+ `).slice(1).slice(-8);return(0,W.jsx)(`div`,{className:`snippet`,children:t.map((e,t)=>(0,W.jsx)(`div`,{className:e.startsWith(`+`)?`c-add`:e.startsWith(`-`)?`c-del`:void 0,children:e||` `},t))})}function WI({thread:e,showPath:t=!1}){let n=SF(),r=wF(n.ref),[i,a]=(0,C.useState)(!1),o=(0,C.useRef)(null),s=n.focusedThread===e.id,c=e.comments.at(-1),l=e.lastReadCommentId?e.comments.findIndex(t=>t.id===e.lastReadCommentId):-1,u=(e,t)=>t>l&&e.author?.login!==n.me,d=r.markThreadsRead.mutate,f=c?.id;(0,C.useEffect)(()=>{let t=o.current;if(!t||!f||e.lastReadCommentId===f)return;let n,r=new IntersectionObserver(([t])=>{clearTimeout(n),t?.isIntersecting&&(n=setTimeout(()=>{d([{threadId:e.id,lastCommentId:f}]),r.disconnect()},1200))});return r.observe(t),()=>{clearTimeout(n),r.disconnect()}},[f,e.id,e.lastReadCommentId,d]);let p=n.detail.canWrite&&n.detail.pr.sameRepo&&n.detail.pr.state===`OPEN`&&!e.isOutdated&&e.side===`RIGHT`&&e.line!==null,m=n.pendingReviewId,h=e.subjectType===`FILE`?`commentaire sur le fichier`:e.isOutdated?`ligne ${e.originalLine??`?`} (version d’origine)`:e.startLine!==null&&e.startLine!==e.line?`lignes ${e.startLine}–${e.line}`:`ligne ${e.line}`;return(0,W.jsxs)(`div`,{ref:o,className:`thread`,"data-thread":e.id,"data-resolved":e.isResolved||void 0,"data-unread":e.unread>0||void 0,"data-focus":s||void 0,onClick:()=>n.setFocusedThread(e.id),children:[(0,W.jsxs)(`div`,{className:`thread-head`,children:[e.pending?(0,W.jsx)(Uf,{size:`xs`,color:`yellow`,variant:`light`,children:`en attente (review non soumise)`}):e.isResolved?(0,W.jsxs)(Uf,{size:`xs`,color:`green`,variant:`light`,children:[`✓ résolu`,e.resolvedBy?` par ${e.resolvedBy}`:``]}):(0,W.jsx)(Uf,{size:`xs`,color:`yellow`,variant:`outline`,children:`non résolu`}),e.isOutdated&&(0,W.jsx)(Uf,{size:`xs`,color:`gray`,variant:`outline`,children:`outdated`}),e.unread>0&&(0,W.jsxs)(Uf,{size:`xs`,color:`orange`,variant:`light`,children:[e.unread,` nouveau`,e.unread>1?`x`:``]}),(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,truncate:!0,children:[t?`${e.path} · `:``,h,e.subjectType===`LINE`?` · ${e.side===`LEFT`?`ancien code`:`nouveau code`}`:``]}),(0,W.jsx)(`div`,{style:{flex:1}}),(e.isResolved?e.canUnresolve:e.canResolve)&&(0,W.jsx)(Qf,{size:`compact-xs`,variant:`subtle`,color:`gray`,onClick:t=>{t.stopPropagation(),r.setResolved.mutate({threadId:e.id,resolved:!e.isResolved})},children:e.isResolved?`Rouvrir`:`Résoudre`}),e.comments[0]&&(0,W.jsx)(sf,{href:e.comments[0].url,target:`_blank`,size:`xs`,c:`dimmed`,children:`GitHub ↗`})]}),(e.isOutdated||e.line===null)&&e.diffHunk&&(0,W.jsx)(UI,{diffHunk:e.diffHunk}),e.comments.map((t,i)=>(0,W.jsxs)(`div`,{className:`comment`,"data-new":u(t,i)||void 0,children:[(0,W.jsx)(Bf,{src:t.author?.avatarUrl,size:24}),(0,W.jsxs)(`div`,{className:`comment-body`,children:[(0,W.jsxs)(ql,{gap:6,mb:2,children:[(0,W.jsx)(Z,{size:`sm`,fw:600,children:t.author?.login??`ghost`}),(0,W.jsx)(Jm,{label:new Date(t.createdAt).toLocaleString(`fr`),children:(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,children:ME(t.createdAt)})}),u(t,i)&&(0,W.jsx)(Uf,{size:`xs`,color:`orange`,variant:`light`,children:`nouveau`}),t.pending&&(0,W.jsx)(Uf,{size:`xs`,color:`yellow`,variant:`light`,children:`en attente`}),t.pending&&t.canDelete&&(0,W.jsx)(Qf,{size:`compact-xs`,variant:`subtle`,color:`red`,ml:`auto`,onClick:()=>r.deleteComment.mutate({commentId:t.id}),children:`Supprimer`})]}),(0,W.jsx)(`div`,{className:`md`,dangerouslySetInnerHTML:{__html:t.bodyHTML}}),p&&!t.pending&&HI(t.body).map((i,a)=>(0,W.jsx)(Qf,{mt:6,size:`compact-xs`,color:`green`,variant:`light`,loading:r.applySuggestion.isPending,onClick:()=>r.applySuggestion.mutate({ref:n.ref,branch:n.detail.pr.headRefName,expectedHeadOid:n.detail.pr.headRefOid,path:e.path,side:`RIGHT`,startLine:e.startLine??e.line,endLine:e.line,replacement:i,message:`Apply suggestion from @${t.author?.login??`reviewer`}\n\n${t.url}`}),children:`Appliquer la suggestion (commit)`},a))]})]},t.id)),e.canReply&&(i?(0,W.jsx)(bF,{draftKey:`reply:${e.id}`,repoContext:`${n.ref.owner}/${n.ref.repo}`,onCancel:()=>a(!1),placeholder:`Répondre…`,actions:[...e.canResolve&&!e.isResolved&&!m?[{label:`Répondre & résoudre`,variant:`default`,run:async t=>{await r.reply.mutateAsync({threadId:e.id,body:t,pendingReviewId:null}),await r.setResolved.mutateAsync({threadId:e.id,resolved:!0})}}]:[],{label:m?`Ajouter à la review`:`Répondre`,run:t=>r.reply.mutateAsync({threadId:e.id,body:t,pendingReviewId:m})}]}):(0,W.jsx)(ql,{p:8,gap:8,children:(0,W.jsx)(Qf,{"data-reply":!0,variant:`default`,size:`compact-sm`,style:{flex:1,justifyContent:`flex-start`},styles:{inner:{justifyContent:`flex-start`}},onClick:()=>a(!0),children:(0,W.jsx)(Z,{size:`sm`,c:`dimmed`,children:`Répondre…`})})}))]})}function GI(e){let t={old:[],new:[],oldIndex:new Map,newIndex:new Map};for(let n of e.hunks)for(let e of n.lines)e.oldNo!==null&&(t.oldIndex.set(e.oldNo,t.old.length),t.old.push(e.content)),e.newNo!==null&&(t.newIndex.set(e.newNo,t.new.length),t.new.push(e.content));return t}var KI={file:52,hunk:28,split:20,line:20,threads:160,composer:230,notice:36,orphans:200};function qI(e,t,n){let r=e.hunks.filter(t=>n.has(`${e.path}\n${t.hash}`)).length;return{state:t===`VIEWED`?`viewed`:t===`DISMISSED`?`dismissed`:r>0?`partial`:`none`,seenHunks:r}}function JI(e){let t=SF();return qI(e,t.detail.files.find(t=>t.path===e.path)?.viewed,t.seenHunks)}function YI(){let e=SF(),t=wF(e.ref),n=(e,t)=>t.map(t=>({path:e.path,hash:t.hash}));return{toggleFile:(r,i)=>{t.setFileViewed.mutate({prId:e.detail.pr.id,path:r.path,viewed:i}),r.hunks.length>0&&t.setHunksSeen.mutate({ref:e.ref,hunks:n(r,r.hunks),seen:i})},toggleHunk:(r,i,a)=>{t.setHunksSeen.mutate({ref:e.ref,hunks:n(r,[i]),seen:a});let o=r.hunks.filter(e=>e!==i),s=a&&o.every(t=>e.seenHunks.has(`${r.path}\n${t.hash}`)),c=e.detail.files.find(e=>e.path===r.path)?.viewed;e.range.fullPr&&s&&c!==`VIEWED`?t.setFileViewed.mutate({prId:e.detail.pr.id,path:r.path,viewed:!0}):!a&&c===`VIEWED`&&t.setFileViewed.mutate({prId:e.detail.pr.id,path:r.path,viewed:!1})}}}function XI({state:e}){return(0,W.jsx)(`span`,{className:`vbox`,"data-state":e,children:e===`viewed`?`✓`:e===`dismissed`?`•`:``})}var ZI={added:{label:`ajouté`,color:`green`},deleted:{label:`supprimé`,color:`red`},renamed:{label:`renommé`,color:`blue`},modified:null};function QI(e){let{file:t}=e,n=SF(),r=YI(),{state:i,seenHunks:a}=JI(t),o=n.detail.threads.filter(e=>e.path===t.path),s=o.filter(e=>!e.isResolved).length,c=ZI[t.status];return(0,W.jsxs)(`div`,{className:`file-head`,"data-viewed":i===`viewed`||void 0,children:[(0,W.jsx)(Ll,{size:`sm`,variant:`subtle`,color:`gray`,onClick:e.onToggleCollapse,"aria-label":`Replier`,children:e.collapsed?`▸`:`▾`}),(0,W.jsx)(Jm,{label:t.status===`renamed`?`${t.oldPath} → ${t.path}`:t.path,openDelay:400,children:(0,W.jsxs)(`span`,{className:`file-path`,children:[t.status===`renamed`&&(0,W.jsxs)(Z,{span:!0,c:`dimmed`,inherit:!0,children:[t.oldPath,` →`,` `]}),t.path]})}),c&&(0,W.jsx)(Uf,{size:`xs`,variant:`light`,color:c.color,children:c.label}),i===`dismissed`&&(0,W.jsx)(Uf,{size:`xs`,variant:`light`,color:`orange`,children:`modifié depuis vu`}),(0,W.jsxs)(Z,{size:`xs`,span:!0,children:[(0,W.jsxs)(Z,{span:!0,c:`green.4`,inherit:!0,children:[`+`,t.additions]}),` `,(0,W.jsxs)(Z,{span:!0,c:`red.4`,inherit:!0,children:[`−`,t.deletions]})]}),t.hunks.length>1&&(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[a,`/`,t.hunks.length,` hunks vus`]}),o.length>0&&(0,W.jsxs)(Z,{size:`xs`,c:s>0?`yellow.4`:`dimmed`,children:[(0,W.jsx)(`i`,{className:`ico-c`}),s,`/`,o.length]}),(0,W.jsx)(`div`,{style:{flex:1}}),(0,W.jsx)(sf,{size:`xs`,c:`dimmed`,target:`_blank`,href:`https://github.com/${n.ref.owner}/${n.ref.repo}/blob/${n.detail.pr.headRefOid}/${t.path}`,children:`fichier ↗`}),n.detail.pr.state===`OPEN`&&(0,W.jsx)(Jm,{label:`Commenter le fichier entier`,openDelay:300,children:(0,W.jsx)(Qf,{size:`compact-xs`,variant:`subtle`,color:`gray`,leftSection:(0,W.jsx)(`i`,{className:`ico-c`}),onClick:()=>{e.collapsed&&e.onToggleCollapse(),n.setFileComposer(t.path)},children:`Commenter`})}),(0,W.jsx)(Qf,{size:`compact-xs`,variant:i===`viewed`?`light`:`default`,color:i===`viewed`?`green`:`gray`,leftSection:(0,W.jsx)(XI,{state:i}),onClick:()=>{let e=i!==`viewed`;r.toggleFile(t,e),e&&n.advanceFrom(t.path)},children:`Vu`})]})}function $I({tokens:e,text:t}){return e?(0,W.jsx)(W.Fragment,{children:e.map((e,t)=>(0,W.jsx)(`span`,{style:{color:e.color,fontStyle:e.fontStyle&1?`italic`:void 0,fontWeight:e.fontStyle&2?600:void 0},children:e.content},t))}):(0,W.jsx)(W.Fragment,{children:t})}var eL={add:`c-add`,del:`c-del`,context:``},tL=(0,C.memo)(function(e){let{row:t,file:n,sources:r}=e,i=SF(),a=RI(n.path,r.old),o=RI(n.path,r.new),s=i.selection,c=(e,t)=>t!==null&&s!==null&&s.path===n.path&&s.side===e&&t>=s.start&&t<=s.end,l=(e,t)=>{if(t===`LEFT`){let t=e.oldNo===null?void 0:r.oldIndex.get(e.oldNo);return t===void 0?void 0:a?.[t]}let n=e.newNo===null?void 0:r.newIndex.get(e.newNo);return n===void 0?void 0:o?.[n]},u=(e,t,r)=>{t!==null&&i.canComment(e)&&(r.shiftKey&&s&&s.path===n.path&&s.side===e?i.setSelection({...s,start:Math.min(s.start,t),end:Math.max(s.end,t)}):i.setSelection({path:n.path,side:e,start:t,end:t}))},d=(e,t,n)=>(0,W.jsx)(`div`,{className:`ln ${n}`,"data-disabled":!i.canComment(e)||void 0,title:i.canComment(e)?`Commenter (Maj+clic : plage)`:void 0,onClick:n=>u(e,t,n),children:t??``}),f=(e,t,n)=>(0,W.jsxs)(`div`,{className:`tx ${n}`,children:[e&&(0,W.jsx)($I,{tokens:l(e,t),text:e.content}),e?.noNewline&&(0,W.jsx)(`span`,{className:`nonl`,children:`⏎̸ pas de fin de ligne`})]});if(t.kind===`split`){let n=t.left,r=t.right,i=n?n.type===`del`?eL.del:``:`c-empty`,a=r?r.type===`add`?eL.add:``:`c-empty`,o=c(`LEFT`,n?.oldNo??null)?` c-sel`:``,s=c(`RIGHT`,r?.newNo??null)?` c-sel`:``;return(0,W.jsx)(`div`,{className:`code${e.last?` last`:``}`,children:(0,W.jsxs)(`div`,{className:`code-row split`,"data-viewed":e.viewed||void 0,children:[d(`LEFT`,n?.oldNo??null,i+o),f(n,`LEFT`,i+o),d(`RIGHT`,r?.newNo??null,a+s),f(r,`RIGHT`,a+s)]})})}let p=t.line,m=eL[p.type],h=p.type===`del`?`LEFT`:`RIGHT`,g=c(h,h===`LEFT`?p.oldNo:p.newNo)?` c-sel`:``;return(0,W.jsx)(`div`,{className:`code${e.last?` last`:``}`,children:(0,W.jsxs)(`div`,{className:`code-row unified`,"data-viewed":e.viewed||void 0,children:[d(`LEFT`,p.oldNo,m+g),d(`RIGHT`,p.newNo,m+g),f(p,h,m+g)]})})});function nL(e){let t=SF(),n=YI(),r=t.seenHunks.has(`${e.file.path}\n${e.hunk.hash}`),i=e.hunk;return(0,W.jsxs)(`div`,{className:`hunk-head`,"data-current":e.current||void 0,"data-unseen":!r||void 0,children:[(0,W.jsxs)(`span`,{children:[`@@ -`,i.oldStart,`,`,i.oldLines,` +`,i.newStart,`,`,i.newLines,` @@ `,i.section]}),(0,W.jsx)(`div`,{style:{flex:1}}),(0,W.jsx)(Qf,{size:`compact-xs`,variant:r?`light`:`subtle`,color:r?`green`:`gray`,onClick:()=>n.toggleHunk(e.file,e.hunk,!r),children:r?`✓ hunk vu`:`Marquer le hunk vu`})]})}function rL({file:e,target:t}){let n=SF(),r=wF(n.ref),i=n.selection;if(t===`line`&&!i)return null;let a,o,s=null,c;t===`file`||!i?(a=t=>({subjectType:`FILE`,path:e.path,body:t}),o=`sur le fichier`,c=()=>n.setFileComposer(null)):(a=e=>({subjectType:`LINE`,path:i.path,side:i.side,line:i.end,startLine:i.start===i.end?null:i.start,startSide:i.start===i.end?null:i.side,body:e}),o=`${i.start===i.end?`ligne ${i.end}`:`lignes ${i.start}–${i.end}`} · ${i.side===`LEFT`?`ancien code`:`nouveau code`}`,i.side===`RIGHT`&&(s=e.hunks.flatMap(e=>e.lines.filter(e=>e.newNo!==null&&e.newNo>=i.start&&e.newNo<=i.end).map(e=>e.content))),c=()=>n.setSelection(null));let l=n.pendingReviewId,u=(e,t)=>r.addThread.mutateAsync({prId:n.detail.pr.id,pendingReviewId:t===`review`?l:null,thread:a(e),mode:t});return(0,W.jsx)(`div`,{className:`diff-block`,children:(0,W.jsxs)(`div`,{className:`thread`,"data-focus":!0,children:[(0,W.jsxs)(`div`,{className:`thread-head`,children:[`Nouveau commentaire · `,o,l&&(0,W.jsx)(Uf,{size:`xs`,color:`yellow`,variant:`light`,ml:`auto`,children:`review en attente`})]}),(0,W.jsx)(bF,{draftKey:`new:${n.ref.owner}/${n.ref.repo}#${n.ref.number}`,repoContext:`${n.ref.owner}/${n.ref.repo}`,suggestionLines:s,onCancel:c,actions:[{label:`Commenter seul`,disabled:l!==null,run:e=>u(e,`single`)},{label:l?`Ajouter à la review`:`Démarrer une review`,run:e=>u(e,`review`)}]})]})})}function iL(e){let t=SF(),n=(0,C.useRef)(null),r=(0,C.useRef)({fileIdx:null,hunkIdx:null}),i=t.range.head===t.detail.pr.headRefOid,a=(0,C.useMemo)(()=>VI({files:e.files,layout:t.layout,threads:t.detail.threads,anchorable:e=>i&&(e===`RIGHT`||t.range.fullPr),collapsed:e.collapsed,composer:t.selection,fileComposer:t.fileComposer,onlyFile:e.onlyFile}),[e.files,t.layout,t.detail.threads,i,t.range.fullPr,e.collapsed,t.selection,t.fileComposer,e.onlyFile]),o=(0,C.useMemo)(()=>e.files.map(GI),[e.files]),s=a.rows,c=fI({count:s.length,getScrollElement:()=>n.current,estimateSize:e=>KI[s[e].kind],getItemKey:e=>s[e].key,overscan:30,onChange:t=>{let n=t.getVirtualItemForOffset((t.scrollOffset??0)+4),i=n?s[n.index]:void 0,o=null;if(n)for(let e=a.hunkRows.length-1;e>=0;e--){let t=a.hunkRows[e];if(t.row<=n.index&&t.fileIdx===i?.fileIdx){o=t.hunkIdx;break}}let c=i?.fileIdx??null;(c!==r.current.fileIdx||o!==r.current.hunkIdx)&&(r.current={fileIdx:c,hunkIdx:o},e.onCurrentChange(c,o))}}),l=e.onCurrentChange;(0,C.useImperativeHandle)(e.handleRef,()=>{let n=()=>c.getVirtualItemForOffset((c.scrollOffset??0)+4)?.index??0,i=e=>{e!==void 0&&c.scrollToIndex(e,{align:`start`})};return{scrollToFile:t=>{let n=e.files.findIndex(e=>e.path===t);i(a.fileRow[n]),n!==-1&&n!==r.current.fileIdx&&(r.current={fileIdx:n,hunkIdx:null},l(n,null))},scrollToThread:e=>{let t=a.threadRow.get(e);return t!==void 0&&(c.scrollToIndex(t,{align:`center`}),!0)},step:(e,r)=>{let o=n(),c;if(e===`file`)c=a.fileRow.filter(e=>e!==void 0);else if(e===`hunk`)c=a.hunkRows.map(e=>e.row);else{let e=new Set(t.detail.threads.filter(e=>!e.isResolved).map(e=>e.id));c=[...new Set([...a.threadRow].filter(([t])=>e.has(t)).map(([,e])=>e))].sort((e,t)=>e-t)}let l=r>0?c.find(e=>e>o):c.filter(e=>e<o).at(-1);if(i(l),e===`thread`&&l!==void 0){let e=s[l],n=e&&(e.kind===`threads`||e.kind===`orphans`)?e.threadIds.find(e=>!t.detail.threads.find(t=>t.id===e)?.isResolved):void 0;n&&t.setFocusedThread(n)}},current:()=>r.current}},[c,a,e.files,s,t,l]);let u=c.getVirtualItems(),d=c.getVirtualItemForOffset((c.scrollOffset??0)+4),f=d?s[d.index]:void 0,p=f&&f.kind!==`file`&&f.fileIdx!==null?e.files[f.fileIdx]:void 0,m=(0,C.useMemo)(()=>new Map(t.detail.threads.map(e=>[e.id,e])),[t.detail.threads]),h=(n,i)=>{let a=s[i+1],c=!a||a.kind===`file`,l=n.fileIdx===null?void 0:e.files[n.fileIdx];switch(n.kind){case`file`:return(0,W.jsx)(QI,{file:l,collapsed:e.collapsed.has(l.path),onToggleCollapse:()=>e.onToggleCollapse(l.path)});case`hunk`:return(0,W.jsx)(nL,{file:l,hunk:l.hunks[n.hunkIdx],current:r.current.fileIdx===n.fileIdx&&r.current.hunkIdx===n.hunkIdx});case`split`:case`line`:{let e=l.hunks[n.hunkIdx];return(0,W.jsx)(tL,{row:n,file:l,sources:o[n.fileIdx],viewed:t.seenHunks.has(`${l.path}\n${e.hash}`),last:c})}case`threads`:return(0,W.jsx)(`div`,{className:`diff-block${c?` last`:``}`,children:n.threadIds.map(e=>{let t=m.get(e);return t?(0,W.jsx)(WI,{thread:t},e):null})});case`composer`:return(0,W.jsx)(rL,{file:l,target:n.target});case`notice`:return(0,W.jsx)(`div`,{className:`diff-block${c?` last`:``}`,children:(0,W.jsx)(Z,{size:`sm`,c:`dimmed`,children:n.text})});case`orphans`:return(0,W.jsxs)(`div`,{className:`diff-block${c?` last`:``}`,style:n.fileIdx===null?{marginTop:16,borderTop:`1px solid var(--br-border)`}:void 0,children:[(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:600,mb:4,children:n.title}),n.threadIds.map(e=>{let t=m.get(e);return t?(0,W.jsx)(WI,{thread:t,showPath:n.fileIdx===null},e):null})]})}};return s.length===0?(0,W.jsx)(`div`,{className:`diff-scroll`,ref:n,children:(0,W.jsx)(Z,{c:`dimmed`,p:`lg`,children:`Aucun changement dans cette plage.`})}):(0,W.jsxs)(`div`,{className:`diff-scroll`,ref:n,children:[p&&(0,W.jsx)(`div`,{className:`sticky-file`,children:(0,W.jsx)(QI,{file:p,collapsed:e.collapsed.has(p.path),onToggleCollapse:()=>e.onToggleCollapse(p.path)})}),(0,W.jsx)(`div`,{className:`diff-inner`,style:{height:c.getTotalSize()+80},children:u.map(e=>(0,W.jsx)(`div`,{"data-index":e.index,ref:c.measureElement,className:`diff-row`,style:{transform:`translateY(${e.start}px)`},children:h(s[e.index],e.index)},e.key))}),(0,W.jsx)(ql,{className:`diff-end`,justify:`center`,p:`md`,children:(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[(0,W.jsx)(Bp,{size:`xs`,children:`j`}),`/`,(0,W.jsx)(Bp,{size:`xs`,children:`k`}),` fichier · `,(0,W.jsx)(Bp,{size:`xs`,children:`n`}),`/`,(0,W.jsx)(Bp,{size:`xs`,children:`p`}),` hunk · `,(0,W.jsx)(Bp,{size:`xs`,children:`]`}),`/`,(0,W.jsx)(Bp,{size:`xs`,children:`[`}),` thread ouvert`]})})]})}var aL=e=>e.additions+e.deletions;function oL(e){let t=aL(e),n=t===0?.5:e.additions/t;return`hsl(${Math.round(n*130)} 45% 30%)`}function sL(e,t){return{kind:`dir`,name:e,path:t,dirs:[],files:[],additions:0,deletions:0,fileCount:0,viewedCount:0,openThreads:0}}function cL(e,t){let n=sL(``,``);for(let t of e){let e=t.path.split(`/`),r=n;for(let t of e.slice(0,-1)){let e=r.path?`${r.path}/${t}`:t,n=r.dirs.find(t=>t.path===e);n||(n=sL(t,e),r.dirs.push(n)),r=n}r.files.push({kind:`file`,name:e.at(-1),path:t.path,stat:t})}let r=(e,n)=>{let i=e;for(;!n&&i.files.length===0&&i.dirs.length===1;){let e=i.dirs[0];i={...e,name:`${i.name}/${e.name}`}}i.dirs=i.dirs.map(e=>r(e,!1)),i.additions=i.deletions=i.fileCount=i.viewedCount=i.openThreads=0;for(let e of i.dirs)i.additions+=e.additions,i.deletions+=e.deletions,i.fileCount+=e.fileCount,i.viewedCount+=e.viewedCount,i.openThreads+=e.openThreads;for(let e of i.files)i.additions+=e.stat.additions,i.deletions+=e.stat.deletions,i.fileCount+=1,i.viewedCount+=+(e.stat.state===`viewed`),i.openThreads+=e.stat.openThreads;if(t){let e=(e,t)=>e.name.localeCompare(t.name),n=(t,n)=>aL(n.kind===`dir`?n:n.stat)-aL(t.kind===`dir`?t:t.stat)||e(t,n);i.dirs.sort(t===`churn`?n:e),i.files.sort(t===`churn`?n:e)}return i};return r(n,!0)}function lL(e,t){let n=[],r=(e,i)=>{for(let a of e.dirs)n.push({...a,depth:i}),t.has(a.path)||r(a,i+1);for(let t of e.files)n.push({...t,depth:i})};return r(e,0),n}function uL(e,t,n){return t===`list`?n===`name`?e.map(e=>e.path):[...e].sort((e,t)=>aL(t)-aL(e)||e.path.localeCompare(t.path)).map(e=>e.path):lL(cL(e.map(e=>({...e,state:`none`,openThreads:0,unreadThreads:0})),n),new Set).flatMap(e=>e.kind===`file`?[e.path]:[])}var dL=Object.defineProperty,fL=(e,t,n)=>t in e?dL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pL=(e,t)=>{for(var n in t)dL(e,n,{get:t[n],enumerable:!0})},mL=(e,t,n)=>fL(e,typeof t==`symbol`?t:t+``,n),hL={};pL(hL,{Graph:()=>eR,alg:()=>OL});var gL=Object.defineProperty,_L=(e,t)=>{for(var n in t)gL(e,n,{get:t[n],enumerable:!0})},vL=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected=`directed`in e?e.directed:!0,this._isMultigraph=`multigraph`in e&&e.multigraph,this._isCompound=`compound`in e&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=typeof e==`function`?e:()=>e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(e=>{t===void 0?this.setNode(e):this.setNode(e,t)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(e=>{this.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e===`\0`)return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t),r=this.successors(e);if(r)for(let e of r)n.add(e);return Array.from(n.values())}}isLeaf(e){let t;return t=this.isDirected()?this.successors(e):this.neighbors(e),(t?.length??0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([n,r])=>{e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(e=>{t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,this.edge(e))});let n={},r=e=>{let i=this.parent(e);return!i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:r(i)};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,r(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=typeof e==`function`?e:()=>e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((e,n)=>(t===void 0?this.setEdge(e,n):this.setEdge(e,n,t),n)),this}setEdge(e,t,n,r){let i,a,o,s,c=!1;typeof e==`object`&&e&&`v`in e?(i=e.v,a=e.w,o=e.name,arguments.length===2&&(s=t,c=!0)):(i=e,a=t,o=r,arguments.length>2&&(s=n,c=!0)),i=``+i,a=``+a,o!==void 0&&(o=``+o);let l=xL(this._isDirected,i,a,o);if(l in this._edgeLabels)return c&&(this._edgeLabels[l]=s),this;if(o!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(i),this.setNode(a),this._edgeLabels[l]=c?s:this._defaultEdgeLabelFn(i,a,o);let u=SL(this._isDirected,i,a,o);return i=u.v,a=u.w,Object.freeze(u),this._edgeObjs[l]=u,yL(this._preds[a],i),yL(this._sucs[i],a),this._in[a][l]=u,this._out[i][l]=u,this._edgeCount++,this}edge(e,t,n){let r=arguments.length===1?CL(this._isDirected,e):xL(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(e,t,n){let r=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof r!=`object`||!r?{label:r}:r}hasEdge(e,t,n){return(arguments.length===1?CL(this._isDirected,e):xL(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let r=arguments.length===1?CL(this._isDirected,e):xL(this._isDirected,e,t,n),i=this._edgeObjs[r];if(i){let e=i.v,t=i.w;delete this._edgeLabels[r],delete this._edgeObjs[r],bL(this._preds[t],e),bL(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let r=Object.values(e);return n?r.filter(e=>e.v===t&&e.w===n||e.v===n&&e.w===t):r}};function yL(e,t){e[t]?e[t]++:e[t]=1}function bL(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function xL(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}return i+``+a+``+(r===void 0?`\0`:r)}function SL(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}let o={v:i,w:a};return r&&(o.name=r),o}function CL(e,t){return xL(e,t.v,t.w,t.name)}_L({},{read:()=>DL,write:()=>wL});function wL(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:TL(e),edges:EL(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function TL(e){return e.nodes().map(t=>{let n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function EL(e){return e.edges().map(t=>{let n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function DL(e){let t=new vL(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(e=>{t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(e=>{t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}var OL={};_L(OL,{CycleException:()=>UL,bellmanFord:()=>AL,components:()=>ML,dijkstra:()=>FL,dijkstraAll:()=>LL,findCycles:()=>zL,floydWarshall:()=>VL,isAcyclic:()=>GL,postorder:()=>YL,preorder:()=>XL,prim:()=>ZL,shortestPaths:()=>QL,tarjan:()=>RL,topsort:()=>WL});var kL=()=>1;function AL(e,t,n,r){return jL(e,String(t),n||kL,r||function(t){return e.outEdges(t)??[]})}function jL(e,t,n,r){let i={},a,o=0,s=e.nodes(),c=function(e){let t=i[e.v],r=i[e.w];if(!t||!r)return;let o=n(e);t.distance+o<r.distance&&(i[e.w]={distance:t.distance+o,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){r(e).forEach(function(t){let n=t.v===e?t.v:t.w,r=n===t.v?t.w:t.v;c({v:n,w:r})})})};s.forEach(function(e){i[e]={distance:e===t?0:1/0,predecessor:``}});let u=s.length;for(let e=1;e<u&&(a=!1,o++,l(),a);e++);if(o===u-1&&(a=!1,l(),a))throw Error(`The graph contains a negative weight cycle`);return i}function ML(e){let t={},n=[],r;function i(n){var a,o;n in t||(t[n]=!0,r.push(n),(a=e.successors(n))==null||a.forEach(i),(o=e.predecessors(n))==null||o.forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}var NL=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){let n=this._keyIndices,r=String(e);if(!(r in n)){let e=this._arr,i=e.length;return n[r]=i,e.push({key:r,priority:t}),this._decrease(i),!0}return!1}removeMin(){if(this.size()===0)throw Error(`Queue underflow`);this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw Error(`Key not found: ${e}`);let r=this._arr[n].priority;if(t>r)throw Error(`New priority is greater than current priority. Key: ${e} Old: ${r} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let t=this._arr,n=t[e].priority,r;for(;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){let n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}},PL=()=>1;function FL(e,t,n,r){return IL(e,String(t),n||PL,r||function(t){return e.outEdges(t)??[]})}function IL(e,t,n,r){let i={},a=new NL,o,s,c=function(e){let t=e.v===o?e.w:e.v,r=i[t];if(!r)return;let c=n(e),l=s.distance+c;if(c<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+c);l<r.distance&&(r.distance=l,r.predecessor=o,a.decrease(t,l))};for(e.nodes().forEach(function(e){let n=e===t?0:1/0;i[e]={distance:n,predecessor:``},a.add(e,n)});a.size()>0;){o=a.removeMin();let e=i[o];if(!e||e.distance===1/0)break;s=e,r(o).forEach(c)}return i}function LL(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=FL(e,i,t,n),r},{})}function RL(e){let t=0,n=[],r={},i=[];function a(o){var s;let c=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),(s=e.successors(o))==null||s.forEach(function(e){if(e in r){let t=r[e];t!=null&&t.onStack&&(c.lowlink=Math.min(c.lowlink,t.index))}else{a(e);let t=r[e];t&&(c.lowlink=Math.min(c.lowlink,t.lowlink))}}),c.lowlink===c.index){let e=[],t;do{t=n.pop();let i=r[t];i&&(i.onStack=!1),e.push(t)}while(o!==t);i.push(e)}}return e.nodes().forEach(function(e){e in r||a(e)}),i}function zL(e){return RL(e).filter(function(t){let n=t[0];return n?t.length>1||t.length===1&&(e.outEdges(n,n)??[]).length>0:!1})}var BL=()=>1;function VL(e,t,n){return HL(e,t||BL,n||function(t){return e.outEdges(t)??[]})}function HL(e,t,n){let r={},i=e.nodes();return i.forEach(function(e){let a={};r[e]=a,a[e]={distance:0,predecessor:``},i.forEach(function(t){e!==t&&(a[t]={distance:1/0,predecessor:``})}),n(e).forEach(function(n){let r=n.v===e?n.w:n.v,i=t(n);a[r]={distance:i,predecessor:e}})}),i.forEach(function(e){let t=r[e];t&&i.forEach(function(n){let a=r[n];a&&i.forEach(function(n){let r=a[e],i=t[n],o=a[n];if(r&&i&&o){let e=r.distance+i.distance;e<o.distance&&(o.distance=e,o.predecessor=i.predecessor)}})})}),r}var UL=class extends Error{constructor(e){super(e),this.name=`CycleException`}};function WL(e){let t={},n={},r=[];function i(a){var o;if(a in n)throw new UL;a in t||(n[a]=!0,t[a]=!0,(o=e.predecessors(a))==null||o.forEach(i),delete n[a],r.push(a))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new UL;return r}function GL(e){try{WL(e)}catch(e){if(e instanceof UL)return!1;throw e}return!0}function KL(e,t,n,r,i){Array.isArray(t)||(t=[t]);let a=(t=>(e.isDirected()?e.successors(t):e.neighbors(t))??[]),o={};return t.forEach(function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);i=qL(e,t,n===`post`,o,a,r,i)}),i}function qL(e,t,n,r,i,a,o){return t in r||(r[t]=!0,n||(o=a(o,t)),i(t).forEach(function(t){o=qL(e,t,n,r,i,a,o)}),n&&(o=a(o,t))),o}function JL(e,t,n){return KL(e,t,n,function(e,t){return e.push(t),e},[])}function YL(e,t){return JL(e,t,`post`)}function XL(e,t){return JL(e,t,`pre`)}function ZL(e,t){var n;let r=new vL,i={},a=new NL,o;function s(e){let n=e.v===o?e.w:e.v,r=a.priority(n);if(r!==void 0){let s=t(e);s<r&&(i[n]=o,a.decrease(n,s))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(e){a.add(e,1/0),r.setNode(e)});let c=e.nodes()[0];c!==void 0&&a.decrease(c,0);let l=!1;for(;a.size()>0;){if(o=a.removeMin(),o in i)r.setEdge(o,i[o]);else{if(l)throw Error(`Input graph is not connected: `+e);l=!0}(n=e.nodeEdges(o))==null||n.forEach(s)}return r}function QL(e,t,n,r){return $L(e,t,n,r??(t=>e.outEdges(t)??[]))}function $L(e,t,n,r){if(n===void 0)return FL(e,t,n,r);let i=!1,a=e.nodes();for(let o=0;o<a.length;o++){let s=a[o];if(s===void 0)continue;let c=r(s);for(let e=0;e<c.length;e++){let t=c[e];if(!t)continue;let r=t.v===s?t.v:t.w;n({v:r,w:r===t.v?t.w:t.v})<0&&(i=!0)}if(i)return AL(e,t,n,r)}return FL(e,t,n,r)}var eR=vL;function tR(e,t,n,r){let i=r;for(;e.hasNode(i);)i=_R(r);return n.dummy=t,e.setNode(i,n),i}function nR(e){let t=new eR().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function rR(e){let t=new eR({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function iR(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function aR(e){let t=vR(fR(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i]||(t[i]=[]),t[i][r.order]=n)}),t}function oR(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=dR(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function sR(e){let t=e.nodes().map(t=>e.node(t).rank).filter(e=>e!==void 0),n=dR(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function cR(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),tR(e,`border`,i,t)}function lR(e,t=uR){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var uR=65535;function dR(e,t){return t.length>uR?e(...lR(t).map(t=>e(...t))):e(...t)}function fR(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return dR(Math.max,t)}function pR(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function mR(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function hR(e,t){return t()}var gR=0;function _R(e){return e+(``+ ++gR)}function vR(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function yR(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function bR(e,t){let n;return n=typeof t==`string`?e=>e[t]:t,Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function xR(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}var SR=`\0`;function CR(e,t,n){if(!(e&&t&&n&&t.dummy===`edge`&&n.dummy===`edge`&&t.edgeObj&&n.edgeObj&&e[t.edgeObj.v]&&e[n.edgeObj.v]&&e[t.edgeObj.w]&&e[n.edgeObj.w]))return 0;let r=!0;t.edgeObj.w===n.edgeObj.w&&(r=!1);let i=r?e[t.edgeObj.v]?.rank??NaN:e[t.edgeObj.w]?.rank??NaN,a=Object.entries(e).find(e=>e[1].edgeObj?.v===t.edgeObj.v&&e[1].edgeObj?.w===t.edgeObj.w&&e[1].rank===i),o=Object.entries(e).find(e=>e[1].edgeObj?.v===n.edgeObj.v&&e[1].edgeObj?.w===n.edgeObj.w&&e[1].rank===i);if(!a||!o)return 0;let s=a[1].order??NaN,c=o[1].order??NaN;return isNaN(s-c)?0:s-c}var wR=`3.1.1`,TR=class{constructor(){mL(this,`_sentinel`);let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return ER(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&ER(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,DR)),n=n._prev;return`[`+e.join(`, `)+`]`}};function ER(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function DR(e,t){if(e!==`_next`&&e!==`_prev`)return t}var OR=TR,kR=()=>1;function AR(e,t){if(e.nodeCount()<=1)return[];let n=NR(e,t||kR);return jR(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w)||[])}function jR(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)MR(e,t,n,o);for(;o=i.dequeue();)MR(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i]?.dequeue(),o){r=r.concat(MR(e,t,n,o,!0)||[]);break}}}return r}function MR(e,t,n,r,i){let a=[],o=i?a:void 0;return(e.inEdges(r.v)||[]).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,PR(t,n,s)}),(e.outEdges(r.v)||[]).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,PR(t,n,o)}),e.removeNode(r.v),o}function NR(e,t){let n=new eR,r=0,i=0;e.nodes().forEach(e=>{n.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s);let c=n.node(e.v),l=n.node(e.w);i=Math.max(i,c.out+=o),r=Math.max(r,l.in+=o)});let a=FR(i+r+3).map(()=>new OR),o=r+1;return n.nodes().forEach(e=>{PR(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function PR(e,t,n){var r,i,a;n.out?n.in?(a=e[n.out-n.in+t])==null||a.enqueue(n):(i=e[e.length-1])==null||i.enqueue(n):(r=e[0])==null||r.enqueue(n)}function FR(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function IR(e,t){(e.graph().acyclicer===`greedy`?AR(e,n(e)):LR(e,t??null)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,_R(`rev`))});function n(e){return t=>e.edge(t).weight}}function LR(e,t){let n=[],r={},i={};function a(t){Object.hasOwn(i,t)||(i[t]=!0,r[t]=!0,e.outEdges(t).forEach(e=>{Object.hasOwn(r,e.w)?n.push(e):a(e.w)}),delete r[t])}function o(a){var s;Object.hasOwn(i,a)||(i[a]=!0,r[a]=!0,(s=e.outEdges(a))==null||s.forEach(i=>{Object.hasOwn(r,i.w)||t.node(a)?.rank>t.node(i.w)?.rank&&zR(e,i.w,i)?n.push(i):o(i.w)}),delete r[a])}let s=a;return t&&typeof t.node==`function`&&(s=o),e.sources().forEach(s),e.nodes().forEach(s),n}function RR(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function zR(e,t,n){let r=new Set;function i(t){if(e.sources().includes(t))return!0;r.add(t);for(let a of e.inEdges(t)??[])if((a.v!==n.v||a.w!==n.w)&&!r.has(a.v)&&i(a.v))return!0;return!1}return i(t)}function BR(e){e.graph().dummyChains=[],e.edges().forEach(t=>VR(e,t))}function VR(e,t){let n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a===r+1)return;e.removeEdge(t);let l,u,d=0;for(++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=tR(e,`edge`,u,`_d`),r===c&&(u.width=s.width,u.height=s.height,u.dummy=`edge-label`,u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}function HR(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function UR(e){let t={};function n(r){let i=e.node(r);if(Object.hasOwn(t,r))return i.rank;t[r]=!0;let a=e.outEdges(r),o=a?a.map(t=>t==null?1/0:n(t.w)-e.edge(t).minlen):[],s=dR(Math.min,o);return s===1/0&&(s=0),i.rank=s}e.sources().forEach(n)}function WR(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var GR=KR;function KR(e){let t=new eR({directed:!1}),n=e.nodes();if(n.length===0)throw Error(`Graph must have at least one node`);let r=n[0],i=e.nodeCount();t.setNode(r,{});let a,o;for(;qR(t,e)<i&&(a=JR(t,e),a);)o=t.hasNode(a.v)?WR(e,a):-WR(e,a),YR(t,e,o);return t}function qR(e,t){function n(r){let i=t.nodeEdges(r);i&&i.forEach(i=>{let a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!WR(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return e.nodes().forEach(n),e.nodeCount()}function JR(e,t){return t.edges().reduce((n,r)=>{let i=1/0;return e.hasNode(r.v)!==e.hasNode(r.w)&&(i=WR(t,r)),i<n[0]?[i,r]:n},[1/0,null])[1]}function YR(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}var{preorder:XR,postorder:ZR}=OL,QR=$R;$R.initLowLimValues=rz,$R.initCutValues=ez,$R.calcCutValue=nz,$R.leaveEdge=az,$R.enterEdge=oz,$R.exchangeEdges=sz;function $R(e){e=nR(e),UR(e);let t=GR(e);rz(t),ez(t,e);let n,r;for(;n=az(t);)r=oz(t,e,n),sz(t,e,n,r)}function ez(e,t){let n=ZR(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>tz(e,t,n))}function tz(e,t,n){let r=e.node(n).parent,i=e.edge(n,r);i.cutvalue=nz(e,t,n)}function nz(e,t,n){let r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;a||=(i=!1,t.edge(r,n)),o=a.weight;let s=t.nodeEdges(n);return s&&s.forEach(a=>{let s=a.v===n,c=s?a.w:a.v;if(c!==r){let r=s===i,l=t.edge(a).weight;if(o+=r?l:-l,lz(e,n,c)){let t=e.edge(n,c).cutvalue;o+=r?-t:t}}}),o}function rz(e,t){arguments.length<2&&(t=e.nodes()[0]),iz(e,{},1,t)}function iz(e,t,n,r,i){let a=n,o=e.node(r);t[r]=!0;let s=e.neighbors(r);return s&&s.forEach(i=>{Object.hasOwn(t,i)||(n=iz(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function az(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function oz(e,t,n){let r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);let a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),t.edges().filter(t=>c===uz(e,e.node(t.v),s)&&c!==uz(e,e.node(t.w),s)).reduce((e,n)=>WR(t,n)<WR(t,e)?n:e)}function sz(e,t,n,r){let i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),rz(e),ez(e,t),cz(e,t)}function cz(e,t){let n=e.nodes().find(t=>!e.node(t).parent);if(!n)return;let r=XR(e,[n]);r=r.slice(1),r.forEach(n=>{let r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function lz(e,t,n){return e.hasEdge(t,n)}function uz(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var dz=fz;function fz(e){let t=e.graph().ranker;if(typeof t==`function`)return t(e);switch(t){case`network-simplex`:hz(e);break;case`tight-tree`:mz(e);break;case`longest-path`:pz(e);break;case`none`:break;default:hz(e)}}var pz=UR;function mz(e){UR(e),GR(e)}function hz(e){QR(e)}var gz=_z;function _z(e){let t=yz(e),n=e.graph();Array.isArray(n.dummyChains)&&n.dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,a=vz(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;for(;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(o[c+1]).minRank<=r.rank;)c++;l=o[c]}l!==void 0&&e.setParent(n,l),n=e.successors(n)[0]}})}function vz(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));let l=c,u=r;for(;(u=e.parent(u))!==l;)a.push(u);return{path:i.concat(a.reverse()),lca:l}}function yz(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children(SR).forEach(r),t}function bz(e){let t=tR(e,`root`,{},`_root`),n=Sz(e),r=Object.values(n),i=dR(Math.max,r)-1,a=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=a);let o=Cz(e)+1;e.children(SR).forEach(r=>{xz(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function xz(e,t,n,r,i,a,o){let s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}let c=cR(e,`_bt`),l=cR(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,s.forEach(s=>{xz(e,t,n,r,i,a,s);let u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-(a[o]??0)+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+(a[o]??0)})}function Sz(e){let t={};function n(r,i){let a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children(SR).forEach(e=>n(e,1)),t}function Cz(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function wz(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}var Tz=Ez;function Ez(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),i&&Object.hasOwn(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(let t=i.minRank,r=i.maxRank+1;t<r;++t)Dz(e,`borderLeft`,`_bl`,n,i,t),Dz(e,`borderRight`,`_br`,n,i,t)}}e.children(SR).forEach(t)}function Dz(e,t,n,r,i,a){let o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=tR(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function Oz(e){let t=e.graph().rankdir?.toLowerCase();(t===`lr`||t===`rl`)&&Az(e)}function kz(e){let t=e.graph().rankdir?.toLowerCase();(t===`bt`||t===`rl`)&&Mz(e),(t===`lr`||t===`rl`)&&(Pz(e),Az(e))}function Az(e){e.nodes().forEach(t=>jz(e.node(t))),e.edges().forEach(t=>jz(e.edge(t)))}function jz(e){let t=e.width;e.width=e.height,e.height=t}function Mz(e){e.nodes().forEach(t=>Nz(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(Nz),Object.hasOwn(r,`y`)&&Nz(r)})}function Nz(e){e.y=-e.y}function Pz(e){e.nodes().forEach(t=>Fz(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(Fz),Object.hasOwn(r,`x`)&&Fz(r)})}function Fz(e){let t=e.x;e.x=e.y,e.y=t}function Iz(e,t=null){let n={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=vR(dR(Math.max,i)+1).map(()=>[]);function o(t){if(n[t])return;n[t]=!0;let r=e.node(t);a[r.rank].push(t);let i=e.successors(t);i&&[...i].sort((e,t)=>s(e,t)).forEach(o)}r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(o);function s(n,r){return CR(t,e.node(n),e.node(r))}return a}function Lz(e,t){let n=0;for(let r=1;r<t.length;++r)n+=Rz(e,t[r-1],t[r]);return n}function Rz(e,t,n){let r=xR(n,n.map((e,t)=>t)),i=t.flatMap(t=>{let n=e.outEdges(t);return n?n.map(t=>({pos:r[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos):[]}),a=1;for(;a<n.length;)a<<=1;let o=2*a-1;--a;let s=Array(o).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;s[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n}),c}function zz(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(!n||!n.length)return{v:t};{let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}})}function Bz(e,t){let n={};return e.forEach((e,t)=>{let r={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight),n[e.v]=r}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(r))}),Vz(Object.values(n).filter(e=>!e.indegree))}function Vz(e){let t=[];function n(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&Hz(e,t)}}function r(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(e=>!e.merged).map(e=>yR(e,[`vs`,`i`,`barycenter`,`weight`]))}function Hz(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function Uz(e,t,n,r,i){let a={},o=null,s=null,c=i;typeof t==`boolean`?(c=t,a={}):t&&(a=t,o=n??null,s=r??null);let l=pR(e,e=>Object.hasOwn(e,`barycenter`)),u=l.lhs,d=l.rhs.sort((e,t)=>t.i-e.i),f=[],p=0,m=0,h=0;u.sort(Gz(s,o,!!c));for(let[e,t]of Object.entries(a)){let n=u.findIndex(t=>t.vs[0]===e);u.splice(n+1,0,t)}h=Wz(f,d,h),u.forEach(e=>{h+=e.vs.length,f.push(e.vs),p+=e.barycenter*e.weight,m+=e.weight,h=Wz(f,d,h)});let g={vs:f.flat(1)};return m&&(g.barycenter=p/m,g.weight=m),g}function Wz(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Gz(e,t,n){return(r,i)=>{if(r.barycenter<i.barycenter)return-1;if(r.barycenter>i.barycenter)return 1;if(e&&(typeof r.vs[0]==`string`||typeof i.vs[0]==`string`)){let n=CR(t,e.node(r.vs[0]),e.node(i.vs[0]));if(n!==0)return n}return n?i.i-r.i:r.i-i.i}}function Kz(e,t,n,r,i){var a,o;let s=null,c=i;typeof r==`boolean`?(c=r,s=null):r!==void 0&&(s=r);let l=e.children(t),u=e.node(t),d=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,p={};d&&(l=l.filter(e=>e!==d&&e!==f));let m=zz(e,l);m.forEach(t=>{if(e.children(t.v).length){let{result:r}=Kz(e,t.v,n,s,c);p[t.v]=r,Object.hasOwn(r,`barycenter`)&&Jz(t,r)}});let h=Bz(m,n);qz(h,p);let g={},_=!1;for(let t=0;t<h.length;t++)for(let n=t+1;n<h.length;n++)if(h[t]&&h[n]&&(a=h[t])!=null&&a.barycenter&&(o=h[n])!=null&&o.barycenter&&h[t]?.barycenter===h[n].barycenter){let r=h[t]?.vs[0]??``,i=h[n]?.vs[0]??``,a=e.node(r),o=e.node(i);if(a.dummy===`edge`&&o.dummy===`edge`&&a.edgeObj?.v===o.edgeObj?.v&&a.edgeObj?.w===o.edgeObj?.w){if(a.edgeLabel.reversed){g[i]=h[t],h.splice(t,1),t--;break}g[r]=h[n],h.splice(n,1),n--}else _=!0}let v=Uz(h,g,s,e,c);if(d&&f){v.vs=[d,v.vs,f].flat(1);let t=e.predecessors(d);if(t&&t.length){let n=e.node(t[0]),r=e.predecessors(f),i=e.node(r[0]);Object.hasOwn(v,`barycenter`)||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+n.order+i.order)/(v.weight+2),v.weight+=2}}return Object.defineProperty(v,"result",{value:v,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(v,"usedBias",{value:_,enumerable:!1,configurable:!0,writable:!0}),v}function qz(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function Jz(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function Yz(e,t,n,r){r||=e.nodes();let i=Xz(e),a=new eR({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return r.forEach(r=>{let o=e.node(r),s=e.parent(r);if(o.rank===t||o.minRank<=t&&t<=o.maxRank){a.setNode(r),a.setParent(r,s||i);let c=e[n](r);c&&c.forEach(t=>{let n=t.v===r?t.w:t.v,i=a.edge(n,r),o=i===void 0?0:i.weight;a.setEdge(n,r,{weight:e.edge(t).weight+o})}),Object.hasOwn(o,`minRank`)&&a.setNode(r,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]})}}),a}function Xz(e){let t;for(;e.hasNode(t=_R(`_root`)););return t}function Zz(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function Qz(e,t={},n=null){if(typeof t.customOrder==`function`){t.customOrder(e,Qz);return}let r=fR(e),i=$z(e,vR(1,r+1),`inEdges`),a=$z(e,vR(r-1,-1,-1),`outEdges`),o=Iz(e,n);if(tB(e,o),t.disableOptimalOrderHeuristic)return;let s=1/0,c,l=t.constraints||[];for(let t=0,r=0;r<4;++t,++r){eB(t%2?i:a,t%4>=2,l,n),o=aR(e);let u=Lz(e,o);u<s?(r=0,c=Object.assign({},o),s=u):u===s&&(c=structuredClone(o))}tB(e,c)}function $z(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return Yz(e,t,n,r.get(t)||[])})}function eB(e,t,n,r){let i=!0,a=new eR;e.forEach(function(e){n.forEach(e=>a.setEdge(e.left,e.right));let o=e.graph().root,{result:s,usedBias:c}=Kz(e,o,a,r,i);t&&c&&(i=!i),s.vs.forEach((t,n)=>e.node(t).order=n),Zz(e,a,s.vs)})}function tB(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}function nB(e,t){let n={};function r(t,r){let i=0,a=0,o=t.length,s=r[r.length-1];return r.forEach((t,c)=>{let l=iB(e,t),u=l?e.node(l).order:o;(l||t===s)&&(r.slice(a,c+1).forEach(t=>{let r=e.predecessors(t);r&&r.forEach(r=>{let a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&aB(n,r,t)})}),a=c+1,i=u)}),r}return t.length&&t.reduce(r),n}function rB(e,t){let n={};function r(t,r,i,a,o){vR(r,i).forEach(r=>{let i=t[r];if(i!==void 0&&e.node(i).dummy){let t=e.predecessors(i);t&&t.forEach(t=>{if(t===void 0)return;let r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&aB(n,t,i)})}})}function i(t,n){let i=-1,a=-1,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);if(t&&t.length){let s=t[0];if(s===void 0)return;a=e.node(s).order,r(n,o,c,i,a),o=c,i=a}}r(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(i),n}function iB(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(t=>e.node(t).dummy)}}function aB(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function oB(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];return r!==void 0&&Object.hasOwn(r,n)}function sB(e,t,n,r,i){let a={},o={},s={};return t.forEach(e=>{e.forEach((e,t)=>{a[e]=e,o[e]=e,s[e]=t})}),t.forEach(t=>{let c=-1,l=-1,u=!1,d=t,f=t.findIndex(t=>i?.includes(t)||gB(t,e,i));f>0&&(d=[t[f],...t.slice(0,f),...t.slice(f+1)],u=!0),d.forEach(t=>{let d=r(t);if(d&&d.length){i!=null&&i.includes(t)&&(d=d.filter(t=>gB(t,e,i)));let r=d.sort((e,t)=>{let n=s[e],r=s[t];return(n===void 0?0:n)-(r===void 0?0:r)}),f=(r.length-1)/2;for(let e=Math.floor(f),i=Math.ceil(f);e<=i;++e){let i=r[e];if(i===void 0)continue;let d=s[i];if(d!==void 0&&o[t]===t&&c<d&&s[i]!==l&&!oB(n,t,i)){let e=a[i];e!==void 0&&(o[i]=t,o[t]=a[t]=e,c=d,u&&=(c=-1,l=s[i]??-1,!1))}}}})}),{root:a,align:o}}function cB(e,t,n,r,i=!1){let a={},o=lB(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes().slice(),r={},i=n.pop();for(;i;){if(r[i])e(i);else{r[i]=!0,n.push(i);for(let e of t(i))n.push(e)}i=n.pop()}}function l(e){let t=o.inEdges(e);t?a[e]=t.reduce((e,t)=>{let n=a[t.v]??0,r=o.edge(t);return Math.max(e,n+(r===void 0?0:r))},0):a[e]=0}function u(t){let n=o.outEdges(t),r=1/0;n&&(r=n.reduce((e,t)=>{let n=a[t.w],r=o.edge(t);return Math.min(e,(n===void 0?0:n)-(r===void 0?0:r))},1/0));let i=e.node(t);r!==1/0&&i.borderType!==s&&(a[t]=Math.max(a[t]===void 0?0:a[t],r))}function d(e){return o.predecessors(e)||[]}function f(e){return o.successors(e)||[]}return c(l,d),c(u,f),Object.keys(r).forEach(e=>{let t=n[e];t!==void 0&&(a[e]=a[t]??0)}),a}function lB(e,t,n,r){let i=new eR,a=e.graph(),o=mB(a.nodesep,a.edgesep,r);return t.forEach(t=>{let r;t.forEach(t=>{let a=n[t];if(a!==void 0){if(i.setNode(a),r!==void 0){let s=n[r];if(s!==void 0){let n=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),n||0))}}r=t}})}),i}function uB(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=hB(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function dB(e,t){let n=Object.values(t),r=dR(Math.min,n),i=dR(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(a=>{let o=n+a,s=e[o];if(!s||s===t)return;let c=Object.values(s),l=r-dR(Math.min,c);a!==`l`&&(l=i-dR(Math.max,c)),l&&(e[o]=bR(s,e=>e+l))})})}function fB(e,t=void 0){let n=e.ul;return n?bR(n,(n,r)=>{if(t){let n=e[t.toLowerCase()];if(n&&n[r]!==void 0)return n[r]}let i=Object.values(e).map(e=>{let t=e[r];return t===void 0?0:t}).sort((e,t)=>e-t);return((i[1]??0)+(i[2]??0))/2}):{}}function pB(e,t){let n=aR(e),r=Object.assign(nB(e,n),rB(e,n)),i={},a;return[`u`,`d`].forEach(o=>{a=o===`u`?n:Object.values(n).reverse(),[`l`,`r`].forEach(n=>{n===`r`&&(a=a.map(e=>Object.values(e).reverse()));let s=sB(e,a,r,t=>(o===`u`?e.predecessors(t):e.successors(t))||[],t),c=cB(e,a,s.root,s.align,n===`r`);n===`r`&&(c=bR(c,e=>-e)),i[o+n]=c})}),dB(i,uB(e,i)),fB(i,e.graph().align)}function mB(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=void 0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),c}}function hB(e,t){return e.node(t).width}function gB(e,t,n){if(!n)return!1;let r=t.node(e)?.edgeObj;if(!r||t.node(e).edgeLabel.reversed)return!1;let i=n.indexOf(r?.v),a=n.indexOf(r?.w);return i!==-1&&a!==-1&&i===(a+1)%n.length||i===(a-1)%n.length}function _B(e,t){e=rR(e),vB(e),Object.entries(pB(e,t)).forEach(([t,n])=>e.node(t).x=n)}function vB(e){let t=aR(e),n=e.graph(),r=n.ranksep,i=n.rankalign,a=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height??0;return t>r?t:r},0);t.forEach(t=>{let r=e.node(t);r.y=i===`top`?a+r.height/2:i===`bottom`?a+n-r.height/2:a+n/2}),a+=n+r})}var yB=new WeakMap;function bB(e,t={}){return SB(e,hR,t),e}function xB(e,t,n){let r=t;for(;r!==void 0;){let t=e.parent(r);if(t===n)return r;r=t}}function SB(e,t,n){let r=e.nodes().filter(t=>e.children(t).length),i={};r.forEach(r=>{let a=e.node(r);if(a&&a.rankdir){let o=new eR({multigraph:!0,compound:!0});o.setGraph({rankdir:a.rankdir});let s=e.children(r);s.forEach(t=>{let n={...e.node(t)};o.setNode(t,n);let i=e.parent(t);i&&i!==r&&s.includes(i)&&o.setParent(t,i)});let c=new Set;e.edges().forEach(t=>{let n=xB(e,t.v,r),i=xB(e,t.w,r);if(n&&i&&n!==i){let r=`${n}\0${i}`;c.has(r)||(c.add(r),o.setEdge(n,i,{...e.edge(t)}))}}),SB(o,t,n);let l=NB(o);CB(l,t,n,null),wB(o,l);let u=1/0,d=1/0,f=-1/0,p=-1/0;o.nodes().forEach(e=>{if(e===r)return;let t=o.node(e);t&&typeof t.x==`number`&&typeof t.y==`number`&&typeof t.width==`number`&&typeof t.height==`number`&&(u=Math.min(u,t.x-t.width/2),f=Math.max(f,t.x+t.width/2),d=Math.min(d,t.y-t.height/2),p=Math.max(p,t.y+t.height/2))}),(!isFinite(u)||!isFinite(d)||!isFinite(f)||!isFinite(p))&&(u=d=0,f=p=0);let m=f-u,h=p-d;i[r]={minX:u,minY:d,maxX:f,maxY:p,width:m,height:h,offsetX:u,offsetY:d},a._dagreClusterSubgraph=o}});let a=[],o=t=>{let n=[],r=(e.children(t)||[]).filter(e=>e!==t);for(;r.length>0;){let t=r.shift();n.push(t),(e.children(t)||[]).filter(e=>e!==t).forEach(e=>r.push(e))}return n},s=new Map;r.forEach(t=>{let n=e.node(t);n&&n.rankdir&&i[t]&&s.set(t,(e.children(t)||[]).filter(e=>e!==t))});let c=new Set([...s.values()].flat()),l=new Map;s.forEach((e,t)=>{c.has(t)||l.set(t,o(t))});let u=new Set([...l.values()].flat()),d=e=>{for(let[t,n]of l)if(n.includes(e))return t;return e},f=[];e.edges().forEach(t=>{(u.has(t.v)||u.has(t.w))&&f.push({edge:t,label:e.edge(t)})});let p=new Map;u.forEach(t=>{let n=e.parent(t);p.set(t,typeof n==`string`?n:void 0)}),l.forEach((t,n)=>{let r=e.node(n),o=[];t.forEach(t=>{let n=e.node(t);n&&(o.push({id:t,node:n,parent:p.get(t)}),e.removeNode(t))});let s=f.filter(({edge:e})=>t.includes(e.v)||t.includes(e.w)),c=i[n];r&&(a.push({clusterId:n,subgraph:r._dagreClusterSubgraph,bounds:c,children:t,removedNodes:o,removedEdges:s}),r.width=c.width,r.height=c.height)});let m=new Set;f.forEach(({edge:t,label:n})=>{let r=d(t.v),i=d(t.w);if(r!==i&&e.hasNode(r)&&e.hasNode(i)){let t=`${r}\0${i}`;m.has(t)||(m.add(t),e.setEdge(r,i,{...n,width:0,height:0}))}});let h=NB(e),g=CB(h,t,n,yB.get(e)??null);yB.set(e,g),wB(e,h),m.forEach(t=>{let n=t.indexOf(`\0`),r=t.slice(0,n),i=t.slice(n+1);e.hasEdge(r,i)&&e.removeEdge(r,i)}),a.forEach(({clusterId:t,subgraph:n,bounds:r,removedNodes:i,removedEdges:a})=>{let o=e.node(t),s=o?.x??0,c=o?.y??0,l=(r.minX+r.maxX)/2,u=(r.minY+r.maxY)/2;i.forEach(({id:t,node:n,parent:r})=>{e.setNode(t,n),r!==void 0&&e.setParent(t,r)}),a.forEach(({edge:t,label:n})=>{e.setEdge(t,n)}),n.nodes().forEach(r=>{if(r===t)return;let i=n.node(r),a=e.node(r);a&&i&&typeof i.x==`number`&&typeof i.y==`number`&&(a.x=s+(i.x-l),a.y=c+(i.y-u))}),delete o._dagreClusterSubgraph}),r.forEach(t=>{let n=e.node(t),r=i[t];if(n&&n.rankdir&&n._dagreClusterSubgraph&&r){let i=n._dagreClusterSubgraph,a=n.x??0,o=n.y??0,s=(r.minX+r.maxX)/2,c=(r.minY+r.maxY)/2;i.nodes().forEach(n=>{if(n===t)return;let r=i.node(n),l=e.node(n);if(l&&r&&typeof r.x==`number`&&typeof r.y==`number`){let e=r.x-s,t=r.y-c;l.x=a+e,l.y=o+t}}),delete n._dagreClusterSubgraph}})}function CB(e,t,n,r=null){var i,a;let o=n?.useDynamic!==!1,s=o&&(i=r?.graph)!=null?i:null,c=o&&(a=r?.rawNodes)!=null?a:null;t(` makeSpaceForEdgeLabels`,()=>PB(e)),t(` removeSelfEdges`,()=>UB(e)),t(` acyclic`,()=>IR(e,s)),t(` nestingGraph.run`,()=>bz(e)),t(` rank`,()=>dz(rR(e))),t(` injectEdgeLabelProxies`,()=>FB(e)),t(` removeEmptyRanks`,()=>sR(e)),t(` nestingGraph.cleanup`,()=>wz(e)),t(` normalizeRanks`,()=>oR(e)),t(` assignRankMinMax`,()=>IB(e)),t(` removeEdgeLabelProxies`,()=>LB(e)),t(` normalize.run`,()=>BR(e)),t(` parentDummyChains`,()=>gz(e)),t(` addBorderSegments`,()=>Tz(e)),t(` order`,()=>Qz(e,n,c)),t(` insertSelfEdges`,()=>WB(e)),t(` adjustCoordinateSystem`,()=>Oz(e)),t(` position`,()=>_B(e,n.corePath)),t(` positionSelfEdges`,()=>GB(e));let l=JSON.parse(JSON.stringify(e._nodes));return t(` removeBorderNodes`,()=>HB(e)),t(` normalize.undo`,()=>HR(e)),t(` fixupEdgeLabelCoords`,()=>BB(e)),t(` undoCoordinateSystem`,()=>kz(e)),t(` translateGraph`,()=>RB(e)),t(` assignNodeIntersects`,()=>zB(e)),t(` reversePoints`,()=>VB(e)),t(` acyclic.undo`,()=>RR(e)),{graph:e,rawNodes:l}}function wB(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.order=i.order,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var TB=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],EB={ranksep:50,edgesep:20,nodesep:50,rankdir:`TB`,rankalign:`center`},DB=[`acyclicer`,`ranker`,`rankdir`,`align`,`rankalign`],OB=[`width`,`height`,`rank`],kB={width:0,height:0},AB=[`minlen`,`weight`,`width`,`height`,`labeloffset`],jB={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},MB=[`labelpos`];function NB(e){let t=new eR({multigraph:!0,compound:!0}),n=qB(e.graph());return t.setGraph(Object.assign({},EB,KB(n,TB),yR(n,DB))),e.nodes().forEach(n=>{let r=KB(qB(e.node(n)),OB);Object.keys(kB).forEach(e=>{r[e]===void 0&&(r[e]=kB[e])}),t.setNode(n,r);let i=e.parent(n);i!==void 0&&t.setParent(n,i)}),e.edges().forEach(n=>{let r=qB(e.edge(n));t.setEdge(n,Object.assign({},jB,KB(r,AB),yR(r,MB)))}),t}function PB(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,(r.labelpos??`r`).toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function FB(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v);tR(e,`edge-proxy`,{rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t},`_ep`)}})}function IB(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function LB(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy===`edge-proxy`){let r=n;e.edge(r.e).labelRank=n.rank,e.removeNode(t)}})}function RB(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function zB(e){e.edges().forEach(t=>{if(t.v===t.w)return;let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(iR(r,a)),n.points.push(iR(i,o))})}function BB(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function VB(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function HB(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function UB(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function WB(e){aR(e).forEach(t=>{let n=0;t.forEach((t,r)=>{let i=e.node(t);typeof i.rank!=`number`&&(i.rank=0),i.order=r+n,(i.selfEdges||[]).forEach(t=>{tR(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,edgeLabel:t.label},`_se`),(!Array.isArray(t.label.points)||t.label.points.length!==7)&&(t.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete i.selfEdges})})}function GB(e){e.nodes().forEach(t=>{let n=e.node(t),r=e=>typeof e==`number`&&isFinite(e);if(n.dummy===`selfedge`){let i=n,a=e.node(i.e.v),o=r(a?.x)?a.x:0,s=r(a?.y)?a.y:0,c=r(a?.width)?a.width:0,l=r(a?.height)?a.height:0,u=r(n.x)?n.x:o,d=r(n.y)?n.y:s,f=c/2,p=l/2;i.edgeLabel.points=[{x:u+f,y:d-p},{x:u+f,y:d-p},{x:u,y:d},{x:u-f,y:d+p},{x:u-f,y:d+p},{x:u,y:d},{x:u,y:d}],i.edgeLabel.x=u,i.edgeLabel.y=d,e.setEdge(i.e,i.edgeLabel),e.removeNode(t)}else n&&Array.isArray(n.selfEdges)&&n.selfEdges.forEach(e=>{if(!Array.isArray(e.label.points)||e.label.points.length!==7){let t=r(n.x)?n.x:0,i=r(n.y)?n.y:0,a=r(n.width)?n.width:0,o=r(n.height)?n.height:0,s=a/2,c=o/2;e.label.points=[{x:t+s,y:i-c},{x:t+s,y:i-c},{x:t,y:i},{x:t-s,y:i+c},{x:t-s,y:i+c},{x:t,y:i},{x:t,y:i}]}})})}function KB(e,t){return bR(yR(e,t),Number)}function qB(e){let t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}function JB(e){let t=aR(e),n=new eR({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{n.setNode(t,{label:t}),n.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>n.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let r=`layer`+t;n.setNode(r,{rank:`same`}),e.reduce((e,t)=>(n.setEdge(e,t,{style:`invis`}),t))}),n}var YB={graphlib:hL,version:wR,layout:bB,debug:JB,util:{time:mR,notime:hR}},XB=7.2;function ZB(e){let t=e.split(`/`).at(-1)??e,n=e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``;return Math.min(300,Math.max(110,Math.max(t.length,Math.min(n.length,36)*.85)*XB+28))}function QB(e,t,n=[],r=null){let i=new YB.graphlib.Graph({multigraph:!0,compound:!0});i.setGraph({rankdir:`LR`,nodesep:n.length>0?44:16,ranksep:90,edgesep:10,marginx:24,marginy:24+(n.length>0?18:0)}),i.setDefaultEdgeLabel(()=>({}));for(let t of e)i.setNode(t,{width:ZB(t),height:38});let a=new Set(e),o=[];for(let e of n){let t=e.members.filter(e=>a.has(e));if(t.length===0)continue;let n=`cluster:${e.id}`;i.setNode(n,{width:0,height:0});for(let e of t)i.setParent(e,n);o.push({id:e.id,label:e.label,key:n})}let s=new Map(o.map(e=>[e.id,e.key])),c=e=>`package:${e}`;for(let e of r?.packages??[]){i.setNode(c(e.id),{width:Math.max(110,e.label.length*XB+32),height:26});let t=s.get(e.id);t&&i.setParent(c(e.id),t)}let l=(r?.edges??[]).filter(e=>i.hasNode(c(e.from))&&i.hasNode(c(e.to)));l.forEach((e,t)=>i.setEdge(c(e.to),c(e.from),{},`pkg:${t}`)),t.forEach((e,t)=>i.setEdge(e.to,e.from,{},`${e.kind}:${t}`)),YB.layout(i);let u=e=>{let t=i.node(e);return{x:(t.x??0)-t.width/2,y:(t.y??0)-t.height/2,width:t.width,height:t.height}},d=e.map(e=>({path:e,...u(e)})),f=o.map(({id:e,label:t,key:n})=>({id:e,label:t,...u(n)})),p=t.map((e,t)=>({edge:e,points:i.edge({v:e.to,w:e.from,name:`${e.kind}:${t}`}).points??[]})),m=new Set((r?.packages??[]).filter(e=>e.touched).map(e=>e.id)),h=(r?.packages??[]).map(e=>({...e,...u(c(e.id))})),g=l.map((e,t)=>({from:e.from,to:e.to,touched:m.has(e.from)&&m.has(e.to),points:i.edge({v:c(e.to),w:c(e.from),name:`pkg:${t}`}).points??[]})),_=i.graph();return{nodes:d,edges:p,clusters:f,packageNodes:h,packageEdges:g,width:_.width??0,height:_.height??0}}var $B=6,eV=34;function tV(e,t,n,r){let i=new Map;for(let r of e){let e=n===`from`?r.from:r.to;(n===`from`?r.to:r.from)===t&&e!==t&&i.set(e,[...i.get(e)??[],r])}let a=e=>+!e.some(e=>e.kind===`import`);return[...i].sort(([e,t],[n,i])=>r(e)-r(n)||a(t)-a(i)||e.localeCompare(n))}function nV(e,t,n,r=()=>0){let i=tV(t,e,`from`,r),a=tV(t,e,`to`,r),o=Math.max(1,i.length,a.length),s=Math.max(38,o*26+(o-1)*$B),c=Math.min(Math.max(100,n*.3),200),l=+(i.length>0)+ +(a.length>0),u=l===0?0:Math.max(60,(n-c-l*eV)/l),d=(e,t)=>{let n=e.length*26+Math.max(0,e.length-1)*$B,r=(s-n)/2;return e.map(([e,n],i)=>({path:e,x:t,y:r+i*32,width:u,height:26,edges:n}))},f=a.length>0?u+eV:l===0?(n-c)/2:0;return{center:{path:e,x:f,y:(s-38)/2,width:c,height:38},outgoing:d(a,0),incoming:d(i,f+c+eV),width:n,height:s}}var rV={typescript:`TS`,javascript:`JS`,python:`Py`,css:`CSS`,go:`Go`,java:`Java`,kotlin:`Kt`,c:`C`,cpp:`C++`,rust:`Rust`,ruby:`Rb`,vue:`Vue`,svelte:`Svelte`,markdown:`MD`},iV=e=>e.split(`/`).at(-1)??e,aV=e=>e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``;function oV(e){if(e.length===0)return``;let t=`M${e[0].x},${e[0].y}`;for(let n=0;n<e.length-1;n++){let r=e[n-1]??e[n],i=e[n],a=e[n+1],o=e[n+2]??a,s={x:i.x+(a.x-r.x)/6,y:i.y+(a.y-r.y)/6},c={x:a.x-(o.x-i.x)/6,y:a.y-(o.y-i.y)/6};t+=` C${s.x},${s.y} ${c.x},${c.y} ${a.x},${a.y}`}return t}function sV(e,t){let n=Math.max(3,Math.floor((t-14)/7.7));return e.length>n?`${e.slice(0,n-1)}…`:e}function cV(e,t,n,r){let i=(n-e)/2;return`M${e},${t} C${e+i},${t} ${n-i},${r} ${n},${r}`}var lV=`package:`;function uV(e){let{ref:t,width:n}=$e(),r=(0,C.useMemo)(()=>new Map(e.stats.map(e=>[e.path,e])),[e.stats]),i=e.packages,a=(0,C.useMemo)(()=>new Map(i?.context.packages.map(e=>[e.id,e])??[]),[i]),o=e.center,s=(0,C.useMemo)(()=>{if(!o||!i)return e.edges;let t=i.rootOf.get(o),n=new Set(e.edges.filter(e=>e.from===o).map(e=>i.rootOf.get(e.to))),r=new Set(e.edges.filter(e=>e.to===o).map(e=>i.rootOf.get(e.from))),a=[];for(let e of i.imports[o]??[])e!==t&&!n.has(e)&&a.push({from:o,to:lV+e,kind:`import`,detail:[]});if(t!==void 0)for(let e of i.context.edges)e.to===t&&e.from!==t&&!r.has(e.from)&&a.push({from:lV+e.from,to:o,kind:`import`,detail:[]});return[...e.edges,...a]},[o,i,e.edges]),c=o&&n>0?nV(o,s,n,e=>+!!e.startsWith(lV)):null,l=c?r.get(c.center.path):void 0,u=o&&i?a.get(i.rootOf.get(o)??``)?.label:void 0,d=(t,n)=>{let r=t.path.slice(8),s=a.get(r),c=i?.firstFile.get(r),l=s?.touched===!0&&c!==void 0,d=s?.label??(r||`(racine)`),f=n===`out`?`${iV(o??``)} importe le package ${d}`:`le package ${d} utilise ${u??`ce package`}`;return(0,W.jsxs)(`g`,{className:`link-pkg`,"data-touched":s?.touched||void 0,transform:`translate(${t.x} ${t.y})`,style:{cursor:l?`pointer`:`default`},onClick:()=>l&&e.onSelect(c),children:[(0,W.jsx)(`rect`,{width:t.width,height:t.height,rx:t.height/2}),(0,W.jsx)(`text`,{x:t.width/2,y:17,textAnchor:`middle`,children:sV(d,t.width+6)}),(0,W.jsx)(`title`,{children:`${f}${s?.touched?l?` · clic : ouvrir ses fichiers`:``:` · aucun fichier modifié`}`})]},`${n}:${t.path}`)},f=(t,n)=>{let s=r.get(t.path),c=t.edges.every(e=>e.kind===`mention`),l=n===`in`?c?`mentionne`:`importe`:c?`mentionné par`:`importé par`,d=[...new Set(t.edges.flatMap(e=>e.detail))].join(`, `),f=i?a.get(i.rootOf.get(t.path)??``)?.label:void 0;return(0,W.jsxs)(`g`,{className:`link-node`,"data-state":s?.state,transform:`translate(${t.x} ${t.y})`,onClick:()=>e.onSelect(t.path),children:[(0,W.jsx)(`rect`,{width:t.width,height:t.height,rx:5,fill:s?oL(s):`var(--br-surface)`}),(0,W.jsxs)(`text`,{x:7,y:17,className:`link-name`,children:[s?.state===`viewed`?`✓ `:``,sV(iV(t.path),t.width-(s?.state===`viewed`?14:0)),f&&f!==u&&(0,W.jsx)(`tspan`,{dx:6,className:`link-pkg-tag`,children:sV(f,t.width-(iV(t.path).length+2)*7.7)})]}),(0,W.jsx)(`title`,{children:`${t.path}${f?` (${f})`:``}\n${l} ${iV(o??``)}${d?` : ${d}`:``}`})]},`${n}:${t.path}`)},p=(e,t,n)=>{let r=t===`out`?cV(e.x+e.width,e.y+e.height/2,n.x,n.y+n.height/2):cV(n.x+n.width,n.y+n.height/2,e.x,e.y+e.height/2);if(e.path.startsWith(lV)){let n=a.get(e.path.slice(8))?.touched===!0;return(0,W.jsx)(`path`,{d:r,className:`link-pkg-edge`,"data-touched":n||void 0,markerEnd:n?`url(#ego-arrow-pkg)`:`url(#ego-arrow)`},`e:${t}:${e.path}`)}return(0,W.jsx)(`path`,{d:r,className:`link-edge`,"data-kind":e.edges.every(e=>e.kind===`mention`)?`mention`:`import`,markerEnd:`url(#ego-arrow)`},`e:${t}:${e.path}`)},m=(e,t)=>e.path.startsWith(lV)?d(e,t):f(e,t);return(0,W.jsxs)(`div`,{className:`ego`,ref:t,children:[(0,W.jsxs)(ql,{gap:6,py:4,wrap:`nowrap`,children:[(0,W.jsxs)(Z,{size:`xs`,fw:600,truncate:!0,style:{flex:1},children:[o?iV(o):``,u&&(0,W.jsx)(Z,{span:!0,size:`xs`,c:`violet.3`,fw:500,ml:6,children:u})]}),c&&(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:[`utilise `,c.outgoing.length,` · utilisé par `,c.incoming.length]})]}),!o&&(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,pb:8,children:`Ouvrez un fichier pour voir ce qui l’utilise et ce qu’il utilise.`}),c&&(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(ql,{justify:`space-between`,mb:2,children:[(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,children:`ce qu’il utilise`}),(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,children:`ce qui l’utilise →`})]}),c.incoming.length+c.outgoing.length===0?(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`Aucun lien avec les autres fichiers`,i?` ou packages`:``,` de la PR.`]}):(0,W.jsxs)(`svg`,{width:`100%`,viewBox:`0 0 ${c.width} ${c.height}`,children:[(0,W.jsxs)(`defs`,{children:[(0,W.jsx)(`marker`,{id:`ego-arrow`,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto`,children:(0,W.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--mantine-color-gray-5)`})}),(0,W.jsx)(`marker`,{id:`ego-arrow-pkg`,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto`,children:(0,W.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--mantine-color-violet-4)`})})]}),c.incoming.map(e=>p(e,`in`,c.center)),c.outgoing.map(e=>p(e,`out`,c.center)),c.incoming.map(e=>m(e,`in`)),c.outgoing.map(e=>m(e,`out`)),(0,W.jsxs)(`g`,{className:`link-node`,"data-current":!0,"data-state":l?.state,transform:`translate(${c.center.x} ${c.center.y})`,children:[(0,W.jsx)(`rect`,{width:c.center.width,height:38,rx:6,fill:l?oL(l):`var(--br-surface)`}),(0,W.jsx)(`text`,{x:9,y:16,className:`link-name`,children:sV(iV(c.center.path),c.center.width)}),(0,W.jsx)(`text`,{x:9,y:30,className:`link-dir`,children:sV(aV(c.center.path)||`/`,c.center.width+10)}),(0,W.jsx)(`title`,{children:`${c.center.path}${u?` (${u})`:``}`})]})]})]})]})}function dV(e){let{ref:t,width:n,height:r}=$e(),[i,a]=(0,C.useState)(null),[o,s]=(0,C.useState)(null),c=(0,C.useRef)(null),l=(0,C.useMemo)(()=>new Map(e.stats.map(e=>[e.path,e])),[e.stats]),u=(0,C.useMemo)(()=>QB(e.stats.map(e=>e.path),e.edges,e.groups,e.context),[e.stats,e.edges,e.groups,e.context]),d=n>0&&u.width>0?Math.min(1.4,n/u.width,r/u.height):1,f=o??{k:d,x:(n-u.width*d)/2,y:(r-u.height*d)/2},p=new Map(u.packageNodes.map(e=>[e.id,e.label])),m=t=>i===null||t===i||e.edges.some(e=>e.from===i&&e.to===t||e.to===i&&e.from===t);return(0,W.jsxs)(`div`,{ref:t,className:`link-graph`,onWheel:e=>{let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=Math.min(4,Math.max(.15,f.k*(e.deltaY<0?1.15:1/1.15)));s({k:i,x:n-(n-f.x)*i/f.k,y:r-(r-f.y)*i/f.k})},onMouseDown:e=>c.current={x:e.clientX-f.x,y:e.clientY-f.y},onMouseMove:e=>c.current&&s({k:f.k,x:e.clientX-c.current.x,y:e.clientY-c.current.y}),onMouseUp:()=>c.current=null,onMouseLeave:()=>c.current=null,children:[(0,W.jsxs)(`svg`,{width:n,height:r,children:[(0,W.jsxs)(`defs`,{children:[(0,W.jsx)(`marker`,{id:`arrow`,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto`,children:(0,W.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--mantine-color-gray-5)`})}),(0,W.jsx)(`marker`,{id:`arrow-hl`,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto`,children:(0,W.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--mantine-color-blue-4)`})}),(0,W.jsx)(`marker`,{id:`arrow-pkg`,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto`,children:(0,W.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--mantine-color-violet-4)`})})]}),(0,W.jsxs)(`g`,{transform:`translate(${f.x} ${f.y}) scale(${f.k})`,children:[u.clusters.map(e=>(0,W.jsxs)(`g`,{className:`link-cluster`,transform:`translate(${e.x} ${e.y})`,children:[(0,W.jsx)(`rect`,{width:e.width,height:e.height,rx:10}),u.packageNodes.length===0&&(0,W.jsx)(`text`,{x:6,y:-6,children:e.label})]},e.id)),u.packageEdges.map(e=>{let t=i===`package:${e.from}`||i===`package:${e.to}`;return(0,W.jsx)(`path`,{d:oV(e.points),className:`link-pkg-edge`,"data-touched":e.touched||void 0,"data-active":t||void 0,markerEnd:e.touched?`url(#arrow-pkg)`:`url(#arrow)`,children:(0,W.jsx)(`title`,{children:`${p.get(e.from)??e.from} utilise ${p.get(e.to)??e.to}`})},`pkg:${e.from}:${e.to}`)}),u.packageNodes.map(e=>(0,W.jsxs)(`g`,{className:`link-pkg`,"data-touched":e.touched||void 0,transform:`translate(${e.x} ${e.y})`,onMouseEnter:()=>a(`package:${e.id}`),onMouseLeave:()=>a(null),children:[(0,W.jsx)(`rect`,{width:e.width,height:e.height,rx:e.height/2}),(0,W.jsx)(`text`,{x:e.width/2,y:17,textAnchor:`middle`,children:e.label}),(0,W.jsx)(`title`,{children:`${e.label} — ${e.id||`(racine)`}${e.touched?``:` · aucun fichier modifié`}`})]},`package:${e.id}`)),u.edges.map(({edge:e,points:t},n)=>{let r=i!==null&&(e.from===i||e.to===i),a=oV(t);return(0,W.jsx)(`path`,{d:a,className:`link-edge`,"data-kind":e.kind,"data-active":r||void 0,"data-dim":i!==null&&!r||void 0,markerEnd:r?`url(#arrow-hl)`:`url(#arrow)`,children:(0,W.jsxs)(`title`,{children:[e.from,` `,e.kind===`import`?`importe`:`mentionne`,` `,e.to,e.detail.length?` : ${e.detail.join(`, `)}`:``]})},n)}),u.nodes.map(t=>{let n=l.get(t.path);return(0,W.jsxs)(`g`,{className:`link-node`,"data-state":n?.state,"data-current":t.path===e.currentPath||void 0,"data-dim":!m(t.path)||void 0,transform:`translate(${t.x} ${t.y})`,onMouseEnter:()=>a(t.path),onMouseLeave:()=>a(null),onClick:()=>e.onSelect(t.path),children:[(0,W.jsx)(`rect`,{width:t.width,height:38,rx:6,fill:n?oL(n):`var(--br-surface)`}),(0,W.jsxs)(`text`,{x:10,y:16,className:`link-name`,children:[n?.state===`viewed`?`✓ `:``,iV(t.path)]}),(0,W.jsx)(`text`,{x:10,y:30,className:`link-dir`,children:aV(t.path)||`/`}),n&&n.openThreads>0&&(0,W.jsx)(`circle`,{cx:t.width-9,cy:9,r:4,className:`link-thread`,"data-unread":n.unreadThreads>0||void 0}),(0,W.jsx)(`title`,{children:`${t.path}\n+${n?.additions??0} −${n?.deletions??0}`})]},t.path)})]})]}),o&&(0,W.jsx)(Qf,{size:`compact-xs`,variant:`default`,className:`link-fit`,onClick:()=>s(null),children:`Recadrer`})]})}function fV(e){let t=mV(),[n,r]=Ge({key:`br:linksMentions`,defaultValue:!0}),[i,a]=Ge({key:`br:linksIsolated`,defaultValue:!1}),[o,s]=(0,C.useState)(!1),c=(0,C.useMemo)(()=>(t.data?.edges??[]).filter(e=>n||e.kind===`import`),[t.data,n]),l=(0,C.useMemo)(()=>new Set(e.stats.map(e=>e.path)),[e.stats]),u=(0,C.useMemo)(()=>(t.data?.packages??[]).map(e=>({id:e.root,label:e.name,members:e.files})),[t.data]),d=hV(t.data),[f,p]=Ge({key:`br:linksWorkspace`,defaultValue:!0}),m=(0,C.useMemo)(()=>c.filter(e=>l.has(e.from)&&l.has(e.to)),[c,l]),h=new Map,g=new Map;for(let e of c)h.set(e.from,(h.get(e.from)??0)+1),g.set(e.to,(g.get(e.to)??0)+1);let _=e=>(h.get(e)??0)+(g.get(e)??0),v=t.data?.packages??[],y=e.stats,b=y.filter(e=>_(e.path)>0),x=y.filter(e=>_(e.path)===0),S=new Map(v.flatMap(e=>e.files.map(t=>[t,e.root]))),w=new Map(v.map(e=>[e.root,e.name])),T=i?e.stats:e.stats.filter(e=>m.some(t=>t.from===e.path||t.to===e.path));if(t.isPending)return(0,W.jsx)(gV,{});if(t.isError)return(0,W.jsx)(_V,{message:t.error.message});let E=(n,r)=>{let i=t.data.languages[n.path],a=t.data.externalImports[n.path]??0;return(0,W.jsxs)(`div`,{className:`tree-node`,"data-current":n.path===e.currentPath||void 0,"data-viewed":n.state===`viewed`||void 0,title:n.path,onClick:()=>e.onSelect(n.path),children:[r!==void 0&&(0,W.jsx)(`span`,{className:`link-rank`,children:r}),(0,W.jsx)(XI,{state:n.state}),(0,W.jsxs)(`span`,{className:`tree-name`,children:[iV(n.path),(0,W.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,ml:6,children:aV(n.path)})]}),i&&(0,W.jsx)(Uf,{size:`xs`,variant:`outline`,color:`gray`,radius:`sm`,children:rV[i]??i}),(0,W.jsx)(Jm,{label:`importe / mentionne ${h.get(n.path)??0} · utilisé par ${g.get(n.path)??0}${a?` · ${a} import(s) hors PR`:``}`,children:(0,W.jsxs)(Z,{span:!0,size:`xs`,ff:`monospace`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:[`→`,h.get(n.path)??0,` ←`,g.get(n.path)??0]})})]},n.path)};return(0,W.jsxs)(`div`,{className:`links-view`,children:[(0,W.jsxs)(ql,{gap:6,px:10,pb:6,children:[(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[c.length,` liens · `,b.length,` fichiers reliés`]}),(0,W.jsx)(Qf,{size:`compact-xs`,ml:`auto`,variant:`light`,onClick:()=>s(!0),disabled:T.length===0,children:`Graphe ⤢`})]}),(0,W.jsx)(kf,{size:`xs`,px:10,pb:6,label:`Inclure les mentions (noms ou chemins cités dans le texte)`,checked:n,onChange:e=>r(e.currentTarget.checked)}),t.data.unreadable.length>0&&(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,px:10,pb:4,children:[`Non analysés (binaires / trop gros) : `,t.data.unreadable.length]}),(0,W.jsxs)(`div`,{className:`file-nav-scroll`,children:[(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,px:10,pt:6,pb:2,children:v.length>0?`Ordre de lecture : packages les plus utilisés en premier, puis la base d’abord dans chaque package.`:`Ordre de lecture : la base d’abord (fichiers utilisés par les autres), puis ce qui les assemble.`}),v.length>0?(0,W.jsxs)(W.Fragment,{children:[v.map(e=>{let t=y.filter(t=>S.get(t.path)===e.root);if(t.length===0)return null;let n=e=>e.map(e=>w.get(e)??e).join(`, `);return(0,W.jsxs)(`div`,{children:[(0,W.jsx)(Jm,{multiline:!0,w:320,label:`${e.root||`(racine)`} · utilise : ${n(e.dependsOn)||`—`} · utilisé par : ${n(e.usedBy)||`—`}`,children:(0,W.jsxs)(`div`,{className:`pkg-head`,children:[(0,W.jsx)(Uf,{size:`xs`,variant:`light`,color:`violet`,radius:`sm`,children:e.ecosystem}),(0,W.jsx)(Z,{span:!0,size:`xs`,fw:700,truncate:!0,children:e.name}),(0,W.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,truncate:!0,style:{flex:1},children:e.root?`${e.root}/`:``}),(0,W.jsxs)(Z,{span:!0,size:`xs`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:[`utilisé par `,e.usedBy.length,` · utilise `,e.dependsOn.length]})]})}),t.map(e=>E(e,y.indexOf(e)+1))]},e.root)}),y.some(e=>!S.has(e.path))&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`tree-dir`,children:`Hors des packages`}),y.filter(e=>!S.has(e.path)).map(e=>E(e,y.indexOf(e)+1))]})]}):(0,W.jsxs)(W.Fragment,{children:[b.map((e,t)=>E(e,t+1)),x.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`tree-dir`,children:[`Sans lien avec les autres fichiers de la PR (`,x.length,`)`]}),x.map(e=>E(e))]})]})]}),(0,W.jsx)(rm,{opened:o,onClose:()=>s(!1),fullScreen:!0,title:(0,W.jsxs)(ql,{gap:`md`,children:[(0,W.jsx)(Z,{fw:600,children:`Liens entre les fichiers modifiés`}),(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,children:`à gauche la base (fichiers utilisés par les autres), à droite ce qui les utilise · flèche = « est utilisé par » · trait plein = import, pointillé = mention · glisser pour déplacer, molette pour zoomer, clic pour ouvrir le fichier`})]}),styles:{body:{height:`calc(100vh - 60px)`,padding:0}},children:(0,W.jsxs)(nh,{gap:0,h:`100%`,children:[(0,W.jsxs)(ql,{gap:`lg`,px:`md`,py:6,children:[(0,W.jsx)(kf,{size:`xs`,label:`Mentions`,checked:n,onChange:e=>r(e.currentTarget.checked)}),(0,W.jsx)(kf,{size:`xs`,label:`Fichiers sans lien`,checked:i,onChange:e=>a(e.currentTarget.checked)}),d&&(0,W.jsx)(kf,{size:`xs`,label:`Autres packages du monorepo (${d.packages.filter(e=>!e.touched).length})`,checked:f,onChange:e=>p(e.currentTarget.checked)})]}),(0,W.jsx)(dV,{stats:T,groups:u,context:f?d:null,edges:m,currentPath:e.currentPath,onSelect:t=>{s(!1),e.onSelect(t)}})]})})]})}function pV(e){let t=mV(),[n,r]=Ge({key:`br:linksMentions`,defaultValue:!0}),i=(0,C.useMemo)(()=>(t.data?.edges??[]).filter(e=>n||e.kind===`import`),[t.data,n]),a=hV(t.data),o=(0,C.useMemo)(()=>{if(!t.data||!a)return null;let n=new Map(t.data.packages.flatMap(e=>e.files.map(t=>[t,e.root]))),r=new Map;for(let t of e.stats){let e=n.get(t.path);e!==void 0&&!r.has(e)&&r.set(e,t.path)}return{context:a,rootOf:n,firstFile:r,imports:t.data.packageImports}},[t.data,a,e.stats]);return t.isPending?(0,W.jsx)(gV,{}):t.isError?(0,W.jsx)(_V,{message:t.error.message}):(0,W.jsxs)(`div`,{className:`panel-body`,children:[(0,W.jsx)(kf,{size:`xs`,pb:6,label:`Inclure les mentions (noms ou chemins cités dans le texte)`,checked:n,onChange:e=>r(e.currentTarget.checked)}),(0,W.jsx)(uV,{center:e.currentPath,edges:i,stats:e.stats,onSelect:e.onSelect,packages:o})]})}function mV(){let e=SF();return fv({...TE().pr.links.queryOptions({ref:e.ref,base:e.range.base,head:e.range.head,fullPr:e.range.fullPr}),staleTime:1/0})}function hV(e){return(0,C.useMemo)(()=>e&&e.workspace.length>0?{packages:e.workspace.map(e=>({id:e.root,label:e.name,touched:e.touched})),edges:e.packageEdges}:null,[e])}function gV(){return(0,W.jsxs)(ql,{p:`md`,gap:`xs`,children:[(0,W.jsx)(kl,{size:`xs`}),(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,children:`Analyse des imports…`})]})}function _V({message:e}){return(0,W.jsx)($d,{color:`red`,m:`xs`,title:`Liens indisponibles`,children:e})}function vV(e){let t=e.width??48,n=aL(e),r=e.max>0?Math.max(n>0?2:0,n/e.max*t):0,i=n>0?e.additions/n*r:0;return(0,W.jsxs)(`span`,{className:`churn-bar`,style:{width:t},children:[(0,W.jsx)(`i`,{className:`add`,style:{width:i}}),(0,W.jsx)(`i`,{className:`del`,style:{width:r-i}})]})}function yV({additions:e,deletions:t}){return(0,W.jsxs)(Z,{span:!0,size:`xs`,ff:`monospace`,style:{whiteSpace:`nowrap`},children:[e>0&&(0,W.jsxs)(Z,{span:!0,c:`green.4`,inherit:!0,children:[`+`,e]}),` `,t>0&&(0,W.jsxs)(Z,{span:!0,c:`red.4`,inherit:!0,children:[`−`,t]})]})}function bV(e){let{stat:t}=e,n=(0,C.useRef)(null),r=e.current;return(0,C.useEffect)(()=>{r&&n.current?.scrollIntoView({block:`nearest`})},[r]),(0,W.jsxs)(`div`,{ref:n,className:`tree-node`,"data-current":r||void 0,"data-viewed":t.state===`viewed`||void 0,onClick:e.onSelect,title:t.path,style:{paddingLeft:10+e.depth*14},children:[(0,W.jsx)(XI,{state:t.state}),(0,W.jsxs)(`span`,{className:`tree-name`,children:[t.path.split(`/`).at(-1),e.dir&&(0,W.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,ml:6,children:e.dir})]}),t.openThreads>0&&(0,W.jsxs)(Z,{span:!0,size:`xs`,c:t.unreadThreads>0?`orange.4`:`yellow.4`,children:[(0,W.jsx)(`i`,{className:`ico-c`}),t.openThreads]}),(0,W.jsx)(vV,{additions:t.additions,deletions:t.deletions,max:e.maxChurn,width:36}),(0,W.jsx)(yV,{additions:t.additions,deletions:t.deletions})]})}function xV(e){let t=Math.max(0,...e.stats.map(aL));if(e.sort===`churn`)return(0,W.jsx)(W.Fragment,{children:e.stats.map(n=>(0,W.jsx)(bV,{stat:n,depth:0,dir:n.path.includes(`/`)?n.path.slice(0,n.path.lastIndexOf(`/`)):void 0,current:n.path===e.currentPath,maxChurn:t,onSelect:()=>e.onSelect(n.path)},n.path))});let n=[];for(let t of e.stats){let e=t.path.includes(`/`)?t.path.slice(0,t.path.lastIndexOf(`/`)):``,r=n.at(-1);r&&r.dir===e?r.stats.push(t):n.push({dir:e,stats:[t]})}return(0,W.jsx)(W.Fragment,{children:n.map((n,r)=>(0,W.jsxs)(`div`,{children:[n.dir&&(0,W.jsxs)(`div`,{className:`tree-dir`,children:[n.dir,`/`]}),n.stats.map(n=>(0,W.jsx)(bV,{stat:n,depth:1,current:n.path===e.currentPath,maxChurn:t,onSelect:()=>e.onSelect(n.path)},n.path))]},`${n.dir}:${r}`))})}function SV(e){let[t,n]=(0,C.useState)(new Set),r=lL(e.root,t),i=aL(e.root),a=Math.max(0,...r.flatMap(e=>e.kind===`file`?[aL(e.stat)]:[])),o=e=>n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return(0,W.jsx)(W.Fragment,{children:r.map(n=>n.kind===`dir`?(0,W.jsxs)(`div`,{className:`tree-node tree-folder`,style:{paddingLeft:6+n.depth*14},onClick:()=>o(n.path),title:`${n.path}/ · ${n.fileCount} fichiers · ${n.viewedCount} vus`,children:[(0,W.jsx)(`span`,{className:`tree-chevron`,children:t.has(n.path)?`▸`:`▾`}),(0,W.jsxs)(`span`,{className:`tree-name`,children:[n.name,`/`]}),n.openThreads>0&&(0,W.jsxs)(Z,{span:!0,size:`xs`,c:`yellow.4`,children:[(0,W.jsx)(`i`,{className:`ico-c`}),n.openThreads]}),(0,W.jsxs)(Z,{span:!0,size:`xs`,c:n.viewedCount===n.fileCount?`green.5`:`dimmed`,children:[n.viewedCount,`/`,n.fileCount]}),(0,W.jsx)(vV,{additions:n.additions,deletions:n.deletions,max:i,width:36}),(0,W.jsx)(yV,{additions:n.additions,deletions:n.deletions})]},`d:${n.path}`):(0,W.jsx)(bV,{stat:n.stat,depth:n.depth+.6,current:n.path===e.currentPath,maxChurn:a,onSelect:()=>e.onSelect(n.path)},n.path))})}function CV(e){let{stats:t}=e,[n,r]=(0,C.useState)([]),[i,a]=(0,C.useState)(``),o=(0,C.useMemo)(()=>t.filter(e=>(!n.includes(`unviewed`)||e.state!==`viewed`)&&(!n.includes(`threads`)||e.openThreads>0)&&(i===``||e.path.toLowerCase().includes(i.toLowerCase()))),[t,n,i]),s=(0,C.useMemo)(()=>cL(o),[o]),c=t.filter(e=>e.state===`viewed`).length;return(0,W.jsxs)(`div`,{className:`file-nav`,children:[(0,W.jsx)(Qm,{size:`xs`,mx:10,mb:6,value:e.nav,onChange:t=>e.onNavChange(t===`list`||t===`links`?t:`tree`),data:[{value:`list`,label:`Liste`},{value:`tree`,label:`Arbre`},{value:`links`,label:`Liens`}]}),(0,W.jsxs)(ql,{gap:4,px:10,pb:6,children:[(0,W.jsxs)(op.Group,{multiple:!0,value:n,onChange:r,children:[(0,W.jsx)(op,{size:`xs`,value:`unviewed`,children:`Non vus`}),(0,W.jsx)(op,{size:`xs`,value:`threads`,children:`Threads ouverts`})]}),e.nav!==`links`&&(0,W.jsx)(Qm,{size:`xs`,ml:`auto`,value:e.sort,onChange:t=>e.onSortChange(t===`churn`?`churn`:`name`),data:[{value:`name`,label:`A→Z`},{value:`churn`,label:`Taille`}]})]}),(0,W.jsx)(Mh,{size:`xs`,px:10,pb:6,placeholder:`Filtrer les fichiers…`,value:i,onChange:e=>a(e.currentTarget.value)}),(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,px:10,pb:4,children:[c,`/`,t.length,` fichiers vus · `,aL(s),` lignes modifiées`,o.length===t.length?``:` · ${o.length} affichés`]}),o.length===0?(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,px:10,children:`Aucun fichier.`}):e.nav===`links`?(0,W.jsx)(fV,{stats:o,currentPath:e.currentPath,onSelect:e.onSelect}):(0,W.jsx)(`div`,{className:`file-nav-scroll`,children:e.nav===`tree`?(0,W.jsx)(SV,{root:s,currentPath:e.currentPath,onSelect:e.onSelect}):(0,W.jsx)(xV,{stats:o,sort:e.sort,currentPath:e.currentPath,onSelect:e.onSelect})})]})}function wV(e){let t=SF(),n=iS({from:`/$owner/$repo/pull/$number`}),[r,i]=(0,C.useState)(!1),[a,o]=(0,C.useState)(null),s=t.detail.commits,c=t.detail.myReview?.commitOid??null,l=e=>{n({search:t=>({...t,range:e})}),i(!1)},u=new Set;if(t.range.kind===`commits`){let e=s.findIndex(e=>e.parentOid===t.range.base),n=s.findIndex(e=>e.oid===t.range.head);if(e!==-1&&n>=e)for(let t of s.slice(e,n+1))u.add(t.oid)}let d=(e,t,n,r=!1)=>(0,W.jsx)(Pm,{value:e,disabled:r,label:(0,W.jsxs)(ql,{gap:8,justify:`space-between`,wrap:`nowrap`,w:380,children:[(0,W.jsx)(Z,{size:`sm`,children:t}),(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,children:n})]})},e);return(0,W.jsxs)(xl,{opened:r,onChange:i,position:`bottom-start`,shadow:`lg`,width:460,trapFocus:!0,children:[(0,W.jsx)(xl.Target,{children:(0,W.jsxs)(Qf,{size:`compact-sm`,variant:`light`,onClick:()=>i(e=>!e),rightSection:`▾`,children:[`Plage : `,t.range.label]})}),(0,W.jsxs)(xl.Dropdown,{p:`sm`,children:[(0,W.jsx)(Z,{size:`xs`,tt:`uppercase`,fw:600,c:`dimmed`,mb:6,children:`Plage de comparaison`}),(0,W.jsx)(Pm.Group,{value:t.range.kind===`commits`?``:t.range.kind,onChange:l,children:(0,W.jsxs)(nh,{gap:8,children:[d(`all`,`Tous les changements`,`${s.length} commits · ${t.detail.files.length} fichiers`),d(`visit`,`Depuis ma dernière visite`,e.visitAt?e.visitHead===t.detail.pr.headRefOid?`aucun nouveau commit`:new Date(e.visitAt).toLocaleString(`fr`):`jamais visitée`,!e.visitAt||e.visitHead===t.detail.pr.headRefOid),d(`review`,`Depuis ma dernière review`,c?c===t.detail.pr.headRefOid?`à jour`:c.slice(0,7):`jamais reviewée`,!c||c===t.detail.pr.headRefOid)]})}),(0,W.jsx)(_p,{my:`sm`}),(0,W.jsx)(Z,{size:`xs`,tt:`uppercase`,fw:600,c:`dimmed`,mb:6,children:`Commits (clic : un commit · Maj+clic : intervalle)`}),(0,W.jsx)(nh,{gap:2,mah:320,style:{overflow:`auto`},children:s.map((e,t)=>(0,W.jsxs)(ql,{gap:8,wrap:`nowrap`,px:4,py:2,style:{cursor:`pointer`,borderRadius:4,background:e.seen?void 0:`rgba(255,146,43,.08)`},onClick:e=>{let n=e.shiftKey&&a!==null?Math.min(a,t):t,r=e.shiftKey&&a!==null?Math.max(a,t):t;o(t);let i=s[n],c=s[r];i.parentOid&&l(`${i.parentOid}..${c.oid}`)},children:[(0,W.jsx)(kf,{size:`xs`,readOnly:!0,checked:u.has(e.oid)}),(0,W.jsx)(Z,{ff:`monospace`,size:`xs`,c:`dimmed`,children:e.shortOid}),(0,W.jsx)(Z,{size:`sm`,truncate:!0,style:{flex:1},children:e.headline}),!e.seen&&(0,W.jsx)(Uf,{size:`xs`,color:`orange`,variant:`light`,children:`nouveau`}),(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,children:ME(e.date)})]},e.oid))}),(0,W.jsx)(Z,{size:`xs`,c:`dimmed`,mt:`sm`,children:`Hors « tous les changements », seuls les commentaires côté nouveau code sont possibles (numéros de ligne de la PR).`})]})]})}function TV(e){let t=SF(),n=wF(t.ref),[r,i]=(0,C.useState)(``),a=t.detail.pr.author?.login===t.me,[o,s]=(0,C.useState)(`COMMENT`),c=t.detail.pendingReview,l=async()=>{await n.submitReview.mutateAsync({prId:t.detail.pr.id,pendingReviewId:c?.id??null,event:o,body:r}),i(``),e.onChange(!1)};return(0,W.jsxs)(xl,{opened:e.opened,onChange:e.onChange,position:`bottom-end`,shadow:`lg`,width:400,trapFocus:!0,children:[(0,W.jsx)(xl.Target,{children:(0,W.jsx)(Qf,{size:`compact-sm`,onClick:()=>e.onChange(!e.opened),rightSection:(0,W.jsx)(Bp,{size:`xs`,children:`⇧S`}),children:c?`Soumettre la review (${c.comments})`:`Review`})}),(0,W.jsxs)(xl.Dropdown,{children:[(0,W.jsx)(Z,{fw:600,mb:6,children:c?`Review en attente · ${c.comments} commentaire${c.comments>1?`s`:``}`:`Nouvelle review`}),(0,W.jsx)(Lp,{autosize:!0,minRows:3,placeholder:`Résumé (optionnel)`,value:r,onChange:e=>i(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&l()}}),(0,W.jsx)(Pm.Group,{value:o,onChange:e=>s(e),my:`sm`,children:(0,W.jsxs)(nh,{gap:6,children:[(0,W.jsx)(Pm,{value:`COMMENT`,label:`Commenter`}),(0,W.jsx)(Jm,{label:`Impossible d’approuver sa propre PR`,disabled:!a,children:(0,W.jsx)(Pm,{value:`APPROVE`,label:`Approuver`,disabled:a})}),(0,W.jsx)(Jm,{label:`Impossible sur sa propre PR`,disabled:!a,children:(0,W.jsx)(Pm,{value:`REQUEST_CHANGES`,label:`Demander des changements`,disabled:a})})]})}),(0,W.jsxs)(ql,{justify:`flex-end`,gap:6,children:[c&&(0,W.jsx)(Qf,{size:`compact-sm`,variant:`subtle`,color:`red`,loading:n.discardReview.isPending,onClick:()=>n.discardReview.mutate({reviewId:c.id}),children:`Abandonner la review`}),(0,W.jsx)(Qf,{size:`compact-sm`,color:o===`APPROVE`?`green`:o===`REQUEST_CHANGES`?`red`:`blue`,loading:n.submitReview.isPending,disabled:!c&&o===`COMMENT`&&r.trim()===``,onClick:()=>void l(),children:`Soumettre`})]})]})]})}function EV(e){let t=SF(),{pr:n,checks:r,reviewers:i,requestedTeams:a}=t.detail,o=r?FE[r.state]:null;return(0,W.jsxs)(`div`,{className:`pr-head`,children:[(0,W.jsxs)(ql,{gap:8,wrap:`nowrap`,align:`baseline`,children:[(0,W.jsxs)(zh,{order:3,fw:600,style:{minWidth:0},lineClamp:1,children:[n.title,` `,(0,W.jsxs)(Z,{span:!0,c:`dimmed`,fw:400,inherit:!0,children:[n.owner,`/`,n.repo,` #`,n.number]})]}),(0,W.jsx)(sf,{href:n.url,target:`_blank`,size:`sm`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:`GitHub ↗`})]}),(0,W.jsxs)(ql,{gap:8,mt:4,wrap:`wrap`,children:[(0,W.jsx)(Uf,{color:n.state===`OPEN`?n.isDraft?`gray`:`green`:n.state===`MERGED`?`violet`:`red`,variant:`light`,children:n.isDraft?`Brouillon`:n.state===`OPEN`?`Ouverte`:n.state===`MERGED`?`Mergée`:`Fermée`}),(0,W.jsx)(Bf,{src:n.author?.avatarUrl,size:20}),(0,W.jsxs)(Z,{size:`sm`,c:`dimmed`,children:[n.author?.login??`ghost`,` · `,t.detail.commits.length,` commits de`,` `,(0,W.jsx)(Z,{span:!0,ff:`monospace`,c:`blue.4`,inherit:!0,children:n.headRefName}),` `,`vers`,` `,(0,W.jsx)(Z,{span:!0,ff:`monospace`,c:`blue.4`,inherit:!0,children:n.baseRefName}),` `,`· ouverte `,ME(n.createdAt)]}),o&&r&&(0,W.jsxs)(xl,{position:`bottom`,shadow:`md`,width:360,children:[(0,W.jsx)(xl.Target,{children:(0,W.jsxs)(Uf,{color:o.color,variant:`light`,style:{cursor:`pointer`},children:[o.label,` · `,r.contexts.length]})}),(0,W.jsx)(xl.Dropdown,{children:(0,W.jsx)(nh,{gap:4,children:r.contexts.map(e=>(0,W.jsxs)(ql,{gap:6,wrap:`nowrap`,children:[(0,W.jsx)(Uf,{size:`xs`,color:/SUCCESS/.test(e.state)?`green`:/FAIL|ERROR/.test(e.state)?`red`:`yellow`,children:e.state.toLowerCase()}),e.url?(0,W.jsx)(sf,{href:e.url,target:`_blank`,size:`sm`,truncate:!0,children:e.name}):(0,W.jsx)(Z,{size:`sm`,children:e.name})]},e.name))})})]}),n.mergeable===`CONFLICTING`&&(0,W.jsx)(Uf,{color:`red`,variant:`light`,children:`conflits`}),i.map(e=>(0,W.jsxs)(Uf,{variant:`outline`,color:PE[e.state]?.color??`gray`,leftSection:(0,W.jsx)(Bf,{src:e.avatarUrl,size:14}),children:[e.login,` : `,PE[e.state]?.label??e.state]},e.login)),a.map(e=>(0,W.jsxs)(Uf,{variant:`outline`,color:`yellow`,children:[`@`,e,` : demandé`]},e))]}),(0,W.jsxs)(`div`,{className:`pr-bar`,children:[(0,W.jsx)(wV,{visitAt:e.visitAt,visitHead:e.visitHead}),e.children]})]})}function DV(){let e=zV.useParams(),t=(0,C.useMemo)(()=>({owner:e.owner,repo:e.repo,number:Number(e.number)}),[e.owner,e.repo,e.number]),n=TE(),r=Gg(),i=fv(n.pr.get.queryOptions(t));return bE(n.pr.onChange.subscriptionOptions(t,{onData:()=>void r.invalidateQueries({queryKey:n.pr.get.queryKey(t)})})),i.isPending?(0,W.jsx)(ep,{style:{flex:1},children:(0,W.jsx)(kl,{})}):i.isError?(0,W.jsx)($d,{color:`red`,m:`lg`,title:`PR introuvable ou inaccessible`,children:i.error.message}):(0,W.jsx)(kV,{ref_:t,detail:i.data},`${t.owner}/${t.repo}#${t.number}`)}function OV(e,t,n){let{baseRefOid:r,headRefOid:i}=t.pr,a={kind:`all`,base:r,head:i,fullPr:!0,label:`Tous les changements`};if(e===`visit`&&n&&n!==i)return{kind:`visit`,base:n,head:i,fullPr:!1,label:`Depuis ma dernière visite`};let o=t.myReview?.commitOid;if(e===`review`&&o&&o!==i)return{kind:`review`,base:o,head:i,fullPr:!1,label:`Depuis ma dernière review`};let s=/^([0-9a-f]{7,40})\.\.([0-9a-f]{7,40})$/.exec(e);if(s){let[,e,n]=s,r=t.commits.find(t=>t.parentOid===e),i=t.commits.find(e=>e.oid===n);return{kind:`commits`,base:e,head:n,fullPr:!1,label:r&&i&&r.oid===i.oid?`Commit ${i.shortOid}`:`Commits ${r?.shortOid??e.slice(0,7)}…${i?.shortOid??n.slice(0,7)}`}}return a}function kV({ref_:e,detail:t}){let n=TE(),r=iS({from:`/$owner/$repo/pull/$number`}),i=zV.useSearch(),a=wF(e),[o]=(0,C.useState)(()=>Date.now()),[s]=(0,C.useState)(()=>t.pr.headRefOid),[c,l]=Ge({key:`br:layout`,defaultValue:`split`}),[u,d]=Ge({key:`br:panel`,defaultValue:!0}),[f,p]=Ge({key:`br:panelTab`,defaultValue:`conversations`}),m=e=>{u&&f===e?d(!1):(p(e),d(!0))},[h,g]=Ge({key:`br:tree`,defaultValue:!0}),[_,v]=Ge({key:`br:nav`,defaultValue:`tree`}),y=_===`list`||_===`links`?_:`tree`,[b,x]=Ge({key:`br:navSort`,defaultValue:`name`}),[S]=Ge({key:`br:linksMentions`,defaultValue:!0}),[w,T]=(0,C.useState)(null),[E,D]=(0,C.useState)(null),[O,k]=(0,C.useState)(null),[A,j]=(0,C.useState)(new Set),[M,N]=(0,C.useState)({fileIdx:null,hunkIdx:null}),[ee,P]=(0,C.useState)(!1),[F,I]=(0,C.useState)(!1),L=(0,C.useRef)(null),R=t.pr.headRefOid,te=t.visits.find(e=>e.visitedAt<o)??null,ne=te?.headOid??null,re=ne&&ne!==R?`visit`:`all`,ie=OV(i.range??re,t,ne),ae=i.mode??`continuous`,oe=fv({...n.pr.diff.queryOptions({ref:e,base:ie.base,head:ie.head,fullPr:ie.fullPr}),staleTime:1/0}),se=fv({...n.pr.links.queryOptions({ref:e,base:ie.base,head:ie.head,fullPr:ie.fullPr}),staleTime:1/0,enabled:y===`links`}),ce=(0,C.useMemo)(()=>{let e=oe.data?.files??[],t=new Map(e.map(e=>[e.path,e])),n;if(y!==`links`)n=uL(e,y,b);else if(se.data){let t=se.data.edges.filter(e=>S||e.kind===`import`),r=e.map(e=>e.path);n=se.data.packages.length>0?yF(se.data.packages.map(e=>({items:e.files})),r,t):vF(r,t)}else return e;return n.flatMap(e=>t.get(e)??[])},[oe.data,y,b,se.data,S]),le=a.visit.mutate,z=(0,C.useRef)(!1);(0,C.useEffect)(()=>{z.current||(z.current=!0,le({ref:e,headOid:R,commitOids:t.commits.map(e=>e.oid)}))},[le,e,R,t.commits]);let B=(0,C.useMemo)(()=>new Set(t.seenHunks),[t.seenHunks]),V=(0,C.useMemo)(()=>{let e=new Map(t.files.map(e=>[e.path,e.viewed]));return ce.map(n=>{let r=t.threads.filter(e=>e.path===n.path&&!e.isResolved);return{path:n.path,additions:n.additions,deletions:n.deletions,state:qI(n,e.get(n.path),B).state,openThreads:r.length,unreadThreads:r.filter(e=>e.unread>0).length}})},[ce,t.files,t.threads,B]),ue=ae===`focus`?ce.find(e=>e.path===i.file)??ce.find(e=>t.files.find(t=>t.path===e.path)?.viewed!==`VIEWED`)??ce[0]??null:null,de=ae===`focus`?ue?.path??null:ce[M.fileIdx??-1]?.path??null,fe={ref:e,detail:t,diff:oe.data??null,me:t.viewer.login,range:ie,layout:c,mode:ae,pendingReviewId:t.pendingReview?.id??null,seenHunks:B,selection:w,setSelection:e=>{T(e),e&&D(null)},fileComposer:E,setFileComposer:e=>{D(e),e&&T(null)},focusedThread:O,setFocusedThread:k,canComment:e=>t.pr.state===`OPEN`&&ie.head===R&&(e===`RIGHT`||ie.fullPr),scrollToThread:e=>{k(e);let n=t.threads.find(t=>t.id===e);ae===`focus`&&n&&n.path!==ue?.path&&ce.some(e=>e.path===n.path)?(r({search:e=>({...e,file:n.path})}),requestAnimationFrame(()=>L.current?.scrollToThread(e))):L.current?.scrollToThread(e)},scrollToFile:e=>{ae===`focus`?r({search:t=>({...t,file:e})}):L.current?.scrollToFile(e)},advanceFrom:e=>{if(ae===`focus`){let n=AV(ce,t,e);n&&r({search:e=>({...e,file:n.path})});return}let n=ce[ce.findIndex(t=>t.path===e)+1];n&&L.current?.scrollToFile(n.path)}},pe=t.files.filter(e=>e.viewed===`VIEWED`).length,H=ce.reduce((e,t)=>e+t.hunks.length,0),me=ce.reduce((e,t)=>e+t.hunks.filter(e=>B.has(`${t.path}\n${e.hash}`)).length,0);return(0,W.jsx)(xF,{value:fe,children:(0,W.jsxs)(`div`,{className:`pr-page`,children:[(0,W.jsxs)(EV,{visitAt:te?.visitedAt??null,visitHead:ne,children:[(0,W.jsx)(Qm,{size:`xs`,value:ae,onChange:e=>void r({search:t=>({...t,mode:e===`focus`?`focus`:`continuous`})}),data:[{value:`continuous`,label:`Continu`},{value:`focus`,label:`Focus`}]}),(0,W.jsx)(Qm,{size:`xs`,value:c,onChange:e=>l(e===`unified`?`unified`:`split`),data:[{value:`split`,label:`Côte à côte`},{value:`unified`,label:`Unifié`}]}),(0,W.jsx)(`div`,{style:{flex:1}}),(0,W.jsx)(Jm,{label:`${me}/${H} hunks vus dans la plage`,children:(0,W.jsxs)(ql,{gap:6,children:[(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`Vu `,pe,`/`,t.files.length,` fichiers`]}),(0,W.jsx)(ym,{w:90,size:`sm`,color:`green`,value:t.files.length?pe/t.files.length*100:0})]})}),(0,W.jsx)(Qf,{size:`compact-sm`,variant:h?`light`:`default`,onClick:()=>g(!h),children:`Fichiers`}),(0,W.jsx)(Qf,{size:`compact-sm`,variant:u&&f===`description`?`light`:`default`,onClick:()=>m(`description`),children:`Description`}),(0,W.jsxs)(Qf,{size:`compact-sm`,variant:u&&f===`conversations`?`light`:`default`,onClick:()=>m(`conversations`),children:[`Conversations `,t.threads.filter(e=>!e.isResolved).length]}),(0,W.jsx)(Qf,{size:`compact-sm`,variant:u&&f===`neighbors`?`light`:`default`,onClick:()=>m(`neighbors`),children:`Voisinage`}),(0,W.jsx)(TV,{opened:ee,onChange:P})]}),s!==R&&ie.base!==s&&(0,W.jsx)($d,{color:`orange`,variant:`light`,radius:0,py:6,children:(0,W.jsxs)(ql,{gap:`sm`,children:[(0,W.jsx)(Z,{size:`sm`,children:`Nouveaux commits poussés pendant votre lecture.`}),(0,W.jsx)(Qf,{size:`compact-xs`,variant:`light`,color:`orange`,onClick:()=>void r({search:e=>({...e,range:`${s}..${R}`})}),children:`Voir uniquement ces changements`})]})}),ae===`focus`&&ue&&(0,W.jsx)(jV,{files:ce,current:ue}),(0,W.jsxs)(`div`,{className:`pr-body`,"data-tree":h?`open`:`closed`,"data-panel":u?`open`:`closed`,children:[h&&(0,W.jsx)(`aside`,{className:`pr-tree`,children:(0,W.jsx)(CV,{stats:V,nav:y,onNavChange:v,sort:b,onSortChange:x,currentPath:de,onSelect:fe.scrollToFile})}),(0,W.jsxs)(`main`,{style:{minWidth:0,minHeight:0},children:[oe.isPending&&(0,W.jsx)(ep,{h:`100%`,children:(0,W.jsx)(kl,{})}),oe.isError&&(0,W.jsxs)($d,{color:`red`,m:`md`,title:`Diff indisponible pour cette plage`,children:[oe.error.message,(0,W.jsx)(Qf,{mt:`sm`,size:`xs`,onClick:()=>void r({search:e=>({...e,range:`all`})}),children:`Revenir à tous les changements`})]}),oe.data&&(0,W.jsx)(iL,{files:ce,onlyFile:ue?.path??null,collapsed:A,onToggleCollapse:e=>j(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),onCurrentChange:(e,t)=>N({fileIdx:e,hunkIdx:t}),handleRef:L})]}),u&&(0,W.jsxs)(`aside`,{className:`pr-panel`,children:[(0,W.jsx)(Qm,{className:`panel-tabs`,size:`xs`,fullWidth:!0,value:f,onChange:e=>p(e===`description`||e===`neighbors`?e:`conversations`),data:[{value:`conversations`,label:`Conversations ${t.threads.filter(e=>!e.isResolved).length}`},{value:`description`,label:`Description`},{value:`neighbors`,label:`Voisinage`}]}),(0,W.jsx)(`div`,{className:`panel-scroll`,children:f===`description`?(0,W.jsx)(DF,{}):f===`neighbors`?(0,W.jsx)(pV,{stats:V,currentPath:de,onSelect:fe.scrollToFile}):(0,W.jsx)(EF,{})})]})]}),(0,W.jsx)(MV,{files:ce,focusFile:ue,current:M,listRef:L,onToggleReview:()=>P(e=>!e),onToggleConversations:()=>m(`conversations`),onToggleDescription:()=>m(`description`),onToggleTree:()=>g(!h),onToggleLayout:()=>l(c===`split`?`unified`:`split`),onHelp:()=>I(!0)}),(0,W.jsx)(PV,{opened:F,onClose:()=>I(!1)})]})})}function AV(e,t,n){let r=e.findIndex(e=>e.path===n);return[...e.slice(r+1),...e.slice(0,r)].find(e=>t.files.find(t=>t.path===e.path)?.viewed!==`VIEWED`)}function jV({files:e,current:t}){let n=iS({from:`/$owner/$repo/pull/$number`}),r=YI(),i=SF(),a=e.indexOf(t),o=e=>e&&void n({search:t=>({...t,file:e.path})}),s=e.filter(e=>i.detail.files.find(t=>t.path===e.path)?.viewed!==`VIEWED`).length;return(0,W.jsxs)(ql,{className:`focus-bar`,gap:`sm`,px:`md`,py:6,children:[(0,W.jsxs)(Qf,{size:`compact-xs`,variant:`default`,onClick:()=>o(e[a-1]),disabled:a<=0,children:[`←`,` `,(0,W.jsx)(Bp,{size:`xs`,ml:4,children:`k`})]}),(0,W.jsx)(Z,{ff:`monospace`,fw:600,size:`sm`,children:t.path}),(0,W.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`fichier `,a+1,`/`,e.length,` · `,s,` non vu`,s>1?`s`:``]}),(0,W.jsx)(`div`,{style:{flex:1}}),(0,W.jsx)(`div`,{className:`steps`,children:e.map(e=>{let n=i.detail.files.find(t=>t.path===e.path)?.viewed;return(0,W.jsx)(`i`,{title:e.path,"data-state":e===t?`current`:n===`VIEWED`?`viewed`:`none`,onClick:()=>o(e)},e.path)})}),(0,W.jsx)(Qf,{size:`compact-xs`,color:`green`,onClick:()=>{r.toggleFile(t,!0),i.advanceFrom(t.path)},rightSection:(0,W.jsx)(Bp,{size:`xs`,children:`v`}),children:`✓ Vu, suivant non vu`}),(0,W.jsxs)(Qf,{size:`compact-xs`,variant:`default`,onClick:()=>o(e[a+1]),disabled:a>=e.length-1,children:[(0,W.jsx)(Bp,{size:`xs`,mr:4,children:`j`}),` `,`→`]})]})}function MV(e){let t=SF(),n=wF(t.ref),r=YI(),i=iS({from:`/$owner/$repo/pull/$number`}),{files:a,focusFile:o,listRef:s}=e,c=o??a[e.current.fileIdx??-1]??null,l=c&&e.current.hunkIdx!==null?c.hunks[e.current.hunkIdx]:void 0,u=e=>{if(o){let t=a[a.indexOf(o)+e];t&&i({search:e=>({...e,file:t.path})})}else s.current?.step(`file`,e)},d=t.detail.threads.find(e=>e.id===t.focusedThread);return lt([[`j`,()=>u(1)],[`k`,()=>u(-1)],[`n`,()=>s.current?.step(`hunk`,1)],[`p`,()=>s.current?.step(`hunk`,-1)],[`]`,()=>s.current?.step(`thread`,1)],[`v`,()=>{if(!c)return;let e=t.detail.files.find(e=>e.path===c.path)?.viewed===`VIEWED`;r.toggleFile(c,!e),e||t.advanceFrom(c.path)}],[`h`,()=>{c&&l&&(r.toggleHunk(c,l,!t.seenHunks.has(`${c.path}\n${l.hash}`)),s.current?.step(`hunk`,1))}],[`r`,()=>{document.querySelector(`[data-thread="${t.focusedThread}"] [data-reply]`)?.click()}],[`x`,()=>d&&(d.isResolved?d.canUnresolve:d.canResolve)&&n.setResolved.mutate({threadId:d.id,resolved:!d.isResolved})],[`m`,()=>void i({search:e=>({...e,mode:t.mode===`focus`?`continuous`:`focus`})})],[`u`,e.onToggleLayout],[`t`,e.onToggleConversations],[`d`,e.onToggleDescription],[`f`,e.onToggleTree],[`shift+S`,e.onToggleReview],[`i`,()=>void i({to:`/`})],[`Escape`,()=>{t.setSelection(null),t.setFileComposer(null)}],[`shift+?`,e.onHelp]]),(0,W.jsxs)(`div`,{className:`statusbar`,children:[(0,W.jsxs)(`span`,{children:[(0,W.jsx)(Bp,{size:`xs`,children:`j`}),`/`,(0,W.jsx)(Bp,{size:`xs`,children:`k`}),` fichier`]}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(Bp,{size:`xs`,children:`n`}),`/`,(0,W.jsx)(Bp,{size:`xs`,children:`p`}),` hunk`]}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(Bp,{size:`xs`,children:`]`}),`/`,(0,W.jsx)(Bp,{size:`xs`,children:`[`}),` thread ouvert`]}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(Bp,{size:`xs`,children:`v`}),` fichier vu · `,(0,W.jsx)(Bp,{size:`xs`,children:`h`}),` hunk vu`]}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(Bp,{size:`xs`,children:`r`}),` répondre · `,(0,W.jsx)(Bp,{size:`xs`,children:`x`}),` résoudre`]}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(Bp,{size:`xs`,children:`?`}),` aide`]}),(0,W.jsx)(`div`,{style:{flex:1}}),(0,W.jsxs)(`span`,{children:[c?c.path:``,c&&l?` · hunk ${(e.current.hunkIdx??0)+1}/${c.hunks.length}`:``]})]})}var NV=[[`j / k`,`fichier suivant / précédent`],[`n / p`,`hunk suivant / précédent`],[`] / [`,`thread non résolu suivant / précédent`],[`v`,`marquer le fichier vu, puis fichier suivant (focus : fichier non vu suivant)`],[`h`,`marquer le hunk courant vu, puis hunk suivant`],[`r`,`répondre au thread sélectionné`],[`x`,`résoudre / rouvrir le thread sélectionné`],[`clic n° de ligne`,`commenter (Maj+clic : plage)`],[`m`,`mode continu / focus`],[`u`,`côte à côte / unifié`],[`t`,`panneau conversations`],[`d`,`description de la PR`],[`f`,`arbre des fichiers`],[`Maj+S`,`soumettre la review`],[`i`,`retour à l’inbox`],[`Ctrl+K`,`aller à une PR`],[`Échap`,`fermer le commentaire en cours`]];function PV(e){return(0,W.jsx)(rm,{opened:e.opened,onClose:e.onClose,title:`Raccourcis clavier`,size:`md`,children:(0,W.jsx)(xh,{children:(0,W.jsx)(xh.Tbody,{children:NV.map(([e,t])=>(0,W.jsxs)(xh.Tr,{children:[(0,W.jsx)(xh.Td,{children:(0,W.jsx)(Bp,{children:e})}),(0,W.jsx)(xh.Td,{children:t})]},e))})})})}function FV(){let e=TE(),t=Gg(),n=fv(e.config.get.queryOptions()),[r,i]=(0,C.useState)(`repo`),[a,o]=(0,C.useState)(``),s=()=>{t.invalidateQueries({queryKey:e.config.get.queryKey()}),t.invalidateQueries({queryKey:e.inbox.get.queryKey()})},c=hv(e.config.add.mutationOptions({onSuccess:()=>{o(``),s()},onError:e=>ng.show({color:`red`,title:`Ajout impossible`,message:e.message})})),l=hv(e.config.remove.mutationOptions({onSuccess:s})),u=[...n.data?.orgs.map(e=>({kind:`org`,name:e}))??[],...n.data?.repos.map(e=>({kind:`repo`,name:e}))??[]];return(0,W.jsxs)(pp,{size:`sm`,py:`xl`,children:[(0,W.jsx)(zh,{order:2,mb:`xs`,children:`Repos et orgs suivis`}),(0,W.jsx)(Z,{c:`dimmed`,size:`sm`,mb:`lg`,children:`L’inbox ne montre que les PR de cette liste. Une org (ou un compte) suivie inclut tous ses repos. Le fichier de config peut aussi être édité à la main : les modifications sont prises en compte à chaud.`}),(0,W.jsx)(`form`,{onSubmit:e=>{e.preventDefault();let t=a.trim();t&&c.mutate({kind:r,name:t})},children:(0,W.jsxs)(ql,{align:`flex-end`,mb:`lg`,children:[(0,W.jsx)(Qm,{value:r,onChange:e=>i(e===`org`?`org`:`repo`),data:[{value:`repo`,label:`Repo`},{value:`org`,label:`Org / compte`}]}),(0,W.jsx)(Mh,{style:{flex:1},placeholder:r===`repo`?`owner/repo`:`nom-de-l-org`,value:a,onChange:e=>o(e.currentTarget.value),"data-autofocus":!0}),(0,W.jsx)(Qf,{type:`submit`,loading:c.isPending,children:`Suivre`})]})}),(0,W.jsxs)(nh,{gap:`xs`,children:[u.length===0&&(0,W.jsx)(Z,{c:`dimmed`,children:`Aucun repo suivi pour l’instant.`}),u.map(e=>(0,W.jsx)(Nc,{withBorder:!0,p:`xs`,px:`sm`,children:(0,W.jsxs)(ql,{justify:`space-between`,children:[(0,W.jsxs)(ql,{gap:`xs`,children:[(0,W.jsx)(Uf,{variant:`light`,color:e.kind===`org`?`violet`:`blue`,children:e.kind===`org`?`org`:`repo`}),(0,W.jsx)(Z,{ff:`monospace`,size:`sm`,children:e.name})]}),(0,W.jsx)(Ll,{variant:`subtle`,color:`red`,"aria-label":`Ne plus suivre ${e.name}`,onClick:()=>l.mutate(e),children:`✕`})]})},`${e.kind}:${e.name}`))]})]})}var IV=wS({component:kE}),LV=SS({getParentRoute:()=>IV,path:`/`,validateSearch:e=>typeof e.section==`string`?{section:e.section}:{},component:zE}),RV=SS({getParentRoute:()=>IV,path:`/settings`,component:FV}),zV=SS({getParentRoute:()=>IV,path:`/$owner/$repo/pull/$number`,validateSearch:e=>({...typeof e.range==`string`?{range:e.range}:{},...e.mode===`focus`||e.mode===`continuous`?{mode:e.mode}:{},...typeof e.file==`string`?{file:e.file}:{}}),component:DV}),BV=BS({routeTree:IV.addChildren([LV,RV,zV]),defaultPreload:`intent`,scrollRestoration:!1}),VV=tr({primaryColor:`blue`,defaultRadius:`sm`,fontFamilyMonospace:`ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace`,cursorType:`pointer`});(0,WC.createRoot)(document.getElementById(`root`)).render((0,W.jsx)(C.StrictMode,{children:(0,W.jsxs)(er,{theme:VV,defaultColorScheme:`dark`,forceColorScheme:`dark`,children:[(0,W.jsx)(Ug,{position:`bottom-left`,limit:4}),(0,W.jsx)(Kg,{client:DE,children:(0,W.jsx)(wE,{trpcClient:OE,queryClient:DE,children:(0,W.jsx)(US,{router:BV})})})]})}));